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

Cannot use standalone "illuminate/collections" package after upgrading to 11.35 #53867

Closed
carlalexander opened this issue Dec 12, 2024 · 0 comments · Fixed by #53871
Closed
Assignees
Labels

Comments

@carlalexander
Copy link
Contributor

Laravel Version

11.35

PHP Version

8.3.13

Database Driver & Version

No response

Description

I use the illuminate/collections as a standalone package a lot. (Thank you for that!)

During the release of the 11.35, a new functions.php file was added with the enum_value function in it. That function depends on the transform function in illuminate/support which isn't a dependency of illuminate/collections. This leads to this error:

PHP Fatal error:  Uncaught Error: Call to undefined function Illuminate\Support\transform() in /home/runner/.composer/vendor/illuminate/collections/functions.php:20

I'm not sure what the fix is here because illuminate/support has a dependency on illuminate/collections which would make it a cyclical dependency if we add illuminate/support as a dependency. It might be wroth trying to implement enum_value without using transform.

Steps To Reproduce

You can view the issue if you do a standalone install of illuminate/collections and navigate to functions.php in your IDE. You can see there's no definition for transform.

@carlalexander carlalexander changed the title Cannot use "illuminate/collections" package starting after upgrading to 11.35 Cannot use "illuminate/collections" package after upgrading to 11.35 Dec 12, 2024
@carlalexander carlalexander changed the title Cannot use "illuminate/collections" package after upgrading to 11.35 Cannot use standalone "illuminate/collections" package after upgrading to 11.35 Dec 12, 2024
@crynobone crynobone self-assigned this Dec 12, 2024
@crynobone crynobone added the bug label Dec 12, 2024
crynobone added a commit that referenced this issue Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants