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

Error "Unable to generate an IRI" if id has "." or ":" #2684

Open
goltra opened this issue Apr 5, 2024 · 0 comments
Open

Error "Unable to generate an IRI" if id has "." or ":" #2684

goltra opened this issue Apr 5, 2024 · 0 comments

Comments

@goltra
Copy link

goltra commented Apr 5, 2024

API Platform version(s) affected: 3.2.20

Description
I'm doing an api rest that comunicate with couchdb server. I don't use Doctrine.
I have User entity and I get info from couchDB users db. In CouchDB the id of a document is like "org.couchdb.user:xxx".

The problem is that any id string with "." or ":", the IRI can't be generated. You recieve "Unable to generate an IRI" Error.

I think that should be catch this case or maybe there is another way that I can't find.

For the moment, I'm transforming my Id in getter but I know that this is not a good solution.

public function getId(): ?string { return str_ireplace([':','.'],['-','*'], $this->id); }

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

1 participant