Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
TwigBundle 3.1 requiring Console 3.3 ? this looks wrong to me
Uh oh!
There was an error while loading. Please reload this page.
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.
Only to run tests with the last version of FrameworkBundle (https://travis-ci.org/symfony/symfony/jobs/191309256). Another option is to make FrameworkBundle requiring
console
. (There is probably a better solution).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.
well, either FraneworkBundle should require it, or it should not be broken when the component is not installed. Otherwise it is a BC break in FrameworkBundle, and TwigBundle is the wrong place to fix it (all projects depending on FrameworkBundle would have to do the same, which is wrong)
Uh oh!
There was an error while loading. Please reload this page.
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.
It was already the case for the templating component in 3.3. AFAIK we allow this kind of change (requiring to install a new dependency) and it's valid according to semver.
I'm not against adding Console as a hard dependency of FrameworkBundle, but I guess a goal of 3.3/Flex is to have less components installed by default when requiring framework-bundle. This change will go in the opposite direction.
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 issue is that FrameworkBundle always registers the compiler pass coming from the component. So it means that the component is required. There is no point making the dependency optional in composer when it is only optional if you never use the bundle
Uh oh!
There was an error while loading. Please reload this page.
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.
We can also duplicate the code of this helper in the component and in the bundle, but I'm not sure it's worth it.
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 discussion in the PR talked about skipping the compiler pass when the component compiler pass class does not exist.
Registering the compiler pass for console commands is useless if you don't have the console component anyway. The only case needing to take care is people using console without the pass in it, but this is solved easily by making FrameworkBundle conflict with
symfony/console < 3.3
.As long as you don't skip the registration, it is a mandatory requirement
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, your proposal is way better. See #21248. Closing this one.