laravel / octane

Supercharge your Laravel application's performance.
https://laravel.com/docs/octane
MIT License
3.75k stars 291 forks source link

Log [deprecations] is not defined "laravel.EMERGENCY" error when using Laravel Octane #944

Closed vincemammoliti closed 2 weeks ago

vincemammoliti commented 2 weeks ago

Octane Version

2.5.4

Laravel Version

11.21.0

PHP Version

8.3

What server type are you using?

FrankenPHP

Server Version

1.2.5

Database Driver & Version

No response

Description

When using Laravel Octane with FrankenPHP on a new Laravel project, a "laravel.EMERGENCY" error is logged to the default laravel.log file when a deprecation warning is hit.

The error message is: laravel.EMERGENCY: Unable to create configured logger. Using emergency logger. {"exception":"[object] (InvalidArgumentException(code: 0): Log [deprecations] is not defined. at /var/www/html/vendor/laravel/framework/src/Illuminate/Log/LogManager.php:231)

Without Laravel Octane installed, there is no such error.

Steps To Reproduce

  1. Install new Laravel project following "Sail on Linux" documented instructions:

    curl -s "https://laravel.build/example-app" | bash
    cd example-app
    ./vendor/bin/sail up
  2. Force a deprecation warning, for example:

    Route::get('/', function () {
    // Expected deprecation on "subject" being null.
    preg_match('/test/i', null);
    
    return view('welcome');
    });
  3. Visit http://localhost and notice no error logged to laravel.log.

  4. Now, install Laravel Octane with FrankenPHP following documented instructions:

    
    ./vendor/bin/sail composer require laravel/octane
    ./vendor/bin/sail artisan octane:install --server=frankenphp

// Add environment variables to docker-compose.yml: services: laravel.test: environment: SUPERVISOR_PHP_COMMAND: "/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan octane:start --server=frankenphp --host=0.0.0.0 --admin-port=2019 --port=80" XDG_CONFIG_HOME: /var/www/html/config XDG_DATA_HOME: /var/www/html/data


5. Visit http://localhost and notice the `laravel.EMERGENCY` error logged to `laravel.log`.
driesvints commented 2 weeks ago

Hey there,

Can you first please try one of the support channels below? If you can actually identify this as a bug, feel free to open up a new issue with a link to the original one and we'll gladly help you out.

Thanks!