Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Coder_upgrade is converting
require_once 'myfile.inc';
to
require_once DRUPAL_ROOT . '/' . 'myfile.inc';
which is almost never going to be the same path. I don't know if it's possible to detect relative paths versus absolute paths, to be able to do something like
require_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'themodulename') . '/' . 'myfile.inc';
If not, maybe just a TODO comment?
Comments
Comment #1
klausiCoder 7.x is frozen now and will not receive updates. Coder 8.x-2.x can be used to check code for any Drupal version, Coder 8.x-2.x also supports the phpcbf command to automatically fix conding standard errors. Please check if this issue is still relevant and reopen against that version if necessary.