Skip to content

Commit bbe943c

Browse files
Merge pull request #88 from edmondscommerce/ComposerRequireChecker
brought in teh composer require checker, tried upgrading infection but
2 parents 63d4cb8 + 945e1c8 commit bbe943c

24 files changed

+287
-59
lines changed

bin/qa

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,13 @@ fi
223223

224224
echo "
225225
226+
Running Composer Require Checker
227+
--------------------------------
228+
"
229+
runTool composerRequireChecker
230+
231+
echo "
232+
226233
Running PHP Mess Detector
227234
-------------------------
228235
"

composer.json

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,26 @@
2121
"php": "~7.1",
2222
"phpunit/phpunit": "^7.3",
2323
"jakub-onderka/php-console-highlighter": "^0.3.2",
24-
"jakub-onderka/php-parallel-lint": "~1",
24+
"jakub-onderka/php-parallel-lint": "dev-SplitAutoload@dev",
2525
"phploc/phploc": "^4.0",
2626
"phpmd/phpmd": "^2.6",
2727
"phpstan/phpstan-shim": "^0.11",
2828
"squizlabs/php_codesniffer": "~3",
2929
"sllh/composer-versions-check": "^2.0",
3030
"phpstan/phpstan-strict-rules": "^0.11",
31-
"infection/infection": "^0.0",
31+
"infection/infection": "^0.10",
3232
"funkyproject/reflection-file": "^0.1.0",
33-
"phpunit/php-invoker": "^2.0"
33+
"phpunit/php-invoker": "^2.0",
34+
"maglnet/composer-require-checker": "^1.0",
35+
"ext-json": "*",
36+
"phpunit/php-timer": "^2.0"
3437
},
38+
"repositories": [
39+
{
40+
"type": "vcs",
41+
"url": "https://github.com/edmondscommerce/PHP-Parallel-Lint"
42+
}
43+
],
3544
"require-dev": {
3645
"phpstan/phpstan-phpunit": "^0.11"
3746
},

composer.lock

Lines changed: 185 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"symbol-whitelist" : [
3+
"null", "true", "false",
4+
"static", "self", "parent",
5+
"array", "string", "int", "float", "bool", "iterable", "callable", "void", "object",
6+
"Composer\\Autoload\\ClassLoader"
7+
],
8+
"php-core-extensions" : [
9+
"Core",
10+
"date",
11+
"pcre",
12+
"Phar",
13+
"Reflection",
14+
"SPL",
15+
"standard"
16+
],
17+
"scan-files" : []
18+
}

configDefaults/generic/infection.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@
55
"src"
66
]
77
},
8-
"note:": [
9-
"yes paths are handled inconsistently",
10-
"the logs paths are from the project root",
11-
"the tmp path is from the config file location"
12-
],
138
"logs": {
149
"text": "var/qa/infection/log.txt",
1510
"summary": "var/qa/infection/summary-log.txt",

configDefaults/generic/phpunit.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<phpunit
22
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/7.2/phpunit.xsd"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/7.5/phpunit.xsd"
44
cacheTokens="false"
55
colors="true"
66
verbose="true"

includes/functions.inc.bash

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,17 @@ function configPath(){
8383
# Usage:
8484
# `phpNoXdebug path/to/php/file.php -- -arg1 -arg2`
8585
function phpNoXdebug {
86+
if [[ ! -f ${noXdebugConfigPath} ]]
87+
then
88+
# Using awk to ensure that files ending without newlines do not lead to configuration error
89+
${phpBinPath} -i | grep "\.ini" | grep -o -e '\(/[a-z0-9._-]\+\)\+\.ini' | grep -v xdebug | xargs awk 'FNR==1{print ""}1' > "$noXdebugConfigPath"
90+
fi
91+
echo "Command to rerun:"
92+
set -x
93+
${phpBinPath} -n -c "$noXdebugConfigPath" "$@"
8694
set +x
87-
local temporaryPath="$(mktemp -t php.XXXX)"
88-
# Using awk to ensure that files ending without newlines do not lead to configuration error
89-
$phpBinPath -i | grep "\.ini" | grep -o -e '\(/[a-z0-9._-]\+\)\+\.ini' | grep -v xdebug | xargs awk 'FNR==1{print ""}1' > "$temporaryPath"
90-
$phpBinPath -n -c "$temporaryPath" "$@"
95+
echo
9196
local exitCode=$?
92-
rm -f "$temporaryPath"
93-
set -x
9497
return $exitCode
9598
}
9699

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
set +e
2-
set -x
2+
33
phpNoXdebug -f bin/phpcbf -- \
44
--standard="$phpcsCodingStandardsNameOrPath" \
55
--colors \
66
--cache="$cacheDir"/phpcbf.cache \
77
${pathsToCheck[@]}
8-
set +x
8+
99
set -e

includes/generic/codeSniffer.inc.bash

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ ignoreString=$(IFS="," eval 'echo "${pathsToIgnore[*]}"')
33

44
phpNoXdebug -f bin/phpcs -- \
55
--config-set ignore_warnings_on_exit "$phpcsFailOnWarning"
6-
set +x
6+
77
set +e
88
phpcsExitCode=99
99
while (( phpcsExitCode > 0 ))
1010
do
11-
set -x
11+
1212
phpNoXdebug -f bin/phpcs -- \
1313
--standard="$phpcsCodingStandardsNameOrPath" \
1414
--colors \
@@ -19,7 +19,7 @@ do
1919
--ignore=$ignoreString \
2020
${pathsToCheck[@]}
2121
phpcsExitCode=$?
22-
set +x
22+
2323
if (( phpcsExitCode > 0 ))
2424
then
2525
tryAgainOrAbort "Code Sniffer"

0 commit comments

Comments
 (0)