Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Synchronize with ergebnis/php-package-template #570

Merged
merged 1 commit into from
Jun 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ repository:
has_pages: false
has_projects: false
has_wiki: false
is_template: false
name: "phpstan-rules"
private: false

Expand Down
55 changes: 44 additions & 11 deletions .github/workflows/integrate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
uses: "shivammathur/[email protected]"
with:
coverage: "xdebug"
extensions: "none, ctype, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter"
extensions: "none, ctype, curl, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter"
php-version: "${{ matrix.php-version }}"

- name: "Set up problem matchers for PHP"
Expand All @@ -39,6 +39,9 @@ jobs:
- name: "Set up problem matchers for phpunit/phpunit"
run: "echo \"::add-matcher::${{ runner.tool_cache }}/phpunit.json\""

- name: "Validate composer.json and composer.lock"
run: "composer validate --ansi --strict"

- name: "Determine composer cache directory"
uses: "ergebnis/.github/actions/composer/[email protected]"

Expand Down Expand Up @@ -93,7 +96,7 @@ jobs:
uses: "shivammathur/[email protected]"
with:
coverage: "none"
extensions: "none, ctype, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter"
extensions: "none, ctype, curl, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter"
php-version: "${{ matrix.php-version }}"

- name: "Set up problem matchers for PHP"
Expand Down Expand Up @@ -121,7 +124,7 @@ jobs:
run: "composer normalize --ansi --dry-run"

- name: "Create cache directory for friendsofphp/php-cs-fixer"
run: "mkdir -p .build/php-cs-fixer"
run: "mkdir -p .build/php-cs-fixer/"

- name: "Cache cache directory for friendsofphp/php-cs-fixer"
uses: "actions/[email protected]"
Expand Down Expand Up @@ -159,13 +162,16 @@ jobs:
uses: "shivammathur/[email protected]"
with:
coverage: "none"
extensions: "none, ctype, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter"
extensions: "none, ctype, curl, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter"
php-version: "${{ matrix.php-version }}"
tools: "phive"

- name: "Set up problem matchers for PHP"
run: "echo \"::add-matcher::${{ runner.tool_cache }}/php.json\""

- name: "Validate composer.json and composer.lock"
run: "composer validate --ansi --strict"

- name: "Determine composer cache directory"
uses: "ergebnis/.github/actions/composer/[email protected]"

Expand Down Expand Up @@ -210,12 +216,15 @@ jobs:
uses: "shivammathur/[email protected]"
with:
coverage: "xdebug"
extensions: "none, ctype, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter"
extensions: "none, ctype, curl, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter"
php-version: "${{ matrix.php-version }}"

- name: "Set up problem matchers for PHP"
run: "echo \"::add-matcher::${{ runner.tool_cache }}/php.json\""

- name: "Validate composer.json and composer.lock"
run: "composer validate --ansi --strict"

- name: "Determine composer cache directory"
uses: "ergebnis/.github/actions/composer/[email protected]"

Expand Down Expand Up @@ -257,12 +266,15 @@ jobs:
uses: "shivammathur/[email protected]"
with:
coverage: "none"
extensions: "none, ctype, dom, intl, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter"
extensions: "none, ctype, curl, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter"
php-version: "${{ matrix.php-version }}"

- name: "Set up problem matchers for PHP"
run: "echo \"::add-matcher::${{ runner.tool_cache }}/php.json\""

- name: "Validate composer.json and composer.lock"
run: "composer validate --ansi --strict"

- name: "Determine composer cache directory"
uses: "ergebnis/.github/actions/composer/[email protected]"

Expand All @@ -279,7 +291,7 @@ jobs:
dependencies: "${{ matrix.dependencies }}"

- name: "Create cache directory for rector/rector"
run: "mkdir -p .build/rector"
run: "mkdir -p .build/rector/"

- name: "Cache cache directory for rector/rector"
uses: "actions/[email protected]"
Expand Down Expand Up @@ -314,7 +326,7 @@ jobs:
uses: "shivammathur/[email protected]"
with:
coverage: "none"
extensions: "none, ctype, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter"
extensions: "none, ctype, curl, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter"
php-version: "${{ matrix.php-version }}"

- name: "Set up problem matchers for PHP"
Expand All @@ -323,6 +335,21 @@ jobs:
- name: "Validate composer.json and composer.lock"
run: "composer validate --ansi --strict"

- name: "Determine composer cache directory"
uses: "ergebnis/.github/actions/composer/[email protected]"

- name: "Cache dependencies installed with composer"
uses: "actions/[email protected]"
with:
path: "${{ env.COMPOSER_CACHE_DIR }}"
key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}"
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"

- name: "Install ${{ matrix.dependencies }} dependencies with composer"
uses: "ergebnis/.github/actions/composer/[email protected]"
with:
dependencies: "${{ matrix.dependencies }}"

