Skip to content

Commit a882f6f

Browse files
authored
Merge pull request #9 from MacPaw/feat/orc-11-change-req
feat: orc-11 update req deps
2 parents 5b0fdbe + ca40e91 commit a882f6f

File tree

4 files changed

+20
-20
lines changed

4 files changed

+20
-20
lines changed

.github/workflows/ci.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,6 @@ jobs:
7575

7676
- name: Upload coverage reports to Codecov
7777
if: matrix.coverage == 'xdebug'
78-
uses: codecov/codecov-action@v4.0.1
78+
uses: codecov/codecov-action@v5
7979
with:
8080
token: ${{ secrets.CODECOV_TOKEN }}

composer.json

+12-12
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,21 @@
33
"description": "Symfony Deprecated Routes Annotations",
44
"license": "MIT",
55
"type": "library",
6+
"require": {
7+
"php": "^8.1",
8+
"symfony/config": "^6.4 || ^7.0",
9+
"symfony/dependency-injection": "^6.4 || ^7.0",
10+
"symfony/http-kernel": "^6.4 || ^7.0",
11+
"symfony/routing": "^6.4 || ^7.0",
12+
"symfony/event-dispatcher": "^6.4 || ^7.0"
13+
},
614
"require-dev": {
715
"symfony/browser-kit": "^6.0",
816
"phpunit/phpunit": "^10.5",
917
"squizlabs/php_codesniffer": "^3.8",
10-
"symfony/yaml": "^6.4|^7.0",
11-
"symfony/framework-bundle": "^6.4|^7.0"
18+
"symfony/yaml": "^6.4 || ^7.0",
19+
"symfony/framework-bundle": "^6.4 || ^7.0",
20+
"phpstan/phpstan-symfony": "^1.3 || ^2.0"
1221
},
1322
"autoload": {
1423
"psr-4": {
@@ -30,14 +39,5 @@
3039
"composer validate"
3140
]
3241
},
33-
"minimum-stability": "stable",
34-
"require": {
35-
"php": "^8.1",
36-
"symfony/config": "^6.4|^7.0",
37-
"symfony/dependency-injection": "^6.4|^7.0",
38-
"symfony/http-kernel": "^6.4|^7.0",
39-
"symfony/routing": "^6.4|^7.0",
40-
"phpstan/phpstan-symfony": "^1.3",
41-
"symfony/event-dispatcher": "^6.4|^7.0"
42-
}
42+
"minimum-stability": "stable"
4343
}

phpstan.neon

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ parameters:
44
- src/DependencyInjection/Configuration.php
55
paths:
66
- src
7-
- tests
7+
treatPhpDocTypesAsCertain: false

src/DependencyInjection/DeprecatedRoutesExtension.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,11 @@
55
namespace Macpaw\SymfonyDeprecatedRoutes\DependencyInjection;
66

77
use Exception;
8-
use Macpaw\SymfonyDeprecatedRoutes\DeprecatedRoutesBundle;
98
use Macpaw\SymfonyDeprecatedRoutes\Routing\AnnotationReader\MarkDeprecatedRoutes;
109
use Macpaw\SymfonyDeprecatedRoutes\Routing\EventSubscriber\DeprecationRoutesEventSubscriber;
1110
use Symfony\Component\Config\Definition\ConfigurationInterface;
1211
use Symfony\Component\Config\FileLocator;
1312
use Symfony\Component\DependencyInjection\ContainerBuilder;
14-
use Symfony\Component\DependencyInjection\Definition;
1513
use Symfony\Component\DependencyInjection\Extension\Extension;
1614
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
1715

@@ -28,14 +26,16 @@ public function load(array $configs, ContainerBuilder $container): void
2826
$loader->load('services.yaml');
2927

3028
$configuration = $this->getConfiguration($configs, $container);
31-
assert($configuration instanceof ConfigurationInterface);
3229
$configs = $this->processConfiguration($configuration, $configs);
3330
$definition = $container->getDefinition(DeprecationRoutesEventSubscriber::class);
3431

35-
$headers = $configs[Configuration::HEADER_OPTION_NAME];
32+
$headers = $configs[Configuration::HEADER_OPTION_NAME] ?? [];
3633
$definition->setArguments([
34+
/** @phpstan-ignore-next-line */
3735
'$deprecationHeaderName' => $headers[Configuration::DEPRECATION_MESSAGE_OPTION_NAME],
36+
/** @phpstan-ignore-next-line */
3837
'$deprecationFromHeaderName' => $headers[Configuration::DEPRECATION_FROM_OPTION_NAME],
38+
/** @phpstan-ignore-next-line */
3939
'$deprecationSinceHeaderName' => $headers[Configuration::DEPRECATION_SINCE_OPTION_NAME],
4040
'$isDisabled' => $configs[Configuration::IS_DISABLED_OPTION_NAME],
4141
]);
@@ -49,9 +49,9 @@ public function load(array $configs, ContainerBuilder $container): void
4949
}
5050

5151
/**
52-
* @param array<string, mixed> $config
52+
* @param array<mixed> $config
5353
*/
54-
public function getConfiguration(array $config, ContainerBuilder $container)
54+
public function getConfiguration(array $config, ContainerBuilder $container): ConfigurationInterface
5555
{
5656
return new Configuration();
5757
}

0 commit comments

Comments
 (0)