-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
Enhanced Router Compatibility (Including Livewire Support) And Filters For Early Service Container Overrides #291
Conversation
…e binding replacements
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey thanks for the PR! 🙏
This looks fantastic, and it's something I had been meaning to tackle. This is a great start for allowing users to override our classes. I'm not entirely sold on the use of WordPress filters here, but I'm willing to give it a shot for now.
But I do see room for some refactors to make it a little more readable for future me. 😅
Let me know if you want me to jump in and handle these edits or if you wanna tackle it.
Thanks again for the PR. I appreciate you digging into this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking great!
I won't have time to properly test this until later in the week, but it all looks good to me at the moment.
edit: except for the lint errors 😅 (i can fix that before i merge)
@QWp6t Anything I can do to help get this merged? |
I'm eager to test this! Same as broskees, Any way I can help to get this merged? |
Messed around with this a bit – are you able to save posts in the editor with custom routes enabled? I get an error due to the |
I'm playing with this and nope, I'm also not being able to save posts in the editor. Had to disable gutenberg to keep playing haha. |
@Log1x & @adriansalvatori I'll check that out now, and also resolve conflicts. |
@Log1x & @adriansalvatori - Sorted that out. Thank you and good catch. |
Hey @broskees, thanks for your work on this :) Unfortunately, on Radicle stack the This cause multiple error with Livewire bootstrapping, when issuing any refresh request, as it expect some methods from Illuminate request. Strange thing, Steps applied :
|
@tgeorgel have you found a solution? I'm not getting the error on Radicle, but while livewire component renders fine, I can't seem to interact with it. |
Hey @sammyaxe, I have the exact same situation as you, the render is working fine, it's on interaction with the component that the error is triggered (when the Livewire update route is called). I didn't find any solution as for now. |
@tgeorgel Thanks for pointing this out. I'll take a look soon and see if I can find a solution. |
🧑💻 Use `microtime()` for the route timestamp
Good work. I merged This PR is working nicely in my tests with a simple counter component in Livewire 3. We will have to look into implementing @QWp6t I'm not sure why a test is failing. When I test on my own with After that test is fixed, this can get merged in and we can continue polishing up things as needed in another PR as well as iron out Radicle support (if still necessary). EDIT: |
This PR is primarily focused on enhancing router compatibility in general, which also has the side benefit of Livewire being natively supported.
The key changes include:
boot
method andbootHttp
method in theApplication.php
file, which notably change the handling of requests and responses. Basically, the router now has a default "route" for WordPress requests, so all requests use the router. This more closely mirrors Laravel's native functionality and thus offers better compatibility with laravel packages (like Livewire).You can test these changes with a Livewire setup in an Acorn site. Please follow the steps below:
composer require illuminate/testing illuminate/queue illuminate/encryption livewire/livewire
APP_KEY
to a randomized 32-character string in your.env
file.wp acorn make:livewire Counter