hhvm icon indicating copy to clipboard operation
hhvm copied to clipboard

Exception getCode() is not final method

Open cagataygurturk opened this issue 12 years ago • 10 comments

In original PHP Exception class getCode() has final keyword, not overridable. But in HHVM it can be overriden. It's an incompability.

See: http://3v4l.org/j5h20

Related with #4379

cagataygurturk avatar Dec 03 '14 19:12 cagataygurturk

I will look at it.

hamidre13 avatar Dec 03 '14 22:12 hamidre13

@hamidre13: Have a look at http://php.net/manual/en/class.exception.php, there is probably more methods that need to be made final.

Majkl578 avatar Dec 04 '14 00:12 Majkl578

@Majkl578 : I will go through all of them. Thanks

hamidre13 avatar Dec 04 '14 00:12 hamidre13

Hmm, any particular reason why this was reverted? cc @paroski @JoelMarcey

Majkl578 avatar Dec 12 '14 16:12 Majkl578

@Majkl578 see #4382

paulbiss avatar Dec 12 '14 19:12 paulbiss

Yup I read that, this comment is older than the reply there.

Majkl578 avatar Dec 12 '14 19:12 Majkl578

Shouldn't this be re-opened?

steelbrain avatar Dec 12 '14 20:12 steelbrain

@steelbrain: We can re-open the issue, good point; but can't re-open the pull request yet until we decide on a good course of action here.

JoelMarcey avatar Dec 12 '14 21:12 JoelMarcey

Actually I do not understand why in Zend engine getCode() has final keyword. This incompatibility does not kill any cats in the world. Anyone that knows the rationale of final keyword in Zend engine?

cagataygurturk avatar Jun 05 '15 14:06 cagataygurturk

Since cleaning this up will be a mess, and it's probably not going to matter much in the end I'm going to close this issue. If anyone can think of a good reason this method needs to be final please comment below.

paulbiss avatar Sep 28 '16 23:09 paulbiss