From 304d3757c7cf7bb84384a6211f6ee1100e8ce1ae Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Thu, 13 Jan 2022 13:13:56 +0800 Subject: [PATCH 0001/1591] wip Signed-off-by: Mior Muhammad Zaki --- composer.json | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index eb71a6677..2ed6fb9cb 100644 --- a/composer.json +++ b/composer.json @@ -36,8 +36,7 @@ }, "require-dev": { "fakerphp/faker": "^1.9.2", - "laravel/framework": "^9.0", - "laravel/laravel": "dev-master", + "laravel/framework": "dev-master", "mockery/mockery": "^1.4.4", "orchestra/canvas": "^7.0", "phpunit/phpunit": "^9.5.10 || ^10.0", @@ -47,7 +46,7 @@ }, "suggest": { "fakerphp/faker": "Allow using Faker for testing (^1.9.2).", - "laravel/framework": "Required for testing (^9.0).", + "laravel/framework": "Required for testing (^10.0).", "mockery/mockery": "Allow using Mockery for testing (^1.4.4).", "orchestra/testbench-browser-kit": "Allow using legacy Laravel BrowserKit for testing (^7.0).", "orchestra/testbench-dusk": "Allow using Laravel Dusk for testing (^7.0).", @@ -57,7 +56,7 @@ }, "extra": { "branch-alias": { - "dev-master": "7.0-dev" + "dev-master": "8.0-dev" } }, "scripts": { From 16d52dc9fd9b4a5575fab0fbdcf83d3aa1c4c732 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Mon, 17 Jan 2022 12:17:32 +0800 Subject: [PATCH 0002/1591] wip Signed-off-by: Mior Muhammad Zaki --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0484a5a0a..3129b079b 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Testing Helper for Laravel Development Testbench Component is a simple package that has been designed to help you write tests for your Laravel package. -[![tests](https://github.com/orchestral/testbench-core/workflows/tests/badge.svg?branch=7.x)](https://github.com/orchestral/testbench-core/actions?query=workflow%3Atests+branch%3A7.x) +[![tests](https://github.com/orchestral/testbench-core/workflows/tests/badge.svg?branch=master)](https://github.com/orchestral/testbench-core/actions?query=workflow%3Atests+branch%3Amaster) [![Latest Stable Version](https://poser.pugx.org/orchestra/testbench-core/v/stable)](https://packagist.org/packages/orchestra/testbench-core) [![Total Downloads](https://poser.pugx.org/orchestra/testbench-core/downloads)](https://packagist.org/packages/orchestra/testbench-core) [![Latest Unstable Version](https://poser.pugx.org/orchestra/testbench-core/v/unstable)](https://packagist.org/packages/orchestra/testbench-core) From 0a440d88a972083fdbcb5c1b94f1cf248d2624ad Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Thu, 20 Jan 2022 17:13:49 +0800 Subject: [PATCH 0003/1591] wip Signed-off-by: Mior Muhammad Zaki --- tests/PackageManifestTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/PackageManifestTest.php b/tests/PackageManifestTest.php index 090afd652..1f2189048 100644 --- a/tests/PackageManifestTest.php +++ b/tests/PackageManifestTest.php @@ -29,9 +29,9 @@ public function it_can_build_manifest() $packages = Collection::make(require $manifestPath); $installedPackages = [ - 'fruitcake/laravel-cors', - 'laravel/laravel', - 'laravel/tinker', + // 'fruitcake/laravel-cors', + // 'laravel/laravel', + // 'laravel/tinker', 'nesbot/carbon', 'orchestra/canvas', 'orchestra/canvas-core', From e46a30821a1717c6959450f5340be4989fd426c0 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Sat, 12 Feb 2022 09:37:21 +0800 Subject: [PATCH 0004/1591] wip Signed-off-by: Mior Muhammad Zaki --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index d10b6a423..3df9c58e1 100644 --- a/composer.json +++ b/composer.json @@ -41,8 +41,8 @@ "mockery/mockery": "^1.4.4", "orchestra/canvas": "^8.0", "phpunit/phpunit": "^9.5.10 || ^10.0", - "symfony/process": "^6.0", - "symfony/yaml": "^6.0", + "symfony/process": "^6.1", + "symfony/yaml": "^6.1", "vlucas/phpdotenv": "^5.4.1" }, "suggest": { From 9af8f02c221e8737a9b7baa3c4ba9b3af1af7f2c Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Sat, 12 Feb 2022 09:38:06 +0800 Subject: [PATCH 0005/1591] wip Signed-off-by: Mior Muhammad Zaki --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 3df9c58e1..5c81071df 100644 --- a/composer.json +++ b/composer.json @@ -52,7 +52,7 @@ "orchestra/testbench-browser-kit": "Allow using legacy Laravel BrowserKit for testing (^7.0).", "orchestra/testbench-dusk": "Allow using Laravel Dusk for testing (^7.0).", "phpunit/phpunit": "Allow using PHPUnit for testing (^9.5.10|^10.0).", - "symfony/yaml": "Required for CLI Commander (^6.0).", + "symfony/yaml": "Required for CLI Commander (^6.1).", "vlucas/phpdotenv": "Required for CLI Commander (^5.4.1)." }, "extra": { From 4c49ff67a9a2e3b839a6f4d51b2566864c14054e Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Fri, 25 Feb 2022 22:11:48 +0800 Subject: [PATCH 0006/1591] wip Signed-off-by: Mior Muhammad Zaki --- .github/workflows/collision-tests.yml | 1 - .github/workflows/coveralls.yml | 2 +- .github/workflows/parallel-tests.yml | 1 - .github/workflows/tests.yml | 1 - 4 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/collision-tests.yml b/.github/workflows/collision-tests.yml index 08c2d9531..6a0d565ca 100644 --- a/.github/workflows/collision-tests.yml +++ b/.github/workflows/collision-tests.yml @@ -16,7 +16,6 @@ jobs: - "ubuntu-latest" - "windows-latest" php: - - "8.0" - "8.1" phpunit: - "^9.5.10" diff --git a/.github/workflows/coveralls.yml b/.github/workflows/coveralls.yml index 6eeded305..fbba14ae0 100644 --- a/.github/workflows/coveralls.yml +++ b/.github/workflows/coveralls.yml @@ -13,7 +13,7 @@ jobs: os: - "ubuntu-latest" php: - - "8.0" + - "8.1" dependencies: - "locked" experimental: diff --git a/.github/workflows/parallel-tests.yml b/.github/workflows/parallel-tests.yml index 42158156f..53f380f42 100644 --- a/.github/workflows/parallel-tests.yml +++ b/.github/workflows/parallel-tests.yml @@ -16,7 +16,6 @@ jobs: - "ubuntu-latest" - "windows-latest" php: - - "8.0" - "8.1" phpunit: - "^9.5.10" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 548b8422f..5c6c503cc 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,7 +16,6 @@ jobs: - "ubuntu-latest" - "windows-latest" php: - - "8.0" - "8.1" phpunit: - "^9.5.10" From f52ad54c26d0a33844dd3a018d69c9907d5066dc Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Fri, 25 Feb 2022 22:11:56 +0800 Subject: [PATCH 0007/1591] wip Signed-off-by: Mior Muhammad Zaki --- .github/workflows/tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5c6c503cc..84b64e22c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -62,7 +62,6 @@ jobs: os: - "ubuntu-latest" php: - - "8.0" - "8.1" phpunit: - "^10.0" From b1050bfc6fdfb75f635747dc561073e673f1e4eb Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Fri, 25 Feb 2022 22:14:31 +0800 Subject: [PATCH 0008/1591] wip Signed-off-by: Mior Muhammad Zaki --- .github/workflows/collision-tests.yml | 2 +- .github/workflows/parallel-tests.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/collision-tests.yml b/.github/workflows/collision-tests.yml index 6a0d565ca..e3412d711 100644 --- a/.github/workflows/collision-tests.yml +++ b/.github/workflows/collision-tests.yml @@ -23,7 +23,7 @@ jobs: - "highest" - "lowest" experimental: - - false + - true name: PHP${{ matrix.php }} with PHPUnit${{ matrix.phpunit }} on ${{ matrix.os }} (${{ matrix.dependencies }}) diff --git a/.github/workflows/parallel-tests.yml b/.github/workflows/parallel-tests.yml index 53f380f42..f94d6ca48 100644 --- a/.github/workflows/parallel-tests.yml +++ b/.github/workflows/parallel-tests.yml @@ -23,7 +23,7 @@ jobs: - "highest" - "lowest" experimental: - - false + - true name: PHP${{ matrix.php }} with PHPUnit${{ matrix.phpunit }} on ${{ matrix.os }} (${{ matrix.dependencies }}) From 6483fcf19aca76c0d38b5c551d81fb4207edb860 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Tue, 11 Oct 2022 20:58:00 +0800 Subject: [PATCH 0009/1591] wip Signed-off-by: Mior Muhammad Zaki --- .github/workflows/audits.yml | 1 - .github/workflows/collision-tests.yml | 1 - 2 files changed, 2 deletions(-) diff --git a/.github/workflows/audits.yml b/.github/workflows/audits.yml index 5f3e2f9f1..e3957cb71 100644 --- a/.github/workflows/audits.yml +++ b/.github/workflows/audits.yml @@ -15,7 +15,6 @@ jobs: os: - "ubuntu-latest" php: - - "8.0" - "8.1" - "8.2" experimental: diff --git a/.github/workflows/collision-tests.yml b/.github/workflows/collision-tests.yml index f9089e74d..2a0040505 100644 --- a/.github/workflows/collision-tests.yml +++ b/.github/workflows/collision-tests.yml @@ -66,7 +66,6 @@ jobs: - "ubuntu-latest" - "windows-latest" php: - - "8.0" - "8.1" phpunit: - "^9.5.10" From a33c95f050bcd155cd8fb9f3f8c4ef5da15ec2b9 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Tue, 25 Oct 2022 18:23:43 +0800 Subject: [PATCH 0010/1591] wip Signed-off-by: Mior Muhammad Zaki --- .github/workflows/collision-tests.yml | 202 +++++++++++++------------- 1 file changed, 101 insertions(+), 101 deletions(-) diff --git a/.github/workflows/collision-tests.yml b/.github/workflows/collision-tests.yml index 2a0040505..ef0c4cae0 100644 --- a/.github/workflows/collision-tests.yml +++ b/.github/workflows/collision-tests.yml @@ -1,103 +1,103 @@ name: collision-tests -on: - push: - pull_request: - schedule: - - cron: '0 0 * * *' - -jobs: - tests: - runs-on: ${{ matrix.os }} - continue-on-error: ${{ matrix.experimental }} - strategy: - matrix: - os: - - "ubuntu-latest" - - "windows-latest" - php: - - "8.1" - - "8.2" - phpunit: - - "9.x" - dependencies: - - "highest" - - "lowest" - experimental: - - true - - name: PHP${{ matrix.php }} with PHPUnit${{ matrix.phpunit }} on ${{ matrix.os }} (${{ matrix.dependencies }}) - - steps: - - name: Checkout code - uses: actions/checkout@v1 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, mysql, mysqli, pdo_mysql, bcmath, intl, fileinfo - coverage: none - - - name: Install PHPUnit ${{ matrix.phpunit }} - run: | - composer require "phpunit/phpunit:${{ matrix.phpunit }}" --no-interaction --no-update - composer require "nunomaduro/collision:~6.2" --dev --no-interaction --no-update - - - name: Install dependencies - uses: "ramsey/composer-install@v1" - with: - dependency-versions: "${{ matrix.dependencies }}" - composer-options: "--prefer-dist --no-cache" - - - name: Installed dependencies - run: | - composer show -D - - - name: Execute tests - run: ./testbench package:test - - tests-with-coverage: - runs-on: ${{ matrix.os }} - continue-on-error: ${{ matrix.experimental }} - strategy: - matrix: - os: - - "ubuntu-latest" - - "windows-latest" - php: - - "8.1" - phpunit: - - "^9.5.10" - dependencies: - - "highest" - - "lowest" - experimental: - - false - - name: PHP${{ matrix.php }} with PHPUnit${{ matrix.phpunit }} on ${{ matrix.os }} (${{ matrix.dependencies }}) with Coverage - - steps: - - name: Checkout code - uses: actions/checkout@v1 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, mysql, mysqli, pdo_mysql, bcmath, intl, fileinfo - coverage: xdebug - - - name: Install PHPUnit ${{ matrix.phpunit }} - run: | - composer require "phpunit/phpunit:${{ matrix.phpunit }}" --no-interaction --no-update - composer require "nunomaduro/collision:^6.1" --dev --no-interaction --no-update - - - name: Install dependencies - uses: "ramsey/composer-install@v1" - with: - dependency-versions: "${{ matrix.dependencies }}" - composer-options: "--prefer-dist --no-cache" - - - name: Execute tests - run: ./testbench package:test --coverage +# on: +# push: +# pull_request: +# schedule: +# - cron: '0 0 * * *' + +# jobs: +# tests: +# runs-on: ${{ matrix.os }} +# continue-on-error: ${{ matrix.experimental }} +# strategy: +# matrix: +# os: +# - "ubuntu-latest" +# - "windows-latest" +# php: +# - "8.1" +# - "8.2" +# phpunit: +# - "9.x" +# dependencies: +# - "highest" +# - "lowest" +# experimental: +# - true + +# name: PHP${{ matrix.php }} with PHPUnit${{ matrix.phpunit }} on ${{ matrix.os }} (${{ matrix.dependencies }}) + +# steps: +# - name: Checkout code +# uses: actions/checkout@v1 + +# - name: Setup PHP +# uses: shivammathur/setup-php@v2 +# with: +# php-version: ${{ matrix.php }} +# extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, mysql, mysqli, pdo_mysql, bcmath, intl, fileinfo +# coverage: none + +# - name: Install PHPUnit ${{ matrix.phpunit }} +# run: | +# composer require "phpunit/phpunit:${{ matrix.phpunit }}" --no-interaction --no-update +# composer require "nunomaduro/collision:~6.2" --dev --no-interaction --no-update + +# - name: Install dependencies +# uses: "ramsey/composer-install@v1" +# with: +# dependency-versions: "${{ matrix.dependencies }}" +# composer-options: "--prefer-dist --no-cache" + +# - name: Installed dependencies +# run: | +# composer show -D + +# - name: Execute tests +# run: ./testbench package:test + +# tests-with-coverage: +# runs-on: ${{ matrix.os }} +# continue-on-error: ${{ matrix.experimental }} +# strategy: +# matrix: +# os: +# - "ubuntu-latest" +# - "windows-latest" +# php: +# - "8.1" +# phpunit: +# - "^9.5.10" +# dependencies: +# - "highest" +# - "lowest" +# experimental: +# - false + +# name: PHP${{ matrix.php }} with PHPUnit${{ matrix.phpunit }} on ${{ matrix.os }} (${{ matrix.dependencies }}) with Coverage + +# steps: +# - name: Checkout code +# uses: actions/checkout@v1 + +# - name: Setup PHP +# uses: shivammathur/setup-php@v2 +# with: +# php-version: ${{ matrix.php }} +# extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, mysql, mysqli, pdo_mysql, bcmath, intl, fileinfo +# coverage: xdebug + +# - name: Install PHPUnit ${{ matrix.phpunit }} +# run: | +# composer require "phpunit/phpunit:${{ matrix.phpunit }}" --no-interaction --no-update +# composer require "nunomaduro/collision:^6.1" --dev --no-interaction --no-update + +# - name: Install dependencies +# uses: "ramsey/composer-install@v1" +# with: +# dependency-versions: "${{ matrix.dependencies }}" +# composer-options: "--prefer-dist --no-cache" + +# - name: Execute tests +# run: ./testbench package:test --coverage From 1daf9c417d5e77bff6725f4f7df1b7549637a7a9 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Tue, 25 Oct 2022 18:25:34 +0800 Subject: [PATCH 0011/1591] wip Signed-off-by: Mior Muhammad Zaki --- .github/workflows/collision-tests.yml | 202 +++++++++++++------------- 1 file changed, 101 insertions(+), 101 deletions(-) diff --git a/.github/workflows/collision-tests.yml b/.github/workflows/collision-tests.yml index ef0c4cae0..cb560a4c4 100644 --- a/.github/workflows/collision-tests.yml +++ b/.github/workflows/collision-tests.yml @@ -1,103 +1,103 @@ name: collision-tests -# on: -# push: -# pull_request: -# schedule: -# - cron: '0 0 * * *' - -# jobs: -# tests: -# runs-on: ${{ matrix.os }} -# continue-on-error: ${{ matrix.experimental }} -# strategy: -# matrix: -# os: -# - "ubuntu-latest" -# - "windows-latest" -# php: -# - "8.1" -# - "8.2" -# phpunit: -# - "9.x" -# dependencies: -# - "highest" -# - "lowest" -# experimental: -# - true - -# name: PHP${{ matrix.php }} with PHPUnit${{ matrix.phpunit }} on ${{ matrix.os }} (${{ matrix.dependencies }}) - -# steps: -# - name: Checkout code -# uses: actions/checkout@v1 - -# - name: Setup PHP -# uses: shivammathur/setup-php@v2 -# with: -# php-version: ${{ matrix.php }} -# extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, mysql, mysqli, pdo_mysql, bcmath, intl, fileinfo -# coverage: none - -# - name: Install PHPUnit ${{ matrix.phpunit }} -# run: | -# composer require "phpunit/phpunit:${{ matrix.phpunit }}" --no-interaction --no-update -# composer require "nunomaduro/collision:~6.2" --dev --no-interaction --no-update - -# - name: Install dependencies -# uses: "ramsey/composer-install@v1" -# with: -# dependency-versions: "${{ matrix.dependencies }}" -# composer-options: "--prefer-dist --no-cache" - -# - name: Installed dependencies -# run: | -# composer show -D - -# - name: Execute tests -# run: ./testbench package:test - -# tests-with-coverage: -# runs-on: ${{ matrix.os }} -# continue-on-error: ${{ matrix.experimental }} -# strategy: -# matrix: -# os: -# - "ubuntu-latest" -# - "windows-latest" -# php: -# - "8.1" -# phpunit: -# - "^9.5.10" -# dependencies: -# - "highest" -# - "lowest" -# experimental: -# - false - -# name: PHP${{ matrix.php }} with PHPUnit${{ matrix.phpunit }} on ${{ matrix.os }} (${{ matrix.dependencies }}) with Coverage - -# steps: -# - name: Checkout code -# uses: actions/checkout@v1 - -# - name: Setup PHP -# uses: shivammathur/setup-php@v2 -# with: -# php-version: ${{ matrix.php }} -# extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, mysql, mysqli, pdo_mysql, bcmath, intl, fileinfo -# coverage: xdebug - -# - name: Install PHPUnit ${{ matrix.phpunit }} -# run: | -# composer require "phpunit/phpunit:${{ matrix.phpunit }}" --no-interaction --no-update -# composer require "nunomaduro/collision:^6.1" --dev --no-interaction --no-update - -# - name: Install dependencies -# uses: "ramsey/composer-install@v1" -# with: -# dependency-versions: "${{ matrix.dependencies }}" -# composer-options: "--prefer-dist --no-cache" - -# - name: Execute tests -# run: ./testbench package:test --coverage +on: + push: + pull_request: + schedule: + - cron: '0 0 * * *' + +jobs: + tests: + runs-on: ${{ matrix.os }} + continue-on-error: ${{ matrix.experimental }} + strategy: + matrix: + os: + - "ubuntu-latest" + - "windows-latest" + php: + - "8.1" + - "8.2" + phpunit: + - "9.x" + dependencies: + - "highest" + - "lowest" + experimental: + - true + + name: PHP${{ matrix.php }} with PHPUnit${{ matrix.phpunit }} on ${{ matrix.os }} (${{ matrix.dependencies }}) + + steps: + - name: Checkout code + uses: actions/checkout@v1 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, mysql, mysqli, pdo_mysql, bcmath, intl, fileinfo + coverage: none + + - name: Install PHPUnit ${{ matrix.phpunit }} + run: | + composer require "phpunit/phpunit:${{ matrix.phpunit }}" --no-interaction --no-update + composer require "nunomaduro/collision:~6.2" --dev --no-interaction --no-update + + - name: Install dependencies + uses: "ramsey/composer-install@v1" + with: + dependency-versions: "${{ matrix.dependencies }}" + composer-options: "--prefer-dist --no-cache" + + - name: Installed dependencies + run: | + composer show -D + + - name: Execute tests + run: ./testbench package:test + + tests-with-coverage: + runs-on: ${{ matrix.os }} + continue-on-error: ${{ matrix.experimental }} + strategy: + matrix: + os: + - "ubuntu-latest" + - "windows-latest" + php: + - "8.1" + phpunit: + - "9.x" + dependencies: + - "highest" + - "lowest" + experimental: + - false + + name: PHP${{ matrix.php }} with PHPUnit${{ matrix.phpunit }} on ${{ matrix.os }} (${{ matrix.dependencies }}) with Coverage + + steps: + - name: Checkout code + uses: actions/checkout@v1 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, mysql, mysqli, pdo_mysql, bcmath, intl, fileinfo + coverage: xdebug + + - name: Install PHPUnit ${{ matrix.phpunit }} + run: | + composer require "phpunit/phpunit:${{ matrix.phpunit }}" --no-interaction --no-update + composer require "nunomaduro/collision:~6.2" --dev --no-interaction --no-update + + - name: Install dependencies + uses: "ramsey/composer-install@v1" + with: + dependency-versions: "${{ matrix.dependencies }}" + composer-options: "--prefer-dist --no-cache" + + - name: Execute tests + run: ./testbench package:test --coverage From 5da9e099020c290842d58b39552f037ffe7774ad Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Tue, 25 Oct 2022 18:34:04 +0800 Subject: [PATCH 0012/1591] wip Signed-off-by: Mior Muhammad Zaki --- .github/workflows/collision-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/collision-tests.yml b/.github/workflows/collision-tests.yml index cb560a4c4..28d7eefff 100644 --- a/.github/workflows/collision-tests.yml +++ b/.github/workflows/collision-tests.yml @@ -42,7 +42,7 @@ jobs: - name: Install PHPUnit ${{ matrix.phpunit }} run: | composer require "phpunit/phpunit:${{ matrix.phpunit }}" --no-interaction --no-update - composer require "nunomaduro/collision:~6.2" --dev --no-interaction --no-update + composer require "nunomaduro/collision:6.x" --dev --no-interaction --no-update - name: Install dependencies uses: "ramsey/composer-install@v1" @@ -91,7 +91,7 @@ jobs: - name: Install PHPUnit ${{ matrix.phpunit }} run: | composer require "phpunit/phpunit:${{ matrix.phpunit }}" --no-interaction --no-update - composer require "nunomaduro/collision:~6.2" --dev --no-interaction --no-update + composer require "nunomaduro/collision:6.x" --dev --no-interaction --no-update - name: Install dependencies uses: "ramsey/composer-install@v1" From a1d31f6d2a9e2d411b37bf4818c1c5804a7a8c09 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Tue, 15 Nov 2022 08:19:06 +0800 Subject: [PATCH 0013/1591] wip Signed-off-by: Mior Muhammad Zaki --- laravel/config/app.php | 2 +- laravel/config/cache.php | 2 +- laravel/config/filesystems.php | 2 +- laravel/lang/en/validation.php | 32 ++++++++++++++++---------------- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/laravel/config/app.php b/laravel/config/app.php index 8c52551ae..75372239a 100644 --- a/laravel/config/app.php +++ b/laravel/config/app.php @@ -56,7 +56,7 @@ 'url' => env('APP_URL', 'http://localhost'), - 'asset_url' => env('ASSET_URL', null), + 'asset_url' => env('ASSET_URL'), /* |-------------------------------------------------------------------------- diff --git a/laravel/config/cache.php b/laravel/config/cache.php index adf08f53d..d09f66a86 100644 --- a/laravel/config/cache.php +++ b/laravel/config/cache.php @@ -105,6 +105,6 @@ | */ - 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'), + 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache_'), ]; diff --git a/laravel/config/filesystems.php b/laravel/config/filesystems.php index 35a21dfd0..e9d9dbdbe 100644 --- a/laravel/config/filesystems.php +++ b/laravel/config/filesystems.php @@ -22,7 +22,7 @@ | | Here you may configure as many filesystem "disks" as you wish, and you | may even configure multiple disks of the same driver. Defaults have - | been setup for each driver as an example of the required options. + | been set up for each driver as an example of the required values. | | Supported Drivers: "local", "ftp", "sftp", "s3" | diff --git a/laravel/lang/en/validation.php b/laravel/lang/en/validation.php index c6c5d7de7..5ea01fa77 100644 --- a/laravel/lang/en/validation.php +++ b/laravel/lang/en/validation.php @@ -25,10 +25,10 @@ 'before' => 'The :attribute must be a date before :date.', 'before_or_equal' => 'The :attribute must be a date before or equal to :date.', 'between' => [ - 'numeric' => 'The :attribute must be between :min and :max.', + 'array' => 'The :attribute must have between :min and :max items.', 'file' => 'The :attribute must be between :min and :max kilobytes.', + 'numeric' => 'The :attribute must be between :min and :max.', 'string' => 'The :attribute must be between :min and :max characters.', - 'array' => 'The :attribute must have between :min and :max items.', ], 'boolean' => 'The :attribute field must be true or false.', 'confirmed' => 'The :attribute confirmation does not match.', @@ -52,16 +52,16 @@ 'file' => 'The :attribute must be a file.', 'filled' => 'The :attribute field must have a value.', 'gt' => [ - 'numeric' => 'The :attribute must be greater than :value.', + 'array' => 'The :attribute must have more than :value items.', 'file' => 'The :attribute must be greater than :value kilobytes.', + 'numeric' => 'The :attribute must be greater than :value.', 'string' => 'The :attribute must be greater than :value characters.', - 'array' => 'The :attribute must have more than :value items.', ], 'gte' => [ - 'numeric' => 'The :attribute must be greater than or equal to :value.', + 'array' => 'The :attribute must have :value items or more.', 'file' => 'The :attribute must be greater than or equal to :value kilobytes.', + 'numeric' => 'The :attribute must be greater than or equal to :value.', 'string' => 'The :attribute must be greater than or equal to :value characters.', - 'array' => 'The :attribute must have :value items or more.', ], 'image' => 'The :attribute must be an image.', 'in' => 'The selected :attribute is invalid.', @@ -72,32 +72,32 @@ 'ipv6' => 'The :attribute must be a valid IPv6 address.', 'json' => 'The :attribute must be a valid JSON string.', 'lt' => [ - 'numeric' => 'The :attribute must be less than :value.', + 'array' => 'The :attribute must have less than :value items.', 'file' => 'The :attribute must be less than :value kilobytes.', + 'numeric' => 'The :attribute must be less than :value.', 'string' => 'The :attribute must be less than :value characters.', - 'array' => 'The :attribute must have less than :value items.', ], 'lte' => [ - 'numeric' => 'The :attribute must be less than or equal to :value.', + 'array' => 'The :attribute must not have more than :value items.', 'file' => 'The :attribute must be less than or equal to :value kilobytes.', + 'numeric' => 'The :attribute must be less than or equal to :value.', 'string' => 'The :attribute must be less than or equal to :value characters.', - 'array' => 'The :attribute must not have more than :value items.', ], 'mac_address' => 'The :attribute must be a valid MAC address.', 'max' => [ - 'numeric' => 'The :attribute must not be greater than :max.', + 'array' => 'The :attribute must not have more than :max items.', 'file' => 'The :attribute must not be greater than :max kilobytes.', + 'numeric' => 'The :attribute must not be greater than :max.', 'string' => 'The :attribute must not be greater than :max characters.', - 'array' => 'The :attribute must not have more than :max items.', ], 'max_digits' => 'The :attribute must not have more than :max digits.', 'mimes' => 'The :attribute must be a file of type: :values.', 'mimetypes' => 'The :attribute must be a file of type: :values.', 'min' => [ - 'numeric' => 'The :attribute must be at least :min.', + 'array' => 'The :attribute must have at least :min items.', 'file' => 'The :attribute must be at least :min kilobytes.', + 'numeric' => 'The :attribute must be at least :min.', 'string' => 'The :attribute must be at least :min characters.', - 'array' => 'The :attribute must have at least :min items.', ], 'min_digits' => 'The :attribute must have at least :min digits.', 'multiple_of' => 'The :attribute must be a multiple of :value.', @@ -128,10 +128,10 @@ 'required_without_all' => 'The :attribute field is required when none of :values are present.', 'same' => 'The :attribute and :other must match.', 'size' => [ - 'numeric' => 'The :attribute must be :size.', + 'array' => 'The :attribute must contain :size items.', 'file' => 'The :attribute must be :size kilobytes.', + 'numeric' => 'The :attribute must be :size.', 'string' => 'The :attribute must be :size characters.', - 'array' => 'The :attribute must contain :size items.', ], 'starts_with' => 'The :attribute must start with one of the following: :values.', 'string' => 'The :attribute must be a string.', From 56336a6394ab1c88210f8e0c54a464bcc14c8287 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Tue, 15 Nov 2022 08:32:20 +0800 Subject: [PATCH 0014/1591] wip Signed-off-by: Mior Muhammad Zaki --- src/Bootstrap/ConfigureRay.php | 9 ++++++--- src/Foundation/TestbenchServiceProvider.php | 4 ++-- src/helpers.php | 20 +++++++++++--------- tests/Integrations/DispatchJobTest.php | 1 - 4 files changed, 19 insertions(+), 15 deletions(-) diff --git a/src/Bootstrap/ConfigureRay.php b/src/Bootstrap/ConfigureRay.php index dc11fe817..9517fb239 100644 --- a/src/Bootstrap/ConfigureRay.php +++ b/src/Bootstrap/ConfigureRay.php @@ -39,10 +39,13 @@ public function bootstrap(Application $app): void */ protected function callAfterResolvingSettings(Application $app, callable $callback): void { - $app->afterResolving(Settings::class, $callback); + /** @phpstan-ignore-next-line */ + $settings = Settings::class; - if ($app->resolved(Settings::class)) { - $callback($app->make(Settings::class), $app); + $app->afterResolving($settings, $callback); + + if ($app->resolved($settings)) { + $callback($app->make($settings), $app); } } } diff --git a/src/Foundation/TestbenchServiceProvider.php b/src/Foundation/TestbenchServiceProvider.php index cfc9e1ba5..f82f3aa52 100644 --- a/src/Foundation/TestbenchServiceProvider.php +++ b/src/Foundation/TestbenchServiceProvider.php @@ -14,7 +14,7 @@ class TestbenchServiceProvider extends ServiceProvider * * @return void */ - public function register() + public function register(): void { $workingPath = defined('TESTBENCH_WORKING_PATH') ? TESTBENCH_WORKING_PATH : null; @@ -29,7 +29,7 @@ public function register() * * @return void */ - public function boot() + public function boot(): void { if (file_exists($this->app->basePath('migrations'))) { $this->loadMigrationsFrom($this->app->basePath('migrations')); diff --git a/src/helpers.php b/src/helpers.php index 85937ffa6..667e0897a 100644 --- a/src/helpers.php +++ b/src/helpers.php @@ -3,7 +3,7 @@ namespace Orchestra\Testbench; use Illuminate\Testing\PendingCommand; -use Orchestra\Testbench\Foundation\Application; +use Orchestra\Testbench\Foundation\Application as Testbench; /** * Create Laravel application instance. @@ -13,9 +13,9 @@ * @param array{extra?: array{providers?: array, dont-discover?: array}, load_environment_variables?: bool, enabled_package_discoveries?: bool} $options * @return \Orchestra\Testbench\Foundation\Application */ -function container(?string $basePath = null, ?callable $resolvingCallback = null, array $options = []) +function container(?string $basePath = null, ?callable $resolvingCallback = null, array $options = []): Testbench { - return (new Application($basePath, $resolvingCallback))->configure($options); + return (new Testbench($basePath, $resolvingCallback))->configure($options); } /** @@ -24,15 +24,17 @@ function container(?string $basePath = null, ?callable $resolvingCallback = null * @param \Orchestra\Testbench\Contracts\TestCase $testbench * @param string $command * @param array $parameters - * @return \Illuminate\Testing\PendingCommand|int + * @return int */ function artisan(Contracts\TestCase $testbench, string $command, array $parameters = []) { - return tap($testbench->artisan($command, $parameters), function ($artisan) { - if ($artisan instanceof PendingCommand) { - $artisan->run(); - } - }); + $command = $testbench->artisan($command, $parameters); + + if ($command instanceof PendingCommand) { + return $command->run(); + } + + return $command; } /** diff --git a/tests/Integrations/DispatchJobTest.php b/tests/Integrations/DispatchJobTest.php index 747642ceb..d746178f2 100644 --- a/tests/Integrations/DispatchJobTest.php +++ b/tests/Integrations/DispatchJobTest.php @@ -3,7 +3,6 @@ namespace Orchestra\Testbench\Tests; use Illuminate\Support\Facades\Bus; -use Illuminate\Support\Facades\Event; use Orchestra\Testbench\TestCase; use Orchestra\Testbench\Tests\Fixtures\Jobs\RegisterUser; From b79717f0ce080664f6061c90f113ae112141beac Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Wed, 23 Nov 2022 11:36:22 +0800 Subject: [PATCH 0015/1591] wip Signed-off-by: Mior Muhammad Zaki --- .github/workflows/analyse.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/analyse.yml b/.github/workflows/analyse.yml index 770f4548b..5509cbd64 100644 --- a/.github/workflows/analyse.yml +++ b/.github/workflows/analyse.yml @@ -13,7 +13,7 @@ jobs: os: - "ubuntu-latest" php: - - "8.0" + - "8.1" experimental: - false From 4064baaf94d5f3186d193ecabcd32ba6fe68af4a Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Wed, 23 Nov 2022 11:38:47 +0800 Subject: [PATCH 0016/1591] wip Signed-off-by: Mior Muhammad Zaki --- phpstan-baseline.neon | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index fe95b8310..e02feeb95 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,16 +1,16 @@ parameters: ignoreErrors: - - message: "#^Access to an undefined property Spatie\\\\Ray\\\\Settings\\\\Settings\\:\\:\\$send_duplicate_queries_to_ray\\.$#" - count: 1 + message: "#^Access to property \\$send_duplicate_queries_to_ray on an unknown class Spatie\\\\Ray\\\\Settings\\\\Settings\\.$#" + count: 2 path: src/Bootstrap/ConfigureRay.php - - message: "#^Access to an undefined property Spatie\\\\Ray\\\\Settings\\\\Settings\\:\\:\\$send_queries_to_ray\\.$#" - count: 1 + message: "#^Access to property \\$send_queries_to_ray on an unknown class Spatie\\\\Ray\\\\Settings\\\\Settings\\.$#" + count: 2 path: src/Bootstrap/ConfigureRay.php - - message: "#^Access to an undefined property Spatie\\\\Ray\\\\Settings\\\\Settings\\:\\:\\$send_slow_queries_to_ray\\.$#" - count: 1 + message: "#^Access to property \\$send_slow_queries_to_ray on an unknown class Spatie\\\\Ray\\\\Settings\\\\Settings\\.$#" + count: 2 path: src/Bootstrap/ConfigureRay.php From 277858ba55f1f316bc1720d9d460cc1be3c0c51d Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Wed, 23 Nov 2022 19:02:41 +0800 Subject: [PATCH 0017/1591] wip Signed-off-by: Mior Muhammad Zaki --- src/Concerns/HandlesTestFailures.php | 119 --------------------------- src/TestCase.php | 9 +- 2 files changed, 4 insertions(+), 124 deletions(-) delete mode 100644 src/Concerns/HandlesTestFailures.php diff --git a/src/Concerns/HandlesTestFailures.php b/src/Concerns/HandlesTestFailures.php deleted file mode 100644 index cbf7f1471..000000000 --- a/src/Concerns/HandlesTestFailures.php +++ /dev/null @@ -1,119 +0,0 @@ -exceptions->last()) { - return $this->appendExceptionToException($lastException, $exception); - } - - if (static::$latestResponse->baseResponse instanceof RedirectResponse) { - $session = static::$latestResponse->baseResponse->getSession(); - - if (! \is_null($session) && $session->has('errors')) { - return $this->appendErrorsToException($session->get('errors')->all(), $exception); - } - } - - if (static::$latestResponse->baseResponse->headers->get('Content-Type') === 'application/json') { - $testJson = new AssertableJsonString(static::$latestResponse->getContent()); - - if (isset($testJson['errors'])) { - return $this->appendErrorsToException($testJson->json(), $exception, true); - } - } - - return $exception; - } - - /** - * Append an exception to the message of another exception. - * - * @param \Throwable $exceptionToAppend - * @param \Throwable $exception - * @return \Throwable - */ - protected function appendExceptionToException($exceptionToAppend, $exception) - { - $exceptionMessage = $exceptionToAppend->getMessage(); - - $exceptionToAppend = (string) $exceptionToAppend; - - $message = <<<"EOF" - The following exception occurred during the last request: - $exceptionToAppend - ---------------------------------------------------------------------------------- - $exceptionMessage - EOF; - - return $this->appendMessageToException($message, $exception); - } - - /** - * Append errors to an exception message. - * - * @param array $errors - * @param \Throwable $exception - * @param bool $json - * @return \Throwable - */ - protected function appendErrorsToException($errors, $exception, $json = false) - { - $errors = $json - ? json_encode($errors, JSON_PRETTY_PRINT) - : implode(PHP_EOL, Arr::flatten($errors)); - - // JSON error messages may already contain the errors, so we shouldn't duplicate them... - if (str_contains($exception->getMessage(), $errors)) { - return $exception; - } - - $message = <<<"EOF" - The following errors occurred during the last request: - $errors - EOF; - - return $this->appendMessageToException($message, $exception); - } - - /** - * Append a message to an exception. - * - * @param string $message - * @param \Throwable $exception - * @return \Throwable - */ - protected function appendMessageToException($message, $exception) - { - $property = new ReflectionProperty($exception, 'message'); - - $property->setAccessible(true); - - $property->setValue( - $exception, - $exception->getMessage().PHP_EOL.PHP_EOL.$message.PHP_EOL - ); - - return $exception; - } -} diff --git a/src/TestCase.php b/src/TestCase.php index e7ab84e8e..ce570ee69 100644 --- a/src/TestCase.php +++ b/src/TestCase.php @@ -9,8 +9,7 @@ abstract class TestCase extends PHPUnit implements Contracts\TestCase { - use Concerns\HandlesTestFailures, - Concerns\Testing, + use Concerns\Testing, Testing\Concerns\InteractsWithAuthentication, Testing\Concerns\InteractsWithConsole, Testing\Concerns\InteractsWithContainer, @@ -110,9 +109,9 @@ public static function tearDownAfterClass(): void protected function onNotSuccessfulTest(Throwable $exception): void { parent::onNotSuccessfulTest( - (\is_null(static::$latestResponse) || ! method_exists(static::$latestResponse, 'transformNotSuccessfulException')) - ? $this->transformNotSuccessfulException($exception) - : static::$latestResponse->transformNotSuccessfulException($exception) + ! \is_null(static::$latestResponse) + ? static::$latestResponse->transformNotSuccessfulException($exception) + : $exception ); } } From df83c99fa0ff109ffacc522a2d080c16d76b8c70 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Fri, 16 Dec 2022 14:22:40 +0800 Subject: [PATCH 0018/1591] wip Signed-off-by: Mior Muhammad Zaki --- src/helpers.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers.php b/src/helpers.php index 893bff9c2..6bd58efd6 100644 --- a/src/helpers.php +++ b/src/helpers.php @@ -14,7 +14,7 @@ */ function container(?string $basePath = null, ?callable $resolvingCallback = null, array $options = []): Foundation\Application { - return (new Testbench($basePath, $resolvingCallback))->configure($options); + return (new Foundation\Application($basePath, $resolvingCallback))->configure($options); } /** From 7098b833a5a863813e8df30c7d1931a6f225c795 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Sat, 24 Dec 2022 09:42:47 +0800 Subject: [PATCH 0019/1591] wip Signed-off-by: Mior Muhammad Zaki --- .github/workflows/collision-tests.yaml | 5 ----- .gitignore | 1 + 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/collision-tests.yaml b/.github/workflows/collision-tests.yaml index 4a058a7f0..04321bf55 100644 --- a/.github/workflows/collision-tests.yaml +++ b/.github/workflows/collision-tests.yaml @@ -71,13 +71,8 @@ jobs: os: - "ubuntu-latest" php: -<<<<<<< HEAD:.github/workflows/collision-tests.yml - - "8.1" -======= - - '8.0' - 8.1 - 8.2 ->>>>>>> 7.x:.github/workflows/collision-tests.yaml phpunit: - "9.x" dependencies: diff --git a/.gitignore b/.gitignore index 5b9be6c27..24cf6e1a1 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ # PHPUnit /coverage/* +/.phpunit.cache/* /.phpunit.result.cache # Laravel Stubs From 2802a3338c2bd9ae81436a45ff93fe8390cf2b61 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Tue, 3 Jan 2023 19:55:02 +0800 Subject: [PATCH 0020/1591] wip Signed-off-by: Mior Muhammad Zaki --- laravel/lang/en/validation.php | 3 --- ...10_12_000000_testbench_create_users_table.php | 8 ++------ ...00_testbench_create_password_resets_table.php | 10 +++------- ...000000_testbench_create_failed_jobs_table.php | 8 ++------ laravel/resources/views/welcome.blade.php | 16 ++++++++-------- laravel/tests/CreatesApplication.php | 5 ++--- src/Factories/UserFactory.php | 6 +++--- 7 files changed, 20 insertions(+), 36 deletions(-) diff --git a/laravel/lang/en/validation.php b/laravel/lang/en/validation.php index af94bd426..f3d8cc5fa 100644 --- a/laravel/lang/en/validation.php +++ b/laravel/lang/en/validation.php @@ -22,7 +22,6 @@ 'alpha_dash' => 'The :attribute must only contain letters, numbers, dashes and underscores.', 'alpha_num' => 'The :attribute must only contain letters and numbers.', 'array' => 'The :attribute must be an array.', - 'ascii' => 'The :attribute must only contain single-byte alphanumeric characters and symbols.', 'before' => 'The :attribute must be a date before :date.', 'before_or_equal' => 'The :attribute must be a date before or equal to :date.', 'between' => [ @@ -37,7 +36,6 @@ 'date' => 'The :attribute is not a valid date.', 'date_equals' => 'The :attribute must be a date equal to :date.', 'date_format' => 'The :attribute does not match the format :format.', - 'decimal' => 'The :attribute must have :decimal decimal places.', 'declined' => 'The :attribute must be declined.', 'declined_if' => 'The :attribute must be declined when :other is :value.', 'different' => 'The :attribute and :other must be different.', @@ -143,7 +141,6 @@ 'uploaded' => 'The :attribute failed to upload.', 'uppercase' => 'The :attribute must be uppercase.', 'url' => 'The :attribute must be a valid URL.', - 'ulid' => 'The :attribute must be a valid ULID.', 'uuid' => 'The :attribute must be a valid UUID.', /* diff --git a/laravel/migrations/2014_10_12_000000_testbench_create_users_table.php b/laravel/migrations/2014_10_12_000000_testbench_create_users_table.php index cf6b77661..444fafb7f 100644 --- a/laravel/migrations/2014_10_12_000000_testbench_create_users_table.php +++ b/laravel/migrations/2014_10_12_000000_testbench_create_users_table.php @@ -8,10 +8,8 @@ { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('users', function (Blueprint $table) { $table->id(); @@ -26,10 +24,8 @@ public function up() /** * Reverse the migrations. - * - * @return void */ - public function down() + public function down(): void { Schema::dropIfExists('users'); } diff --git a/laravel/migrations/2014_10_12_100000_testbench_create_password_resets_table.php b/laravel/migrations/2014_10_12_100000_testbench_create_password_resets_table.php index e5f1397c9..4f42fe690 100644 --- a/laravel/migrations/2014_10_12_100000_testbench_create_password_resets_table.php +++ b/laravel/migrations/2014_10_12_100000_testbench_create_password_resets_table.php @@ -8,13 +8,11 @@ { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('password_resets', function (Blueprint $table) { - $table->string('email')->primary(); + $table->string('email')->index(); $table->string('token'); $table->timestamp('created_at')->nullable(); }); @@ -22,10 +20,8 @@ public function up() /** * Reverse the migrations. - * - * @return void */ - public function down() + public function down(): void { Schema::dropIfExists('password_resets'); } diff --git a/laravel/migrations/2019_08_19_000000_testbench_create_failed_jobs_table.php b/laravel/migrations/2019_08_19_000000_testbench_create_failed_jobs_table.php index 17191986b..249da8171 100644 --- a/laravel/migrations/2019_08_19_000000_testbench_create_failed_jobs_table.php +++ b/laravel/migrations/2019_08_19_000000_testbench_create_failed_jobs_table.php @@ -8,10 +8,8 @@ { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('failed_jobs', function (Blueprint $table) { $table->id(); @@ -26,10 +24,8 @@ public function up() /** * Reverse the migrations. - * - * @return void */ - public function down() + public function down(): void { Schema::dropIfExists('failed_jobs'); } diff --git a/laravel/resources/views/welcome.blade.php b/laravel/resources/views/welcome.blade.php index 9faad4e85..0ad6097c2 100644 --- a/laravel/resources/views/welcome.blade.php +++ b/laravel/resources/views/welcome.blade.php @@ -49,7 +49,7 @@
@@ -62,7 +62,7 @@
- +
@@ -75,7 +75,7 @@
@@ -88,7 +88,7 @@
- +
Vibrant Ecosystem
@@ -104,16 +104,16 @@
- - + + Shop - - + + diff --git a/laravel/tests/CreatesApplication.php b/laravel/tests/CreatesApplication.php index 547152f6a..cc6830112 100644 --- a/laravel/tests/CreatesApplication.php +++ b/laravel/tests/CreatesApplication.php @@ -3,15 +3,14 @@ namespace Tests; use Illuminate\Contracts\Console\Kernel; +use Illuminate\Foundation\Application; trait CreatesApplication { /** * Creates the application. - * - * @return \Illuminate\Foundation\Application */ - public function createApplication() + public function createApplication(): Application { $app = require __DIR__.'/../bootstrap/app.php'; diff --git a/src/Factories/UserFactory.php b/src/Factories/UserFactory.php index be51c326b..621cfe823 100644 --- a/src/Factories/UserFactory.php +++ b/src/Factories/UserFactory.php @@ -24,7 +24,7 @@ class UserFactory extends Factory * * @return array */ - public function definition() + public function definition(): array { return [ 'name' => fake()->name(), @@ -38,9 +38,9 @@ public function definition() /** * Indicate that the model's email address should be unverified. * - * @return static + * @return $this */ - public function unverified() + public function unverified(): static { return $this->state(fn (array $attributes) => [ 'email_verified_at' => null, From 77f9cc75ef0d3e0a181052c8bb3488c5100b39ec Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Tue, 3 Jan 2023 20:00:12 +0800 Subject: [PATCH 0021/1591] wip Signed-off-by: Mior Muhammad Zaki --- phpstan-baseline.neon | 5 +++++ src/Factories/UserFactory.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index e02feeb95..908fd3cf7 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -14,3 +14,8 @@ parameters: message: "#^Access to property \\$send_slow_queries_to_ray on an unknown class Spatie\\\\Ray\\\\Settings\\\\Settings\\.$#" count: 2 path: src/Bootstrap/ConfigureRay.php + + - + message: "#^Parameter \\$callback of method Orchestra\\\\Testbench\\\\Bootstrap\\\\ConfigureRay\\:\\:callAfterResolvingSettings\\(\\) has invalid type Spatie\\\\Ray\\\\Settings\\\\Settings\\.$#" + count: 1 + path: src/Bootstrap/ConfigureRay.php diff --git a/src/Factories/UserFactory.php b/src/Factories/UserFactory.php index 621cfe823..c5fa352ab 100644 --- a/src/Factories/UserFactory.php +++ b/src/Factories/UserFactory.php @@ -38,7 +38,7 @@ public function definition(): array /** * Indicate that the model's email address should be unverified. * - * @return $this + * @return static */ public function unverified(): static { From aa17e274ff0147737f7234eb41eddc95c133465f Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Tue, 3 Jan 2023 20:05:12 +0800 Subject: [PATCH 0022/1591] wip Signed-off-by: Mior Muhammad Zaki --- .github/workflows/collision-tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/collision-tests.yaml b/.github/workflows/collision-tests.yaml index 04321bf55..93f6c8b05 100644 --- a/.github/workflows/collision-tests.yaml +++ b/.github/workflows/collision-tests.yaml @@ -41,7 +41,7 @@ jobs: - name: Install PHPUnit ${{ matrix.phpunit }} run: | composer require "phpunit/phpunit:${{ matrix.phpunit }}" --no-interaction --no-update - composer require "nunomaduro/collision:6.x" --dev --no-interaction --no-update + composer require "nunomaduro/collision:7.x" --dev --no-interaction --no-update - name: Install dependencies uses: "ramsey/composer-install@v2" From 0043ed9c77a9898de8a4e8d070b2bc8e6af7322b Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Tue, 3 Jan 2023 20:05:43 +0800 Subject: [PATCH 0023/1591] wip Signed-off-by: Mior Muhammad Zaki --- .github/workflows/parallel-tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/parallel-tests.yaml b/.github/workflows/parallel-tests.yaml index 11d179927..c5dd97b16 100644 --- a/.github/workflows/parallel-tests.yaml +++ b/.github/workflows/parallel-tests.yaml @@ -41,7 +41,7 @@ jobs: - name: Install PHPUnit ${{ matrix.phpunit }} run: | composer require "phpunit/phpunit:${{ matrix.phpunit }}" --no-interaction --no-update - composer require "nunomaduro/collision:~6.2" "brianium/paratest:~6.4" --dev --no-interaction --no-update + composer require "nunomaduro/collision:~7.0" "brianium/paratest:~6.4" --dev --no-interaction --no-update - name: Install dependencies uses: "ramsey/composer-install@v2" From e4475c961ba1f4ba7c43531a27a1772792aed4eb Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Tue, 3 Jan 2023 20:08:54 +0800 Subject: [PATCH 0024/1591] wip Signed-off-by: Mior Muhammad Zaki --- .github/workflows/collision-tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/collision-tests.yaml b/.github/workflows/collision-tests.yaml index 93f6c8b05..117a77e90 100644 --- a/.github/workflows/collision-tests.yaml +++ b/.github/workflows/collision-tests.yaml @@ -41,7 +41,7 @@ jobs: - name: Install PHPUnit ${{ matrix.phpunit }} run: | composer require "phpunit/phpunit:${{ matrix.phpunit }}" --no-interaction --no-update - composer require "nunomaduro/collision:7.x" --dev --no-interaction --no-update + composer require "nunomaduro/collision:~7.0" --dev --no-interaction --no-update - name: Install dependencies uses: "ramsey/composer-install@v2" From 0dceab82491babcd7d357b9fa524c2a51c56d6a0 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Tue, 3 Jan 2023 20:23:49 +0800 Subject: [PATCH 0025/1591] wip Signed-off-by: Mior Muhammad Zaki --- .github/workflows/collision-tests.yaml | 7 ++++--- .github/workflows/parallel-tests.yaml | 6 +++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/collision-tests.yaml b/.github/workflows/collision-tests.yaml index 117a77e90..dc6fda457 100644 --- a/.github/workflows/collision-tests.yaml +++ b/.github/workflows/collision-tests.yaml @@ -17,13 +17,14 @@ jobs: php: - 8.1 - 8.2 - phpunit: - - "9.x" dependencies: - "highest" - "lowest" experimental: - true + include: + collision: "6.x" + phpunit: "9.x" name: PHP${{ matrix.php }} with PHPUnit${{ matrix.phpunit }} on ${{ matrix.os }} (${{ matrix.dependencies }}) @@ -41,7 +42,7 @@ jobs: - name: Install PHPUnit ${{ matrix.phpunit }} run: | composer require "phpunit/phpunit:${{ matrix.phpunit }}" --no-interaction --no-update - composer require "nunomaduro/collision:~7.0" --dev --no-interaction --no-update + composer require "nunomaduro/collision:${{ matrix.collision }}" --dev --no-interaction --no-update - name: Install dependencies uses: "ramsey/composer-install@v2" diff --git a/.github/workflows/parallel-tests.yaml b/.github/workflows/parallel-tests.yaml index c5dd97b16..e7b5342eb 100644 --- a/.github/workflows/parallel-tests.yaml +++ b/.github/workflows/parallel-tests.yaml @@ -24,6 +24,10 @@ jobs: - "lowest" experimental: - true + include: + collision: "6.x" + paratest: "6.x" + phpunit: "9.x" name: PHP${{ matrix.php }} with PHPUnit${{ matrix.phpunit }} on ${{ matrix.os }} (${{ matrix.dependencies }}) @@ -41,7 +45,7 @@ jobs: - name: Install PHPUnit ${{ matrix.phpunit }} run: | composer require "phpunit/phpunit:${{ matrix.phpunit }}" --no-interaction --no-update - composer require "nunomaduro/collision:~7.0" "brianium/paratest:~6.4" --dev --no-interaction --no-update + composer require "nunomaduro/collision:${{ matrix.collision }}" "brianium/paratest:${{ matrix.paratest }}" --dev --no-interaction --no-update - name: Install dependencies uses: "ramsey/composer-install@v2" From d1d43b9c22dea10fd849859dfb175d335a1bfb42 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Tue, 3 Jan 2023 20:25:23 +0800 Subject: [PATCH 0026/1591] wip Signed-off-by: Mior Muhammad Zaki --- .github/workflows/collision-tests.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/collision-tests.yaml b/.github/workflows/collision-tests.yaml index dc6fda457..9ee2b65c8 100644 --- a/.github/workflows/collision-tests.yaml +++ b/.github/workflows/collision-tests.yaml @@ -17,6 +17,8 @@ jobs: php: - 8.1 - 8.2 + phpunit: + - "9.x" dependencies: - "highest" - "lowest" From 2f49c98ed85508227d410f8394739163c090dcc4 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Tue, 3 Jan 2023 20:26:11 +0800 Subject: [PATCH 0027/1591] wip Signed-off-by: Mior Muhammad Zaki --- .github/workflows/collision-tests.yaml | 4 ++-- .github/workflows/parallel-tests.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/collision-tests.yaml b/.github/workflows/collision-tests.yaml index 9ee2b65c8..872c234e6 100644 --- a/.github/workflows/collision-tests.yaml +++ b/.github/workflows/collision-tests.yaml @@ -25,8 +25,8 @@ jobs: experimental: - true include: - collision: "6.x" - phpunit: "9.x" + - collision: "6.x" + phpunit: "9.x" name: PHP${{ matrix.php }} with PHPUnit${{ matrix.phpunit }} on ${{ matrix.os }} (${{ matrix.dependencies }}) diff --git a/.github/workflows/parallel-tests.yaml b/.github/workflows/parallel-tests.yaml index e7b5342eb..f46b02770 100644 --- a/.github/workflows/parallel-tests.yaml +++ b/.github/workflows/parallel-tests.yaml @@ -25,9 +25,9 @@ jobs: experimental: - true include: - collision: "6.x" - paratest: "6.x" - phpunit: "9.x" + - collision: "6.x" + paratest: "6.x" + phpunit: "9.x" name: PHP${{ matrix.php }} with PHPUnit${{ matrix.phpunit }} on ${{ matrix.os }} (${{ matrix.dependencies }}) From 64506937c9703b58462790167930a46b8911a12c Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Tue, 3 Jan 2023 20:59:38 +0800 Subject: [PATCH 0028/1591] Update collision-tests.yaml --- .github/workflows/collision-tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/collision-tests.yaml b/.github/workflows/collision-tests.yaml index 872c234e6..ace35279c 100644 --- a/.github/workflows/collision-tests.yaml +++ b/.github/workflows/collision-tests.yaml @@ -25,7 +25,7 @@ jobs: experimental: - true include: - - collision: "6.x" + - collision: "^6.4" phpunit: "9.x" name: PHP${{ matrix.php }} with PHPUnit${{ matrix.phpunit }} on ${{ matrix.os }} (${{ matrix.dependencies }}) From 98ec26deb159b8214b3c3e1a323d15e255ee376f Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Tue, 3 Jan 2023 22:32:00 +0800 Subject: [PATCH 0029/1591] wip Signed-off-by: Mior Muhammad Zaki --- .github/workflows/collision-tests.yaml | 5 +++-- .github/workflows/parallel-tests.yaml | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/collision-tests.yaml b/.github/workflows/collision-tests.yaml index ace35279c..60461451e 100644 --- a/.github/workflows/collision-tests.yaml +++ b/.github/workflows/collision-tests.yaml @@ -25,8 +25,9 @@ jobs: experimental: - true include: - - collision: "^6.4" - phpunit: "9.x" + - phpunit: "9.x" + collision: "^6.4" + name: PHP${{ matrix.php }} with PHPUnit${{ matrix.phpunit }} on ${{ matrix.os }} (${{ matrix.dependencies }}) diff --git a/.github/workflows/parallel-tests.yaml b/.github/workflows/parallel-tests.yaml index f46b02770..450b288c2 100644 --- a/.github/workflows/parallel-tests.yaml +++ b/.github/workflows/parallel-tests.yaml @@ -25,9 +25,9 @@ jobs: experimental: - true include: - - collision: "6.x" - paratest: "6.x" - phpunit: "9.x" + - phpunit: "9.x" + collision: "^6.4" + paratest: "^6.4" name: PHP${{ matrix.php }} with PHPUnit${{ matrix.phpunit }} on ${{ matrix.os }} (${{ matrix.dependencies }}) From d6650fa24a7b6531c9859944bcff3effa3277b40 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Thu, 5 Jan 2023 21:44:09 +0800 Subject: [PATCH 0030/1591] wip Signed-off-by: Mior Muhammad Zaki --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 9024177c7..ce7617859 100644 --- a/composer.json +++ b/composer.json @@ -61,7 +61,7 @@ }, "extra": { "branch-alias": { - "dev-master": "8.0-dev" + "dev-master": "9.0-dev" } }, "scripts": { From 0f6dac98982b2eeb00bf7cfc58d15360127dbde4 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Thu, 5 Jan 2023 21:44:53 +0800 Subject: [PATCH 0031/1591] wip Signed-off-by: Mior Muhammad Zaki --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index ce7617859..3033d8ba1 100644 --- a/composer.json +++ b/composer.json @@ -36,7 +36,7 @@ }, "require-dev": { "fakerphp/faker": "^1.21", - "laravel/framework": "^10.0", + "laravel/framework": "dev-master", "laravel/laravel": "dev-master", "laravel/pint": "^1.1", "mockery/mockery": "^1.5.1", @@ -50,7 +50,7 @@ "suggest": { "brianium/paratest": "Allow using parallel tresting (^6.4).", "fakerphp/faker": "Allow using Faker for testing (^1.21).", - "laravel/framework": "Required for testing (^10.0).", + "laravel/framework": "Required for testing (^11.0).", "mockery/mockery": "Allow using Mockery for testing (^1.5.1).", "nunomaduro/collision": "Allow using Laravel style tests output and parallel testing (^6.2).", "orchestra/testbench-browser-kit": "Allow using legacy Laravel BrowserKit for testing (^7.0).", From 7736860986a016ec3c426cdee050b3610a34c35e Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Thu, 5 Jan 2023 21:45:53 +0800 Subject: [PATCH 0032/1591] wip Signed-off-by: Mior Muhammad Zaki --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index 3033d8ba1..04c6fc230 100644 --- a/composer.json +++ b/composer.json @@ -37,7 +37,6 @@ "require-dev": { "fakerphp/faker": "^1.21", "laravel/framework": "dev-master", - "laravel/laravel": "dev-master", "laravel/pint": "^1.1", "mockery/mockery": "^1.5.1", "orchestra/canvas": "^8.0", From c49c5f6e8fb42b3789bb71cd563e48226d2c7d28 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Fri, 6 Jan 2023 00:54:30 +0800 Subject: [PATCH 0033/1591] wip Signed-off-by: Mior Muhammad Zaki --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3129b079b..eab767417 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Testing Helper for Laravel Development Testbench Component is a simple package that has been designed to help you write tests for your Laravel package. -[![tests](https://github.com/orchestral/testbench-core/workflows/tests/badge.svg?branch=master)](https://github.com/orchestral/testbench-core/actions?query=workflow%3Atests+branch%3Amaster) +[![tests](https://github.com/orchestral/testbench-core/workflows/tests/badge.svg?branch=8.x)](https://github.com/orchestral/testbench-core/actions?query=workflow%3Atests+branch%3A8.x) [![Latest Stable Version](https://poser.pugx.org/orchestra/testbench-core/v/stable)](https://packagist.org/packages/orchestra/testbench-core) [![Total Downloads](https://poser.pugx.org/orchestra/testbench-core/downloads)](https://packagist.org/packages/orchestra/testbench-core) [![Latest Unstable Version](https://poser.pugx.org/orchestra/testbench-core/v/unstable)](https://packagist.org/packages/orchestra/testbench-core) From 5aa4a802e84550eaa41162b3d234ba7628e83dcd Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Fri, 6 Jan 2023 00:57:37 +0800 Subject: [PATCH 0034/1591] wip Signed-off-by: Mior Muhammad Zaki --- README.md | 2 +- composer.json | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index eab767417..3129b079b 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Testing Helper for Laravel Development Testbench Component is a simple package that has been designed to help you write tests for your Laravel package. -[![tests](https://github.com/orchestral/testbench-core/workflows/tests/badge.svg?branch=8.x)](https://github.com/orchestral/testbench-core/actions?query=workflow%3Atests+branch%3A8.x) +[![tests](https://github.com/orchestral/testbench-core/workflows/tests/badge.svg?branch=master)](https://github.com/orchestral/testbench-core/actions?query=workflow%3Atests+branch%3Amaster) [![Latest Stable Version](https://poser.pugx.org/orchestra/testbench-core/v/stable)](https://packagist.org/packages/orchestra/testbench-core) [![Total Downloads](https://poser.pugx.org/orchestra/testbench-core/downloads)](https://packagist.org/packages/orchestra/testbench-core) [![Latest Unstable Version](https://poser.pugx.org/orchestra/testbench-core/v/unstable)](https://packagist.org/packages/orchestra/testbench-core) diff --git a/composer.json b/composer.json index 04c6fc230..67f0ad050 100644 --- a/composer.json +++ b/composer.json @@ -32,14 +32,13 @@ "testbench" ], "require": { - "php": "^8.1" + "php": "^8.2" }, "require-dev": { "fakerphp/faker": "^1.21", "laravel/framework": "dev-master", "laravel/pint": "^1.1", "mockery/mockery": "^1.5.1", - "orchestra/canvas": "^8.0", "phpstan/phpstan": "^1.8", "phpunit/phpunit": "^9.5.10", "symfony/process": "^6.1", From 64867a8fe72f472bae881df5a06d7052724a5acd Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Fri, 6 Jan 2023 00:58:50 +0800 Subject: [PATCH 0035/1591] wip Signed-off-by: Mior Muhammad Zaki --- .github/workflows/analyse.yaml | 2 +- .github/workflows/audits.yaml | 1 - .github/workflows/collision-tests.yaml | 1 - .github/workflows/coveralls.yaml | 2 +- .github/workflows/parallel-tests.yaml | 1 - .github/workflows/tests.yaml | 1 - 6 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/analyse.yaml b/.github/workflows/analyse.yaml index 41b466fce..c21b200ca 100644 --- a/.github/workflows/analyse.yaml +++ b/.github/workflows/analyse.yaml @@ -13,7 +13,7 @@ jobs: os: - "ubuntu-latest" php: - - 8.1 + - 8.2 experimental: - false diff --git a/.github/workflows/audits.yaml b/.github/workflows/audits.yaml index 9f4b809c5..93f91b9a7 100644 --- a/.github/workflows/audits.yaml +++ b/.github/workflows/audits.yaml @@ -15,7 +15,6 @@ jobs: os: - "ubuntu-latest" php: - - 8.1 - 8.2 experimental: - true diff --git a/.github/workflows/collision-tests.yaml b/.github/workflows/collision-tests.yaml index 60461451e..b9d736f4d 100644 --- a/.github/workflows/collision-tests.yaml +++ b/.github/workflows/collision-tests.yaml @@ -15,7 +15,6 @@ jobs: os: - "ubuntu-latest" php: - - 8.1 - 8.2 phpunit: - "9.x" diff --git a/.github/workflows/coveralls.yaml b/.github/workflows/coveralls.yaml index 923907622..ae3762385 100644 --- a/.github/workflows/coveralls.yaml +++ b/.github/workflows/coveralls.yaml @@ -13,7 +13,7 @@ jobs: os: - "ubuntu-latest" php: - - 8.1 + - 8.2 dependencies: - "highest" experimental: diff --git a/.github/workflows/parallel-tests.yaml b/.github/workflows/parallel-tests.yaml index 450b288c2..1bdc6e597 100644 --- a/.github/workflows/parallel-tests.yaml +++ b/.github/workflows/parallel-tests.yaml @@ -15,7 +15,6 @@ jobs: os: - "ubuntu-latest" php: - - 8.1 - 8.2 phpunit: - "9.x" diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index aeaf8b91f..0b2842808 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -16,7 +16,6 @@ jobs: - "ubuntu-latest" - "windows-latest" php: - - 8.1 - 8.2 phpunit: - "9.x" From 459b47f23b4c0efc2fb5381d6213b09498db8d1e Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Fri, 6 Jan 2023 08:31:16 +0800 Subject: [PATCH 0036/1591] wip Signed-off-by: Mior Muhammad Zaki --- composer.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index ce7617859..5b8e14577 100644 --- a/composer.json +++ b/composer.json @@ -41,11 +41,11 @@ "laravel/pint": "^1.1", "mockery/mockery": "^1.5.1", "orchestra/canvas": "^8.0", - "phpstan/phpstan": "^1.8", - "phpunit/phpunit": "^9.5.10", - "symfony/process": "^6.1", - "symfony/yaml": "^6.1", - "vlucas/phpdotenv": "^5.4.1" + "phpstan/phpstan": "^1.9.7", + "phpunit/phpunit": "^9.5.27", + "symfony/process": "^6.2", + "symfony/yaml": "^6.2", + "vlucas/phpdotenv": "^5.5.0" }, "suggest": { "brianium/paratest": "Allow using parallel tresting (^6.4).", From 1a795929a65da897a41e1a4fc97104192da799b1 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Fri, 6 Jan 2023 08:37:40 +0800 Subject: [PATCH 0037/1591] wip Signed-off-by: Mior Muhammad Zaki --- README.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/README.md b/README.md index eab767417..db21e4f95 100644 --- a/README.md +++ b/README.md @@ -13,15 +13,11 @@ Testbench Component is a simple package that has been designed to help you write Laravel | Testbench Core :---------|:---------- - 5.4.x | 3.4.x - 5.5.x | 3.5.x - 5.6.x | 3.6.x - 5.7.x | 3.7.x - 5.8.x | 3.8.x 6.x | 4.x 7.x | 5.x 8.x | 6.x 9.x | 7.x + 10.x | 8.x ## Usage From 99db36c08ff1afb2a7e8c2e749b8a2bc878abfb3 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Fri, 6 Jan 2023 09:17:47 +0800 Subject: [PATCH 0038/1591] wip Signed-off-by: Mior Muhammad Zaki --- composer.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 5b8e14577..7b07e2809 100644 --- a/composer.json +++ b/composer.json @@ -52,12 +52,12 @@ "fakerphp/faker": "Allow using Faker for testing (^1.21).", "laravel/framework": "Required for testing (^10.0).", "mockery/mockery": "Allow using Mockery for testing (^1.5.1).", - "nunomaduro/collision": "Allow using Laravel style tests output and parallel testing (^6.2).", + "nunomaduro/collision": "Allow using Laravel style tests output and parallel testing (^6.4).", "orchestra/testbench-browser-kit": "Allow using legacy Laravel BrowserKit for testing (^7.0).", "orchestra/testbench-dusk": "Allow using Laravel Dusk for testing (^7.0).", - "phpunit/phpunit": "Allow using PHPUnit for testing (^9.5.10).", - "symfony/yaml": "Required for CLI Commander (^6.1).", - "vlucas/phpdotenv": "Required for CLI Commander (^5.4.1)." + "phpunit/phpunit": "Allow using PHPUnit for testing (^9.5.27).", + "symfony/yaml": "Required for CLI Commander (^6.2).", + "vlucas/phpdotenv": "Required for CLI Commander (^5.5.0)." }, "extra": { "branch-alias": { From 64abfe36501533e2e1d45cd89c27bbc7cc4eadcd Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Fri, 6 Jan 2023 09:24:10 +0800 Subject: [PATCH 0039/1591] wip Signed-off-by: Mior Muhammad Zaki --- tests/PackageManifestTest.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/PackageManifestTest.php b/tests/PackageManifestTest.php index 53ce768fd..fe2129b23 100644 --- a/tests/PackageManifestTest.php +++ b/tests/PackageManifestTest.php @@ -32,8 +32,6 @@ public function it_can_build_manifest() $installedPackages = [ // 'laravel/laravel', // 'laravel/tinker', - 'laravel/laravel', - 'laravel/tinker', 'nesbot/carbon', 'orchestra/canvas', 'orchestra/canvas-core', From b1a35c479091ce6e3876971ffa0a4648d96b21f2 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Fri, 6 Jan 2023 09:51:41 +0800 Subject: [PATCH 0040/1591] wip Signed-off-by: Mior Muhammad Zaki --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 7b07e2809..cbd94c0e1 100644 --- a/composer.json +++ b/composer.json @@ -38,7 +38,7 @@ "fakerphp/faker": "^1.21", "laravel/framework": "^10.0", "laravel/laravel": "dev-master", - "laravel/pint": "^1.1", + "laravel/pint": "^1.3", "mockery/mockery": "^1.5.1", "orchestra/canvas": "^8.0", "phpstan/phpstan": "^1.9.7", From c9ba81d714d03ec5c680184ac1185fc2ebbf28bb Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Wed, 11 Jan 2023 16:29:16 +0800 Subject: [PATCH 0041/1591] wip Signed-off-by: Mior Muhammad Zaki --- composer.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/composer.json b/composer.json index cbd94c0e1..e9bf83adb 100644 --- a/composer.json +++ b/composer.json @@ -70,8 +70,7 @@ "ci": [ "@composer run prepare", "@php vendor/bin/phpstan analyse", - "@php vendor/bin/pint", - "@composer run test" + "@php vendor/bin/pint" ], "test": "@php vendor/bin/phpunit -c ./ --color" }, From f4fd2b8bbfb50479ee099f7e03339dcbc312361f Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Fri, 13 Jan 2023 10:43:55 +0800 Subject: [PATCH 0042/1591] wip Signed-off-by: Mior Muhammad Zaki --- composer.json | 3 ++- phpstan-baseline.neon | 15 +++++---------- src/Bootstrap/ConfigureRay.php | 1 - 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/composer.json b/composer.json index e9bf83adb..b86f09355 100644 --- a/composer.json +++ b/composer.json @@ -38,11 +38,12 @@ "fakerphp/faker": "^1.21", "laravel/framework": "^10.0", "laravel/laravel": "dev-master", - "laravel/pint": "^1.3", + "laravel/pint": "^1.4", "mockery/mockery": "^1.5.1", "orchestra/canvas": "^8.0", "phpstan/phpstan": "^1.9.7", "phpunit/phpunit": "^9.5.27", + "spatie/laravel-ray": "^1.32", "symfony/process": "^6.2", "symfony/yaml": "^6.2", "vlucas/phpdotenv": "^5.5.0" diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 908fd3cf7..fe95b8310 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,21 +1,16 @@ parameters: ignoreErrors: - - message: "#^Access to property \\$send_duplicate_queries_to_ray on an unknown class Spatie\\\\Ray\\\\Settings\\\\Settings\\.$#" - count: 2 - path: src/Bootstrap/ConfigureRay.php - - - - message: "#^Access to property \\$send_queries_to_ray on an unknown class Spatie\\\\Ray\\\\Settings\\\\Settings\\.$#" - count: 2 + message: "#^Access to an undefined property Spatie\\\\Ray\\\\Settings\\\\Settings\\:\\:\\$send_duplicate_queries_to_ray\\.$#" + count: 1 path: src/Bootstrap/ConfigureRay.php - - message: "#^Access to property \\$send_slow_queries_to_ray on an unknown class Spatie\\\\Ray\\\\Settings\\\\Settings\\.$#" - count: 2 + message: "#^Access to an undefined property Spatie\\\\Ray\\\\Settings\\\\Settings\\:\\:\\$send_queries_to_ray\\.$#" + count: 1 path: src/Bootstrap/ConfigureRay.php - - message: "#^Parameter \\$callback of method Orchestra\\\\Testbench\\\\Bootstrap\\\\ConfigureRay\\:\\:callAfterResolvingSettings\\(\\) has invalid type Spatie\\\\Ray\\\\Settings\\\\Settings\\.$#" + message: "#^Access to an undefined property Spatie\\\\Ray\\\\Settings\\\\Settings\\:\\:\\$send_slow_queries_to_ray\\.$#" count: 1 path: src/Bootstrap/ConfigureRay.php diff --git a/src/Bootstrap/ConfigureRay.php b/src/Bootstrap/ConfigureRay.php index b0d70bb16..324653a93 100644 --- a/src/Bootstrap/ConfigureRay.php +++ b/src/Bootstrap/ConfigureRay.php @@ -43,7 +43,6 @@ public function bootstrap(Application $app): void */ protected function callAfterResolvingSettings(Application $app, Closure $callback): void { - /** @phpstan-ignore-next-line */ $settings = Settings::class; $app->afterResolving($settings, $callback); From 0ad080cba73c3c888b9a3730fa00cc480c588cc1 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Sat, 14 Jan 2023 15:03:59 +0800 Subject: [PATCH 0043/1591] wip Signed-off-by: Mior Muhammad Zaki --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index b86f09355..283c4b4ad 100644 --- a/composer.json +++ b/composer.json @@ -41,7 +41,7 @@ "laravel/pint": "^1.4", "mockery/mockery": "^1.5.1", "orchestra/canvas": "^8.0", - "phpstan/phpstan": "^1.9.7", + "phpstan/phpstan": "^1.9.11", "phpunit/phpunit": "^9.5.27", "spatie/laravel-ray": "^1.32", "symfony/process": "^6.2", From 4aaa4c01036c0cb75bf8517542d2b05c54789344 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Tue, 31 Jan 2023 12:36:40 +0800 Subject: [PATCH 0044/1591] wip Signed-off-by: Mior Muhammad Zaki --- src/Foundation/Console/TestFallbackCommand.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Foundation/Console/TestFallbackCommand.php b/src/Foundation/Console/TestFallbackCommand.php index 321ff9747..847f1035c 100644 --- a/src/Foundation/Console/TestFallbackCommand.php +++ b/src/Foundation/Console/TestFallbackCommand.php @@ -70,7 +70,9 @@ public function handle() */ protected function installCollisionDependencies() { - $command = $this->findComposer().' require "nunomaduro/collision:^6.2" --dev'; + $version = "6.4"; + + $command = sprintf('%s require "nunomaduro/collision:^%s" --dev', $this->findComposer(), $version); $process = Process::fromShellCommandline($command, null, null, null, null); From 67d525b23fb9090494ba1de767000cac7492d519 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Tue, 31 Jan 2023 12:37:16 +0800 Subject: [PATCH 0045/1591] wip Signed-off-by: Mior Muhammad Zaki --- src/Foundation/Console/TestFallbackCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Foundation/Console/TestFallbackCommand.php b/src/Foundation/Console/TestFallbackCommand.php index 847f1035c..de6ea3bc7 100644 --- a/src/Foundation/Console/TestFallbackCommand.php +++ b/src/Foundation/Console/TestFallbackCommand.php @@ -70,7 +70,7 @@ public function handle() */ protected function installCollisionDependencies() { - $version = "6.4"; + $version = '6.4'; $command = sprintf('%s require "nunomaduro/collision:^%s" --dev', $this->findComposer(), $version); From 1e601e36a5fca5ba7fd9cb3bbcaa8f03613a0fda Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Fri, 3 Feb 2023 10:48:46 +0800 Subject: [PATCH 0046/1591] wip Signed-off-by: Mior Muhammad Zaki --- laravel/config/auth.php | 2 +- laravel/config/mail.php | 6 ++++++ ...100000_testbench_create_password_reset_tokens_table.php} | 4 ++-- sync.sh | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) rename laravel/migrations/{2014_10_12_100000_testbench_create_password_resets_table.php => 2014_10_12_100000_testbench_create_password_reset_tokens_table.php} (79%) diff --git a/laravel/config/auth.php b/laravel/config/auth.php index bbc09ec35..5a84f45e1 100644 --- a/laravel/config/auth.php +++ b/laravel/config/auth.php @@ -89,7 +89,7 @@ 'passwords' => [ 'users' => [ 'provider' => 'users', - 'table' => 'password_resets', + 'table' => 'password_reset_tokens', 'expire' => 60, 'throttle' => 60, ], diff --git a/laravel/config/mail.php b/laravel/config/mail.php index 534395a36..049052ff5 100644 --- a/laravel/config/mail.php +++ b/laravel/config/mail.php @@ -51,10 +51,16 @@ 'mailgun' => [ 'transport' => 'mailgun', + // 'client' => [ + // 'timeout' => 5, + // ], ], 'postmark' => [ 'transport' => 'postmark', + // 'client' => [ + // 'timeout' => 5, + // ], ], 'sendmail' => [ diff --git a/laravel/migrations/2014_10_12_100000_testbench_create_password_resets_table.php b/laravel/migrations/2014_10_12_100000_testbench_create_password_reset_tokens_table.php similarity index 79% rename from laravel/migrations/2014_10_12_100000_testbench_create_password_resets_table.php rename to laravel/migrations/2014_10_12_100000_testbench_create_password_reset_tokens_table.php index e207aaa28..81a7229b0 100644 --- a/laravel/migrations/2014_10_12_100000_testbench_create_password_resets_table.php +++ b/laravel/migrations/2014_10_12_100000_testbench_create_password_reset_tokens_table.php @@ -11,7 +11,7 @@ */ public function up(): void { - Schema::create('password_resets', function (Blueprint $table) { + Schema::create('password_reset_tokens', function (Blueprint $table) { $table->string('email')->primary(); $table->string('token'); $table->timestamp('created_at')->nullable(); @@ -23,6 +23,6 @@ public function up(): void */ public function down(): void { - Schema::dropIfExists('password_resets'); + Schema::dropIfExists('password_reset_tokens'); } }; diff --git a/sync.sh b/sync.sh index 215e58d4d..dc24036b7 100755 --- a/sync.sh +++ b/sync.sh @@ -6,7 +6,7 @@ cp -f skeleton/.env.example laravel/ cp -rf skeleton/config/*.php laravel/config/ cp -rf skeleton/database/.gitignore laravel/database/.gitignore cp -rf skeleton/database/migrations/2014_10_12_000000_create_users_table.php laravel/migrations/2014_10_12_000000_testbench_create_users_table.php -cp -rf skeleton/database/migrations/2014_10_12_100000_create_password_resets_table.php laravel/migrations/2014_10_12_100000_testbench_create_password_resets_table.php +cp -rf skeleton/database/migrations/2014_10_12_100000_create_password_reset_tokens_table.php laravel/migrations/2014_10_12_100000_testbench_create_password_reset_tokens_table.php cp -rf skeleton/database/migrations/2019_08_19_000000_create_failed_jobs_table.php laravel/migrations/2019_08_19_000000_testbench_create_failed_jobs_table.php cp -rf skeleton/lang/en/*.php laravel/lang/en/ cp -rf skeleton/resources/views/* laravel/resources/views/ From 3e94763a7b8be21a4120b31ed4cc363090861911 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Fri, 3 Feb 2023 12:33:03 +0800 Subject: [PATCH 0047/1591] wip Signed-off-by: Mior Muhammad Zaki --- src/helpers.php | 6 ++++-- tests/HelpersTest.php | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/helpers.php b/src/helpers.php index 63b9fd04a..0ef5c6375 100644 --- a/src/helpers.php +++ b/src/helpers.php @@ -61,11 +61,13 @@ function default_environment_variables(): array */ function laravel_version_compare(string $version, ?string $operator = null) { + $laravel = Application::VERSION === '10.x-dev' ? '10.0.0' : Application::VERSION; + if (\is_null($operator)) { - return version_compare(Application::VERSION, $version); + return version_compare($laravel, $version); } - return version_compare(Application::VERSION, $version, $operator); + return version_compare($laravel, $version, $operator); } /** diff --git a/tests/HelpersTest.php b/tests/HelpersTest.php index a772fb90f..8af99ac1b 100644 --- a/tests/HelpersTest.php +++ b/tests/HelpersTest.php @@ -13,8 +13,10 @@ class HelpersTest extends TestCase /** @test */ public function it_can_compare_laravel_version() { - $this->assertSame(0, laravel_version_compare(Application::VERSION)); - $this->assertTrue(laravel_version_compare(Application::VERSION, '==')); + $laravel = Application::VERSION === '10.x-dev' ? '10.0.0' : Application::VERSION; + + $this->assertSame(0, laravel_version_compare($laravel)); + $this->assertTrue(laravel_version_compare($laravel, '==')); } /** @test */ From a066ed9575f6686669d08410ecc481c2077d5a70 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Fri, 3 Feb 2023 19:08:49 +0800 Subject: [PATCH 0048/1591] wip Signed-off-by: Mior Muhammad Zaki --- src/helpers.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/helpers.php b/src/helpers.php index 0ef5c6375..d952e4a08 100644 --- a/src/helpers.php +++ b/src/helpers.php @@ -61,6 +61,7 @@ function default_environment_variables(): array */ function laravel_version_compare(string $version, ?string $operator = null) { + /** @phpstan-ignore-next-line */ $laravel = Application::VERSION === '10.x-dev' ? '10.0.0' : Application::VERSION; if (\is_null($operator)) { From a62efd7106413c7bebd342686c80bdc505fe5ff9 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Sat, 4 Feb 2023 06:58:46 +0800 Subject: [PATCH 0049/1591] Support PHPUnit 10 (#84) * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * [8.x] Adds PHPUnit 10 support (#98) * Adds PHPUnit 10 support * Update src/Concerns/HandlesNotSuccessfulTests.php * Update composer.json Co-authored-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * Update TestCaseTest.php * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * Support PHPUnit 10 (dependencies update) (#100) * Updates dependencies * Ignores PHPStan error * wip --------- Signed-off-by: Mior Muhammad Zaki Co-authored-by: Nuno Maduro --- .gitattributes | 1 + .github/workflows/collision-tests.yaml | 10 +- .github/workflows/parallel-tests.yaml | 10 +- .github/workflows/tests.yaml | 96 ++++++++++--------- composer.json | 7 +- phpstan-baseline.neon | 5 + phpstan.neon.dist | 3 + phpunit.xml | 13 +-- phpunit9.xml | 40 ++++++++ src/Bootstrap/HandleExceptions.php | 6 +- src/Concerns/HandlesAnnotations.php | 14 ++- src/Exceptions/PHPUnitErrorException.php | 43 +++++++-- .../Console/TestFallbackCommand.php | 3 +- src/TestCase.php | 31 +++--- tests/PhpUnit10DeprecationsTest.php | 63 ++++++++++++ ...sTest.php => PhpUnit9DeprecationsTest.php} | 4 +- tests/TestCaseTest.php | 7 +- 17 files changed, 269 insertions(+), 87 deletions(-) create mode 100644 phpunit9.xml create mode 100644 tests/PhpUnit10DeprecationsTest.php rename tests/{PhpDeprecationsTest.php => PhpUnit9DeprecationsTest.php} (97%) diff --git a/.gitattributes b/.gitattributes index 5c8b8a64e..874631771 100644 --- a/.gitattributes +++ b/.gitattributes @@ -12,6 +12,7 @@ /canvas.yaml export-ignore /phpstan-baseline.neon export-ignore /phpstan.neon.dist export-ignore +/phpunit9.xml export-ignore /phpunit.xml export-ignore /pint.json export-ignore /sync.sh export-ignore diff --git a/.github/workflows/collision-tests.yaml b/.github/workflows/collision-tests.yaml index 60461451e..4438771c0 100644 --- a/.github/workflows/collision-tests.yaml +++ b/.github/workflows/collision-tests.yaml @@ -19,6 +19,7 @@ jobs: - 8.2 phpunit: - "9.x" + - "10.x" dependencies: - "highest" - "lowest" @@ -27,7 +28,8 @@ jobs: include: - phpunit: "9.x" collision: "^6.4" - + - phpunit: "10.x" + collision: "^7.0" name: PHP${{ matrix.php }} with PHPUnit${{ matrix.phpunit }} on ${{ matrix.os }} (${{ matrix.dependencies }}) @@ -59,7 +61,11 @@ jobs: - name: Execute tests (with deprecations) run: ./testbench package:test --exclude-group commander - if: matrix.dependencies == 'highest' + if: matrix.dependencies == 'highest' && matrix.phpunit == '10.x' + + - name: Execute tests (with deprecations) + run: ./testbench package:test -c phpunit9.xml --exclude-group commander + if: matrix.dependencies == 'highest' && matrix.phpunit == '9.x' - name: Execute tests (without deprecations) run: ./testbench package:test --exclude-group commander,deprecations diff --git a/.github/workflows/parallel-tests.yaml b/.github/workflows/parallel-tests.yaml index 450b288c2..b8b7f8275 100644 --- a/.github/workflows/parallel-tests.yaml +++ b/.github/workflows/parallel-tests.yaml @@ -58,11 +58,15 @@ jobs: composer show -D - name: Execute tests (with deprecations) - run: ./testbench package:test --parallel - if: matrix.dependencies == 'highest' + run: ./testbench package:test --parallel --exclude-group commander + if: matrix.dependencies == 'highest' && matrix.phpunit == '10.x' + + - name: Execute tests (with deprecations) + run: ./testbench package:test -c phpunit9.xml --parallel --exclude-group commander + if: matrix.dependencies == 'highest' && matrix.phpunit == '9.x' - name: Execute tests (without deprecations) - run: ./testbench package:test --parallel --exclude-group=deprecations + run: ./testbench package:test --parallel --exclude-group commander,deprecations env: TESTBENCH_CONVERT_DEPRECATIONS_TO_EXCEPTIONS: false if: matrix.dependencies != 'highest' diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index aeaf8b91f..ea0910227 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -53,55 +53,65 @@ jobs: run: | composer show -D + - name: Execute tests (with deprecations) + run: vendor/bin/phpunit -c ./phpunit9.xml + if: matrix.os != 'windows-latest' + + - name: Execute tests (without deprecations) + run: vendor/bin/phpunit -c ./phpunit9.xml --exclude-group deprecations + env: + TESTBENCH_CONVERT_DEPRECATIONS_TO_EXCEPTIONS: false + if: matrix.os == 'windows-latest' + + tests-on-phpunit-10: + runs-on: ${{ matrix.os }} + continue-on-error: ${{ matrix.experimental }} + strategy: + matrix: + os: + - "ubuntu-latest" + - "windows-latest" + php: + - 8.1 + - 8.2 + phpunit: + - "10.x" + dependencies: + - "highest" + - "lowest" + experimental: + - true + + name: PHP${{ matrix.php }} with PHPUnit${{ matrix.phpunit }} on ${{ matrix.os }} (${{ matrix.dependencies }}) + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, mysql, mysqli, pdo_mysql, bcmath, intl, fileinfo + coverage: none + + - name: Install PHPUnit ${{ matrix.phpunit }} + run: | + composer require "phpunit/phpunit:${{ matrix.phpunit }}" --no-interaction --no-update + + - name: Install dependencies + uses: "ramsey/composer-install@v2" + with: + dependency-versions: "${{ matrix.dependencies }}" + composer-options: "--prefer-dist --no-cache" + - name: Execute tests (with deprecations) run: vendor/bin/phpunit if: matrix.os != 'windows-latest' - name: Execute tests (without deprecations) - run: vendor/bin/phpunit --exclude-group=deprecations + run: vendor/bin/phpunit --exclude-group deprecations env: TESTBENCH_CONVERT_DEPRECATIONS_TO_EXCEPTIONS: false if: matrix.os == 'windows-latest' - # tests-on-phpunit-10: - # runs-on: ${{ matrix.os }} - # continue-on-error: ${{ matrix.experimental }} - # strategy: - # matrix: - # os: - # - "ubuntu-latest" - # php: - # - "8.1" - # phpunit: - # - "^10.0" - # dependencies: - # - "highest" - # - "lowest" - # experimental: - # - true - - # name: PHP${{ matrix.php }} with PHPUnit${{ matrix.phpunit }} on ${{ matrix.os }} (${{ matrix.dependencies }}) - - # steps: - # - name: Checkout code - # uses: actions/checkout@v1 - - # - name: Setup PHP - # uses: shivammathur/setup-php@v2 - # with: - # php-version: ${{ matrix.php }} - # extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, mysql, mysqli, pdo_mysql, bcmath, intl, fileinfo - # coverage: none - - # - name: Install PHPUnit ${{ matrix.phpunit }} - # run: | - # composer require "phpunit/phpunit:${{ matrix.phpunit }}" --no-interaction --no-update - - # - name: Install dependencies - # uses: "ramsey/composer-install@v1" - # with: - # dependency-versions: "${{ matrix.dependencies }}" - # composer-options: "--prefer-dist --no-cache" - - # - name: Execute tests - # run: vendor/bin/phpunit diff --git a/composer.json b/composer.json index 8d037a8b6..23462f053 100644 --- a/composer.json +++ b/composer.json @@ -41,7 +41,7 @@ "mockery/mockery": "^1.5.1", "orchestra/canvas": "^8.0", "phpstan/phpstan": "^1.9.14", - "phpunit/phpunit": "^9.5.27", + "phpunit/phpunit": "^9.6.0 || ^10.0.1", "spatie/laravel-ray": "^1.32", "symfony/process": "^6.2", "symfony/yaml": "^6.2", @@ -55,7 +55,7 @@ "nunomaduro/collision": "Allow using Laravel style tests output and parallel testing (^6.4).", "orchestra/testbench-browser-kit": "Allow using legacy Laravel BrowserKit for testing (^7.0).", "orchestra/testbench-dusk": "Allow using Laravel Dusk for testing (^7.0).", - "phpunit/phpunit": "Allow using PHPUnit for testing (^9.5.27).", + "phpunit/phpunit": "Allow using PHPUnit for testing (^9.5.27 || ^10.0).", "symfony/yaml": "Required for CLI Commander (^6.2).", "vlucas/phpdotenv": "Required for CLI Commander (^5.5.0)." }, @@ -72,7 +72,8 @@ "@php vendor/bin/phpstan analyse", "@php vendor/bin/pint" ], - "test": "@php vendor/bin/phpunit -c ./ --color" + "test": "@php vendor/bin/phpunit -c ./ --color", + "test:phpunit9": "@php vendor/bin/phpunit -c ./phpunit9.xml --color" }, "config": { "sort-packages": true diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index fe95b8310..43536839a 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -14,3 +14,8 @@ parameters: message: "#^Access to an undefined property Spatie\\\\Ray\\\\Settings\\\\Settings\\:\\:\\$send_slow_queries_to_ray\\.$#" count: 1 path: src/Bootstrap/ConfigureRay.php + + - + message: "#^Call to method getConvertDeprecationsToExceptions\\(\\) on an unknown class PHPUnit\\\\Framework\\\\TestResult\\.$#" + count: 1 + path: src/Bootstrap/HandleExceptions.php diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 60c31a27f..b86a7254d 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -12,6 +12,9 @@ parameters: - '#Unsafe usage of new static#' excludePaths: + - src/Concerns/InteractsWithNotSuccessfulTests.php + - src/Exceptions/DeprecatedException.php + - src/Exceptions/PHPUnitErrorException.php - src/Foundation/Console/TestCommand.php checkGenericClassInNonGenericObjectType: false diff --git a/phpunit.xml b/phpunit.xml index 4d802a513..8b1b50bdd 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,18 +1,15 @@ - + cacheDirectory=".phpunit.cache" + backupStaticProperties="false"> src/ diff --git a/phpunit9.xml b/phpunit9.xml new file mode 100644 index 000000000..93653b301 --- /dev/null +++ b/phpunit9.xml @@ -0,0 +1,40 @@ + + + + + src/ + + + src/Concerns/HandlesAnnotations.php + src/Concerns/HandlesTestFailures.php + src/Concerns/WithFactories.php + src/Console/Commander.php + src/Console/Kernel.php + src/Exceptions/Handler.php + src/Exceptions/PHPUnitErrorException.php + + + + + tests/ + + + + + + + + diff --git a/src/Bootstrap/HandleExceptions.php b/src/Bootstrap/HandleExceptions.php index ac681b5c5..072b324f4 100644 --- a/src/Bootstrap/HandleExceptions.php +++ b/src/Bootstrap/HandleExceptions.php @@ -108,7 +108,11 @@ protected function getPhpUnitConvertDeprecationsToExceptions(): bool return false; } - /** @var \PHPUnit\Framework\TestResult|null $testResult */ + /** + * @phpstan-ignore-next-line + * + * @var \PHPUnit\Framework\TestResult|null $testResult + */ $testResult = $this->testbench?->getTestResultObject(); return $testResult?->getConvertDeprecationsToExceptions() ?? false; diff --git a/src/Concerns/HandlesAnnotations.php b/src/Concerns/HandlesAnnotations.php index a11e59f3e..052a07859 100644 --- a/src/Concerns/HandlesAnnotations.php +++ b/src/Concerns/HandlesAnnotations.php @@ -3,7 +3,9 @@ namespace Orchestra\Testbench\Concerns; use Illuminate\Support\Collection; +use function Orchestra\Testbench\phpunit_version_compare; use PHPUnit\Framework\TestCase; +use PHPUnit\Metadata\Annotation\Parser\Registry as PHPUnit10Registry; use PHPUnit\Util\Annotation\Registry as PHPUnit9Registry; use ReflectionClass; @@ -27,9 +29,13 @@ protected function resolvePhpUnitAnnotations(): Collection return new Collection(); } + [$registry, $methodName] = phpunit_version_compare('10', '>=') + ? [PHPUnit10Registry::getInstance(), $this->name()] /** @phpstan-ignore-line */ + : [PHPUnit9Registry::getInstance(), $this->getName(false)]; /** @phpstan-ignore-line */ + /** @var array $annotations */ $annotations = rescue( - fn () => PHPUnit9Registry::getInstance()->forMethod($instance->getName(), $this->getName(false))->symbolAnnotations(), + fn () => $registry->forMethod($instance->getName(), $methodName)->symbolAnnotations(), [], false ); @@ -67,10 +73,14 @@ protected function parseTestMethodAnnotations($app, string $name): void */ public static function clearParsedTestMethodAnnotations(): void { + $registry = phpunit_version_compare('10', '>=') + ? PHPUnit10Registry::getInstance() /** @phpstan-ignore-line */ + : PHPUnit9Registry::getInstance(); /** @phpstan-ignore-line */ + // Clear properties values from Registry class. (function () { $this->classDocBlocks = []; $this->methodDocBlocks = []; - })->call(PHPUnit9Registry::getInstance()); + })->call($registry); } } diff --git a/src/Exceptions/PHPUnitErrorException.php b/src/Exceptions/PHPUnitErrorException.php index 7c83b7906..453f6d5b7 100644 --- a/src/Exceptions/PHPUnitErrorException.php +++ b/src/Exceptions/PHPUnitErrorException.php @@ -2,15 +2,40 @@ namespace Orchestra\Testbench\Exceptions; -class PHPUnitErrorException extends \PHPUnit\Framework\Error\Error -{ - /** - * Get serializable trace for PHPUnit. - * - * @return array - */ - public function getPHPUnitExceptionTrace(): array +use function Orchestra\Testbench\phpunit_version_compare; + +if (phpunit_version_compare('10', '>=')) { + class PHPUnitErrorException extends \PHPUnit\Framework\Exception + { + public function __construct(string $message, int $code, string $file, int $line, \Exception $previous = null) + { + parent::__construct($message, $code, $previous); + + $this->file = $file; + $this->line = $line; + } + + /** + * Get serializable trace for PHPUnit. + * + * @return array + */ + public function getPHPUnitExceptionTrace(): array + { + return $this->serializableTrace; + } + } +} else { + class PHPUnitErrorException extends \PHPUnit\Framework\Error\Error { - return $this->getTrace(); + /** + * Get serializable trace for PHPUnit. + * + * @return array + */ + public function getPHPUnitExceptionTrace(): array + { + return $this->getTrace(); + } } } diff --git a/src/Foundation/Console/TestFallbackCommand.php b/src/Foundation/Console/TestFallbackCommand.php index de6ea3bc7..a63337125 100644 --- a/src/Foundation/Console/TestFallbackCommand.php +++ b/src/Foundation/Console/TestFallbackCommand.php @@ -3,6 +3,7 @@ namespace Orchestra\Testbench\Foundation\Console; use Illuminate\Console\Command; +use function Orchestra\Testbench\phpunit_version_compare; use RuntimeException; use Symfony\Component\Process\Exception\ProcessSignaledException; use Symfony\Component\Process\Process; @@ -70,7 +71,7 @@ public function handle() */ protected function installCollisionDependencies() { - $version = '6.4'; + $version = phpunit_version_compare('10', '>=') ? '7.0' : '6.4'; $command = sprintf('%s require "nunomaduro/collision:^%s" --dev', $this->findComposer(), $version); diff --git a/src/TestCase.php b/src/TestCase.php index 5f0cc3e80..4a2931d04 100644 --- a/src/TestCase.php +++ b/src/TestCase.php @@ -86,27 +86,32 @@ protected function refreshApplication() } /** - * Clean up the testing environment before the next test case. - * - * @return void + * {@inheritdoc} */ - public static function tearDownAfterClass(): void + protected function runTest(): mixed { - static::$latestResponse = null; + $result = null; + + try { + $result = parent::runTest(); + } catch (Throwable $error) { + if (! \is_null(static::$latestResponse)) { + static::$latestResponse->transformNotSuccessfulException($error); + } + + throw $error; + } + + return $result; } /** - * This method is called when a test method did not execute successfully. + * Clean up the testing environment before the next test case. * - * @param \Throwable $exception * @return void */ - protected function onNotSuccessfulTest(Throwable $exception): void + public static function tearDownAfterClass(): void { - parent::onNotSuccessfulTest( - ! \is_null(static::$latestResponse) - ? static::$latestResponse->transformNotSuccessfulException($exception) - : $exception - ); + static::$latestResponse = null; } } diff --git a/tests/PhpUnit10DeprecationsTest.php b/tests/PhpUnit10DeprecationsTest.php new file mode 100644 index 000000000..581fe1e2f --- /dev/null +++ b/tests/PhpUnit10DeprecationsTest.php @@ -0,0 +1,63 @@ += 10 + */ +class PhpUnit10DeprecationsTest extends TestCase +{ + /** @test */ + public function handle_php81_deprecations_using_logs() + { + Log::shouldReceive('channel') + ->once()->with('deprecations') + ->andReturnSelf() + ->shouldReceive('warning') + ->once() + ->withArgs(function ($message) { + return strpos($message, 'zzz in') !== false; + }); + + trigger_error('zzz', E_USER_DEPRECATED); + } + + /** + * @test + * + * @define-env defineConvertDeprecationsToExceptions + */ + public function handle_php81_deprecations_using_laravel_exception() + { + $this->expectException(DeprecatedException::class); + $this->expectExceptionMessage('zzz'); + + trigger_error('zzz', E_USER_DEPRECATED); + } + + /** + * Define environment. + * + * @param \Illuminate\Foundation\Application $app + * @return void + */ + protected function defineConvertDeprecationsToExceptions($app) + { + $value = $_ENV['TESTBENCH_CONVERT_DEPRECATIONS_TO_EXCEPTIONS'] ?? null; + $_ENV['TESTBENCH_CONVERT_DEPRECATIONS_TO_EXCEPTIONS'] = true; + + $this->beforeApplicationDestroyed(function () use ($value) { + if (\is_null($value)) { + unset($_ENV['TESTBENCH_CONVERT_DEPRECATIONS_TO_EXCEPTIONS']); + } else { + $_ENV['TESTBENCH_CONVERT_DEPRECATIONS_TO_EXCEPTIONS'] = $value; + } + }); + } +} diff --git a/tests/PhpDeprecationsTest.php b/tests/PhpUnit9DeprecationsTest.php similarity index 97% rename from tests/PhpDeprecationsTest.php rename to tests/PhpUnit9DeprecationsTest.php index 7a6e145d7..248e68105 100644 --- a/tests/PhpDeprecationsTest.php +++ b/tests/PhpUnit9DeprecationsTest.php @@ -9,8 +9,10 @@ /** * @group deprecations + * + * @requires PHPUnit < 10 */ -class PhpDeprecationsTest extends TestCase +class PhpUnit9DeprecationsTest extends TestCase { /** @test */ public function handle_php81_deprecations_using_logs() diff --git a/tests/TestCaseTest.php b/tests/TestCaseTest.php index c1cd14e1a..d015323f5 100644 --- a/tests/TestCaseTest.php +++ b/tests/TestCaseTest.php @@ -2,6 +2,7 @@ namespace Orchestra\Testbench\Tests; +use function Orchestra\Testbench\phpunit_version_compare; use PHPUnit\Framework\TestCase; class TestCaseTest extends TestCase @@ -9,7 +10,11 @@ class TestCaseTest extends TestCase /** @test */ public function it_can_create_the_testcase() { - $testbench = new class($this->getName()) extends \Orchestra\Testbench\TestCase + $methodName = phpunit_version_compare('10', '>=') + ? $this->name() + : $this->getName(); + + $testbench = new class($methodName) extends \Orchestra\Testbench\TestCase { // }; From 15075b148be3ab87204628ee3a8bbd7ebf88e0ea Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Sat, 4 Feb 2023 07:04:00 +0800 Subject: [PATCH 0050/1591] wip --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 23462f053..64ec876d1 100644 --- a/composer.json +++ b/composer.json @@ -41,7 +41,7 @@ "mockery/mockery": "^1.5.1", "orchestra/canvas": "^8.0", "phpstan/phpstan": "^1.9.14", - "phpunit/phpunit": "^9.6.0 || ^10.0.1", + "phpunit/phpunit": "^9.6 || ^10.0.1", "spatie/laravel-ray": "^1.32", "symfony/process": "^6.2", "symfony/yaml": "^6.2", From 1ad340a1a61f80fe6804a5dc1446e3819b0ce2df Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Sat, 4 Feb 2023 08:48:34 +0800 Subject: [PATCH 0051/1591] wip Signed-off-by: Mior Muhammad Zaki --- phpstan.neon.dist | 1 - 1 file changed, 1 deletion(-) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index b86a7254d..6b608272e 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -12,7 +12,6 @@ parameters: - '#Unsafe usage of new static#' excludePaths: - - src/Concerns/InteractsWithNotSuccessfulTests.php - src/Exceptions/DeprecatedException.php - src/Exceptions/PHPUnitErrorException.php - src/Foundation/Console/TestCommand.php From b9b9608c570e7359fa96fd904ab4d0a9d7619b98 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Mon, 6 Feb 2023 12:20:23 +0800 Subject: [PATCH 0052/1591] wip Signed-off-by: Mior Muhammad Zaki --- .github/workflows/parallel-tests.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/parallel-tests.yaml b/.github/workflows/parallel-tests.yaml index b8b7f8275..6d1496512 100644 --- a/.github/workflows/parallel-tests.yaml +++ b/.github/workflows/parallel-tests.yaml @@ -19,6 +19,7 @@ jobs: - 8.2 phpunit: - "9.x" + - "10.x" dependencies: - "highest" - "lowest" @@ -28,6 +29,9 @@ jobs: - phpunit: "9.x" collision: "^6.4" paratest: "^6.4" + - phpunit: "10.x" + collision: "^7.0" + paratest: "^7.0" name: PHP${{ matrix.php }} with PHPUnit${{ matrix.phpunit }} on ${{ matrix.os }} (${{ matrix.dependencies }}) From 9060d8adb8fcc7694947baba5401299ed4c5c553 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Mon, 6 Feb 2023 16:41:49 +0800 Subject: [PATCH 0053/1591] wip Signed-off-by: Mior Muhammad Zaki --- .github/workflows/parallel-tests.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/parallel-tests.yaml b/.github/workflows/parallel-tests.yaml index 6d1496512..caa78df94 100644 --- a/.github/workflows/parallel-tests.yaml +++ b/.github/workflows/parallel-tests.yaml @@ -29,9 +29,9 @@ jobs: - phpunit: "9.x" collision: "^6.4" paratest: "^6.4" - - phpunit: "10.x" - collision: "^7.0" - paratest: "^7.0" + # - phpunit: "10.x" + # collision: "^7.0" + # paratest: "^7.0" name: PHP${{ matrix.php }} with PHPUnit${{ matrix.phpunit }} on ${{ matrix.os }} (${{ matrix.dependencies }}) From c05716813d50a93df349a2801d8d2994ac382a1b Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Mon, 6 Feb 2023 17:42:23 +0800 Subject: [PATCH 0054/1591] wip Signed-off-by: Mior Muhammad Zaki --- CHANGELOG-6.x.md | 559 ----------------------------------------------- 1 file changed, 559 deletions(-) delete mode 100644 CHANGELOG-6.x.md diff --git a/CHANGELOG-6.x.md b/CHANGELOG-6.x.md deleted file mode 100644 index a77fea4d0..000000000 --- a/CHANGELOG-6.x.md +++ /dev/null @@ -1,559 +0,0 @@ -# Change for 6.x - -This changelog references the relevant changes (bug and security fixes) done to `orchestra/testbench-core`. - -## 6.29.1 - -Released: 2022-10-11 - -### Fixes - -* Remove `bootstrap/cache/packages.php` on vendor symlink event. - -## 6.29.0 - -Released: 2022-08-24 - -### Added - -* Added `loadLaravelMigrationsWithoutRollback()` and `runLaravelMigrationsWithoutRollback()` helpers. - -## 6.28.1 - -Released: 2022-02-08 - -### Changes - -* Update skeleton to match v8.6.11. - -## 6.28.0 - -Released: 2022-01-13 - -### Changes - -* Allow package discoveries by adding `$enablesPacakgeDiscoveries = true` property. -* Allow to run `defineCacheRoute()` before application is ready. -* Support defining custom `$basePath` when using `Orchestra\Testbench\container` function. - -## 6.27.4 - -Released: 2021-12-23 - -### Changes - -* Update skeleton to match v8.6.10. - -## 6.27.3 - -Released: 2021-12-04 - -### Changes - -* Improves docblock. - -## 6.27.2 - -Released: 2021-12-02 - -### Changes - -* Update skeleton to match v8.6.8. - -## 6.27.1 - -Released: 2021-11-17 - -### Changes - -* Update skeleton to match v8.6.7. - -## 6.27.0 - -Released: 2021-11-10 - -### Added - -* Add ability to define database migrations using `TestCase::defineDatabaseMigrationsAfterDatabaseRefreshed()` method, the method will only be executed via `Illuminate\Database\Events\DatabaseRefreshed` event. -* Add ability to destroy database migrations using `TestCase::destroyDatabaseMigrations()`. - -## 6.26.0 - -Released: 2021-10-21 - -### Added - -* Added draft support for PHP 8.1. -* Added `Orchestra\Testbench\container()` function to easily create an application instance. - -### Changes - -* Update skeleton to match v8.6.4. -* Improves docblock. - -## 6.25.2 - -Released: 2021-09-18 - -### Changes - -* Ability to use `App\Http\Kernel` and `App\Console\Kernel` via Commander if the class exists. - -## 6.25.1 - -Released: 2021-09-11 - -### Fixes - -* Fixes missing `Orchestra\Testbench\Contracts\TestCase` to `artisan()` helper function. - -## 6.25.0 - -Released: 2021-09-08 - -### Added - -* Add ability to define database seeder using `TestCase::defineDatabaseSeeders()` method. - -### Changes - -* Update skeleton to match v8.6.2. - -## 6.24.1 - -Released: 2021-08-25 - -### Changes - -* Update skeleton to match v8.6.1. - -## 6.24.0 - -Released: 2021-08-12 - -### Changes - -* Bump minimum `laravel/framework` to `8.54`. -* Update skeleton to match v8.5.24. - -## 6.23.1 - -Released: 2021-07-14 - -### Changes - -* Update skeleton to match v8.5.22. - -## 6.23.0 - -Released: 2021-06-16 - -### Changes - -* Improves generating cached routes during testing. -* Allows to loads `.env` when using `Orchestra\Testbench\Foundation\Application`. -* Update skeleton. - -## 6.22.0 - -Released: 2021-05-25 - -### Added - -* Added `Orchestra\Testbench\Foundation\Application` to allow creating remote application using Testbench. -* Added static public method `Orchestra\Testbench\Concerns\CreatesApplication::applicationBasePath()` to replace `getBasePath()`. - -### Changes - -* Update skeleton. - -## 6.21.3 - -Released: 2021-05-18 - -### Changes - -* Update skeleton to match v8.5.18. - -### Fixes - -* Fixes missing `PHPUnit\Util\Test::parseTestMethodAnnotations()` on PHPUnit 10. - -## 6.21.2 - -Released: 2021-05-12 - -### Changes - -* Check whether skeleton `vendor` is an actual directory before trying to symlink with base directory `vendor`. - -## 6.21.1 - -Released: 2021-04-21 - -### Changes - -* Update skeleton to match v8.5.16. - -## 6.21.0 - -Released: 2021-04-06 - -### Added - -* Added capability to fetch package discovery from root project. -* Added database-specific environment variables based on ChipperCI. - -### Changes - -* Allow configuration to be loaded from `Application::basePath()` instead of hardcoded value. - -## 6.20.0 - -Released: 2021-03-31 - -### Added - -* Added ability to run multiple database by adding database specific environment variable. E.g: `MYSQL_HOST`, `POSTGRES_HOST` and `MSSQL_HOST` instead of just `DB_HOST`. - -### Changes - -* Use `getcwd()` instead of relative path to setup `TESTBENCH_WORKING_PATH` constant when executing it via `bootstrap/app.php`. -* Accept `APP_BASE_PATH` environment variable to configure `getBasePath()`. - -## 6.19.1 - -Released: 2021-03-24 - -### Changes - -* Update Laravel skeleton. - - Update `validation` language file. - -## 6.19.0 - -Released: 2021-03-21 - -### Added - -* Added `TESTBENCH_WORKING_DIRECTORY` constant. - -### Removed - -* Remove package discovery for `Orchestra\Testbench\Foundation\TestbenchServiceProvider`, the service provider will only be registered from CLI Commander. - -## 6.18.0 - -Released: 2021-03-16 - -### Added - -* Added support for PHPUnit 10. - -### Changes - -* Update Laravel skeleton. - - Add `Date` aliases. - - Update `logging` configuration. - - Update `validation` language file. - -## 6.17.1 - -Released: 2021-03-10 - -### Changes - -* Update Laravel skeleton. - - Update `queue` configuration. - - Update `validation` language file. - -## 6.17.0 - -Released: 2021-03-08 - -### Added - -* Added `Orchestra\Testbench\Foundation\Console\Kernel` and `Orchestra\Testbench\Foundation\Http\Kernel`. - -## 6.16.0 - -Released: 2021-02-21 - -### Changes - -* Flush `Queue::createPayloadUsing()` on `Orchestra\Testbench\TestCase::tearDown()`. - -## 6.15.2 - -Released: 2021-02-13 - -### Fixes - -* Always attempt to delete `laravel/vendor` symlink folder. - -## 6.15.1 - -Released: 2021-02-09 - -### Fixes - -* Fixes tests. - -## 6.15.0 - -Released: 2021-02-09 - -### Added - -* Add `defineWebRoutes()` to automatically define routes under `web` middleware. - -## 6.14.0 - -Released: 2021-02-07 - -### Added - -* Added `$loadEnvironmentVariables` property options to toggle loading `.env` file if available. - -## 6.13.0 - -Released: 2021-01-30 - -### Added - -* Added `dont-discover` configuration to `testbench.yaml`. - -## 6.12.0 - -Released: 2021-01-29 - -### Added - -* Added support for Laravel 8 parallel testing: - - Added `package:test` command. - - Added `Orchestra\Testbench\Foundation\TestbenchServiceProvider` class. - -## 6.11.2 - -Released: 2021-01-21 - -### Fixes - -* Handle exception on `Orchestra\Testbench\Console\Commander`. - -## 6.11.1 - -Released: 2021-01-18 - -### Fixes - -* Fixes tests example. - -## 6.11.0 - -Released: 2021-01-17 - -### Changes - -* Improves support for Package Discovery support on test environment and also `testbench` command. - -## 6.10.0 - -Released: 2021-01-17 - -### Added - -* Added `ignorePackageDiscoveriesFrom()` method to `Orchestra\Testbench\Concerns\CreatesApplication` trait to allow enable package discoveries during tests. -* `Orchestra\Testbench\Console\Commander` will automatically discover packages. - -## 6.9.2 - -Released: 2020-12-30 - -### Changes - -* Update Laravel skeleton. - - Add `caches.stores.database.lock_connection` and `caches.stores.redis.lock_connection` configuration. - -### Fixes - -* Fixes `database/seeders` folder. - -## 6.9.1 - -Released: 2020-12-15 - -### Fixes - -* Hardcode `vlucas/phpdotenv` dependencies to avoid missing `Dotenv\Store\StoreInterface` interface. - -## 6.9.0 - -Released: 2020-12-15 - -### Changes - -* Bump `mockery/mockery` to `v1.3.2` and above. -* Opt to use `method_exists()` to detect support for `parseTestMethodAnnotations()` under `HandlesDatabases` and `HandlesRoutes` trait. -* Update `Orchestra\Testbench\Bootstrap\LoadConfiguration::getConfigurationFiles()` to return `Generator` instead of array. - -## 6.8.0 - -Released: 2020-12-09 - -### Added - -* Added following traits: - - `Orchestra\Testbench\Concerns\HandlesAnnotations`. - - `Orchestra\Testbench\Concerns\HandlesDatabases`. - - `Orchestra\Testbench\Concerns\HandlesRoutes`. -* Added `defineRoutes()` and `defineCacheRoutes()` to group dedicated tests routing. - -## 6.7.0 - -Released: 2020-12-01 - -### Added - -* Added `defineEnvironment()` and `defineDatabaseMigrations()` method to `Orchestra\Testbench\TestCase`. - - `defineEnvironment()` usage is identical to `getEnvironmentSetUp()` but the original function will remain functioning for now. - - Use `defineDatabaseMigrations()` to load any database migrations for the tests. This will allows Testbench to loads it early on the test cycle before to avoid it being clashing usage with `DatabaseTransactions` trait. -* Add support to read environment variable from `.env` on skeleton when it's available when used with `testbench` bin command. - -### Changes - -* Update Laravel skeleton. - - Remove `filesystems.cloud` configuration. - -## 6.6.2 - -Released: 2020-11-25 - -### Changes - -* Update Laravel skeleton. - -## 6.6.1 - -Released: 2020-11-17 - -### Changes - -* Update Laravel app skeleton. - -### Fixes - -* Use `TestCase::getName(false)` when resolving annotations for PHPUnit. - -## 6.6.0 - -Released: 2020-11-07 - -### Added - -* Added `Orchestra\Testbench\Concerns\InteractsWithPublishedFiles` trait. - -### Changes - -* Uses `PHPUnit\Util\Test` to parse annotations instead of relying on deprecated `TestCase::getAnnotations()`. - -## 6.5.0 - -Released: 2020-10-28 - -### Changes - -* Replace `fzaninotto/faker` with `fakerphp/faker`. - -## 6.4.1 - -Released: 2020-10-27 - -### Changes - -* Added support for PHP 8. - -## 6.4.0 - -Released: 2020-10-20 - -### Added - -* Added ability to use custom Laravel path for `testbench` CLI. - -## 6.3.0 - -Released: 2020-10-11 - -### Added - -* Added `drop-sqlite-db` command. - -### Changes - -* Configuration changes: - - Add `LOG_LEVEL` environment configuration. - -## 6.2.0 - -Released: 2020-09-28 - -### Added - -* Add following folders to Laravel skeleton: - - `app/Console` - - `app/Exceptions` - - `app/Http/Controllers` - - `app/Http/Middleware` - - `app/Models` - - `app/Providers` - - `database/seeds` - -## 6.1.1 - -Released: 2020-09-26 - -### Fixes - -* Allows to skipped `env` key from `testbench.yaml`. - -## 6.1.0 - -Released: 2020-09-24 - -### Added - -Added experimental support for running artisan commands outside of Laravel. e.g: - - ./vendor/bin/testbench migrate - -This would allows you to setup the testing environment before running `phpunit` instead of executing everything from within `TestCase::setUp()`. - -### Changes - -* `Orchestra\Testbench\TestCase` now uses `Illuminate\Foundation\Testing\Concerns\InteractsWithTime`. - -## 6.0.1 - -Released: 2020-09-09 - -### Changes - -* Throw explicit exception when using `withFactories()` without `laravel/legacy-factories`. - -## 6.0.0 - -Released: 2020-09-08 - -### Added - -* Added `Orchestra\Testbench\Factories\UserFactory` to handle `Illuminate\Foundation\Auth\User` model. -* Automatically autoloads `Illuminate\Database\Eloquent\LegacyFactoryServiceProvider` if the service provider exists. - -### Changes - -* Update support for Laravel Framework v8. -* Increase minimum PHP version to 7.3 and above (tested with 7.3 and 7.4). -* Configuration changes: - - Changed `auth.providers.users.model` to `Illuminate\Foundation\Auth\User`. - - Changed `queue.failed.driver` to `database-uuid`. From 7392a2ea6d6a74f998850743c5f50a3c72ad9873 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Mon, 6 Feb 2023 17:51:47 +0800 Subject: [PATCH 0055/1591] wip Signed-off-by: Mior Muhammad Zaki --- .github/workflows/parallel-tests.yaml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/parallel-tests.yaml b/.github/workflows/parallel-tests.yaml index caa78df94..492b3b9df 100644 --- a/.github/workflows/parallel-tests.yaml +++ b/.github/workflows/parallel-tests.yaml @@ -25,13 +25,6 @@ jobs: - "lowest" experimental: - true - include: - - phpunit: "9.x" - collision: "^6.4" - paratest: "^6.4" - # - phpunit: "10.x" - # collision: "^7.0" - # paratest: "^7.0" name: PHP${{ matrix.php }} with PHPUnit${{ matrix.phpunit }} on ${{ matrix.os }} (${{ matrix.dependencies }}) @@ -49,7 +42,16 @@ jobs: - name: Install PHPUnit ${{ matrix.phpunit }} run: | composer require "phpunit/phpunit:${{ matrix.phpunit }}" --no-interaction --no-update - composer require "nunomaduro/collision:${{ matrix.collision }}" "brianium/paratest:${{ matrix.paratest }}" --dev --no-interaction --no-update + + - name: Install Paratest (for PHPUnit 9.x) + run: | + composer require "nunomaduro/collision:^6.4" "brianium/paratest:^6.4" --dev --no-interaction --no-update + if: matrix.phpunit == '9.x' + + - name: Install Paratest (for PHPUnit 9.x) + run: | + composer require "nunomaduro/collision:^7.0" "brianium/paratest:^7.0" --dev --no-interaction --no-update + if: matrix.phpunit == '10.x' - name: Install dependencies uses: "ramsey/composer-install@v2" From 28f6aeb17e643a6331b5476f4f094456351bd5d8 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Mon, 6 Feb 2023 18:11:42 +0800 Subject: [PATCH 0056/1591] wip Signed-off-by: Mior Muhammad Zaki --- .github/workflows/parallel-tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/parallel-tests.yaml b/.github/workflows/parallel-tests.yaml index 492b3b9df..8dff8e309 100644 --- a/.github/workflows/parallel-tests.yaml +++ b/.github/workflows/parallel-tests.yaml @@ -19,7 +19,7 @@ jobs: - 8.2 phpunit: - "9.x" - - "10.x" + # - "10.x" dependencies: - "highest" - "lowest" From 59e5948a7c0cc19349330275ec2a62ea747083e2 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Mon, 6 Feb 2023 21:38:15 +0800 Subject: [PATCH 0057/1591] wip --- composer.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 64ec876d1..ed49bf8fd 100644 --- a/composer.json +++ b/composer.json @@ -52,9 +52,9 @@ "fakerphp/faker": "Allow using Faker for testing (^1.21).", "laravel/framework": "Required for testing (^10.0).", "mockery/mockery": "Allow using Mockery for testing (^1.5.1).", - "nunomaduro/collision": "Allow using Laravel style tests output and parallel testing (^6.4).", - "orchestra/testbench-browser-kit": "Allow using legacy Laravel BrowserKit for testing (^7.0).", - "orchestra/testbench-dusk": "Allow using Laravel Dusk for testing (^7.0).", + "nunomaduro/collision": "Allow using Laravel style tests output and parallel testing (^6.4 || ^7.0).", + "orchestra/testbench-browser-kit": "Allow using legacy Laravel BrowserKit for testing (^8.0).", + "orchestra/testbench-dusk": "Allow using Laravel Dusk for testing (^8.0).", "phpunit/phpunit": "Allow using PHPUnit for testing (^9.5.27 || ^10.0).", "symfony/yaml": "Required for CLI Commander (^6.2).", "vlucas/phpdotenv": "Required for CLI Commander (^5.5.0)." From bd033dd176ec1989e836ba5a2b6daf6873e6bb40 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Mon, 6 Feb 2023 21:38:39 +0800 Subject: [PATCH 0058/1591] wip --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index ed49bf8fd..b84b9ec8b 100644 --- a/composer.json +++ b/composer.json @@ -48,7 +48,7 @@ "vlucas/phpdotenv": "^5.5.0" }, "suggest": { - "brianium/paratest": "Allow using parallel tresting (^6.4).", + "brianium/paratest": "Allow using parallel tresting (^6.4 || ^7.0).", "fakerphp/faker": "Allow using Faker for testing (^1.21).", "laravel/framework": "Required for testing (^10.0).", "mockery/mockery": "Allow using Mockery for testing (^1.5.1).", From 61aa49a68510f70b3b60537757a0ec7f356628cc Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Tue, 7 Feb 2023 15:04:35 +0800 Subject: [PATCH 0059/1591] `--parallel` support for PHPUnit 10 (#102) * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki * wip Signed-off-by: Mior Muhammad Zaki --------- Signed-off-by: Mior Muhammad Zaki --- .github/workflows/collision-tests.yaml | 16 +++++++++++----- .github/workflows/parallel-tests.yaml | 22 ++++++++++++++-------- src/Concerns/HandlesRoutes.php | 4 ++-- src/Foundation/Console/TestCommand.php | 2 ++ src/Foundation/ParallelRunner.php | 6 ++++++ tests/CacheRouteTest.php | 20 +++----------------- tests/InlineCacheRouteTest.php | 20 +++----------------- 7 files changed, 41 insertions(+), 49 deletions(-) diff --git a/.github/workflows/collision-tests.yaml b/.github/workflows/collision-tests.yaml index 51583ea33..e7b3751f6 100644 --- a/.github/workflows/collision-tests.yaml +++ b/.github/workflows/collision-tests.yaml @@ -24,7 +24,7 @@ jobs: - "highest" - "lowest" experimental: - - true + - false include: - phpunit: "9.x" collision: "^6.4" @@ -59,19 +59,25 @@ jobs: run: | composer show -D - - name: Execute tests (with deprecations) + - name: Execute tests (with deprecations on PHPUnit 10) run: ./testbench package:test --exclude-group commander if: matrix.dependencies == 'highest' && matrix.phpunit == '10.x' - - name: Execute tests (with deprecations) + - name: Execute tests (with deprecations on PHPUnit 9) run: ./testbench package:test -c phpunit9.xml --exclude-group commander if: matrix.dependencies == 'highest' && matrix.phpunit == '9.x' - - name: Execute tests (without deprecations) + - name: Execute tests (without deprecations on PHPUnit 10) run: ./testbench package:test --exclude-group commander,deprecations env: TESTBENCH_CONVERT_DEPRECATIONS_TO_EXCEPTIONS: false - if: matrix.dependencies != 'highest' + if: matrix.dependencies != 'highest' && matrix.phpunit == '10.x' + + - name: Execute tests (without deprecations on PHPUnit 9) + run: ./testbench package:test -c phpunit9.xml --exclude-group commander,deprecations + env: + TESTBENCH_CONVERT_DEPRECATIONS_TO_EXCEPTIONS: false + if: matrix.dependencies != 'highest' && matrix.phpunit == '9.x' tests-with-coverage: runs-on: ${{ matrix.os }} diff --git a/.github/workflows/parallel-tests.yaml b/.github/workflows/parallel-tests.yaml index 8dff8e309..27b343679 100644 --- a/.github/workflows/parallel-tests.yaml +++ b/.github/workflows/parallel-tests.yaml @@ -19,12 +19,12 @@ jobs: - 8.2 phpunit: - "9.x" - # - "10.x" + - "10.x" dependencies: - "highest" - "lowest" experimental: - - true + - false name: PHP${{ matrix.php }} with PHPUnit${{ matrix.phpunit }} on ${{ matrix.os }} (${{ matrix.dependencies }}) @@ -63,16 +63,22 @@ jobs: run: | composer show -D - - name: Execute tests (with deprecations) - run: ./testbench package:test --parallel --exclude-group commander + - name: Execute tests (with deprecations on PHPUnit 10) + run: ./testbench package:test --parallel --exclude-group commander,without-parallel if: matrix.dependencies == 'highest' && matrix.phpunit == '10.x' - - name: Execute tests (with deprecations) + - name: Execute tests (with deprecations on PHPUnit 9) run: ./testbench package:test -c phpunit9.xml --parallel --exclude-group commander if: matrix.dependencies == 'highest' && matrix.phpunit == '9.x' - - name: Execute tests (without deprecations) - run: ./testbench package:test --parallel --exclude-group commander,deprecations + - name: Execute tests (without deprecations on PHPUnit 10) + run: ./testbench package:test --parallel --exclude-group commander,deprecations,without-parallel env: TESTBENCH_CONVERT_DEPRECATIONS_TO_EXCEPTIONS: false - if: matrix.dependencies != 'highest' + if: matrix.dependencies != 'highest' && matrix.phpunit == '10.x' + + - name: Execute tests (without deprecations on PHPUnit 9) + run: ./testbench package:test -c phpunit9.xml --parallel --exclude-group commander,deprecations + env: + TESTBENCH_CONVERT_DEPRECATIONS_TO_EXCEPTIONS: false + if: matrix.dependencies != 'highest'&& matrix.phpunit == '9.x' diff --git a/src/Concerns/HandlesRoutes.php b/src/Concerns/HandlesRoutes.php index d5a12128f..05d82ee6a 100644 --- a/src/Concerns/HandlesRoutes.php +++ b/src/Concerns/HandlesRoutes.php @@ -72,7 +72,7 @@ protected function defineCacheRoutes(string $route) $time = time(); - $laravel = Application::create($this->getBasePath()); + $laravel = Application::create(static::applicationBasePath()); $files->put( $laravel->basePath("routes/testbench-{$time}.php"), $route @@ -106,7 +106,7 @@ protected function requireApplicationCachedRoutes(Filesystem $files): void if ($this->app instanceof LaravelApplication) { $files->delete( $this->app->bootstrapPath('cache/routes-v7.php'), - ...$files->glob(base_path('routes/testbench-*.php')) + ...$files->glob($this->app->basePath('routes/testbench-*.php')) ); } diff --git a/src/Foundation/Console/TestCommand.php b/src/Foundation/Console/TestCommand.php index 8a4b84ce6..c0bfd8a32 100644 --- a/src/Foundation/Console/TestCommand.php +++ b/src/Foundation/Console/TestCommand.php @@ -121,6 +121,8 @@ protected function paratestEnvironmentVariables() { return array_merge([ 'TESTBENCH_PACKAGE_TESTER' => 1, + 'TESTBENCH_WORKING_PATH' => TESTBENCH_WORKING_PATH, + 'APP_BASE_PATH' => $this->laravel->basePath(), ], parent::paratestEnvironmentVariables()); } } diff --git a/src/Foundation/ParallelRunner.php b/src/Foundation/ParallelRunner.php index 5830b60d2..38e83a301 100644 --- a/src/Foundation/ParallelRunner.php +++ b/src/Foundation/ParallelRunner.php @@ -13,6 +13,12 @@ class ParallelRunner extends \Illuminate\Testing\ParallelRunner */ protected function createApplication() { + if (! \defined('TESTBENCH_WORKING_PATH')) { + \define('TESTBENCH_WORKING_PATH', $_SERVER['TESTBENCH_WORKING_PATH']); + } + + $_ENV['APP_BASE_PATH'] = $_SERVER['APP_BASE_PATH']; + return container()->createApplication(); } } diff --git a/tests/CacheRouteTest.php b/tests/CacheRouteTest.php index 58ea9f385..e09a6db0b 100644 --- a/tests/CacheRouteTest.php +++ b/tests/CacheRouteTest.php @@ -2,18 +2,10 @@ namespace Orchestra\Testbench\Tests; -use Orchestra\Testbench\Concerns\InteractsWithPublishedFiles; use Orchestra\Testbench\TestCase; class CacheRouteTest extends TestCase { - use InteractsWithPublishedFiles; - - protected $files = [ - 'routes/testbench.php', - 'bootstrap/cache/routes-v7.php', - ]; - /** * Setup the test environment. */ @@ -29,16 +21,10 @@ protected function setUp(): void } /** - * Teardown the test environment. + * @test + * + * @group without-parallel */ - protected function tearDown(): void - { - $this->tearDownInteractsWithPublishedFiles(); - - parent::tearDown(); - } - - /** @test */ public function it_can_cache_route() { $this->get('stubs-controller') diff --git a/tests/InlineCacheRouteTest.php b/tests/InlineCacheRouteTest.php index e24dce021..c8b5db1b0 100644 --- a/tests/InlineCacheRouteTest.php +++ b/tests/InlineCacheRouteTest.php @@ -2,29 +2,15 @@ namespace Orchestra\Testbench\Tests; -use Orchestra\Testbench\Concerns\InteractsWithPublishedFiles; use Orchestra\Testbench\TestCase; class InlineCacheRouteTest extends TestCase { - use InteractsWithPublishedFiles; - - protected $files = [ - 'routes/testbench.php', - 'bootstrap/cache/routes-v7.php', - ]; - /** - * Teardown the test environment. + * @test + * + * @group without-parallel */ - protected function tearDown(): void - { - $this->tearDownInteractsWithPublishedFiles(); - - parent::tearDown(); - } - - /** @test */ public function it_can_cache_route() { $this->defineCacheRoutes(<< Date: Tue, 7 Feb 2023 15:13:51 +0800 Subject: [PATCH 0060/1591] wip Signed-off-by: Mior Muhammad Zaki --- src/Foundation/ParallelRunner.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Foundation/ParallelRunner.php b/src/Foundation/ParallelRunner.php index 38e83a301..32e8c87fc 100644 --- a/src/Foundation/ParallelRunner.php +++ b/src/Foundation/ParallelRunner.php @@ -19,6 +19,10 @@ protected function createApplication() $_ENV['APP_BASE_PATH'] = $_SERVER['APP_BASE_PATH']; - return container()->createApplication(); + $applicationResolver = static::$applicationResolver ?: function () { + return container()->createApplication(); + }; + + return $applicationResolver(); } } From dd8359deb5d5f6d29fc9ecbc283922866e769e2a Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Wed, 8 Feb 2023 07:55:09 +0800 Subject: [PATCH 0061/1591] wip Signed-off-by: Mior Muhammad Zaki --- phpstan-baseline.neon | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 43536839a..f9f4ec342 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,17 +1,27 @@ parameters: ignoreErrors: - - message: "#^Access to an undefined property Spatie\\\\Ray\\\\Settings\\\\Settings\\:\\:\\$send_duplicate_queries_to_ray\\.$#" - count: 1 + message: "#^Access to property \\$send_duplicate_queries_to_ray on an unknown class Spatie\\\\Ray\\\\Settings\\\\Settings\\.$#" + count: 2 + path: src/Bootstrap/ConfigureRay.php + + - + message: "#^Access to property \\$send_queries_to_ray on an unknown class Spatie\\\\Ray\\\\Settings\\\\Settings\\.$#" + count: 2 + path: src/Bootstrap/ConfigureRay.php + + - + message: "#^Access to property \\$send_slow_queries_to_ray on an unknown class Spatie\\\\Ray\\\\Settings\\\\Settings\\.$#" + count: 2 path: src/Bootstrap/ConfigureRay.php - - message: "#^Access to an undefined property Spatie\\\\Ray\\\\Settings\\\\Settings\\:\\:\\$send_queries_to_ray\\.$#" + message: "#^Class Spatie\\\\Ray\\\\Settings\\\\Settings not found\\.$#" count: 1 path: src/Bootstrap/ConfigureRay.php - - message: "#^Access to an undefined property Spatie\\\\Ray\\\\Settings\\\\Settings\\:\\:\\$send_slow_queries_to_ray\\.$#" + message: "#^Parameter \\$callback of method Orchestra\\\\Testbench\\\\Bootstrap\\\\ConfigureRay\\:\\:callAfterResolvingSettings\\(\\) has invalid type Spatie\\\\Ray\\\\Settings\\\\Settings\\.$#" count: 1 path: src/Bootstrap/ConfigureRay.php From da4240d43f4e92c21b52418f20dfa8808b85533c Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Wed, 8 Feb 2023 07:56:07 +0800 Subject: [PATCH 0062/1591] wip Signed-off-by: Mior Muhammad Zaki --- .github/workflows/collision-tests.yaml | 252 ++++++++++++------------- .github/workflows/tests.yaml | 1 - 2 files changed, 126 insertions(+), 127 deletions(-) diff --git a/.github/workflows/collision-tests.yaml b/.github/workflows/collision-tests.yaml index 7f8510303..c5bf05a5f 100644 --- a/.github/workflows/collision-tests.yaml +++ b/.github/workflows/collision-tests.yaml @@ -1,128 +1,128 @@ name: collision-tests -on: - push: - pull_request: - schedule: - - cron: '0 0 1 * *' - -jobs: - tests: - runs-on: ${{ matrix.os }} - continue-on-error: ${{ matrix.experimental }} - strategy: - matrix: - os: - - "ubuntu-latest" - php: - - 8.2 - phpunit: - - "9.x" - - "10.x" - dependencies: - - "highest" - - "lowest" - experimental: - - false - include: - - phpunit: "9.x" - collision: "^6.4" - - phpunit: "10.x" - collision: "^7.0" - - name: PHP${{ matrix.php }} with PHPUnit${{ matrix.phpunit }} on ${{ matrix.os }} (${{ matrix.dependencies }}) - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, mysql, mysqli, pdo_mysql, bcmath, intl, fileinfo - coverage: none - - - name: Install PHPUnit ${{ matrix.phpunit }} - run: | - composer require "phpunit/phpunit:${{ matrix.phpunit }}" --no-interaction --no-update - composer require "nunomaduro/collision:${{ matrix.collision }}" --dev --no-interaction --no-update - - - name: Install dependencies - uses: "ramsey/composer-install@v2" - with: - dependency-versions: "${{ matrix.dependencies }}" - composer-options: "--prefer-dist --no-cache" - - - name: Installed dependencies - run: | - composer show -D - - - name: Execute tests (with deprecations on PHPUnit 10) - run: ./testbench package:test --exclude-group commander - if: matrix.dependencies == 'highest' && matrix.phpunit == '10.x' - - - name: Execute tests (with deprecations on PHPUnit 9) - run: ./testbench package:test -c phpunit9.xml --exclude-group commander - if: matrix.dependencies == 'highest' && matrix.phpunit == '9.x' - - - name: Execute tests (without deprecations on PHPUnit 10) - run: ./testbench package:test --exclude-group commander,deprecations - env: - TESTBENCH_CONVERT_DEPRECATIONS_TO_EXCEPTIONS: false - if: matrix.dependencies != 'highest' && matrix.phpunit == '10.x' - - - name: Execute tests (without deprecations on PHPUnit 9) - run: ./testbench package:test -c phpunit9.xml --exclude-group commander,deprecations - env: - TESTBENCH_CONVERT_DEPRECATIONS_TO_EXCEPTIONS: false - if: matrix.dependencies != 'highest' && matrix.phpunit == '9.x' - - tests-with-coverage: - runs-on: ${{ matrix.os }} - continue-on-error: ${{ matrix.experimental }} - strategy: - matrix: - os: - - "ubuntu-latest" - php: - - 8.1 - - 8.2 - phpunit: - - "9.x" - dependencies: - - "highest" - experimental: - - false - include: - - phpunit: "9.x" - collision: "^6.4" - - name: PHP${{ matrix.php }} with PHPUnit${{ matrix.phpunit }} on ${{ matrix.os }} (${{ matrix.dependencies }}) with Coverage - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, mysql, mysqli, pdo_mysql, bcmath, intl, fileinfo - coverage: xdebug - - - name: Install PHPUnit ${{ matrix.phpunit }} - run: | - composer require "phpunit/phpunit:${{ matrix.phpunit }}" --no-interaction --no-update - composer require "nunomaduro/collision:${{ matrix.collision }}" --dev --no-interaction --no-update - - - name: Install dependencies - uses: "ramsey/composer-install@v2" - with: - dependency-versions: "${{ matrix.dependencies }}" - composer-options: "--prefer-dist --no-cache" - - - name: Execute tests - run: ./testbench package:test --coverage --exclude-group commander,deprecations - env: - TESTBENCH_CONVERT_DEPRECATIONS_TO_EXCEPTIONS: false +# on: +# push: +# pull_request: +# schedule: +# - cron: '0 0 1 * *' + +# jobs: +# tests: +# runs-on: ${{ matrix.os }} +# continue-on-error: ${{ matrix.experimental }} +# strategy: +# matrix: +# os: +# - "ubuntu-latest" +# php: +# - 8.2 +# phpunit: +# - "9.x" +# - "10.x" +# dependencies: +# - "highest" +# - "lowest" +# experimental: +# - false +# include: +# - phpunit: "9.x" +# collision: "^6.4" +# - phpunit: "10.x" +# collision: "^7.0" + +# name: PHP${{ matrix.php }} with PHPUnit${{ matrix.phpunit }} on ${{ matrix.os }} (${{ matrix.dependencies }}) + +# steps: +# - name: Checkout code +# uses: actions/checkout@v3 + +# - name: Setup PHP +# uses: shivammathur/setup-php@v2 +# with: +# php-version: ${{ matrix.php }} +# extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, mysql, mysqli, pdo_mysql, bcmath, intl, fileinfo +# coverage: none + +# - name: Install PHPUnit ${{ matrix.phpunit }} +# run: | +# composer require "phpunit/phpunit:${{ matrix.phpunit }}" --no-interaction --no-update +# composer require "nunomaduro/collision:${{ matrix.collision }}" --dev --no-interaction --no-update + +# - name: Install dependencies +# uses: "ramsey/composer-install@v2" +# with: +# dependency-versions: "${{ matrix.dependencies }}" +# composer-options: "--prefer-dist --no-cache" + +# - name: Installed dependencies +# run: | +# composer show -D + +# - name: Execute tests (with deprecations on PHPUnit 10) +# run: ./testbench package:test --exclude-group commander +# if: matrix.dependencies == 'highest' && matrix.phpunit == '10.x' + +# - name: Execute tests (with deprecations on PHPUnit 9) +# run: ./testbench package:test -c phpunit9.xml --exclude-group commander +# if: matrix.dependencies == 'highest' && matrix.phpunit == '9.x' + +# - name: Execute tests (without deprecations on PHPUnit 10) +# run: ./testbench package:test --exclude-group commander,deprecations +# env: +# TESTBENCH_CONVERT_DEPRECATIONS_TO_EXCEPTIONS: false +# if: matrix.dependencies != 'highest' && matrix.phpunit == '10.x' + +# - name: Execute tests (without deprecations on PHPUnit 9) +# run: ./testbench package:test -c phpunit9.xml --exclude-group commander,deprecations +# env: +# TESTBENCH_CONVERT_DEPRECATIONS_TO_EXCEPTIONS: false +# if: matrix.dependencies != 'highest' && matrix.phpunit == '9.x' + +# tests-with-coverage: +# runs-on: ${{ matrix.os }} +# continue-on-error: ${{ matrix.experimental }} +# strategy: +# matrix: +# os: +# - "ubuntu-latest" +# php: +# - 8.1 +# - 8.2 +# phpunit: +# - "9.x" +# dependencies: +# - "highest" +# experimental: +# - false +# include: +# - phpunit: "9.x" +# collision: "^6.4" + +# name: PHP${{ matrix.php }} with PHPUnit${{ matrix.phpunit }} on ${{ matrix.os }} (${{ matrix.dependencies }}) with Coverage + +# steps: +# - name: Checkout code +# uses: actions/checkout@v3 + +# - name: Setup PHP +# uses: shivammathur/setup-php@v2 +# with: +# php-version: ${{ matrix.php }} +# extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, mysql, mysqli, pdo_mysql, bcmath, intl, fileinfo +# coverage: xdebug + +# - name: Install PHPUnit ${{ matrix.phpunit }} +# run: | +# composer require "phpunit/phpunit:${{ matrix.phpunit }}" --no-interaction --no-update +# composer require "nunomaduro/collision:${{ matrix.collision }}" --dev --no-interaction --no-update + +# - name: Install dependencies +# uses: "ramsey/composer-install@v2" +# with: +# dependency-versions: "${{ matrix.dependencies }}" +# composer-options: "--prefer-dist --no-cache" + +# - name: Execute tests +# run: ./testbench package:test --coverage --exclude-group commander,deprecations +# env: +# TESTBENCH_CONVERT_DEPRECATIONS_TO_EXCEPTIONS: false diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 63febb605..83dae79a0 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -71,7 +71,6 @@ jobs: - "ubuntu-latest" - "windows-latest" php: - - 8.1 - 8.2 phpunit: - "10.x" From 2dd51060a7eee4c213746887df0acc3e11d9b355 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Wed, 8 Feb 2023 07:57:15 +0800 Subject: [PATCH 0063/1591] wip Signed-off-by: Mior Muhammad Zaki --- .github/workflows/parallel-tests.yaml | 136 +++++++++++++------------- 1 file changed, 68 insertions(+), 68 deletions(-) diff --git a/.github/workflows/parallel-tests.yaml b/.github/workflows/parallel-tests.yaml index 45e661d6f..2dc2f69f4 100644 --- a/.github/workflows/parallel-tests.yaml +++ b/.github/workflows/parallel-tests.yaml @@ -1,83 +1,83 @@ name: parallel-tests -on: - push: - pull_request: - schedule: - - cron: '0 0 1 * *' +# on: +# push: +# pull_request: +# schedule: +# - cron: '0 0 1 * *' -jobs: - tests: - runs-on: ${{ matrix.os }} - continue-on-error: ${{ matrix.experimental }} - strategy: - matrix: - os: - - "ubuntu-latest" - php: - - 8.2 - phpunit: - - "9.x" - - "10.x" - dependencies: - - "highest" - - "lowest" - experimental: - - false +# jobs: +# tests: +# runs-on: ${{ matrix.os }} +# continue-on-error: ${{ matrix.experimental }} +# strategy: +# matrix: +# os: +# - "ubuntu-latest" +# php: +# - 8.2 +# phpunit: +# - "9.x" +# - "10.x" +# dependencies: +# - "highest" +# - "lowest" +# experimental: +# - false - name: PHP${{ matrix.php }} with PHPUnit${{ matrix.phpunit }} on ${{ matrix.os }} (${{ matrix.dependencies }}) +# name: PHP${{ matrix.php }} with PHPUnit${{ matrix.phpunit }} on ${{ matrix.os }} (${{ matrix.dependencies }}) - steps: - - name: Checkout code - uses: actions/checkout@v3 +# steps: +# - name: Checkout code +# uses: actions/checkout@v3 - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, mysql, mysqli, pdo_mysql, bcmath, intl, fileinfo - coverage: none +# - name: Setup PHP +# uses: shivammathur/setup-php@v2 +# with: +# php-version: ${{ matrix.php }} +# extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, mysql, mysqli, pdo_mysql, bcmath, intl, fileinfo +# coverage: none - - name: Install PHPUnit ${{ matrix.phpunit }} - run: | - composer require "phpunit/phpunit:${{ matrix.phpunit }}" --no-interaction --no-update +# - name: Install PHPUnit ${{ matrix.phpunit }} +# run: | +# composer require "phpunit/phpunit:${{ matrix.phpunit }}" --no-interaction --no-update - - name: Install Paratest (for PHPUnit 9.x) - run: | - composer require "nunomaduro/collision:^6.4" "brianium/paratest:^6.4" --dev --no-interaction --no-update - if: matrix.phpunit == '9.x' +# - name: Install Paratest (for PHPUnit 9.x) +# run: | +# composer require "nunomaduro/collision:^6.4" "brianium/paratest:^6.4" --dev --no-interaction --no-update +# if: matrix.phpunit == '9.x' - - name: Install Paratest (for PHPUnit 9.x) - run: | - composer require "nunomaduro/collision:^7.0" "brianium/paratest:^7.0" --dev --no-interaction --no-update - if: matrix.phpunit == '10.x' +# - name: Install Paratest (for PHPUnit 9.x) +# run: | +# composer require "nunomaduro/collision:^7.0" "brianium/paratest:^7.0" --dev --no-interaction --no-update +# if: matrix.phpunit == '10.x' - - name: Install dependencies - uses: "ramsey/composer-install@v2" - with: - dependency-versions: "${{ matrix.dependencies }}" - composer-options: "--prefer-dist --no-cache" +# - name: Install dependencies +# uses: "ramsey/composer-install@v2" +# with: +# dependency-versions: "${{ matrix.dependencies }}" +# composer-options: "--prefer-dist --no-cache" - - name: Installed dependencies - run: | - composer show -D +# - name: Installed dependencies +# run: | +# composer show -D - - name: Execute tests (with deprecations on PHPUnit 10) - run: ./testbench package:test --parallel --exclude-group commander,without-parallel - if: matrix.dependencies == 'highest' && matrix.phpunit == '10.x' +# - name: Execute tests (with deprecations on PHPUnit 10) +# run: ./testbench package:test --parallel --exclude-group commander,without-parallel +# if: matrix.dependencies == 'highest' && matrix.phpunit == '10.x' - - name: Execute tests (with deprecations on PHPUnit 9) - run: ./testbench package:test -c phpunit9.xml --parallel --exclude-group commander - if: matrix.dependencies == 'highest' && matrix.phpunit == '9.x' +# - name: Execute tests (with deprecations on PHPUnit 9) +# run: ./testbench package:test -c phpunit9.xml --parallel --exclude-group commander +# if: matrix.dependencies == 'highest' && matrix.phpunit == '9.x' - - name: Execute tests (without deprecations on PHPUnit 10) - run: ./testbench package:test --parallel --exclude-group commander,deprecations,without-parallel - env: - TESTBENCH_CONVERT_DEPRECATIONS_TO_EXCEPTIONS: false - if: matrix.dependencies != 'highest' && matrix.phpunit == '10.x' +# - name: Execute tests (without deprecations on PHPUnit 10) +# run: ./testbench package:test --parallel --exclude-group commander,deprecations,without-parallel +# env: +# TESTBENCH_CONVERT_DEPRECATIONS_TO_EXCEPTIONS: false +# if: matrix.dependencies != 'highest' && matrix.phpunit == '10.x' - - name: Execute tests (without deprecations on PHPUnit 9) - run: ./testbench package:test -c phpunit9.xml --parallel --exclude-group commander,deprecations - env: - TESTBENCH_CONVERT_DEPRECATIONS_TO_EXCEPTIONS: false - if: matrix.dependencies != 'highest'&& matrix.phpunit == '9.x' +# - name: Execute tests (without deprecations on PHPUnit 9) +# run: ./testbench package:test -c phpunit9.xml --parallel --exclude-group commander,deprecations +# env: +# TESTBENCH_CONVERT_DEPRECATIONS_TO_EXCEPTIONS: false +# if: matrix.dependencies != 'highest'&& matrix.phpunit == '9.x' From 1fab4d3c318f51329096230dc6361180f0cd821a Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Wed, 8 Feb 2023 07:59:54 +0800 Subject: [PATCH 0064/1591] wip Signed-off-by: Mior Muhammad Zaki --- .github/workflows/collision-tests.yaml | 252 ++++++++++++------------- .github/workflows/parallel-tests.yaml | 136 ++++++------- 2 files changed, 194 insertions(+), 194 deletions(-) diff --git a/.github/workflows/collision-tests.yaml b/.github/workflows/collision-tests.yaml index c5bf05a5f..7eb0ae594 100644 --- a/.github/workflows/collision-tests.yaml +++ b/.github/workflows/collision-tests.yaml @@ -1,128 +1,128 @@ name: collision-tests -# on: -# push: -# pull_request: -# schedule: -# - cron: '0 0 1 * *' - -# jobs: -# tests: -# runs-on: ${{ matrix.os }} -# continue-on-error: ${{ matrix.experimental }} -# strategy: -# matrix: -# os: -# - "ubuntu-latest" -# php: -# - 8.2 -# phpunit: -# - "9.x" -# - "10.x" -# dependencies: -# - "highest" -# - "lowest" -# experimental: -# - false -# include: -# - phpunit: "9.x" -# collision: "^6.4" -# - phpunit: "10.x" -# collision: "^7.0" - -# name: PHP${{ matrix.php }} with PHPUnit${{ matrix.phpunit }} on ${{ matrix.os }} (${{ matrix.dependencies }}) - -# steps: -# - name: Checkout code -# uses: actions/checkout@v3 - -# - name: Setup PHP -# uses: shivammathur/setup-php@v2 -# with: -# php-version: ${{ matrix.php }} -# extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, mysql, mysqli, pdo_mysql, bcmath, intl, fileinfo -# coverage: none - -# - name: Install PHPUnit ${{ matrix.phpunit }} -# run: | -# composer require "phpunit/phpunit:${{ matrix.phpunit }}" --no-interaction --no-update -# composer require "nunomaduro/collision:${{ matrix.collision }}" --dev --no-interaction --no-update - -# - name: Install dependencies -# uses: "ramsey/composer-install@v2" -# with: -# dependency-versions: "${{ matrix.dependencies }}" -# composer-options: "--prefer-dist --no-cache" - -# - name: Installed dependencies -# run: | -# composer show -D - -# - name: Execute tests (with deprecations on PHPUnit 10) -# run: ./testbench package:test --exclude-group commander -# if: matrix.dependencies == 'highest' && matrix.phpunit == '10.x' - -# - name: Execute tests (with deprecations on PHPUnit 9) -# run: ./testbench package:test -c phpunit9.xml --exclude-group commander -# if: matrix.dependencies == 'highest' && matrix.phpunit == '9.x' - -# - name: Execute tests (without deprecations on PHPUnit 10) -# run: ./testbench package:test --exclude-group commander,deprecations -# env: -# TESTBENCH_CONVERT_DEPRECATIONS_TO_EXCEPTIONS: false -# if: matrix.dependencies != 'highest' && matrix.phpunit == '10.x' - -# - name: Execute tests (without deprecations on PHPUnit 9) -# run: ./testbench package:test -c phpunit9.xml --exclude-group commander,deprecations -# env: -# TESTBENCH_CONVERT_DEPRECATIONS_TO_EXCEPTIONS: false -# if: matrix.dependencies != 'highest' && matrix.phpunit == '9.x' - -# tests-with-coverage: -# runs-on: ${{ matrix.os }} -# continue-on-error: ${{ matrix.experimental }} -# strategy: -# matrix: -# os: -# - "ubuntu-latest" -# php: -# - 8.1 -# - 8.2 -# phpunit: -# - "9.x" -# dependencies: -# - "highest" -# experimental: -# - false -# include: -# - phpunit: "9.x" -# collision: "^6.4" - -# name: PHP${{ matrix.php }} with PHPUnit${{ matrix.phpunit }} on ${{ matrix.os }} (${{ matrix.dependencies }}) with Coverage - -# steps: -# - name: Checkout code -# uses: actions/checkout@v3 - -# - name: Setup PHP -# uses: shivammathur/setup-php@v2 -# with: -# php-version: ${{ matrix.php }} -# extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, mysql, mysqli, pdo_mysql, bcmath, intl, fileinfo -# coverage: xdebug - -# - name: Install PHPUnit ${{ matrix.phpunit }} -# run: | -# composer require "phpunit/phpunit:${{ matrix.phpunit }}" --no-interaction --no-update -# composer require "nunomaduro/collision:${{ matrix.collision }}" --dev --no-interaction --no-update - -# - name: Install dependencies -# uses: "ramsey/composer-install@v2" -# with: -# dependency-versions: "${{ matrix.dependencies }}" -# composer-options: "--prefer-dist --no-cache" - -# - name: Execute tests -# run: ./testbench package:test --coverage --exclude-group commander,deprecations -# env: -# TESTBENCH_CONVERT_DEPRECATIONS_TO_EXCEPTIONS: false +on: + push: + pull_request: + schedule: + - cron: '0 0 1 * *' + +jobs: + tests: + runs-on: ${{ matrix.os }} + continue-on-error: ${{ matrix.experimental }} + strategy: + matrix: + os: + - "ubuntu-latest" + php: + - 8.2 + phpunit: + - "9.x" + - "10.x" + dependencies: + - "highest" + - "lowest" + experimental: + - true + include: + - phpunit: "9.x" + collision: "^6.4" + - phpunit: "10.x" + collision: "^7.0" + + name: PHP${{ matrix.php }} with PHPUnit${{ matrix.phpunit }} on ${{ matrix.os }} (${{ matrix.dependencies }}) + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, mysql, mysqli, pdo_mysql, bcmath, intl, fileinfo + coverage: none + + - name: Install PHPUnit ${{ matrix.phpunit }} + run: | + composer require "phpunit/phpunit:${{ matrix.phpunit }}" --no-interaction --no-update + composer require "nunomaduro/collision:${{ matrix.collision }}" --dev --no-interaction --no-update + + - name: Install dependencies + uses: "ramsey/composer-install@v2" + with: + dependency-versions: "${{ matrix.dependencies }}" + composer-options: "--prefer-dist --no-cache" + + - name: Installed dependencies + run: | + composer show -D + + - name: Execute tests (with deprecations on PHPUnit 10) + run: ./testbench package:test --exclude-group commander + if: matrix.dependencies == 'highest' && matrix.phpunit == '10.x' + + - name: Execute tests (with deprecations on PHPUnit 9) + run: ./testbench package:test -c phpunit9.xml --exclude-group commander + if: matrix.dependencies == 'highest' && matrix.phpunit == '9.x' + + - name: Execute tests (without deprecations on PHPUnit 10) + run: ./testbench package:test --exclude-group commander,deprecations + env: + TESTBENCH_CONVERT_DEPRECATIONS_TO_EXCEPTIONS: false + if: matrix.dependencies != 'highest' && matrix.phpunit == '10.x' + + - name: Execute tests (without deprecations on PHPUnit 9) + run: ./testbench package:test -c phpunit9.xml --exclude-group commander,deprecations + env: + TESTBENCH_CONVERT_DEPRECATIONS_TO_EXCEPTIONS: false + if: matrix.dependencies != 'highest' && matrix.phpunit == '9.x' + + tests-with-coverage: + runs-on: ${{ matrix.os }} + continue-on-error: ${{ matrix.experimental }} + strategy: + matrix: + os: + - "ubuntu-latest" + php: + - 8.1 + - 8.2 + phpunit: + - "9.x" + dependencies: + - "highest" + experimental: + - true + include: + - phpunit: "9.x" + collision: "^6.4" + + name: PHP${{ matrix.php }} with PHPUnit${{ matrix.phpunit }} on ${{ matrix.os }} (${{ matrix.dependencies }}) with Coverage + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, mysql, mysqli, pdo_mysql, bcmath, intl, fileinfo + coverage: xdebug + + - name: Install PHPUnit ${{ matrix.phpunit }} + run: | + composer require "phpunit/phpunit:${{ matrix.phpunit }}" --no-interaction --no-update + composer require "nunomaduro/collision:${{ matrix.collision }}" --dev --no-interaction --no-update + + - name: Install dependencies + uses: "ramsey/composer-install@v2" + with: + dependency-versions: "${{ matrix.dependencies }}" + composer-options: "--prefer-dist --no-cache" + + - name: Execute tests + run: ./testbench package:test --coverage --exclude-group commander,deprecations + env: + TESTBENCH_CONVERT_DEPRECATIONS_TO_EXCEPTIONS: false diff --git a/.github/workflows/parallel-tests.yaml b/.github/workflows/parallel-tests.yaml index 2dc2f69f4..4032263b6 100644 --- a/.github/workflows/parallel-tests.yaml +++ b/.github/workflows/parallel-tests.yaml @@ -1,83 +1,83 @@ name: parallel-tests -# on: -# push: -# pull_request: -# schedule: -# - cron: '0 0 1 * *' +on: + push: + pull_request: + schedule: + - cron: '0 0 1 * *' -# jobs: -# tests: -# runs-on: ${{ matrix.os }} -# continue-on-error: ${{ matrix.experimental }} -# strategy: -# matrix: -# os: -# - "ubuntu-latest" -# php: -# - 8.2 -# phpunit: -# - "9.x" -# - "10.x" -# dependencies: -# - "highest" -# - "lowest" -# experimental: -# - false +jobs: + tests: + runs-on: ${{ matrix.os }} + continue-on-error: ${{ matrix.experimental }} + strategy: + matrix: + os: + - "ubuntu-latest" + php: + - 8.2 + phpunit: + - "9.x" + - "10.x" + dependencies: + - "highest" + - "lowest" + experimental: + - true -# name: PHP${{ matrix.php }} with PHPUnit${{ matrix.phpunit }} on ${{ matrix.os }} (${{ matrix.dependencies }}) + name: PHP${{ matrix.php }} with PHPUnit${{ matrix.phpunit }} on ${{ matrix.os }} (${{ matrix.dependencies }}) -# steps: -# - name: Checkout code -# uses: actions/checkout@v3 + steps: + - name: Checkout code + uses: actions/checkout@v3 -# - name: Setup PHP -# uses: shivammathur/setup-php@v2 -# with: -# php-version: ${{ matrix.php }} -# extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, mysql, mysqli, pdo_mysql, bcmath, intl, fileinfo -# coverage: none + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, mysql, mysqli, pdo_mysql, bcmath, intl, fileinfo + coverage: none -# - name: Install PHPUnit ${{ matrix.phpunit }} -# run: | -# composer require "phpunit/phpunit:${{ matrix.phpunit }}" --no-interaction --no-update + - name: Install PHPUnit ${{ matrix.phpunit }} + run: | + composer require "phpunit/phpunit:${{ matrix.phpunit }}" --no-interaction --no-update -# - name: Install Paratest (for PHPUnit 9.x) -# run: | -# composer require "nunomaduro/collision:^6.4" "brianium/paratest:^6.4" --dev --no-interaction --no-update -# if: matrix.phpunit == '9.x' + - name: Install Paratest (for PHPUnit 9.x) + run: | + composer require "nunomaduro/collision:^6.4" "brianium/paratest:^6.4" --dev --no-interaction --no-update + if: matrix.phpunit == '9.x' -# - name: Install Paratest (for PHPUnit 9.x) -# run: | -# composer require "nunomaduro/collision:^7.0" "brianium/paratest:^7.0" --dev --no-interaction --no-update -# if: matrix.phpunit == '10.x' + - name: Install Paratest (for PHPUnit 9.x) + run: | + composer require "nunomaduro/collision:^7.0" "brianium/paratest:^7.0" --dev --no-interaction --no-update + if: matrix.phpunit == '10.x' -# - name: Install dependencies -# uses: "ramsey/composer-install@v2" -# with: -# dependency-versions: "${{ matrix.dependencies }}" -# composer-options: "--prefer-dist --no-cache" + - name: Install dependencies + uses: "ramsey/composer-install@v2" + with: + dependency-versions: "${{ matrix.dependencies }}" + composer-options: "--prefer-dist --no-cache" -# - name: Installed dependencies -# run: | -# composer show -D + - name: Installed dependencies + run: | + composer show -D -# - name: Execute tests (with deprecations on PHPUnit 10) -# run: ./testbench package:test --parallel --exclude-group commander,without-parallel -# if: matrix.dependencies == 'highest' && matrix.phpunit == '10.x' + - name: Execute tests (with deprecations on PHPUnit 10) + run: ./testbench package:test --parallel --exclude-group commander,without-parallel + if: matrix.dependencies == 'highest' && matrix.phpunit == '10.x' -# - name: Execute tests (with deprecations on PHPUnit 9) -# run: ./testbench package:test -c phpunit9.xml --parallel --exclude-group commander -# if: matrix.dependencies == 'highest' && matrix.phpunit == '9.x' + - name: Execute tests (with deprecations on PHPUnit 9) + run: ./testbench package:test -c phpunit9.xml --parallel --exclude-group commander + if: matrix.dependencies == 'highest' && matrix.phpunit == '9.x' -# - name: Execute tests (without deprecations on PHPUnit 10) -# run: ./testbench package:test --parallel --exclude-group commander,deprecations,without-parallel -# env: -# TESTBENCH_CONVERT_DEPRECATIONS_TO_EXCEPTIONS: false -# if: matrix.dependencies != 'highest' && matrix.phpunit == '10.x' + - name: Execute tests (without deprecations on PHPUnit 10) + run: ./testbench package:test --parallel --exclude-group commander,deprecations,without-parallel + env: + TESTBENCH_CONVERT_DEPRECATIONS_TO_EXCEPTIONS: false + if: matrix.dependencies != 'highest' && matrix.phpunit == '10.x' -# - name: Execute tests (without deprecations on PHPUnit 9) -# run: ./testbench package:test -c phpunit9.xml --parallel --exclude-group commander,deprecations -# env: -# TESTBENCH_CONVERT_DEPRECATIONS_TO_EXCEPTIONS: false -# if: matrix.dependencies != 'highest'&& matrix.phpunit == '9.x' + - name: Execute tests (without deprecations on PHPUnit 9) + run: ./testbench package:test -c phpunit9.xml --parallel --exclude-group commander,deprecations + env: + TESTBENCH_CONVERT_DEPRECATIONS_TO_EXCEPTIONS: false + if: matrix.dependencies != 'highest'&& matrix.phpunit == '9.x' From 18dc89adbcad535f31548c681bb1cb1d80191691 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Wed, 8 Feb 2023 10:25:20 +0800 Subject: [PATCH 0065/1591] wip Signed-off-by: Mior Muhammad Zaki --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index b84b9ec8b..8bc147fdd 100644 --- a/composer.json +++ b/composer.json @@ -55,7 +55,7 @@ "nunomaduro/collision": "Allow using Laravel style tests output and parallel testing (^6.4 || ^7.0).", "orchestra/testbench-browser-kit": "Allow using legacy Laravel BrowserKit for testing (^8.0).", "orchestra/testbench-dusk": "Allow using Laravel Dusk for testing (^8.0).", - "phpunit/phpunit": "Allow using PHPUnit for testing (^9.5.27 || ^10.0).", + "phpunit/phpunit": "Allow using PHPUnit for testing (^9.6 || ^10.0).", "symfony/yaml": "Required for CLI Commander (^6.2).", "vlucas/phpdotenv": "Required for CLI Commander (^5.5.0)." }, From 48350224a42ac7311d3bf4b995bdd2232e4fac9c Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Wed, 8 Feb 2023 10:35:14 +0800 Subject: [PATCH 0066/1591] wip Signed-off-by: Mior Muhammad Zaki --- laravel/.env.example | 2 +- laravel/config/app.php | 2 +- laravel/lang/en/auth.php | 20 ---- laravel/lang/en/pagination.php | 19 ---- laravel/lang/en/passwords.php | 22 ---- laravel/lang/en/validation.php | 184 --------------------------------- src/Factories/UserFactory.php | 2 - sync.sh | 4 +- 8 files changed, 4 insertions(+), 251 deletions(-) delete mode 100644 laravel/lang/en/auth.php delete mode 100644 laravel/lang/en/pagination.php delete mode 100644 laravel/lang/en/passwords.php delete mode 100644 laravel/lang/en/validation.php diff --git a/laravel/.env.example b/laravel/.env.example index cdb75f936..a4a020518 100644 --- a/laravel/.env.example +++ b/laravel/.env.example @@ -29,7 +29,7 @@ REDIS_PASSWORD=null REDIS_PORT=6379 MAIL_MAILER=smtp -MAIL_HOST=mailpit +MAIL_HOST=mailhog MAIL_PORT=1025 MAIL_USERNAME=null MAIL_PASSWORD=null diff --git a/laravel/config/app.php b/laravel/config/app.php index 75372239a..e6dc1b629 100644 --- a/laravel/config/app.php +++ b/laravel/config/app.php @@ -56,7 +56,7 @@ 'url' => env('APP_URL', 'http://localhost'), - 'asset_url' => env('ASSET_URL'), + 'asset_url' => env('ASSET_URL', '/'), /* |-------------------------------------------------------------------------- diff --git a/laravel/lang/en/auth.php b/laravel/lang/en/auth.php deleted file mode 100644 index 6598e2c06..000000000 --- a/laravel/lang/en/auth.php +++ /dev/null @@ -1,20 +0,0 @@ - 'These credentials do not match our records.', - 'password' => 'The provided password is incorrect.', - 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', - -]; diff --git a/laravel/lang/en/pagination.php b/laravel/lang/en/pagination.php deleted file mode 100644 index d48141187..000000000 --- a/laravel/lang/en/pagination.php +++ /dev/null @@ -1,19 +0,0 @@ - '« Previous', - 'next' => 'Next »', - -]; diff --git a/laravel/lang/en/passwords.php b/laravel/lang/en/passwords.php deleted file mode 100644 index 2345a56b5..000000000 --- a/laravel/lang/en/passwords.php +++ /dev/null @@ -1,22 +0,0 @@ - 'Your password has been reset!', - 'sent' => 'We have emailed your password reset link!', - 'throttled' => 'Please wait before retrying.', - 'token' => 'This password reset token is invalid.', - 'user' => "We can't find a user with that email address.", - -]; diff --git a/laravel/lang/en/validation.php b/laravel/lang/en/validation.php deleted file mode 100644 index 70407c9d9..000000000 --- a/laravel/lang/en/validation.php +++ /dev/null @@ -1,184 +0,0 @@ - 'The :attribute must be accepted.', - 'accepted_if' => 'The :attribute must be accepted when :other is :value.', - 'active_url' => 'The :attribute is not a valid URL.', - 'after' => 'The :attribute must be a date after :date.', - 'after_or_equal' => 'The :attribute must be a date after or equal to :date.', - 'alpha' => 'The :attribute must only contain letters.', - 'alpha_dash' => 'The :attribute must only contain letters, numbers, dashes and underscores.', - 'alpha_num' => 'The :attribute must only contain letters and numbers.', - 'array' => 'The :attribute must be an array.', - 'ascii' => 'The :attribute must only contain single-byte alphanumeric characters and symbols.', - 'before' => 'The :attribute must be a date before :date.', - 'before_or_equal' => 'The :attribute must be a date before or equal to :date.', - 'between' => [ - 'array' => 'The :attribute must have between :min and :max items.', - 'file' => 'The :attribute must be between :min and :max kilobytes.', - 'numeric' => 'The :attribute must be between :min and :max.', - 'string' => 'The :attribute must be between :min and :max characters.', - ], - 'boolean' => 'The :attribute field must be true or false.', - 'confirmed' => 'The :attribute confirmation does not match.', - 'current_password' => 'The password is incorrect.', - 'date' => 'The :attribute is not a valid date.', - 'date_equals' => 'The :attribute must be a date equal to :date.', - 'date_format' => 'The :attribute does not match the format :format.', - 'decimal' => 'The :attribute must have :decimal decimal places.', - 'declined' => 'The :attribute must be declined.', - 'declined_if' => 'The :attribute must be declined when :other is :value.', - 'different' => 'The :attribute and :other must be different.', - 'digits' => 'The :attribute must be :digits digits.', - 'digits_between' => 'The :attribute must be between :min and :max digits.', - 'dimensions' => 'The :attribute has invalid image dimensions.', - 'distinct' => 'The :attribute field has a duplicate value.', - 'doesnt_end_with' => 'The :attribute may not end with one of the following: :values.', - 'doesnt_start_with' => 'The :attribute may not start with one of the following: :values.', - 'email' => 'The :attribute must be a valid email address.', - 'ends_with' => 'The :attribute must end with one of the following: :values.', - 'enum' => 'The selected :attribute is invalid.', - 'exists' => 'The selected :attribute is invalid.', - 'file' => 'The :attribute must be a file.', - 'filled' => 'The :attribute field must have a value.', - 'gt' => [ - 'array' => 'The :attribute must have more than :value items.', - 'file' => 'The :attribute must be greater than :value kilobytes.', - 'numeric' => 'The :attribute must be greater than :value.', - 'string' => 'The :attribute must be greater than :value characters.', - ], - 'gte' => [ - 'array' => 'The :attribute must have :value items or more.', - 'file' => 'The :attribute must be greater than or equal to :value kilobytes.', - 'numeric' => 'The :attribute must be greater than or equal to :value.', - 'string' => 'The :attribute must be greater than or equal to :value characters.', - ], - 'image' => 'The :attribute must be an image.', - 'in' => 'The selected :attribute is invalid.', - 'in_array' => 'The :attribute field does not exist in :other.', - 'integer' => 'The :attribute must be an integer.', - 'ip' => 'The :attribute must be a valid IP address.', - 'ipv4' => 'The :attribute must be a valid IPv4 address.', - 'ipv6' => 'The :attribute must be a valid IPv6 address.', - 'json' => 'The :attribute must be a valid JSON string.', - 'lowercase' => 'The :attribute must be lowercase.', - 'lt' => [ - 'array' => 'The :attribute must have less than :value items.', - 'file' => 'The :attribute must be less than :value kilobytes.', - 'numeric' => 'The :attribute must be less than :value.', - 'string' => 'The :attribute must be less than :value characters.', - ], - 'lte' => [ - 'array' => 'The :attribute must not have more than :value items.', - 'file' => 'The :attribute must be less than or equal to :value kilobytes.', - 'numeric' => 'The :attribute must be less than or equal to :value.', - 'string' => 'The :attribute must be less than or equal to :value characters.', - ], - 'mac_address' => 'The :attribute must be a valid MAC address.', - 'max' => [ - 'array' => 'The :attribute must not have more than :max items.', - 'file' => 'The :attribute must not be greater than :max kilobytes.', - 'numeric' => 'The :attribute must not be greater than :max.', - 'string' => 'The :attribute must not be greater than :max characters.', - ], - 'max_digits' => 'The :attribute must not have more than :max digits.', - 'mimes' => 'The :attribute must be a file of type: :values.', - 'mimetypes' => 'The :attribute must be a file of type: :values.', - 'min' => [ - 'array' => 'The :attribute must have at least :min items.', - 'file' => 'The :attribute must be at least :min kilobytes.', - 'numeric' => 'The :attribute must be at least :min.', - 'string' => 'The :attribute must be at least :min characters.', - ], - 'min_digits' => 'The :attribute must have at least :min digits.', - 'missing' => 'The :attribute field must be missing.', - 'missing_if' => 'The :attribute field must be missing when :other is :value.', - 'missing_unless' => 'The :attribute field must be missing unless :other is :value.', - 'missing_with' => 'The :attribute field must be missing when :values is present.', - 'missing_with_all' => 'The :attribute field must be missing when :values are present.', - 'multiple_of' => 'The :attribute must be a multiple of :value.', - 'not_in' => 'The selected :attribute is invalid.', - 'not_regex' => 'The :attribute format is invalid.', - 'numeric' => 'The :attribute must be a number.', - 'password' => [ - 'letters' => 'The :attribute must contain at least one letter.', - 'mixed' => 'The :attribute must contain at least one uppercase and one lowercase letter.', - 'numbers' => 'The :attribute must contain at least one number.', - 'symbols' => 'The :attribute must contain at least one symbol.', - 'uncompromised' => 'The given :attribute has appeared in a data leak. Please choose a different :attribute.', - ], - 'present' => 'The :attribute field must be present.', - 'prohibited' => 'The :attribute field is prohibited.', - 'prohibited_if' => 'The :attribute field is prohibited when :other is :value.', - 'prohibited_unless' => 'The :attribute field is prohibited unless :other is in :values.', - 'prohibits' => 'The :attribute field prohibits :other from being present.', - 'regex' => 'The :attribute format is invalid.', - 'required' => 'The :attribute field is required.', - 'required_array_keys' => 'The :attribute field must contain entries for: :values.', - 'required_if' => 'The :attribute field is required when :other is :value.', - 'required_if_accepted' => 'The :attribute field is required when :other is accepted.', - 'required_unless' => 'The :attribute field is required unless :other is in :values.', - 'required_with' => 'The :attribute field is required when :values is present.', - 'required_with_all' => 'The :attribute field is required when :values are present.', - 'required_without' => 'The :attribute field is required when :values is not present.', - 'required_without_all' => 'The :attribute field is required when none of :values are present.', - 'same' => 'The :attribute and :other must match.', - 'size' => [ - 'array' => 'The :attribute must contain :size items.', - 'file' => 'The :attribute must be :size kilobytes.', - 'numeric' => 'The :attribute must be :size.', - 'string' => 'The :attribute must be :size characters.', - ], - 'starts_with' => 'The :attribute must start with one of the following: :values.', - 'string' => 'The :attribute must be a string.', - 'timezone' => 'The :attribute must be a valid timezone.', - 'unique' => 'The :attribute has already been taken.', - 'uploaded' => 'The :attribute failed to upload.', - 'uppercase' => 'The :attribute must be uppercase.', - 'url' => 'The :attribute must be a valid URL.', - 'ulid' => 'The :attribute must be a valid ULID.', - 'uuid' => 'The :attribute must be a valid UUID.', - - /* - |-------------------------------------------------------------------------- - | Custom Validation Language Lines - |-------------------------------------------------------------------------- - | - | Here you may specify custom validation messages for attributes using the - | convention "attribute.rule" to name the lines. This makes it quick to - | specify a specific custom language line for a given attribute rule. - | - */ - - 'custom' => [ - 'attribute-name' => [ - 'rule-name' => 'custom-message', - ], - ], - - /* - |-------------------------------------------------------------------------- - | Custom Validation Attributes - |-------------------------------------------------------------------------- - | - | The following language lines are used to swap our attribute placeholder - | with something more reader friendly such as "E-Mail Address" instead - | of "email". This simply helps us make our message more expressive. - | - */ - - 'attributes' => [], - -]; diff --git a/src/Factories/UserFactory.php b/src/Factories/UserFactory.php index c5fa352ab..c28c10c85 100644 --- a/src/Factories/UserFactory.php +++ b/src/Factories/UserFactory.php @@ -37,8 +37,6 @@ public function definition(): array /** * Indicate that the model's email address should be unverified. - * - * @return static */ public function unverified(): static { diff --git a/sync.sh b/sync.sh index dc24036b7..f3ac5ccb7 100755 --- a/sync.sh +++ b/sync.sh @@ -8,9 +8,9 @@ cp -rf skeleton/database/.gitignore laravel/database/.gitignore cp -rf skeleton/database/migrations/2014_10_12_000000_create_users_table.php laravel/migrations/2014_10_12_000000_testbench_create_users_table.php cp -rf skeleton/database/migrations/2014_10_12_100000_create_password_reset_tokens_table.php laravel/migrations/2014_10_12_100000_testbench_create_password_reset_tokens_table.php cp -rf skeleton/database/migrations/2019_08_19_000000_create_failed_jobs_table.php laravel/migrations/2019_08_19_000000_testbench_create_failed_jobs_table.php -cp -rf skeleton/lang/en/*.php laravel/lang/en/ -cp -rf skeleton/resources/views/* laravel/resources/views/ +# cp -rf skeleton/lang/en/*.php laravel/lang/en/ # cp -f skeleton/lang/*.json laravel/lang/ +cp -rf skeleton/resources/views/* laravel/resources/views/ cp -rf skeleton/database/factories/*.php src/Factories/ cp -rf vendor/laravel/framework/src/Illuminate/Foundation/resources/server.php laravel/server.php cp -rf skeleton/public/index.php laravel/public/index.php From 626f6841e016651af48eabef9f507620b198c76c Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Wed, 8 Feb 2023 10:38:51 +0800 Subject: [PATCH 0067/1591] wip Signed-off-by: Mior Muhammad Zaki --- .github/workflows/parallel-tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/parallel-tests.yaml b/.github/workflows/parallel-tests.yaml index 27b343679..1e70c97ca 100644 --- a/.github/workflows/parallel-tests.yaml +++ b/.github/workflows/parallel-tests.yaml @@ -57,7 +57,7 @@ jobs: uses: "ramsey/composer-install@v2" with: dependency-versions: "${{ matrix.dependencies }}" - composer-options: "--prefer-dist --no-cache" + composer-options: "--prefer-dist --no-cache --prefer-stable" - name: Installed dependencies run: | From 5fd4ed69886fbbb3e51e4e4885edb5f42e0a2139 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Wed, 8 Feb 2023 10:41:49 +0800 Subject: [PATCH 0068/1591] wip Signed-off-by: Mior Muhammad Zaki --- .github/workflows/collision-tests.yaml | 4 ++-- .github/workflows/parallel-tests.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/collision-tests.yaml b/.github/workflows/collision-tests.yaml index e7b3751f6..28d87d996 100644 --- a/.github/workflows/collision-tests.yaml +++ b/.github/workflows/collision-tests.yaml @@ -53,7 +53,7 @@ jobs: uses: "ramsey/composer-install@v2" with: dependency-versions: "${{ matrix.dependencies }}" - composer-options: "--prefer-dist --no-cache" + composer-options: "--prefer-dist --prefer-stable --no-cache" - name: Installed dependencies run: | @@ -121,7 +121,7 @@ jobs: uses: "ramsey/composer-install@v2" with: dependency-versions: "${{ matrix.dependencies }}" - composer-options: "--prefer-dist --no-cache" + composer-options: "--prefer-dist --prefer-stable --no-cache" - name: Execute tests run: ./testbench package:test --coverage --exclude-group commander,deprecations diff --git a/.github/workflows/parallel-tests.yaml b/.github/workflows/parallel-tests.yaml index 1e70c97ca..a6cc0b42b 100644 --- a/.github/workflows/parallel-tests.yaml +++ b/.github/workflows/parallel-tests.yaml @@ -57,7 +57,7 @@ jobs: uses: "ramsey/composer-install@v2" with: dependency-versions: "${{ matrix.dependencies }}" - composer-options: "--prefer-dist --no-cache --prefer-stable" + composer-options: "--prefer-dist --prefer-stable --no-cache" - name: Installed dependencies run: | From 89cb71c9007ceac88ce9c6318e639d7ee7370a39 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Thu, 9 Feb 2023 08:31:37 +0800 Subject: [PATCH 0069/1591] wip Signed-off-by: Mior Muhammad Zaki --- laravel/.env.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/laravel/.env.example b/laravel/.env.example index a4a020518..cdb75f936 100644 --- a/laravel/.env.example +++ b/laravel/.env.example @@ -29,7 +29,7 @@ REDIS_PASSWORD=null REDIS_PORT=6379 MAIL_MAILER=smtp -MAIL_HOST=mailhog +MAIL_HOST=mailpit MAIL_PORT=1025 MAIL_USERNAME=null MAIL_PASSWORD=null From da83c0611bb16bfb7805c37ed9ba3ac5345bf980 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Sun, 12 Feb 2023 12:49:57 +0800 Subject: [PATCH 0070/1591] wip Signed-off-by: Mior Muhammad Zaki --- laravel/resources/views/welcome.blade.php | 156 ++++++++++++---------- 1 file changed, 82 insertions(+), 74 deletions(-) diff --git a/laravel/resources/views/welcome.blade.php b/laravel/resources/views/welcome.blade.php index 9faad4e85..b33283698 100644 --- a/laravel/resources/views/welcome.blade.php +++ b/laravel/resources/views/welcome.blade.php @@ -7,122 +7,130 @@ Laravel - + + - - -
+
@if (Route::has('login')) -