Add regex pattern based url generation requirements.#18
Draft
michitheonlyone wants to merge 6 commits intoaraise-dev:mainfrom
Draft
Add regex pattern based url generation requirements.#18michitheonlyone wants to merge 6 commits intoaraise-dev:mainfrom
michitheonlyone wants to merge 6 commits intoaraise-dev:mainfrom
Conversation
tuxes3
requested changes
Nov 21, 2023
Contributor
tuxes3
left a comment
There was a problem hiding this comment.
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
| /.phpunit.result.cache | ||
| /phpunit.xml | ||
| /yarn.lock | ||
| /.idea |
Contributor
There was a problem hiding this comment.
we do not add IDE specific files to the gitignore
| 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+'; |
Contributor
There was a problem hiding this comment.
to support wide range of id we should allow to configure this regex in the bundles config.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added support for UUID's if the entity has a uuid as a key.