Re: [PHP-DEV] Backwards compatibility with set_exception_handler callback and type hints

2015-03-31 Thread James Gilliland
That is a stellar response Dan, Thanks for being so clear. I had a feeling that this might be the case so we'll have to work around it. Just for clarity and posterity I provided the simplest test case in the original email not the actual problem. In Drupal this isn't just one place though becase,

Re: [PHP-DEV] Backwards compatibility with set_exception_handler callback and type hints

2015-03-31 Thread Dan Ackroyd
Hi James, On 31 March 2015 at 21:51, James Gilliland wrote: > By design, \EngineException does not extend \Exception so code doesn't > accidentally catch this special type of exception. ... > > I don't know if this is all acceptable and/or by design but it is awkward > so I wanted to bring it to

[PHP-DEV] Backwards compatibility with set_exception_handler callback and type hints

2015-03-31 Thread James Gilliland
So testing out PHP 7 I triggered an \EngineException() in Drupal 8. For various reasons that don't really matter here Drupal uses set_exception_handler() to provide its own exception handler. What is important is that the methods used by that handler type hint \Exception for their arguments. The im

[PHP-DEV] Backwards compatibility

2004-11-08 Thread D . Kingma
Hi All, BC is a good thing when you want to keep maintenance down and developers happy but sometimes stalls progression. When there are bugs in the code that have been there for a while, chances are that they will stay there forever for BC reasons. The latest example is the postgreSQL driver, but