phpspec / prophecy

Highly opinionated mocking framework for PHP 5.3+
MIT License
8.53k stars 241 forks source link

Make Prophecy Exceptions throwable #519

Closed ciaranmcnulty closed 3 years ago

ciaranmcnulty commented 3 years ago

Constrains implementors of the interface to actually be Throwables. This prevents potential errors, and static analysis warnings when catching the interface (as the interface isn't itself throwable previously).

This wasn't possible in PHP 5, but we no longer support it. As a result getMessage does not need to be part of the interface, but also can't be mocked in tests