From fac38dffd3edb40ab289d0225b6f31d608d72849 Mon Sep 17 00:00:00 2001 From: Andrey Helldar Date: Wed, 15 Feb 2023 13:29:34 +0300 Subject: [PATCH] Added Laravel 10 support --- .github/workflows/code-style.yml | 35 +++++++++++++++++ .github/workflows/laravel-6.yml | 31 --------------- .github/workflows/laravel-7.yml | 31 --------------- .github/workflows/laravel-8.yml | 31 --------------- .github/workflows/laravel-9.yml | 31 --------------- .github/workflows/lint-check.yml | 14 ------- .github/workflows/lint-fixer.yml | 19 --------- .github/workflows/phpunit.yml | 59 ++++++++++++++++++++++++++++ .styleci.yml | 67 -------------------------------- composer.json | 14 +++---- 10 files changed, 101 insertions(+), 231 deletions(-) create mode 100644 .github/workflows/code-style.yml delete mode 100644 .github/workflows/laravel-6.yml delete mode 100644 .github/workflows/laravel-7.yml delete mode 100644 .github/workflows/laravel-8.yml delete mode 100644 .github/workflows/laravel-9.yml delete mode 100644 .github/workflows/lint-check.yml delete mode 100644 .github/workflows/lint-fixer.yml create mode 100644 .github/workflows/phpunit.yml delete mode 100644 .styleci.yml diff --git a/.github/workflows/code-style.yml b/.github/workflows/code-style.yml new file mode 100644 index 0000000..665db2e --- /dev/null +++ b/.github/workflows/code-style.yml @@ -0,0 +1,35 @@ +name: code-style + +on: + push: + pull_request: + +permissions: write-all + +jobs: + check: + if: ${{ ! (github.event_name == 'push' && github.ref == 'refs/heads/main') }} + + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Checking PHP Syntax + uses: TheDragonCode/codestyler@v2.6.2 + + fix: + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} + + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Checking PHP Syntax + uses: TheDragonCode/codestyler@v2.6.2 + with: + github_token: ${{ secrets.COMPOSER_TOKEN }} + fix: true diff --git a/.github/workflows/laravel-6.yml b/.github/workflows/laravel-6.yml deleted file mode 100644 index 05a4b51..0000000 --- a/.github/workflows/laravel-6.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: "Laravel 6" -on: [ push ] - -jobs: - phpunit: - runs-on: ubuntu-latest - - strategy: - fail-fast: true - matrix: - php: [ "7.3", "7.4", "8.0" ] - laravel: [ "6.0" ] - - name: PHP ${{ matrix.php }} - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: curl, mbstring, zip, pcntl, pdo, pdo_sqlite, iconv - coverage: none - - - name: Install dependencies - run: composer require laravel/framework:^${{ matrix.laravel }} - - - name: Execute tests - run: sudo vendor/bin/phpunit diff --git a/.github/workflows/laravel-7.yml b/.github/workflows/laravel-7.yml deleted file mode 100644 index 63ca88a..0000000 --- a/.github/workflows/laravel-7.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: "Laravel 7" -on: [ push ] - -jobs: - phpunit: - runs-on: ubuntu-latest - - strategy: - fail-fast: true - matrix: - php: [ "7.3", "7.4", "8.0" ] - laravel: [ "7.0" ] - - name: PHP ${{ matrix.php }} - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: curl, mbstring, zip, pcntl, pdo, pdo_sqlite, iconv - coverage: none - - - name: Install dependencies - run: composer require laravel/framework:^${{ matrix.laravel }} - - - name: Execute tests - run: sudo vendor/bin/phpunit diff --git a/.github/workflows/laravel-8.yml b/.github/workflows/laravel-8.yml deleted file mode 100644 index 7e15453..0000000 --- a/.github/workflows/laravel-8.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: "Laravel 8" -on: [ push ] - -jobs: - phpunit: - runs-on: ubuntu-latest - - strategy: - fail-fast: true - matrix: - php: [ "7.3", "7.4", "8.0", "8.1" ] - laravel: [ "8.0" ] - - name: PHP ${{ matrix.php }} - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: curl, mbstring, zip, pcntl, pdo, pdo_sqlite, iconv - coverage: none - - - name: Install dependencies - run: composer require laravel/framework:^${{ matrix.laravel }} - - - name: Execute tests - run: sudo vendor/bin/phpunit diff --git a/.github/workflows/laravel-9.yml b/.github/workflows/laravel-9.yml deleted file mode 100644 index a036af1..0000000 --- a/.github/workflows/laravel-9.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: "Laravel 9" -on: [ push ] - -jobs: - phpunit: - runs-on: ubuntu-latest - - strategy: - fail-fast: true - matrix: - php: [ "8.0", "8.1" ] - laravel: [ "9.0" ] - - name: PHP ${{ matrix.php }} - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: curl, mbstring, zip, pcntl, pdo, pdo_sqlite, iconv - coverage: none - - - name: Install dependencies - run: composer require laravel/framework:^${{ matrix.laravel }} - - - name: Execute tests - run: sudo vendor/bin/phpunit diff --git a/.github/workflows/lint-check.yml b/.github/workflows/lint-check.yml deleted file mode 100644 index cf847b8..0000000 --- a/.github/workflows/lint-check.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: "Code-Style Check" - -on: [ push, pull_request ] - -jobs: - check: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Checking PHP Syntax - uses: TheDragonCode/codestyler@v2.6.2 diff --git a/.github/workflows/lint-fixer.yml b/.github/workflows/lint-fixer.yml deleted file mode 100644 index 1663da7..0000000 --- a/.github/workflows/lint-fixer.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: "Code-Style Fixer" - -on: - push: - branches: [ main ] - -jobs: - fix: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Checking PHP Syntax - uses: TheDragonCode/codestyler@v2.6.2 - with: - github_token: ${{ secrets.COMPOSER_TOKEN }} - fix: true diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml new file mode 100644 index 0000000..b96c3f6 --- /dev/null +++ b/.github/workflows/phpunit.yml @@ -0,0 +1,59 @@ +name: phpunit + +on: [ push ] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + fail-fast: true + matrix: + php: [ "7.3", "7.4", "8.0", "8.1", "8.2" ] + laravel: [ "6.0", "7.0", "8.0", "9.0", "10.0" ] + exclude: + - laravel: "6.0" + php: "8.1" + + - laravel: "6.0" + php: "8.2" + + - laravel: "7.0" + php: "8.1" + + - laravel: "7.0" + php: "8.2" + + - laravel: "9.0" + php: "7.3" + + - laravel: "9.0" + php: "7.4" + + - laravel: "10.0" + php: "7.3" + + - laravel: "10.0" + php: "7.4" + + - laravel: "10.0" + php: "8.0" + + name: PHP ${{ matrix.php }}, Laravel ${{ matrix.laravel }} + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: curl, mbstring, zip, pcntl, pdo, pdo_sqlite, iconv + coverage: none + + - name: Install dependencies + run: composer require --dev laravel/framework:^${{ matrix.laravel }} + + - name: Execute tests + run: sudo vendor/bin/phpunit diff --git a/.styleci.yml b/.styleci.yml deleted file mode 100644 index cb07b4b..0000000 --- a/.styleci.yml +++ /dev/null @@ -1,67 +0,0 @@ -preset: psr12 - -risky: true - -enabled: - - align_double_arrow - - align_equals - - align_phpdoc - - alpha_ordered_imports - - binary_operator_spaces - - blank_line_before_continue - - blank_line_before_declare - - blank_line_before_return - - blank_line_before_throw - - blank_line_before_try - - cast_spaces - - combine_consecutive_issets - - const_separation - - dir_constant - - fully_qualified_strict_types - - logical_operators - - method_separation - - no_alias_functions - - no_blank_lines_after_phpdoc - - no_blank_lines_between_traits - - no_empty_comment - - no_empty_phpdoc - - no_extra_block_blank_lines - - no_extra_consecutive_blank_lines - - no_short_bool_cast - - no_trailing_comma_in_singleline_array - - no_unneeded_control_parentheses - - no_unused_imports - - ordered_class_elements - - php_unit_construct - - php_unit_fqcn_annotation - - phpdoc_indent - - phpdoc_inline_tag - - phpdoc_link_to_see - - phpdoc_no_access - - phpdoc_no_empty_return - - phpdoc_no_package - - phpdoc_no_useless_inheritdoc - - phpdoc_order - - phpdoc_property - - phpdoc_return_self_reference - - phpdoc_scalar - - phpdoc_separation - - phpdoc_summary - - phpdoc_to_comment - - phpdoc_trim - - phpdoc_type_to_var - - phpdoc_types - - phpdoc_types_order - - phpdoc_var_without_name - - property_separation - - self_accessor - - short_array_syntax - - short_list_syntax - - single_line_class_definition - - single_line_throw - - single_quote - - space_after_semicolon - - standardize_not_equals - - ternary_to_null_coalescing - - trailing_comma_in_multiline_array - - trim_array_spaces diff --git a/composer.json b/composer.json index f92a7c2..8022c2f 100644 --- a/composer.json +++ b/composer.json @@ -52,16 +52,16 @@ "dragon-code/laravel-routes-core": "^4.1 || ^5.0", "dragon-code/laravel-support": "^3.3", "dragon-code/support": "^5.6 || ^6.1", - "illuminate/contracts": "^6.0 || ^7.0 || ^8.0 || ^9.0", - "illuminate/http": "^6.0 || ^7.0 || ^8.0 || ^9.0", - "illuminate/routing": "^6.0 || ^7.0 || ^8.0 || ^9.0", - "illuminate/support": "^6.0 || ^7.0 || ^8.0 || ^9.0", - "illuminate/view": "^6.0 || ^7.0 || ^8.0 || ^9.0" + "illuminate/contracts": ">=6.0 <11.0", + "illuminate/http": ">=6.0 <11.0", + "illuminate/routing": ">=6.0 <11.0", + "illuminate/support": ">=6.0 <11.0", + "illuminate/view": ">=6.0 <11.0" }, "require-dev": { "mockery/mockery": "^1.0", - "orchestra/testbench": "^4.0 || ^5.0 || ^6.0 || ^7.0", - "phpunit/phpunit": "^8.0 || ^9.0" + "orchestra/testbench": ">=4.0 <9.0", + "phpunit/phpunit": "^8.0 || ^9.6" }, "conflict": { "garygreen/pretty-routes": "*"