Bug #12934

Modify the Symfony sfException class to catch errors of type throwable

Added by Steve Breker 4 months ago. Updated 3 months ago.

Status:VerifiedStart date:04/02/2019
Priority:MediumDue date:
Assignee:-% Done:

0%

Category:Internals
Target version:Release 2.5.0
Google Code Legacy ID: Tested version:
Sponsored:No Requires documentation:

Description

This commit in the community maintained Symfony 1 should be mirrored into our vendor/symfony directory:

https://github.com/FriendsOfSymfony1/symfony1/commit/79fde1b9a5a6201f048c3ad72e99c5530e5316ee#diff-2ee5adc3515591869034ceeb060ba763

In PHP >= 7.0.0 exceptions have changed so that class Throwable is implemented by both Exception and now Error.

If we leave this code as-is, we will miss catching any Error type exceptions. Errors can now be thrown by PHP fatal errors, whereas Exceptions will be thrown by user code (AtoM).

http://php.net/manual/en/migration70.incompatible.php#migration70.incompatible.error-handling

History

#1 Updated by Mike Cantelon 4 months ago

  • Status changed from New to In progress
  • Assignee set to Mike Cantelon

#2 Updated by Mike Cantelon 4 months ago

  • Status changed from In progress to Code Review
  • Assignee deleted (Mike Cantelon)

#3 Updated by Steve Breker 4 months ago

  • Status changed from Code Review to Feedback

CR complete. Looks good!

#4 Updated by Mike Cantelon 4 months ago

  • Status changed from Feedback to QA/Review

Thanks Steve!

Merged into qa/2.5. for QA.

#5 Updated by Michelle Curran 4 months ago

  • Status changed from QA/Review to Verified

Verified in Ubuntu 16.04 and 18.04 envs.

#6 Updated by Dan Gillean 3 months ago

  • Category set to Internals

Also available in: Atom PDF