Skip to content

Commit f61a71f

Browse files
committed
chore(composer): upgrade symfony
- add php 8.5 support - add symfony 8.0 support - remove annotations support
1 parent a233282 commit f61a71f

20 files changed

Lines changed: 41 additions & 374 deletions

.github/workflows/php.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ jobs:
1717
runs-on: ubuntu-latest
1818
strategy:
1919
matrix:
20-
php-version: [ '8.3', '8.4' ]
21-
symfony-version: [ '7.3.*' ]
20+
php-version: [ '8.4', '8.5' ]
21+
symfony-version: [ '7.4.*', '8.0.*' ]
2222
symfony-deprecations-helper: [ 'max[direct]=0' ]
2323

2424
name: "PHP: ${{ matrix.php-version }}, Symfony: ${{ matrix.symfony-version }}, GrumPHP: ${{ matrix.grumphp-testsuite }}, Composer: ${{ matrix.composer-flag }}"

composer.json

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,34 +15,33 @@
1515
}
1616
],
1717
"require": {
18-
"php": ">=8.3",
18+
"php": ">=8.4",
1919
"ackintosh/ganesha": "^4.0",
2020
"beberlei/assert": "^3.3",
21-
"doctrine/annotations": "^2.0",
22-
"symfony/cache": "^7.3",
23-
"symfony/config": "^7.3",
24-
"symfony/dependency-injection": "^7.3",
25-
"symfony/filesystem": "^7.3",
26-
"symfony/http-kernel": "^7.3",
21+
"symfony/cache": "^7.4 || ^8.0",
22+
"symfony/config": "^7.4 || ^8.0",
23+
"symfony/dependency-injection": "^7.4 || ^8.0",
24+
"symfony/filesystem": "^7.4 || ^8.0",
25+
"symfony/http-kernel": "^7.4 || ^8.0",
2726
"symfony/proxy-manager-bridge": "^6.4"
2827
},
2928
"require-dev": {
30-
"friendsofphp/php-cs-fixer": "^3.2",
31-
"madewithlove/license-checker": "^0.10|^1.0|^2.0",
29+
"friendsofphp/php-cs-fixer": "^3.92",
30+
"madewithlove/license-checker": "^0.10|^1.0",
3231
"nikic/php-parser": "^5.6",
3332
"php-parallel-lint/php-parallel-lint": "^1.3",
34-
"phpmd/phpmd": "^2.6",
35-
"phpro/grumphp": "^2.17",
36-
"phpstan/phpstan": "^2.0",
37-
"phpunit/phpunit": "^12.0",
38-
"pixelfederation/coding-standards": "^5.0",
39-
"psalm/phar": "^6.13",
33+
"phpmd/phpmd": "^2.15",
34+
"phpstan/phpstan": "^2.1",
35+
"phpro/grumphp-shim": "2.17.0",
36+
"phpunit/phpunit": "^12.5",
37+
"pixelfederation/coding-standards": "^5.5",
38+
"psalm/phar": "^6.14",
4039
"roave/security-advisories": "dev-master",
4140
"squizlabs/php_codesniffer": "^4.0",
4241
"symfony/flex": "^2.3",
43-
"symfony/framework-bundle": "^7.3",
44-
"symfony/monolog-bundle": "^3.7 || ^4.0",
45-
"symfony/phpunit-bridge": "^7.3 || ^8.0"
42+
"symfony/framework-bundle": "^7.4 || ^8.0",
43+
"symfony/monolog-bundle": "^4.0",
44+
"symfony/phpunit-bridge": "^7.4 || ^8.0"
4645
},
4746
"autoload": {
4847
"psr-4": {
@@ -58,14 +57,14 @@
5857
"config": {
5958
"sort-packages": true,
6059
"allow-plugins": {
61-
"phpro/grumphp": true,
6260
"dealerdirect/phpcodesniffer-composer-installer": true,
61+
"phpro/grumphp-shim": true,
6362
"symfony/flex": true
6463
}
6564
},
6665
"scripts": {
67-
"grumphp8.3": "grumphp run --testsuite=php8.3",
6866
"grumphp8.4": "grumphp run --testsuite=php8.4",
67+
"grumphp8.5": "grumphp run --testsuite=php8.5",
6968
"lic-check": "license-checker check",
7069
"phpcs": "phpcs --standard=phpcs.ruleset.xml src",
7170
"phpcbf": "phpcbf --standard=phpcs.ruleset.xml --extensions=php --tab-width=4 -sp src tests",

config/services.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
use Ackintosh\Ganesha\Storage\Adapter\Apcu;
77
use Ackintosh\Ganesha\Storage\Adapter\ApcuStore;
88
use Ackintosh\Ganesha\Strategy\Rate\Builder;
9-
use Doctrine\Common\Annotations\AnnotationReader;
10-
use PixelFederation\CircuitBreakerBundle\AnnotationMetadataReader;
9+
use PixelFederation\CircuitBreakerBundle\AttributeMetadataReader;
1110
use PixelFederation\CircuitBreakerBundle\Bridge\Ganesha\GaneshaCircuitBreaker;
1211
use PixelFederation\CircuitBreakerBundle\Bridge\Symfony\Command\GenerateCircuitBrokenProxiesCacheClearer;
1312
use PixelFederation\CircuitBreakerBundle\Bridge\Symfony\Command\GenerateCircuitBrokenProxiesCacheWarmer;
@@ -55,12 +54,9 @@
5554
service('pixel_federation_circuit_breaker.circuit_breaker.cache_item_pool'),
5655
]);
5756

58-
$services->alias(MetadataReader::class, AnnotationMetadataReader::class);
57+
$services->set(AttributeMetadataReader::class);
5958

60-
$services->set('app.doctrine_annotation_reader', AnnotationReader::class);
61-
62-
$services->set(AnnotationMetadataReader::class)
63-
->arg('$annotationsReader', service('app.doctrine_annotation_reader'));
59+
$services->alias(MetadataReader::class, AttributeMetadataReader::class);
6460

6561
$services->alias(MethodExtractor::class, ReflectionMethodExtractor::class);
6662

docker-compose.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,25 @@ x-php-common: &php-common
88
- COMPOSER_MEMORY_LIMIT=-1
99
services:
1010

11-
circuit-breaker-bundle-php83:
11+
circuit-breaker-bundle-php84:
1212
<<: *php-common
13-
container_name: circuit-breaker-bundle-php83
13+
container_name: circuit-breaker-bundle-php84
1414
build:
1515
dockerfile: ./docker/php/Dockerfile
1616
context: ./
1717
args:
18-
PHP_VERSION: 8.3
18+
PHP_VERSION: 8.4
1919

20-
circuit-breaker-bundle-php84:
20+
circuit-breaker-bundle-php85:
2121
<<: *php-common
22-
container_name: circuit-breaker-bundle-php84
22+
container_name: circuit-breaker-bundle-php85
2323
build:
2424
dockerfile: ./docker/php/Dockerfile
2525
context: ./
2626
args:
27-
PHP_VERSION: 8.4
27+
PHP_VERSION: 8.5
2828

2929
circuit-breaker-bundle-php-min:
3030
container_name: circuit-breaker-bundle-php-min
3131
extends:
32-
service: circuit-breaker-bundle-php83
32+
service: circuit-breaker-bundle-php84

grumphp.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ grumphp:
44
git_hook_variables:
55
EXEC_GRUMPHP_COMMAND: './bin/grumphp_hooks/environment_spinup && docker exec -t circuit-breaker-bundle-php-min'
66
testsuites:
7-
php8.3:
7+
php8.4:
88
tasks:
99
- phpcs
1010
- phpmd
@@ -15,7 +15,7 @@ grumphp:
1515
- shell
1616
- phpstan
1717
- psalm
18-
php8.4:
18+
php8.5:
1919
tasks:
2020
- phpcs
2121
- phpmd

mutagen.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

phpcs.ruleset.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
<!-- Show progress, show the error codes for each message (source). -->
99
<arg value="ps"/>
1010
<description>PixelFederation rule set.</description>
11-
<config name="testVersion" value="8.3"/>
12-
<rule ref="vendor/pixelfederation/coding-standards/phpcs.ruleset.83.non-ddd.xml">
11+
<config name="testVersion" value="8.4"/>
12+
<rule ref="vendor/pixelfederation/coding-standards/phpcs.ruleset.84.non-ddd.xml">
1313
<exclude name="SlevomatCodingStandard.Functions.FunctionLength.FunctionLength"/>
1414
</rule>
1515

src/Annotation/CircuitBreaker.php

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,8 @@
55
namespace PixelFederation\CircuitBreakerBundle\Annotation;
66

77
use Attribute;
8-
use Doctrine\Common\Annotations\Annotation;
9-
use Doctrine\Common\Annotations\Annotation\NamedArgumentConstructor;
108
use Throwable;
119

12-
/**
13-
* @Annotation
14-
* @Annotation\Target("METHOD")
15-
* @NamedArgumentConstructor
16-
* @Annotation\Attributes({
17-
* @Annotation\Attribute(
18-
* "fallbackMethod",
19-
* type="string",
20-
* required=false
21-
* ),
22-
* @Annotation\Attribute(
23-
* "ignoreExceptions",
24-
* type="array",
25-
* required=false
26-
* )
27-
* })
28-
*/
2910
#[Attribute(Attribute::TARGET_METHOD)]
3011
final class CircuitBreaker
3112
{

src/Annotation/CircuitBreakerService.php

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,32 +5,8 @@
55
namespace PixelFederation\CircuitBreakerBundle\Annotation;
66

77
use Attribute;
8-
use Doctrine\Common\Annotations\Annotation;
9-
use Doctrine\Common\Annotations\Annotation\NamedArgumentConstructor;
108
use Throwable;
119

12-
/**
13-
* @Annotation
14-
* @Annotation\Target("CLASS")
15-
* @NamedArgumentConstructor
16-
* @Annotation\Attributes({
17-
* @Annotation\Attribute(
18-
* "serviceName",
19-
* type="string",
20-
* required=false
21-
* ),
22-
* @Annotation\Attribute(
23-
* "defaultFallback",
24-
* type="string",
25-
* required=false
26-
* ),
27-
* @Annotation\Attribute(
28-
* "ignoreExceptions",
29-
* type="array",
30-
* required=false
31-
* )
32-
* })
33-
*/
3410
#[Attribute(Attribute::TARGET_CLASS)]
3511
final class CircuitBreakerService
3612
{

src/AnnotationMetadataReader.php

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)