From d3965aaab562c76dc60d2f6857328eca63a30158 Mon Sep 17 00:00:00 2001 From: KentarouTakeda Date: Fri, 18 Oct 2024 01:34:58 +0900 Subject: [PATCH] fix: Model's `--write` duplicates array properties (#1594) * Use the bug-fixed version of the upstream library * Updated the test for fixed features to correctly expect --- composer.json | 2 +- tests/Console/ModelsCommand/ArrayCastsWithComment/Test.php | 4 ---- .../ArrayCastsWithComment/__snapshots__/Test__test__1.php | 3 --- 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/composer.json b/composer.json index 3bc76b0..bfe752c 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ "require": { "php": "^8.1", "ext-json": "*", - "barryvdh/reflection-docblock": "^2.1.1", + "barryvdh/reflection-docblock": "^2.1.2", "composer/class-map-generator": "^1.0", "illuminate/console": "^10 || ^11", "illuminate/database": "^10.38 || ^11", diff --git a/tests/Console/ModelsCommand/ArrayCastsWithComment/Test.php b/tests/Console/ModelsCommand/ArrayCastsWithComment/Test.php index a0be02e..3833a55 100644 --- a/tests/Console/ModelsCommand/ArrayCastsWithComment/Test.php +++ b/tests/Console/ModelsCommand/ArrayCastsWithComment/Test.php @@ -9,10 +9,6 @@ use Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\AbstractModelsCommand; class Test extends AbstractModelsCommand { - /** - * The generated snapshot is wrong until - * https://github.com/barryvdh/laravel-ide-helper/issues/1505 is fixed - */ public function test(): void { $command = $this->app->make(ModelsCommand::class); diff --git a/tests/Console/ModelsCommand/ArrayCastsWithComment/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/ArrayCastsWithComment/__snapshots__/Test__test__1.php index f4eaf6a..1db832e 100644 --- a/tests/Console/ModelsCommand/ArrayCastsWithComment/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/ArrayCastsWithComment/__snapshots__/Test__test__1.php @@ -28,9 +28,6 @@ use Illuminate\Database\Eloquent\Model; * @property string $cast_to_bool * @property string $cast_to_boolean * @property string $cast_to_object - * @property array $cast_to_array - * @property array $cast_to_json - * @property \Illuminate\Support\Collection $cast_to_collection * @property string $cast_to_date * @property string $cast_to_datetime * @property string $cast_to_date_serialization