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

MLSS-2212 & PREF-309 | Search Criteria Validators #265

Open
wants to merge 11 commits into
base: 8.x
Choose a base branch
from

Conversation

arielallon
Copy link
Contributor

@arielallon arielallon commented Aug 9, 2021

@arielallon arielallon self-assigned this Aug 9, 2021
@arielallon arielallon changed the title Mlss 2212 search criteria validators MLSS-2212 search criteria validators Aug 11, 2021
@arielallon arielallon changed the title MLSS-2212 search criteria validators MLSS-2212 & PREF-309 | Search Criteria Validators Aug 11, 2021
@arielallon arielallon marked this pull request as ready for review August 11, 2021 20:05

public function addFactory(DecoratorFactoryInterface $decoratorFactory): BuilderInterface
{
$factoryKey = str_replace('\\', '', get_class($decoratorFactory));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

potential blocker: Is the str_replace necessary? This could theoretically cause some issues if for example there was both a FooBar\Baz and a Foo\BarBaz, which should probably be allowed. I can't necessarily think of any current examples where that would definitely be a problem, but considering how often term overloading happens, it seems like it's something that's likely to occur at some point.

If slashes are a problem, we could probably get away with replacing them with another delimiter for the key.

Comment on lines +2 to +3
Neighborhoods\BuphaloTemplateTree\PrimaryActorName\Map\Repository\Validator\Builder\FactoryInterface:
class: PREFAB_PLACEHOLDER_VENDOR\PREFAB_PLACEHOLDER_PRODUCT\Prefab5\SearchCriteria\Validator\Builder\Factory
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

potential blocker: This looks like every repo Validator Builder Factory will have their own service but use the same class. Is that intended?

Copy link
Contributor Author

@arielallon arielallon Aug 23, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from synchronous review:

pro:
having prefab build per primary actors versions of this could avoid the covariance/contravariance problem and might be more in line with how prefab operates otherwise.

cons:
might make it harder to have shared validators?

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

Successfully merging this pull request may close these issues.

2 participants