Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[FrameworkBundle][WebProfilerBundle] Move ProfilerPass to the WebProfiler bundle#21368
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
UPGRADE-3.3.md Outdated
| * The`Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddConsoleCommandPass` has been deprecated. Use`Symfony\Component\Console\DependencyInjection\AddConsoleCommandPass` instead. | ||
| * The`ProfilerPass` class has been deprecated and will be removed in 4.0, use the | ||
| `Symfony\Bundle\WebProfilerBundle\DependencyInjection\ProfilerPass` class instead. |
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 is missing theCompiler part of the namespace.
UPGRADE-4.0.md Outdated
| * The`Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddConsoleCommandPass` has been removed. Use`Symfony\Component\Console\DependencyInjection\AddConsoleCommandPass` instead. | ||
| * The`ProfilerPass` class has been removed, use the |
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.
same here
| $container->addCompilerPass(newRoutingResolverPass()); | ||
| $container->addCompilerPass(newProfilerPass()); | ||
| if (class_exists(AddConsoleCommandPass::class)) { |
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 change does not look related to the goal of the PR.
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.
you're right, this will be deleted.
| if (class_exists(AddConsoleCommandPass::class)) { | ||
| $container->addCompilerPass(newAddConsoleCommandPass()); | ||
| } | ||
| $this->addCompilerPassIfExists($container, ProfilerPass::class); |
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.
You have to specify the FQCN of an alternative implementation (the already existing one) that will be used as a fallback to provide backwards compatibility.
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.
You're saying that I should write
if (class_exists(ProfilerPass::class)) { $container->addCompilerPass(new ProfilerPass());}and duplicate the code ?
or just say somewhere that I took this part of the code from#21283 which has already been reviewed ?
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.
Or do I have to link to the old Implementation ?
or the last chance, make an if/else to import the new one or the old 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.
@xabbuh In fact this doesn't expect a fallback. For the AddConsoleCommandPass, we just added a conflict to the frameworkbundle so that it is always available (it was your suggestion#19443 (comment)). I started to do the same for the FormPass (#21283) and SerializerPass(#21293), is it ok to do the same here or should we fallback to the deprecated one and mute deprecation instead?
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.
You are right. Adding the conflict rule should be the solution here too.
| * file that was distributed with this source code. | ||
| */ | ||
| namespaceSymfony\Bundle\WebProfilerBundle\DependencyInjection; |
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 to theCompiler subnamespace.
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 I change only the namespace or move the file in a subdirectory ?
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.
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.
InAddConsoleCommandPass you were moving the file fromSymfony\Bundle\FrameworkBundle to the component.
Here I am moving the file fromSymfony\Bundle\FrameworkBundle toSymfony\Bundle\WebProfilerBundle.
After a short looking I figured that every "Bundle" in that namespace have a repositoryCompiler in thereDIfolder so I think in that case I should move it in a subfolder.
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.
Indeed, the Compiler subnamespace seems to concern bundles only, sorry.
chalasr commentedJan 21, 2017
#21284 should not be closed after this, it will only be partially fixed. |
Deamon commentedJan 21, 2017
@chalasr I updated the description to reflect that. |
Deamon commentedJan 21, 2017 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@xabbuh,@chalasr, I did a mistake while commiting validated fixes,this discussion still open |
chalasr left a comment
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 FrameworkBundle's composer.json needs a conflict rule for"symfony/web-profiler-bundle": "<3.3", and its changelog needs a mention for the deprecated pass.
9967d97 to904b3e8CompareDeamon commentedJan 22, 2017
The conflict line has been added in the composer.json file and a note in the changelog of the FrameworkBundle. |
| "phpdocumentor/type-resolver":"<0.2.0", | ||
| "symfony/console":"<3.3" | ||
| "symfony/console":"<3.3", | ||
| "symfony/web-profiler-bundle":"<3.3" |
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.
"symfony/web-profiler-bundle": "~3.3" must be added as dev requirement in addition of the conflict, that should make the build green.
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.
That's what I figured inyour comment.
The fix is coming.
3c7e18f toebe2b93Comparestof commentedJan 23, 2017
-1 for this. the configuration to enable the profiler itself is also part of FrameworkBundle. WebProfilerBundle is currently only responsible for building a UI for the profiler, not for integrating the profiler itself. |
chalasr commentedJan 24, 2017
fabpot commentedFeb 16, 2017
Closing as this is indeed wrong. |
Uh oh!
There was an error while loading.Please reload this page.
This MR is part of the#21284 todo list