Bug #74169 [Opn->Dup]: php still can't do anything right: unable to change types in overridden methods

From: Date: Sun, 26 Feb 2017 12:10:17 +0000
Subject: Bug #74169 [Opn->Dup]: php still can't do anything right: unable to change types in overridden methods
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-207563@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=74169&edit=1 ID: 74169 Updated by: nikic@php.net Reported by: deadlymark at usa dot com Summary: php still can't do anything right: unable to change types in overridden methods -Status: Open +Status: Duplicate Type: Bug Package: Scripting Engine problem PHP Version: Irrelevant Block user comment: N Private report: N New Comment: Duplicate of bug #73010. Previous Comments: ------------------------------------------------------------------------ [2017-02-26 12:04:39] spam2 at rhsoft dot net some feedback from a user: you are not capable to write a bugreport, in no way > expected result: i expect php to not s***k if you are too stupid to at least give the exact error message creep away! > are you aware that the vast majority don't care about performance improvements *you* are *not* the majority ------------------------------------------------------------------------ [2017-02-26 06:13:59] deadlymark at usa dot com Description: ------------ i am so pissed by it. we were so excited to write php 7 only code, but yet again php failed to provide a feature complete result and we are still forced to use annotations. changing the return type to a sub-type or parameter types to super types (aka type variance) in overridden methods is one of the most basic features of a decent type system, but it still isn't there!! it's been actual decades and the language it's still basically the same. i have heard good things about php7 and i couldn't wait to use it but again it's still the same old f****g piece of s**t. you are fooling yourselves, in the real world nobody gives a s**t about "group use declarations". are you aware that the vast majority don't care about performance improvements and that they just want a language that is consistent and pleasant to work with? wake up and get your s**t together, please Test script: --------------- class A{ public function method(): A{} } class B extends A{ public function method(): B{} } Expected result: ---------------- expected result: i expect php to not s***k Actual result: -------------- actual result: php s***s ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=74169&edit=1

« previous php.bugs (#207563) next »