8484 # path to Checkout working directory is /home/runner/work/repo-name/repo-name , so just add /vendor/
8585 path : ${{ github.workspace }}/vendor/
8686 # Use composer.json for key, if composer.lock is not committed.
87- key : ${{ runner.os }}-PHP${{ inputs.php-version }}-vendor-${{ hashFiles('**/composer.json') }}
87+ key : phpcs-fix- ${{ runner.os }}-PHP${{ inputs.php-version }}-vendor-${{ hashFiles('**/composer.json') }}
8888
8989 - name : " Use the latest PHPCS version"
9090 if : ${{ steps.vendor-cache.outputs.cache-hit != 'true' }}
@@ -124,12 +124,12 @@ runs:
124124 MORE_ISSUES=false
125125 vendor/bin/phpcbf --extensions="${{ inputs.extensions }}" . --standard="${{ env.USE_STANDARD }}" --ignore="${{ inputs.ignore }}" || PHPCBF_EXIT_CODE=$?
126126 if [ ${PHPCBF_EXIT_CODE} -ne 0 ]; then
127- echo "::notice title=Non-zero code exit of phpcbf = ${PHPCBF_EXIT_CODE}:: phpcbf wasn't idle"
127+ echo "::notice title=phpcbf wasn't idle:: Non-zero code exit of phpcbf = ${PHPCBF_EXIT_CODE} ... phpcbf wasn't idle"
128128
129129 vendor/bin/phpcs --extensions="${{ inputs.extensions }}" . --standard="$use_standard" --ignore="${{ inputs.ignore }}" || MORE_ISSUES=true
130130 # because of `||`, the previous command always exit 0
131131 if [ "${MORE_ISSUES}" = "true" ]; then
132- echo "::warning title=Some phpcs issues remained.::Manual fix necessary."
132+ echo "::warning title=Some phpcs issues remained.::Some phpcs issues remained. Manual fix necessary."
133133 fi
134134 fi
135135
@@ -138,7 +138,7 @@ runs:
138138
139139 # Check for fixable changes
140140 if [ -z "$(git status --porcelain)" ]; then
141- echo "::warning title=No fixable errors were found by phpcbf::Manual fix necessary. Compare to the PHP Code Sniffer section above."
141+ echo "::warning title=No fixable errors were found by phpcbf::No fixable errors were found by phpcbf: Manual fix necessary. Compare to the PHP Code Sniffer section above."
142142 if [ "${{ inputs.stop-on-manual-fix }}" = "true" ]; then
143143 # Indicates an error
144144 exit 1
@@ -159,7 +159,7 @@ runs:
159159 # name includes timestamp and short_hash
160160 BRANCH_NAME="phpcbf/fix-$(date +'%y%m%d%H%M%S')-$(git rev-parse --short HEAD)"
161161 git checkout -b "$BRANCH_NAME"
162- echo "::warning title=New branch created::Consider pull request for a new branch: $BRANCH_NAME (or delete it)"
162+ echo "::warning title=New branch created::New branch created: Consider pull request for a new branch: $BRANCH_NAME (or delete it)"
163163 NOTICE_MESSAGE="A PHPCBF commit was successfully added to the new branch: $BRANCH_NAME"
164164 fi
165165
0 commit comments