Skip to content
This repository was archived by the owner on Mar 1, 2023. It is now read-only.

Commit ce24561

Browse files
committed
fix: removed bleedingEdge from base_rules.neon
chore: updated workflow
1 parent b4aa21b commit ce24561

6 files changed

Lines changed: 159 additions & 67 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
2+
3+
name: "normalize composer.json"
4+
5+
on:
6+
push:
7+
paths:
8+
- "composer.json"
9+
10+
jobs:
11+
normalize:
12+
timeout-minutes: 1
13+
14+
runs-on: "ubuntu-latest"
15+
16+
steps:
17+
- name: "Git checkout"
18+
uses: actions/checkout@v2
19+
env:
20+
GIT_COMMITTER_NAME: "GitHub Actions Shell"
21+
GIT_AUTHOR_NAME: "GitHub Actions Shell"
22+
EMAIL: "github-actions[bot]@users.noreply.github.com"
23+
24+
- name: "Validate Composer configuration"
25+
run: composer validate --strict
26+
27+
- name: "Normalize composer.json"
28+
run: |
29+
composer global require ergebnis/composer-normalize
30+
composer normalize --indent-style=space --indent-size=4 --no-check-lock --no-update-lock --no-interaction --ansi
31+
32+
- uses: stefanzweifel/git-auto-commit-action@v4.0.0
33+
with:
34+
commit_message: "chore: normalize composer.json"

.github/workflows/license-update.yml

Lines changed: 40 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,25 @@ jobs:
1414

1515
strategy:
1616
matrix:
17-
php-versions: ["8.0"]
17+
php-versions: [ "8.0" ]
18+
dependencies: [ "locked" ]
19+
compiler: [ "default" ]
1820

1921
env:
20-
key: "license-update-linux-v4" # change key (version) to clear cache
22+
key: "license-update-linux-v1" # change key (version) to clear cache
2123
extensions: "mbstring"
22-
ini-values: "date.timezone=Europe/Berlin, opcache.enable_cli=1"
24+
ini-values: "date.timezone=Europe/Berlin, assert.exception=1, zend.assertions=1, opcache.enable=1, opcache.enable_cli=0, opcache.optimization_level=-1, opcache.jit=1255, opcache.jit_buffer_size=32M, serialize_precision=14"
2325
tools: "composer, cs2pr"
2426

2527
steps:
26-
- uses: actions/checkout@v2
28+
- name: "Git checkout"
29+
uses: actions/checkout@v2
2730
with:
2831
fetch-depth: 2
32+
env:
33+
GIT_COMMITTER_NAME: "GitHub Actions Shell"
34+
GIT_AUTHOR_NAME: "GitHub Actions Shell"
35+
EMAIL: "github-actions[bot]@users.noreply.github.com"
2936

3037
- name: "Setup cache environment"
3138
id: cache-env
@@ -49,47 +56,56 @@ jobs:
4956
extensions: ${{ env.extensions }}
5057
ini-values: ${{ env.ini-values }}
5158
tools: ${{ env.tools }}
52-
coverage: none
59+
coverage: "none"
60+
61+
- name: "Setup Problem Matchers for PHP"
62+
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
63+
64+
- name: "Check PHP Version"
65+
run: php -v
66+
67+
- name: "List all php extensions with versions"
68+
run: php -r 'foreach (get_loaded_extensions() as $extension) echo $extension . " " . phpversion($extension) . PHP_EOL;'
5369

5470
- name: "Configure Container"
5571
env:
56-
NARROWSPARK_EMAIL: ${{ secrets.NARROWSPARK_EMAIL }}
57-
NARROWSPARK_USERNAME: ${{ secrets.NARROWSPARK_USERNAME }}
72+
GIT_USER_EMAIL: ${{ secrets.GIT_USER_EMAIL }}
73+
GIT_USER_USERNAME: ${{ secrets.GIT_USER_USERNAME }}
5874
run: |
59-
EMAIL=${NARROWSPARK_EMAIL:-"d.bannert@anolilab.de"}
60-
NAME=${NARROWSPARK_USERNAME:-"prisis"}
75+
EMAIL=${GIT_USER_EMAIL:-"github-actions[bot]@users.noreply.github.com"}
76+
NAME=${GIT_USER_USERNAME:-"github-actions-shell"}
6177
6278
git config --global user.email "${EMAIL}"
6379
git config --global user.name "${NAME}"
6480
65-
- name: "Setup Problem Matchers for PHP"
66-
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
67-
68-
- name: "Check PHP Version"
69-
run: php -v
70-
7181
- name: "Check Composer Version"
7282
run: composer -V
7383

74-
- name: "Validate composer.json and composer.lock"
84+
- name: "Validate composer.json and composer.json"
7585
run: composer validate --strict
7686

77-
- name: "List all php extensions with versions"
78-
run: php -r 'foreach (get_loaded_extensions() as $extension) echo $extension . " " . phpversion($extension) . PHP_EOL;'
79-
8087
- name: "Get Composer Cache Directory"
8188
id: composer-cache
8289
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
8390

8491
- name: "Cache dependencies"
8592
uses: actions/cache@v2
8693
with:
87-
path: ${{ steps.composer-cache.outputs.dir }}
88-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
89-
restore-keys: ${{ runner.os }}-composer-
94+
path: "${{ steps.composer-cache.outputs.dir }}"
95+
key: "${{ runner.os }}-php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.json') }}"
96+
restore-keys: "${{ runner.os }}-php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"
97+
98+
- name: "Install locked dependencies"
99+
if: matrix.dependencies == 'locked'
100+
run: composer install --no-progress --no-interaction --ansi
101+
102+
- name: "Install highest dependencies"
103+
if: matrix.dependencies == 'highest'
104+
run: composer update --no-progress --no-interaction --ansi
90105

91-
- name: "Install highest .build dependencies"
92-
run: composer update --no-progress --no-interaction --prefer-source --ansi
106+
- name: "Install lowest dependencies"
107+
if: matrix.dependencies == 'lowest'
108+
run: composer update --no-progress --no-interaction --ansi --prefer-lowest --prefer-stable
93109

94110
- name: "Run friendsofphp/php-cs-fixer"
95111
run: composer cs -- --diff --diff-format=udiff --verbose

.github/workflows/markdown-lint.yml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,31 @@ jobs:
1717
runs-on: ubuntu-latest
1818

1919
steps:
20-
- uses: actions/checkout@v2
20+
- name: "Git checkout"
21+
uses: actions/checkout@v2
2122
with:
22-
fetch-depth: 0
23-
persist-credentials: false
23+
fetch-depth: 2
24+
env:
25+
GIT_COMMITTER_NAME: "GitHub Actions Shell"
26+
GIT_AUTHOR_NAME: "GitHub Actions Shell"
27+
EMAIL: "github-actions[bot]@users.noreply.github.com"
2428

25-
- name: Use Node.js 14.x
29+
- name: "Use Node.js 14.x"
2630
uses: actions/setup-node@v2
2731
with:
2832
node-version: 14.16.0
2933

30-
- name: set git credentials
34+
- name: "Configure Container"
35+
env:
36+
GIT_USER_EMAIL: ${{ secrets.GIT_USER_EMAIL }}
37+
GIT_USER_USERNAME: ${{ secrets.GIT_USER_USERNAME }}
3138
run: |
32-
git config --local user.email "d.bannert@anolilab.de"
33-
git config --local user.name "Daniel Bannert"
39+
EMAIL=${GIT_USER_EMAIL:-"github-actions[bot]@users.noreply.github.com"}
40+
NAME=${GIT_USER_USERNAME:-"github-actions-shell"}
41+
42+
git config --global user.email "${EMAIL}"
43+
git config --global user.name "${NAME}"
44+
3445
- name: Get yarn cache directory path
3546
id: yarn-cache-dir-path
3647
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"

.github/workflows/prune.yaml

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

.github/workflows/stale-issues.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: "Close stale issues"
2+
on:
3+
schedule:
4+
- cron: "0 0 * * *"
5+
6+
jobs:
7+
default:
8+
timeout-minutes: 1
9+
runs-on: "ubuntu-latest"
10+
steps:
11+
- uses: actions/stale@v3
12+
with:
13+
repo-token: ${{ secrets.GITHUB_TOKEN }}
14+
stale-issue-message: |
15+
This issue has been automatically marked as stale because it has been open for 21 days with no activity. It will be closed in 7 days if no further activity (Remove label or comment) occurs.
16+
If we missed this issue please reply to keep it active.
17+
Thanks for being a part of this project. 🙏
18+
stale-issue-label: "Stale"
19+
remove-stale-when-updated: true
20+
exempt-issue-labels: "Added,Enhancement,Changed,Deprecated,Fixed,Removed,Security,Status: Help wanted,Status: Needs Work,Status: Waiting for feedback,Type: Unconfirmed,Type: Bug"
21+
days-before-stale: 21
22+
days-before-close: 7
23+
24+
invalid:
25+
timeout-minutes: 1
26+
runs-on: "ubuntu-latest"
27+
steps:
28+
- uses: actions/stale@v3
29+
with:
30+
repo-token: ${{ secrets.GITHUB_TOKEN }}
31+
stale-issue-message: |
32+
This issue has been automatically marked as stale because it has been labeled as invalid.
33+
Thanks for being a part of this project. 🙏
34+
stale-issue-label: "Stale"
35+
only-labels: "Type: Unconfirmed"
36+
days-before-stale: 1
37+
days-before-close: 2
38+
39+
duplicate:
40+
timeout-minutes: 1
41+
runs-on: "ubuntu-latest"
42+
steps:
43+
- uses: actions/stale@v3
44+
with:
45+
repo-token: ${{ secrets.GITHUB_TOKEN }}
46+
stale-issue-message: |
47+
This issue has been automatically marked as stale because it has been labeled as duplicate.
48+
Thanks for being a part of this project. 🙏
49+
stale-issue-label: "Stale"
50+
only-labels: "Duplicate"
51+
days-before-stale: 1
52+
days-before-close: 2
53+
54+
wontfix:
55+
timeout-minutes: 1
56+
runs-on: "ubuntu-latest"
57+
steps:
58+
- uses: actions/stale@v3
59+
with:
60+
repo-token: ${{ secrets.GITHUB_TOKEN }}
61+
stale-issue-message: |
62+
This issue has been automatically marked as stale because it has been labeled as wontfix.
63+
Thanks for being a part of this project. 🙏
64+
stale-issue-label: "Stale"
65+
only-labels: "Type: Wontfix"
66+
days-before-stale: 1
67+
days-before-close: 2

base_rules.neon

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ includes:
44
- %rootDir%/../../phpstan/phpstan-phpunit/extension.neon
55
- %rootDir%/../../phpstan/phpstan-phpunit/rules.neon
66
- %rootDir%/../../phpstan/phpstan-strict-rules/rules.neon
7-
- %rootDir%/../../phpstan/phpstan/conf/bleedingEdge.neon
87
- %rootDir%/../../thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon
98
- %rootDir%/../../slam/phpstan-extensions/conf/slam-rules.neon
109
- %rootDir%/../../symplify/phpstan-rules/config/services/services.neon

0 commit comments

Comments
 (0)