Skip to content

Commit 711a32c

Browse files
committed
Restore version and dependabot updates from 2.x branch
1 parent 948d77f commit 711a32c

3 files changed

Lines changed: 50 additions & 33 deletions

File tree

.github/dependabot.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,14 @@ updates:
88
- package-ecosystem: "github-actions"
99
directory: "/"
1010
schedule:
11-
interval: "weekly"
11+
interval: "cron"
12+
cronjob: "10 22 5,20 * *" # At 22:10, every 5th and 20th day of the month.
1213
open-pull-requests-limit: 5
1314
commit-message:
1415
prefix: "GH Actions:"
16+
groups:
17+
action-runners:
18+
applies-to: version-updates
19+
update-types:
20+
- "minor"
21+
- "patch"

.github/workflows/csqa.yml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,12 @@ jobs:
2626

2727
steps:
2828
- name: Checkout code
29-
uses: actions/checkout@v5
29+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
30+
with:
31+
persist-credentials: false
3032

3133
- name: Install PHP
32-
uses: shivammathur/setup-php@v2
34+
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # 2.37.0
3335
with:
3436
php-version: "latest"
3537
coverage: none
@@ -42,14 +44,14 @@ jobs:
4244
# Install dependencies and handle caching in one go.
4345
# @link https://github.com/marketplace/actions/install-php-dependencies-with-composer
4446
- name: Install Composer dependencies
45-
uses: "ramsey/composer-install@v3"
47+
uses: "ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda" # 4.0.0
4648
with:
4749
# Bust the cache at least once a month - output format: YYYY-MM.
4850
custom-cache-suffix: $(date -u "+%Y-%m")
4951

5052
# Validate the XML file.
5153
- name: Validate ruleset against schema
52-
uses: phpcsstandards/xmllint-validate@v1
54+
uses: phpcsstandards/xmllint-validate@0fd9c4a9046055f621fca4bbdccb8eab1fd59fdc # v1.0.1
5355
with:
5456
pattern: "VariableAnalysis/ruleset.xml"
5557
xsd-file: "vendor/squizlabs/php_codesniffer/phpcs.xsd"
@@ -74,10 +76,12 @@ jobs:
7476

7577
steps:
7678
- name: Checkout code
77-
uses: actions/checkout@v5
79+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
80+
with:
81+
persist-credentials: false
7882

7983
- name: Install PHP
80-
uses: shivammathur/setup-php@v2
84+
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # 2.37.0
8185
with:
8286
php-version: "8.1"
8387
coverage: none
@@ -86,7 +90,7 @@ jobs:
8690
# Dependencies need to be installed to make sure the PHPUnit classes are recognized.
8791
# @link https://github.com/marketplace/actions/install-php-dependencies-with-composer
8892
- name: Install Composer dependencies
89-
uses: "ramsey/composer-install@v3"
93+
uses: "ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda" # 4.0.0
9094
with:
9195
# Bust the cache at least once a month - output format: YYYY-MM.
9296
custom-cache-suffix: $(date -u "+%Y-%m")
@@ -104,10 +108,12 @@ jobs:
104108

105109
steps:
106110
- name: Checkout code
107-
uses: actions/checkout@v5
111+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
112+
with:
113+
persist-credentials: false
108114

109115
- name: Install PHP
110-
uses: shivammathur/setup-php@v2
116+
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # 2.37.0
111117
with:
112118
php-version: "8.1"
113119
coverage: none
@@ -116,7 +122,7 @@ jobs:
116122
# Dependencies need to be installed to make sure the PHPUnit classes are recognized.
117123
# @link https://github.com/marketplace/actions/install-php-dependencies-with-composer
118124
- name: Install Composer dependencies
119-
uses: "ramsey/composer-install@v3"
125+
uses: "ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda" # 4.0.0
120126
with:
121127
# Bust the cache at least once a month - output format: YYYY-MM.
122128
custom-cache-suffix: $(date -u "+%Y-%m")

.github/workflows/test.yml

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -101,21 +101,23 @@ jobs:
101101

102102
steps:
103103
- name: Checkout code
104-
uses: actions/checkout@v5
104+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
105+
with:
106+
persist-credentials: false
105107

106108
- name: Setup ini config
107109
id: set_ini
108110
run: |
109111
# On stable PHPCS versions, allow for PHP deprecation notices.
110112
# Unit tests don't need to fail on those for stable releases where those issues won't get fixed anymore.
111113
if [ "${{ matrix.phpcs_version }}" != "4.x-dev" ]; then
112-
echo 'PHP_INI=error_reporting=E_ALL & ~E_DEPRECATED, display_errors=On, display_startup_errors=On, zend.assertions=1' >> $GITHUB_OUTPUT
114+
echo 'PHP_INI=error_reporting=E_ALL & ~E_DEPRECATED, display_errors=On, display_startup_errors=On, zend.assertions=1' >> "$GITHUB_OUTPUT"
113115
else
114-
echo 'PHP_INI=error_reporting=-1, display_errors=On, display_startup_errors=On, zend.assertions=1' >> $GITHUB_OUTPUT
116+
echo 'PHP_INI=error_reporting=-1, display_errors=On, display_startup_errors=On, zend.assertions=1' >> "$GITHUB_OUTPUT"
115117
fi
116118
117119
- name: Install PHP
118-
uses: shivammathur/setup-php@v2
120+
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # 2.37.0
119121
with:
120122
php-version: ${{ matrix.php }}
121123
ini-values: ${{ steps.set_ini.outputs.PHP_INI }}
@@ -131,7 +133,7 @@ jobs:
131133
# Install dependencies and handle caching in one go.
132134
# @link https://github.com/marketplace/actions/install-php-dependencies-with-composer
133135
- name: Install Composer dependencies
134-
uses: "ramsey/composer-install@v3"
136+
uses: "ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda" # 4.0.0
135137
with:
136138
# For the PHP "nightly", we need to install with ignore platform reqs as not all dependencies may allow it yet.
137139
composer-options: ${{ matrix.php == '8.6' && '--ignore-platform-req=php+' || '' }}
@@ -140,15 +142,15 @@ jobs:
140142

141143
- name: Grab PHPUnit version
142144
id: phpunit_version
143-
run: echo "VERSION=$(vendor/bin/phpunit --version | grep --only-matching --max-count=1 --extended-regexp '\b[0-9]+\.[0-9]+')" >> $GITHUB_OUTPUT
145+
run: echo "VERSION=$(vendor/bin/phpunit --version | grep --only-matching --max-count=1 --extended-regexp '\b[0-9]+\.[0-9]+')" >> "$GITHUB_OUTPUT"
144146

145147
- name: Determine PHPUnit config file to use
146148
id: phpunit_config
147149
run: |
148150
if [ "${{ startsWith( steps.phpunit_version.outputs.VERSION, '10.' ) || startsWith( steps.phpunit_version.outputs.VERSION, '11.' ) }}" == "true" ]; then
149-
echo 'FILE=phpunit.xml.dist' >> $GITHUB_OUTPUT
151+
echo 'FILE=phpunit.xml.dist' >> "$GITHUB_OUTPUT"
150152
else
151-
echo 'FILE=phpunitlte9.xml.dist' >> $GITHUB_OUTPUT
153+
echo 'FILE=phpunitlte9.xml.dist' >> "$GITHUB_OUTPUT"
152154
fi
153155
154156
- name: Run the unit tests
@@ -179,21 +181,23 @@ jobs:
179181

180182
steps:
181183
- name: Checkout code
182-
uses: actions/checkout@v5
184+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
185+
with:
186+
persist-credentials: false
183187

184188
- name: Setup ini config
185189
id: set_ini
186190
run: |
187191
# On stable PHPCS versions, allow for PHP deprecation notices.
188192
# Unit tests don't need to fail on those for stable releases where those issues won't get fixed anymore.
189193
if [ "${{ matrix.phpcs_version }}" != "4.x-dev" ]; then
190-
echo 'PHP_INI=error_reporting=E_ALL & ~E_DEPRECATED, display_errors=On, display_startup_errors=On, zend.assertions=1' >> $GITHUB_OUTPUT
194+
echo 'PHP_INI=error_reporting=E_ALL & ~E_DEPRECATED, display_errors=On, display_startup_errors=On, zend.assertions=1' >> "$GITHUB_OUTPUT"
191195
else
192-
echo 'PHP_INI=error_reporting=-1, display_errors=On, display_startup_errors=On, zend.assertions=1' >> $GITHUB_OUTPUT
196+
echo 'PHP_INI=error_reporting=-1, display_errors=On, display_startup_errors=On, zend.assertions=1' >> "$GITHUB_OUTPUT"
193197
fi
194198
195199
- name: Install PHP
196-
uses: shivammathur/setup-php@v2
200+
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # 2.37.0
197201
with:
198202
php-version: ${{ matrix.php }}
199203
ini-values: ${{ steps.set_ini.outputs.PHP_INI }}
@@ -206,14 +210,14 @@ jobs:
206210
composer require --no-update squizlabs/php_codesniffer:"${{ matrix.phpcs_version }}"
207211
208212
- name: Install Composer dependencies
209-
uses: "ramsey/composer-install@v3"
213+
uses: "ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda" # 4.0.0
210214
with:
211215
# Bust the cache at least once a month - output format: YYYY-MM.
212216
custom-cache-suffix: $(date -u "+%Y-%m")
213217

214218
- name: Grab PHPUnit version
215219
id: phpunit_version
216-
run: echo "VERSION=$(vendor/bin/phpunit --version | grep --only-matching --max-count=1 --extended-regexp '\b[0-9]+\.[0-9]+')" >> $GITHUB_OUTPUT
220+
run: echo "VERSION=$(vendor/bin/phpunit --version | grep --only-matching --max-count=1 --extended-regexp '\b[0-9]+\.[0-9]+')" >> "$GITHUB_OUTPUT"
217221

218222
- name: "DEBUG: Show grabbed version"
219223
run: echo ${{ steps.phpunit_version.outputs.VERSION }}
@@ -222,14 +226,14 @@ jobs:
222226
id: phpunit_config
223227
run: |
224228
if [ "${{ startsWith( steps.phpunit_version.outputs.VERSION, '9.' ) && steps.phpunit_version.outputs.VERSION >= '9.3' }}" == "true" ]; then
225-
echo 'FILE=phpunitlte9.xml.dist' >> $GITHUB_OUTPUT
226-
echo 'EXTRA_ARGS=--coverage-cache ./build/phpunit-cache' >> $GITHUB_OUTPUT
229+
echo 'FILE=phpunitlte9.xml.dist' >> "$GITHUB_OUTPUT"
230+
echo 'EXTRA_ARGS=--coverage-cache ./build/phpunit-cache' >> "$GITHUB_OUTPUT"
227231
elif [ "${{ startsWith( steps.phpunit_version.outputs.VERSION, '10.' ) || startsWith( steps.phpunit_version.outputs.VERSION, '11.' ) }}" == "true" ]; then
228-
echo 'FILE=phpunit.xml.dist' >> $GITHUB_OUTPUT
229-
echo 'EXTRA_ARGS=' >> $GITHUB_OUTPUT
232+
echo 'FILE=phpunit.xml.dist' >> "$GITHUB_OUTPUT"
233+
echo 'EXTRA_ARGS=' >> "$GITHUB_OUTPUT"
230234
else
231-
echo 'FILE=phpunitlte9.xml.dist' >> $GITHUB_OUTPUT
232-
echo 'EXTRA_ARGS=' >> $GITHUB_OUTPUT
235+
echo 'FILE=phpunitlte9.xml.dist' >> "$GITHUB_OUTPUT"
236+
echo 'EXTRA_ARGS=' >> "$GITHUB_OUTPUT"
233237
fi
234238
235239
# PHPUnit 9.3 started using PHP-Parser for code coverage which can cause interference.
@@ -245,7 +249,7 @@ jobs:
245249

246250
- name: Upload coverage results to Coveralls
247251
if: ${{ success() }}
248-
uses: coverallsapp/github-action@v2
252+
uses: coverallsapp/github-action@5cbfd81b66ca5d10c19b062c04de0199c215fb6e # v2.3.7
249253
with:
250254
format: clover
251255
file: build/logs/clover.xml
@@ -258,6 +262,6 @@ jobs:
258262

259263
steps:
260264
- name: Coveralls Finished
261-
uses: coverallsapp/github-action@v2
265+
uses: coverallsapp/github-action@5cbfd81b66ca5d10c19b062c04de0199c215fb6e # v2.3.7
262266
with:
263267
parallel-finished: true

0 commit comments

Comments
 (0)