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

Laravel 11.x Compatibility #41

Closed
Closed
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
123 changes: 98 additions & 25 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,31 @@ on:
branches:
- master


jobs:
version-latest:
name: Latest version Laravel ${{ matrix.laravel-versions }} PHP ${{ matrix.php-versions }} ${{ matrix.operating-system }}




runs-on: ${{ matrix.operating-system }}




strategy:
fail-fast: false
matrix:
operating-system: [ ubuntu-latest ]
php-versions: [ '8.1', '8.2', '8.3' ]
laravel-versions: [ '^10.0' ]
operating-system: [ubuntu-latest]
php-versions: ['8.1', '8.2', '8.3']
laravel-versions: ['11.0', ^10.0]
exclude:
- laravel-versions: '11.0'
php-versions: '8.1'




steps:
- uses: matriphe/laravel-pkg-test-action@v2
with:
Expand All @@ -26,39 +40,56 @@ jobs:
laravel_install_args: --prefer-dist --no-progress --no-suggest --optimize-autoloader --no-plugins
package_install_args: --prefer-dist --no-progress --no-suggest --optimize-autoloader --no-plugins




- name: Run Ubuntu Tests
run: vendor/bin/phpunit --group ubuntu

- name: Run Larinfo Command
run: php vendor/bin/testbench larinfo


# Note for PHP 8.0.
# For PHP 8.0, we need to force Laravel to use Symfony 6.0 instead of 6.1. Because some syntax support is missing.
#
# The error:
# PHP Parse error: syntax error, unexpected token ")" in path\vendor\symfony\finder\Finder.php on line 588
#
# The reason: https://github.com/symfony/symfony/discussions/46540#discussioncomment-2861896

- name: Run Larinfo Command
run: php vendor/bin/testbench larinfo

version-4-0:
name: Version 4 Laravel ${{ matrix.laravel-versions }} PHP ${{ matrix.php-versions }} ${{ matrix.operating-system }}




runs-on: ${{ matrix.operating-system }}




strategy:
fail-fast: false
matrix:
operating-system: [ ubuntu-latest ]
php-versions: [ '8.0', '8.1' ]
laravel-versions: [ '^9.0' ]
operating-system: [ubuntu-latest]
php-versions: ['8.0', '8.1', '8.2']
laravel-versions: ['11.0', ^9.0]
exclude:
- laravel-versions: '11.0'
php-versions: '8.0'
- laravel-versions: '11.0'
php-versions: '8.1'




steps:
- id: composer-flag
name: Set Composer Flag based on PHP Version input
uses: haya14busa/action-cond@v1
with:
cond: ${{ matrix.php-versions == '8.0' }}
if_true: '--ignore-platform-req=php+'
if_true: --ignore-platform-req=php+
if_false: ''




- uses: matriphe/laravel-pkg-test-action@v2
with:
operating_system: ${{ matrix.operating-system }}
Expand All @@ -69,22 +100,42 @@ jobs:
package_install_args: --prefer-dist --no-progress --no-suggest --optimize-autoloader --no-plugins ${{ steps.composer-flag.outputs.value }}
branch: 4.0.0




- name: Run Ubuntu Tests
run: vendor/bin/phpunit --group ubuntu




- name: Run Larinfo Command
run: php vendor/bin/testbench larinfo


version-3:
name: Version 3.0.0 Laravel ${{ matrix.laravel-versions }} PHP ${{ matrix.php-versions }} ${{ matrix.operating-system }}




runs-on: ${{ matrix.operating-system }}




strategy:
fail-fast: false
matrix:
operating-system: [ ubuntu-latest ]
php-versions: [ '7.4' ]
laravel-versions: [ '5.7.*', '^6.0', '^7.0', '^8.0' ]
operating-system: [ubuntu-latest]
php-versions: ['7.4', '8.2']
laravel-versions: ['5.7.*', '11.*', ^6.0, ^7.0, ^8.0]
exclude:
- laravel-versions: 11.*
php-versions: '7.4'




steps:
- uses: matriphe/laravel-pkg-test-action@v2
with:
Expand All @@ -94,19 +145,38 @@ jobs:
phpunit_args: --group unit
branch: 3.0.0




- name: Run Ubuntu Tests
run: vendor/bin/phpunit --group ubuntu


version-2:
name: Version 2.2 Laravel ${{ matrix.laravel-versions }} PHP ${{ matrix.php-versions }} ${{ matrix.operating-system }}




runs-on: ${{ matrix.operating-system }}




strategy:
fail-fast: false
matrix:
operating-system: [ ubuntu-latest ]
php-versions: [ '7.3', '7.4' ]
laravel-versions: [ '5.6.*' ]
operating-system: [ubuntu-latest]
php-versions: ['7.3', '7.4', '8.2']
laravel-versions: ['5.6.*', '11.*']
exclude:
- laravel-versions: 11.*
php-versions: '7.3'
- laravel-versions: 11.*
php-versions: '7.4'




