Skip to content

Fixes use of deprecated function each - #1

Open
Arul- wants to merge 1 commit into
Kdyby:masterfrom
Arul-:patch-1
Open

Fixes use of deprecated function each#1
Arul- wants to merge 1 commit into
Kdyby:masterfrom
Arul-:patch-1

Conversation

@Arul-

@Arul- Arul- commented Jun 10, 2020

Copy link
Copy Markdown

the function each is deprecated since PHP 7.2 This pull request fixes that by replacing each with current and next

the function `each` is deprecated since PHP 7.2  This pull request fixes that by replacing `each` with `current` and `next`
@majermi4

Copy link
Copy Markdown

I just found out about this library and would like to use it but this issue forces me to fork it. Would it be possible to merge this at some point? :-)

1 similar comment
@majermi4

Copy link
Copy Markdown

I just found out about this library and would like to use it but this issue forces me to fork it. Would it be possible to merge this at some point? :-)

@moussaclarke

moussaclarke commented Sep 16, 2021

Copy link
Copy Markdown

In case this helps anyone - this fix doesn't address the tokenizer changes in PHP8, just the each function deprecation, so the library is still not functional in PHP8 with this patch.

In any case this library is no longer needed, just use https://github.com/nette/utils instead.

The relevant method, which was originally in nette/DI, is now part of nette/utils, is public and also PHP 8 compatible. See https://github.com/nette/utils/blob/master/src/Utils/Reflection.php

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