Skip to content

Conversation

@derrabus
Copy link
Member

The LoggerChannelPass contains calls to Symfony\Component\DependencyInjection\Reference::isStrict(), a method that has been removed from Symfony 3. The test case LoggerChannelPassTest fails 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.

@derrabus
Copy link
Member Author

The method was removed with PR symfony/symfony#15693.

@derrabus derrabus changed the title Reference::isStrict() is gone in 3.0 Reference::isStrict() is gone in Symfony 3.0 Sep 15, 2015
@fabpot
Copy link
Member

fabpot commented Sep 16, 2015

👍

@fabpot
Copy link
Member

fabpot commented Sep 16, 2015

That's actually the only remaining patch to make the Symfony SE work for Symfony 3.0. At least, to make Composer happy :)

Copy link
Member

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

@derrabus
Copy link
Member Author

@stof Thank you for your review. I've followed both of your suggestions.

@stof
Copy link
Member

stof commented Sep 16, 2015

Thank you @derrabus.

@stof stof closed this in 7704609 Sep 16, 2015
@derrabus derrabus deleted the reference-without-strict branch September 16, 2015 09:46
Copy link
Contributor

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...

Copy link
Member Author

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.

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.

4 participants