Skip to content

Commit

Permalink
Enhancement: Synchronize with ergebnis/php-library-template
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Dec 13, 2020
1 parent f2c7c62 commit e0a0e5c
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 47 deletions.
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
/composer-require-checker.json export-ignore
/infection.json export-ignore
/Makefile export-ignore
/phive.xml export-ignore
/phpstan-baseline.neon export-ignore
/phpstan.neon export-ignore
/psalm-baseline.xml export-ignore
Expand Down
6 changes: 3 additions & 3 deletions .github/actions/composer/composer/install/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
dependencies="${COMPOSER_INSTALL_DEPENDENCIES}"

if [[ ${dependencies} == "lowest" ]]; then
composer update --no-interaction --no-progress --no-suggest --prefer-lowest
composer update --no-interaction --no-progress --prefer-lowest

exit $?
fi

if [[ ${dependencies} == "locked" ]]; then
composer install --no-interaction --no-progress --no-suggest
composer install --no-interaction --no-progress

exit $?
fi

if [[ ${dependencies} == "highest" ]]; then
composer update --no-interaction --no-progress --no-suggest
composer update --no-interaction --no-progress

exit $?
fi
Expand Down
2 changes: 1 addition & 1 deletion .github/dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ updates:
directory: "/"
labels:
- "dependency"
open-pull-requests-limit: 10
open-pull-requests-limit: 1
package-ecosystem: "composer"
schedule:
interval: "daily"
Expand Down
4 changes: 4 additions & 0 deletions .phive/phars.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
<phar name="composer-require-checker" version="^2.1.0" installed="2.1.0" location="./.phive/composer-require-checker" copy="true"/>
</phive>
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ tests: vendor ## Runs auto-review, unit, and integration tests with phpunit/phpu

vendor: composer.json composer.lock
composer validate --strict
COMPOSER_ROOT_VERSION=${COMPOSER_ROOT_VERSION} composer install --no-interaction --no-progress --no-suggest
COMPOSER_ROOT_VERSION=${COMPOSER_ROOT_VERSION} composer install --no-interaction --no-progress
6 changes: 6 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,23 @@ includes:

parameters:
checkMissingIterableValueType: false

ergebnis:
classesAllowedToBeExtended:
- InvalidArgumentException
- LogicException
- ParseError
- RuntimeException

excludes_analyse:
- %currentWorkingDirectory%/test/Fixture/

inferPrivatePropertyTypeFromConstructor: true

level: max

paths:
- src/
- test/

tmpDir: .build/phpstan/
38 changes: 1 addition & 37 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@
</MissingConstructor>
</file>
<file src="test/Unit/ConstructTest.php">
<RedundantCondition occurrences="4">
<code>assertInstanceOf</code>
<code>assertInstanceOf</code>
<RedundantCondition occurrences="2">
<code>assertIsArray</code>
<code>assertIsArray</code>
</RedundantCondition>
Expand All @@ -32,38 +30,4 @@
<code>\Generator&lt;array{0: string, 1:Construct[]}&gt;</code>
</MixedInferredReturnType>
</file>
<file src="test/Unit/Exception/DirectoryDoesNotExistTest.php">
<RedundantCondition occurrences="1">
<code>assertInstanceOf</code>
</RedundantCondition>
<RedundantConditionGivenDocblockType occurrences="1">
<code>assertInstanceOf</code>
</RedundantConditionGivenDocblockType>
</file>
<file src="test/Unit/Exception/MultipleDefinitionsFoundTest.php">
<RedundantCondition occurrences="1">
<code>assertInstanceOf</code>
</RedundantCondition>
<RedundantConditionGivenDocblockType occurrences="1">
<code>assertInstanceOf</code>
</RedundantConditionGivenDocblockType>
</file>
<file src="test/Unit/Exception/ParseErrorTest.php">
<RedundantCondition occurrences="2">
<code>assertInstanceOf</code>
<code>assertInstanceOf</code>
</RedundantCondition>
<RedundantConditionGivenDocblockType occurrences="2">
<code>assertInstanceOf</code>
<code>assertInstanceOf</code>
</RedundantConditionGivenDocblockType>
</file>
<file src="test/Unit/Exception/ShouldNotHappenTest.php">
<RedundantCondition occurrences="1">
<code>assertInstanceOf</code>
</RedundantCondition>
<RedundantConditionGivenDocblockType occurrences="1">
<code>assertInstanceOf</code>
</RedundantConditionGivenDocblockType>
</file>
</files>
4 changes: 0 additions & 4 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
resolveFromConfigFile="true"
strictBinaryOperands="true"
>
<issueHandlers>
<LessSpecificReturnType errorLevel="info" />
</issueHandlers>

<plugins>
<pluginClass class="Psalm\PhpUnitPlugin\Plugin" />
</plugins>
Expand Down

0 comments on commit e0a0e5c

Please sign in to comment.