Skip to content

Commit

Permalink
Merge pull request #99 from edmondscommerce/symfony
Browse files Browse the repository at this point in the history
Symfony
  • Loading branch information
Edmonds Commerce committed Dec 6, 2019
2 parents 894b062 + df8ffc8 commit 297169d
Show file tree
Hide file tree
Showing 60 changed files with 2,191 additions and 940 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,30 @@
## By [Edmonds Commerce](https://www.edmondscommerce.co.uk)


## Version 4 Updates

Brings in PHPStan 0.12 which is great

However you will need to do the following:


# Remove PHPStan symlinks before upgrading
```bash
rm -f bin/phpstan*
```

# Ensuring Correct PHPStan Configs

If you are overriding `phpstan.neon` in your `qaConfig` folder, then you need to make sure you have this in there:

```neon
parameters:
level: max
inferPrivatePropertyTypeFromConstructor: true
```



## Version 3 Updates

You should update your phpunit.xml file to use ` printerClass="\PHPUnit\Util\TestDox\CliTestDoxPrinter"`
Expand Down
109 changes: 14 additions & 95 deletions bin/qa
Original file line number Diff line number Diff line change
Expand Up @@ -143,103 +143,21 @@ fi

echo "
Validating PSR-4 Roots
------------------------
"

runTool psr4Validate

echo "
Checking for Composer Issues
----------------------------
"

runTool composerChecks

echo "
Setting Strict Types If It's Missing
-------------------------------------
"

runTool phpStrictTypes

echo "
Running PHP Lint
----------------
"
runTool phpLint

echo "
Running PHPStan
---------------------
"
if [[ "$phpqaQuickTests" == "1" ]]
then
echo "Skipping PHPStan because \$phpqaQuickTests=1"
else
runTool phpstan
fi

echo "
Running All Linting Tools
=========================
Running PHPUnit Annotations Check
--------------------------------
"
runTool phpunitAnnotations

echo "
Running PHPUnit Tests
---------------------
"
if [[ "$phpqaQuickTests" == "1" ]]
then
echo "Skipping PHP Unit & Infection because \$phpqaQuickTests=1"
else
echo "
Running tests using PhpUnit
---------------------------
"
runTool phpunit

if [[ "${TRAVIS:-'false'}" == "true" && "$xdebugEnabled" == "1" ]]
then
echo "Disabling Xdebug After PHPUnit on Travis"
phpenv config-rm xdebug.ini
fi

if [[ "$useInfection" == "1" ]]
then
echo "
Running tests using Infection
-----------------------------
"
runTool infection
fi
fi
runTool allLintingTools

echo "
Running Composer Require Checker
--------------------------------
"
runTool composerRequireChecker

echo "
Running All Static Analysis Tools
=================================
Running PHP Mess Detector
-------------------------
"
runTool messDetector
echo "
runTool allStaticAnalysisTools

Running Markdown Links Checker
------------------------------
"
runTool markdownLinks

echo "
Expand All @@ -248,22 +166,23 @@ Checking if Uncommitted Changes
"
checkForUncommittedChanges $specifiedPath


echo "
Running Beautifier and Fixer
----------------------------
Running All Coding Standards Tools (That Might Make Code Changes)
=================================
"
runTool allCodingStandardsTools

runTool beautifierFixer

echo "
Running Code Sniffer
--------------------
Running All Testing Tools
=========================
"
runTool allTestingTools

runTool codeSniffer

echo '
Expand Down
9 changes: 5 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,21 @@
"edmondscommerce/php-parallel-lint": "~1.0.1",
"phploc/phploc": "^4.0",
"phpmd/phpmd": "^2.6",
"phpstan/phpstan-shim": "^0.11",
"phpstan/phpstan": "^0.12",
"squizlabs/php_codesniffer": "~3",
"sllh/composer-versions-check": "^2.0",
"phpstan/phpstan-strict-rules": "^0.11",
"phpstan/phpstan-strict-rules": "^0.12",
"infection/infection": "^0.10",
"funkyproject/reflection-file": "^0.1.0",
"phpunit/php-invoker": "^2.0",
"maglnet/composer-require-checker": "^2.0",
"ext-json": "*",
"phpunit/php-timer": "^2.0",
"phpstan/extension-installer": "^1.0"
"phpstan/extension-installer": "^1.0",
"friendsofphp/php-cs-fixer": "^2.16"
},
"require-dev": {
"phpstan/phpstan-phpunit": "^0.11"
"phpstan/phpstan-phpunit": "^0.12"
},
"suggest": {
"phpstan/phpstan-phpunit": "Adds checks for PHPUnit tests",
Expand Down

0 comments on commit 297169d

Please sign in to comment.