Problem/Motivation
source : [git] https://git.drupal.org/project/embed fcc97638807dd981207175d027d0f2ea7a8bbc41
Results from Drupal Check:
------ -------------------------------------------------------------------------------
Line src/Entity/EmbedButton.php
------ -------------------------------------------------------------------------------
118 Call to deprecated method entityManager() of class Drupal\Core\Entity\Entity.
141 Call to deprecated method entityManager() of class Drupal\Core\Entity\Entity.
------ -------------------------------------------------------------------------------
------ ----------------------------------------------------------------------------------
Line src/Form/EmbedButtonForm.php
------ ----------------------------------------------------------------------------------
105 Call to deprecated function drupal_set_message().
122 Call to deprecated function drupal_set_message().
199 Call to deprecated function drupal_set_message().
202 Call to deprecated function drupal_set_message().
203 Call to deprecated method link() of class Drupal\Core\Entity\EntityInterface.
207 Call to deprecated method urlInfo() of class Drupal\Core\Entity\EntityInterface.
------ ----------------------------------------------------------------------------------
------ ----------------------------------------------------
Line tests/embed_test/src/Plugin/EmbedType/Aircraft.php
------ ----------------------------------------------------
62 Call to deprecated function drupal_set_message().
------ ----------------------------------------------------
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #24 | 3042596-fix-drupal9-deprecations.patch | 10.73 KB | dave reid |
| #23 | 3042596-fix-drupal9-deprecations.patch | 10.7 KB | dave reid |
| #20 | 3042596-fix-drupal9-deprecations.patch | 11.31 KB | dave reid |
| #16 | interdiff-3042596-15-16.txt | 890 bytes | sharique |
| #16 | 3042596-16.patch | 5.51 KB | sharique |
Comments
Comment #2
sergiu stici commentedHere is the patch, please review.
Comment #4
mohammad-fayoumiComment #5
mohammad-fayoumiComment #6
joegraduateAttached patch is a modified version of #4 which should hopefully fix the failing tests.
FWIW, it looks like it might actually be preferable to replace
EntityManager::loadEntityByUuidwithEntityRepositoryInterface::loadEntityByUuid()(like was started in #2).BADcamp info: Blue Queen of Clubs
Comment #8
joegraduateAttached patch adds EntityRepositoryInterface as a dependency and replaces
EntityManager::loadEntityByUuid()withEntityRepositoryInterface::loadEntityByUuid()instead of usingEntityStorageInterface::loadByProperties(), similar to #2 but it also includes a\Drupal::service()fallback.Hopefully this fixes the failing tests better than #6.
BADcamp info: Blue Queen of Clubs
Comment #9
joegraduateComment #11
joegraduateMade EntityRepositoryInterface dependency optional.
BADcamp info: Blue Queen of Clubs
Comment #13
joegraduateI believe the remaining test that is failing,
Drupal\Tests\embed\Kernel\IconFileUsageTest::testEmbedButtonIconUsage, is actually failing due to this core change: https://www.drupal.org/node/2891902 and may no longer be valid.Comment #14
joegraduateAdded fix for failing test from #3002291: IconFileUsageTest fails after change in Drupal 8.4 and fixed docblock for
EmbedButton::__contstruct().Comment #15
joegraduateMade the code for loading the EntityRepository service more like the existing service-loading methods on the EmbedButton class. This is now ready for serious review IMHO.
Comment #16
sharique commentedThere one more deprecation.
I updated patch to address it.
Comment #17
joshi.rohit100After applying the patch in #16, I still see deprecation errors -
Comment #18
andreyjan commentedRegarding to #17, I've created a separate issue to convert SimpleTest tests to FunctionalJavascript https://www.drupal.org/project/embed/issues/3096857, so moving this to needs review back,
Comment #19
joshi.rohit100Comment #20
dave reidThis was missing the DependentPluginInterface on EmbedTypeInterface. I also cleaned up a few more things and made the modules installable by default on Drupal 9.
Comment #23
dave reidRe-rolled now that the blockers were merged.
Comment #24
dave reidShould resolve the test now.
Comment #26
dave reidCommitted #24 to 8.x-1.x. Thanks all!