From b8b5b70853c2dd45b317644a3ee6fe531b78076f Mon Sep 17 00:00:00 2001 From: Wiktor Ramut Date: Mon, 30 Sep 2024 08:36:21 +0200 Subject: [PATCH] Support symfony 7 --- composer.json | 18 +++++++++--------- src/Request/GetParcelShops.php | 7 ++++--- src/Response/DTO/ParcelShop.php | 2 +- src/Response/DTO/RawParcelShop.php | 2 +- 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/composer.json b/composer.json index 629acd2..8de5f06 100755 --- a/composer.json +++ b/composer.json @@ -8,21 +8,21 @@ "ext-json": "*", "guzzlehttp/guzzle": "^6.5|^7.9.2", "psr/log": "^1.1.4", - "symfony/http-kernel": "6.4.*", - "symfony/property-access": "6.4.*", - "symfony/property-info": "6.4.*", - "symfony/serializer": "6.4.*", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/property-access": "^6.4|^7.0", + "symfony/property-info": "^6.4|^7.0", + "symfony/serializer": "^6.4|^7.0", "webmozart/assert": "^1.11" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.63.2", + "friendsofphp/php-cs-fixer": "^3.64", "matthiasnoback/symfony-config-test": "^5.2", - "phpro/grumphp": "^2.7.0", + "phpro/grumphp": "^2.8", "phpstan/phpstan": "^1.12", - "phpstan/phpstan-webmozart-assert": "^1.2.10", - "phpunit/phpunit": "^10.5.30", + "phpstan/phpstan-webmozart-assert": "^1.2", + "phpunit/phpunit": "^10.5", "roave/security-advisories": "dev-master", - "symfony/phpunit-bridge": "6.4.*" + "symfony/phpunit-bridge": "^6.4|^7.0" }, "autoload": { "psr-4": { diff --git a/src/Request/GetParcelShops.php b/src/Request/GetParcelShops.php index 25e641c..0205ee6 100644 --- a/src/Request/GetParcelShops.php +++ b/src/Request/GetParcelShops.php @@ -6,13 +6,14 @@ use Answear\GlsBundle\Enum\CountryCodeEnum; -class GetParcelShops implements RequestInterface +readonly class GetParcelShops implements RequestInterface { private const ENDPOINT = 'data/deliveryPoints/'; private const HTTP_METHOD = 'GET'; - public function __construct(public CountryCodeEnum $countryCode) - { + public function __construct( + public CountryCodeEnum $countryCode, + ) { } public function getEndpoint(): string diff --git a/src/Response/DTO/ParcelShop.php b/src/Response/DTO/ParcelShop.php index 0e8c18d..85fef48 100644 --- a/src/Response/DTO/ParcelShop.php +++ b/src/Response/DTO/ParcelShop.php @@ -8,7 +8,7 @@ use Answear\GlsBundle\Enum\FeatureEnum; use Answear\GlsBundle\Enum\ParcelShopTypeEnum; -class ParcelShop +readonly class ParcelShop { /** * @param Openings[] $openings diff --git a/src/Response/DTO/RawParcelShop.php b/src/Response/DTO/RawParcelShop.php index 3135bff..21521e4 100644 --- a/src/Response/DTO/RawParcelShop.php +++ b/src/Response/DTO/RawParcelShop.php @@ -4,7 +4,7 @@ namespace Answear\GlsBundle\Response\DTO; -class RawParcelShop +readonly class RawParcelShop { public function __construct( public string $id,