Skip to content

Commit

Permalink
Merge pull request #97 from greg0ire/drop-php-71
Browse files Browse the repository at this point in the history
Drop support for PHP 7.1
  • Loading branch information
greg0ire authored May 6, 2024
2 parents a321d11 + 7574a22 commit 3447381
Show file tree
Hide file tree
Showing 16 changed files with 16 additions and 2,544 deletions.
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
/phpunit.xml.dist export-ignore
/psalm.xml export-ignore
/tests export-ignore
/vendor-bin export-ignore
36 changes: 6 additions & 30 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ jobs:
strategy:
matrix:
php-version:
- "7.1"
- "7.2"
- "7.3"
- "7.4"
Expand All @@ -40,13 +39,10 @@ jobs:
tools: "cs2pr"

- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v1"
uses: "ramsey/composer-install@v3"
with:
dependency-versions: "highest"

- name: "Install phpunit with composer"
run: "composer bin phpunit install --no-interaction --no-progress --no-suggest"

- name: "Test fixes"
run: "vendor/bin/phpunit --coverage-text"

Expand All @@ -72,16 +68,10 @@ jobs:
tools: "cs2pr"

- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v1"
uses: "ramsey/composer-install@v3"
with:
dependency-versions: "highest"

- name: "Install phpunit with composer"
run: "composer bin phpunit install --no-interaction --no-progress --no-suggest"

- name: "Install phpstan with composer"
run: "composer bin phpstan install --no-interaction --no-progress --no-suggest"

- name: "Run a static analysis with phpstan/phpstan"
run: "vendor/bin/phpstan analyse --error-format=checkstyle | cs2pr"

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

- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v1"
uses: "ramsey/composer-install@v3"
with:
dependency-versions: "highest"

- name: "Install phpunit with composer"
run: "composer bin phpunit install --no-interaction --no-progress --no-suggest"

- name: "Install psalm with composer"
run: "composer bin all install --no-interaction --no-progress --no-suggest"

- name: "Run a static analysis with vimeo/psalm"
run: "vendor/bin/psalm --show-info=false --stats --output-format=github --threads=4"

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

- name: "Cache dependencies installed with composer"
uses: "actions/cache@v1"
- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v3"
with:
path: "~/.composer/cache"
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}-${{ hashFiles('vendor-bin/*/composer.lock') }}"
restore-keys: "php-${{ matrix.php-version }}-composer-locked-"

- name: "Install dependencies with composer"
run: "composer install --no-interaction --no-progress --no-suggest"

- name: "Install phpcs with composer"
run: "composer bin all install --no-interaction --no-progress --no-suggest"
dependency-versions: "highest"

# Remove -q when updating to phpcs v4
- name: "Run squizlabs/php_codesniffer"
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/.phpunit.result.cache
/.phpcs-cache
vendor/
vendor-bin/**/vendor
vendor-bin/phpunit/composer.lock
/composer.lock
1 change: 0 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Make sure you read our [contributing guide][contributing guide on the website].

```shell
composer install
composer bin all install
```

## Running checks locally
Expand Down
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@
"license": "MIT",
"type": "library",
"require": {
"php": "^7.1 || ^8.0"
"php": "^7.2 || ^8.0"
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.4"
"doctrine/coding-standard": "^9.0",
"phpstan/phpstan": "^1.0",
"phpunit/phpunit": "^8.5 || ^9.6",
"vimeo/psalm": "^4.11"
},
"authors": [
{
Expand All @@ -29,12 +32,9 @@
}
},
"config": {
"allow-plugins": {
"bamarni/composer-bin-plugin": true
},
"sort-packages": true,
"platform": {
"php": "7.1.0"
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
},
"bin": ["bin/sql-formatter"]
Expand Down
2 changes: 2 additions & 0 deletions examples/cli.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@
use Doctrine\SqlFormatter\SqlFormatter;
use Doctrine\SqlFormatter\Tokenizer;

assert($sql !== false);

echo (new SqlFormatter())->format($sql);
2 changes: 0 additions & 2 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,3 @@ parameters:
- %currentWorkingDirectory%/src
- %currentWorkingDirectory%/tests
- %currentWorkingDirectory%/examples
bootstrapFiles:
- %currentWorkingDirectory%/vendor-bin/phpunit/vendor/autoload.php
1 change: 0 additions & 1 deletion psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
autoloader="tests/psalm-autoloader.php"
>
<projectFiles>
<directory name="examples" />
Expand Down
5 changes: 0 additions & 5 deletions tests/psalm-autoloader.php

This file was deleted.

11 changes: 0 additions & 11 deletions vendor-bin/cs/composer.json

This file was deleted.

Loading

0 comments on commit 3447381

Please sign in to comment.