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

repository_class configuration option could be replaced with FQCN repository name #32

Merged
merged 2 commits into from
Jan 8, 2018

Conversation

mateuszsip
Copy link
Contributor

@mateuszsip mateuszsip commented Dec 22, 2017

Implements #5.

Copy link
Member

@UFOMelkor UFOMelkor left a comment

Choose a reason for hiding this comment

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

Great work done 👍
May I ask you to make aggregate_type and aggregate_translator required (here)?

$repositoryClass = $repositoryConfig['repository_class'] ?? $repositoryName;

if (! class_exists($repositoryClass)) {
throw new RuntimeException(\sprintf(
Copy link
Member

Choose a reason for hiding this comment

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

Please remove the leading \ for consistency

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👌

@UFOMelkor
Copy link
Member

UFOMelkor commented Dec 29, 2017

Docs are already available in #27

@UFOMelkor UFOMelkor mentioned this pull request Dec 29, 2017
14 tasks
@mateuszsip
Copy link
Contributor Author

done, thanks for taking care of docs.

@@ -176,7 +176,7 @@ private function loadEventStore(string $name, array $options, ContainerBuilder $
$repositoryClass = $repositoryConfig['repository_class'] ?? $repositoryName;

if (! class_exists($repositoryClass)) {
throw new RuntimeException(\sprintf(
throw new RuntimeException(sprintf(
Copy link
Member

Choose a reason for hiding this comment

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

Why was the \ backslash removed from sprintf? This gives a minimal performance gain.

Copy link
Member

Choose a reason for hiding this comment

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

I've read somewhere, that the performance difference will be gone in future php version and you shouldn't use this except when needed (but I can't find the sources for this again at the moment). Currently we don't do this within all the prooph components, so even if my statement above would be invalid, let's keep it consistent.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

and tools like cs-fixer can always change it in entire project

@UFOMelkor UFOMelkor merged commit db085e5 into prooph:master Jan 8, 2018
@UFOMelkor
Copy link
Member

Thank you @kejwmen

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.

None yet

4 participants