Skip to content
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

Application exception on latest version #231

Open
tasselchof opened this issue Apr 16, 2024 · 6 comments
Open

Application exception on latest version #231

tasselchof opened this issue Apr 16, 2024 · 6 comments

Comments

@tasselchof
Copy link

tasselchof commented Apr 16, 2024

Hi,

I encountered this exception while attempting to retrieve users from the database:

TypeError raised in file /home/dev/domains/api-dev.app/vendor/doctrine/persistence/src/Persistence/Reflection/RuntimeReflectionProperty.php line 61:
Message: Cannot assign resource to property Api\App\Entity\AbstractEntity::$uuid of type ?Ramsey\Uuid\UuidInterface

It's standard application, except I removed link to the roles (trying to build basic graphql api - to get users together with table properties for my frontend).

I am using ramsey/uuid-doctrine with dbal:4.0 though (your repo has a limitation dbal:3.0).

I'll probably figure it our myself, but if you have an idea where the issue might be I would be grateful.

@arhimede
Copy link
Member

we are planning the switch to doctrine 3 and dbal 4 , in the version 5 of the API
https://github.com/orgs/dotkernel/projects/13

So is not tested at all with DBAL 4 .
Right now we are focused on documenting all packages
https://github.com/orgs/dotkernel/projects/17

@tasselchof
Copy link
Author

Do you think it’s related?

@arhimede
Copy link
Member

@tasselchof not necessarily related, but at least the initial stack is stable ( with dbal 3) .

Is a type related issue.

@tasselchof
Copy link
Author

tasselchof commented Apr 16, 2024

@arhimede the problem is in uuid type, I guess something about this one: https://github.com/doctrine/dbal/blob/4.0.x/UPGRADE.md#bc-break-changes-to-handling-binary-fields.

@arhimede
Copy link
Member

@arhimede the problem is in uuid type, I guess something about this one: https://github.com/doctrine/dbal/blob/4.0.x/UPGRADE.md#bc-break-changes-to-handling-binary-fields.

Better go back to DBAL 3 and play there...

@tasselchof
Copy link
Author

I just fixed the types provided by Ramsey/doctrine-uuid, and they are now working with dbal version 4.0.1. However, I am not sure if this library will be updated soon enough. I mean, I can submit a pull request here, but it's obviously going to be more than just "updating the version": ramsey/uuid-doctrine#247.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants