Added patch with the feature mentioned in #1
empesan β created an issue.
Attached patch to fix #1
empesan β created an issue.
Sometimes exporting of entities resulted in the following error:
TypeError: Drupal\default_content\Normalizer\ContentEntityNormalizer::addDependency(): Argument #1 ($entity) must be of type Drupal\Core\Entity\EntityInterface, null given, called in /app/modules/contrib/default_content/src/Normalizer/ContentEntityNormalizer.php on line 453 in /app/modules/contrib/default_content/src/Normalizer/ContentEntityNormalizer.php on line 482 #0 /app/modules/contrib/default_content/src/Normalizer/ContentEntityNormalizer.php(453): Drupal\default_content\Normalizer\ContentEntityNormalizer->addDependency(NULL)
so I rerolled the latest patch and added a double check to assert that the argument being sent to addDependency() function is always an EntityInterface
#6 patch was wrong for 2.1.x branch due to I've already applied the previous patch. Attached rerolled patch with #7 fixes for 2.1.x-dev branch
I've rerolled the patch because of several issues. Based on #2 and #6, here's a new patch with solves the following:
- #6 threw this error
Error: Object of class Drupal\Core\Url could not be converted to string in Drupal\flysystem\Asset\CssOptimizer->rewriteFileURI() (line 43 of /var/www/html/web/modules/contrib/flysystem/src/Asset/CssOptimizer.php
because $this->fileUrlGenerator->generate($path) returned a Core/Url object so I added the function to get the URI. - Fixed phpcs warnings/errors.
- Fixed phpstan warning errors including parent constructor.
Applied the patch in Description and errors are fixed after running phpcs.