Skip to content

Commit 3447381

Browse files
authored
Merge pull request #97 from greg0ire/drop-php-71
Drop support for PHP 7.1
2 parents a321d11 + 7574a22 commit 3447381

File tree

16 files changed

+16
-2544
lines changed

16 files changed

+16
-2544
lines changed

.gitattributes

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,3 @@
99
/phpunit.xml.dist export-ignore
1010
/psalm.xml export-ignore
1111
/tests export-ignore
12-
/vendor-bin export-ignore

.github/workflows/continuous-integration.yml

Lines changed: 6 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ jobs:
2121
strategy:
2222
matrix:
2323
php-version:
24-
- "7.1"
2524
- "7.2"
2625
- "7.3"
2726
- "7.4"
@@ -40,13 +39,10 @@ jobs:
4039
tools: "cs2pr"
4140

4241
- name: "Install dependencies with Composer"
43-
uses: "ramsey/composer-install@v1"
42+
uses: "ramsey/composer-install@v3"
4443
with:
4544
dependency-versions: "highest"
4645

47-
- name: "Install phpunit with composer"
48-
run: "composer bin phpunit install --no-interaction --no-progress --no-suggest"
49-
5046
- name: "Test fixes"
5147
run: "vendor/bin/phpunit --coverage-text"
5248

@@ -72,16 +68,10 @@ jobs:
7268
tools: "cs2pr"
7369

7470
- name: "Install dependencies with Composer"
75-
uses: "ramsey/composer-install@v1"
71+
uses: "ramsey/composer-install@v3"
7672
with:
7773
dependency-versions: "highest"
7874

79-
- name: "Install phpunit with composer"
80-
run: "composer bin phpunit install --no-interaction --no-progress --no-suggest"
81-
82-
- name: "Install phpstan with composer"
83-
run: "composer bin phpstan install --no-interaction --no-progress --no-suggest"
84-
8575
- name: "Run a static analysis with phpstan/phpstan"
8676
run: "vendor/bin/phpstan analyse --error-format=checkstyle | cs2pr"
8777

@@ -106,16 +96,10 @@ jobs:
10696
php-version: "${{ matrix.php-version }}"
10797

10898
- name: "Install dependencies with Composer"
109-
uses: "ramsey/composer-install@v1"
99+
uses: "ramsey/composer-install@v3"
110100
with:
111101
dependency-versions: "highest"
112102

113-
- name: "Install phpunit with composer"
114-
run: "composer bin phpunit install --no-interaction --no-progress --no-suggest"
115-
116-
- name: "Install psalm with composer"
117-
run: "composer bin all install --no-interaction --no-progress --no-suggest"
118-
119103
- name: "Run a static analysis with vimeo/psalm"
120104
run: "vendor/bin/psalm --show-info=false --stats --output-format=github --threads=4"
121105

@@ -139,18 +123,10 @@ jobs:
139123
php-version: "${{ matrix.php-version }}"
140124
tools: "cs2pr"
141125

142-
- name: "Cache dependencies installed with composer"
143-
uses: "actions/cache@v1"
126+
- name: "Install dependencies with Composer"
127+
uses: "ramsey/composer-install@v3"
144128
with:
145-
path: "~/.composer/cache"
146-
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}-${{ hashFiles('vendor-bin/*/composer.lock') }}"
147-
restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
148-
149-
- name: "Install dependencies with composer"
150-
run: "composer install --no-interaction --no-progress --no-suggest"
151-
152-
- name: "Install phpcs with composer"
153-
run: "composer bin all install --no-interaction --no-progress --no-suggest"
129+
dependency-versions: "highest"
154130

155131
# Remove -q when updating to phpcs v4
156132
- name: "Run squizlabs/php_codesniffer"

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/.phpunit.result.cache
22
/.phpcs-cache
33
vendor/
4-
vendor-bin/**/vendor
5-
vendor-bin/phpunit/composer.lock
4+
/composer.lock

CONTRIBUTING.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ Make sure you read our [contributing guide][contributing guide on the website].
88

99
```shell
1010
composer install
11-
composer bin all install
1211
```
1312

1413
## Running checks locally

composer.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@
66
"license": "MIT",
77
"type": "library",
88
"require": {
9-
"php": "^7.1 || ^8.0"
9+
"php": "^7.2 || ^8.0"
1010
},
1111
"require-dev": {
12-
"bamarni/composer-bin-plugin": "^1.4"
12+
"doctrine/coding-standard": "^9.0",
13+
"phpstan/phpstan": "^1.0",
14+
"phpunit/phpunit": "^8.5 || ^9.6",
15+
"vimeo/psalm": "^4.11"
1316
},
1417
"authors": [
1518
{
@@ -29,12 +32,9 @@
2932
}
3033
},
3134
"config": {
32-
"allow-plugins": {
33-
"bamarni/composer-bin-plugin": true
34-
},
3535
"sort-packages": true,
36-
"platform": {
37-
"php": "7.1.0"
36+
"allow-plugins": {
37+
"dealerdirect/phpcodesniffer-composer-installer": true
3838
}
3939
},
4040
"bin": ["bin/sql-formatter"]

examples/cli.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,6 @@
2828
use Doctrine\SqlFormatter\SqlFormatter;
2929
use Doctrine\SqlFormatter\Tokenizer;
3030

31+
assert($sql !== false);
32+
3133
echo (new SqlFormatter())->format($sql);

phpstan.neon.dist

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,3 @@ parameters:
44
- %currentWorkingDirectory%/src
55
- %currentWorkingDirectory%/tests
66
- %currentWorkingDirectory%/examples
7-
bootstrapFiles:
8-
- %currentWorkingDirectory%/vendor-bin/phpunit/vendor/autoload.php

psalm.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
66
xmlns="https://getpsalm.org/schema/config"
77
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
8-
autoloader="tests/psalm-autoloader.php"
98
>
109
<projectFiles>
1110
<directory name="examples" />

tests/psalm-autoloader.php

Lines changed: 0 additions & 5 deletions
This file was deleted.

vendor-bin/cs/composer.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)