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

Fix compatibility with PHP 7.4 #199

Merged
merged 2 commits into from Sep 24, 2019
Merged

Fix compatibility with PHP 7.4 #199

merged 2 commits into from Sep 24, 2019

Conversation

Rixafy
Copy link
Contributor

@Rixafy Rixafy commented Sep 24, 2019

  • bug fix
  • BC break? no (function is available since 7.1.0)

Function ReflectionType::__toString() is deprecated, use getName() instead.

Rixafy added 2 commits Sep 24, 2019
Function ReflectionType::__toString() is deprecated, use getName() instead.
@@ -178,6 +178,7 @@ private function prepareFilter(string $name): array
? new \ReflectionMethod($callback[0], $callback[1])
: new \ReflectionFunction($callback);
$this->_static[$name][1] = ($tmp = $ref->getParameters())
&& $tmp[0]->getType() !== null
Copy link

@mabar mabar Sep 24, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw, did you find why is it null at PHP 7.4?

Copy link
Contributor Author

@Rixafy Rixafy Sep 24, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that all tests failed, before getName function, it was casted to string, so it could not be null in if check

@dg
Copy link
Member

@dg dg commented Sep 24, 2019

Thanks

@dg dg merged commit 25f857e into nette:master Sep 24, 2019
1 check passed
dg pushed a commit that referenced this issue Sep 24, 2019
@Rixafy
Copy link
Contributor Author

@Rixafy Rixafy commented Sep 24, 2019

Thanks for merging so quick

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants