Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 8824944

Browse files
Switch from Rector to simple-downgrader
1 parent 51a24de commit 8824944

File tree

15 files changed

+58
-572
lines changed

15 files changed

+58
-572
lines changed

‎.github/workflows/lint.yml‎

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -49,38 +49,9 @@ jobs:
4949
- name: "Install dependencies"
5050
run: "composer install --no-interaction --no-progress"
5151

52-
- name: "Install PHP for code transform"
53-
if: matrix.php-version != '8.1' && matrix.php-version != '8.2' && matrix.php-version != '8.3'
54-
uses: "shivammathur/setup-php@v2"
55-
with:
56-
coverage: "none"
57-
php-version: 8.1
58-
extensions: mbstring, intl
59-
60-
- name: "Rector downgrade cache key"
61-
id: rector-cache-key
62-
if: matrix.php-version != '8.1' && matrix.php-version != '8.2' && matrix.php-version != '8.3'
63-
run: echo "sha=$(php build/rector-cache-files-hash.php)" >> $GITHUB_OUTPUT
64-
65-
- name: "Rector downgrade cache"
66-
if: matrix.php-version != '8.1' && matrix.php-version != '8.2' && matrix.php-version != '8.3'
67-
uses: actions/cache@v3
68-
with:
69-
path: ./tmp/rectorCache.php
70-
key: "rector-v4-lint-${{ hashFiles('composer.lock', 'build/rector-downgrade.php') }}-${{ matrix.php-version }}-${{ steps.rector-cache-key.outputs.sha }}"
71-
restore-keys: |
72-
rector-v4-lint-${{ hashFiles('composer.lock', 'build/rector-downgrade.php') }}-${{ matrix.php-version }}-
73-
7452
- name: "Transform source code"
7553
if: matrix.php-version != '8.1' && matrix.php-version != '8.2' && matrix.php-version != '8.3'
76-
run: "build/transform-source ${{ matrix.php-version }}"
77-
78-
- name: "Reinstall matrix PHP version"
79-
if: matrix.php-version != '8.1' && matrix.php-version != '8.2' && matrix.php-version != '8.3'
80-
uses: "shivammathur/setup-php@v2"
81-
with:
82-
coverage: "none"
83-
php-version: "${{ matrix.php-version }}"
54+
run: "vendor/bin/simple-downgrade downgrade -c build/downgrade.php ${{ matrix.php-version }}"
8455

8556
- name: "Lint"
8657
run: "make lint"

‎.github/workflows/phar.yml‎

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,18 +51,6 @@ jobs:
5151
working-directory: "compiler"
5252
run: "../bin/phpstan analyse -l 8 src tests"
5353

54-
- name: "Rector downgrade cache key"
55-
id: rector-cache-key
56-
run: echo "sha=$(php build/rector-cache-files-hash.php)" >> $GITHUB_OUTPUT
57-
58-
- name: "Rector downgrade cache"
59-
uses: actions/cache@v3
60-
with:
61-
path: ./tmp/rectorCache.php
62-
key: "rector-v4-phar-${{ hashFiles('composer.lock', 'build/rector-downgrade.php') }}-${{ steps.rector-cache-key.outputs.sha }}"
63-
restore-keys: |
64-
rector-v4-phar-${{ hashFiles('composer.lock', 'build/rector-downgrade.php') }}-
65-
6654
- name: "Prepare for PHAR compilation"
6755
working-directory: "compiler"
6856
run: "php bin/prepare"

‎.github/workflows/reflection-golden-test.yml‎

Lines changed: 2 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -97,43 +97,10 @@ jobs:
9797
- name: "Install dependencies"
9898
run: "composer install --no-interaction --no-progress"
9999

100-
- name: "Install PHP for code transform"
101-
if: matrix.php-version != '8.1' && matrix.php-version != '8.2' && matrix.php-version != '8.3'
102-
uses: "shivammathur/setup-php@v2"
103-
with:
104-
coverage: "none"
105-
php-version: 8.1
106-
extensions: mbstring, intl
107-
108-
- name: "Rector downgrade cache key"
109-
id: rector-cache-key-base
110-
if: matrix.php-version != '8.1' && matrix.php-version != '8.2' && matrix.php-version != '8.3'
111-
run: echo "sha=$(php build/rector-cache-files-hash.php)" >> $GITHUB_OUTPUT
112-
113-
- name: "Rector downgrade cache"
114-
if: matrix.php-version != '8.1' && matrix.php-version != '8.2' && matrix.php-version != '8.3'
115-
uses: actions/cache@v3
116-
with:
117-
path: ./tmp/rectorCache.php
118-
key: "rector-v4-reflection-golden-${{ matrix.script }}-${{ matrix.operating-system }}-${{ hashFiles('composer.lock', 'build/rector-downgrade.php') }}-${{ matrix.php-version }}-${{ steps.rector-cache-key-base.outputs.sha }}"
119-
restore-keys: |
120-
rector-v4-reflection-golden-${{ matrix.script }}-${{ matrix.operating-system }}-${{ hashFiles('composer.lock', 'build/rector-downgrade.php') }}-${{ matrix.php-version }}-
121-
122100
- name: "Transform source code"
123101
if: matrix.php-version != '8.1' && matrix.php-version != '8.2' && matrix.php-version != '8.3'
124102
shell: bash
125-
run: "build/transform-source ${{ matrix.php-version }}"
126-
127-
- name: "Reinstall matrix PHP version"
128-
if: matrix.php-version != '8.1' && matrix.php-version != '8.2' && matrix.php-version != '8.3'
129-
uses: "shivammathur/setup-php@v2"
130-
with:
131-
coverage: "none"
132-
php-version: "${{ matrix.php-version }}"
133-
tools: pecl
134-
extensions: ds,mbstring
135-
ini-file: development
136-
ini-values: memory_limit=2G
103+
run: "vendor/bin/simple-downgrade downgrade -c build/downgrade.php ${{ matrix.php-version }}"
137104

138105
- name: "Dump previous reflection data"
139106
run: "php tests/generate-reflection-test.php"
@@ -149,43 +116,10 @@ jobs:
149116
- name: "Install dependencies"
150117
run: "composer install --no-interaction --no-progress"
151118

152-
- name: "Install PHP for code transform"
153-
if: matrix.php-version != '8.1' && matrix.php-version != '8.2' && matrix.php-version != '8.3'
154-
uses: "shivammathur/setup-php@v2"
155-
with:
156-
coverage: "none"
157-
php-version: 8.1
158-
extensions: mbstring, intl
159-
160-
- name: "Rector downgrade cache key"
161-
id: rector-cache-key-head
162-
if: matrix.php-version != '8.1' && matrix.php-version != '8.2' && matrix.php-version != '8.3'
163-
run: echo "sha=$(php build/rector-cache-files-hash.php)" >> $GITHUB_OUTPUT
164-
165-
- name: "Rector downgrade cache"
166-
if: matrix.php-version != '8.1' && matrix.php-version != '8.2' && matrix.php-version != '8.3'
167-
uses: actions/cache@v3
168-
with:
169-
path: ./tmp/rectorCache.php
170-
key: "rector-v4-reflection-golden-${{ matrix.script }}-${{ matrix.operating-system }}-${{ hashFiles('composer.lock', 'build/rector-downgrade.php') }}-${{ matrix.php-version }}-${{ steps.rector-cache-key-head.outputs.sha }}"
171-
restore-keys: |
172-
rector-v4-reflection-golden-${{ matrix.script }}-${{ matrix.operating-system }}-${{ hashFiles('composer.lock', 'build/rector-downgrade.php') }}-${{ matrix.php-version }}-
173-
174119
- name: "Transform source code"
175120
if: matrix.php-version != '8.1' && matrix.php-version != '8.2' && matrix.php-version != '8.3'
176121
shell: bash
177-
run: "build/transform-source ${{ matrix.php-version }}"
178-
179-
- name: "Reinstall matrix PHP version"
180-
if: matrix.php-version != '8.1' && matrix.php-version != '8.2' && matrix.php-version != '8.3'
181-
uses: "shivammathur/setup-php@v2"
182-
with:
183-
coverage: "none"
184-
php-version: "${{ matrix.php-version }}"
185-
tools: pecl
186-
extensions: ds,mbstring
187-
ini-file: development
188-
ini-values: memory_limit=2G
122+
run: "vendor/bin/simple-downgrade downgrade -c build/downgrade.php ${{ matrix.php-version }}"
189123

190124
- name: "Reflection golden test"
191125
run: "make tests-golden-reflection || true"

‎.github/workflows/static-analysis.yml‎

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -55,32 +55,10 @@ jobs:
5555
- name: "Install dependencies"
5656
run: "composer install --no-interaction --no-progress"
5757

58-
- name: "Install PHP for code transform"
59-
if: matrix.php-version != '8.1' && matrix.php-version != '8.2' && matrix.php-version != '8.3'
60-
uses: "shivammathur/setup-php@v2"
61-
with:
62-
coverage: "none"
63-
php-version: 8.1
64-
extensions: mbstring, intl
65-
66-
- name: "Rector downgrade cache key"
67-
id: rector-cache-key
68-
if: matrix.php-version != '8.1' && matrix.php-version != '8.2' && matrix.php-version != '8.3'
69-
run: echo "sha=$(php build/rector-cache-files-hash.php)" >> $GITHUB_OUTPUT
70-
71-
- name: "Rector downgrade cache"
72-
if: matrix.php-version != '8.1' && matrix.php-version != '8.2' && matrix.php-version != '8.3'
73-
uses: actions/cache@v3
74-
with:
75-
path: ./tmp/rectorCache.php
76-
key: "rector-v4-sa-${{ matrix.script }}-${{ matrix.operating-system }}-${{ hashFiles('composer.lock', 'build/rector-downgrade.php') }}-${{ matrix.php-version }}-${{ steps.rector-cache-key.outputs.sha }}"
77-
restore-keys: |
78-
rector-v4-sa-${{ matrix.script }}-${{ matrix.operating-system }}-${{ hashFiles('composer.lock', 'build/rector-downgrade.php') }}-${{ matrix.php-version }}-
79-
8058
- name: "Transform source code"
8159
if: matrix.php-version != '8.1' && matrix.php-version != '8.2' && matrix.php-version != '8.3'
8260
shell: bash
83-
run: "build/transform-source ${{ matrix.php-version }}"
61+
run: "vendor/bin/simple-downgrade downgrade -c build/downgrade.php ${{ matrix.php-version }}"
8462

8563
- name: "Upload transformed sources"
8664
if: matrix.php-version == '7.2'
@@ -89,15 +67,6 @@ jobs:
8967
name: transformed-src
9068
path: src
9169

92-
- name: "Reinstall matrix PHP version"
93-
if: matrix.php-version != '8.1' && matrix.php-version != '8.2' && matrix.php-version != '8.3'
94-
uses: "shivammathur/setup-php@v2"
95-
with:
96-
coverage: "none"
97-
php-version: "${{ matrix.php-version }}"
98-
ini-file: development
99-
extensions: mbstring
100-
10170
- name: "Paratest patch"
10271
if: matrix.php-version == '7.2'
10372
run: composer config extra.patches.brianium/paratest --json --merge '["patches/paratest.patch"]'

‎.github/workflows/tests.yml‎

Lines changed: 2 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -60,43 +60,10 @@ jobs:
6060
- name: "Install dependencies"
6161
run: "composer install --no-interaction --no-progress"
6262

63-
- name: "Install PHP for code transform"
64-
if: matrix.php-version != '8.1' && matrix.php-version != '8.2' && matrix.php-version != '8.3'
65-
uses: "shivammathur/setup-php@v2"
66-
with:
67-
coverage: "none"
68-
php-version: 8.1
69-
extensions: mbstring, intl
70-
71-
- name: "Rector downgrade cache key"
72-
id: rector-cache-key
73-
if: matrix.php-version != '8.1' && matrix.php-version != '8.2' && matrix.php-version != '8.3'
74-
run: echo "sha=$(php build/rector-cache-files-hash.php)" >> $GITHUB_OUTPUT
75-
76-
- name: "Rector downgrade cache"
77-
if: matrix.php-version != '8.1' && matrix.php-version != '8.2' && matrix.php-version != '8.3'
78-
uses: actions/cache@v3
79-
with:
80-
path: ./tmp/rectorCache.php
81-
key: "rector-v4-tests-${{ matrix.script }}-${{ matrix.operating-system }}-${{ hashFiles('composer.lock', 'build/rector-downgrade.php') }}-${{ matrix.php-version }}-${{ steps.rector-cache-key.outputs.sha }}"
82-
restore-keys: |
83-
rector-v4-tests-${{ matrix.script }}-${{ matrix.operating-system }}-${{ hashFiles('composer.lock', 'build/rector-downgrade.php') }}-${{ matrix.php-version }}-
84-
8563
- name: "Transform source code"
8664
if: matrix.php-version != '8.1' && matrix.php-version != '8.2' && matrix.php-version != '8.3'
8765
shell: bash
88-
run: "build/transform-source ${{ matrix.php-version }}"
89-
90-
- name: "Reinstall matrix PHP version"
91-
if: matrix.php-version != '8.1' && matrix.php-version != '8.2' && matrix.php-version != '8.3'
92-
uses: "shivammathur/setup-php@v2"
93-
with:
94-
coverage: "none"
95-
php-version: "${{ matrix.php-version }}"
96-
tools: pecl
97-
extensions: ds,mbstring
98-
ini-file: development
99-
ini-values: memory_limit=2G
66+
run: "vendor/bin/simple-downgrade downgrade -c build/downgrade.php ${{ matrix.php-version }}"
10067

10168
- name: "Tests"
10269
run: "make tests"
@@ -185,39 +152,9 @@ jobs:
185152
- name: "Install dependencies"
186153
run: "composer install --no-interaction --no-progress"
187154

188-
- name: "Install PHP for code transform"
189-
uses: "shivammathur/setup-php@v2"
190-
with:
191-
coverage: "none"
192-
php-version: "8.1"
193-
extensions: mbstring, intl
194-
195-
- name: "Rector downgrade cache key"
196-
id: rector-cache-key
197-
if: matrix.php-version != '8.1' && matrix.php-version != '8.2' && matrix.php-version != '8.3'
198-
run: echo "sha=$(php build/rector-cache-files-hash.php)" >> $GITHUB_OUTPUT
199-
200-
- name: "Rector downgrade cache"
201-
uses: actions/cache@v3
202-
with:
203-
path: ./tmp/rectorCache.php
204-
key: "rector-v4-tests-old-${{ matrix.script }}-${{ matrix.operating-system }}-${{ hashFiles('composer.lock', 'build/rector-downgrade.php') }}-${{ matrix.php-version }}-${{ steps.rector-cache-key.outputs.sha }}"
205-
restore-keys: |
206-
rector-v4-tests-old-${{ matrix.script }}-${{ matrix.operating-system }}-${{ hashFiles('composer.lock', 'build/rector-downgrade.php') }}-${{ matrix.php-version }}-
207-
208155
- name: "Transform source code"
209156
shell: bash
210-
run: "build/transform-source ${{ matrix.php-version }}"
211-
212-
- name: "Reinstall matrix PHP version"
213-
uses: "shivammathur/setup-php@v2"
214-
with:
215-
coverage: "none"
216-
php-version: "${{ matrix.php-version }}"
217-
tools: pecl
218-
extensions: ds,mbstring
219-
ini-file: development
220-
ini-values: memory_limit=2G
157+
run: "vendor/bin/simple-downgrade downgrade -c build/downgrade.php ${{ matrix.php-version }}"
221158

222159
- name: "Paratest patch"
223160
run: composer config extra.patches.brianium/paratest --json --merge '["patches/paratest.patch"]'

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /