Closed rakeshappycodes closed 1 year ago
I've added more error outputs to the generator command (#15, Released in 1.2.4). You should get more detailed information about the error source now. What does it say?
got this after the update
➜ zodiac git:(main) ✗ php artisan model-doc:generate -v
In Input.php line 70:
[Symfony\Component\Console\Exception\RuntimeException]
Not enough arguments (missing: "-v").
Exception trace:
at /home/rakesh/Desktop/Projects/Laravel/zodiac/vendor/symfony/console/Input/Input.php:70
Symfony\Component\Console\Input\Input->validate() at /home/rakesh/Desktop/Projects/Laravel/zodiac/vendor/symfony/console/Command/Command.php:307
Symfony\Component\Console\Command\Command->run() at /home/rakesh/Desktop/Projects/Laravel/zodiac/vendor/laravel/framework/src/Illuminate/Console/Command.php:152
Illuminate\Console\Command->run() at /home/rakesh/Desktop/Projects/Laravel/zodiac/vendor/symfony/console/Application.php:1022
Symfony\Component\Console\Application->doRunCommand() at /home/rakesh/Desktop/Projects/Laravel/zodiac/vendor/symfony/console/Application.php:314
Symfony\Component\Console\Application->doRun() at /home/rakesh/Desktop/Projects/Laravel/zodiac/vendor/symfony/console/Application.php:168
Symfony\Component\Console\Application->run() at /home/rakesh/Desktop/Projects/Laravel/zodiac/vendor/laravel/framework/src/Illuminate/Console/Application.php:102
Illuminate\Console\Application->run() at /home/rakesh/Desktop/Projects/Laravel/zodiac/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:155
Illuminate\Foundation\Console\Kernel->handle() at /home/rakesh/Desktop/Projects/Laravel/zodiac/artisan:37
Made a mistake, new version is up
$table->enum('gender', ['Male', 'Female']);
This is the issue, Throwing an error for the enum. Any idea how to solve it?
Failed App\Models\App\Models\User: Can not list table columns for table users
Doctrine\DBAL\Exception: Unknown database type enum requested, Doctrine\DBAL\Platforms\MariaDb1027Platform may not support it. in /home/rakesh/Desktop/Projects/Laravel/zodiac/vendor/doctrine/dbal/src/Platforms/AbstractPlatform.php:441
Looks like Doctrine doesn't fully support the Enum column type. Could you try out #16 ?
composer.json
"romanzipp/laravel-model-doc": "dev-fix-unknown-enum-type",
Also, using an enum with two values for the gender is a bit outdated 👀
Ok, I will check and update.
Also, using an enum with two values for the gender is a bit outdated eyes
Can suggest something which can I use for this.
gender generated as string when using "romanzipp/laravel-model-doc": "dev-fix-unknown-enum-type",
/**
* @property int $id
* @property string $first_name
* @property string $last_name
* @property string $email
* @property string $gender
* @property int|null $country_id
* @property \Illuminate\Support\Carbon|null $email_verified_at
* @property string $password
* @property bool $status
* @property string|null $remember_token
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
*/
That's how I intended it, the enum is stored as a string in MySQL. What other type did you expect?
Can you suggest something so we can close the issue?
Also, using an enum with two values for the gender is a bit outdated
Can suggest something which can I use for this.
Closing as its fixed.
Not sure why but it failed every time