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

From: Date: Sun, 26 Feb 2017 06:14:08 +0000
Subject: Bug #74169 [NEW]: php still can't do anything right: unable to change types in overridden methods
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-207559@lists.php.net to get a copy of this message
From: deadlymark at usa dot com Operating system: PHP version: Irrelevant Package: Scripting Engine problem Bug Type: Bug Bug description:php still can't do anything right: unable to change types in overridden methods 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 bug report at https://bugs.php.net/bug.php?id=74169&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=74169&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=74169&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=74169&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=74169&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=74169&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=74169&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=74169&r=needscript Try newer version: https://bugs.php.net/fix.php?id=74169&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=74169&r=support Expected behavior: https://bugs.php.net/fix.php?id=74169&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=74169&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=74169&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=74169&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74169&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=74169&r=dst IIS Stability: https://bugs.php.net/fix.php?id=74169&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=74169&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=74169&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=74169&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=74169&r=mysqlcfg

« previous php.bugs (#207559) next »