Skip to content
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

Laravel 11 Support #1036

Merged
merged 2 commits into from
Mar 1, 2024
Merged

Laravel 11 Support #1036

merged 2 commits into from
Mar 1, 2024

Conversation

erikn69
Copy link
Contributor

@erikn69 erikn69 commented Feb 28, 2024

Closes #1034


Ref: laravel/framework#50260
PhpStan fails on Laravel 10.x, I could add a baseline rule

Error: Cannot call method make() on Illuminate\Contracts\Foundation\Application|null.
 ------ --------------------------------------------------- 
  Line   src/Facade/Pdf.php                                 
 ------ --------------------------------------------------- 
  53     Cannot call method make() on                       
         Illuminate\Contracts\Foundation\Application|null.  
 ------ --------------------------------------------------- 

@erikn69
Copy link
Contributor Author

erikn69 commented Feb 29, 2024

Laravel 10.x, 11.x

based on laravel/framework#50260 static::$app could be null
laravel/framework/src/Illuminate/Support/Facades/Facade.php#L327-L336

And __callStatic could throw RuntimeException
laravel/framework/src/Illuminate/Support/Facades/Facade.php#L345-L347

Also resolveFacadeInstance always validate it with if (static::$app) {
laravel/framework/src/Illuminate/Support/Facades/Facade.php#L229-L235

@barryvdh barryvdh merged commit 2f1fe26 into barryvdh:master Mar 1, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for Laravel 11
2 participants