steps:
- uses: matriphe/laravel-pkg-test-action@v2
with:
Expand All @@ -116,5 +186,8 @@ jobs:
phpunit_args: --group unit
branch: 2.2




- name: Run Ubuntu Tests
run: vendor/bin/phpunit --group ubuntu
71 changes: 58 additions & 13 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,28 @@ on:
- reopened
- synchronize


jobs:
ubuntu-laravel-10:
name: Laravel ${{ matrix.laravel-versions }} PHP ${{ matrix.php-versions }} ${{ matrix.operating-system }}



runs-on: ${{ matrix.operating-system }}



strategy:
fail-fast: false
matrix:
operating-system: [ ubuntu-20.04, ubuntu-22.04 ]
php-versions: [ '8.1', '8.2', '8.3' ]
laravel-versions: [ '^10.0' ]
operating-system: [ubuntu-20.04, ubuntu-22.04]
php-versions: ['8.1', '8.2', '8.3']
laravel-versions: ['11.0', ^10.0]
exclude:
- laravel-versions: '11.0'
php-versions: '8.1'



steps:
- uses: matriphe/laravel-pkg-test-action@v2
with:
Expand All @@ -28,22 +39,37 @@ jobs:
laravel_install_args: --prefer-dist --no-progress --no-suggest --optimize-autoloader --no-plugins
package_install_args: --prefer-dist --no-progress --no-suggest --optimize-autoloader --no-plugins



- name: Run Ubuntu Tests
run: vendor/bin/phpunit --group ubuntu



- name: Run Larinfo Command
run: php vendor/bin/testbench larinfo


macos-laravel-10:
name: Laravel ${{ matrix.laravel-versions }} PHP ${{ matrix.php-versions }} ${{ matrix.operating-system }}



runs-on: ${{ matrix.operating-system }}



strategy:
fail-fast: false
matrix:
operating-system: [ macos-12, macos-13 ]
php-versions: [ '8.1', '8.2', '8.3' ]
laravel-versions: [ '^10.0' ]
operating-system: [macos-12, macos-13]
php-versions: ['8.1', '8.2', '8.3']
laravel-versions: ['11.0', ^10.0]
exclude:
- laravel-versions: '11.0'
php-versions: '8.1'



steps:
- uses: matriphe/laravel-pkg-test-action@v2
with:
Expand All @@ -54,23 +80,38 @@ jobs:
laravel_install_args: --prefer-dist --no-progress --no-suggest --optimize-autoloader --no-plugins
package_install_args: --prefer-dist --no-progress --no-suggest --optimize-autoloader --no-plugins



- name: Run MacOS Tests
run: vendor/bin/phpunit --group macos



- name: Run Larinfo Command
run: php vendor/bin/testbench larinfo


windows-laravel-10:
name: Laravel ${{ matrix.laravel-versions }} PHP ${{ matrix.php-versions }} ${{ matrix.operating-system }} without com_dotnet



runs-on: ${{ matrix.operating-system }}



strategy:
fail-fast: false
matrix:
operating-system: [ windows-2019, windows-2022 ]
php-versions: [ '8.1', '8.2', '8.3' ]
laravel-versions: [ '^10.0' ]
php-extension: [ 'pdo_sqlite,sqlite3,fileinfo' , 'pdo_sqlite,sqlite3,fileinfo,com_dotnet']
operating-system: [windows-2019, windows-2022]
php-versions: ['8.1', '8.2', '8.3']
laravel-versions: ['11.0', ^10.0]
php-extension: ['8.2', 'pdo_sqlite,sqlite3,fileinfo', 'pdo_sqlite,sqlite3,fileinfo,com_dotnet']
exclude:
- laravel-versions: '11.0'
php-versions: '8.1'



steps:
- uses: matriphe/laravel-pkg-test-action@v2
with:
Expand All @@ -83,10 +124,14 @@ jobs:
php_extensions: ${{ matrix.php-extension }}
shell_name: pwsh



- name: Run Windows Tests
shell: pwsh
run: vendor/bin/phpunit --group windows



- name: Run Larinfo Command
shell: pwsh
run: php vendor/bin/testbench larinfo
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "matriphe/larinfo",
"description": "Display system information (IP address, OS, versions) for Laravel.",
"type": "library",
"keywords":[
"keywords": [
"laravel",
"larinfo",
"ipinfo",
Expand All @@ -13,12 +13,12 @@
"php": "^8.1",
"ext-pdo": "*",
"davidepastore/ipinfo": "^0.6",
"laravel/framework": "^10.0",
"laravel/framework": "^10.0|^11.0",
"linfo/linfo": "^4.0"
},
"require-dev": {
"mockery/mockery": "^1.0",
"orchestra/testbench": "^8.0"
"orchestra/testbench": "^8.0|^9.0"
},
"license": "MIT",
"authors": [
Expand Down
Loading