Re: Proposal: Introduction of InvalidStateException

From: Date: Thu, 17 Oct 2013 14:57:37 +0000
Subject: Re: Proposal: Introduction of InvalidStateException
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-69630@lists.php.net to get a copy of this message
On Thu, Oct 17, 2013 at 4:43 PM, guilhermeblanco@gmail.com < guilhermeblanco@gmail.com> wrote: > Ferenc, > > How much of this is PHP willing to take as BC break? > Like changing from one Exception to another (UnderflowException to > RuntimeException) and removing OutOfRangeException because it is ambiguous > seems very hard fro PHP to take in a PHP 5.6 for example. > > I may have some time to try something, but I wouldn't spend time just for > the sake of doing if it's gonna be rejected later. > > Cheers, > > The current release process (https://wiki.php.net/rfc/releaseprocess) wouldn't allow it in 5.6, but one could argue that: 1, the usage of these exceptions not that wide-spread 2, the upgrade path (in your example) is pretty simple, replace every occurance of UnderflowException to RuntimeException in your codebase, (I would also argue to not remove OutOfRangeException, but rename it as we already have that used in spl and php code out there could also use it already), we could even provide tools to help the migration. but, this is really a hard topic, because it is more of a semantic issue, and that is a bit weak argument for breaking BC, so this would require a really thought-out RFC and the voters could still say no. I think the actual implementation/patch would be really simple, so the hard part of the task is to figure out the proper naming and hierarchy. -- Ferenc Kovács @Tyr43l - http://tyrael.hu

« previous php.internals (#69630) next »