Skip to content

Lumen Exception Handler is not compatible with Symfony 4.4 (when it goes stable) #935

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
crynobone opened this issue Jul 1, 2019 · 9 comments
Labels

Comments

@crynobone
Copy link
Member

crynobone commented Jul 1, 2019

  • Lumen Version: 5.8.x
  • Laravel Version: 5.8.x
  • PHP Version: any supported version
  • Database Driver & Version: N/A

Description:

Lumen 5.8 allows installation of symfony/debug 4.4 which introduce a deprecation and removal of Symfony\Component\Debug\ExceptionHandler::getContent() and this is not detected by Travis due to prefer-stable=true.

Steps To Reproduce:

Remove prefer-stable=true, run composer update and execute phpunit.

@driesvints
Copy link
Member

driesvints commented Jul 2, 2019

@crynobone can you point to the PR where that change was made? I can't find any info on it 🤔

@crynobone
Copy link
Member Author

symfony/symfony@7057244

From symfony example, they been changing it to use Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer to get the body and stylesheet. Not sure if we want to follow that or replicate how Laravel does it.

@crynobone
Copy link
Member Author

Here's the PR symfony/symfony#31065 for more detail

@driesvints
Copy link
Member

Urgh. This is unfortunate. I guess we'd better wait until 4.4 is out and then implement the changes?

@driesvints
Copy link
Member

@crynobone I can't spot the removal of the getStylesheet and getContent methods in that commit/pr. Are you sure this is the commit?

@crynobone
Copy link
Member Author

Screen Shot 2019-07-04 at 9 33 18 PM

Are you sure this is the commit?

Bottomline, it's not there anymore. I don't have enough effort to search each commit. Symfony plans to introduce ErrorCatcher component and deprecate Debug, and they didn't move getContent() to the new class.

@driesvints
Copy link
Member

@crynobone no problem. I've found the commit and left a message on the PR.

https://github.com/symfony/symfony/pull/31065/files#diff-facc3bcdbfaa88c930890ad4713b187dL213

@crynobone
Copy link
Member Author

crynobone commented Sep 9, 2019

Screen Shot 2019-09-10 at 6 39 42 AM

From the response it seem that Symfony team is moving forward with the Breaking Changes.

I read it wrongly. this should be solved now.

@amosmos
Copy link

amosmos commented Apr 20, 2023

Hi, This seems to not work indeed..
I am getting this error: The "Symfony\Component\Debug\ExceptionHandler" class is deprecated since Symfony 4.4, use "Symfony\Component\ErrorHandler\ErrorHandler" instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants