Commit 2ac73f2
Skip calling fake() when required parameters exist (Socialite compatibility) (#1746)
* Skip calling fake() on facades that require parameters (fix Socialite error)
The ide-helper attempted to invoke Facade::fake() unconditionally, which
breaks when a facade (such as Laravel Socialite) requires a mandatory
parameter in its fake() method signature. This resulted in an
ArgumentCountError during `php artisan ide-helper:generate`.
This patch adds a ReflectionMethod check and skips calling fake() when
required parameters are present, ensuring compatibility with Socialite
and preserving expected behavior for facades that support parameterless
faking.
* Update Alias.php
---------
Co-authored-by: Barry vd. Heuvel <[email protected]>1 parent c95825a commit 2ac73f2
1 file changed
+6
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
251 | 256 | | |
252 | 257 | | |
253 | 258 | | |
254 | 259 | | |
255 | 260 | | |
| 261 | + | |
256 | 262 | | |
257 | 263 | | |
258 | 264 | | |
259 | | - | |
260 | | - | |
261 | 265 | | |
262 | 266 | | |
263 | 267 | | |
| |||
0 commit comments