Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4d855e2

Browse files
committed
feature #16011 [FrameworkBundle] Tag deprecated services (nicolas-grekas)
This PR was merged into the 2.8 branch. Discussion ---------- [FrameworkBundle] Tag deprecated services | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Tag deprecated services as such. Some are deprecated by transitivity with their class definition. Having given some workshops on migrating to sf 3.0, the deprecation triggered at the class level is cryptic to most. Triggering a more tailored one about the service is really important to me in order to help users migrate. Commits ------- 87e8e8f [FrameworkBundle] Tag deprecated services
2 parents 5c561d4 + 87e8e8f commit 4d855e2

File tree

4 files changed

+6
-10
lines changed

4 files changed

+6
-10
lines changed

src/Symfony/Bundle/FrameworkBundle/Resources/config/form_csrf.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<services>
88
<service id="form.csrf_provider" class="Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfTokenManagerAdapter">
99
<argument type="service" id="security.csrf.token_manager" />
10+
<deprecated>The "%service_id%" service is deprecated since Symfony 2.4 and will be removed in 3.0. Use the "security.csrf.token_manager" service instead.</deprecated>
1011
</service>
1112

1213
<service id="form.type_extension.csrf" class="Symfony\Component\Form\Extension\Csrf\Type\FormTypeCsrfExtension">

src/Symfony/Bundle/FrameworkBundle/Resources/config/services.xml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,9 @@
3838
<argument type="collection" />
3939
</service>
4040

41-
<!--
42-
If you want to change the Request class, modify the code in
43-
your front controller (app.php) so that it passes an instance of
44-
YourRequestClass to the Kernel.
45-
This service definition only defines the scope of the request.
46-
It is used to check references scope.
47-
48-
This service is deprecated, you should use the request_stack service instead.
49-
-->
50-
<service id="request" scope="request" synthetic="true" synchronized="true" />
41+
<service id="request" scope="request" synthetic="true" synchronized="true">
42+
<deprecated>The "%service_id%" service is deprecated since Symfony 2.7 and will be removed in 3.0. Use the "request_stack" service instead.</deprecated>
43+
</service>
5144

5245
<service id="service_container" synthetic="true" />
5346

src/Symfony/Bundle/FrameworkBundle/Resources/config/validator.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
</call>
4848
</service>
4949
</argument>
50+
<deprecated>The "%service_id%" service is deprecated since Symfony 2.8 and will be removed in 3.0.</deprecated>
5051
</service>
5152

5253
<service id="validator.validator_factory" class="%validator.validator_factory.class%" public="false">

src/Symfony/Bundle/SecurityBundle/Resources/config/security.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
<service id="security.context" class="%security.context.class%">
5454
<argument type="service" id="security.token_storage" />
5555
<argument type="service" id="security.authorization_checker" />
56+
<deprecated>The "%service_id%" service is deprecated since Symfony 2.6 and will be removed in 3.0.</deprecated>
5657
</service>
5758

5859
<service id="security.authorization_checker" class="Symfony\Component\Security\Core\Authorization\AuthorizationChecker">

0 commit comments

Comments
 (0)