-
-
Notifications
You must be signed in to change notification settings - Fork 311
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
PHP 8.0: CompiledContainer Mangling Named Parameters into Namespaced Ones #787
Comments
Hi, thanks for the report! It seems to be caused by opis/closure#90 and unfortunately I don't see any pull request to support that yet in opis/closure. |
@mnapoli looking into that issue, it looks like they did actually merge a fix for it into their 4.x branch, which is intended to support the new PHP 8.x features like this one. Is that 4.x branch already in use on the beta branch of PHP-DI? I wouldn't have any issue switching over to that for now. |
No currently PHP-DI uses v3. Maybe it could be possible to support v3 and v4 if they haven't changed the API that PHP-DI uses? |
@mnapoli I'm worried that may be the only way to actually take advantage of PHP 8.0-level features inside the closures that are compiled, since they've closed PRs that would add PHP 8.0 functionality to 3.x, saying those features were reserved exclusively for 4.x. The problem, though, is that 4.x seems to require the |
Oh… yeah very good point, thanks for bringing that up. I've asked for some clarification in opis/closure#59 (comment) as I see Laravel is also using opis/closure. |
Hello! I'm using PHP-DI 6.3.4 and we're in the process of updating our app to make better use of new PHP 8.0 best practices. I discovered when including the following code in my service definition:
...that the compiled container yielded this result:
This yields the error:
Presumably this is because it's detecting the named method argument as something it should be namespacing, which is causing parsing errors down the line.
The text was updated successfully, but these errors were encountered: