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

How do I dependency Inject in Livewire? #360

Closed
Umar-Khan-Yousafzai opened this issue Oct 27, 2024 · 1 comment
Closed

How do I dependency Inject in Livewire? #360

Umar-Khan-Yousafzai opened this issue Oct 27, 2024 · 1 comment

Comments

@Umar-Khan-Yousafzai
Copy link

Hi, Ben Sampo,
First of all your project is extremely interesting and has helped me a lot. It works perfectly fine but now my company in doing a lot into coding structure and reducing the technical debt.

Now the problem arise in Livewire, that in the boot() function, I am using Dependency Injection, but when I do it with Enum it gives me error:

Code:
image

Error
image

Can you please let me know how can I resolve this? I have checked your instantiation code but it doesn't tell what to do in case of dependency Injection????

@spawnia
Copy link
Collaborator

spawnia commented Oct 28, 2024

Using this library is no longer recommended, especially for new projects. PHP 8.1 supports enums natively.
See #332.

To reduce technical debt, I recommend you to migrate to native PHP enums.

@spawnia spawnia closed this as not planned Won't fix, can't repro, duplicate, stale Oct 28, 2024
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

No branches or pull requests

2 participants