From 73df14fa24b9b7342b67bc6f412e7b0d8079cb64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Umut=20I=C5=9F=C4=B1k?= Date: Mon, 14 Aug 2023 22:22:41 +0300 Subject: [PATCH 01/11] Add Laravel 10 support --- composer.json | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 303aa2f..acc396a 100644 --- a/composer.json +++ b/composer.json @@ -17,15 +17,14 @@ ], "require": { "php": "^7.4|^8.0|^8.1", - "illuminate/collections": "^9.0", - "illuminate/contracts": "^9.0", + "illuminate/collections": "^9.0|^10.0", + "illuminate/contracts": "^9.0|^10.0", "spatie/laravel-package-tools": "^1.4.3" }, "require-dev": { "brianium/paratest": "^6.2", "nunomaduro/collision": "^5.3", "phpunit/phpunit": "^9.3", - "spatie/laravel-ray": "^1.9", "squizlabs/php_codesniffer": "^3.6" }, "autoload": { @@ -55,4 +54,4 @@ }, "minimum-stability": "dev", "prefer-stable": true -} \ No newline at end of file +} From a898fc27ecf71bd2801f2209794df48657e84163 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Umut=20I=C5=9F=C4=B1k?= Date: Mon, 14 Aug 2023 22:28:00 +0300 Subject: [PATCH 02/11] Debug github actions --- .github/workflows/tests-new-versions.yml | 3 ++- .github/workflows/tests-old-versions.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests-new-versions.yml b/.github/workflows/tests-new-versions.yml index 92e3ac6..734338c 100644 --- a/.github/workflows/tests-new-versions.yml +++ b/.github/workflows/tests-new-versions.yml @@ -3,7 +3,6 @@ on: [push, pull_request] jobs: test: - runs-on: ${{ matrix.os }} strategy: fail-fast: true matrix: @@ -16,6 +15,8 @@ jobs: name: PHP${{ matrix.php }} - Laravel${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} + runs-on: ${{ matrix.os }} + steps: - name: Checkout code uses: actions/checkout@v2 diff --git a/.github/workflows/tests-old-versions.yml b/.github/workflows/tests-old-versions.yml index b205c84..d633811 100644 --- a/.github/workflows/tests-old-versions.yml +++ b/.github/workflows/tests-old-versions.yml @@ -3,7 +3,6 @@ on: [push, pull_request] jobs: test: - runs-on: ${{ matrix.os }} strategy: fail-fast: true matrix: @@ -16,6 +15,8 @@ jobs: name: PHP${{ matrix.php }} - Laravel${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} + runs-on: ${{ matrix.os }} + steps: - name: Checkout code uses: actions/checkout@v2 From 9e019c509605418e958dc8d579b4eacf5b19ebef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Umut=20I=C5=9F=C4=B1k?= Date: Mon, 14 Aug 2023 22:29:55 +0300 Subject: [PATCH 03/11] Update Github checks --- .github/workflows/basic-checks.yml | 2 +- .github/workflows/mardown-lint.yml | 31 ++++++++++++------------ .github/workflows/phpcs.yml | 14 +++++------ .github/workflows/tests-new-versions.yml | 4 +-- .github/workflows/tests-old-versions.yml | 4 +-- 5 files changed, 27 insertions(+), 28 deletions(-) diff --git a/.github/workflows/basic-checks.yml b/.github/workflows/basic-checks.yml index dea0bff..943b0ae 100644 --- a/.github/workflows/basic-checks.yml +++ b/.github/workflows/basic-checks.yml @@ -1,5 +1,5 @@ name: Basic Checks -on: [push, pull_request] +on: [push] jobs: node-docker: diff --git a/.github/workflows/mardown-lint.yml b/.github/workflows/mardown-lint.yml index 681e0da..32bbfcc 100644 --- a/.github/workflows/mardown-lint.yml +++ b/.github/workflows/mardown-lint.yml @@ -1,21 +1,20 @@ name: Markdown Linter -on: [push, pull_request] +on: [push] jobs: phpcs: - name: Lint MD Files - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Lint README - uses: nosborn/github-action-markdown-cli@v1.1.1 - with: - files: README.md - config_file: "./.github/markdown.config.json" - - name: Lint CONTRIBUTING - uses: nosborn/github-action-markdown-cli@v1.1.1 - with: - files: ./.github/CONTRIBUTING.md - config_file: "./.github/markdown.config.json" - + name: Lint MD Files + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Lint README + uses: nosborn/github-action-markdown-cli@v1.1.1 + with: + files: README.md + config_file: "./.github/markdown.config.json" + - name: Lint CONTRIBUTING + uses: nosborn/github-action-markdown-cli@v1.1.1 + with: + files: ./.github/CONTRIBUTING.md + config_file: "./.github/markdown.config.json" diff --git a/.github/workflows/phpcs.yml b/.github/workflows/phpcs.yml index bb36d3d..e9cc6d9 100644 --- a/.github/workflows/phpcs.yml +++ b/.github/workflows/phpcs.yml @@ -1,12 +1,12 @@ name: Codestyle Check -on: [push, pull_request] +on: [push] jobs: phpcs: - name: PHPCS - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: PHPCS check - uses: chekalsky/phpcs-action@v1 \ No newline at end of file + name: PHPCS + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: PHPCS check + uses: chekalsky/phpcs-action@v1 diff --git a/.github/workflows/tests-new-versions.yml b/.github/workflows/tests-new-versions.yml index 734338c..243de9d 100644 --- a/.github/workflows/tests-new-versions.yml +++ b/.github/workflows/tests-new-versions.yml @@ -1,5 +1,5 @@ name: Tests -on: [push, pull_request] +on: [pull_request] jobs: test: @@ -15,7 +15,7 @@ jobs: name: PHP${{ matrix.php }} - Laravel${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest steps: - name: Checkout code diff --git a/.github/workflows/tests-old-versions.yml b/.github/workflows/tests-old-versions.yml index d633811..3e77bc9 100644 --- a/.github/workflows/tests-old-versions.yml +++ b/.github/workflows/tests-old-versions.yml @@ -1,5 +1,5 @@ name: Tests -on: [push, pull_request] +on: [pull_request] jobs: test: @@ -15,7 +15,7 @@ jobs: name: PHP${{ matrix.php }} - Laravel${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest steps: - name: Checkout code From 47749b8089771101c244a127e757e625a1cb4090 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Umut=20I=C5=9F=C4=B1k?= Date: Mon, 14 Aug 2023 22:32:16 +0300 Subject: [PATCH 04/11] Fix Github action --- .github/workflows/tests-new-versions.yml | 2 +- .github/workflows/tests-old-versions.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests-new-versions.yml b/.github/workflows/tests-new-versions.yml index 243de9d..f8540c1 100644 --- a/.github/workflows/tests-new-versions.yml +++ b/.github/workflows/tests-new-versions.yml @@ -35,6 +35,6 @@ jobs: - name: Install dependencies run: | composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update - composer update --${{ matrix.stability }} --prefer-dist --no-interaction + composer install --${{ matrix.stability }} --prefer-dist --no-interaction - name: Execute tests run: vendor/bin/phpunit diff --git a/.github/workflows/tests-old-versions.yml b/.github/workflows/tests-old-versions.yml index 3e77bc9..ced9b3e 100644 --- a/.github/workflows/tests-old-versions.yml +++ b/.github/workflows/tests-old-versions.yml @@ -35,6 +35,6 @@ jobs: - name: Install dependencies run: | composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update - composer update --${{ matrix.stability }} --prefer-dist --no-interaction + composer install --${{ matrix.stability }} --prefer-dist --no-interaction - name: Execute tests run: vendor/bin/phpunit From a9b97dca15be464cfa40fb45aca676d7779d7fc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Umut=20I=C5=9F=C4=B1k?= Date: Mon, 14 Aug 2023 22:34:41 +0300 Subject: [PATCH 05/11] Fix Github Action --- .github/workflows/tests-new-versions.yml | 2 +- .github/workflows/tests-old-versions.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests-new-versions.yml b/.github/workflows/tests-new-versions.yml index f8540c1..163d336 100644 --- a/.github/workflows/tests-new-versions.yml +++ b/.github/workflows/tests-new-versions.yml @@ -34,7 +34,7 @@ jobs: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - name: Install dependencies run: | - composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update + composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update --prefer-lowest composer install --${{ matrix.stability }} --prefer-dist --no-interaction - name: Execute tests run: vendor/bin/phpunit diff --git a/.github/workflows/tests-old-versions.yml b/.github/workflows/tests-old-versions.yml index ced9b3e..b3387f8 100644 --- a/.github/workflows/tests-old-versions.yml +++ b/.github/workflows/tests-old-versions.yml @@ -34,7 +34,7 @@ jobs: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - name: Install dependencies run: | - composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update + composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update --prefer-lowest composer install --${{ matrix.stability }} --prefer-dist --no-interaction - name: Execute tests run: vendor/bin/phpunit From 24e9f9ea94c802948a6a1c42094be08faeda167a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Umut=20I=C5=9F=C4=B1k?= Date: Mon, 14 Aug 2023 22:37:30 +0300 Subject: [PATCH 06/11] Remove the github actions --- .github/workflows/tests-new-versions.yml | 40 ------------------------ .github/workflows/tests-old-versions.yml | 40 ------------------------ 2 files changed, 80 deletions(-) delete mode 100644 .github/workflows/tests-new-versions.yml delete mode 100644 .github/workflows/tests-old-versions.yml diff --git a/.github/workflows/tests-new-versions.yml b/.github/workflows/tests-new-versions.yml deleted file mode 100644 index 163d336..0000000 --- a/.github/workflows/tests-new-versions.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Tests -on: [pull_request] - -jobs: - test: - strategy: - fail-fast: true - matrix: - os: [ubuntu-latest, windows-latest] - php: [8.1] - laravel: [10.*] - stability: [prefer-lowest, prefer-stable] - include: - - laravel: 8.* - - name: PHP${{ matrix.php }} - Laravel${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} - - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo - coverage: none - - - name: Setup problem matchers - run: | - echo "::add-matcher::${{ runner.tool_cache }}/php.json" - echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - - name: Install dependencies - run: | - composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update --prefer-lowest - composer install --${{ matrix.stability }} --prefer-dist --no-interaction - - name: Execute tests - run: vendor/bin/phpunit diff --git a/.github/workflows/tests-old-versions.yml b/.github/workflows/tests-old-versions.yml deleted file mode 100644 index b3387f8..0000000 --- a/.github/workflows/tests-old-versions.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Tests -on: [pull_request] - -jobs: - test: - strategy: - fail-fast: true - matrix: - os: [ubuntu-latest, windows-latest] - php: [8.0] - laravel: [9.*] - stability: [prefer-lowest, prefer-stable] - include: - - laravel: 8.* - - name: PHP${{ matrix.php }} - Laravel${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} - - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo - coverage: none - - - name: Setup problem matchers - run: | - echo "::add-matcher::${{ runner.tool_cache }}/php.json" - echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - - name: Install dependencies - run: | - composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update --prefer-lowest - composer install --${{ matrix.stability }} --prefer-dist --no-interaction - - name: Execute tests - run: vendor/bin/phpunit From 77cdf1dfb30654ab46c94b5c00ab2717d2c0aaf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Umut=20I=C5=9F=C4=B1k?= Date: Mon, 14 Aug 2023 23:08:28 +0300 Subject: [PATCH 07/11] Add composer install package --- .github/workflows/composer-install.yml | 42 ++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/composer-install.yml diff --git a/.github/workflows/composer-install.yml b/.github/workflows/composer-install.yml new file mode 100644 index 0000000..e52d559 --- /dev/null +++ b/.github/workflows/composer-install.yml @@ -0,0 +1,42 @@ +name: Composer Install + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + phpunit: + name: PHPUnit + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + php-version: + - "7.4" + - "8.0" + - "8.1" + - "8.2" + dependency-versions: + - "lowest" + - "highest" + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + coverage: none + + - name: Install composer dependencies + uses: ramsey/composer-install@v2 + with: + dependency-versions: ${{ matrix.dependency-versions }} + + - name: Run PHPUnit + run: vendor/bin/phpunit tests From 641194cf601f7f12fca58fe53b0d2d50f70d6616 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Umut=20I=C5=9F=C4=B1k?= Date: Mon, 14 Aug 2023 23:10:13 +0300 Subject: [PATCH 08/11] Fix branch name --- .github/workflows/composer-install.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/composer-install.yml b/.github/workflows/composer-install.yml index e52d559..7f5ef72 100644 --- a/.github/workflows/composer-install.yml +++ b/.github/workflows/composer-install.yml @@ -1,10 +1,8 @@ name: Composer Install on: - push: - branches: [main] pull_request: - branches: [main] + branches: [master] jobs: phpunit: From 90c13a0cda3e8b2f5c0a0c144a8b3f80811621f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Umut=20I=C5=9F=C4=B1k?= Date: Mon, 14 Aug 2023 23:11:57 +0300 Subject: [PATCH 09/11] Fix PHP 7.4 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index acc396a..f58399f 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ ], "require": { "php": "^7.4|^8.0|^8.1", - "illuminate/collections": "^9.0|^10.0", + "illuminate/collections": "^8.0|^9.0|^10.0", "illuminate/contracts": "^9.0|^10.0", "spatie/laravel-package-tools": "^1.4.3" }, From 7e2a98f86be7aa6b3850aeba1f339782ce888ecd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Umut=20I=C5=9F=C4=B1k?= Date: Mon, 14 Aug 2023 23:14:37 +0300 Subject: [PATCH 10/11] Add version 8.0 to illuminate/contracts --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index f58399f..77449e7 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ "require": { "php": "^7.4|^8.0|^8.1", "illuminate/collections": "^8.0|^9.0|^10.0", - "illuminate/contracts": "^9.0|^10.0", + "illuminate/contracts": "^8.0|^9.0|^10.0", "spatie/laravel-package-tools": "^1.4.3" }, "require-dev": { From 24fcd3efe6f3b3a0d21e82ae44e33cf11cd3ac32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Umut=20I=C5=9F=C4=B1k?= Date: Mon, 14 Aug 2023 23:19:40 +0300 Subject: [PATCH 11/11] Rename action name --- .github/workflows/composer-install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/composer-install.yml b/.github/workflows/composer-install.yml index 7f5ef72..e4a8566 100644 --- a/.github/workflows/composer-install.yml +++ b/.github/workflows/composer-install.yml @@ -1,4 +1,4 @@ -name: Composer Install +name: Test In All PHP Versions on: pull_request: