Req #79623 [NEW]: method_exists() is too strict in PHP 8

From: Date: Sun, 24 May 2020 09:59:17 +0000
Subject: Req #79623 [NEW]: method_exists() is too strict in PHP 8
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-227140@lists.php.net to get a copy of this message
From: nicolasgrekas Operating system: PHP version: master-Git-2020-05-24 (Git) Package: *General Issues Bug Type: Feature/Change Request Bug description:method_exists() is too strict in PHP 8 Description: ------------ While working on making Symfony compatible with PHP 8, we're noticing a lot of failure that look like: TypeError: method_exists(): Argument #1 ($object_or_class) must be of type object|string, XXX given See e.g. https://travis-ci.org/github/symfony/symfony/jobs/690567745 Can we relax method_exists() and make it accept any value as 1st arg? None of the changes needed to remove these errors look valuable. This would lower the cost of migrating to PHP 8 for the community at large. (Symfony is just an early adopter here.) Thanks for considering! -- Edit bug report at https://bugs.php.net/bug.php?id=79623&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=79623&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=79623&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=79623&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=79623&r=needscript Try newer version: https://bugs.php.net/fix.php?id=79623&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=79623&r=support Expected behavior: https://bugs.php.net/fix.php?id=79623&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=79623&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=79623&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=79623&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=79623&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=79623&r=dst IIS Stability: https://bugs.php.net/fix.php?id=79623&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=79623&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=79623&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=79623&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=79623&r=mysqlcfg

« previous php.bugs (#227140) next »