Skip to content

Commit

Permalink
Support Laravel 11 (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
marianogoldman authored Apr 7, 2024
1 parent 720d670 commit df19e22
Show file tree
Hide file tree
Showing 7 changed files with 2,090 additions and 1,123 deletions.
77 changes: 50 additions & 27 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,53 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Validate composer.json and composer.lock
run: composer validate

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress --no-suggest

# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md

- name: Run test suite
env:
PAYPAL_API_CLIENT_ID: ${{ secrets.PAYPAL_API_CLIENT_ID }}
PAYPAL_API_CLIENT_SECRET: ${{ secrets.PAYPAL_API_CLIENT_SECRET }}
XDEBUG_MODE: coverage
run: composer run-script test
- uses: actions/checkout@v4

- name: Setup cache environment
id: extcache
uses: shivammathur/cache-extensions@v1
with:
php-version: "8.3"
extensions: mbstring, dom, fileinfo, intl, gd, imagick, bcmath, soap, zip, pcov
key: "extcache"

- name: Cache extensions
uses: actions/cache@v4
with:
path: ${{ steps.extcache.outputs.dir }}
key: ${{ steps.extcache.outputs.key }}
restore-keys: ${{ steps.extcache.outputs.key }}

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.3"
extensions: mbstring, dom, fileinfo, intl, gd, imagick, bcmath, soap, zip, pcov
coverage: pcov

- name: Validate composer.json and composer.lock
run: composer validate


- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress --no-suggest

# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md

- name: Run test suite
env:
PAYPAL_API_CLIENT_ID: ${{ secrets.PAYPAL_API_CLIENT_ID }}
PAYPAL_API_CLIENT_SECRET: ${{ secrets.PAYPAL_API_CLIENT_SECRET }}
XDEBUG_MODE: coverage
run: composer run-script test
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
}
],
"require": {
"php": "^8.1",
"php": "^8.2",
"guzzlehttp/guzzle": "^7.5.0",
"illuminate/support": "^10.0",
"illuminate/support": "^11.0",
"ext-json": "*"
},
"require-dev": {
"orchestra/testbench": "^8",
"phpunit/phpunit": "^10"
"orchestra/testbench": "^9",
"phpunit/phpunit": "^11"
},
"autoload": {
"psr-4": {
Expand Down
Loading

0 comments on commit df19e22

Please sign in to comment.