Skip to content

Commit 297169d

Browse files
Merge pull request #99 from edmondscommerce/symfony
Symfony
2 parents 894b062 + df8ffc8 commit 297169d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+2191
-940
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,30 @@
22
## By [Edmonds Commerce](https://www.edmondscommerce.co.uk)
33

44

5+
## Version 4 Updates
6+
7+
Brings in PHPStan 0.12 which is great
8+
9+
However you will need to do the following:
10+
11+
12+
# Remove PHPStan symlinks before upgrading
13+
```bash
14+
rm -f bin/phpstan*
15+
```
16+
17+
# Ensuring Correct PHPStan Configs
18+
19+
If you are overriding `phpstan.neon` in your `qaConfig` folder, then you need to make sure you have this in there:
20+
21+
```neon
22+
parameters:
23+
level: max
24+
inferPrivatePropertyTypeFromConstructor: true
25+
```
26+
27+
28+
529
## Version 3 Updates
630

731
You should update your phpunit.xml file to use ` printerClass="\PHPUnit\Util\TestDox\CliTestDoxPrinter"`

bin/qa

Lines changed: 14 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -143,103 +143,21 @@ fi
143143

144144
echo "
145145
146-
Validating PSR-4 Roots
147-
------------------------
148-
"
149-
150-
runTool psr4Validate
151-
152-
echo "
153-
154-
Checking for Composer Issues
155-
----------------------------
156-
"
157-
158-
runTool composerChecks
159-
160-
echo "
161-
Setting Strict Types If It's Missing
162-
-------------------------------------
163-
"
164-
165-
runTool phpStrictTypes
166-
167-
echo "
168-
169-
Running PHP Lint
170-
----------------
171-
"
172-
runTool phpLint
173-
174-
echo "
175-
176-
Running PHPStan
177-
---------------------
178-
"
179-
if [[ "$phpqaQuickTests" == "1" ]]
180-
then
181-
echo "Skipping PHPStan because \$phpqaQuickTests=1"
182-
else
183-
runTool phpstan
184-
fi
185-
186-
echo "
146+
Running All Linting Tools
147+
=========================
187148
188-
Running PHPUnit Annotations Check
189-
--------------------------------
190149
"
191-
runTool phpunitAnnotations
192150

193-
echo "
194-
195-
Running PHPUnit Tests
196-
---------------------
197-
"
198-
if [[ "$phpqaQuickTests" == "1" ]]
199-
then
200-
echo "Skipping PHP Unit & Infection because \$phpqaQuickTests=1"
201-
else
202-
echo "
203-
Running tests using PhpUnit
204-
---------------------------
205-
"
206-
runTool phpunit
207-
208-
if [[ "${TRAVIS:-'false'}" == "true" && "$xdebugEnabled" == "1" ]]
209-
then
210-
echo "Disabling Xdebug After PHPUnit on Travis"
211-
phpenv config-rm xdebug.ini
212-
fi
213-
214-
if [[ "$useInfection" == "1" ]]
215-
then
216-
echo "
217-
Running tests using Infection
218-
-----------------------------
219-
"
220-
runTool infection
221-
fi
222-
fi
151+
runTool allLintingTools
223152

224153
echo "
225154
226-
Running Composer Require Checker
227-
--------------------------------
228-
"
229-
runTool composerRequireChecker
230-
231-
echo "
155+
Running All Static Analysis Tools
156+
=================================
232157
233-
Running PHP Mess Detector
234-
-------------------------
235158
"
236-
runTool messDetector
237-
echo "
159+
runTool allStaticAnalysisTools
238160

239-
Running Markdown Links Checker
240-
------------------------------
241-
"
242-
runTool markdownLinks
243161

244162
echo "
245163
@@ -248,22 +166,23 @@ Checking if Uncommitted Changes
248166
"
249167
checkForUncommittedChanges $specifiedPath
250168

251-
252169
echo "
253170
254-
Running Beautifier and Fixer
255-
----------------------------
171+
Running All Coding Standards Tools (That Might Make Code Changes)
172+
=================================
173+
256174
"
175+
runTool allCodingStandardsTools
257176

258-
runTool beautifierFixer
259177

260178
echo "
261179
262-
Running Code Sniffer
263-
--------------------
180+
Running All Testing Tools
181+
=========================
182+
264183
"
184+
runTool allTestingTools
265185

266-
runTool codeSniffer
267186

268187
echo '
269188

composer.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,21 @@
2424
"edmondscommerce/php-parallel-lint": "~1.0.1",
2525
"phploc/phploc": "^4.0",
2626
"phpmd/phpmd": "^2.6",
27-
"phpstan/phpstan-shim": "^0.11",
27+
"phpstan/phpstan": "^0.12",
2828
"squizlabs/php_codesniffer": "~3",
2929
"sllh/composer-versions-check": "^2.0",
30-
"phpstan/phpstan-strict-rules": "^0.11",
30+
"phpstan/phpstan-strict-rules": "^0.12",
3131
"infection/infection": "^0.10",
3232
"funkyproject/reflection-file": "^0.1.0",
3333
"phpunit/php-invoker": "^2.0",
3434
"maglnet/composer-require-checker": "^2.0",
3535
"ext-json": "*",
3636
"phpunit/php-timer": "^2.0",
37-
"phpstan/extension-installer": "^1.0"
37+
"phpstan/extension-installer": "^1.0",
38+
"friendsofphp/php-cs-fixer": "^2.16"
3839
},
3940
"require-dev": {
40-
"phpstan/phpstan-phpunit": "^0.11"
41+
"phpstan/phpstan-phpunit": "^0.12"
4142
},
4243
"suggest": {
4344
"phpstan/phpstan-phpunit": "Adds checks for PHPUnit tests",

0 commit comments

Comments
 (0)