Skip to content

Conversation

@WentTheFox
Copy link

@WentTheFox WentTheFox commented Dec 9, 2025

Summary

The helper generation breaks when the Laravel\Socialite\Socialite facade's fake method (introduced in laravel/socialite#756) is being called by the IDE helper, because the method has a required argument. In PHP 8.5 this causes an ArgumentCountError as seen below:

> Illuminate\Foundation\ComposerScripts::postUpdate
> @php artisan ide-helper:generate

   ArgumentCountError 

  Too few arguments to function Laravel\Socialite\Socialite::fake(), 0 passed in vendor/barryvdh/laravel-ide-helper/src/Alias.php on line 254 and at least 1 expected

  at vendor/laravel/socialite/src/Socialite.php:39
     35▕      * @param  string  $driver
     36▕      * @param  \Laravel\Socialite\Contracts\User|\Closure|array|null  $user
     37▕      * @return \Laravel\Socialite\Testing\SocialiteFake
     38▕      */
  ➜  39▕     public static function fake(string $driver, $user = null)
     40▕     {
     41▕         $root = static::getFacadeRoot();
     42▕ 
     43▕         if ($root instanceof SocialiteFake) {

      +18 vendor frames 

  19  artisan:35
      Illuminate\Foundation\Console\Kernel::handle()

Script @php artisan ide-helper:generate handling the post-update-cmd event returned with error code 1
ArgumentCountError screenshot

The goal of this change is to fully ignore the error so the ide-helper:generate command can complete without crashing, as it seems the missing catch block causes the error to be thrown despite being wrapped in try.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • Existing tests have been adapted and/or new tests have been added
  • Update the README.md
  • Code style has been fixed via composer fix-style

@Orrison
Copy link

Orrison commented Dec 9, 2025

Seeing this issue as well

@FallenKnight85
Copy link

Experiencing this issue as well

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.

3 participants