-
Notifications
You must be signed in to change notification settings - Fork 17
IBX-9727: Aligned codebase after core content VO type hints changes #1616
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
Conversation
| if (isset($value->name)) { | ||
| $data->setName($value->name); | ||
| } | ||
| if (isset($value->languageCode)) { | ||
| $data->setLanguageCode($value->languageCode); | ||
| } |
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.
Note
Both properties not accept null.
| return new SectionUpdateData( | ||
| new Section( | ||
| [ | ||
| 'identifier' => $value->identifier ?? '', | ||
| 'name' => $value->name ?? '', | ||
| ] | ||
| ) | ||
| ); |
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.
Note
While SectionUpdateData accepts nulls, core Section VO doesn't anymore. There's Assert NotBlank constraint there attached on full stack, so the outcome is the same for an empty string - no need to test against nulls.
| private function generateLocation(int $parentLocationId = self::DEFAULT_PARENT_LOCATION_ID): API\Location | ||
| { | ||
| return new Core\Location(['id' => 3, 'parentLocationId' => $parentLocationId]); |
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.
Note
Parent location ID cannot be null anymore
|
|
||
| self::assertNull( | ||
| $this->viewParametersListener->setContentEditViewTemplateParameters( | ||
| new PreContentViewEvent($contentView) | ||
| ) | ||
| $this->viewParametersListener->setContentEditViewTemplateParameters( | ||
| new PreContentViewEvent($contentView) | ||
| ); |
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.
Note
Returns void
| self::assertNull( | ||
| $this->viewParametersListener->setUserUpdateViewTemplateParameters( | ||
| new PreContentViewEvent($view) | ||
| ) | ||
| $this->viewParametersListener->setUserUpdateViewTemplateParameters( | ||
| new PreContentViewEvent($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.
Note
Returns void
| /** @phpstan-ignore argument.type */ | ||
| $this->mapper->reverseMap(new LanguageCreateData()); |
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.
Note
The error reported here is the essence of this test, so moved this ignore from the baseline to here.
| yield 'simple' => [['identifier' => 'hash', 'name' => 'Lorem']]; | ||
| yield 'without_name' => [['identifier' => 'hash', 'name' => '']]; | ||
| yield 'without_identifier' => [['identifier' => '', 'name' => 'Lorem']]; | ||
| yield 'with_null' => [['identifier' => '', 'name' => '']]; |
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.
Note
Main reason for touching this test class - changed null to ''.
| { | ||
| $query = new Query(); | ||
| $query->query = $this->createMock(CriterionInterface::class); | ||
| $query->sortClauses = [$this->createMock(SortClause::class)]; |
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.
Note
Erroneous assignment - originally was SortClause instead of an array of SortClauses
a4b768e to
96d2bea
Compare
96d2bea to
f76205b
Compare
|


Caution
Needs to be merged together with ibexa/core#569
Related PRs:
Description:
Adjusted code after ibexa/core#569 changes with some improvements in the vicinity of changed code.
See the notes in diff comments for reasoning behind the changes.
For QA:
No QA required.