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

Fix named arguments when using facade #1002

Merged
merged 2 commits into from
Sep 28, 2023
Merged

Conversation

erikn69
Copy link
Contributor

@erikn69 erikn69 commented Sep 28, 2023

Named arguments don't work when using facade because of hardcoded args in __callStatic()

Alternative to #921
Demo: https://onlinephp.io/c/d34c3
lluminate/Support/Facades/Facade.php#L345-L353

I think there was a reason for this. But not 100% sure, probably with regards to multiple instances. #921 (comment)

This PR keeps multiple instances functionality


facade method conditional is no longer necessary, because it always pass thru, and PDF already validates that

if (! is_callable($callable)) {
throw new \UnexpectedValueException("Method PDF::{$method}() does not exist.");
}

throw new \UnexpectedValueException("Method [{$method}] does not exist on PDF instance.");

@barryvdh barryvdh merged commit a8bd9d9 into barryvdh:master Sep 28, 2023
24 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.

2 participants