8000 minor #52137 [FrameworkBundle][Routing] Remove remaining deprecations… · symfony/framework-bundle@fe9b172 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit fe9b172

Browse files
minor #52137 [FrameworkBundle][Routing] Remove remaining deprecations (alexandre-daubois)
This PR was merged into the 7.0 branch. Discussion ---------- [FrameworkBundle][Routing] Remove remaining deprecations | Q | A | ------------- | --- | Branch? | 7.0 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | - | License | MIT Follows symfony/symfony#51483, I took `Annotation*Loader` from 7.0 to update `Attribute*Loader` here with latest changes. Commits ------- 77f6efc601 [FrameworkBundle][Routing] Remove remaining deprecations
2 parents 2dda624 + 0590b33 commit fe9b172

File tree

3 files changed

+5
-16
lines changed

3 files changed

+5
-16
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ CHANGELOG
2424
* Make the `framework.validation.email_validation_mode` config option default to `html5`
2525
* Remove the `framework.validation.enable_annotations` config option, use `framework.validation.enable_attributes` instead
2626
* Remove the `framework.serializer.enable_annotations` config option, use `framework.serializer.enable_attributes` instead
27+
* Remove the `routing.loader.annotation` service, use the `routing.loader.attribute` service instead
28+
* Remove the `routing.loader.annotation.directory` service, use the `routing.loader.attribute.directory` service instead
29+
* Remove the `routing.loader.annotation.file` service, use the `routing.loader.attribute.file` service instead
30+
* Remove `AnnotatedRouteControllerLoader`, use `AttributeRouteControllerLoader` instead
2731

2832
6.4
2933
---

Resources/config/routing.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -98,29 +98,20 @@
9898
])
9999
->tag('routing.loader', ['priority' => -10])
100100

101-
->alias('routing.loader.annotation', 'routing.loader.attribute')
102-
->deprecate('symfony/routing', '6.4', 'The "%alias_id%" service is deprecated, use the "routing.loader.attribute" service instead.')
103-
104101
->set('routing.loader.attribute.directory', AttributeDirectoryLoader::class)
105102
->args([
106103
service('file_locator'),
107104
service('routing.loader.attribute'),
108105
])
109106
->tag('routing.loader', ['priority' => -10])
110107

111-
->alias('routing.loader.annotation.directory', 'routing.loader.attribute.directory')
112-
->deprecate('symfony/routing', '6.4', 'The "%alias_id%" service is deprecated, use the "routing.loader.attribute.directory" service instead.')
113-
114108
->set('routing.loader.attribute.file', AttributeFileLoader::class)
115109
->args([
116110
service('file_locator'),
117111
service('routing.loader.attribute'),
118112
])
119113
->tag('routing.loader', ['priority' => -10])
120114

121-
->alias('routing.loader.annotation.file', 'routing.loader.attribute.file')
122-
->deprecate('symfony/routing', '6.4', 'The "%alias_id%" service is deprecated, use the "routing.loader.attribute.file" service instead.')
123-
124115
->set('routing.loader.psr4', Psr4DirectoryLoader::class)
125116
->args([
126117
service('file_locator'),

Routing/AttributeRouteControllerLoader.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,8 @@ class AttributeRouteControllerLoader extends AttributeClassLoader
2525
{
2626
/**
2727
* Configures the _controller default parameter of a given Route instance.
28-
*
29-
* @return void
3028
*/
31-
protected function configureRoute(Route $route, \ReflectionClass $class, \ReflectionMethod $method, object $annot)
29+
protected function configureRoute(Route $route, \ReflectionClass $class, \ReflectionMethod $method, object $annot): void
3230
{
3331
if ('__invoke' === $method->getName()) {
3432
$route->setDefault('_controller', $class->getName());
@@ -51,7 +49,3 @@ protected function getDefaultRouteName(\ReflectionClass $class, \ReflectionMetho
5149
return str_replace('__', '_', $name);
5250
}
5351
}
54-
55-
if (!class_exists(AnnotatedRouteControllerLoader::class, false)) {
56-
class_alias(AttributeRouteControllerLoader::class, AnnotatedRouteControllerLoader::class);
57-
}

0 commit comments

Comments
 (0)
0