drupal-check upgrade_rector/
9/9 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
------ --------------------------------------------------------------------
Line src/RectorProcessor.php
------ --------------------------------------------------------------------
95 Call to deprecated function file_directory_temp():
in drupal:8.8.0 and is removed from drupal:9.0.0. Use
\Drupal\Core\File\FileSystemInterface::getTempDirectory() instead.
------ --------------------------------------------------------------------
------ -------------------------------------------------------------------------------------------------------------------------------------
Line tests/modules/upgrade_rector_test_error/src/Form/UpgradeRectorTestErrorForm.php
------ -------------------------------------------------------------------------------------------------------------------------------------
Class Drupal\upgrade_rector_test\Form\UpgradeRectorTestErrorForm was not found while trying to analyse it - autoloading is probably
not configured properly.
------ -------------------------------------------------------------------------------------------------------------------------------------
------ --------------------------------------------------------------------------
Line tests/modules/upgrade_rector_test_error/upgrade_rector_test_error.module
------ --------------------------------------------------------------------------
8 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
9 Call to deprecated method url() of class Drupal:
in drupal:8.0.0 and is removed from drupal:9.0.0.
Instead create a \Drupal\Core\Url object directly, for example using
Url::fromRoute().
------ --------------------------------------------------------------------------
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | interdiff.txt | 351 bytes | gábor hojtsy |
| #10 | 3131599-10.patch | 1.43 KB | gábor hojtsy |
| #8 | interdiff.txt | 1.47 KB | gábor hojtsy |
| #8 | 3131599-8.patch | 1.42 KB | gábor hojtsy |
| #5 | 3131599_5.patch | 2.79 KB | vsujeetkumar |
Comments
Comment #2
gábor hojtsyComment #3
gábor hojtsyThanks for the issue. I linked it from the project page.
Comment #4
gábor hojtsyAs you can see
tests/modules/upgrade_rector_test_error/src/Form/UpgradeRectorTestErrorForm.phpandtests/modules/upgrade_rector_test_error/upgrade_rector_test_error.moduleare explicitly about testing whether rector will fix the uses of deprecated code, so we should not fix them or rector will not have anything to fix for testing purposes. We are not actually enabling/installing these test code pieces, so theoretically we can leave them around and still pass tests on Drupal 9 with our test code that is not Drupal 9 compatible.The situation with
file_directory_temp()is we would need to require Drupal 8.8 to fix it. A patch would be great to get started on that. Maybe rector itself can generate it at this point? :)Also, the report did not show but the info file would need to change to allow installing on Drupal 9.
Comment #5
vsujeetkumar commentedPatch created, Please review.
Comment #7
gábor hojtsyAs I wrote above, these should not be fixed. We need them present so we can test with them that rector works.
The rest of the patch looks good. We can even add a conditional around the file temp directory call and keep it working on 8.7 while being Drupal 9 compatible.
Comment #8
gábor hojtsyFixed those.
Comment #10
gábor hojtsyCore key should not be there.
Comment #12
gábor hojtsyWoot!