Problem/Motivation
There are several issues we need to have a look at in order to make it Drupal 9 ready:
------ -----------------------------------------------------------------
Line sources/content/src/Plugin/tmgmt/Source/ContentEntitySource.php
------ -----------------------------------------------------------------
101 Call to deprecated function entity_get_form_display():
in drupal:8.8.0 and is removed from drupal:9.0.0. Use
EntityDisplayRepositoryInterface::getFormDisplay() instead.
------ ----------------------------------------------------------------------- -------------------------------------------------------------------------
Line sources/content/tests/src/Functional/ContentTmgmtEntitySourceUiTest.php
------ -------------------------------------------------------------------------
1063 Call to deprecated function entity_get_form_display():
in drupal:8.8.0 and is removed from drupal:9.0.0. Use
EntityDisplayRepositoryInterface::getFormDisplay() instead.
------ ------------------------------------------------------------------------------- ------------------------------------------------------------------
Line sources/content/tests/src/Kernel/ContentEntitySourceUnitTest.php
------ ------------------------------------------------------------------
94 Call to deprecated function file_unmanaged_copy():
in drupal:8.7.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\File\FileSystemInterface::copy().
------ ------------------------------------------------------------------------ -------------------------------------------------------------------------------------------------------------------
Line sources/locale/tests/src/Functional/LocaleSourceUiTest.php
------ -------------------------------------------------------------------------------------------------------------------
30 Call to deprecated constant FILE_EXISTS_REPLACE: Deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. Use
\Drupal\Core\File\FileSystemInterface::EXISTS_REPLACE.
30 Call to deprecated function file_unmanaged_copy():
in drupal:8.7.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\File\FileSystemInterface::copy().
------ ------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------
Line sources/locale/tests/src/Kernel/LocaleSourceTest.php
------ -------------------------------------------------------------------------------------------------------------------
33 Call to deprecated constant FILE_EXISTS_REPLACE: Deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. Use
\Drupal\Core\File\FileSystemInterface::EXISTS_REPLACE.
33 Call to deprecated function file_unmanaged_copy():
in drupal:8.7.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\File\FileSystemInterface::copy().
106 Call to deprecated function db_query():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead,
get a database connection injected into your service from the container
and call query() on it. For example,
------ ------------------------------------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------------------------------------------------------
Line src/Entity/Job.php
------ -----------------------------------------------------------------------------------------------------------------------------------------------
254 Call to deprecated constant REQUEST_TIME: Deprecated in drupal:8.3.0 and is removed from drupal:9.0.0. Use \Drupal::time()->getRequestTime();
459 Call to deprecated constant REQUEST_TIME: Deprecated in drupal:8.3.0 and is removed from drupal:9.0.0. Use \Drupal::time()->getRequestTime();
------ ----------------------------------------------------------------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------------------------------------------------------
Line src/Entity/JobItem.php
------ -----------------------------------------------------------------------------------------------------------------------------------------------
682 Call to deprecated constant REQUEST_TIME: Deprecated in drupal:8.3.0 and is removed from drupal:9.0.0. Use \Drupal::time()->getRequestTime();
931 Call to deprecated constant REQUEST_TIME: Deprecated in drupal:8.3.0 and is removed from drupal:9.0.0. Use \Drupal::time()->getRequestTime();
------ ----------------------------------------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------
Line src/Tests/EntityTestBase.php
------ ----------------------------------------------------------------------------------------------------
23 Class Drupal\tmgmt\Tests\EntityTestBase extends deprecated class Drupal\tmgmt\Tests\TMGMTTestBase.
------ ---------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------
Line src/Tests/TMGMTTestBase.php
------ ------------------------------------------------------------------------------------------------
17 Class Drupal\tmgmt\Tests\TMGMTTestBase extends deprecated class Drupal\simpletest\WebTestBase:
in drupal:8.8.0 and is removed from drupal:9.0.0. Instead,
use \Drupal\Tests\BrowserTestBase. See https://www.drupal.org/node/3030340.
------ ------------------------------------------------------------------------------------------------------ ----------------------------------------------------
Line tests/src/Functional/TMGMTUiReviewTest.php
------ ----------------------------------------------------
49 Call to deprecated function file_unmanaged_copy():
in drupal:8.7.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\File\FileSystemInterface::copy().
------ ---------------------------------------------------------- ----------------------------------------------------------
Line tests/src/FunctionalJavascript/TMGMTUiJavascriptTest.php
------ ----------------------------------------------------------
78 Call to deprecated function file_unmanaged_copy():
in drupal:8.7.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\File\FileSystemInterface::copy().
------ ---------------------------------------------------------------- -----------------------------------------------------------------------------------------------------------------------------------------------
Line tests/src/Kernel/CrudTest.php
------ -----------------------------------------------------------------------------------------------------------------------------------------------
266 Call to deprecated constant REQUEST_TIME: Deprecated in drupal:8.3.0 and is removed from drupal:9.0.0. Use \Drupal::time()->getRequestTime();
280 Call to deprecated constant REQUEST_TIME: Deprecated in drupal:8.3.0 and is removed from drupal:9.0.0. Use \Drupal::time()->getRequestTime();
286 Call to deprecated constant REQUEST_TIME: Deprecated in drupal:8.3.0 and is removed from drupal:9.0.0. Use \Drupal::time()->getRequestTime();
291 Call to deprecated constant REQUEST_TIME: Deprecated in drupal:8.3.0 and is removed from drupal:9.0.0. Use \Drupal::time()->getRequestTime();
308 Call to deprecated constant REQUEST_TIME: Deprecated in drupal:8.3.0 and is removed from drupal:9.0.0. Use \Drupal::time()->getRequestTime();
313 Call to deprecated constant REQUEST_TIME: Deprecated in drupal:8.3.0 and is removed from drupal:9.0.0. Use \Drupal::time()->getRequestTime();
330 Call to deprecated constant REQUEST_TIME: Deprecated in drupal:8.3.0 and is removed from drupal:9.0.0. Use \Drupal::time()->getRequestTime();
335 Call to deprecated constant REQUEST_TIME: Deprecated in drupal:8.3.0 and is removed from drupal:9.0.0. Use \Drupal::time()->getRequestTime();
369 Call to deprecated constant REQUEST_TIME: Deprecated in drupal:8.3.0 and is removed from drupal:9.0.0. Use \Drupal::time()->getRequestTime();
------ ----------------------------------------------------------------------------------------------------------------------------------------------------- -----------------------------------------------------------------
Line tmgmt.module
------ -----------------------------------------------------------------
804 Call to deprecated function tmgmt_redirect_queue_set():
Deprecated in 8.x-1.x, use \Drupal\tmgmt\JobQueue::startQueue()
instead.
809 Call to deprecated function tmgmt_redirect_queue_dequeue():
Deprecated in 8.x-1.x, use \Drupal\tmgmt\JobQueue::getNextJob()
instead.
809 Call to deprecated function tmgmt_redirect_queue_destination():
Deprecated in 8.x-1.x, use
\Drupal\tmgmt\JobQueue::getDestination() instead.
------ ----------------------------------------------------------------------- -----------------------------------------------------------------------------------------------------------------------
Line translators/tmgmt_file/src/Plugin/tmgmt/Translator/FileTranslator.php
------ -----------------------------------------------------------------------------------------------------------------------
40 Call to deprecated constant FILE_CREATE_DIRECTORY: Deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. Use
\Drupal\Core\File\FileSystemInterface::CREATE_DIRECTORY.
40 Call to deprecated constant FILE_MODIFY_PERMISSIONS: Deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. Use
\Drupal\Core\File\FileSystemInterface::MODIFY_PERMISSIONS.
40 Call to deprecated function file_prepare_directory():
in drupal:8.7.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\File\FileSystemInterface::prepareDirectory().
41 Call to deprecated constant FILE_EXISTS_REPLACE: Deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. Use
\Drupal\Core\File\FileSystemInterface::EXISTS_REPLACE.
------ ----------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------
Line translators/tmgmt_file/tmgmt_file.drush.inc
------ ---------------------------------------------------------------------
46 Call to deprecated function drush_log().
47 Call to deprecated function file_scan_directory():
in drupal:8.8.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\File\FileSystemInterface::scanDirectory() instead.
61 Call to deprecated function drush_log().
66 Call to deprecated function drush_log().
73 Call to deprecated function drush_log().
76 Call to deprecated function drush_log().
------ --------------------------------------------------------------------------- -------------------------------------------------------------
Line translators/tmgmt_local/tmgmt_local.install
------ -------------------------------------------------------------
13 Call to deprecated function entity_get_form_display():
in drupal:8.8.0 and is removed from drupal:9.0.0. Use
EntityDisplayRepositoryInterface::getFormDisplay() instead.
19 Call to deprecated function entity_get_form_display():
in drupal:8.8.0 and is removed from drupal:9.0.0. Use
EntityDisplayRepositoryInterface::getFormDisplay() instead.
------ -------------------------------------------------------------[ERROR] Found 40 errors
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | 3108499-drupal-9-update-13-interdiff.txt | 1.61 KB | sasanikolic |
| #13 | 3108499-drupal-9-update-13.patch | 45.01 KB | sasanikolic |
| #12 | 3108499-drupal-9-update-12-interdiff.txt | 668 bytes | sasanikolic |
| #12 | 3108499-drupal-9-update-12.patch | 45.34 KB | sasanikolic |
| #11 | 3108499-drupal-9-update-11-interdiff.txt | 741 bytes | sasanikolic |
Comments
Comment #2
sasanikolic commentedHere is the patch with the fixes for the warnings mentioned above. All should be fixed except the TMGMT base tests.
Comment #3
sasanikolic commentedComment #4
berdirthis is a service.
same.
and smae.
don't change, they must call the old functions, as they themself are also part of the old deprecated API
all drush_ functions in here should probably be updated to a new thing.
use the service.
no changes to drush_* in here.
Comment #5
sasanikolic commentedMade the code changes mentioned above and tested with exporting and importing an xliff document with the new drush command. Should work better now.
Also, applied the patch from https://www.drupal.org/files/issues/2018-12-17/3020957-2.patch here, so let's see what the testbot says.
Comment #6
sasanikolic commentedComment #7
sasanikolic commentedThis should fix lots of test fails.
Comment #8
berdirjust remove this, getChangeList() would just return a list of changes to do, either function doesn't actually do anything anymore. So if it works then it is safe to remove.
accidental newline.
stil some incorrect changes in here.
the use isn't needed anymore.
Comment #9
sasanikolic commentedSome more test fixes.
Comment #10
sasanikolic commentedThis patch should fix TMGMTUiJavascriptTest and LocalTranslatorTest test fails.
Comment #11
sasanikolic commentedAnd here is the fix for the ConfigSourceUnitTest warning. Others seem like issues with other modules @Berdir?
Comment #12
sasanikolic commentedI removed the drupalci.yml in this patch. Let's see if tests pass now.
Comment #13
sasanikolic commentedAs discussed with @Berdir, removing the lines that causes the LocaleSourceUiTest and LocaleSourceTest tests to fail. The issue was with file_unamanaged_copy function that logged the error, but we never checked for that before.
Comment #14
berdirI think this is ready now, will commit it in march or so.
Comment #15
berdirCommitted.