Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ jobs:
- name: PHPUnit
run: composer unit
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v5

- uses: shivammathur/setup-php@v2
with:
php-version: 8.2
php-version: 8.3
coverage: pcov
tools: composer:v2
env:
Expand Down
37 changes: 18 additions & 19 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,26 +31,23 @@
"psr-4": {
"APITester\\": "src/",
"APITester\\Symfony\\Component\\PropertyInfo\\": "lib/property-info/"
},
"files": [
"config/constants.php"
]
}
},
"autoload-dev": {
"psr-4": {
"APITester\\Tests\\": "tests/"
}
},
"require": {
"php": ">=8.1",
"php": "^8.3.5",
"ext-ctype": "*",
"ext-iconv": "*",
"ext-json": "*",
"ext-mbstring": "*",
"canvural/php-openapi-faker": "^2.0",
"cebe/php-openapi": "^1.5",
"fakerphp/faker": "^1.9",
"firebase/php-jwt": "^6.0",
"firebase/php-jwt": "^6.0 || ^7.0",
"guzzlehttp/promises": "^1.4.0 || ^2.0",
"illuminate/collections": "^8.99",
"myclabs/deep-copy": "^1.11",
Expand All @@ -61,22 +58,24 @@
"opis/json-schema": "^2.3",
"php-http/httplug": "^2.2",
"phpdocumentor/reflection-docblock": "^5.3",
"phpstan/phpdoc-parser": "^1.2",
"phpunit/phpunit": "^9.5",
"phpstan/phpdoc-parser": "^1.2 || ^2.0",
"phpunit/phpunit": "^9.5 || ^10.0",
"psr/http-client": "^1.0",
"psr/http-message": "^1.0 || ^2.0",
"symfony/console": "^5.0 || ^6.0 || ^7.0",
"symfony/dotenv": "^5.0 || ^6.0 || ^7.0",
"symfony/finder": "^5.0 || ^6.0 || ^7.0",
"symfony/http-client": "^5.0 || ^6.0 || ^7.0",
"symfony/http-kernel": "^5.0 || ^6.0 || ^7.0",
"symfony/property-access": "^5.0 || ^6.0 || ^7.0",
"symfony/property-info": "^5.0 || ^6.0 || ^7.0",
"symfony/console": "^6.0 || ^7.0",
"symfony/dotenv": "^6.0 || ^7.0",
"symfony/finder": "^6.0 || ^7.0",
"symfony/http-client": "^6.0 || ^7.0",
"symfony/http-kernel": "^6.0 || ^7.0",
"symfony/process": "^6.0 || ^7.0",
"symfony/property-access": "^6.0 || ^7.0",
"symfony/property-info": "^6.0 || ^7.0",
"symfony/psr-http-message-bridge": "^1.2 || ^2.1.2 || ^6.0 || ^7.0",
"symfony/serializer": "^5.0 || ^6.0 || ^7.0",
"symfony/yaml": "^5.0 || ^6.0 || ^7.0"
"symfony/serializer": "^6.0 || ^7.0",
"symfony/yaml": "^6.0 || ^7.0"
},
"require-dev": {
"brianium/paratest": "^6.0 || ^7.0",
"ergebnis/composer-normalize": "^2.25",
"ergebnis/phpstan-rules": "^1.0",
"korbeil/phpstan-generic-rules": "^1.0",
Expand All @@ -92,8 +91,8 @@
"rector/rector": "^0.15.23",
"roave/security-advisories": "dev-latest",
"spaze/phpstan-disallowed-calls": "^2.1",
"symfony/var-dumper": "^5.0 || ^6.0 || ^7.0",
"symplify/easy-coding-standard": "^11.3.0",
"symfony/var-dumper": "^6.0 || ^7.0",
"symplify/easy-coding-standard": "^12.5",
"thecodingmachine/phpstan-strict-rules": "^1.0",
"veewee/composer-run-parallel": "^1.1"
},
Expand Down
5 changes: 0 additions & 5 deletions config/constants.php

This file was deleted.

9 changes: 1 addition & 8 deletions config/phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ includes:
- phpstan-baseline.neon
parameters:
treatPhpDocTypesAsCertain: false
bootstrapFiles:
- constants.php
level: 9
paths:
- ../src
Expand All @@ -27,17 +25,11 @@ parameters:
- '/Unable to resolve the template type TKey in call to function collect/'
- '/Unable to resolve the template type TValue in call to function collect/'
- '/Class APITester\\Preparator\\Config\\PreparatorConfig is neither abstract nor final./'
- '/Instantiated class \\ApiTestCase not found./'
- '/Instantiated class \\TestCaseKernelProvider not found./'
- '/Construct empty\(\) is not allowed. Use more strict comparison./'
- '/Language construct empty\(\) should not be used./'
- '/In method "APITester\\Requester\\SymfonyKernelRequester::request", caught "Throwable" must be rethrown.+/'
- '/.+ APITester\\Test\\TestCase\|null is not subtype of type PHPUnit\\Framework\\Test\|null/'
- '/throws checked exception Symfony\\Component\\Serializer\\Exception\\ExceptionInterface/'
- '/APITester\\Command\\ExecutePlanCommand::\$defaultName has no type specified./'
- {paths: [ ../tests ], message: '/Method .+ throws checked exception .+ but it''s missing from the PHPDoc @throws tag./'}
- {paths: [ ../src/Test/TestCase.php, ../src/Test/Plan.php ], message: '/Calling eval\(\) is forbidden, eval is evil, please write more code and do not use eval\(\)/'}
- {paths: [ ../src/Test/TestCase.php, ../src/Test/Plan.php ], message: '/Language construct eval\(\) should not be used./'}
exceptions:
check:
missingCheckedExceptionInThrows: true
Expand All @@ -47,4 +39,5 @@ parameters:
- LogicException
- JsonException
- PHPUnit\Framework\Exception
- Random\RandomException
- cebe\openapi\exceptions\TypeErrorException
76 changes: 9 additions & 67 deletions devenv.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
"devenv": {
"locked": {
"dir": "src/modules",
"lastModified": 1736426010,
"lastModified": 1773845731,
"narHash": "sha256-xKkgNN7rHA6t1fhdbRoUse9LvIM0Q+E9vMT6np+s4fQ=",
"owner": "cachix",
"repo": "devenv",
"rev": "1c384bc4be3ee571511fbbc6fdc94fe47d60f6cf",
"rev": "44ff299e4e2285b347c2a030f9a565735f091304",
"type": "github"
},
"original": {
Expand All @@ -16,88 +17,29 @@
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1733328505,
"owner": "edolstra",
"repo": "flake-compat",
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"git-hooks": {
"inputs": {
"flake-compat": "flake-compat",
"gitignore": "gitignore",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1735882644,
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "a5a961387e75ae44cc20f0a57ae463da5e959656",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"git-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1736848588,
"lastModified": 1773757037,
"narHash": "sha256-NBnGaZvJvz+cdpHUwtBw/PcTEP/gD02pL76wERzRDFk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "357cd3dfdb8993af11268d755d53357720675e66",
"rev": "69ba8f9b9132e83a2e2aca3a810fe158a7072531",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"ref": "nixpkgs-25.11-darwin",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"devenv": "devenv",
"git-hooks": "git-hooks",
"nixpkgs": "nixpkgs",
"pre-commit-hooks": [
"git-hooks"
]
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}
}
21 changes: 12 additions & 9 deletions devenv.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,20 @@
languages.php = {
enable = true;
ini = ''
memory_limit = -1
opcache.enable = 1
opcache.revalidate_freq = 0
opcache.validate_timestamps = 1
opcache.max_accelerated_files = 30000
opcache.memory_consumption = 256M
opcache.interned_strings_buffer = 20
realpath_cache_ttl = 3600
xdebug.idekey = "PHPSTORM"
xdebug.start_with_request = "yes"
date.timezone = "Europe/Paris"
'';
};

scripts.sdz-link.exec = ''
cd ../SdZv4 || exit 1
composer config repositories.api-tester-local '{"type": "path", "url": "../APITester", "options": {"symlink": true}}' --json
composer update openclassrooms/api-tester --no-interaction --ignore-platform-reqs
'';

scripts.sdz-unlink.exec = ''
cd ../SdZv4 || exit 1
composer config --unset repositories.api-tester-local
composer update openclassrooms/api-tester --no-interaction --ignore-platform-reqs
'';
}
2 changes: 1 addition & 1 deletion devenv.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
inputs:
nixpkgs:
url: github:NixOS/nixpkgs/nixpkgs-unstable
url: github:NixOS/nixpkgs/nixpkgs-25.11-darwin
Loading
Loading