diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1838cdb..9e69129 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: tools: flex - name: "Checkout code" - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: "Install Composer dependencies" uses: "ramsey/composer-install@v3" @@ -45,7 +45,7 @@ jobs: tools: flex, cs2pr - name: "Checkout code" - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: "Install Composer dependencies" uses: "ramsey/composer-install@v3" @@ -62,23 +62,23 @@ jobs: max-parallel: 10 fail-fast: false matrix: - php: [ '8.0', '8.1', '8.2', '8.3', '8.4' ] - sf_version: [ '6.4.*', '7.2.*', '7.3.*' ] + php: [ '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ] + sf_version: [ '6.4.*', '7.3.*', '7.4.*' ] exclude: - php: '8.0' sf_version: '6.4.*' - - php: '8.0' - sf_version: '7.2.*' - - php: '8.1' - sf_version: '7.2.*' - php: '8.0' sf_version: '7.3.*' - php: '8.1' sf_version: '7.3.*' + - php: '8.0' + sf_version: '7.4.*' + - php: '8.1' + sf_version: '7.4.*' steps: - name: "Checkout code" - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: "Setup PHP" uses: shivammathur/setup-php@v2 diff --git a/tests/Command/GeocodeCommandTest.php b/tests/Command/GeocodeCommandTest.php index 203ef8e..dafb43d 100644 --- a/tests/Command/GeocodeCommandTest.php +++ b/tests/Command/GeocodeCommandTest.php @@ -66,7 +66,12 @@ public function testExecute(): void ->willReturn([]); $app = new Application($kernel); - $app->add((new GeocodeCommand($geocoder))->setName('geocoder:geocode')); + if (method_exists($app, 'addCommand')) { + // since Symfony 8 + $app->addCommand((new GeocodeCommand($geocoder))->setName('geocoder:geocode')); + } else { + $app->add(new GeocodeCommand($geocoder)); + } $command = $app->find('geocoder:geocode'); diff --git a/tests/DependencyInjection/Compiler/FactoryValidatorPassTest.php b/tests/DependencyInjection/Compiler/FactoryValidatorPassTest.php index 0b7f3f7..b6c43b7 100644 --- a/tests/DependencyInjection/Compiler/FactoryValidatorPassTest.php +++ b/tests/DependencyInjection/Compiler/FactoryValidatorPassTest.php @@ -33,7 +33,9 @@ protected function tearDown(): void { $reflection = new \ReflectionObject($this->compilerPass); $prop = $reflection->getProperty('factoryServiceIds'); - $prop->setAccessible(true); + if (PHP_VERSION_ID < 80100) { + $prop->setAccessible(true); + } $prop->setValue(null, []); } diff --git a/tests/Validator/Constraint/AddressValidatorTest.php b/tests/Validator/Constraint/AddressValidatorTest.php index be21135..ebf63b0 100644 --- a/tests/Validator/Constraint/AddressValidatorTest.php +++ b/tests/Validator/Constraint/AddressValidatorTest.php @@ -78,9 +78,7 @@ public function testInvalidAddress(): void { $address = 'Bifrost, Nine Realms'; - $constraint = new Address([ - 'message' => 'myMessage {{ address }}', - ]); + $constraint = new Address(message: 'myMessage {{ address }}'); $this->validator->validate($address, $constraint);