Skip to content

[DI] Improve the deprecation features by handling package and version #35778

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 31, 2020

Conversation

atailouloute
Copy link
Contributor

@atailouloute atailouloute commented Feb 18, 2020

Q A
Branch? master
Bug fix? no
New feature? yes
Deprecations? yes
Tickets
License MIT
Doc PR TODO

Improve the deprecation feature of the Dependency Injection component, by handling the package + since_version

Before

services:
    LegacyService:
        deprecated: 'The %service_id% is deprecated, use NewService instead'

now:

services:
    LegacyService:
        deprecated:
            message: 'The %service_id% is deprecated, use NewService instead'
            package: 'my/package'
            since_version: '1.2'

TODO:

  • update UPGRADE

Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some food for thoughts :)

@atailouloute atailouloute force-pushed the improve-di-deprecation branch 14 times, most recently from 14e0253 to 1a0de43 Compare February 19, 2020 23:41
@atailouloute atailouloute force-pushed the improve-di-deprecation branch 2 times, most recently from f00b925 to 810d6bf Compare February 20, 2020 10:25
@nicolas-grekas
Copy link
Member

(oh, and please mind tests :) )

@atailouloute atailouloute force-pushed the improve-di-deprecation branch 2 times, most recently from 49228e9 to bf80625 Compare February 25, 2020 19:58
@atailouloute atailouloute force-pushed the improve-di-deprecation branch 2 times, most recently from 7e813eb to 9546db7 Compare February 25, 2020 20:48
@atailouloute
Copy link
Contributor Author

@nicolas-grekas PR is ready for another review

I did the changes you suggested + I added tests (now all tests with @group legacy are related to the old/deprecated way of using ->setDeprecated, so they will be removed in 6.0)

@atailouloute atailouloute force-pushed the improve-di-deprecation branch from 9546db7 to f98fffa Compare February 25, 2020 20:55
Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost good, just minor things now.

@atailouloute atailouloute force-pushed the improve-di-deprecation branch 4 times, most recently from 7a2598a to 3d96a97 Compare February 26, 2020 10:49
@nicolas-grekas nicolas-grekas changed the title [DependencyInjection] Improve the deprecation features by handling package and version [DI] Improve the deprecation features by handling package and version Feb 26, 2020
@atailouloute atailouloute force-pushed the improve-di-deprecation branch from 3d96a97 to b736b39 Compare February 26, 2020 11:10
@atailouloute atailouloute force-pushed the improve-di-deprecation branch from 78dfad6 to 3cb1b81 Compare February 27, 2020 12:31
@nicolas-grekas nicolas-grekas force-pushed the improve-di-deprecation branch from 3cb1b81 to f10413c Compare March 31, 2020 19:52
@nicolas-grekas
Copy link
Member

Thank you @atailouloute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants