-
Notifications
You must be signed in to change notification settings - Fork 27
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
EZP-28861: Allow template and controller dispatching based on matcher configuration for Content Create #217
EZP-28861: Allow template and controller dispatching based on matcher configuration for Content Create #217
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.
Mostly nitpicking 🙃
* | ||
* @throws \eZ\Publish\Core\Base\Exceptions\InvalidArgumentType | ||
* @throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException | ||
* @throws \eZ\Publish\API\Repository\Exceptions\NotFoundException |
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.
This method can still throw NotFoundException
, so you shouldn't skip it.
* @param \Symfony\Component\HttpFoundation\Request $request | ||
* @param ContentCreateView $view |
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.
Please keep consistency when hinting types, either FQCN or not. :) I'd suggest FQCN due to existing code, but it's up to you.
$contentId, | ||
$versionNo = null, | ||
$language = null, | ||
$locationId = null |
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.
Missing PhpDoc for this argument.
use Symfony\Component\DependencyInjection\ContainerBuilder; | ||
|
||
/** | ||
* Compiler pass to register Limitation value mappers. |
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.
That seems like copy-paste error ;)
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.
@webhdx this hasn't been addressed.
@@ -22,7 +22,7 @@ public function addSemanticConfig(NodeBuilder $nodeBuilder) | |||
{ | |||
$nodeBuilder | |||
->arrayNode('content_edit') | |||
->info('Content edit configuration') | |||
->info('Content edit configuration. This key was deprecated in 2.1 and will be removed in 3.0. Please use siteaccess aware content_create_view key.') |
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.
Please use ->deprecated()
call for that (see other usages for deprecation message format).
*/ | ||
private function loadLocation($locationId) | ||
{ | ||
return $this->repository->getLocationService()->loadLocation($locationId); |
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.
Based on other ViewBuilder classes, this makes me think it belongs to common base or trait.
} | ||
|
||
/** | ||
* @return $contentType |
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.
return type-hint typo
} | ||
|
||
/** | ||
* @return Location |
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.
Location|null
or is ?Location
also correct for PhpDoc? (don't know).
use Symfony\Component\HttpKernel\Controller\ControllerReference; | ||
|
||
/** | ||
* Base for View Providers. |
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.
Copy-paste typo.
use Symfony\Component\HttpKernel\Controller\ControllerReference; | ||
|
||
/** | ||
* Base for View Providers. |
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.
Copy-paste typo.
816f060
to
6de1316
Compare
ca74e45
to
08de72e
Compare
@mikadamczyk @Nattfarinn @ViniTou @alongosz Code review needed. Please review only 08de72e commit as it's based on #215 for the time being. |
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.
This might need a rebase, added also review to #215
One thing left here:
* | ||
* @throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException | ||
* @throws \eZ\Publish\API\Repository\Exceptions\NotFoundException | ||
* @throws \eZ\Publish\Core\Base\Exceptions\InvalidArgumentException |
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.
@webhdx please type-hint API.
2786762
to
c19d7d7
Compare
… configuration for Content Create
c19d7d7
to
66cd116
Compare
TODO