Uploaded image for project: 'PHP Driver: Extension'
  1. PHP Driver: Extension
  2. PHPC-1307

Exception interface should extend Throwable on PHP 7+

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.6.0alpha2, 1.6.0
    • Affects Version/s: None
    • Component/s: 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:
            jmikola@mongodb.com Jeremy Mikola
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: