-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extended PostgreSQL types are not supported with the Laravel IDE Helper Generator #40
Comments
Hi Patrick, this is not a problem of this driver. Doctrine can not handle many of the PostgreSQL types and will throw that exact exception, it's doing that within Laravel migrations too. I "patched" Laravel migrations by adding many of the missing PostgreSQL types to Doctrine. But the types are currently only added when migrations are executed. Does it solve the problem when the |
@tpetry However, when I changed:
to:
Everything worked. I also submitted a PR on that package to just add 'citext' => 'string' to their typeMapping array. see: spatie/laravel-model-info#15 Edit: Fun fact, github copilot basically solved this by suggesting the second snippet up there, after I put in $this->app['db'] as I was just using ide tools to guess the api chain to insert everything at the right spot. Edit #2 Haven't tried it in register(). |
@patrickcurl Can you try again with |
@tpetry i think it's resolved, otherwise I jerry rigged it to work, so I think this can be closed. Thanks! |
Awesome! One problem less when using PG. |
When running composer update which regenerates ide-helper stubs, I go this as it was analyzing the models.
The fix was easy enough, in AppServiceProvider I put:
As I was looking at the code in the vendor folder, I noticed the $typeInstance->getName() is deprecated in doctrine, not sure if that is related,and I'm not sure that's the best way to register the doctrine type, but it made the error go away..
The text was updated successfully, but these errors were encountered: