Jeroen-G / autowire

🔌 Autowire and configure using PHP 8 Attributes in Laravel.
MIT License
21 stars 3 forks source link

fix: Make caching work with custom attributes #7

Closed bitwise-operators closed 2 years ago

bitwise-operators commented 2 years ago

When I added the custom attributes, I overlooked the fact that cache command does its own initialization of the Electrician, so it won't load the correct attributes.

This commit should fix that.

PS: I had a quick look at adding tests for the console commands, but since the package doesn't load a complete Laravel installation, testing Artisan commands is tricky. So for now, I'm afraid this is it.

Jeroen-G commented 2 years ago

I know about the tests for commands, that's a pain right now and I just make sure to keep as much domain logic out of them as possible.

Thanks 👍

bitwise-operators commented 2 years ago

If I have a spare weekend, I might give it another go, but for now it works.

Don't forget to push a 1.4.1 release tag when you have the time!

Regards.

Jeroen-G commented 2 years ago

Done!