- Issue created by @pdureau
- First commit to issue fork.
- Merge request !83PHPCS pass on directory modules/ui_patterns_field_formatters/src/ → (Merged) created by just_like_good_vibes
- Status changed to Needs review
8 months ago 8:13pm 6 April 2024 - Status changed to Needs work
8 months ago 2:47pm 7 April 2024 - 🇫🇷France pdureau Paris
thanks you for this big piece of work, done so fast.
However, you may have forgotten about the test/ folder:
- modules/ui_patterns_field_formatters/tests/src/Kernel/PluginTest.php
- modules/ui_patterns_field_formatters/tests/src/Kernel/RenderTest.php
- modules/ui_patterns_field_formatters/tests/src/Kernel/UIPatternsFieldFormattersTestBase.php
And about this issue:
Trait method setComponentConfiguration has not been applied, because there are collisions with other trait methods on Drupal\ui_patterns_field_formatters\Plugin\Field\FieldFormatter\ComponentFormatterBase.
And phpstan results:
vendor/bin/drupal-check docroot/modules/custom ------ ------------------------------------------------------------------------------------------------------------- Line ui_patterns/modules/ui_patterns_field_formatters/src/Plugin/Derivative/FieldPropertiesSourceDeriverBase.php 394 Call to an undefined method Drupal\Core\Field\FieldStorageDefinitionInterface::getItemDefinition(). ------ ------------------------------------------------------------------------------------------------------------- Line ui_patterns/modules/ui_patterns_field_formatters/src/Plugin/Field/FieldFormatter/ComponentFormatterBase.php 128 Variable $generator in PHPDoc tag @var does not exist. ------ ------------------------------------------------------------------------------------------------------------- Line ui_patterns/modules/ui_patterns_field_formatters/src/Plugin/UiPatterns/Source/EntityReferenceFormBase.php 111 Call to an undefined method Drupal\Core\Field\FieldStorageDefinitionInterface::getItemDefinition(). ------ ----------------------------------------------------------------------------------------------------------- Line ui_patterns/modules/ui_patterns_field_formatters/src/Plugin/UiPatterns/Source/FieldFormatterFormSourceBase.php 324 Cannot unset offset 'field_link' on array<int, mixed>. ------ ---------------------------------------------------------------------------------------------------------------- Line ui_patterns/modules/ui_patterns_field_formatters/src/Plugin/UiPatterns/Source/FieldPropertiesSourceBase.php ------ ------------------------------------------------------------------------------------------------------------- 70 Variable $field in PHPDoc tag @var does not exist. 182 Call to an undefined method Drupal\Core\Entity\EntityInterface::hasField(). 192 Call to an undefined method Drupal\Core\Entity\EntityInterface::get(). ------ ------------------------------------------------------------------------------------------------------------- Line ui_patterns/modules/ui_patterns_field_formatters/src/Plugin/UiPatterns/Source/FieldPropertiesSourceSlot.php 80 Call to an undefined method Drupal\Core\Field\FieldDefinitionInterface::get(). 131 Call to an undefined method Drupal\Core\Field\FieldItemListInterface::getIterator(). 167 Variable $target in empty() always exists and is not falsy. 170 Call to an undefined method Drupal\Core\TypedData\TypedDataInterface::getEntity(). 187 Call to an undefined method Drupal\Core\Field\FieldItemInterface::getPluginId(). 188 Call to an undefined method Drupal\Core\TypedData\TypedDataInterface::toArray(). 239 Call to an undefined method Drupal\Core\Field\FieldItemListInterface::getIterator(). ------ ------------------------------------------------------------------------------------------------------------- Line ui_patterns/modules/ui_patterns_field_formatters/tests/src/Kernel/RenderTest.php 31 Class Drupal\Tests\ui_patterns_field_formatters\Kernel\RenderTest uses unknown trait Drupal\Tests\sdc\Traits\ComponentRendererTrait. 💡 Learn more at https://phpstan.org/user-guide/discovering-symbols 38 Property Drupal\Tests\ui_patterns_field_formatters\Kernel\RenderTest::$adminUser has unknown class Drupal\User\UserInterface as its type. 💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
- Status changed to Needs review
8 months ago 10:37pm 7 April 2024 - 🇫🇷France just_like_good_vibes PARIS
Merge request updated, please have a look.
sorry but during phpstan and phpcs phase, i had to update some small things inside the code to minimally improve it. -
pdureau →
committed fee3f6f5 on 2.0.x authored by
just_like_good_vibes →
Issue #3438949 by just_like_good_vibes, pdureau: Field Formatters: Code...
-
pdureau →
committed fee3f6f5 on 2.0.x authored by
just_like_good_vibes →
- Status changed to Fixed
8 months ago 8:07am 9 April 2024 Automatically closed - issue fixed for 2 weeks with no activity.