-
Notifications
You must be signed in to change notification settings - Fork 3
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
Performance improvement #8
base: main
Are you sure you want to change the base?
Conversation
7610b1c
to
5f855f2
Compare
Thanks, @grammit, for your work, that looks like it took quite some effort! Since this will most likely be a major release with lots of improvements and new features (e.g. the normalizer), can you please include a |
5a6d415
to
a98ccf0
Compare
.github/workflows/php.yml
Outdated
@@ -62,6 +62,10 @@ jobs: | |||
- name: Install composer dependencies | |||
uses: ramsey/composer-install@v2 | |||
|
|||
- if: matrix.php-versions == '8.2' | |||
name: Set phpstan configuration for PHP 8.2 | |||
run: cat phpstan-php8.2.neon > phpstan.neon |
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 the contents of phpstan-php8.2.neon
this could also be a mv
instead of a cat
(since you're using >
and not >>
). mv
would probably make the intention a bit clearer.
Also, and this might be more important, Pimcore 10 does not allow PHP 8.2 so I don't think we even need to consider PHP 8.2 as long as we don't offer compatibility with Pimcore 11.
@@ -4,7 +4,7 @@ | |||
|
|||
trait ClassBasenameTrait | |||
{ | |||
protected function classBasename(string|object $class): string | |||
protected static function classBasename(string|object $class): string |
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.
Considering the trait now only contains a single static method, we could also refactor it to be a class. What do you think?
$loader->load('services.yml'); | ||
$loader->load('serializer.yaml'); |
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.
One file is .yml
, one .yaml
. Should we change services
to end in yaml
, too?
src/Resources/config/serializer.yaml
Outdated
valantic.dataquality.serializer.normalizer.datetime: | ||
class: Symfony\Component\Serializer\Normalizer\DateTimeNormalizer | ||
tags: | ||
- { name: valantic.dataquality.serializer.normalizer, priority: -910 } |
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.
Can you please add a comment explaining the value of `-910?
|
||
Valantic\DataQualityBundle\EventListener\AdminObjectListListener: | ||
# Pimcore Grid column configurations |
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 probably replaces Valantic\DataQualityBundle\Model\DataType\Score
, correct? If so, can you please remove that file and also src/Resources/config/pimcore/config.yml
?
width: 300, | ||
height: 470, | ||
width: 380, | ||
height: 600, |
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.
} | ||
|
||
$scores = $this->validation->scores(); | ||
$score = $scores[$this->context['language']] ?? (array_sum($scores) / count($scores)); |
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.
Division by zero if no scores are configured.
@@ -132,9 +126,6 @@ function(ItemInterface $item) use ($obj, $userConfig, $cacheService, $request, $ | |||
public function checkAction( |
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.
When using the Pimcore Demo setup, there's a custom class in use for Car
(App\Model\Product\Car
). Unfortunately, this does not work since the class Pimcore\Model\DataObject\Car
is being configured in the settings. Do you have an idea how we could solve that?
@@ -64,7 +91,7 @@ public function score(): float | |||
return 0; | |||
} | |||
|
|||
$score = $this->calculateScore(); | |||
$score = array_sum($this->scores()) / count($this->scores()); |
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.
Division by zero
…ovement Updates to be Pimcore 10.6 compatible
No description provided.