mirror of
https://github.com/cerbero90/json-parser.git
synced 2025-01-16 20:48:15 +01:00
Upgrade PHP version
This commit is contained in:
parent
787882e7b5
commit
d01bdf7fa1
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
@ -11,7 +11,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
php: [8.0, 8.1, 8.2]
|
||||
php: [8.1, 8.2, 8.3]
|
||||
dependency-version: [prefer-lowest, prefer-stable]
|
||||
os: [ubuntu-latest]
|
||||
|
||||
@ -49,7 +49,7 @@ jobs:
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: 8.0
|
||||
php-version: 8.1
|
||||
extensions: simdjson
|
||||
tools: composer:v2
|
||||
coverage: xdebug
|
||||
@ -75,7 +75,7 @@ jobs:
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: 8.0
|
||||
php-version: 8.1
|
||||
tools: phpcs
|
||||
coverage: none
|
||||
|
||||
@ -94,7 +94,7 @@ jobs:
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: 8.0
|
||||
php-version: 8.1
|
||||
extensions: simdjson
|
||||
tools: composer:v2
|
||||
coverage: none
|
||||
|
@ -18,13 +18,13 @@
|
||||
"role": "Developer"
|
||||
}],
|
||||
"require": {
|
||||
"php": "^8.0"
|
||||
"php": "^8.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"guzzlehttp/guzzle": "^7.2",
|
||||
"illuminate/http": ">=6.20",
|
||||
"mockery/mockery": "^1.5",
|
||||
"pestphp/pest": "^1.22",
|
||||
"pestphp/pest": "^2.0",
|
||||
"phpstan/phpstan": "^1.9",
|
||||
"scrutinizer/ocular": "^1.8",
|
||||
"squizlabs/php_codesniffer": "^3.0"
|
||||
|
@ -1,9 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" backupGlobals="false" colors="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
|
||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" backupGlobals="false" colors="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.2/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
|
||||
<coverage>
|
||||
<include>
|
||||
<directory suffix=".php">src/</directory>
|
||||
</include>
|
||||
<report>
|
||||
<clover outputFile="build/logs/clover.xml"/>
|
||||
<html outputDirectory="build/coverage"/>
|
||||
@ -18,4 +15,9 @@
|
||||
<logging>
|
||||
<junit outputFile="build/report.junit.xml"/>
|
||||
</logging>
|
||||
<source>
|
||||
<include>
|
||||
<directory suffix=".php">src/</directory>
|
||||
</include>
|
||||
</source>
|
||||
</phpunit>
|
||||
|
@ -252,27 +252,27 @@ final class Dataset
|
||||
$json = fixture('json/complex_object.json');
|
||||
$sequenceByPointer = [
|
||||
'' => [
|
||||
fn ($value, $key) => $key->toBe('id')->and($value->value)->toBe('0001'),
|
||||
fn ($value, $key) => $key->toBe('type')->and($value->value)->toBe('donut'),
|
||||
fn ($value, $key) => $key->toBe('name')->and($value->value)->toBe('Cake'),
|
||||
fn ($value, $key) => $key->toBe('ppu')->and($value->value)->toBe(0.55),
|
||||
fn ($value, $key) => $key->toBe('batters')->and($value->value)->toBeInstanceOf(Parser::class),
|
||||
fn ($value, $key) => $key->toBe('topping')->and($value->value)->toBeInstanceOf(Parser::class),
|
||||
fn ($value, $key) => $key->toBe('id')->and($value)->toBe('0001'),
|
||||
fn ($value, $key) => $key->toBe('type')->and($value)->toBe('donut'),
|
||||
fn ($value, $key) => $key->toBe('name')->and($value)->toBe('Cake'),
|
||||
fn ($value, $key) => $key->toBe('ppu')->and($value)->toBe(0.55),
|
||||
fn ($value, $key) => $key->toBe('batters')->and($value)->toBeInstanceOf(Parser::class),
|
||||
fn ($value, $key) => $key->toBe('topping')->and($value)->toBeInstanceOf(Parser::class),
|
||||
],
|
||||
'/batters/batter/-' => [
|
||||
fn ($value, $key) => $key->toBe(0)->and($value->value)->toBeInstanceOf(Parser::class),
|
||||
fn ($value, $key) => $key->toBe(1)->and($value->value)->toBeInstanceOf(Parser::class),
|
||||
fn ($value, $key) => $key->toBe(2)->and($value->value)->toBeInstanceOf(Parser::class),
|
||||
fn ($value, $key) => $key->toBe(3)->and($value->value)->toBeInstanceOf(Parser::class),
|
||||
fn ($value, $key) => $key->toBe(0)->and($value)->toBeInstanceOf(Parser::class),
|
||||
fn ($value, $key) => $key->toBe(1)->and($value)->toBeInstanceOf(Parser::class),
|
||||
fn ($value, $key) => $key->toBe(2)->and($value)->toBeInstanceOf(Parser::class),
|
||||
fn ($value, $key) => $key->toBe(3)->and($value)->toBeInstanceOf(Parser::class),
|
||||
],
|
||||
'/topping/-' => [
|
||||
fn ($value, $key) => $key->toBe(0)->and($value->value)->toBeInstanceOf(Parser::class),
|
||||
fn ($value, $key) => $key->toBe(1)->and($value->value)->toBeInstanceOf(Parser::class),
|
||||
fn ($value, $key) => $key->toBe(2)->and($value->value)->toBeInstanceOf(Parser::class),
|
||||
fn ($value, $key) => $key->toBe(3)->and($value->value)->toBeInstanceOf(Parser::class),
|
||||
fn ($value, $key) => $key->toBe(4)->and($value->value)->toBeInstanceOf(Parser::class),
|
||||
fn ($value, $key) => $key->toBe(5)->and($value->value)->toBeInstanceOf(Parser::class),
|
||||
fn ($value, $key) => $key->toBe(6)->and($value->value)->toBeInstanceOf(Parser::class),
|
||||
fn ($value, $key) => $key->toBe(0)->and($value)->toBeInstanceOf(Parser::class),
|
||||
fn ($value, $key) => $key->toBe(1)->and($value)->toBeInstanceOf(Parser::class),
|
||||
fn ($value, $key) => $key->toBe(2)->and($value)->toBeInstanceOf(Parser::class),
|
||||
fn ($value, $key) => $key->toBe(3)->and($value)->toBeInstanceOf(Parser::class),
|
||||
fn ($value, $key) => $key->toBe(4)->and($value)->toBeInstanceOf(Parser::class),
|
||||
fn ($value, $key) => $key->toBe(5)->and($value)->toBeInstanceOf(Parser::class),
|
||||
fn ($value, $key) => $key->toBe(6)->and($value)->toBeInstanceOf(Parser::class),
|
||||
],
|
||||
];
|
||||
|
||||
@ -291,18 +291,18 @@ final class Dataset
|
||||
$json = fixture('json/complex_object.json');
|
||||
$sequenceByPointer = [
|
||||
'/topping,/batters' => [
|
||||
fn ($value, $key) => $key->toBe('batters')->and($value->value)->toBeInstanceOf(Parser::class),
|
||||
fn ($value, $key) => $key->toBe('topping')->and($value->value)->toBeInstanceOf(Parser::class),
|
||||
fn ($value, $key) => $key->toBe('batters')->and($value)->toBeInstanceOf(Parser::class),
|
||||
fn ($value, $key) => $key->toBe('topping')->and($value)->toBeInstanceOf(Parser::class),
|
||||
],
|
||||
'/topping/-,/batters/batter' => [
|
||||
fn ($value, $key) => $key->toBe('batter')->and($value->value)->toBeInstanceOf(Parser::class),
|
||||
fn ($value, $key) => $key->toBe(0)->and($value->value)->toBeInstanceOf(Parser::class),
|
||||
fn ($value, $key) => $key->toBe(1)->and($value->value)->toBeInstanceOf(Parser::class),
|
||||
fn ($value, $key) => $key->toBe(2)->and($value->value)->toBeInstanceOf(Parser::class),
|
||||
fn ($value, $key) => $key->toBe(3)->and($value->value)->toBeInstanceOf(Parser::class),
|
||||
fn ($value, $key) => $key->toBe(4)->and($value->value)->toBeInstanceOf(Parser::class),
|
||||
fn ($value, $key) => $key->toBe(5)->and($value->value)->toBeInstanceOf(Parser::class),
|
||||
fn ($value, $key) => $key->toBe(6)->and($value->value)->toBeInstanceOf(Parser::class),
|
||||
fn ($value, $key) => $key->toBe('batter')->and($value)->toBeInstanceOf(Parser::class),
|
||||
fn ($value, $key) => $key->toBe(0)->and($value)->toBeInstanceOf(Parser::class),
|
||||
fn ($value, $key) => $key->toBe(1)->and($value)->toBeInstanceOf(Parser::class),
|
||||
fn ($value, $key) => $key->toBe(2)->and($value)->toBeInstanceOf(Parser::class),
|
||||
fn ($value, $key) => $key->toBe(3)->and($value)->toBeInstanceOf(Parser::class),
|
||||
fn ($value, $key) => $key->toBe(4)->and($value)->toBeInstanceOf(Parser::class),
|
||||
fn ($value, $key) => $key->toBe(5)->and($value)->toBeInstanceOf(Parser::class),
|
||||
fn ($value, $key) => $key->toBe(6)->and($value)->toBeInstanceOf(Parser::class),
|
||||
],
|
||||
];
|
||||
|
||||
@ -415,7 +415,7 @@ final class Dataset
|
||||
$patch = fn (DecodedValue $decoded) => strrev($decoded->json);
|
||||
$patched = ['a1', 'b""', 'foo', '4c1.3', 'deslaf', null, ']e2,1[', '}2:f"zab",1:"rab"{'];
|
||||
|
||||
yield [$json, fn () => $patch, $patched];
|
||||
yield [$json, $patch, $patched];
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user