Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call to undefined method ReflectionType::getName() #189

Open
fabrixxm opened this issue Jul 14, 2020 · 3 comments
Open

Call to undefined method ReflectionType::getName() #189

fabrixxm opened this issue Jul 14, 2020 · 3 comments

Comments

@fabrixxm
Copy link

commit dfcaaca reintroduce the call to ReflectionType::getName() which is't supported in php7.0 , while ReflectionType::__toString() is deprecated from php7.1.

composer.json currently states compatibility with php>=7.0.0

see previous issue #140

@Quix0r
Copy link

Quix0r commented Oct 7, 2020

A simple fix is to remove the corresponding ->getName() invocation for older PHP versions, somewhere around line 249.

@TRPB
Copy link
Member

TRPB commented Oct 7, 2020

Unfortunately there is no solution to this which supports PHP 7.0 and PHP 7.1+.

The solution is to fix composer.json to minimum version 7.1.

mundschenk-at added a commit to mundschenk-at/Dice that referenced this issue Mar 12, 2021
@mundschenk-at
Copy link

$param_type_name = PHP_VERSION_ID < 70100 ? $param->getType()->__toString() : $param->getType()->getName();
if (call_user_func("is_{$param_type_name}", $args[$i])) {

hirnsturm added a commit to hirnsturm/phing-typo3-deployer that referenced this issue Nov 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants