From dad55d533874349bbf425033daebcfa26f43f9d8 Mon Sep 17 00:00:00 2001 From: Watheq Alshowaiter Date: Thu, 18 Jul 2024 17:45:32 +0300 Subject: [PATCH] chore:change post-autoload-dump for backward compatibility for laravel 6 --- .github/workflows/temp-test-laravel-6.yml | 47 +++++++++++++++++++++++ composer.json | 2 +- 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/temp-test-laravel-6.yml diff --git a/.github/workflows/temp-test-laravel-6.yml b/.github/workflows/temp-test-laravel-6.yml new file mode 100644 index 0000000..ab23f85 --- /dev/null +++ b/.github/workflows/temp-test-laravel-6.yml @@ -0,0 +1,47 @@ +name: run-tests + +on: + workflow_dispatch: + +jobs: + test-laravel-6: + runs-on: ${{ matrix.os }} + timeout-minutes: 5 + strategy: + fail-fast: true + matrix: + os: [ubuntu-latest] + stability: [prefer-stable] + include: + - laravel: 6.* + testbench: 4.* + php: 7.4 + + name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo + coverage: none + + - name: Setup problem matchers + run: | + echo "::add-matcher::${{ runner.tool_cache }}/php.json" + echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" + + - name: Install dependencies + run: | + composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update + composer update --${{ matrix.stability }} --prefer-dist --no-interaction + + - name: List Installed Dependencies + run: composer show -D + + - name: Execute tests + run: vendor/bin/phpunit diff --git a/composer.json b/composer.json index 72f09e0..96a10b1 100644 --- a/composer.json +++ b/composer.json @@ -53,7 +53,7 @@ "clear": "@php vendor/bin/testbench package:purge-model-required-fields --ansi", "prepare": "@php vendor/bin/testbench package:discover --ansi", "build": [ - "@composer run prepare", + "@composer run dump-autoload", "@php vendor/bin/testbench workbench:build --ansi" ], "start": [