From fe1c9cd48ee2c93795520fa251f8bfd2b7585b9d Mon Sep 17 00:00:00 2001 From: Andrey Helldar Date: Wed, 15 Feb 2023 12:49:23 +0300 Subject: [PATCH] Added Laravel 10 support --- .github/workflows/code-style.yml | 35 ++++++++++ .github/workflows/laravel-8.yml | 31 --------- .github/workflows/laravel-9.yml | 31 --------- .github/workflows/lint-check.yml | 14 ---- .github/workflows/lint-fixer.yml | 19 ------ .../workflows/{laravel-7.yml => phpunit.yml} | 22 ++++-- .styleci.yml | 67 ------------------- composer.json | 13 ++-- 8 files changed, 59 insertions(+), 173 deletions(-) create mode 100644 .github/workflows/code-style.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 rename .github/workflows/{laravel-7.yml => phpunit.yml} (53%) 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-8.yml b/.github/workflows/laravel-8.yml deleted file mode 100644 index 06d9b18..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: [ "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/laravel-7.yml b/.github/workflows/phpunit.yml similarity index 53% rename from .github/workflows/laravel-7.yml rename to .github/workflows/phpunit.yml index 81969ea..8eab492 100644 --- a/.github/workflows/laravel-7.yml +++ b/.github/workflows/phpunit.yml @@ -1,17 +1,27 @@ -name: "Laravel 7" +name: phpunit + on: [ push ] jobs: - phpunit: + build: runs-on: ubuntu-latest strategy: fail-fast: true matrix: - php: [ "8.0" ] - laravel: [ "7.0" ] + php: [ "8.0", "8.1", "8.2" ] + laravel: [ "7.0", "8.0", "9.0", "10.0" ] + exclude: + - laravel: "7.0" + php: "8.1" + + - laravel: "7.0" + php: "8.2" + + - laravel: "10.0" + php: "8.0" - name: PHP ${{ matrix.php }} + name: PHP ${{ matrix.php }}, Laravel ${{ matrix.laravel }} steps: - name: Checkout code @@ -25,7 +35,7 @@ jobs: coverage: none - name: Install dependencies - run: composer require laravel/framework:^${{ matrix.laravel }} + 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 8b05e17..d6c01df 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,10 @@ "keywords": [ "laravel", "routes", - "pretty" + "pretty", + "pretty-routes", + "route", + "routing" ], "authors": [ { @@ -41,14 +44,14 @@ "php": "^8.0", "dragon-code/contracts": "^2.6", "dragon-code/support": "^6.1", - "illuminate/routing": "^7.0 || ^8.0 || ^9.0", - "illuminate/support": "^7.0 || ^8.0 || ^9.0", + "illuminate/routing": "^7.0 || ^8.0 || ^9.0 || ^10.0", + "illuminate/support": "^7.0 || ^8.0 || ^9.0 || ^10.0", "phpdocumentor/reflection-docblock": "^5.0" }, "require-dev": { "mockery/mockery": "^1.0", - "orchestra/testbench": "^5.0 || ^6.0 || ^7.0", - "phpunit/phpunit": "^9.0" + "orchestra/testbench": "^5.0 || ^6.0 || ^7.0 || ^8.0", + "phpunit/phpunit": "^9.6" }, "conflict": { "andrey-helldar/laravel-routes-core": "*",