From f2c7ab2fed69683be5373d87412a870a4a7aec9b Mon Sep 17 00:00:00 2001 From: Diego Pino Navarro Date: Fri, 9 Jan 2026 16:11:20 -0500 Subject: [PATCH 1/6] Update justinrainbow/json-schema version to ^6.6 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 4ac909c..0aee4f8 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,7 @@ "php": ">=7.1.0", "ext-mbstring": "*", "ext-json": "*", - "justinrainbow/json-schema": "^5.2.10", + "justinrainbow/json-schema": "^6.6", "nesbot/carbon": "^2.63.0", "jmikola/geojson": "^1.0" }, From 070a5f84d540d6f2c8e8272bad7a5318f087c0be Mon Sep 17 00:00:00 2001 From: Diego Pino Navarro Date: Fri, 9 Jan 2026 16:55:16 -0500 Subject: [PATCH 2/6] Updates PHP Unit Schema for 9.3 --- phpunit.xml.dist | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index ffe54a2..30f43ba 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,20 +1,17 @@ - - - - - - - - tests - - - - - - src - - + + + + src + + + + + + + + + tests + + From dd988645078424af24ff7e4a9ed6bdd7899dc023 Mon Sep 17 00:00:00 2001 From: Diego Pino Navarro Date: Fri, 9 Jan 2026 16:57:16 -0500 Subject: [PATCH 3/6] Fixes test for Constraint Errors for justinrainbox/json-schema: >= 6 See \JsonSchema\Entity\ErrorBag::addError, constraint errors are an array and hold all the details inside that key, format top key is gone --- tests/SchemaTest.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/SchemaTest.php b/tests/SchemaTest.php index 30dc1e1..499fe48 100644 --- a/tests/SchemaTest.php +++ b/tests/SchemaTest.php @@ -584,9 +584,14 @@ public function testSpecsUriFormat(): void 'pointer' => '/0', // it considers file names to be invalid uris 'message' => 'Invalid URL format', - 'constraint' => 'format', - 'context' => 1, - 'format' => 'uri', + // Constraint errors are arrays since justinrainbow/json-schema:^6 + 'constraint' => [ + 'name' => 'urlFormat', + 'params' => [ + 'format' => 'uri' + ], + ], + 'context' => 1 ]], $validator->getErrors()); } From 754eefd1ebf032a5575b13118e3d8c9d023c3e5a Mon Sep 17 00:00:00 2001 From: Diego Pino Navarro Date: Fri, 30 Jan 2026 14:46:47 -0500 Subject: [PATCH 4/6] Update test to run PHP 8+ Coveralls reporting for 8.3 --- .github/workflows/tests.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ecbf86d..9de019f 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', '8.2', '8.3'] + php-version: ['8.1','8.2','8.3'] composer-prefer: - '--prefer-dist' - '--prefer-stable --prefer-lowest' @@ -17,7 +17,7 @@ jobs: name: Test PHP ${{ matrix.php-version }} / composer ${{matrix.composer-prefer}} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v5 - name: Setup PHP version ${{ matrix.php-version }} uses: shivammathur/setup-php@v2 @@ -45,7 +45,6 @@ jobs: - name: Run Code Style Check for PHP ${{ matrix.php-version }} run: composer run-script style-check - if: matrix.php-version != '7.1' - name: Run tests for PHP ${{ matrix.php-version }} run: composer run-script test @@ -56,4 +55,4 @@ jobs: run: vendor/bin/php-coveralls env: COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} - if: success() && matrix.php-version == '7.4' + if: success() && matrix.php-version == '8.3' From 1ce58741b2a535ef8b2553c01080fb6ed5da0de6 Mon Sep 17 00:00:00 2001 From: Diego Pino Navarro Date: Fri, 30 Jan 2026 14:49:10 -0500 Subject: [PATCH 5/6] Change descriptor and errors properties to protected Allow extending classes to access these values, can't find a rational to have these private --- src/SchemaValidator.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SchemaValidator.php b/src/SchemaValidator.php index 881618b..c0cfd55 100644 --- a/src/SchemaValidator.php +++ b/src/SchemaValidator.php @@ -11,12 +11,12 @@ class SchemaValidator /** * @var object */ - private $descriptor; + protected $descriptor; /** * @var array */ - private $errors; + protected $errors; /** * @param object $descriptor From 7fe73344be38ada365bb7554345ecfd9239a66ad Mon Sep 17 00:00:00 2001 From: Diego Pino Navarro Date: Fri, 30 Jan 2026 14:56:56 -0500 Subject: [PATCH 6/6] Upgrade PHP and PHPUnit version requirements PHP 8 supported sin 9.3 Not sure about the <10 here? --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 0aee4f8..35cdf5b 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "description": "A utility library for working with Table Schema", "license": "MIT", "require": { - "php": ">=7.1.0", + "php": ">=8.0", "ext-mbstring": "*", "ext-json": "*", "justinrainbow/json-schema": "^6.6", @@ -11,7 +11,7 @@ "jmikola/geojson": "^1.0" }, "require-dev": { - "phpunit/phpunit": ">=7.5 <10.0", + "phpunit/phpunit": ">=9.3 <10.0", "php-coveralls/php-coveralls": "^2.4", "psy/psysh": "@stable", "roave/security-advisories": "dev-latest"