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 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

This comment has been minimized.

Copy link
@mabar

mabar Sep 24, 2019

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

This comment has been minimized.

Copy link
@Rixafy

Rixafy Sep 24, 2019

Author Contributor

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

@dg

This comment has been minimized.

Copy link
Member

dg commented Sep 24, 2019

Thanks

@dg dg merged commit 25f857e into nette:master Sep 24, 2019
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
dg added a commit that referenced this pull request Sep 24, 2019
@Rixafy

This comment has been minimized.

Copy link
Contributor Author

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
Projects
None yet
3 participants
You can’t perform that action at this time.