From f724f958cff305f654064fa787e7adb56b15f965 Mon Sep 17 00:00:00 2001 From: Jonathan LELIEVRE Date: Thu, 28 Nov 2024 13:06:38 +0100 Subject: [PATCH 1/3] Migrate to Symfony HTTP client --- config/services.yml | 13 +------ src/Form/ConfigurationDataConfiguration.php | 37 +++++-------------- src/OAuth2/KeycloakAuthorizationServer.php | 20 +++++------ src/RequestBuilder.php | 39 --------------------- 4 files changed, 17 insertions(+), 92 deletions(-) delete mode 100644 src/RequestBuilder.php diff --git a/config/services.yml b/config/services.yml index 0253f1a..29e8505 100644 --- a/config/services.yml +++ b/config/services.yml @@ -11,22 +11,12 @@ services: arguments: - !php/const _NEW_COOKIE_KEY_ - prestashop.module.keycloak_connector_demo.client: - class: GuzzleHttp\Client - - PrestaShop\Module\KeycloakConnectorDemo\RequestBuilder: - class: PrestaShop\Module\KeycloakConnectorDemo\RequestBuilder - arguments: - - '@prestashop.adapter.legacy.configuration' - - '@prestashop.module.keycloak_connector_demo.php_encrypt' - PrestaShop\Module\KeycloakConnectorDemo\Form\ConfigurationDataConfiguration: + autowire: true class: PrestaShop\Module\KeycloakConnectorDemo\Form\ConfigurationDataConfiguration arguments: - '@prestashop.adapter.legacy.configuration' - '@prestashop.module.keycloak_connector_demo.php_encrypt' - - '@PrestaShop\Module\KeycloakConnectorDemo\RequestBuilder' - - '@prestashop.module.keycloak_connector_demo.client' PrestaShop\Module\KeycloakConnectorDemo\Form\ConfigurationDataProvider: class: PrestaShop\Module\KeycloakConnectorDemo\Form\ConfigurationDataProvider @@ -52,5 +42,4 @@ services: autoconfigure: true autowire: true arguments: - $client: '@prestashop.module.keycloak_connector_demo.client' $phpEncryption: '@prestashop.module.keycloak_connector_demo.php_encrypt' diff --git a/src/Form/ConfigurationDataConfiguration.php b/src/Form/ConfigurationDataConfiguration.php index 697df86..0eb351e 100644 --- a/src/Form/ConfigurationDataConfiguration.php +++ b/src/Form/ConfigurationDataConfiguration.php @@ -22,43 +22,24 @@ namespace PrestaShop\Module\KeycloakConnectorDemo\Form; -use PhpEncryption; -use PrestaShop\Module\KeycloakConnectorDemo\RequestBuilder; use PrestaShop\PrestaShop\Core\Configuration\DataConfigurationInterface; use PrestaShop\PrestaShop\Core\ConfigurationInterface; -use Psr\Http\Client\ClientExceptionInterface; -use Psr\Http\Client\ClientInterface; +use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface; +use Symfony\Contracts\HttpClient\HttpClientInterface; final class ConfigurationDataConfiguration implements DataConfigurationInterface { public const REALM_ENDPOINT = 'KEYCLOAK_REALM_ENDPOINT'; public const ALLOWED_ISSUERS = 'KEYCLOAK_ALLOWED_ISSUERS'; - /** @var ConfigurationInterface */ - private $configuration; - - /** @var PhpEncryption */ - private $encryption; - - /** @var RequestBuilder */ - private $requestBuilder; - - /** @var ClientInterface */ - private $client; - /** @var array> */ private $errors = []; public function __construct( - ConfigurationInterface $configuration, - PhpEncryption $encryption, - RequestBuilder $requestBuilder, - ClientInterface $client + private ConfigurationInterface $configuration, + private \PhpEncryption $encryption, + private HttpClientInterface $client ) { - $this->configuration = $configuration; - $this->encryption = $encryption; - $this->requestBuilder = $requestBuilder; - $this->client = $client; } /** @@ -121,15 +102,13 @@ public function updateConfiguration(array $configuration): array public function validateConfiguration(array $configuration): bool { try { - $response = $this->client->sendRequest( - $this->requestBuilder->getCertsRequest($configuration[static::REALM_ENDPOINT]) - ); + $response = $this->client->request('GET', $configuration[static::REALM_ENDPOINT] . '/protocol/openid-connect/certs'); if ($response->getStatusCode() === 200) { return true; } - $errorDetails = $response->getReasonPhrase(); - } catch (ClientExceptionInterface $exception) { + $errorDetails = $response->getContent(false); + } catch (TransportExceptionInterface $exception) { $errorDetails = $exception->getMessage(); } diff --git a/src/OAuth2/KeycloakAuthorizationServer.php b/src/OAuth2/KeycloakAuthorizationServer.php index 6a39d75..63d5514 100644 --- a/src/OAuth2/KeycloakAuthorizationServer.php +++ b/src/OAuth2/KeycloakAuthorizationServer.php @@ -34,16 +34,14 @@ use Lcobucci\JWT\Validation\Constraint; use Lcobucci\JWT\Validation\Constraint\SignedWith; use Lcobucci\JWT\Validation\Validator; -use PhpEncryption; use PrestaShop\Module\KeycloakConnectorDemo\Form\ConfigurationDataConfiguration; -use PrestaShop\Module\KeycloakConnectorDemo\RequestBuilder; use PrestaShop\PrestaShop\Core\ConfigurationInterface; use PrestaShop\PrestaShop\Core\Security\OAuth2\AuthorisationServerInterface; use PrestaShop\PrestaShop\Core\Security\OAuth2\JwtTokenUser; -use Psr\Http\Client\ClientExceptionInterface; -use Psr\Http\Client\ClientInterface; use Psr\Log\LoggerInterface; use Symfony\Component\HttpFoundation\Request; +use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface; +use Symfony\Contracts\HttpClient\HttpClientInterface; class KeycloakAuthorizationServer implements AuthorisationServerInterface { @@ -64,10 +62,9 @@ class KeycloakAuthorizationServer implements AuthorisationServerInterface private array $parsedTokens = []; public function __construct( - private readonly ClientInterface $client, + private readonly HttpClientInterface $client, private readonly ConfigurationInterface $configuration, - private readonly PhpEncryption $phpEncryption, - private readonly RequestBuilder $requestBuilder, + private readonly \PhpEncryption $phpEncryption, private readonly LoggerInterface $logger, ) { } @@ -153,9 +150,8 @@ public function getJwtTokenUser(Request $request): ?JwtTokenUser private function getServerCertificates(string $certsUrl): ?array { try { - $request = $this->requestBuilder->getCertsRequest($certsUrl); - $response = $this->client->sendRequest($request); - } catch (ClientExceptionInterface $e) { + $response = $this->client->request('GET', $certsUrl . '/protocol/openid-connect/certs'); + } catch (TransportExceptionInterface $e) { $this->logger->debug('KeycloakAuthorizationServer: get server certificates failed: ' . $e->getMessage()); return null; @@ -167,9 +163,9 @@ private function getServerCertificates(string $certsUrl): ?array return null; } - $json = json_decode($response->getBody()->getContents(), true); + $json = $response->toArray(); if (!is_array($json) || !isset($json['keys'])) { - $this->logger->debug('KeycloakAuthorizationServer: server certificates invalid JSON format: ' . $response->getBody()->getContents()); + $this->logger->debug('KeycloakAuthorizationServer: server certificates invalid JSON format: ' . $response->getContent()); return null; } diff --git a/src/RequestBuilder.php b/src/RequestBuilder.php deleted file mode 100644 index 09446ce..0000000 --- a/src/RequestBuilder.php +++ /dev/null @@ -1,39 +0,0 @@ - - * @copyright Since 2007 PrestaShop SA and Contributors - * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 - */ - -declare(strict_types=1); - -namespace PrestaShop\Module\KeycloakConnectorDemo; - -use GuzzleHttp\Psr7\Request; -use Psr\Http\Message\RequestInterface; - -class RequestBuilder -{ - public function getCertsRequest(string $baseRealmEndpoint): RequestInterface - { - return new Request('GET', $this->getCertsUrl($baseRealmEndpoint)); - } - - private function getCertsUrl(string $baseRealmEndpoint): string - { - return $baseRealmEndpoint . '/protocol/openid-connect/certs'; - } -} From b90f3a5cd6bb0d6e82cf34e0c62d99e9d608cee4 Mon Sep 17 00:00:00 2001 From: Jonathan LELIEVRE Date: Thu, 28 Nov 2024 13:11:02 +0100 Subject: [PATCH 2/3] Improve CI to tests versions of PHP up to 8.4 --- .github/workflows/php.yml | 17 +- composer.json | 3 +- composer.lock | 844 ++++++++----------------------- tests/phpstan.sh | 13 +- tests/phpstan/phpstan-9.0.x.neon | 14 + 5 files changed, 239 insertions(+), 652 deletions(-) create mode 100644 tests/phpstan/phpstan-9.0.x.neon diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 63bcf92..8b1ab2e 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -15,6 +15,12 @@ jobs: - name: PHP syntax checker 8.2 uses: prestashop/github-action-php-lint/8.2@master + - name: PHP syntax checker 8.3 + uses: prestashop/github-action-php-lint/8.3@master + + - name: PHP syntax checker 8.4 + uses: prestashop/github-action-php-lint/8.4@master + # Check the PHP code follow the coding standards php-cs-fixer: name: PHP-CS-Fixer @@ -46,12 +52,15 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - presta-versions: ['nightly'] + presta-version: [ 'nightly', '9.0.x' ] + # The 8.4 compatibility is not available yet, this should be uncommented whe the dockers are ready + # php-version: [ '8.1', '8.2', '8.3', '8.4' ] + php-version: [ '8.1', '8.2', '8.3' ] steps: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.1' + php-version: ${{ matrix.php-version }} - name: Checkout uses: actions/checkout@v2.0.0 @@ -73,5 +82,5 @@ jobs: - run: composer install # Docker images prestashop/prestashop may be used, even if the shop remains uninstalled - - name: Execute PHPStan on PrestaShop (Tag ${{ matrix.presta-versions }}) - run: ./tests/phpstan.sh ${{ matrix.presta-versions }} + - name: Execute PHPStan on PrestaShop (Tag ${{ matrix.presta-version }}-${{ matrix.php-version }}) + run: ./tests/phpstan.sh ${{ matrix.presta-version }} ${{ matrix.php-version }} diff --git a/composer.json b/composer.json index 352d812..8e38024 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,8 @@ } }, "require-dev": { - "prestashop/php-dev-tools": "^4.3", + "prestashop/php-dev-tools": "^5", + "friendsofphp/php-cs-fixer": "^3", "phpstan/phpstan": "^1.9" }, "config": { diff --git a/composer.lock b/composer.lock index 68e11e7..58d56f5 100644 --- a/composer.lock +++ b/composer.lock @@ -4,35 +4,35 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "8a5cb283c2ef24a992747f7ed9cfbd8d", + "content-hash": "85238bbc4502893bddf5fd5ce2115a3b", "packages": [], "packages-dev": [ { "name": "composer/pcre", - "version": "1.0.1", + "version": "3.1.4", "source": { "type": "git", "url": "https://github.com/composer/pcre.git", - "reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560" + "reference": "04229f163664973f68f38f6f73d917799168ef24" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/67a32d7d6f9f560b726ab25a061b38ff3a80c560", - "reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560", + "url": "https://api.github.com/repos/composer/pcre/zipball/04229f163664973f68f38f6f73d917799168ef24", + "reference": "04229f163664973f68f38f6f73d917799168ef24", "shasum": "" }, "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" + "php": "^7.4 || ^8.0" }, "require-dev": { "phpstan/phpstan": "^1.3", "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^4.2 || ^5" + "symfony/phpunit-bridge": "^5" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.x-dev" + "dev-main": "3.x-dev" } }, "autoload": { @@ -60,7 +60,7 @@ ], "support": { "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/1.0.1" + "source": "https://github.com/composer/pcre/tree/3.1.4" }, "funding": [ { @@ -76,28 +76,28 @@ "type": "tidelift" } ], - "time": "2022-01-21T20:24:37+00:00" + "time": "2024-05-27T13:40:54+00:00" }, { "name": "composer/semver", - "version": "3.3.2", + "version": "3.4.3", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9" + "reference": "4313d26ada5e0c4edfbd1dc481a92ff7bff91f12" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9", - "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9", + "url": "https://api.github.com/repos/composer/semver/zipball/4313d26ada5e0c4edfbd1dc481a92ff7bff91f12", + "reference": "4313d26ada5e0c4edfbd1dc481a92ff7bff91f12", "shasum": "" }, "require": { "php": "^5.3.2 || ^7.0 || ^8.0" }, "require-dev": { - "phpstan/phpstan": "^1.4", - "symfony/phpunit-bridge": "^4.2 || ^5" + "phpstan/phpstan": "^1.11", + "symfony/phpunit-bridge": "^3 || ^7" }, "type": "library", "extra": { @@ -139,9 +139,9 @@ "versioning" ], "support": { - "irc": "irc://irc.freenode.org/composer", + "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.3.2" + "source": "https://github.com/composer/semver/tree/3.4.3" }, "funding": [ { @@ -157,31 +157,31 @@ "type": "tidelift" } ], - "time": "2022-04-01T19:23:25+00:00" + "time": "2024-09-19T14:15:21+00:00" }, { "name": "composer/xdebug-handler", - "version": "2.0.5", + "version": "3.0.5", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "9e36aeed4616366d2b690bdce11f71e9178c579a" + "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/9e36aeed4616366d2b690bdce11f71e9178c579a", - "reference": "9e36aeed4616366d2b690bdce11f71e9178c579a", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/6c1925561632e83d60a44492e0b344cf48ab85ef", + "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef", "shasum": "" }, "require": { - "composer/pcre": "^1", - "php": "^5.3.2 || ^7.0 || ^8.0", + "composer/pcre": "^1 || ^2 || ^3", + "php": "^7.2.5 || ^8.0", "psr/log": "^1 || ^2 || ^3" }, "require-dev": { "phpstan/phpstan": "^1.0", "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^4.2 || ^5.0 || ^6.0" + "phpunit/phpunit": "^8.5 || ^9.6 || ^10.5" }, "type": "library", "autoload": { @@ -205,9 +205,9 @@ "performance" ], "support": { - "irc": "irc://irc.freenode.org/composer", + "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/2.0.5" + "source": "https://github.com/composer/xdebug-handler/tree/3.0.5" }, "funding": [ { @@ -223,253 +223,54 @@ "type": "tidelift" } ], - "time": "2022-02-24T20:20:32+00:00" - }, - { - "name": "doctrine/annotations", - "version": "1.14.2", - "source": { - "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "ad785217c1e9555a7d6c6c8c9f406395a5e2882b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/ad785217c1e9555a7d6c6c8c9f406395a5e2882b", - "reference": "ad785217c1e9555a7d6c6c8c9f406395a5e2882b", - "shasum": "" - }, - "require": { - "doctrine/lexer": "^1 || ^2", - "ext-tokenizer": "*", - "php": "^7.1 || ^8.0", - "psr/cache": "^1 || ^2 || ^3" - }, - "require-dev": { - "doctrine/cache": "^1.11 || ^2.0", - "doctrine/coding-standard": "^9 || ^10", - "phpstan/phpstan": "~1.4.10 || ^1.8.0", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "symfony/cache": "^4.4 || ^5.4 || ^6", - "vimeo/psalm": "^4.10" - }, - "suggest": { - "php": "PHP 8.0 or higher comes with attributes, a native replacement for annotations" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Docblock Annotations Parser", - "homepage": "https://www.doctrine-project.org/projects/annotations.html", - "keywords": [ - "annotations", - "docblock", - "parser" - ], - "support": { - "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/1.14.2" - }, - "time": "2022-12-15T06:48:22+00:00" - }, - { - "name": "doctrine/deprecations", - "version": "v1.0.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/deprecations.git", - "reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de", - "reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de", - "shasum": "" - }, - "require": { - "php": "^7.1|^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9", - "phpunit/phpunit": "^7.5|^8.5|^9.5", - "psr/log": "^1|^2|^3" - }, - "suggest": { - "psr/log": "Allows logging deprecations via PSR-3 logger implementation" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", - "homepage": "https://www.doctrine-project.org/", - "support": { - "issues": "https://github.com/doctrine/deprecations/issues", - "source": "https://github.com/doctrine/deprecations/tree/v1.0.0" - }, - "time": "2022-05-02T15:47:09+00:00" - }, - { - "name": "doctrine/lexer", - "version": "2.1.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", - "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", - "shasum": "" - }, - "require": { - "doctrine/deprecations": "^1.0", - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9 || ^10", - "phpstan/phpstan": "^1.3", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "psalm/plugin-phpunit": "^0.18.3", - "vimeo/psalm": "^4.11 || ^5.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Lexer\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "https://www.doctrine-project.org/projects/lexer.html", - "keywords": [ - "annotations", - "docblock", - "lexer", - "parser", - "php" - ], - "support": { - "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/2.1.0" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", - "type": "tidelift" - } - ], - "time": "2022-12-14T08:49:07+00:00" + "time": "2024-05-06T16:37:16+00:00" }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.4.0", + "version": "v3.39.1", "source": { "type": "git", - "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", - "reference": "47177af1cfb9dab5d1cc4daf91b7179c2efe7fad" + "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", + "reference": "857046d26b0d92dc13c4be769309026b100b517e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/47177af1cfb9dab5d1cc4daf91b7179c2efe7fad", - "reference": "47177af1cfb9dab5d1cc4daf91b7179c2efe7fad", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/857046d26b0d92dc13c4be769309026b100b517e", + "reference": "857046d26b0d92dc13c4be769309026b100b517e", "shasum": "" }, "require": { - "composer/semver": "^3.2", - "composer/xdebug-handler": "^2.0", - "doctrine/annotations": "^1.12", + "composer/semver": "^3.3", + "composer/xdebug-handler": "^3.0.3", "ext-json": "*", "ext-tokenizer": "*", - "php": "^7.2.5 || ^8.0", - "php-cs-fixer/diff": "^2.0", - "symfony/console": "^4.4.20 || ^5.1.3 || ^6.0", - "symfony/event-dispatcher": "^4.4.20 || ^5.0 || ^6.0", - "symfony/filesystem": "^4.4.20 || ^5.0 || ^6.0", - "symfony/finder": "^4.4.20 || ^5.0 || ^6.0", - "symfony/options-resolver": "^4.4.20 || ^5.0 || ^6.0", - "symfony/polyfill-mbstring": "^1.23", - "symfony/polyfill-php80": "^1.23", - "symfony/polyfill-php81": "^1.23", - "symfony/process": "^4.4.20 || ^5.0 || ^6.0", - "symfony/stopwatch": "^4.4.20 || ^5.0 || ^6.0" + "php": "^7.4 || ^8.0", + "sebastian/diff": "^4.0 || ^5.0", + "symfony/console": "^5.4 || ^6.0 || ^7.0", + "symfony/event-dispatcher": "^5.4 || ^6.0 || ^7.0", + "symfony/filesystem": "^5.4 || ^6.0 || ^7.0", + "symfony/finder": "^5.4 || ^6.0 || ^7.0", + "symfony/options-resolver": "^5.4 || ^6.0 || ^7.0", + "symfony/polyfill-mbstring": "^1.27", + "symfony/polyfill-php80": "^1.27", + "symfony/polyfill-php81": "^1.27", + "symfony/process": "^5.4 || ^6.0 || ^7.0", + "symfony/stopwatch": "^5.4 || ^6.0 || ^7.0" }, "require-dev": { + "facile-it/paraunit": "^1.3 || ^2.0", "justinrainbow/json-schema": "^5.2", - "keradus/cli-executor": "^1.5", - "mikey179/vfsstream": "^1.6.8", - "php-coveralls/php-coveralls": "^2.5.2", + "keradus/cli-executor": "^2.0", + "mikey179/vfsstream": "^1.6.11", + "php-coveralls/php-coveralls": "^2.5.3", "php-cs-fixer/accessible-object": "^1.1", "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2", "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1", - "phpspec/prophecy": "^1.15", - "phpspec/prophecy-phpunit": "^1.1 || ^2.0", - "phpunit/phpunit": "^8.5.21 || ^9.5", - "phpunitgoodpractices/polyfill": "^1.5", - "phpunitgoodpractices/traits": "^1.9.1", - "symfony/phpunit-bridge": "^5.2.4 || ^6.0", - "symfony/yaml": "^4.4.20 || ^5.0 || ^6.0" + "phpspec/prophecy": "^1.16", + "phpspec/prophecy-phpunit": "^2.0", + "phpunit/phpunit": "^9.5", + "symfony/phpunit-bridge": "^6.2.3 || ^7.0", + "symfony/yaml": "^5.4 || ^6.0 || ^7.0" }, "suggest": { "ext-dom": "For handling output formats in XML", @@ -499,9 +300,15 @@ } ], "description": "A tool to automatically fix PHP code style", + "keywords": [ + "Static code analysis", + "fixer", + "standards", + "static analysis" + ], "support": { - "issues": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues", - "source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v3.4.0" + "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.39.1" }, "funding": [ { @@ -509,116 +316,7 @@ "type": "github" } ], - "time": "2021-12-11T16:25:08+00:00" - }, - { - "name": "nikic/php-parser", - "version": "v4.15.2", - "source": { - "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc", - "reference": "f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=7.0" - }, - "require-dev": { - "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" - }, - "bin": [ - "bin/php-parse" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.9-dev" - } - }, - "autoload": { - "psr-4": { - "PhpParser\\": "lib/PhpParser" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov" - } - ], - "description": "A PHP parser written in PHP", - "keywords": [ - "parser", - "php" - ], - "support": { - "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.2" - }, - "time": "2022-11-12T15:38:23+00:00" - }, - { - "name": "php-cs-fixer/diff", - "version": "v2.0.2", - "source": { - "type": "git", - "url": "https://github.com/PHP-CS-Fixer/diff.git", - "reference": "29dc0d507e838c4580d018bd8b5cb412474f7ec3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/29dc0d507e838c4580d018bd8b5cb412474f7ec3", - "reference": "29dc0d507e838c4580d018bd8b5cb412474f7ec3", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7.23 || ^6.4.3 || ^7.0", - "symfony/process": "^3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - } - ], - "description": "sebastian/diff v3 backport support for PHP 5.6+", - "homepage": "https://github.com/PHP-CS-Fixer", - "keywords": [ - "diff" - ], - "support": { - "issues": "https://github.com/PHP-CS-Fixer/diff/issues", - "source": "https://github.com/PHP-CS-Fixer/diff/tree/v2.0.2" - }, - "abandoned": true, - "time": "2020-10-14T08:32:19+00:00" + "time": "2023-11-24T22:59:03+00:00" }, { "name": "phpstan/phpstan", @@ -682,129 +380,33 @@ ], "time": "2024-01-24T11:51:34+00:00" }, - { - "name": "prestashop/autoindex", - "version": "v2.1.0", - "source": { - "type": "git", - "url": "https://github.com/PrestaShopCorp/autoindex.git", - "reference": "235f3ec115432ffc32d582198ea498467b3946d0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShopCorp/autoindex/zipball/235f3ec115432ffc32d582198ea498467b3946d0", - "reference": "235f3ec115432ffc32d582198ea498467b3946d0", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^4.10", - "php": "^8.0 || ^7.2", - "symfony/console": "^3.4 || ~4.0 || ~5.0 || ~6.0", - "symfony/finder": "^3.4 || ~4.0 || ~5.0 || ~6.0" - }, - "require-dev": { - "phpstan/phpstan": "^0.12.83", - "prestashop/php-dev-tools": "1.*" - }, - "bin": [ - "bin/autoindex" - ], - "type": "library", - "autoload": { - "psr-4": { - "PrestaShop\\AutoIndex\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "Automatically add an 'index.php' in all the current or specified directories and all sub-directories.", - "homepage": "https://github.com/PrestaShopCorp/autoindex", - "support": { - "source": "https://github.com/PrestaShopCorp/autoindex/tree/v2.1.0" - }, - "time": "2022-10-10T08:35:00+00:00" - }, - { - "name": "prestashop/header-stamp", - "version": "v2.2", - "source": { - "type": "git", - "url": "https://github.com/PrestaShopCorp/header-stamp.git", - "reference": "ae1533967ca797e7c8efd5bbbf4351d163253cf4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShopCorp/header-stamp/zipball/ae1533967ca797e7c8efd5bbbf4351d163253cf4", - "reference": "ae1533967ca797e7c8efd5bbbf4351d163253cf4", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^4.10", - "php": "^8.0 || ^7.2", - "symfony/console": "^3.4 || ~4.0 || ~5.0 || ~6.0", - "symfony/finder": "^3.4 || ~4.0 || ~5.0 || ~6.0" - }, - "require-dev": { - "phpstan/phpstan": "^0.12.83", - "prestashop/php-dev-tools": "1.*" - }, - "bin": [ - "bin/header-stamp" - ], - "type": "library", - "autoload": { - "psr-4": { - "PrestaShop\\HeaderStamp\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "Rewrite your file headers to add the license or to make them up-to-date", - "homepage": "https://github.com/PrestaShopCorp/header-stamp", - "support": { - "issues": "https://github.com/PrestaShopCorp/header-stamp/issues", - "source": "https://github.com/PrestaShopCorp/header-stamp/tree/v2.2" - }, - "time": "2022-10-10T08:26:55+00:00" - }, { "name": "prestashop/php-dev-tools", - "version": "v4.3.0", + "version": "v5", "source": { "type": "git", "url": "https://github.com/PrestaShop/php-dev-tools.git", - "reference": "843275b19729ba810d8ba2b9c97b568e5bbabe03" + "reference": "4b284d9b07a274505c81144536924eb4014e6fbf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/php-dev-tools/zipball/843275b19729ba810d8ba2b9c97b568e5bbabe03", - "reference": "843275b19729ba810d8ba2b9c97b568e5bbabe03", + "url": "https://api.github.com/repos/PrestaShop/php-dev-tools/zipball/4b284d9b07a274505c81144536924eb4014e6fbf", + "reference": "4b284d9b07a274505c81144536924eb4014e6fbf", "shasum": "" }, "require": { - "friendsofphp/php-cs-fixer": "^3.2", "php": ">=7.2.5", + "symfony/console": "~3.2 || ~4.0 || ~5.0 || ~6.0 || ~7.0", + "symfony/filesystem": "~3.2 || ~4.0 || ~5.0 || ~6.0 || ~7.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.2" + }, + "suggest": { + "phpstan/phpstan": "^0.12", "prestashop/autoindex": "^2.0", "prestashop/header-stamp": "^2.0", - "squizlabs/php_codesniffer": "^3.4", - "symfony/console": "~3.2 || ~4.0 || ~5.0 || ~6.0", - "symfony/filesystem": "~3.2 || ~4.0 || ~5.0 || ~6.0" + "squizlabs/php_codesniffer": "^3.4" }, "bin": [ "bin/prestashop-coding-standards" @@ -819,61 +421,17 @@ "license": [ "MIT" ], - "description": "PrestaShop coding standards", - "support": { - "issues": "https://github.com/PrestaShop/php-dev-tools/issues", - "source": "https://github.com/PrestaShop/php-dev-tools/tree/v4.3.0" - }, - "time": "2022-10-18T14:19:51+00:00" - }, - { - "name": "psr/cache", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Cache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], "authors": [ { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "name": "PrestaShop" } ], - "description": "Common interface for caching libraries", - "keywords": [ - "cache", - "psr", - "psr-6" - ], + "description": "PrestaShop coding standards", "support": { - "source": "https://github.com/php-fig/cache/tree/master" + "issues": "https://github.com/PrestaShop/php-dev-tools/issues", + "source": "https://github.com/PrestaShop/php-dev-tools/tree/v5" }, - "time": "2016-08-06T20:24:11+00:00" + "time": "2024-05-23T12:27:45+00:00" }, { "name": "psr/container", @@ -975,30 +533,30 @@ }, { "name": "psr/log", - "version": "1.1.4", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + "reference": "ef29f6d262798707a9edd554e2b82517ef3a9376" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "url": "https://api.github.com/repos/php-fig/log/zipball/ef29f6d262798707a9edd554e2b82517ef3a9376", + "reference": "ef29f6d262798707a9edd554e2b82517ef3a9376", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=8.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { "psr-4": { - "Psr\\Log\\": "Psr/Log/" + "Psr\\Log\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -1019,65 +577,76 @@ "psr-3" ], "support": { - "source": "https://github.com/php-fig/log/tree/1.1.4" + "source": "https://github.com/php-fig/log/tree/2.0.0" }, - "time": "2021-05-03T11:20:27+00:00" + "time": "2021-07-14T16:41:46+00:00" }, { - "name": "squizlabs/php_codesniffer", - "version": "3.7.1", + "name": "sebastian/diff", + "version": "5.1.1", "source": { "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619" + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "c41e007b4b62af48218231d6c2275e4c9b975b2e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/1359e176e9307e906dc3d890bcc9603ff6d90619", - "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/c41e007b4b62af48218231d6c2275e4c9b975b2e", + "reference": "c41e007b4b62af48218231d6c2275e4c9b975b2e", "shasum": "" }, "require": { - "ext-simplexml": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": ">=5.4.0" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + "phpunit/phpunit": "^10.0", + "symfony/process": "^6.4" }, - "bin": [ - "bin/phpcs", - "bin/phpcbf" - ], "type": "library", "extra": { "branch-alias": { - "dev-master": "3.x-dev" + "dev-main": "5.1-dev" } }, + "autoload": { + "classmap": [ + "src/" + ] + }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { - "name": "Greg Sherwood", - "role": "lead" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" } ], - "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", "keywords": [ - "phpcs", - "standards" + "diff", + "udiff", + "unidiff", + "unified diff" ], "support": { - "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", - "source": "https://github.com/squizlabs/PHP_CodeSniffer", - "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" + "issues": "https://github.com/sebastianbergmann/diff/issues", + "security": "https://github.com/sebastianbergmann/diff/security/policy", + "source": "https://github.com/sebastianbergmann/diff/tree/5.1.1" }, - "time": "2022-06-18T07:21:10+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-02T07:15:17+00:00" }, { "name": "symfony/console", @@ -1247,44 +816,39 @@ }, { "name": "symfony/event-dispatcher", - "version": "v5.4.17", + "version": "v6.4.13", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "8e18a9d559eb8ebc2220588f1faa726a2fcd31c9" + "reference": "0ffc48080ab3e9132ea74ef4e09d8dcf26bf897e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/8e18a9d559eb8ebc2220588f1faa726a2fcd31c9", - "reference": "8e18a9d559eb8ebc2220588f1faa726a2fcd31c9", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/0ffc48080ab3e9132ea74ef4e09d8dcf26bf897e", + "reference": "0ffc48080ab3e9132ea74ef4e09d8dcf26bf897e", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/event-dispatcher-contracts": "^2|^3", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.1", + "symfony/event-dispatcher-contracts": "^2.5|^3" }, "conflict": { - "symfony/dependency-injection": "<4.4" + "symfony/dependency-injection": "<5.4", + "symfony/service-contracts": "<2.5" }, "provide": { "psr/event-dispatcher-implementation": "1.0", - "symfony/event-dispatcher-implementation": "2.0" + "symfony/event-dispatcher-implementation": "2.0|3.0" }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/http-foundation": "^4.4|^5.0|^6.0", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/stopwatch": "^4.4|^5.0|^6.0" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" + "symfony/config": "^5.4|^6.0|^7.0", + "symfony/dependency-injection": "^5.4|^6.0|^7.0", + "symfony/error-handler": "^5.4|^6.0|^7.0", + "symfony/expression-language": "^5.4|^6.0|^7.0", + "symfony/http-foundation": "^5.4|^6.0|^7.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/stopwatch": "^5.4|^6.0|^7.0" }, "type": "library", "autoload": { @@ -1312,7 +876,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v5.4.17" + "source": "https://github.com/symfony/event-dispatcher/tree/v6.4.13" }, "funding": [ { @@ -1328,33 +892,30 @@ "type": "tidelift" } ], - "time": "2022-12-12T15:54:21+00:00" + "time": "2024-09-25T14:18:03+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v2.5.2", + "version": "v3.5.1", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "f98b54df6ad059855739db6fcbc2d36995283fe1" + "reference": "7642f5e970b672283b7823222ae8ef8bbc160b9f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/f98b54df6ad059855739db6fcbc2d36995283fe1", - "reference": "f98b54df6ad059855739db6fcbc2d36995283fe1", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/7642f5e970b672283b7823222ae8ef8bbc160b9f", + "reference": "7642f5e970b672283b7823222ae8ef8bbc160b9f", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.1", "psr/event-dispatcher": "^1" }, - "suggest": { - "symfony/event-dispatcher-implementation": "" - }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -1391,7 +952,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v2.5.2" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.5.1" }, "funding": [ { @@ -1407,7 +968,7 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/filesystem", @@ -1475,22 +1036,23 @@ }, { "name": "symfony/finder", - "version": "v5.4.17", + "version": "v6.4.13", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "40c08632019838dfb3350f18cf5563b8080055fc" + "reference": "daea9eca0b08d0ed1dc9ab702a46128fd1be4958" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/40c08632019838dfb3350f18cf5563b8080055fc", - "reference": "40c08632019838dfb3350f18cf5563b8080055fc", + "url": "https://api.github.com/repos/symfony/finder/zipball/daea9eca0b08d0ed1dc9ab702a46128fd1be4958", + "reference": "daea9eca0b08d0ed1dc9ab702a46128fd1be4958", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.1" + }, + "require-dev": { + "symfony/filesystem": "^6.0|^7.0" }, "type": "library", "autoload": { @@ -1518,7 +1080,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v5.4.17" + "source": "https://github.com/symfony/finder/tree/v6.4.13" }, "funding": [ { @@ -1534,27 +1096,25 @@ "type": "tidelift" } ], - "time": "2022-12-22T10:31:03+00:00" + "time": "2024-10-01T08:30:56+00:00" }, { "name": "symfony/options-resolver", - "version": "v5.4.11", + "version": "v6.4.16", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "54f14e36aa73cb8f7261d7686691fd4d75ea2690" + "reference": "368128ad168f20e22c32159b9f761e456cec0c78" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/54f14e36aa73cb8f7261d7686691fd4d75ea2690", - "reference": "54f14e36aa73cb8f7261d7686691fd4d75ea2690", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/368128ad168f20e22c32159b9f761e456cec0c78", + "reference": "368128ad168f20e22c32159b9f761e456cec0c78", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php73": "~1.0", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3" }, "type": "library", "autoload": { @@ -1587,7 +1147,7 @@ "options" ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v5.4.11" + "source": "https://github.com/symfony/options-resolver/tree/v6.4.16" }, "funding": [ { @@ -1603,7 +1163,7 @@ "type": "tidelift" } ], - "time": "2022-07-20T13:00:38+00:00" + "time": "2024-11-20T10:57:02+00:00" }, { "name": "symfony/polyfill-ctype", @@ -2099,26 +1659,23 @@ }, { "name": "symfony/polyfill-php81", - "version": "v1.27.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a" + "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/707403074c8ea6e2edaf8794b0157a0bfa52157a", - "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c", + "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -2158,7 +1715,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.31.0" }, "funding": [ { @@ -2174,25 +1731,24 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/process", - "version": "v5.4.11", + "version": "v6.4.15", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "6e75fe6874cbc7e4773d049616ab450eff537bf1" + "reference": "3cb242f059c14ae08591c5c4087d1fe443564392" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/6e75fe6874cbc7e4773d049616ab450eff537bf1", - "reference": "6e75fe6874cbc7e4773d049616ab450eff537bf1", + "url": "https://api.github.com/repos/symfony/process/zipball/3cb242f059c14ae08591c5c4087d1fe443564392", + "reference": "3cb242f059c14ae08591c5c4087d1fe443564392", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.1" }, "type": "library", "autoload": { @@ -2220,7 +1776,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v5.4.11" + "source": "https://github.com/symfony/process/tree/v6.4.15" }, "funding": [ { @@ -2236,7 +1792,7 @@ "type": "tidelift" } ], - "time": "2022-06-27T16:58:25+00:00" + "time": "2024-11-06T14:19:14+00:00" }, { "name": "symfony/service-contracts", @@ -2323,21 +1879,21 @@ }, { "name": "symfony/stopwatch", - "version": "v5.4.13", + "version": "v6.4.13", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "6df7a3effde34d81717bbef4591e5ffe32226d69" + "reference": "2cae0a6f8d04937d02f6d19806251e2104d54f92" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/6df7a3effde34d81717bbef4591e5ffe32226d69", - "reference": "6df7a3effde34d81717bbef4591e5ffe32226d69", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/2cae0a6f8d04937d02f6d19806251e2104d54f92", + "reference": "2cae0a6f8d04937d02f6d19806251e2104d54f92", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/service-contracts": "^1|^2|^3" + "php": ">=8.1", + "symfony/service-contracts": "^2.5|^3" }, "type": "library", "autoload": { @@ -2365,7 +1921,7 @@ "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v5.4.13" + "source": "https://github.com/symfony/stopwatch/tree/v6.4.13" }, "funding": [ { @@ -2381,7 +1937,7 @@ "type": "tidelift" } ], - "time": "2022-09-28T13:19:49+00:00" + "time": "2024-09-25T14:18:03+00:00" }, { "name": "symfony/string", @@ -2472,10 +2028,12 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, - "platform": [], - "platform-dev": [], + "platform": { + "php": ">=8.1" + }, + "platform-dev": {}, "plugin-api-version": "2.6.0" } diff --git a/tests/phpstan.sh b/tests/phpstan.sh index b9ce740..04032e7 100755 --- a/tests/phpstan.sh +++ b/tests/phpstan.sh @@ -1,5 +1,6 @@ #!/bin/bash PS_VERSION=$1 +PHP_VERSION=$2 set -e @@ -9,10 +10,13 @@ echo "Pull PrestaShop files (Tag ${PS_VERSION})" docker rm -f temp-ps || true docker volume rm -f ps-volume || true -docker run -tid --rm -v ps-volume:/var/www/html --name temp-ps prestashop/prestashop:$PS_VERSION +docker run -tid --rm -v ps-volume:/var/www/html -e DISABLE_MAKE=1 --name temp-ps prestashop/prestashop:$PS_VERSION-$PHP_VERSION -# The nightly image needs more time to unzip the PrestaShop archive -while [[ -z "$(docker exec -t temp-ps ls)" ]]; do sleep 5; done +# Wait for docker initialization (it may be longer for containers based on branches since they must install dependencies) +until docker exec temp-ps ls /var/www/html/vendor/autoload.php 2> /dev/null; do + echo Waiting for docker initialization... + sleep 5 +done # Clear previous instance of the module in the PrestaShop volume echo "Clear previous module" @@ -26,6 +30,7 @@ echo "Run PHPStan using phpstan-${PS_VERSION}.neon file" docker run --rm --volumes-from temp-ps \ -v $PWD:/var/www/html/modules/keycloak_connector_demo \ -e _PS_ROOT_DIR_=/var/www/html \ - --workdir=/var/www/html/modules/keycloak_connector_demo ghcr.io/phpstan/phpstan:1-php8.1 \ + -e DISABLE_MAKE=1 \ + --workdir=/var/www/html/modules/keycloak_connector_demo ghcr.io/phpstan/phpstan:1.10.45-php${PHP_VERSION} \ analyse \ --configuration=/var/www/html/modules/keycloak_connector_demo/tests/phpstan/phpstan-${PS_VERSION}.neon diff --git a/tests/phpstan/phpstan-9.0.x.neon b/tests/phpstan/phpstan-9.0.x.neon new file mode 100644 index 0000000..de7c586 --- /dev/null +++ b/tests/phpstan/phpstan-9.0.x.neon @@ -0,0 +1,14 @@ +includes: + - %currentWorkingDirectory%/vendor/prestashop/php-dev-tools/phpstan/ps-module-extension.neon + +parameters: + paths: + - %currentWorkingDirectory% + excludePaths: + - %currentWorkingDirectory%/vendor/ + # We consider that the extension file will be stored the folder test/phpstan + # From Phpstan 0.12, paths are relative to the .neon file. + # - ../../classes + # - ../../controllers + reportUnmatchedIgnoredErrors: false + level: max From 64b722f7320a93c960b85b58b4d084dd68e3ea57 Mon Sep 17 00:00:00 2001 From: Jonathan LELIEVRE Date: Thu, 28 Nov 2024 13:12:03 +0100 Subject: [PATCH 3/3] Bump module version --- config.xml | 2 +- keycloak_connector_demo.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config.xml b/config.xml index 8902c09..dbe1e77 100644 --- a/config.xml +++ b/config.xml @@ -2,7 +2,7 @@ keycloak_connector_demo - + diff --git a/keycloak_connector_demo.php b/keycloak_connector_demo.php index 5a7d91e..b5d84de 100644 --- a/keycloak_connector_demo.php +++ b/keycloak_connector_demo.php @@ -35,7 +35,7 @@ public function __construct() { $this->name = 'keycloak_connector_demo'; $this->displayName = 'Keycloak OAuth2 connector demo'; - $this->version = '1.1.0'; + $this->version = '1.2.0'; $this->author = 'PrestaShop'; $this->description = 'Demo module of how to use Keycloak as OAuth2 Authentication Server for the new API'; $this->need_instance = 0;