From 6579c0332b15970be66e86d4fe4950d59af59ee6 Mon Sep 17 00:00:00 2001 From: "Barry vd. Heuvel" Date: Sat, 17 Feb 2024 11:12:12 +0100 Subject: [PATCH] Remove doctrine (#1512) * Remove doctrine * Fix tests * normalize composer.json * Add back platform * Bump integration versions * composer fix-style * Fix stability * Bump minimum to 10.36 * Bump minimum to 10.38 * More types * Fast fail off * Bump docblock * composer fix-style * add bpchar * Use match for type detection Co-authored-by: Hafez Divandari * Use driverName Co-authored-by: Hafez Divandari * fix match * TWeak types * Update snapshots * Remove testbench 7 * composer fix-style * Update src/Console/ModelsCommand.php Co-authored-by: Hafez Divandari * Update src/Console/ModelsCommand.php Co-authored-by: Hafez Divandari * Tweak bool * Update src/Console/ModelsCommand.php Co-authored-by: Hafez Divandari * composer fix-style * Remove custom types, default to string --------- Co-authored-by: barryvdh Co-authored-by: laravel-ide-helper Co-authored-by: Hafez Divandari --- .github/workflows/fix-code-style.yml | 2 +- .github/workflows/run-integration-tests.yml | 10 +- .github/workflows/run-static-analysis.yml | 4 +- .github/workflows/run-tests.yml | 15 +-- README.md | 20 ---- composer.json | 12 +- config/ide-helper.php | 30 ----- src/Console/ModelsCommand.php | 112 +++++------------- .../__snapshots__/Test__test__1.php | 4 +- .../__snapshots__/Test__test__1.php | 4 +- .../__snapshots__/Test__test__1.php | 4 +- .../__snapshots__/Test__test__1.php | 4 +- .../__snapshots__/Test__test__1.php | 4 +- .../__snapshots__/Test__test__1.php | 4 +- .../__snapshots__/Test__test__1.php | 4 +- .../__snapshots__/Test__test__1.php | 4 +- .../__snapshots__/Test__test__1.php | 4 +- .../__snapshots__/Test__test__1.php | 4 +- .../__snapshots__/Test__test__1.php | 4 +- .../__snapshots__/Test__test__1.php | 4 +- .../__snapshots__/Test__test__1.php | 4 +- .../__snapshots__/Test__test__1.php | 4 +- 22 files changed, 74 insertions(+), 187 deletions(-) diff --git a/.github/workflows/fix-code-style.yml b/.github/workflows/fix-code-style.yml index 8019a320c..80e7639a2 100644 --- a/.github/workflows/fix-code-style.yml +++ b/.github/workflows/fix-code-style.yml @@ -18,7 +18,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: 8.0 + php-version: 8.3 coverage: none - name: Install dependencies diff --git a/.github/workflows/run-integration-tests.yml b/.github/workflows/run-integration-tests.yml index 6edd28188..7737e94b6 100644 --- a/.github/workflows/run-integration-tests.yml +++ b/.github/workflows/run-integration-tests.yml @@ -19,13 +19,9 @@ jobs: strategy: fail-fast: false matrix: - php: [8.3, 8.2, 8.1, 8.0] - laravel: [10.*, 9.*] - exclude: - - php: 8.0 - laravel: 10.* - - php: 8.3 - laravel: 9.* + php: [8.3, 8.2, 8.1] + laravel: [10.*] + name: P${{ matrix.php }} - Laravel${{ matrix.laravel }} steps: - name: Checkout code diff --git a/.github/workflows/run-static-analysis.yml b/.github/workflows/run-static-analysis.yml index c8c29bb7a..e31f00c4f 100644 --- a/.github/workflows/run-static-analysis.yml +++ b/.github/workflows/run-static-analysis.yml @@ -13,11 +13,11 @@ jobs: steps: - uses: actions/checkout@v4 - + - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: 8.1 + php-version: 8.3 coverage: none extensions: pdo_sqlite diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index b94dc0d1b..f30727baf 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -18,16 +18,13 @@ jobs: COMPOSER_NO_INTERACTION: 1 strategy: + fail-fast: false matrix: os: [ubuntu-20.04, windows-2019] - php: [8.3, 8.2, 8.1, 8.0] - laravel: [9.*, 10.*] - dependency-version: [prefer-lowest, prefer-stable] - exclude: - - php: 8.0 - laravel: 10.* - - php: 8.0 - dependency-version: prefer-lowest + php: [8.3, 8.2, 8.1] + laravel: [10.*] + stability: [prefer-lowest, prefer-stable] + steps: - name: Set git to use LF if: ${{ matrix.os == 'windows-2019' }} @@ -50,7 +47,7 @@ jobs: composer remove vimeo/psalm --no-update --dev composer remove friendsofphp/php-cs-fixer --no-update --dev composer require "laravel/framework:${{ matrix.laravel }}" --no-update --no-progress - composer update --prefer-dist --no-progress + composer update --prefer-dist --no-progress --${{ matrix.stability }} - name: Execute Unit Tests run: composer test-ci diff --git a/README.md b/README.md index b0bc074d3..a180c558a 100644 --- a/README.md +++ b/README.md @@ -271,26 +271,6 @@ add support for creating a new dedicated class instead of using local scopes in If for some reason it's undesired to have them generated (one for each column), you can disable this via config `write_model_external_builder_methods` and setting it to `false`. -#### Unsupported or custom database types - -Common column types (e.g. varchar, integer) are correctly mapped to PHP types (`string`, `int`). - -But sometimes you may want to use custom column types in your database like `geography`, `jsonb`, `citext`, `bit`, etc. which may throw an "Unknown database type"-Exception. - -For those special cases, you can map them via the config `custom_db_types`. Example: -```php -'custom_db_types' => [ - 'mysql' => [ - 'geography' => 'array', - 'point' => 'array', - ], - 'postgresql' => [ - 'jsonb' => 'string', - '_int4' => 'array', - ], -], -``` - #### Custom Relationship Types If you are using relationships not built into Laravel you will need to specify the name and returning class in the config to get proper generation. diff --git a/composer.json b/composer.json index 174dc3d25..363fbd7e8 100644 --- a/composer.json +++ b/composer.json @@ -22,12 +22,12 @@ "require": { "php": "^8.0", "ext-json": "*", - "barryvdh/reflection-docblock": "^2.0.6", + "barryvdh/reflection-docblock": "^2.1.1", "composer/class-map-generator": "^1.0", - "doctrine/dbal": "^2.6 || ^3.1.4", - "illuminate/console": "^9 || ^10", - "illuminate/filesystem": "^9 || ^10", - "illuminate/support": "^9 || ^10", + "illuminate/console": "^10", + "illuminate/database": "^10.38", + "illuminate/filesystem": "^10", + "illuminate/support": "^10", "nikic/php-parser": "^4.18 || ^5", "phpdocumentor/type-resolver": "^1.1.0" }, @@ -37,7 +37,7 @@ "illuminate/config": "^9 || ^10", "illuminate/view": "^9 || ^10", "mockery/mockery": "^1.4", - "orchestra/testbench": "^7 || ^8", + "orchestra/testbench": "^8", "phpunit/phpunit": "^9", "spatie/phpunit-snapshot-assertions": "^4", "vimeo/psalm": "^5.4" diff --git a/config/ide-helper.php b/config/ide-helper.php index cec91c68a..e3bdc574c 100644 --- a/config/ide-helper.php +++ b/config/ide-helper.php @@ -200,36 +200,6 @@ ], - /* - |-------------------------------------------------------------------------- - | Support for custom DB types - |-------------------------------------------------------------------------- - | - | This setting allow you to map any custom database type (that you may have - | created using CREATE TYPE statement or imported using database plugin - | / extension to a Doctrine type. - | - | Each key in this array is a name of the Doctrine2 DBAL Platform. Currently valid names are: - | 'postgresql', 'db2', 'drizzle', 'mysql', 'oracle', 'sqlanywhere', 'sqlite', 'mssql' - | - | This name is returned by getName() method of the specific Doctrine/DBAL/Platforms/AbstractPlatform descendant - | - | The value of the array is an array of type mappings. Key is the name of the custom type, - | (for example, "jsonb" from Postgres 9.4) and the value is the name of the corresponding Doctrine2 type (in - | our case it is 'json_array'. Doctrine types are listed here: - | https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/types.html#types - | - | So to support jsonb in your models when working with Postgres, just add the following entry to the array below: - | - | "postgresql" => array( - | "jsonb" => "json_array", - | ), - | - */ - 'custom_db_types' => [ - - ], - /* |-------------------------------------------------------------------------- | Support for camel cased models diff --git a/src/Console/ModelsCommand.php b/src/Console/ModelsCommand.php index 299469dcf..4c6966125 100644 --- a/src/Console/ModelsCommand.php +++ b/src/Console/ModelsCommand.php @@ -17,8 +17,6 @@ use Barryvdh\Reflection\DocBlock\Serializer as DocBlockSerializer; use Barryvdh\Reflection\DocBlock\Tag; use Composer\ClassMapGenerator\ClassMapGenerator; -use Doctrine\DBAL\Exception as DBALException; -use Doctrine\DBAL\Types\Type; use Illuminate\Console\Command; use Illuminate\Contracts\Database\Eloquent\Castable; use Illuminate\Contracts\Database\Eloquent\CastsAttributes; @@ -39,6 +37,7 @@ use Illuminate\Database\Eloquent\Relations\MorphTo; use Illuminate\Database\Eloquent\Relations\MorphToMany; use Illuminate\Database\Eloquent\Relations\Relation; +use Illuminate\Database\Schema\Builder; use Illuminate\Filesystem\Filesystem; use Illuminate\Support\Arr; use Illuminate\Support\Collection; @@ -244,8 +243,6 @@ protected function generateDocs($loadModels, $ignore = '') */ \n\n"; - $hasDoctrine = interface_exists('Doctrine\DBAL\Driver'); - if (empty($loadModels)) { $models = $this->loadModels(); } else { @@ -288,9 +285,7 @@ protected function generateDocs($loadModels, $ignore = '') $model = $this->laravel->make($name); - if ($hasDoctrine) { - $this->getPropertiesFromTable($model); - } + $this->getPropertiesFromTable($model); if (method_exists($model, 'getCasts')) { $this->castPropertiesType($model); @@ -314,13 +309,6 @@ protected function generateDocs($loadModels, $ignore = '') } } - if (!$hasDoctrine) { - $this->error( - 'Warning: `"doctrine/dbal": "~2.3"` is required to load database information. ' . - 'Please require that in your composer.json and run `composer update`.' - ); - } - return $output; } @@ -508,35 +496,14 @@ protected function getTypeOverride($type) * * @param Model $model * - * @throws DBALException If custom field failed to register */ public function getPropertiesFromTable($model) { - $database = $model->getConnection()->getDatabaseName(); - $table = $model->getConnection()->getTablePrefix() . $model->getTable(); - $schema = $model->getConnection()->getDoctrineSchemaManager(); - $databasePlatform = $schema->getDatabasePlatform(); - $databasePlatform->registerDoctrineTypeMapping('enum', 'string'); - - if (strpos($table, '.')) { - [$database, $table] = explode('.', $table); - } - - $platformName = $databasePlatform->getName(); - $customTypes = $this->laravel['config']->get("ide-helper.custom_db_types.{$platformName}", []); - foreach ($customTypes as $yourTypeName => $doctrineTypeName) { - try { - if (!Type::hasType($yourTypeName)) { - Type::addType($yourTypeName, get_class(Type::getType($doctrineTypeName))); - } - } catch (DBALException $exception) { - $this->error("Failed registering custom db type \"$yourTypeName\" as \"$doctrineTypeName\""); - throw $exception; - } - $databasePlatform->registerDoctrineTypeMapping($yourTypeName, $doctrineTypeName); - } + $table = $model->getTable(); + $schema = $model->getConnection()->getSchemaBuilder(); + $columns = $schema->getColumns($table); + $driverName = $model->getConnection()->getDriverName(); - $columns = $schema->listTableColumns($table, $database); if (!$columns) { return; @@ -544,50 +511,28 @@ public function getPropertiesFromTable($model) $this->setForeignKeys($schema, $table); foreach ($columns as $column) { - $name = $column->getName(); + $name = $column['name']; if (in_array($name, $model->getDates())) { $type = $this->dateClass; } else { - $type = $column->getType()->getName(); - switch ($type) { - case 'string': - case 'text': - case 'date': - case 'time': - case 'guid': - case 'datetimetz': - case 'datetime': - case 'decimal': - case 'binary': - $type = 'string'; - break; - case 'integer': - case 'bigint': - case 'smallint': - $type = 'integer'; - break; - case 'boolean': - switch ($platformName) { - case 'sqlite': - case 'mysql': - $type = 'integer'; - break; - default: - $type = 'boolean'; - break; - } - break; - case 'float': - $type = 'float'; - break; - default: - $type = 'mixed'; - break; - } + // Match types to php equivalent + $type = match ($column['type_name']) { + 'tinyint', 'bit', + 'integer', 'int', 'int4', + 'smallint', 'int2', + 'mediumint', + 'bigint', 'int8' => 'integer', + + 'boolean', 'bool' => 'boolean', + + 'float', 'real', 'float4', + 'double', 'float8' => 'float', + + default => 'string', + }; } - $comment = $column->getComment(); - if (!$column->getNotnull()) { + if ($column['nullable']) { $this->nullableColumns[$name] = true; } $this->setProperty( @@ -595,8 +540,8 @@ public function getPropertiesFromTable($model) $this->getTypeInModel($model, $type), true, true, - $comment, - !$column->getNotnull() + $column['comment'], + $column['nullable'] ); if ($this->write_model_magic_where) { $builderClass = $this->write_model_external_builder_methods @@ -1681,14 +1626,13 @@ protected function runModelHooks($model): void } /** - * @param \Doctrine\DBAL\Schema\AbstractSchemaManager $schema + * @param Builder $schema * @param string $table - * @throws DBALException */ protected function setForeignKeys($schema, $table) { - foreach ($schema->listTableForeignKeys($table) as $foreignKeyConstraint) { - foreach ($foreignKeyConstraint->getLocalColumns() as $columnName) { + foreach ($schema->getForeignKeys($table) as $foreignKeyConstraint) { + foreach ($foreignKeyConstraint['columns'] as $columnName) { $this->foreignKeyConstraintsColumns[] = $columnName; } } diff --git a/tests/Console/ModelsCommand/AllowGlobDirectory/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/AllowGlobDirectory/__snapshots__/Test__test__1.php index c34f0a879..40b222ecf 100644 --- a/tests/Console/ModelsCommand/AllowGlobDirectory/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/AllowGlobDirectory/__snapshots__/Test__test__1.php @@ -72,8 +72,8 @@ * @property string $timestamptz_not_nullable * @property integer|null $year_nullable * @property integer $year_not_nullable - * @property mixed|null $binary_nullable - * @property mixed $binary_not_nullable + * @property string|null $binary_nullable + * @property string $binary_not_nullable * @property string|null $uuid_nullable * @property string $uuid_not_nullable * @property string|null $ipaddress_nullable diff --git a/tests/Console/ModelsCommand/DoesNotGeneratePhpdocWithExternalEloquentBuilder/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/DoesNotGeneratePhpdocWithExternalEloquentBuilder/__snapshots__/Test__test__1.php index 526e31331..467baf134 100644 --- a/tests/Console/ModelsCommand/DoesNotGeneratePhpdocWithExternalEloquentBuilder/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/DoesNotGeneratePhpdocWithExternalEloquentBuilder/__snapshots__/Test__test__1.php @@ -78,8 +78,8 @@ * @property string $timestamptz_not_nullable * @property integer|null $year_nullable * @property integer $year_not_nullable - * @property mixed|null $binary_nullable - * @property mixed $binary_not_nullable + * @property string|null $binary_nullable + * @property string $binary_not_nullable * @property string|null $uuid_nullable * @property string $uuid_not_nullable * @property string|null $ipaddress_nullable diff --git a/tests/Console/ModelsCommand/GenerateBasicPhpDocWithEnumDefaults/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/GenerateBasicPhpDocWithEnumDefaults/__snapshots__/Test__test__1.php index b55988108..154ce0506 100644 --- a/tests/Console/ModelsCommand/GenerateBasicPhpDocWithEnumDefaults/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/GenerateBasicPhpDocWithEnumDefaults/__snapshots__/Test__test__1.php @@ -74,8 +74,8 @@ * @property string $timestamptz_not_nullable * @property integer|null $year_nullable * @property integer $year_not_nullable - * @property mixed|null $binary_nullable - * @property mixed $binary_not_nullable + * @property string|null $binary_nullable + * @property string $binary_not_nullable * @property string|null $uuid_nullable * @property string $uuid_not_nullable * @property string|null $ipaddress_nullable diff --git a/tests/Console/ModelsCommand/GenerateBasicPhpdoc/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/GenerateBasicPhpdoc/__snapshots__/Test__test__1.php index aec51c918..9b6b51328 100644 --- a/tests/Console/ModelsCommand/GenerateBasicPhpdoc/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/GenerateBasicPhpdoc/__snapshots__/Test__test__1.php @@ -72,8 +72,8 @@ * @property string $timestamptz_not_nullable * @property integer|null $year_nullable * @property integer $year_not_nullable - * @property mixed|null $binary_nullable - * @property mixed $binary_not_nullable + * @property string|null $binary_nullable + * @property string $binary_not_nullable * @property string|null $uuid_nullable * @property string $uuid_not_nullable * @property string|null $ipaddress_nullable diff --git a/tests/Console/ModelsCommand/GenerateBasicPhpdocCamel/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/GenerateBasicPhpdocCamel/__snapshots__/Test__test__1.php index 8b8389035..2889ce84b 100644 --- a/tests/Console/ModelsCommand/GenerateBasicPhpdocCamel/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/GenerateBasicPhpdocCamel/__snapshots__/Test__test__1.php @@ -72,8 +72,8 @@ * @property string $timestamptzNotNullable * @property integer|null $yearNullable * @property integer $yearNotNullable - * @property mixed|null $binaryNullable - * @property mixed $binaryNotNullable + * @property string|null $binaryNullable + * @property string $binaryNotNullable * @property string|null $uuidNullable * @property string $uuidNotNullable * @property string|null $ipaddressNullable diff --git a/tests/Console/ModelsCommand/GenerateBasicPhpdocFinal/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/GenerateBasicPhpdocFinal/__snapshots__/Test__test__1.php index 1681ee5a6..36d2db510 100644 --- a/tests/Console/ModelsCommand/GenerateBasicPhpdocFinal/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/GenerateBasicPhpdocFinal/__snapshots__/Test__test__1.php @@ -72,8 +72,8 @@ * @property string $timestamptz_not_nullable * @property integer|null $year_nullable * @property integer $year_not_nullable - * @property mixed|null $binary_nullable - * @property mixed $binary_not_nullable + * @property string|null $binary_nullable + * @property string $binary_not_nullable * @property string|null $uuid_nullable * @property string $uuid_not_nullable * @property string|null $ipaddress_nullable diff --git a/tests/Console/ModelsCommand/GeneratePhpdocWithExternalEloquentBuilder/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/GeneratePhpdocWithExternalEloquentBuilder/__snapshots__/Test__test__1.php index c788ecb74..b9c0a7183 100644 --- a/tests/Console/ModelsCommand/GeneratePhpdocWithExternalEloquentBuilder/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/GeneratePhpdocWithExternalEloquentBuilder/__snapshots__/Test__test__1.php @@ -78,8 +78,8 @@ * @property string $timestamptz_not_nullable * @property integer|null $year_nullable * @property integer $year_not_nullable - * @property mixed|null $binary_nullable - * @property mixed $binary_not_nullable + * @property string|null $binary_nullable + * @property string $binary_not_nullable * @property string|null $uuid_nullable * @property string $uuid_not_nullable * @property string|null $ipaddress_nullable diff --git a/tests/Console/ModelsCommand/GeneratePhpdocWithExternalEloquentBuilderWithFqn/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/GeneratePhpdocWithExternalEloquentBuilderWithFqn/__snapshots__/Test__test__1.php index c63463635..1bb709c8c 100644 --- a/tests/Console/ModelsCommand/GeneratePhpdocWithExternalEloquentBuilderWithFqn/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/GeneratePhpdocWithExternalEloquentBuilderWithFqn/__snapshots__/Test__test__1.php @@ -73,8 +73,8 @@ * @property string $timestamptz_not_nullable * @property integer|null $year_nullable * @property integer $year_not_nullable - * @property mixed|null $binary_nullable - * @property mixed $binary_not_nullable + * @property string|null $binary_nullable + * @property string $binary_not_nullable * @property string|null $uuid_nullable * @property string $uuid_not_nullable * @property string|null $ipaddress_nullable diff --git a/tests/Console/ModelsCommand/GeneratePhpdocWithForcedFqn/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/GeneratePhpdocWithForcedFqn/__snapshots__/Test__test__1.php index 20b262822..2b8986a23 100644 --- a/tests/Console/ModelsCommand/GeneratePhpdocWithForcedFqn/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/GeneratePhpdocWithForcedFqn/__snapshots__/Test__test__1.php @@ -74,8 +74,8 @@ * @property string $timestamptz_not_nullable * @property integer|null $year_nullable * @property integer $year_not_nullable - * @property mixed|null $binary_nullable - * @property mixed $binary_not_nullable + * @property string|null $binary_nullable + * @property string $binary_not_nullable * @property string|null $uuid_nullable * @property string $uuid_not_nullable * @property string|null $ipaddress_nullable diff --git a/tests/Console/ModelsCommand/GeneratePhpdocWithFqn/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/GeneratePhpdocWithFqn/__snapshots__/Test__test__1.php index 989fd8a4b..c661aad71 100644 --- a/tests/Console/ModelsCommand/GeneratePhpdocWithFqn/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/GeneratePhpdocWithFqn/__snapshots__/Test__test__1.php @@ -80,8 +80,8 @@ * @property string $timestamptz_not_nullable * @property integer|null $year_nullable * @property integer $year_not_nullable - * @property mixed|null $binary_nullable - * @property mixed $binary_not_nullable + * @property string|null $binary_nullable + * @property string $binary_not_nullable * @property string|null $uuid_nullable * @property string $uuid_not_nullable * @property string|null $ipaddress_nullable diff --git a/tests/Console/ModelsCommand/GeneratePhpdocWithFqnInExternalFile/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/GeneratePhpdocWithFqnInExternalFile/__snapshots__/Test__test__1.php index afb323db8..d65673a9b 100644 --- a/tests/Console/ModelsCommand/GeneratePhpdocWithFqnInExternalFile/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/GeneratePhpdocWithFqnInExternalFile/__snapshots__/Test__test__1.php @@ -78,8 +78,8 @@ * @property string $timestamptz_not_nullable * @property integer|null $year_nullable * @property integer $year_not_nullable - * @property mixed|null $binary_nullable - * @property mixed $binary_not_nullable + * @property string|null $binary_nullable + * @property string $binary_not_nullable * @property string|null $uuid_nullable * @property string $uuid_not_nullable * @property string|null $ipaddress_nullable diff --git a/tests/Console/ModelsCommand/GeneratePhpdocWithMixin/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/GeneratePhpdocWithMixin/__snapshots__/Test__test__1.php index 8784f8515..5a55eca5d 100644 --- a/tests/Console/ModelsCommand/GeneratePhpdocWithMixin/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/GeneratePhpdocWithMixin/__snapshots__/Test__test__1.php @@ -127,8 +127,8 @@ final class IdeHelperFinalPost {} * @property string $timestamptz_not_nullable * @property integer|null $year_nullable * @property integer $year_not_nullable - * @property mixed|null $binary_nullable - * @property mixed $binary_not_nullable + * @property string|null $binary_nullable + * @property string $binary_not_nullable * @property string|null $uuid_nullable * @property string $uuid_not_nullable * @property string|null $ipaddress_nullable diff --git a/tests/Console/ModelsCommand/MagicWhere/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/MagicWhere/__snapshots__/Test__test__1.php index 8c9a81975..dc5b63a4f 100644 --- a/tests/Console/ModelsCommand/MagicWhere/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/MagicWhere/__snapshots__/Test__test__1.php @@ -72,8 +72,8 @@ * @property string $timestamptz_not_nullable * @property integer|null $year_nullable * @property integer $year_not_nullable - * @property mixed|null $binary_nullable - * @property mixed $binary_not_nullable + * @property string|null $binary_nullable + * @property string $binary_not_nullable * @property string|null $uuid_nullable * @property string $uuid_not_nullable * @property string|null $ipaddress_nullable diff --git a/tests/Console/ModelsCommand/RelationCountProperties/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/RelationCountProperties/__snapshots__/Test__test__1.php index 5e2a13175..bba3457c7 100644 --- a/tests/Console/ModelsCommand/RelationCountProperties/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/RelationCountProperties/__snapshots__/Test__test__1.php @@ -73,8 +73,8 @@ * @property string $timestamptz_not_nullable * @property integer|null $year_nullable * @property integer $year_not_nullable - * @property mixed|null $binary_nullable - * @property mixed $binary_not_nullable + * @property string|null $binary_nullable + * @property string $binary_not_nullable * @property string|null $uuid_nullable * @property string $uuid_not_nullable * @property string|null $ipaddress_nullable