Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: GitHub workflows broken due to outdated versions / OS #255

Merged
merged 3 commits into from
Mar 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 16 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,27 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
php: [ '8.3', '8.2', '8.1' ]
os: [ 'ubuntu-latest' ]
include:
- php: '8.3'
os: 'ubuntu-latest'
- php: '8.2'
os: 'ubuntu-latest'
- php: '8.1'
os: 'ubuntu-latest'
- php: '8.0'
os: 'ubuntu-20.04'
os: 'ubuntu-24.04'
- php: '7.4'
os: 'ubuntu-20.04'
os: 'ubuntu-24.04'
fail-fast: false
env:
COVERAGE_CACHE_PATH: phpunit-coverage-cache
PHP_VERSION: ${{ matrix.php }}

steps:
- uses: actions/checkout@7884fcad6b5d53d10323aee724dc68d8b9096a2e # v2.4.2
- uses: actions/checkout@v4

- name: Set up PHP ${{ matrix.php }}
uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2.28.0
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: pcov
Expand All @@ -37,7 +41,7 @@ jobs:
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed # v2.1.7
- uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand All @@ -48,7 +52,7 @@ jobs:
run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist

- name: Restore phpunit coverage cache
uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed # v2.1.7
uses: actions/cache@v4
with:
path: ${{ env.COVERAGE_CACHE_PATH }}
key: ${{ runner.os }}-coverage-${{ github.ref }}-${{ github.sha }}
Expand Down Expand Up @@ -77,14 +81,14 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@e2f20e631ae6d7dd3b768f56a5d2af784dd54791 # v2.5.0
- uses: actions/checkout@v4

- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # v3.0.11
- uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand All @@ -101,13 +105,13 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@e2f20e631ae6d7dd3b768f56a5d2af784dd54791 # v2.5.0
- uses: actions/checkout@v4

- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # v3.0.11
- uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand Down
1 change: 1 addition & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ includes:
parameters:
level: max
reportUnmatchedIgnoredErrors: false
treatPhpDocTypesAsCertain: false
Copy link
Contributor Author

@agibson-godaddy agibson-godaddy Mar 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made this change to address this error:

image

Seems like a good idea anyway. (it was throwing the error because a docblock typed it as a string, but that doesn't actually enforce the type in reality, which is why I think the config change makes sense)

exceptions:
check:
missingCheckedExceptionInThrows: true
Expand Down