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

Skip to content

[Debug] track and report deprecated classes and interfaces #13164

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
Dec 30, 2014

Conversation

nicolas-grekas
Copy link
Member

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets -
License MIT
Doc PR -

@nicolas-grekas nicolas-grekas force-pushed the deprecation-for-interfaces branch 4 times, most recently from 3f8fcdc to 515c4b8 Compare December 30, 2014 09:37

if (preg_match('#\n \* @deprecated (.*?)\r?\n \*(?: @|/$)#s', $refl->getDocComment(), $notice)) {
$notice = preg_replace('#\s*\r?\n \* +#', ' ', $notice[1]);
self::$deprecated[$name] = sprintf('The %s %s is deprecated %s', $name, class_exists($class, false) ? 'class' : 'interface', $notice);
Copy link
Member

Choose a reason for hiding this comment

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

given that you already have the ReflectionClass, using $refl->isInterface() would be more readable IMO

@nicolas-grekas nicolas-grekas force-pushed the deprecation-for-interfaces branch from 515c4b8 to 9729fa5 Compare December 30, 2014 12:42
@nicolas-grekas
Copy link
Member Author

@stof comments addressed

@stof
Copy link
Member

stof commented Dec 30, 2014

👍 this is a great way to report issues for people implementing deprecated interfaces or extending deprecated classes

@nicolas-grekas nicolas-grekas force-pushed the deprecation-for-interfaces branch from 9729fa5 to a541faf Compare December 30, 2014 13:17
@fabpot
Copy link
Member

fabpot commented Dec 30, 2014

Thank you @nicolas-grekas.

@fabpot fabpot merged commit a541faf into symfony:2.7 Dec 30, 2014
fabpot added a commit that referenced this pull request Dec 30, 2014
…aces (nicolas-grekas)

This PR was merged into the 2.7 branch.

Discussion
----------

[Debug] track and report deprecated classes and interfaces

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Commits
-------

a541faf [Debug] track and report deprecated classes and interfaces
@nicolas-grekas nicolas-grekas deleted the deprecation-for-interfaces branch December 30, 2014 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants