Skip to content

[FrameworkBundle] Require symfony/debug #32270

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 src/Symfony/Bundle/FrameworkBundle/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"ext-xml": "*",
"symfony/cache": "^4.3|^5.0",
"symfony/config": "^4.2|^5.0",
"symfony/debug": "^4.4|^5.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be in the require-dev section instead?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That wouldn't fix the issue then as the dev dependencies are only applied if they are part of the root project's composer.json file.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also update the FB recipe (public/index.php) and check by class_exists(Debug::class) too? inline with the bin/console recipe.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this should be part of the https://github.com/symfony/skeleton/blob/master/composer.json instead? in require-dev?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe with #32270 (comment) we solve the issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main problem are the existing applications. Especially because you get a fully white page (500 error) since the ErrorCatcher error handler and exception hander were never registered.

I guess Flex can update the front controller index.php file but is it automatic ? Checking if the class exists would make the error disappear but that would change the default current behavior. That would mean that every project would need to require symfony/debug manually. That would be better but I guess that implies a lot of communication.

AFAIK, Flex cannot add a dependency to the composer.json file right?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, It wouldn't solve the problem for actual projects updating to 4.4, but new projects. Meanwhile, let's fix it for the new ones.

"symfony/dependency-injection": "^4.4|^5.0",
"symfony/error-catcher": "^4.4|^5.0",
"symfony/http-foundation": "^4.3|^5.0",
Expand Down