Skip to content

Commit

Permalink
use Events from Symfony EventDispatcher component
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-gribanov committed Jul 15, 2021
1 parent dfda921 commit 527ef5b
Show file tree
Hide file tree
Showing 33 changed files with 733 additions and 1,595 deletions.
47 changes: 4 additions & 43 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,58 +12,21 @@ jobs:
fail-fast: false
matrix:
include:
- php: '5.5'
symfony: '2.8.*'
doctrine: '2.4.*'
phpunit: '4.8.*'
- php: '5.6'
symfony: '2.8.*'
doctrine: '2.4.*'
phpunit: '4.8.*'
- php: '7.0'
symfony: '2.8.*'
doctrine: '2.4.*'
phpunit: '4.8.*'
- php: '7.1'
symfony: '2.8.*'
doctrine: '2.4.*'
phpunit: '6.5.*'
- php: '7.2'
symfony: '2.8.*'
doctrine: '2.4.*'
phpunit: '6.5.*'
- php: '7.3'
symfony: '3.4.*'
doctrine: '2.6.*'
phpunit: '6.5.*'
- php: '7.4'
symfony: '3.4.*'
doctrine: '2.6.*'
phpunit: '6.5.*'
- php: '5.5'
symfony: '2.8.*'
doctrine: '2.5.*'
phpunit: '4.8.*'
- php: '7.4'
symfony: '4.4.*'
doctrine: '2.6.*'
phpunit: '6.5.*'
- php: '7.4'
symfony: '5.*'
doctrine: '2.7.*'
phpunit: '6.5.*'
- php: '7.4'
symfony: '4.4.*'
doctrine: '2.7.*'
phpunit: '6.5.*'
- php: '7.4'
symfony: '4.4.*'
doctrine: '2.8.*'
phpunit: '6.5.*'
# # require PHPUnit >= 8.5.12
# - php: '8.0'
# symfony: '5.*'
# doctrine: '2.*'
- php: '8.0'
symfony: '5.*'
doctrine: '2.*'

steps:
- name: Checkout
Expand All @@ -82,9 +45,6 @@ jobs:
- name: Install Doctrine
run: composer require doctrine/orm:"${{ matrix.doctrine }}" --no-update

- name: Install PHPUnit
run: composer require phpunit/phpunit:"${{ matrix.phpunit }}" --no-update

- name: "Install Composer dependencies (highest)"
uses: "ramsey/composer-install@v1"
with:
Expand All @@ -95,6 +55,7 @@ jobs:
run: vendor/bin/phpunit --coverage-clover build/coverage-clover.xml

- name: Send coverage results to Scrutinizer CI
if: ${{ matrix.php != '8.0' }}
run: |
wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover build/coverage-clover.xml
Expand Down
53 changes: 24 additions & 29 deletions .php_cs.dist
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
declare(strict_types=1);

$header = <<<EOF
GpsLab component.
Expand All @@ -7,33 +8,27 @@ GpsLab component.
@license http://opensource.org/licenses/MIT
EOF;

$rules = [
'@Symfony' => true,
'header_comment' => [
'comment_type' => 'PHPDoc',
'header' => $header,
],
'single_line_throw' => false,
'blank_line_after_opening_tag' => false,
'yoda_style' => false,
'ordered_imports' => [
'sort_algorithm' => 'alpha',
],
];

$finder = PhpCsFixer\Finder::create()
->in(__DIR__.'/src')
->in(__DIR__.'/tests')
->notPath('bootstrap.php')
;

return PhpCsFixer\Config::create()
->setRules([
'@Symfony' => true,
'array_syntax' => ['syntax' => 'short'],
'header_comment' => [
'comment_type' => 'PHPDoc',
'header' => $header,
],
'class_definition' => [
'multi_line_extends_each_single_line' => true,
],
'no_superfluous_phpdoc_tags' => false,
'single_line_throw' => false,
'blank_line_after_opening_tag' => false,
'yoda_style' => false,
'phpdoc_no_empty_return' => false,
'ordered_imports' => [
'sort_algorithm' => 'alpha',
],
'list_syntax' => [
'syntax' => 'short',
],
])
->setFinder(
PhpCsFixer\Finder::create()
->in(__DIR__.'/src')
->in(__DIR__.'/tests')
->notPath('bootstrap.php')
)
;
->setRules($rules)
->setFinder($finder)
;
Loading

0 comments on commit 527ef5b

Please sign in to comment.