-
Notifications
You must be signed in to change notification settings - Fork 84
trigger deprecation notices for deprecated code #282
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
Conversation
a997a10 to
8aa7a54
Compare
|
ah, found the thing about legacy tests. |
HttpCache.php
Outdated
|
|
||
| public function __construct(HttpKernelInterface $kernel, $cacheDir = null) | ||
| { | ||
| @trigger_error('The '.__CLASS__.' class is deprecated since version 1.2 and will be removed in 2.0. Use FOS\HttpCacheBundle\SymfonyCache\EventDispatchingHttpCache instead.', E_USER_DEPRECATED); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the whole class is deprecated, you could also put this above the class definition directly.
|
If there won't be a 1.4 version (the next one is 2.0), then it should indeed make it into 1.3 |
8aa7a54 to
2e69cbe
Compare
HttpCache.php
Outdated
| use Symfony\Component\HttpFoundation\Request; | ||
| use Symfony\Component\HttpKernel\HttpKernelInterface; | ||
|
|
||
| @trigger_error('The '.__CLASS__.' class is deprecated since version 1.2 and will be removed in 2.0. Use FOS\HttpCacheBundle\SymfonyCache\EventDispatchingHttpCache instead.', E_USER_DEPRECATED); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Tobion like this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
__CLASS__ is not defined outside of a class. Use something like this: https://github.com/symfony/symfony/blob/2.8/src/Symfony/Component/Form/Extension/Core/ChoiceList/ObjectChoiceList.php#L14
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ups. thanks
2e69cbe to
cb96b54
Compare
trigger deprecation notices for deprecated code
fix #266
@Tobion am i correct that this should go into the 1.3 branch? we want to delete this things for 2.0 so the deprecations would not really help there. i don't want to build a 1.4 version only for the migration like symfony 2.8 is - too much effort.
also, do you know how to make the deprecations helper not complain about our legacy tests? i tried the
@legacyannotation on the test cases, but that did not seem help.