The current way of deprecation functionality is the following: Add
@deprecated as of ... to our function signatures/classes.
This has a couple of disadvantages:
- Its really just documentation, nothing happens on runtime
- Its not covering all usecases, like a different (maybe additional) parameter to a function/value of a parameter
@trigger_error($message, E_USER_DEPRECATED);. With the @ the error is hidden by default.
https://github.com/symfony/phpunit-bridge thought provides an error handler which makes those deprecation errors visible in tests.
With that we gain both the possiblity to slowly deprecate stuff, while migrating them over time, but still a way to ensure that those are actually thrown. The bridge adds some test helpers for it.
User interface changes