To date (End of February 2019), the acquia_connector module is using lots of deprecated APIs. To be ready for Drupal 9, it'd be great to remove them ASAP.
------ ---------------------------------------------------
Line acquia_connector.module
------ ---------------------------------------------------
247 Call to deprecated function drupal_set_message().
303 Call to deprecated function drupal_set_message().
363 Call to deprecated function drupal_set_message().
382 Call to deprecated function drupal_set_message().
------ ---------------------------------------------------
------ ---------------------------------------------------
Line acquia_search/acquia_search.module
------ ---------------------------------------------------
368 Call to deprecated function drupal_set_message().
------ ---------------------------------------------------
------ --------------------------------------------------------------------------------------
Line acquia_search/src/EventSubscriber/SearchSubscriber.php
------ --------------------------------------------------------------------------------------
24 Class Drupal\acquia_search\EventSubscriber\SearchSubscriber extends deprecated class
Solarium\Core\Plugin\Plugin.
------ --------------------------------------------------------------------------------------
------ -------------------------------------------------------------------------
Line acquia_search/src/Plugin/SolrConnector/SearchApiSolrAcquiaConnector.php
------ -------------------------------------------------------------------------
240 Call to deprecated function drupal_set_message().
240 Call to deprecated method l() of class Drupal.
------ -------------------------------------------------------------------------
------ ---------------------------------------------------------------------------------------------------
Line acquia_search/tests/modules/acquia_search_test/src/EventSubscriber/AcquiaSearchTestSubscriber.php
------ ---------------------------------------------------------------------------------------------------
26 Call to deprecated function drupal_set_message().
------ ---------------------------------------------------------------------------------------------------
------ ---------------------------------------------------------------------------------
Line acquia_search/tests/src/Kernel/AcquiaSearchOverrideTest.php
------ ---------------------------------------------------------------------------------
36 Call to deprecated method getMock() of class Drupal\KernelTests\KernelTestBase.
------ ---------------------------------------------------------------------------------
------ ---------------------------------------------------
Line src/Client.php
------ ---------------------------------------------------
167 Call to deprecated function drupal_set_message().
------ ---------------------------------------------------
------ ------------------------------------------------------------
Line src/Controller/SecurityReviewController.php
------ ------------------------------------------------------------
405 Call to deprecated function file_htaccess_lines().
464 Call to deprecated method entityManager() of class Drupal.
544 Call to deprecated method entityManager() of class Drupal.
------ ------------------------------------------------------------
------ -------------------------------------------------------------------------------
Line src/Controller/SpiController.php
------ -------------------------------------------------------------------------------
357 Call to deprecated function db_select().
387 Call to deprecated function db_select().
419 Call to deprecated function db_select().
441 Call to deprecated function db_select().
459 Call to deprecated function db_select().
501 Call to deprecated function db_select().
539 Call to deprecated function drupal_get_profile().
615 Call to deprecated function db_query().
641 Call to deprecated function db_select().
659 Call to deprecated function db_query().
674 Call to deprecated method substr() of class Drupal\Component\Utility\Unicode.
928 Call to deprecated function db_select().
932 Call to deprecated function db_select().
936 Call to deprecated function db_select().
958 Call to deprecated function drupal_set_message().
1025 Call to deprecated function drupal_set_message().
1032 Call to deprecated function drupal_set_message().
1036 Call to deprecated function drupal_set_message().
1041 Call to deprecated function drupal_set_message().
------ -------------------------------------------------------------------------------
------ ------------------------------------------------
Line src/Controller/StartController.php
------ ------------------------------------------------
32 Call to deprecated method l() of class Drupal.
------ ------------------------------------------------
------ ---------------------------------------------------
Line src/Controller/TestStatusController.php
------ ---------------------------------------------------
47 Call to deprecated function drupal_set_message().
------ ---------------------------------------------------
------ ---------------------------------------------------
Line src/Form/CredentialForm.php
------ ---------------------------------------------------
70 Call to deprecated method url() of class Drupal.
157 Call to deprecated function drupal_set_message().
------ ---------------------------------------------------
------ ---------------------------------------------------------------------
Line src/Form/SettingsForm.php
------ ---------------------------------------------------------------------
110 Call to deprecated method url() of class Drupal\Core\Form\FormBase.
123 Call to deprecated function drupal_set_message().
131 Call to deprecated method url() of class Drupal\Core\Form\FormBase.
189 Call to deprecated method url() of class Drupal.
------ ---------------------------------------------------------------------
------ ---------------------------------------------------
Line src/Form/SetupForm.php
------ ---------------------------------------------------
88 Call to deprecated method url() of class Drupal.
208 Call to deprecated function drupal_set_message().
225 Call to deprecated function drupal_set_message().
------ ---------------------------------------------------
[ERROR] Found 44 errors | Comment | File | Size | Author |
|---|---|---|---|
| #20 | interdiff_18-20.txt | 1.76 KB | danepowell |
| #20 | acquia_connector-3036133-20.patch | 58.99 KB | danepowell |
Comments
Comment #2
saesa commentedComment #3
saesa commentedComment #5
saesa commentedComment #6
bhanuprakashnani commentedI have changed the deprecated functions of drupal_set_message(). Please review and tell if any more changes are required. Thank you.
Comment #7
maliknaik commentedI've replaced the all the deprecated APIs from the project.
Replaced:
drupal_set_message()with\Drupal::messenger()->addMessage().\Drupal::messenger()in the classes extending fromConfigFormBaseandPluginBaseI've used$this->messenger()->addMessage()Solarium\Core\Plugin\PluginwithSolarium\Core\Plugin\AbstractPlugin.db_select()with\Drupal::database()->select().db_query()with\Drupal::database()->query().drupal_get_profile()with\Drupal::installProfile().file_htaccess_lines(FALSE)withDrupal\Component\PhpStorage\FileStorage::htaccessLines(FALSE).\Drupal::entityManager()with\Drupal::entityTypeManager().\Drupal::l()with\Drupal\Core\Link::fromTextAndUrl()->toString().\Drupal::url()with\Drupal\Core\Url::fromRoute()->toString()\Drupal\KernelTests\KernelTestBase's getMock()method withgetMockBuilder()->getMock()Comment #8
maliknaik commentedComment #9
maliknaik commentedComment #10
sharique commentedUpdated patch to address mode deprecations.
Also updated tests for deprecations.
Comment #11
joshi.rohit100Marked test to proceed without waiting for the branch to pass.
Comment #12
sharique commentedUpdated patch to fix tests.
Comment #13
sharique commentedFailing tests should be reduced by one,
AcquiaConnectorSpiTest is passing my local, but failing in ci.
Comment #14
joshi.rohit100Patch#13 applied successfully but still there are some deprecation errors -
Fixing these error in the this patch and now there is no error
42/42 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
[OK] No errors
Comment #15
amitgoyal commentedAfter applying the patch in #14, there are no deprecations,
Comment #16
kristen polPer a Slack discussion with Gábor Hojtsy regarding usage of D9 tags (Drupal 9, Drupal 9 compatibility, Drupal 9 readiness, etc.), "Drupal 9 compatibility" should be used for contributed projects that need updating and "Drupal 9" was the old tag for D8 issues before the D9 branch was ready. Doing tag cleanup here based on that discussion.
Comment #17
danepowell commentedThanks for everyone's work on this so far. Here's the most recent patch that applies to 8.x-2.x (many of these deprecations were fixed in the recent 8.x-2.x release). The only thing that's lacking is the simpletest to PHPUnit conversions. I wasn't sure about the work related to that in previous patches.
Comment #18
danepowell commentedI think this is 98% complete, just need to figure out a deprecation scanning issue. Hopefully it also fixes tests on d.o. Will need a backport to 8.x-1.x after it's merged.
Comment #19
danepowell commentedHmm, the test failure seems like some kind of testbot internal error. No idea what's going on there. Opened #3102874: Ancillary require failure for support.
Comment #20
danepowell commentedHere's the final version of the patch, if we can just get the testbot working.
Comment #22
danepowell commentedCommitted to 8.x-2.x, awaiting backport to 8.x-1.x
Comment #24
danepowell commentedThanks again to everyone who contributed to this issue.