opcodesio / log-viewer

Fast and beautiful Log Viewer for Laravel
https://log-viewer.opcodes.io
MIT License
3.39k stars 237 forks source link

Support Laravel 11 #323

Closed luanfreitasdev closed 4 months ago

luanfreitasdev commented 5 months ago

This PR adds the possibility of supporting Laravel 11 in the log viewer. I have some doubts regarding support so I opened PR with tests failing.

Is there a possibility that a change supported by Laravel 11 breaks the others (9, 10) and PHP 8.0, 8.1?

This Pull Request can be closed at any time by the log viewer team if it is not a priority or if it can be different or can also be worked on together

luanfreitasdev commented 4 months ago

I believe the main change in this project was the break in structure between carbon v2 and v3

*Some solutions I found:

To compare:

Version 2: https://github.com/briannesbitt/Carbon/blob/57fbbf88ce332f6da4e5aa1ea7524ef1caebb9e4/src/Carbon/CarbonInterface.php#L4958

Version 3 https://github.com/briannesbitt/Carbon/blob/1bf13e0f69f405c1eb8e59783f55853a6710da7a/src/Carbon/CarbonInterface.php#L4555

arukompas commented 4 months ago

hey @luanfreitasdev thanks for the PR! Would be great to have Log Viewer ready before L11 release.

First of all, I think you may have misunderstood the intention of the log-viewer.timezone configuration value, which I've explained in a comment above. With that in mind, I think the changes related to how the timezone is set should be reverted.

Second, there were a few changes to the GitHub Actions workflow that I think were unnecessary :)

And lastly, is there a resource on Laravel 11 and its changes/requirements already that I can double-check before merging the PR?

luanfreitasdev commented 4 months ago

@arukompas . I added the main corrections, removing the time zone when creating the Carbon object and adding it later using setTimezone.

Github's actions have been rolled back.

I didn't understand the last point. Did you mean do we have anything else to look forward to before Laravel 11?

arukompas commented 4 months ago

@luanfreitasdev great, thanks for the changes! Missed a few, noted above.

As for the last part of what I meant. I don't know if there will be any breaking changes in Laravel 11. Are you aware of any? If so, where can I find them? If not then it's fine :)

luanfreitasdev commented 4 months ago

Hello, @arukompas !. I believe there is nothing significant in the case of the logs

arukompas commented 4 months ago

hey @luanfreitasdev , just one more issue mentioned above in the un-resolved comment :) We're almost there!

luanfreitasdev commented 4 months ago

Good reviewer 🔥

arukompas commented 4 months ago

@luanfreitasdev big thanks, v3.4.0 tagged with support for Laravel 11! 🎉

All tests are passing everywhere.

Screenshot 2024-02-14 at 17 13 46