-
-
Notifications
You must be signed in to change notification settings - Fork 241
Reference::isStrict() is gone in Symfony 3.0 #138
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
|
The method was removed with PR symfony/symfony#15693. |
|
👍 |
|
That's actually the only remaining patch to make the Symfony SE work for Symfony 3.0. At least, to make Composer happy :) |
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.
no need to use else here as the previous if returns
|
@stof Thank you for your review. I've followed both of your suggestions. |
|
Thank you @derrabus. |
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.
This still triggers alot of deprecation warnings when warming the cache in the standard edition. We need a different solution. We could just use $reference->isStrict(false) to prevent the deprecation warning. Or can we not ignore the strict flag completely? It's rather unlikely to have a scope problem with a logger...
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.
$reference->isStrict(false) is probably the way to go. Ignoring the strict flag might cause problems with bundles that still rely on the deprecated behavior.
The
LoggerChannelPasscontains calls toSymfony\Component\DependencyInjection\Reference::isStrict(), a method that has been removed from Symfony 3. The test caseLoggerChannelPassTestfails if you run it against the Symfony master branch.This pull request adds a forward-compatible code that checks with
method_exists()if the method is still present. That check may be removed in the future, as soon as support for Symfony 2 is dropped. Tests are now running green with Symfony 2.7.4 and 3.0-dev.