From 8ae3b720e15516f4be258933a776d0bae0d52658 Mon Sep 17 00:00:00 2001 From: Muhammad Zamroni Date: Sun, 24 Apr 2022 22:25:17 +0200 Subject: [PATCH 1/4] Update README for requirement info --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5ffcd22..0514d61 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,8 @@ It wraps [Linfo](https://github.com/jrgp/linfo) to show IP address information o ## Requirements -- **PHP version**: `^7.4` and `^8.0`. -- **Laravel version**: `5.7.*`, `5.8.*`, `^6.0`, `^7.0`, and `^8.0`. +- **PHP version**: `^8.0.2`. +- **Laravel version**: `^9.0`. ### For Windows User @@ -31,7 +31,8 @@ composer require matriphe/larinfo ``` ### Older Version -For older version, **[please check version 2.x](https://github.com/matriphe/larinfo/tree/2.2)** which supports Laravel `5.0`, `5.1`, `5.2`, `5.3`, `5.4`, `5.5`, and `5.6`. +- Laravel `5.0`, `5.1`, `5.2`, `5.3`, `5.4`, `5.5`, and `5.6`, **[please use version 2.2](https://github.com/matriphe/larinfo/releases/tag/2.2)** by running `composer require matriphe/larinfo:2.2`. +- Laravel `5.7.*`, `5.8.*`, `^6.0`, `^7.0`, and `^8.0`, **[please use version 3.0.0](https://github.com/matriphe/larinfo/releases/tag/3.0.0)** by running `composer require matriphe/larinfo:3.0.0`. ### Configuration From ec3c1e6ec4f2b428b01f6dcd5d184fb2406af0c7 Mon Sep 17 00:00:00 2001 From: Muhammad Zamroni Date: Sun, 24 Apr 2022 22:33:36 +0200 Subject: [PATCH 2/4] Update composer dependencies --- composer.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 18d1954..f6210a5 100644 --- a/composer.json +++ b/composer.json @@ -10,16 +10,16 @@ "sysinfo" ], "require": { - "php": "^7.4|^8.0", + "php": "^8.0.2", "ext-pdo": "*", "davidepastore/ipinfo": "^0.6", - "laravel/framework": "5.7.*|5.8.*|^6.0|^7.0|^8.0", + "laravel/framework": "^9.0", "linfo/linfo": "^4.0" }, "require-dev": { "mockery/mockery": "^1.0", - "orchestra/testbench": "^3.7|^4.0|^5.0|^6.0", - "phpunit/phpunit": "^7.0|^8.5|^9.5" + "orchestra/testbench": "^7.0", + "phpunit/phpunit": "^9.5" }, "license": "GPL-3.0", "authors": [ From 99143cf8ff28a9b94d12f757a98f306c05f2b7f1 Mon Sep 17 00:00:00 2001 From: Muhammad Zamroni Date: Sun, 24 Apr 2022 22:36:52 +0200 Subject: [PATCH 3/4] Update GitHub Actions --- .github/workflows/larinfo.yml | 52 ++++++----------------------------- 1 file changed, 9 insertions(+), 43 deletions(-) diff --git a/.github/workflows/larinfo.yml b/.github/workflows/larinfo.yml index b35cece..b32086a 100644 --- a/.github/workflows/larinfo.yml +++ b/.github/workflows/larinfo.yml @@ -1,49 +1,15 @@ name: Larinfo on: [push, pull_request] jobs: - ubuntu-laravel-5-6: + ubuntu-laravel-9: 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-latest] - php-versions: ['7.4'] - laravel-versions: ['5.7.*', '5.8.*', '^6.20'] - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Setup PHP with Composer - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php-versions }} - - name: Check PHP Version and Modules - run: php -v && php -m - - name: Cache Composer packages - id: composer-cache - uses: actions/cache@v2 - with: - path: vendor - key: ${{ runner.os }}-${{ matrix.operating-system }}-php-${{ matrix.php-versions }}-laravel-${{ matrix.laravel-versions }}-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-${{ matrix.operating-system }}-php-${{ matrix.php-versions }}-laravel-${{ matrix.laravel-versions }}- - - name: Install Laravel - run: composer require "laravel/framework:${{ matrix.laravel-versions }}" --prefer-dist --no-progress - - name: Update Composer dependencies - run: composer update --prefer-dist --no-progress --no-suggest --optimize-autoloader - - name: Run Unit Tests - run: php vendor/bin/phpunit --group unit - - name: Run Ubuntu Tests - run: php vendor/bin/phpunit --group ubuntu - ubuntu-laravel-7-8: - 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-latest] - php-versions: ['7.4', '8.0'] - laravel-versions: ['^7.29', '^8.12'] + php-versions: ['8.0'] + laravel-versions: ['^9.0'] steps: - name: Checkout uses: actions/checkout@v2 @@ -71,7 +37,7 @@ jobs: run: vendor/bin/phpunit --group ubuntu - name: Run Larinfo Command run: php vendor/bin/testbench larinfo - macos-laravel-7-8: + macos-laravel-9: name: Laravel ${{ matrix.laravel-versions }} PHP ${{ matrix.php-versions }} ${{ matrix.operating-system }} runs-on: ${{ matrix.operating-system }} strategy: @@ -79,7 +45,7 @@ jobs: matrix: operating-system: [macos-10.15] php-versions: ['8.0'] - laravel-versions: ['^7.29', '^8.12'] + laravel-versions: ['^9.0'] steps: - name: Checkout uses: actions/checkout@v2 @@ -107,7 +73,7 @@ jobs: run: vendor/bin/phpunit --group macos - name: Run Larinfo Command run: php vendor/bin/testbench larinfo - windows-laravel-7-8: + windows-laravel-9: name: Laravel ${{ matrix.laravel-versions }} PHP ${{ matrix.php-versions }} ${{ matrix.operating-system }} without com_dotnet runs-on: ${{ matrix.operating-system }} strategy: @@ -115,7 +81,7 @@ jobs: matrix: operating-system: [windows-2019] php-versions: ['8.0'] - laravel-versions: ['^7.29', '^8.12'] + laravel-versions: ['^9.0'] steps: - name: Checkout uses: actions/checkout@v2 @@ -144,7 +110,7 @@ jobs: run: vendor/bin/phpunit --group windows - name: Run Larinfo Command run: php vendor/bin/testbench larinfo - windows-with-com-dotnet-laravel-7-8: + windows-with-com-dotnet-laravel-9: name: Laravel ${{ matrix.laravel-versions }} PHP ${{ matrix.php-versions }} ${{ matrix.operating-system }} with com_dotnet runs-on: ${{ matrix.operating-system }} strategy: @@ -152,7 +118,7 @@ jobs: matrix: operating-system: [windows-2019] php-versions: ['8.0'] - laravel-versions: ['^7.29', '^8.12'] + laravel-versions: ['^9.0'] steps: - name: Checkout uses: actions/checkout@v2 From a46fdc0ac959676fa8f49f6e58d384fa3644160e Mon Sep 17 00:00:00 2001 From: Muhammad Zamroni Date: Sun, 24 Apr 2022 23:33:52 +0200 Subject: [PATCH 4/4] Fix missing CPU clock info for Apple M1 --- src/Entities/HardwareInfo.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Entities/HardwareInfo.php b/src/Entities/HardwareInfo.php index a010ddc..cf6d167 100644 --- a/src/Entities/HardwareInfo.php +++ b/src/Entities/HardwareInfo.php @@ -69,7 +69,7 @@ public function getCpu(): array $results[] = [ self::CPU_MODEL => $model, self::CPU_VENDOR => $cpu['Vendor'] ?? null, - self::CPU_CLOCK_MHZ => $cpu['MHz'], + self::CPU_CLOCK_MHZ => $cpu['MHz'] ?? '', self::CPU_USAGE_PERCENTAGE => $cpu['usage_percentage'] ?? null, ]; }