From 6d36f14a53c627aa12bca5837218f7e5fb0cfba7 Mon Sep 17 00:00:00 2001 From: Courtney Miles Date: Mon, 26 Aug 2024 19:54:58 +1000 Subject: [PATCH] Expand compatibility for php 8.2 and 8.3 (#74) * expand compatibility for php 8.2 and 8.3 * expand compatibility for php 8.2 and 8.3 --- .github/workflows/tests.yml | 2 +- Dockerfile | 2 +- composer.json | 2 +- docker-compose.yml | 3 +-- docker-run-tests.sh | 2 +- docker-style-check.sh | 2 +- docker-style-fix.sh | 2 +- phpunit.xml.dist | 6 +++++- src/SchemaValidator.php | 10 ++++++++++ 9 files changed, 22 insertions(+), 9 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 90fbe93..5f41912 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php-version: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1'] + php-version: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3'] composer-prefer: - '--prefer-dist' - '--prefer-stable --prefer-lowest' diff --git a/Dockerfile b/Dockerfile index f707c89..fc88748 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM php:8.1-cli +FROM php:8.2-cli RUN apt-get update -y diff --git a/composer.json b/composer.json index 6c44f5c..4ac909c 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,7 @@ "ext-mbstring": "*", "ext-json": "*", "justinrainbow/json-schema": "^5.2.10", - "nesbot/carbon": "^2.23.0", + "nesbot/carbon": "^2.63.0", "jmikola/geojson": "^1.0" }, "require-dev": { diff --git a/docker-compose.yml b/docker-compose.yml index e0cdc93..14c1b20 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,6 @@ -version: "2" services: tblschema: build: . volumes: - .:/src - command: bash \ No newline at end of file + command: bash diff --git a/docker-run-tests.sh b/docker-run-tests.sh index 5221adf..5a1d04f 100755 --- a/docker-run-tests.sh +++ b/docker-run-tests.sh @@ -2,4 +2,4 @@ set -o errexit -docker-compose run --rm tblschema composer test \ No newline at end of file +docker compose run --rm tblschema composer test diff --git a/docker-style-check.sh b/docker-style-check.sh index 77786bf..e321fe9 100755 --- a/docker-style-check.sh +++ b/docker-style-check.sh @@ -2,4 +2,4 @@ set -o errexit -docker-compose run --rm tblschema composer style-check \ No newline at end of file +docker compose run --rm tblschema composer style-check diff --git a/docker-style-fix.sh b/docker-style-fix.sh index fb986f5..51e912d 100755 --- a/docker-style-fix.sh +++ b/docker-style-fix.sh @@ -2,4 +2,4 @@ set -o errexit -docker-compose run --rm tblschema composer style-fix \ No newline at end of file +docker compose run --rm tblschema composer style-fix diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 8d0979d..ffe54a2 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -2,6 +2,10 @@ + + + + tests @@ -13,4 +17,4 @@ src - \ No newline at end of file + diff --git a/src/SchemaValidator.php b/src/SchemaValidator.php index 937249a..881618b 100644 --- a/src/SchemaValidator.php +++ b/src/SchemaValidator.php @@ -8,6 +8,16 @@ */ class SchemaValidator { + /** + * @var object + */ + private $descriptor; + + /** + * @var array + */ + private $errors; + /** * @param object $descriptor *