Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into PHP_CS_FIXER_EXPE…
Browse files Browse the repository at this point in the history
…RIMENTAL_PARALLEL_CACHE
  • Loading branch information
keradus committed Oct 16, 2023
2 parents d25c533 + 813b1d3 commit 5b227da
Show file tree
Hide file tree
Showing 963 changed files with 61,948 additions and 46,354 deletions.
9 changes: 6 additions & 3 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Gitter.im - the community chat
url: https://gitter.im/PHP-CS-Fixer/Lobby
about: Before creating a new support question, you may want to reach the community chat
- name: RFC ↔️
url: https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/discussions/categories/rfc
about: If you have an idea about Fixer development (new rules, supporting tools, processes), please open RFC
- name: Support question❓
url: https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/discussions/categories/q-a
about: If you have any questions about configuring, using or developing PHP-CS-Fixer, please open new Q&A discussion
25 changes: 0 additions & 25 deletions .github/ISSUE_TEMPLATE/rule_request.md

This file was deleted.

15 changes: 0 additions & 15 deletions .github/ISSUE_TEMPLATE/support_question.md

This file was deleted.

4 changes: 2 additions & 2 deletions .github/prlint.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"title": [
{
"pattern": "^(feature|bug|minor|docs|DX):\\s.+\\S$",
"message": "Your title needs to match the convention: use '(feature|bug|minor|docs|DX):' prefix."
"pattern": "^(feat|fix|chore|CI|deps|docs|DX|refactor|test)(\\([\\-.@:`a-zA-Z0-9]+\\))?!?:\\s{1}\\S.+\\S$",
"message": "PR title does not meet requirement, use Conventional Commits format using one of these categories: feat, fix, chore, CI, docs, DX, refactor, test"
},
{
"pattern": "((?<=`)@\\S*`)|(^[^@]*$)",
Expand Down
14 changes: 2 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,26 +160,16 @@ jobs:

- name: Run PHP CS Fixer with PHPDoc to type rules
if: matrix.phpdoc-to-type-rules == 'yes'
run: php php-cs-fixer fix --diff --dry-run -v --config .php-cs-fixer.php-lowest.php
run: php php-cs-fixer check --diff -v --config .php-cs-fixer.php-lowest.php

- name: Run PHP CS Fixer
env:
PHP_CS_FIXER_IGNORE_ENV: ${{ matrix.PHP_CS_FIXER_IGNORE_ENV }}
PHP_CS_FIXER_FUTURE_MODE: 1
run: php php-cs-fixer fix --diff --dry-run -v
run: php php-cs-fixer check --diff -v

- name: Execute deployment checks
if: matrix.execute-deployment == 'yes'
run: |
./dev-tools/build.sh
PHP_CS_FIXER_TEST_ALLOW_SKIPPING_SMOKE_TESTS=0 vendor/bin/phpunit tests/Smoke/
- name: Execute deployment post-hook
if: matrix.execute-deployment == 'yes' && startsWith(github.ref, 'refs/tags/v')
env:
TRAVIS_TOKEN: ${{ secrets.TRAVIS_TOKEN }}
run: |
# ensure that deployment is happening only if tag matches version of PHP CS Fixer
test $(php dev-tools/info-extractor.php | jq -r .version.vnumber) == "${GITHUB_REF#refs/tags/}"
# trigger website update
./dev-tools/trigger-website.sh ${TRAVIS_TOKEN} ${GITHUB_REF#refs/tags/}
15 changes: 15 additions & 0 deletions .github/workflows/issues_and_pull_requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,17 @@ on:
- cron: "0 12 * * *"

env:
CLOSE_MESSAGE: |
The fact this was automatically closed doesn't mean that the idea got rejected - it simply didn't get any priority for way too long to keep it open. If you're still interested in this, please let as know, we can consider re-opening it.
DAYS_BEFORE_ISSUE_CLOSE: 30
DAYS_BEFORE_ISSUE_STALE: 90
DAYS_BEFORE_PR_CLOSE: 14
DAYS_BEFORE_PR_STALE: 90
EXEMPT_MILESTONES: "long-term-ideas"
STALE_CLARIFICATION: |
The purpose of this action is to enforce backlog review once in a while. This is mostly for maintainers and helps with keeping repository in good condition, because stale issues and PRs can accumulate over time and make it harder for others to find relevant information. It is also possible that some changes has been made to the repo already, and issue or PR became outdated, but wasn't closed for some reason. This action helps with periodic review and closing of such stale items in automated way.
You may let maintainers handle this or verify current relevancy by yourself, to help with re-triage. Any activity will remove stale label so it won't be automatically closed at this point.
jobs:
handle_stale:
Expand All @@ -19,25 +26,33 @@ jobs:
runs-on: "ubuntu-latest"

steps:
# Config reference: https://github.com/actions/stale
- name: "Handle stale issues and pull requests"
uses: "actions/stale@v8"
with:
close-issue-message: "${{ env.CLOSE_MESSAGE }}"
close-pr-message: "${{ env.CLOSE_MESSAGE }} When it comes to pull requests it may be better to create new one, on top of main branch."
close-pr-label: "status/to recover"
days-before-issue-close: "${{ env.DAYS_BEFORE_ISSUE_CLOSE }}"
days-before-issue-stale: "${{ env.DAYS_BEFORE_ISSUE_STALE }}"
days-before-pr-close: "${{ env.DAYS_BEFORE_PR_CLOSE }}"
days-before-pr-stale: "${{ env.DAYS_BEFORE_PR_STALE }}"
exempt-milestones: "${{ env.EXEMPT_MILESTONES }}"
labels-to-add-when-unstale: "status/to verify"
repo-token: "${{ secrets.GITHUB_TOKEN }}"
stale-issue-label: "status/stale"
stale-issue-message: |
Since this issue has not had any activity within the last ${{ env.DAYS_BEFORE_ISSUE_STALE }} days, I have marked it as stale.
${{ env.STALE_CLARIFICATION }}
I will close it if no further activity occurs within the next ${{ env.DAYS_BEFORE_ISSUE_CLOSE }} days.
stale-pr-label: "status/stale"
stale-pr-message: |
Since this pull request has not had any activity within the last ${{ env.DAYS_BEFORE_PR_STALE }} days, I have marked it as stale.
${{ env.STALE_CLARIFICATION }}
I will close it if no further activity occurs within the next ${{ env.DAYS_BEFORE_PR_CLOSE }} days.
Please keep your branch up-to-date by rebasing it when main branch is ahead of it, thanks in advance!
6 changes: 3 additions & 3 deletions .github/workflows/sca.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,13 @@ jobs:
echo 'EOF' >> $GITHUB_ENV
fi
- name: Check - phpmd
- name: Check - Mess Detector (phpmd)
if: ${{ env.CHANGED_PHP_FILES }}
run: |
if [ '${{ github.event_name }}' == 'pull_request' ]; then
./dev-tools/vendor/bin/phpmd `echo "$CHANGED_PHP_FILES" | grep -v /Fixtures/ | xargs | sed 's/ /,/g'` github phpmd.xml
./dev-tools/vendor/bin/phpmd `echo "$CHANGED_PHP_FILES" | grep -v /Fixtures/ | xargs | sed 's/ /,/g'` github ./dev-tools/mess-detector/phpmd.xml
else
./dev-tools/vendor/bin/phpmd `echo "$CHANGED_PHP_FILES" | grep -v /Fixtures/ | xargs | sed 's/ /,/g'` ansi phpmd.xml
./dev-tools/vendor/bin/phpmd `echo "$CHANGED_PHP_FILES" | grep -v /Fixtures/ | xargs | sed 's/ /,/g'` ansi ./dev-tools/mess-detector/phpmd.xml
fi
- name: Check - ensure test files are not present in the archive
Expand Down
2 changes: 0 additions & 2 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,8 @@
'@PhpCsFixer:risky' => true,
'general_phpdoc_annotation_remove' => ['annotations' => ['expectedDeprecation']], // one should use PHPUnit built-in method instead
'header_comment' => ['header' => $header],
'heredoc_indentation' => false, // TODO switch on when # of PR's is lower
'modernize_strpos' => true, // needs PHP 8+ or polyfill
'no_useless_concat_operator' => false, // TODO switch back on when the `src/Console/Application.php` no longer needs the concat
'use_arrow_functions' => false, // TODO switch on when # of PR's is lower
])
->setFinder($finder)
;
Expand Down
1 change: 0 additions & 1 deletion .php-cs-fixer.php-highest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
$config->setRules(array_merge($config->getRules(), [
'@PHP82Migration' => true,
'@PHP80Migration:risky' => true,
'heredoc_indentation' => false,
]));

return $config;

0 comments on commit 5b227da

Please sign in to comment.