Skip to content

Fix compatibility with PHP 7.4 - #199

Merged
dg merged 2 commits into
nette:masterfrom
delacry:patch-1
Sep 24, 2019
Merged

Fix compatibility with PHP 7.4#199
dg merged 2 commits into
nette:masterfrom
delacry:patch-1

Conversation

@delacry

@delacry delacry commented Sep 24, 2019

Copy link
Copy Markdown
Contributor
  • bug fix
  • BC break? no (function is available since 7.1.0)

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

Function ReflectionType::__toString() is deprecated, use getName() instead.
? new \ReflectionMethod($callback[0], $callback[1])
: new \ReflectionFunction($callback);
$this->_static[$name][1] = ($tmp = $ref->getParameters())
&& $tmp[0]->getType() !== null

Copy link
Copy Markdown

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
Copy Markdown
Contributor Author

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

dg commented Sep 24, 2019

Copy link
Copy Markdown
Member

Thanks

@dg
dg merged commit 25f857e into nette:master Sep 24, 2019
dg pushed a commit that referenced this pull request Sep 24, 2019
@delacry

delacry commented Sep 24, 2019

Copy link
Copy Markdown
Contributor Author

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants