@@ -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