> Basically we shouldn't break any interfaces that are user-facing but
> we are free to change things internally as much as we want as long as the
> external interface is honored.

So how do you actually go about adding a feature that requires an
interface change?

Take for example the SessionHandler class, that implements
SessionHandlerInterface.

Now lets say you want to add functionality to the class that allows a
user to override create_sid, and provide user-generated session ids.
It doesn't make sense to add it to the class and not the interface, so
what do you do?

* Add to SessionHandlerInterface and break BC?
* Create SessionHandlerInterfaceEx that extends the original, and have
the the class implement that?
* Create SessionHandlerInterfaceEx that contains only the new method,
and have the class implement both interfaces?
* Add to the class, but do not touch the interface?

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to