Okipa / laravel-table

Generate tables from Eloquent models.
MIT License
533 stars 64 forks source link

V5 #81

Closed Okipa closed 2 years ago

Okipa commented 2 years ago

:point_right: See the upgrade guide

RSickenberg commented 2 years ago

I love the commits messages 😄

Okipa commented 2 years ago

@RSickenberg, here are some serious WIP commits here ! 🛠️

RSickenberg commented 2 years ago

@Okipa I never took the WIP this seriously until now! 💪🏼 , keep up the good work!

szepeviktor commented 2 years ago

Would you welcome a sed command that patches Larastan in CI?

szepeviktor commented 2 years ago

Here you are.

sed -i -e 's#.*protected \$enablesPackageDiscoveries.*#&\nprotected function overrideApplicationBindings($app){return["livewire"=>"Livewire\\\\LivewireManager"];}#' vendor/nunomaduro/larastan/src/ApplicationResolver.php
szepeviktor commented 2 years ago

💡 One of your computers has a non-GitHub email address set in git.

(many commits do not have your profile icon)

szepeviktor commented 2 years ago

Target class [livewire] does not exist.

This branch also has this error with Laravel v9.

https://github.com/Okipa/laravel-table/pull/98#issuecomment-1230309188 👀

Okipa commented 2 years ago

@szepeviktor, Yes, this is still the same unfixed Issue, unfortunately nor Larastan or Livewire opened discussions did got answers allowing to fix it.

szepeviktor commented 2 years ago

Changing the order of service provider registration would solve it.

Okipa commented 2 years ago

Changing the order of service provider registration would solve it.

In the TestCase? I tested that and it didn't change anything unfortunately.

Livewire is loaded before Laravel Table currently => https://github.com/Okipa/laravel-table/blob/v5/tests/TestCase.php#L46

szepeviktor commented 2 years ago

Livewire is loaded before Laravel Table currently

Yes. It seems like. But the stack trace tells otherwise: https://github.com/Okipa/laravel-table/pull/98#issuecomment-1230309188

Okipa commented 2 years ago

Yes. It seems like. But the stack trace tells otherwise: #98 (comment)

Well, it seems that I have no way to control the order of the service providers registration, isn't it ?

szepeviktor commented 2 years ago

I was researching it without results. There must be a Laravel forum where there are people with knowledge of Laravel internals.

szepeviktor commented 2 years ago

This would patch Larastan https://github.com/Okipa/laravel-table/pull/81#issuecomment-1229552922 until you reverse the order of service provider loading.