In functions dcp() and devel_watchdog(), devel.module checks for class existence for ChromePHP and FirePHP respectively by using class_exists() with only one parameter. This causes autoload implementation to trigger uselessly for theses classes. The second parameter should be passed as FALSE to avoid triggering autoload.

#2 class_exists_no_autoload-1212658-2.patch813 bytesfgm
PASSED: [[SimpleTest]]: [MySQL] 33,541 pass(es).
[ View ]


salvis’s picture

Patch for D8/D7?

fgm’s picture

Version:6.x-1.x-dev» 8.x-1.x-dev
Status:Active» Needs review
new813 bytes
PASSED: [[SimpleTest]]: [MySQL] 33,541 pass(es).
[ View ]

Patch for D8. Will need backport afterwards.

salvis’s picture

Version:8.x-1.x-dev» 6.x-1.x-dev
Status:Needs review» Patch (to be ported)

Committed to D8/D7, thanks!

Patch for D6?

pcambra’s picture

Issue tags:+develcontribute


mr.baileys’s picture

Version:6.x-1.x-dev» 8.x-1.x-dev
Issue summary:View changes
Status:Patch (to be ported)» Active

I found this issue when I was about to log the presence of autoload = FALSE in dcp() as a bug in the devel issue queue: I'm using Composer Manager to install ChromePhp (all on D7), expecting everything to just work, but the only way I can make it work is by patching devel to get rid of the autoload = FALSE in the class_exists().

Seems like a bug to me since even though ChromePhp is installed and I can call ChromePhp::log() from anywhere in my code, devel refuses to use it unless I patch it.

is there a noticeable performance penalty to leaving autoloading enabled in these class_exists() calls?