Skip to content

Incompatibility with Symfony 7.4 (beta) #57680

@jnoordsij

Description

@jnoordsij

Laravel Version

12.37.0

PHP Version

8.4.14

Database Driver & Version

n/a

Description

When trying to run Laravel with the Symfony 7.4 beta, see also https://github.com/symfony/symfony/releases/tag/v7.4.0-BETA1, issues arise.

Steps To Reproduce

Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Nothing to install, update or remove
Generating optimized autoload files
> 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]);

  1   vendor\symfony\console\Application.php:1087
      Illuminate\Console\Command::run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

  2   vendor\symfony\console\Application.php:356
      Symfony\Component\Console\Application::doRunCommand(Object(Illuminate\Foundation\Console\PackageDiscoverCommand), 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
  • Run php artisan serve, result is:

   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]);

  1   vendor\symfony\console\Application.php:1087
      Illuminate\Console\Command::run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

  2   vendor\symfony\console\Application.php:356
      Symfony\Component\Console\Application::doRunCommand(Object(Illuminate\Foundation\Console\ServeCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleO
utput))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions