From 6540ed440225cadf0f3189aae47d7d901596caa8 Mon Sep 17 00:00:00 2001 From: Joris Slagter Date: Tue, 2 Dec 2025 20:11:49 +0100 Subject: [PATCH] Fix: Create Laravel environment before composer install Laravel requires .env file and storage directories during composer install when running 'php artisan package:discover'. This fix: 1. Creates .env from .env.example (or minimal .env if missing) 2. Creates required storage directories (framework/cache, sessions, views, logs) 3. Creates bootstrap/cache directory 4. Generates APP_KEY after composer install This resolves the InvalidArgumentException: 'Please provide a valid cache path' error that occurs in Illuminate/View/Compilers/Compiler.php:36 --- .drone.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.drone.yml b/.drone.yml index 2dfd14b..4afd624 100644 --- a/.drone.yml +++ b/.drone.yml @@ -10,7 +10,12 @@ steps: - apt-get update && apt-get install -y libzip-dev - docker-php-ext-install exif zip - curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer --version=2.2.24 + - cp .env.example .env || echo "APP_KEY=" > .env + - mkdir -p storage/framework/{cache,sessions,views} + - mkdir -p storage/logs + - mkdir -p bootstrap/cache - composer install --prefer-dist --no-progress --no-interaction + - php artisan key:generate - composer validate --strict - echo "✓ Composer validation passed" # Uncomment when tests are ready: