Skip to content

Commit

Permalink
Updated dependencies + coding style (#204)
Browse files Browse the repository at this point in the history
  • Loading branch information
DamienHarper authored Jun 27, 2024
1 parent 8edca5b commit 9568bbc
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 66 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/ci-2.x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: 2.x

Expand Down Expand Up @@ -78,6 +78,8 @@ jobs:
- '7.4'
- '8.0'
- '8.1'
- '8.2'
- '8.3'
symfony:
- '4.4.*'
- '5.*'
Expand All @@ -92,7 +94,7 @@ jobs:
run: sudo service mysql stop # Shutdown the Default MySQL, "sudo" is necessary, please not remove it

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: 2.x

Expand Down Expand Up @@ -182,6 +184,8 @@ jobs:
php:
- '8.0'
- '8.1'
- '8.2'
- '8.3'
symfony:
- '6.*'
db:
Expand All @@ -195,7 +199,7 @@ jobs:
run: sudo service mysql stop # Shutdown the Default MySQL, "sudo" is necessary, please not remove it

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: 2.x

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-3.x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ jobs:
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
Expand Down Expand Up @@ -150,7 +150,7 @@ jobs:

steps:
- name: "Checkout"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"
with:
fetch-depth: 2

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"test": "php -d pcov.enabled=1 ./vendor/bin/phpunit --colors=always",
"csfixer": "tools/php-cs-fixer/vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.php --using-cache=no --verbose --ansi",
"cs-check": "tools/php-cs-fixer/vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.php --using-cache=no --verbose --ansi --dry-run",
"phpstan": "php -d memory_limit=1G ./tools/phpstan/vendor/bin/phpstan --ansi analyse src",
"phpstan": "tools/phpstan/vendor/bin/phpstan --memory-limit=1G --ansi analyse src",
"rector": "tools/rector/vendor/bin/rector",
"rector-check": "tools/rector/vendor/bin/rector --dry-run",
"update-tools": "composer update --working-dir=tools/php-cs-fixer ; composer update --working-dir=tools/phpstan ; composer update --working-dir=tools/rector"
Expand Down
8 changes: 3 additions & 5 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
parameters:
level: max
inferPrivatePropertyTypeFromConstructor: true
checkMissingIterableValueType: false
checkGenericClassInNonGenericObjectType: false

type_coverage:
return_type: 100
param_type: 100
property_type: 100

excludePaths:
- 'src/Event/AuditEvent.php'

ignoreErrors:
- identifier: missingType.iterableValue
- identifier: missingType.generics
# false positives
- '~Dead catch - Throwable is never thrown in the try block~'
- '~Parameter \#1 \$className of method Doctrine\\ORM\\EntityManagerInterface\:\:getClassMetadata\(\) expects class-string<object>, string given\.~'
Expand Down
4 changes: 2 additions & 2 deletions src/Provider/Doctrine/Persistence/Helper/DoctrineHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ public static function getRealClassName(object|string $subject): string

// __CG__: Doctrine Common Marker for Proxy (ODM < 2.0 and ORM < 3.0)
// __PM__: Ocramius Proxy Manager (ODM >= 2.0)
$positionCg = mb_strrpos($subject, '\\__CG__\\');
$positionPm = mb_strrpos($subject, '\\__PM__\\');
$positionCg = mb_strrpos($subject, '\__CG__\\');
$positionPm = mb_strrpos($subject, '\__PM__\\');
if (false === $positionCg && false === $positionPm) {
return $subject;
}
Expand Down
Loading

0 comments on commit 9568bbc

Please sign in to comment.