- Issue created by @pdureau
- Assigned to Christian.wiedemann
- π©πͺGermany Christian.wiedemann
christian.wiedemann β made their first commit to this issueβs fork.
- Merge request !189Issue #3469808 by christian.wiedemann, pdureau: Use decorator instead overwriting the component plugin service β (Merged) created by Christian.wiedemann
- π©πͺGermany Christian.wiedemann
I decorated plugin.manager.sdc instead of overwriting and I updated the layout builder deriver to use the original service.
- Status changed to Needs review
4 months ago 9:59pm 28 August 2024 - Assigned to pdureau
- Assigned to Christian.wiedemann
- Status changed to Needs work
4 months ago 9:48am 29 August 2024 - π«π·France pdureau Paris
Pipeline issues
phpstan:
Line modules/ui_patterns_devel/tests/src/Kernel/TwigValidatorTestBase.php
39 Property
Drupal\Tests\ui_patterns_devel\Kernel\TwigValidatorTestBase::$componentPluginManager
(Drupal\ui_patterns\ComponentPluginManager) does not accept
Drupal\Core\Theme\ComponentPluginManager.
------ --------------------------------------------------------------------------------------
Line modules/ui_patterns_devel/tests/src/Kernel/ValidatorTest.php
46 Property
Drupal\Tests\ui_patterns_devel\Kernel\ValidatorTest::$componentPluginManager
(Drupal\ui_patterns\ComponentPluginManager) does not accept
Drupal\Core\Theme\ComponentPluginManager.
------ ------------------------------------------------------------------------------
Line modules/ui_patterns_field_formatters/src/Plugin/Field/FieldFormatter/ComponentFormatterBase.php
65 Property
Drupal\ui_patterns_field_formatters\Plugin\Field\FieldFormatter\ComponentFormatterBase::$componentPluginManager
(Drupal\ui_patterns\ComponentPluginManager) does not accept
Drupal\Core\Theme\ComponentPluginManager.
------ -----------------------------------------------------------------------
Line modules/ui_patterns_layouts/src/Plugin/Derivative/ComponentLayout.php
41 Call to an undefined method
Drupal\Core\Theme\ComponentPluginManager::getSortedDefinitions().
------ ---------------------------------------
Line src/ComponentPluginManager.php
14 Plugin definitions cannot be altered.
------ ---------------------------------------
Line src/Element/ComponentForm.php
172 Call to an undefined method
Drupal\Core\Theme\ComponentPluginManager::getGroupedDefinitions().
------ ----------------------------------------------------------------------
Line tests/src/Kernel/ComponentPluginManagerTest.php
43 Property
Drupal\Tests\ui_patterns\Kernel\ComponentPluginManagerTest::$manager
(Drupal\ui_patterns\ComponentPluginManager) does not accept
Drupal\Core\Theme\ComponentPluginManager.Maybe more.
Tests without experience builder
After switching to the branch, I got:
Uncaught PHP Exception Error: "Typed property Drupal\ui_patterns\ComponentPluginManager::$propTypePluginManager must not be accessed before initialization" at /home/pierre/Projects/Drupal/ui_patterns_2/web/modules/custom/ui_patterns/src/ComponentPluginManager.php line 59
A fresh install fixed this. Do we really need to do such a fresh install?
Everything seems fine: summary is created, props are typed...
Test 1 with Experience Builder
commit 938ca03cce282bdc79da802efd0d3850751994d3 (HEAD -> 0.x, origin/HEAD, origin/0.x)
Date: Thu Aug 22 18:34:17 2024 +0000UI Patterns 2 with experience builder components
/patterns/experience_builder shows the Experience Builder's SDC component β
Except the resolution of
"$ref":"json-schema-definitions://
but tit seems the stream wrapper is not ready at the XB sideComponent "Shoe button" can be used with ComponentBlock β
Experience builder with the UI Patterns 2 component
This warning:
PHP Warning: Undefined array key "props" in experience_builder/src/Plugin/ComponentPluginManager.php on line 58
And a fatal error on /xb/node/1:
An unexpected error has occurred while fetching layouts. SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
So, not possible to test more.
Test 2 with Experience Builder
After a git pull, npm i & nom run build:
commit 7cb3623d22582ba7eae4dfb551a402c7d5a1c45c (HEAD -> 0.x, origin/HEAD, origin/0.x)
Date: Wed Aug 28 15:26:32 2024 +0000I have this fatal:
Drupal\experience_builder\PropShape::resolveSchemaReferences(): Argument #1 ($schema) must be of type array, string given
A fresh Drupal reinstall is not fixing it. So, not possible to test more.
- π«π·France pdureau Paris
Moved to beta3 because:
- There is many active and breaking changes currently nExperience builder
- We may need to push a fix in Core before anyway
- Status changed to Postponed
3 months ago 8:11am 18 September 2024 - π«π·France pdureau Paris
Let's do β¨ ComponentPluginManager must implement CategorizingPluginManagerInterface Active first
- π«π·France pdureau Paris
Let's resume this task.
@christian.wiederman: can you rebase your work and check if the pipelien is OK after the rebase?
Once done, I will redo the tests with Experience Builder.
- Assigned to pdureau
- Status changed to Needs review
27 days ago 3:26pm 25 November 2024 - π«π·France pdureau Paris
According to the pipeline, there are 6 PHPCS errors to fix.
Maybe you need to write:
/* @phpstan-ignore method.notFound */
Instead of:
/** @phpstan-ignore method.notFound */
?
- π«π·France pdureau Paris
Experience builder & UI Patterns 2 can be both installed in a Drupal instance. So, I am OK for merge.
Christian, can you rebase your branch and merge to 2.0.x?
Follow-up issue to create by pdureau:
- When using XB components in UIP2: XB's
json-schema-definitions
stream wrapper is not triggered by UI Patterns 2 (normally, it must be done automatically by the JSON Schema library, without any actions on our side) - When using UIP2 components in XB:
ValueError: "" is not a valid backing value for enum Drupal\experience_builder\JsonSchemaInterpreter\SdcPropJsonSchemaType in Drupal\experience_builder\JsonSchemaInterpreter\SdcPropJsonSchemaType::from() (line 131 of /src/PropShape/PropShape.php).
- When using XB components in UIP2: XB's
-
pdureau β
committed 527282d2 on 2.0.x authored by
christian.wiedemann β
Issue #3469808 by christian.wiedemann, pdureau: Use decorator instead...
-
pdureau β
committed 527282d2 on 2.0.x authored by
christian.wiedemann β