From ef63fcaa9dae620d5a1f44356ad218d4ca1f26cd Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Tue, 3 Sep 2024 14:55:11 +0200 Subject: [PATCH] PHP 8.4 build --- .github/workflows/databases-nightly.yml | 97 --------- .github/workflows/databases.yml | 278 ------------------------ .github/workflows/queues.yml | 164 -------------- .github/workflows/static-analysis.yml | 43 ---- .github/workflows/tests.yml | 138 ++++++------ 5 files changed, 69 insertions(+), 651 deletions(-) delete mode 100644 .github/workflows/databases-nightly.yml delete mode 100644 .github/workflows/databases.yml delete mode 100644 .github/workflows/queues.yml delete mode 100644 .github/workflows/static-analysis.yml diff --git a/.github/workflows/databases-nightly.yml b/.github/workflows/databases-nightly.yml deleted file mode 100644 index 12f7b87352c6..000000000000 --- a/.github/workflows/databases-nightly.yml +++ /dev/null @@ -1,97 +0,0 @@ -name: databases-nightly - -on: - schedule: - - cron: '0 0 * * *' - -jobs: - mysql_9: - runs-on: ubuntu-24.04 - - services: - mysql: - image: mysql:9 - env: - MYSQL_ALLOW_EMPTY_PASSWORD: yes - MYSQL_DATABASE: laravel - ports: - - 3306:3306 - options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 - - strategy: - fail-fast: true - - name: MySQL 9 - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: 8.2 - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, pdo_mysql, :php-psr - tools: composer:v2 - coverage: none - - - name: Set Framework version - run: composer config version "11.x-dev" - - - name: Install dependencies - uses: nick-fields/retry@v3 - with: - timeout_minutes: 5 - max_attempts: 5 - command: composer update --prefer-stable --prefer-dist --no-interaction --no-progress - - - name: Execute tests - run: vendor/bin/phpunit tests/Integration/Database - env: - DB_CONNECTION: mysql - - mariadb: - runs-on: ubuntu-24.04 - continue-on-error: true - - services: - mariadb: - image: quay.io/mariadb-foundation/mariadb-devel:verylatest - env: - MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: yes - MARIADB_DATABASE: laravel - ports: - - 3306:3306 - options: --health-cmd="healthcheck.sh --connect --innodb_initialized" --health-interval=10s --health-timeout=5s --health-retries=3 - - strategy: - fail-fast: true - - name: MariaDB Very Latest - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: 8.2 - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, pdo_mysql, :php-psr - tools: composer:v2 - coverage: none - - - name: Set Framework version - run: composer config version "11.x-dev" - - - name: Install dependencies - uses: nick-fields/retry@v3 - with: - timeout_minutes: 5 - max_attempts: 5 - command: composer update --prefer-stable --prefer-dist --no-interaction --no-progress - - - name: Execute tests - run: vendor/bin/phpunit tests/Integration/Database - env: - DB_CONNECTION: mariadb diff --git a/.github/workflows/databases.yml b/.github/workflows/databases.yml deleted file mode 100644 index f9d387b11601..000000000000 --- a/.github/workflows/databases.yml +++ /dev/null @@ -1,278 +0,0 @@ -name: databases - -on: - push: - branches: - - master - - '*.x' - pull_request: - -jobs: - mysql_57: - runs-on: ubuntu-24.04 - - services: - mysql: - image: mysql:5.7 - env: - MYSQL_ALLOW_EMPTY_PASSWORD: yes - MYSQL_DATABASE: laravel - ports: - - 3306:3306 - options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 - - strategy: - fail-fast: true - - name: MySQL 5.7 - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: 8.2 - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, pdo_mysql, :php-psr - tools: composer:v2 - coverage: none - - - name: Set Framework version - run: composer config version "11.x-dev" - - - name: Install dependencies - uses: nick-fields/retry@v3 - with: - timeout_minutes: 5 - max_attempts: 5 - command: composer update --prefer-stable --prefer-dist --no-interaction --no-progress - - - name: Execute tests - run: vendor/bin/phpunit tests/Integration/Database - env: - DB_CONNECTION: mysql - DB_COLLATION: utf8mb4_unicode_ci - - mysql_8: - runs-on: ubuntu-24.04 - - services: - mysql: - image: mysql:8 - env: - MYSQL_ALLOW_EMPTY_PASSWORD: yes - MYSQL_DATABASE: laravel - ports: - - 3306:3306 - options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 - - strategy: - fail-fast: true - - name: MySQL 8 - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: 8.2 - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, pdo_mysql, :php-psr - tools: composer:v2 - coverage: none - - - name: Set Framework version - run: composer config version "11.x-dev" - - - name: Install dependencies - uses: nick-fields/retry@v3 - with: - timeout_minutes: 5 - max_attempts: 5 - command: composer update --prefer-stable --prefer-dist --no-interaction --no-progress - - - name: Execute tests - run: vendor/bin/phpunit tests/Integration/Database - env: - DB_CONNECTION: mysql - - mariadb: - runs-on: ubuntu-24.04 - - services: - mariadb: - image: mariadb:10 - env: - MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: yes - MARIADB_DATABASE: laravel - ports: - - 3306:3306 - options: --health-cmd="healthcheck.sh --connect --innodb_initialized" --health-interval=10s --health-timeout=5s --health-retries=3 - - strategy: - fail-fast: true - - name: MariaDB 10 - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: 8.2 - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, pdo_mysql, :php-psr - tools: composer:v2 - coverage: none - - - name: Set Framework version - run: composer config version "11.x-dev" - - - name: Install dependencies - uses: nick-fields/retry@v3 - with: - timeout_minutes: 5 - max_attempts: 5 - command: composer update --prefer-stable --prefer-dist --no-interaction --no-progress - - - name: Execute tests - run: vendor/bin/phpunit tests/Integration/Database - env: - DB_CONNECTION: mariadb - - pgsql: - runs-on: ubuntu-24.04 - - services: - postgresql: - image: postgres:14 - env: - POSTGRES_DB: laravel - POSTGRES_USER: forge - POSTGRES_PASSWORD: password - ports: - - 5432:5432 - options: --health-cmd=pg_isready --health-interval=10s --health-timeout=5s --health-retries=3 - - strategy: - fail-fast: true - - name: PostgreSQL 14 - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: 8.2 - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, pdo_pgsql, :php-psr - tools: composer:v2 - coverage: none - - - name: Set Framework version - run: composer config version "11.x-dev" - - - name: Install dependencies - uses: nick-fields/retry@v3 - with: - timeout_minutes: 5 - max_attempts: 5 - command: composer update --prefer-stable --prefer-dist --no-interaction --no-progress - - - name: Execute tests - run: vendor/bin/phpunit tests/Integration/Database - env: - DB_CONNECTION: pgsql - DB_USERNAME: forge - DB_PASSWORD: password - - mssql: - runs-on: ubuntu-22.04 - - services: - sqlsrv: - image: mcr.microsoft.com/mssql/server:2019-latest - env: - ACCEPT_EULA: Y - SA_PASSWORD: Forge123 - ports: - - 1433:1433 - - strategy: - fail-fast: true - - name: SQL Server 2019 - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: 8.2 - extensions: dom, curl, libxml, mbstring, zip, pcntl, sqlsrv, pdo, pdo_sqlsrv, odbc, pdo_odbc, :php-psr - tools: composer:v2 - coverage: none - - - name: Set Framework version - run: composer config version "11.x-dev" - - - name: Install dependencies - uses: nick-fields/retry@v3 - with: - timeout_minutes: 5 - max_attempts: 5 - command: composer update --prefer-stable --prefer-dist --no-interaction --no-progress - - - name: Execute tests - run: vendor/bin/phpunit tests/Integration/Database - env: - DB_CONNECTION: sqlsrv - DB_DATABASE: master - DB_USERNAME: SA - DB_PASSWORD: Forge123 - - sqlite: - runs-on: ubuntu-24.04 - - strategy: - fail-fast: true - - name: SQLite - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: 8.2 - extensions: dom, curl, libxml, mbstring, zip, pcntl, sqlsrv, pdo, pdo_sqlsrv, odbc, pdo_odbc, :php-psr - tools: composer:v2 - coverage: none - - - name: Set Framework version - run: composer config version "11.x-dev" - - - name: Install dependencies - uses: nick-fields/retry@v3 - with: - timeout_minutes: 5 - max_attempts: 5 - command: composer update --prefer-stable --prefer-dist --no-interaction --no-progress - - - name: Setup SQLite Database - run: php vendor/bin/testbench package:create-sqlite-db - - - name: Execute tests - run: vendor/bin/phpunit tests/Integration/Database/Sqlite - env: - DB_CONNECTION: sqlite diff --git a/.github/workflows/queues.yml b/.github/workflows/queues.yml deleted file mode 100644 index 0c2ee8310a06..000000000000 --- a/.github/workflows/queues.yml +++ /dev/null @@ -1,164 +0,0 @@ -name: queues - -on: - push: - branches: - - master - - '*.x' - pull_request: - -jobs: - sync: - runs-on: ubuntu-24.04 - - strategy: - fail-fast: true - - name: Sync Driver - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: 8.2 - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, pdo_mysql, :php-psr - tools: composer:v2 - coverage: none - - - name: Set Framework version - run: composer config version "11.x-dev" - - - name: Install dependencies - uses: nick-fields/retry@v3 - with: - timeout_minutes: 5 - max_attempts: 5 - command: composer update --prefer-stable --prefer-dist --no-interaction --no-progress - - - name: Execute tests - run: vendor/bin/phpunit tests/Integration/Queue - env: - QUEUE_CONNECTION: sync - - database: - runs-on: ubuntu-24.04 - - strategy: - fail-fast: true - - name: Database Driver - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: 8.2 - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, pdo_mysql, :php-psr - tools: composer:v2 - coverage: none - - - name: Set Framework version - run: composer config version "11.x-dev" - - - name: Install dependencies - uses: nick-fields/retry@v3 - with: - timeout_minutes: 5 - max_attempts: 5 - command: composer update --prefer-stable --prefer-dist --no-interaction --no-progress - - - name: Execute tests - run: vendor/bin/phpunit tests/Integration/Queue - env: - DB_CONNECTION: testing - QUEUE_CONNECTION: database - - redis: - runs-on: ubuntu-24.04 - - services: - redis: - image: redis:7.0 - ports: - - 6379:6379 - options: --entrypoint redis-server - - strategy: - fail-fast: true - - name: Redis Driver - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: 8.2 - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, pdo_mysql, :php-psr - tools: composer:v2 - coverage: none - - - name: Set Framework version - run: composer config version "11.x-dev" - - - name: Install dependencies - uses: nick-fields/retry@v3 - with: - timeout_minutes: 5 - max_attempts: 5 - command: composer update --prefer-stable --prefer-dist --no-interaction --no-progress - - - name: Execute tests - run: vendor/bin/phpunit tests/Integration/Queue - env: - QUEUE_CONNECTION: redis - - beanstalkd: - runs-on: ubuntu-24.04 - - name: Beanstalkd Driver - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Download & Extract beanstalkd - run: curl -L https://github.com/beanstalkd/beanstalkd/archive/refs/tags/v1.13.tar.gz | tar xz - - - name: Make beanstalkd - run: make - working-directory: beanstalkd-1.13 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: 8.2 - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, pdo_mysql, :php-psr - tools: composer:v2 - coverage: none - - - name: Set Framework version - run: composer config version "11.x-dev" - - - name: Install dependencies - uses: nick-fields/retry@v3 - with: - timeout_minutes: 5 - max_attempts: 5 - command: composer update --prefer-stable --prefer-dist --no-interaction --no-progress - - - name: Daemonize beanstalkd - run: ./beanstalkd-1.13/beanstalkd & - - - name: Execute tests - run: vendor/bin/phpunit tests/Integration/Queue - env: - QUEUE_CONNECTION: beanstalkd diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml deleted file mode 100644 index 76e5aa646e7f..000000000000 --- a/.github/workflows/static-analysis.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: static analysis - -on: - push: - branches: - - master - - '*.x' - pull_request: - -jobs: - types: - runs-on: ubuntu-24.04 - - strategy: - fail-fast: true - matrix: - directory: [src, types] - - name: ${{ matrix.directory == 'src' && 'Source Code' || 'Types' }} - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: 8.2 - tools: composer:v2 - coverage: none - - - name: Set Framework version - run: composer config version "11.x-dev" - - - name: Install dependencies - uses: nick-fields/retry@v3 - with: - timeout_minutes: 5 - max_attempts: 5 - command: composer update --prefer-stable --prefer-dist --no-interaction --no-progress - - - name: Execute type checking - run: vendor/bin/phpstan --configuration="phpstan.${{ matrix.directory }}.neon.dist" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b3624859ce0c..6e32564bc20a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -39,7 +39,7 @@ jobs: strategy: fail-fast: true matrix: - php: [8.2, 8.3] + php: [8.4] phpunit: ['10.5', '11.0.1'] stability: [prefer-lowest, prefer-stable] @@ -103,71 +103,71 @@ jobs: vendor/orchestra/testbench-core/laravel/storage/logs !vendor/**/.gitignore - windows_tests: - runs-on: windows-2022 - - strategy: - fail-fast: true - matrix: - php: [8.2, 8.3] - phpunit: ['10.5', '11.0.1'] - stability: [prefer-lowest, prefer-stable] - - name: PHP ${{ matrix.php }} - PHPUnit ${{ matrix.phpunit }} - ${{ matrix.stability }} - Windows - - steps: - - name: Set git to use LF - run: | - git config --global core.autocrlf false - git config --global core.eol lf - - - 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, pdo, sqlite, pdo_sqlite, gd, pdo_mysql, fileinfo, ftp, redis, memcached, gmp, intl, :php-psr - tools: composer:v2 - coverage: none - - - name: Set Framework version - run: composer config version "11.x-dev" - - - name: Set Minimum PHP 8.2 Versions - uses: nick-fields/retry@v3 - with: - timeout_minutes: 5 - max_attempts: 5 - command: composer require guzzlehttp/psr7:^2.4 --no-interaction --no-update - shell: bash - - - name: Set PHPUnit - uses: nick-fields/retry@v3 - with: - timeout_minutes: 5 - max_attempts: 5 - command: composer require phpunit/phpunit:^${{ matrix.phpunit }} --dev --no-interaction --no-update - shell: bash - - - name: Install dependencies - uses: nick-fields/retry@v3 - with: - timeout_minutes: 5 - max_attempts: 5 - command: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress - - - name: Execute tests - run: vendor/bin/phpunit - env: - AWS_ACCESS_KEY_ID: random_key - AWS_SECRET_ACCESS_KEY: random_secret - - - name: Store artifacts - uses: actions/upload-artifact@v4 - with: - name: windows-logs-${{ matrix.php }}-${{ matrix.phpunit }}-${{ matrix.stability }} - path: | - vendor/orchestra/testbench-core/laravel/storage/logs - !vendor/**/.gitignore + # windows_tests: + # runs-on: windows-2022 + + # strategy: + # fail-fast: true + # matrix: + # php: [8.2, 8.3] + # phpunit: ['10.5', '11.0.1'] + # stability: [prefer-lowest, prefer-stable] + + # name: PHP ${{ matrix.php }} - PHPUnit ${{ matrix.phpunit }} - ${{ matrix.stability }} - Windows + + # steps: + # - name: Set git to use LF + # run: | + # git config --global core.autocrlf false + # git config --global core.eol lf + + # - 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, pdo, sqlite, pdo_sqlite, gd, pdo_mysql, fileinfo, ftp, redis, memcached, gmp, intl, :php-psr + # tools: composer:v2 + # coverage: none + + # - name: Set Framework version + # run: composer config version "11.x-dev" + + # - name: Set Minimum PHP 8.2 Versions + # uses: nick-fields/retry@v3 + # with: + # timeout_minutes: 5 + # max_attempts: 5 + # command: composer require guzzlehttp/psr7:^2.4 --no-interaction --no-update + # shell: bash + + # - name: Set PHPUnit + # uses: nick-fields/retry@v3 + # with: + # timeout_minutes: 5 + # max_attempts: 5 + # command: composer require phpunit/phpunit:^${{ matrix.phpunit }} --dev --no-interaction --no-update + # shell: bash + + # - name: Install dependencies + # uses: nick-fields/retry@v3 + # with: + # timeout_minutes: 5 + # max_attempts: 5 + # command: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress + + # - name: Execute tests + # run: vendor/bin/phpunit + # env: + # AWS_ACCESS_KEY_ID: random_key + # AWS_SECRET_ACCESS_KEY: random_secret + + # - name: Store artifacts + # uses: actions/upload-artifact@v4 + # with: + # name: windows-logs-${{ matrix.php }}-${{ matrix.phpunit }}-${{ matrix.stability }} + # path: | + # vendor/orchestra/testbench-core/laravel/storage/logs + # !vendor/**/.gitignore