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

Do not use hard coded id for document-types #7

Open
lukadschaak opened this issue Oct 10, 2022 · 4 comments
Open

Do not use hard coded id for document-types #7

lukadschaak opened this issue Oct 10, 2022 · 4 comments

Comments

@lukadschaak
Copy link
Contributor

lukadschaak commented Oct 10, 2022

In the Installer the document-types.php is used to install document types of the bundle.

Maybe it is better to let Pimcore choose an id instead of using a hard coded ID.

@lukadschaak lukadschaak changed the title yamls of document-types should be bundle name prefixed Do not use hard coded id for document-types Dec 13, 2022
@lukadschaak
Copy link
Contributor Author

@storbahn We talked about the IDs yesterday. Do you think it is possible to remove them from the document-types.php file and just iterate over all document types when checking if the bundle is installed?

@jdreesen
Copy link
Member

The problem is that the installation/uninstallation uses the IDs.

But as Pimcore seems to use a UUIDv4 as default (if it isn't set) it would probably be fine to use any (vendor-prefixed) string as ID.

@lukadschaak
Copy link
Contributor Author

We thought that instaed of using the IDs, we could iterate over all document types and check other attributes like the name or smiliar.

@jdreesen
Copy link
Member

Yes, that'll probably work. But using IDs would be easier, I think. And maybe it's nicer to use explicit IDs instead of UUIDs for users who don't store them in the database because they are easier to recognize.

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