diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 213f9ac..13e713b 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -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: @@ -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 }} @@ -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: @@ -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: @@ -116,5 +186,8 @@ jobs: phpunit_args: --group unit branch: 2.2 + + + - name: Run Ubuntu Tests run: vendor/bin/phpunit --group ubuntu diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 2667a41..e310cb9 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -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: @@ -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: @@ -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: @@ -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 diff --git a/composer.json b/composer.json index 4de0f43..faf350a 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "matriphe/larinfo", "description": "Display system information (IP address, OS, versions) for Laravel.", "type": "library", - "keywords":[ + "keywords": [ "laravel", "larinfo", "ipinfo", @@ -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": [