- name: "Check installed packages for security vulnerability advisories"
run: "composer audit --ansi"

Expand Down Expand Up @@ -353,6 +380,9 @@ jobs:
- name: "Set up problem matchers for PHP"
run: "echo \"::add-matcher::${{ runner.tool_cache }}/php.json\""

- name: "Validate composer.json and composer.lock"
run: "composer validate --ansi --strict"

- name: "Determine composer cache directory"
uses: "ergebnis/.github/actions/composer/[email protected]"

Expand All @@ -369,13 +399,13 @@ jobs:
dependencies: "${{ matrix.dependencies }}"

- name: "Create cache directory for phpstan/phpstan"
run: "mkdir -p .build/phpstan"
run: "mkdir -p .build/phpstan/"

- name: "Run phpstan/phpstan"
run: "vendor/bin/phpstan --configuration=phpstan.neon --memory-limit=-1"

- name: "Create cache directory for vimeo/psalm"
run: "mkdir -p .build/psalm"
run: "mkdir -p .build/psalm/"

- name: "Run vimeo/psalm"
run: "vendor/bin/psalm --config=psalm.xml --output-format=github --shepherd --show-info=false --stats --threads=4"
Expand Down Expand Up @@ -404,7 +434,7 @@ jobs:
uses: "shivammathur/[email protected]"
with:
coverage: "none"
extensions: "none, ctype, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter"
extensions: "none, ctype, curl, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter"
php-version: "${{ matrix.php-version }}"

- name: "Set up problem matchers for PHP"
Expand All @@ -413,6 +443,9 @@ jobs:
- name: "Set up problem matchers for phpunit/phpunit"
run: "echo \"::add-matcher::${{ runner.tool_cache }}/phpunit.json\""

- name: "Validate composer.json and composer.lock"
run: "composer validate --ansi --strict"

- name: "Determine composer cache directory"
uses: "ergebnis/.github/actions/composer/[email protected]"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/renew.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
uses: "shivammathur/[email protected]"
with:
coverage: "none"
extensions: "none, ctype, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter"
extensions: "none, ctype, curl, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter"
php-version: "${{ matrix.php-version }}"

- name: "Set up problem matchers for PHP"
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/.build/
/.notes/
/.note/
/.phive/
/vendor/
!/.phive/phars.xml
5 changes: 2 additions & 3 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,11 @@
->exclude([
'.build/',
'.github/',
'.notes/',
'.note/',
'test/Fixture/',
])
->ignoreDotFiles(false)
->in(__DIR__)
->name('.php-cs-fixer.php');
->in(__DIR__);

$config->setCacheFile(__DIR__ . '/.build/php-cs-fixer/.php-cs-fixer.cache');

Expand Down
2 changes: 1 addition & 1 deletion .yamllint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ extends: "default"

ignore: |
.build/
.notes/
.note/
vendor/

rules:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ coding-standards: vendor ## Lints YAML files with yamllint, normalizes composer.
yamllint -c .yamllint.yaml --strict .
composer normalize
mkdir -p .build/php-cs-fixer/
vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.fixture.php --diff --verbose
vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.php --diff --verbose
vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.fixture.php --diff --verbose

.PHONY: dependency-analysis
dependency-analysis: phive vendor ## Runs a dependency analysis with maglnet/composer-require-checker
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

[![Latest Stable Version](https://poser.pugx.org/ergebnis/phpstan-rules/v/stable)](https://packagist.org/packages/ergebnis/phpstan-rules)
[![Total Downloads](https://poser.pugx.org/ergebnis/phpstan-rules/downloads)](https://packagist.org/packages/ergebnis/phpstan-rules)
[![Monthly Downloads](http://poser.pugx.org/ergebnis/phpstan-rules/d/monthly)](https://packagist.org/packages/ergebnis/phpstan-rules)

Provides additional rules for [`phpstan/phpstan`](https://github.com/phpstan/phpstan).

Expand Down Expand Up @@ -531,6 +532,10 @@ Please have a look at [`CONTRIBUTING.md`](.github/CONTRIBUTING.md).

Please have a look at [`CODE_OF_CONDUCT.md`](https://github.com/ergebnis/.github/blob/main/CODE_OF_CONDUCT.md).

## Security Policy

Please have a look at [`SECURITY.md`](.github/SECURITY.md).

## License

This package is licensed using the MIT License.
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"ergebnis/composer-normalize": "^2.31.0",
"ergebnis/license": "^2.1.0",
"ergebnis/php-cs-fixer-config": "^5.6.0",
"ergebnis/phpunit-slow-test-detector": "^2.3.0",
"infection/infection": "~0.27.0",
"nette/di": "^3.1.2",
"phpstan/phpstan-deprecation-rules": "^1.0.0",
Expand Down
70 changes: 69 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading