Skip to content

Keeping backward compatibility with legacy FlattenException usage #33941

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

Merged
merged 1 commit into from
Oct 11, 2019

Conversation

yceruto
Copy link
Member

@yceruto yceruto commented Oct 9, 2019

Q A
Branch? 4.4
Bug fix? yes
New feature? no
Deprecations? yes
Tickets Fix #33929
License MIT
Doc PR -

@@ -37,6 +39,11 @@ class FlattenException
private $file;
private $line;

public static function create(\Exception $exception, int $statusCode = null, array $headers = []): self
Copy link
Member Author

Choose a reason for hiding this comment

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

Restoring for a smooth migration, it can be deprecated in 5.1.

@@ -33,6 +33,7 @@
},
"autoload": {
"psr-4": { "Symfony\\Component\\ErrorRenderer\\": "" },
"classmap": [ "Resources/stubs/Exception/FlattenException.php" ],
Copy link
Member Author

Choose a reason for hiding this comment

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

this would fix the compiler error mentioned here #33929 (comment)

@yceruto yceruto force-pushed the flatten_exception_bc branch from 82a9e46 to 042575d Compare October 9, 2019 23:21
@fabpot
Copy link
Member

fabpot commented Oct 11, 2019

Thank you @yceruto.

fabpot added a commit that referenced this pull request Oct 11, 2019
…ption usage (yceruto)

This PR was merged into the 4.4 branch.

Discussion
----------

Keeping backward compatibility with legacy FlattenException usage

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | yes
| Tickets       | Fix #33929
| License       | MIT
| Doc PR        | -

Commits
-------

928363c Keeping backward compatibility with legacy FlattenException usage
@fabpot fabpot merged commit 928363c into symfony:4.4 Oct 11, 2019
@yceruto yceruto deleted the flatten_exception_bc branch October 11, 2019 11:07
@luchaninov
Copy link
Contributor

ugly quickfix. put to config/bundles.php before return ...

// TODO: remove after merge https://github.com/symfony/symfony/pull/33941
if (!class_exists(\Symfony\Component\Debug\Exception\FlattenException::class, false)) {
    class_alias(\Symfony\Component\ErrorRenderer\Exception\FlattenException::class, \Symfony\Component\Debug\Exception\FlattenException::class);
}

@nicolas-grekas nicolas-grekas modified the milestones: next, 4.4 Oct 27, 2019
This was referenced Nov 12, 2019
fnagel added a commit to fnagel/JMSJobQueueBundle that referenced this pull request Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New ErrorRenderer FlattenException not compatible with old one Debug FlattenException
5 participants