Skip to content

Commit

Permalink
Merge pull request #33 from acsiomatic/dep-compat-policy
Browse files Browse the repository at this point in the history
Update to maintained dependencies
  • Loading branch information
renanbr committed Feb 8, 2024
2 parents 2e3a2cf + 47ff4f7 commit d7041e2
Show file tree
Hide file tree
Showing 35 changed files with 360 additions and 499 deletions.
3 changes: 0 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,3 @@ trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[Makefile]
indent_style = tab
6 changes: 3 additions & 3 deletions .github/workflows/composer-normalizer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@ on:

jobs:

rector:
composer-normalizer:

name: Composer Normalizer
runs-on: ubuntu-latest

steps:

- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup tools
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
php-version: 8.2
tools: composer-normalize
coverage: none

Expand Down
10 changes: 3 additions & 7 deletions .github/workflows/php-cs-fixer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,23 @@ jobs:
steps:

- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup tools
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
php-version: 8.2
tools: cs2pr
coverage: none

- name: Install Composer dependencies
uses: ramsey/composer-install@v2

- name: Create var/ directory
run: mkdir var

- name: Cache PHP Coding Standards
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: var/.php_cs.cache
key: php-cs-fixer-${{ github.sha }}
restore-keys: php-cs-fixer-

- name: Run PHP Coding Standards
run: vendor/bin/php-cs-fixer fix --dry-run --format=checkstyle | cs2pr
7 changes: 3 additions & 4 deletions .github/workflows/phpstan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,23 @@ jobs:
steps:

- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup tools
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
php-version: 8.2
tools: cs2pr
coverage: none

- name: Install Composer dependencies
uses: ramsey/composer-install@v2

- name: Cache PHPStan
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: var/phpstan/
key: phpstan-${{ github.sha }}
restore-keys: phpstan-

- name: Run PHP Static Analysis
run: vendor/bin/phpstan analyse --no-progress --error-format=checkstyle | cs2pr
24 changes: 8 additions & 16 deletions .github/workflows/phpunit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,19 @@ jobs:

name: DD ${{ matrix.dd }} SF ${{ matrix.sf }} PHP ${{ matrix.php }}
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.is_next }}

strategy:
fail-fast: false
matrix:
include:
- { dd: '4.0.*', sf: '4.0.*', php: '7.2' }
- { dd: '^4.0', sf: '^4.0', php: '7.2' }
- { dd: '4.0.*', sf: '5.0.*', php: '7.3' }
- { dd: '^4.0', sf: '^5.0', php: '7.3' }
- { dd: '5.0.*', sf: '5.0.*', php: '7.4' }
- { dd: '^5.0', sf: '^5.0', php: '7.4' }
- { dd: '5.0.*', sf: '6.0.*', php: '8.0' }
- { dd: '^5.0', sf: '^6.0', php: '8.0' }
- { dd: '5.0.*', sf: '6.0.*', php: '8.1' }
- { dd: '^5.0', sf: '^6.0', php: '8.1' }
- { dd: '6.0.*', sf: '6.0.*', php: '8.1' }
- { dd: '^6.0', sf: '^6.0', php: '8.1' }
- { dd: '6.1.*', sf: '5.4.*', php: '8.1', is_next: false }
- { dd: '6.1.*', sf: '6.4.*', php: '8.2', is_next: false }
- { dd: '6.1.*', sf: '7.0.*', php: '8.3', is_next: false }

steps:

- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -46,10 +38,10 @@ jobs:
coverage: none

- name: Require specific dependencies versions
run: composer require matomo/device-detector:${{ matrix.dd }} symfony/framework-bundle:${{ matrix.sf }}
run: composer require -w matomo/device-detector:${{ matrix.dd }} symfony/framework-bundle:${{ matrix.sf }}

- name: Install Composer dependencies
uses: ramsey/composer-install@v2

- name: Run PHPUnit
run: vendor/bin/phpunit --testdox
run: vendor/bin/phpunit
4 changes: 2 additions & 2 deletions .github/workflows/rector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ jobs:
steps:

- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup tools
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
php-version: 8.2
coverage: none

- name: Install Composer dependencies
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/.php-cs-fixer.php
/Makefile
/composer.lock
/phpstan.neon
/phpunit.xml
Expand Down
23 changes: 8 additions & 15 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
<?php

$finder = PhpCsFixer\Finder::create()
->in([
__DIR__.'/src',
__DIR__.'/tests',
]);

return (new PhpCsFixer\Config())
->setCacheFile(__DIR__.'/var/.php_cs.cache')
->setCacheFile(__DIR__ . '/var/.php_cs.cache')
->setRiskyAllowed(true)
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
'method_chaining_indentation' => true,
'ordered_class_elements' => true,
'php_unit_test_case_static_method_calls' => true,
'static_lambda' => true,
'yoda_style' => false,
'@PER-CS' => true,
'@PER-CS:risky' => true,
'no_unused_imports' => true,
])
->setFinder($finder);
->setFinder(PhpCsFixer\Finder::create()->in([
__DIR__ . '/src',
__DIR__ . '/tests',
]));
55 changes: 0 additions & 55 deletions Makefile

This file was deleted.

Loading

0 comments on commit d7041e2

Please sign in to comment.