Exception interface should extend Throwable on PHP 7+

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Minor - P4
    • 1.6.0alpha2, 1.6.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In mongodb/mongo-php-driver#940, a.braun@voycer.com proposed having the driver's Exception interface extend Throwable on PHP 7+ to assist with static analysis warnings on @throws annotations using the interface. While classes cannot implement Throwable directly, interfaces can extend it in both internals and userland (much like Traversable) so we should consider doing this.

      It would have the added benefit of ensuring that no userland class implements this interface without also extending PHP's Exception or Error base classes.

              Assignee:
              Jeremy Mikola
              Reporter:
              Jeremy Mikola
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: