-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disallow
trigger_error()
, which adds dangerous side-effects to PHP …
…projects As mentioned in detail in the patch, and experienced first-hand in at least 5 real-world projects so far, plus numerous packages within the doctrine ecosystem itself: > Do not use runtime errors as a way to convey deprecations to users. > Warnings, notices, and errors in general (which aren\'t exceptions) are not usable > in downstream projects, and propagate to global error handlers, causing massive issues > in anything relying on STDOUT, STDERR, aggressive logging, or just expects decent performance > from a dependency. In addition to that, introducing additional runtime effects is a potential > BC break I don't remember when we agreed adding any `@trigger_error()` calls to the codebase, but I remember for sure that I stated (clearly) that `@deprecated` is my preferred way, and even with its own limitations, it still is much simpler to deal with downstream (and from a maintenance PoV).
- Loading branch information
Showing
5 changed files
with
34 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters