Skip to content

Commit

Permalink
Add support for Laravel 11 (#1520)
Browse files Browse the repository at this point in the history
* update dependencies

* Implement new methods for `Authenticatable` contract

* Added Laravel 11 to CI test target

* normalize composer.json

* Remove obsolete migration method (column type) from test

* Update snapshots

* Add changelog entry

* Update readme

---------

Co-authored-by: 武田 憲太郎 <takeda@youmind.jp>
Co-authored-by: barryvdh <barryvdh@users.noreply.github.com>
  • Loading branch information
3 people committed Feb 17, 2024
1 parent 8bfe918 commit 05259b6
Show file tree
Hide file tree
Showing 21 changed files with 26 additions and 71 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/run-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ jobs:
fail-fast: false
matrix:
php: [8.3, 8.2, 8.1]
laravel: [10.*]
laravel: [11.*, 10.*]
exclude:
- php: 8.1
laravel: 11.*

name: P${{ matrix.php }} - Laravel${{ matrix.laravel }}
steps:
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@ jobs:
matrix:
os: [ubuntu-20.04, windows-2019]
php: [8.3, 8.2, 8.1]
laravel: [10.*]
laravel: [10.*, 11.*]
stability: [prefer-lowest, prefer-stable]

dependency-version: [prefer-lowest, prefer-stable]
exclude:
- php: 8.1
laravel: 11.*
steps:
- name: Set git to use LF
if: ${{ matrix.os == 'windows-2019' }}
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ All notable changes to this project will be documented in this file.
- 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)

2024-02-15, 2.15.1
------------------
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
This package generates helper files that enable your IDE to provide accurate autocompletion.
Generation is done based on the files in your project, so they are always up-to-date.

It supports Laravel 9+ and PHP 8.0+
The 3.x branch supports Laravel 10 and 11. For older version, use the 2.x releases.

- [Installation](#installation)
- [Usage](#usage)
Expand Down
20 changes: 10 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,26 @@
"ext-json": "*",
"barryvdh/reflection-docblock": "^2.1.1",
"composer/class-map-generator": "^1.0",
"illuminate/console": "^10",
"illuminate/database": "^10.38",
"illuminate/filesystem": "^10",
"illuminate/support": "^10",
"illuminate/console": "^10 || ^11",
"illuminate/database": "^10.38 || ^11",
"illuminate/filesystem": "^10 || ^11",
"illuminate/support": "^10 || ^11",
"nikic/php-parser": "^4.18 || ^5",
"phpdocumentor/type-resolver": "^1.1.0"
},
"require-dev": {
"ext-pdo_sqlite": "*",
"friendsofphp/php-cs-fixer": "^3",
"illuminate/config": "^9 || ^10",
"illuminate/view": "^9 || ^10",
"illuminate/config": "^9 || ^10 || ^11",
"illuminate/view": "^9 || ^10 || ^11",
"mockery/mockery": "^1.4",
"orchestra/testbench": "^8",
"phpunit/phpunit": "^9",
"spatie/phpunit-snapshot-assertions": "^4",
"orchestra/testbench": "^8 || ^9",
"phpunit/phpunit": "^9 || ^10.5",
"spatie/phpunit-snapshot-assertions": "^4 || ^5",
"vimeo/psalm": "^5.4"
},
"suggest": {
"illuminate/events": "Required for automatic helper generation (^6|^7|^8|^9|^10)."
"illuminate/events": "Required for automatic helper generation (^6|^7|^8|^9|^10|^11)."
},
"minimum-stability": "dev",
"prefer-stable": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@
* @property float $double_not_nullable
* @property string|null $decimal_nullable
* @property string $decimal_not_nullable
* @property string|null $unsigned_decimal_nullable
* @property string $unsigned_decimal_not_nullable
* @property integer|null $boolean_nullable
* @property integer $boolean_not_nullable
* @property string|null $enum_nullable
Expand Down Expand Up @@ -143,8 +141,6 @@
* @method static \Illuminate\Database\Eloquent\Builder|Post whereTinyIntegerNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedBigIntegerNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedBigIntegerNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedDecimalNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedDecimalNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedIntegerNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedIntegerNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedMediumIntegerNotNullable($value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@
* @property float $double_not_nullable
* @property string|null $decimal_nullable
* @property string $decimal_not_nullable
* @property string|null $unsigned_decimal_nullable
* @property string $unsigned_decimal_not_nullable
* @property integer|null $boolean_nullable
* @property integer $boolean_not_nullable
* @property string|null $enum_nullable
Expand Down Expand Up @@ -149,8 +147,6 @@
* @method static \Illuminate\Database\Eloquent\Builder|Post whereTinyIntegerNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedBigIntegerNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedBigIntegerNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedDecimalNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedDecimalNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedIntegerNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedIntegerNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedMediumIntegerNotNullable($value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@
* @property float $double_not_nullable
* @property string|null $decimal_nullable
* @property string $decimal_not_nullable
* @property string|null $unsigned_decimal_nullable
* @property string $unsigned_decimal_not_nullable
* @property integer|null $boolean_nullable
* @property integer $boolean_not_nullable
* @property string|null $enum_nullable
Expand Down Expand Up @@ -146,8 +144,6 @@
* @method static Builder|Post whereTinyIntegerNullable($value)
* @method static Builder|Post whereUnsignedBigIntegerNotNullable($value)
* @method static Builder|Post whereUnsignedBigIntegerNullable($value)
* @method static Builder|Post whereUnsignedDecimalNotNullable($value)
* @method static Builder|Post whereUnsignedDecimalNullable($value)
* @method static Builder|Post whereUnsignedIntegerNotNullable($value)
* @method static Builder|Post whereUnsignedIntegerNullable($value)
* @method static Builder|Post whereUnsignedMediumIntegerNotNullable($value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@
* @property float $double_not_nullable
* @property string|null $decimal_nullable
* @property string $decimal_not_nullable
* @property string|null $unsigned_decimal_nullable
* @property string $unsigned_decimal_not_nullable
* @property integer|null $boolean_nullable
* @property integer $boolean_not_nullable
* @property string|null $enum_nullable
Expand Down Expand Up @@ -143,8 +141,6 @@
* @method static \Illuminate\Database\Eloquent\Builder|Post whereTinyIntegerNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedBigIntegerNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedBigIntegerNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedDecimalNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedDecimalNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedIntegerNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedIntegerNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedMediumIntegerNotNullable($value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@
* @property float $doubleNotNullable
* @property string|null $decimalNullable
* @property string $decimalNotNullable
* @property string|null $unsignedDecimalNullable
* @property string $unsignedDecimalNotNullable
* @property integer|null $booleanNullable
* @property integer $booleanNotNullable
* @property string|null $enumNullable
Expand Down Expand Up @@ -143,8 +141,6 @@
* @method static \Illuminate\Database\Eloquent\Builder|Post whereTinyIntegerNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedBigIntegerNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedBigIntegerNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedDecimalNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedDecimalNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedIntegerNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedIntegerNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedMediumIntegerNotNullable($value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@
* @property float $double_not_nullable
* @property string|null $decimal_nullable
* @property string $decimal_not_nullable
* @property string|null $unsigned_decimal_nullable
* @property string $unsigned_decimal_not_nullable
* @property integer|null $boolean_nullable
* @property integer $boolean_not_nullable
* @property string|null $enum_nullable
Expand Down Expand Up @@ -143,8 +141,6 @@
* @method static \Illuminate\Database\Eloquent\Builder|Post whereTinyIntegerNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedBigIntegerNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedBigIntegerNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedDecimalNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedDecimalNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedIntegerNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedIntegerNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedMediumIntegerNotNullable($value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@
* @property float $double_not_nullable
* @property string|null $decimal_nullable
* @property string $decimal_not_nullable
* @property string|null $unsigned_decimal_nullable
* @property string $unsigned_decimal_not_nullable
* @property integer|null $boolean_nullable
* @property integer $boolean_not_nullable
* @property string|null $enum_nullable
Expand Down Expand Up @@ -152,8 +150,6 @@
* @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithExternalEloquentBuilder\Builders\PostExternalQueryBuilder|Post whereTinyIntegerNullable($value)
* @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithExternalEloquentBuilder\Builders\PostExternalQueryBuilder|Post whereUnsignedBigIntegerNotNullable($value)
* @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithExternalEloquentBuilder\Builders\PostExternalQueryBuilder|Post whereUnsignedBigIntegerNullable($value)
* @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithExternalEloquentBuilder\Builders\PostExternalQueryBuilder|Post whereUnsignedDecimalNotNullable($value)
* @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithExternalEloquentBuilder\Builders\PostExternalQueryBuilder|Post whereUnsignedDecimalNullable($value)
* @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithExternalEloquentBuilder\Builders\PostExternalQueryBuilder|Post whereUnsignedIntegerNotNullable($value)
* @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithExternalEloquentBuilder\Builders\PostExternalQueryBuilder|Post whereUnsignedIntegerNullable($value)
* @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithExternalEloquentBuilder\Builders\PostExternalQueryBuilder|Post whereUnsignedMediumIntegerNotNullable($value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@
* @property float $double_not_nullable
* @property string|null $decimal_nullable
* @property string $decimal_not_nullable
* @property string|null $unsigned_decimal_nullable
* @property string $unsigned_decimal_not_nullable
* @property integer|null $boolean_nullable
* @property integer $boolean_not_nullable
* @property string|null $enum_nullable
Expand Down Expand Up @@ -147,8 +145,6 @@
* @method static PostExternalQueryBuilder|Post whereTinyIntegerNullable($value)
* @method static PostExternalQueryBuilder|Post whereUnsignedBigIntegerNotNullable($value)
* @method static PostExternalQueryBuilder|Post whereUnsignedBigIntegerNullable($value)
* @method static PostExternalQueryBuilder|Post whereUnsignedDecimalNotNullable($value)
* @method static PostExternalQueryBuilder|Post whereUnsignedDecimalNullable($value)
* @method static PostExternalQueryBuilder|Post whereUnsignedIntegerNotNullable($value)
* @method static PostExternalQueryBuilder|Post whereUnsignedIntegerNullable($value)
* @method static PostExternalQueryBuilder|Post whereUnsignedMediumIntegerNotNullable($value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@
* @property float $double_not_nullable
* @property string|null $decimal_nullable
* @property string $decimal_not_nullable
* @property string|null $unsigned_decimal_nullable
* @property string $unsigned_decimal_not_nullable
* @property integer|null $boolean_nullable
* @property integer $boolean_not_nullable
* @property string|null $enum_nullable
Expand Down Expand Up @@ -149,8 +147,6 @@
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereTinyIntegerNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereUnsignedBigIntegerNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereUnsignedBigIntegerNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereUnsignedDecimalNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereUnsignedDecimalNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereUnsignedIntegerNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereUnsignedIntegerNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereUnsignedMediumIntegerNotNullable($value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@
* @property float $double_not_nullable
* @property string|null $decimal_nullable
* @property string $decimal_not_nullable
* @property string|null $unsigned_decimal_nullable
* @property string $unsigned_decimal_not_nullable
* @property integer|null $boolean_nullable
* @property integer $boolean_not_nullable
* @property string|null $enum_nullable
Expand Down Expand Up @@ -155,8 +153,6 @@
* @method static EloquentBuilder|Post whereTinyIntegerNullable($value)
* @method static EloquentBuilder|Post whereUnsignedBigIntegerNotNullable($value)
* @method static EloquentBuilder|Post whereUnsignedBigIntegerNullable($value)
* @method static EloquentBuilder|Post whereUnsignedDecimalNotNullable($value)
* @method static EloquentBuilder|Post whereUnsignedDecimalNullable($value)
* @method static EloquentBuilder|Post whereUnsignedIntegerNotNullable($value)
* @method static EloquentBuilder|Post whereUnsignedIntegerNullable($value)
* @method static EloquentBuilder|Post whereUnsignedMediumIntegerNotNullable($value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@
* @property float $double_not_nullable
* @property string|null $decimal_nullable
* @property string $decimal_not_nullable
* @property string|null $unsigned_decimal_nullable
* @property string $unsigned_decimal_not_nullable
* @property integer|null $boolean_nullable
* @property integer $boolean_not_nullable
* @property string|null $enum_nullable
Expand Down Expand Up @@ -149,8 +147,6 @@
* @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithFqnInExternalFile\Builders\EMaterialQueryBuilder|Post whereTinyIntegerNullable($value)
* @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithFqnInExternalFile\Builders\EMaterialQueryBuilder|Post whereUnsignedBigIntegerNotNullable($value)
* @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithFqnInExternalFile\Builders\EMaterialQueryBuilder|Post whereUnsignedBigIntegerNullable($value)
* @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithFqnInExternalFile\Builders\EMaterialQueryBuilder|Post whereUnsignedDecimalNotNullable($value)
* @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithFqnInExternalFile\Builders\EMaterialQueryBuilder|Post whereUnsignedDecimalNullable($value)
* @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithFqnInExternalFile\Builders\EMaterialQueryBuilder|Post whereUnsignedIntegerNotNullable($value)
* @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithFqnInExternalFile\Builders\EMaterialQueryBuilder|Post whereUnsignedIntegerNullable($value)
* @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithFqnInExternalFile\Builders\EMaterialQueryBuilder|Post whereUnsignedMediumIntegerNotNullable($value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ final class IdeHelperFinalPost {}
* @property float $double_not_nullable
* @property string|null $decimal_nullable
* @property string $decimal_not_nullable
* @property string|null $unsigned_decimal_nullable
* @property string $unsigned_decimal_not_nullable
* @property integer|null $boolean_nullable
* @property integer $boolean_not_nullable
* @property string|null $enum_nullable
Expand Down Expand Up @@ -198,8 +196,6 @@ final class IdeHelperFinalPost {}
* @method static \Illuminate\Database\Eloquent\Builder|Post whereTinyIntegerNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedBigIntegerNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedBigIntegerNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedDecimalNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedDecimalNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedIntegerNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedIntegerNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedMediumIntegerNotNullable($value)
Expand Down
5 changes: 5 additions & 0 deletions tests/Console/ModelsCommand/Interfaces/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ public function getAuthIdentifier()
// TODO: Implement getAuthIdentifier() method.
}

public function getAuthPasswordName()
{
// TODO: Implement getAuthPasswordName() method.
}

public function getAuthPassword()
{
// TODO: Implement getAuthPassword() method.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@
* @property float $double_not_nullable
* @property string|null $decimal_nullable
* @property string $decimal_not_nullable
* @property string|null $unsigned_decimal_nullable
* @property string $unsigned_decimal_not_nullable
* @property integer|null $boolean_nullable
* @property integer $boolean_not_nullable
* @property string|null $enum_nullable
Expand Down

0 comments on commit 05259b6

Please sign in to comment.