-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[FrameworkBundle] [Routing] DelegatingLoader: deprecate logger argument #16135
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
[FrameworkBundle] [Routing] DelegatingLoader: deprecate logger argument #16135
Conversation
*/ | ||
public function __construct(ControllerNameParser $parser, LoggerInterface $logger = null, LoaderResolverInterface $resolver) | ||
public function __construct(ControllerNameParser $parser, $logger = null, $resolver = null) |
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.
The variable names and the docblock should reflect the behaviour in Symfony 3.0.
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.
Of course, I'd like to. But if naming the $logger
argument $resolver
is pretty obvious, what should be named the old $resolver
one ? 😄
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.
Dunno, maybe just $r
(similar to what @nicolas-grekas did in #16129).
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.
Ok, updated. Thanks.
We should throw exceptions when the variables do not have the expected type after the evaluation (it's not enforced by type hints anymore). Status: Needs work |
This is enforced by the parent constructor for the |
use Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser; | ||
use Symfony\Component\Config\Exception\FileLoaderLoadException; | ||
use Symfony\Component\Config\Loader\DelegatingLoader as BaseDelegatingLoader; | ||
use Symfony\Component\Config\Loader\LoaderResolverInterface; | ||
use Psr\Log\LoggerInterface; |
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.
Should be moved back, we don't reorder use statements to avoid merging conflict on other branches.
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.
Fixed.
👍 Status: reviewed |
Thank you @ogizanagi. |
…logger argument (ogizanagi) This PR was merged into the 2.8 branch. Discussion ---------- [FrameworkBundle] [Routing] DelegatingLoader: deprecate logger argument | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | yes | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Related to #16117 Commits ------- af0eba7 [FrameworkBundle] [Routing] DelegatingLoader: deprecate logger argument
…ages (xabbuh) This PR was merged into the 2.8 branch. Discussion ---------- [FrameworkBundle][VarDumper] tweak some deprecation messages | Q | A | ------------- | --- | Fixed tickets | #16129, #16135 | License | MIT I was a bit too slow with reviewing. Commits ------- 536045f tweak some deprecation messages
Related to #16117