-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add regex pattern based url generation requirements. #18
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tried this MR but with a simple setup like following:
#[ORM\Id]
#[ORM\Column(type: UuidType::NAME, unique: true)]
#[ORM\GeneratedValue(strategy: 'CUSTOM')]
#[ORM\CustomIdGenerator(class: 'doctrine.uuid_generator')]
private ?Uuid $id = null;
it did not work. To make this fully work it will need some minor changes in the CrudController
. See `$request->query->getInt and second occurrence
@@ -5,3 +5,5 @@ | |||
/.phpunit.result.cache | |||
/phpunit.xml | |||
/yarn.lock | |||
/.idea |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we do not add IDE specific files to the gitignore
@@ -12,6 +12,9 @@ | |||
|
|||
class CrudLoader extends Loader | |||
{ | |||
// TODO: add patterns to support other versions e.g. ulid as well. | |||
private const URL_GENERATOR_ENTITY_KEY_REQUIREMENT_EXPRESSION = '[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}|\d+'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to support wide range of id we should allow to configure this regex in the bundles config.
Added support for UUID's if the entity has a uuid as a key.