-
Notifications
You must be signed in to change notification settings - Fork 351
Fix some new phpstan issues in new packages #7783
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
Fix some new phpstan issues in new packages #7783
Conversation
packages/article/src/Infrastructure/Sulu/Content/ArticleSelectionContentType.php
Show resolved
Hide resolved
*/ | ||
private function setExcerptData(ExcerptInterface $dimensionContent, array $data): void | ||
{ | ||
if (\array_key_exists('excerptTitle', $data)) { | ||
Assert::nullOrString($data['excerptTitle']); |
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.
not sure about this "runtime" checks maybe we should go with assert
instead which is compiled away on prod
for better performance in cases used for imports.
$dimensionContent->setSeoHideInSitemap($data['seoHideInSitemap'] ?? false); | ||
$dimensionContent->setSeoNoFollow($data['seoNoFollow'] ?? false); | ||
$dimensionContent->setSeoNoIndex($data['seoNoIndex'] ?? false); | ||
if (\array_key_exists('seoTitle', $data)) { |
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 was missing. See excerpt as or other data mapper as reference only set data if send else stay untouched.
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.
moved to the TestBundle
@Prokyonn would be good if you could target the ContentResolver part in a PR: |
What's in this PR?
Fix some bew phpstan issues in new packages.
Why?
After upgrade to PHPStan 2.0 we got some new issues on the 3.0 branch we tackle them here before doing a baseline.