Skip to content

Call to a member function make() on null #57955

@UtkuDalmaz

Description

@UtkuDalmaz

Laravel Version

12.40.2

PHP Version

8.4.15

Database Driver & Version

No response

Description

After I upgraded to Laravel version 12.40.2 I started getting


> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi

   Error 

  Call to a member function make() on null

  at vendor/laravel/framework/src/Illuminate/Console/Command.php:171
    167▕      */
    168▕     #[\Override]
    169▕     public function run(InputInterface $input, OutputInterface $output): int
    170▕     {
  ➜ 171▕         $this->output = $output instanceof OutputStyle ? $output : $this->laravel->make(
    172▕             OutputStyle::class, ['input' => $input, 'output' => $output]
    173▕         );
    174▕ 
    175▕         $this->components = $this->laravel->make(Factory::class, ['output' => $this->output]);

      +4 vendor frames 

  5   artisan:35
      Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1

Downgrading to 12.40.0 fixed the issue

Steps To Reproduce

composer install

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions