Replies: 1 comment
-
| 
         I solved it by running the following command: 
 It seems that the error occurs because a cached file tries to access a method which is not available, cleaning it is solved.  | 
  
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
Livewire PowerGrid version
v6.4
Livewire version
v3.1
Laravel version
v12.31.1
Which PHP version are you using?
PHP 8.4
Which Theme are you using?
Tailwind
Have you published the resource files and customized them? (php artisan vendor:publish)
Yes
What is the problem?
After upgrading to PHP 8.4, using PowerGrid with a datasource() that accidentally returns a collection or array instead of an Eloquent query builder now throws the following fatal error:
method_exists(): Argument #1 ($object_or_class) must be of type object|string, array givenThis was not crashing under earlier PHP versions (PHP 8.2 / 8.3), but PHP 8.4 appears to be stricter and fails immediately.
Code snippets
method_exists(): Argument #1 must be of type object|string, array givenHow do you expect it to work?
Ideally PowerGrid should gracefully handle this case, either:
Please confirm (incomplete submissions will not be addressed)
Beta Was this translation helpful? Give feedback.
All reactions