Big +1 !
Created a new branch and rebased everything with the help of @Grimreaper.
Fixed an issue with the slots being arrays instead of objects.
oldeb β changed the visibility of the branch 3439414-2.0.0-alpha2-add-unit to hidden.
oldeb β changed the visibility of the branch 3439414-2.0.0-alpha2-add-unit-source-plugin to hidden.
Finished, MR is blocked because ComponentPluginManager.php changed on both sides ...
Rebase is not helping :/
Progress status :
- Canonicalizer β
- CompatibilityChecker β
- ReferencesResolver => WIP
- StreamWrapper β
When an incorrect scheme is passed : an error is thrown. This should never happen since it's checked by the ComponentPluginManager before calling file_get_contents and, like you said, the streamwrapper is always called with the correct scheme because of the tags in the service definition.
When an incorrect plugin is passed, the file_get_contents return a string with an empty array : "[]"
So there is no error, the schema is just empty.
Check for correct scheme is already done in the ComponentPluginManager::annotateProps/a> method.
PropType availiblity is done by the PluginManagerBase::createInstance method.
Patch is applying correctly but I'm not able to test that everyting is working properly.
Added the following tests :
- PropTypeAdapterPluginManager::guessFromSchema()
- PropTypePluginManager::guessFromSchema()
G4MBINI β credited oldeb β .
Done as asked in #7
Test are passing correctly now
- Fixed issue by overriding SDC's alterDefinition method in our own ComponentPluginManager.
- Fixed error in getCategories when no group is defined
- Adding sort on getGroupedDefinitions to have the group/categories in the same order as getCategories
Added basic kernel tests for the ComponentPluginManager but following error is making them fail :
PHPUnit\Framework\Exception: PHP Deprecated: basename(): Passing null to parameter #1 ($path) of type string is deprecated in /var/www/html/web/core/lib/Drupal/Core/Theme/ComponentPluginManager.php on line 316
Deprecated: basename(): Passing null to parameter #1 ($path) of type string is deprecated in /var/www/html/web/core/lib/Drupal/Core/Theme/ComponentPluginManager.php on line 316
PHP Deprecated: basename(): Passing null to parameter #1 ($path) of type string is deprecated in /var/www/html/web/core/lib/Drupal/Core/Theme/ComponentPluginManager.php on line 316
Deprecated: basename(): Passing null to parameter #1 ($path) of type string is deprecated in /var/www/html/web/core/lib/Drupal/Core/Theme/ComponentPluginManager.php on line 316
Also wondering if this may be a side effect of https://www.drupal.org/node/3298550 β
Nope, I tried and nothing changed.
Also seeing a commit in Drupal 10.2.5: https://git.drupalcode.org/project/drupal/-/commit/321dc38ac602fc2de74de...
I can't figure out how to use that ...
I also tried access the data using xpath but it's not working either ...
G4MBINI β credited oldeb β .
Tests are failing due to another unrelated issue : #3437169
@Grimreaper what's your take on this ?
Added requirement to composer.json
G4MBINI β credited oldeb β .
G4MBINI β credited oldeb β .
This change broke my D10 upgrade.
There is a compatibility issue with the address contrib module β , in the AddressItem field type they are decraring a "Country" constraint and giving a "availableCountries" option which they collide with this change and provoking the following error :
Symfony\Component\Validator\Exception\InvalidOptionsException: The options "availableCountries" do not exist in constraint "Drupal\field_validation\Plugin\Validation\Constraint\CountryConstraint". in Symfony\Component\Validator\Constraint->normalizeOptions() (line 180 of /app/vendor/symfony/validator/Constraint.php).
I think we should find another id for the CountryConstraint.
G4MBINI β credited oldeb β .
G4MBINI β credited oldeb β .
I was there and happy to meet you all guys. See you in Rennes !
Here is a working patch for Drupal 10.
Here is a quick patch for the ones looking for a solution to this issue.