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

klausi’s picture

Status: Active » Closed (won't fix)

Coder 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.