Skip to content

Commit

Permalink
Bump minimum PHP version to 8.1 & misc maintenance (#1521)
Browse files Browse the repository at this point in the history
* Bump minimum PHP version to 8.1

Laravel 10 doesn't support 8.0 anyway

* Remove phpunit 9

* gha: remove unused matrix dimension

* gha: bump runner os

* tests: remove outdated version checks
  • Loading branch information
mfn committed Feb 17, 2024
1 parent 05259b6 commit 9af62e2
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/composer-normalize.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
normalize:
timeout-minutes: 15
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Git checkout
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fix-code-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
fix-style:
name: Fix Code Style
timeout-minutes: 15
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
env:
COMPOSER_NO_INTERACTION: 1

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:

jobs:
php-laravel-integration-tests:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
timeout-minutes: 15
env:
COMPOSER_NO_INTERACTION: 1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
build:
timeout-minutes: 15
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, windows-2019]
os: [ubuntu-22.04, windows-2019]
php: [8.3, 8.2, 8.1]
laravel: [10.*, 11.*]
stability: [prefer-lowest, prefer-stable]
dependency-version: [prefer-lowest, prefer-stable]
exclude:
- php: 8.1
laravel: 11.*
Expand Down
14 changes: 8 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,17 @@ All notable changes to this project will be documented in this file.

### Fixed

### Changed
- Use of doctrine/dbal [#1512 / barryvdh](https://github.com/barryvdh/laravel-ide-helper/pull/1512)
With this functionality gone, a few changes have been made:
- support for custom datatypes has been dropped (config `custom_db_types`) unknown data types default to `string` now and to fix the type, add a proper cast in Eloquent
- You _might_ have top-level dependency on doctrine/dbal. This may have been in the past due to ide-helper, we suggest to check if you still need it and remove it otherwise

### Added
- Support for Laravel 11 [#1520 / KentarouTakeda](https://github.com/barryvdh/laravel-ide-helper/pull/1520)

### Removed
- Support for Laravel 9 and use of doctrine/dbal [#1512 / barryvdh](https://github.com/barryvdh/laravel-ide-helper/pull/1512)
With this functionality gone, a few changes have been made:
- support for custom datatypes has been dropped (config `custom_db_types`) unknown data types default to `string` now and to fix the type, add a proper cast in Eloquent
- You _might_ have top-level dependency on doctrine/dbal. This may have been in the past due to ide-helper, we suggest to check if you still need it and remove it otherwise
- Minimum PHP version, due to Laravel 10, is now PHP 8.1


2024-02-15, 2.15.1
------------------

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
}
],
"require": {
"php": "^8.0",
"php": "^8.1",
"ext-json": "*",
"barryvdh/reflection-docblock": "^2.1.1",
"composer/class-map-generator": "^1.0",
Expand All @@ -38,7 +38,7 @@
"illuminate/view": "^9 || ^10 || ^11",
"mockery/mockery": "^1.4",
"orchestra/testbench": "^8 || ^9",
"phpunit/phpunit": "^9 || ^10.5",
"phpunit/phpunit": "^10.5",
"spatie/phpunit-snapshot-assertions": "^4 || ^5",
"vimeo/psalm": "^5.4"
},
Expand Down
7 changes: 0 additions & 7 deletions tests/Console/ModelsCommand/AdvancedCasts/Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,11 @@

use Barryvdh\LaravelIdeHelper\Console\ModelsCommand;
use Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\AbstractModelsCommand;
use Illuminate\Foundation\Application;

class Test extends AbstractModelsCommand
{
public function test(): void
{
if (!version_compare(Application::VERSION, '8.28', '>=')) {
$this->markTestSkipped(
'This test only works in Laravel >= 8.28'
);
}

$command = $this->app->make(ModelsCommand::class);

$tester = $this->runCommand($command, [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ class Test extends AbstractModelsCommand
{
public function test(): void
{
if (!version_compare(PHP_VERSION, '8.1', '>=')) {
$this->markTestSkipped(
'This test only works in PHP >= 8.1'
);
}

$command = $this->app->make(ModelsCommand::class);

$tester = $this->runCommand($command, [
Expand Down

0 comments on commit 9af62e2

Please sign in to comment.