sail: Unable to start due to missing PHP Redis Extension
- Sail Version: 1.12.9
- Laravel Version: 8.74.0
- PHP Version: 8.0
- OS: Windows 10
Description:
All of our docker installs throughout the company are failing due to PHP Redis not being available inside the docker image.
C:\WORKINGPATH>docker run --rm -v "C:\Projects\Dashboard:/opt" -w /opt laravelsail/php80-composer:latest composer install --ignore-platform-reqs
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Nothing to install, update or remove
Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead.
Generating optimized autoload files
composer/package-versions-deprecated: Generating version class...
composer/package-versions-deprecated: ...done generating version class
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
LogicException
Please make sure the PHP Redis extension is installed and enabled.
at vendor/laravel/framework/src/Illuminate/Redis/Connectors/PhpRedisConnector.php:77
73▕ protected function createClient(array $config)
74▕ {
75▕ return tap(new Redis, function ($client) use ($config) {
76▕ if ($client instanceof RedisFacade) {
➜ 77▕ throw new LogicException(
78▕ extension_loaded('redis')
79▕ ? 'Please remove or rename the Redis facade alias in your "app" configuration file in order to avoid collision with the PHP Redis extension.'
80▕ : 'Please make sure the PHP Redis extension is installed and enabled.'
81▕ );
+21 vendor frames
22 [internal]:0
Illuminate\Foundation\Application::Illuminate\Foundation\{closure}(Object(Laravel\Telescope\TelescopeServiceProvider))
+5 vendor frames
28 artisan:37
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
Trying to run using the following batch file -
docker run --rm -v "%cd%:/opt" -w /opt laravelsail/php80-composer:latest composer install --ignore-platform-reqs
Steps To Reproduce:
Try to run the above command using Docker, downloads latest image, then fails to run due to PHP-Redis being missing. Happening on 4 developer machines at present.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15 (6 by maintainers)
I’m also experience the error. In my case the problem is that
phpfor some reason is 8.1 instead of 8.0After
sail build --no-cache && sail up:Sail Version: 1.13 Laravel Version: 8.77.1 OS: Windows 10 + WSL2
docker-compose.yml: