Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[TwigBundle] Add missing dev dependency to console #21246

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions 1 src/Symfony/Bundle/TwigBundle/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"twig/twig": "~1.28|~2.0"
},
"require-dev": {
"symfony/console": "~3.3",
Copy link
Member

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

Copy link
Member Author

@dunglas dunglas Jan 12, 2017

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

Copy link
Member

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)

Copy link
Member Author

@dunglas dunglas Jan 12, 2017

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.

Copy link
Member

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

Copy link
Member Author

@dunglas dunglas Jan 12, 2017

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.

Copy link
Member

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

Copy link
Member Author

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.

"symfony/stopwatch": "~2.8|~3.0",
"symfony/dependency-injection": "~2.8|~3.0",
"symfony/expression-language": "~2.8|~3.0",
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.