Review main Merged

22627[TASK] Check lightweight cases before class_exists if possible

Stefan Neufeind CR +2 V +2 Easy +2 −2 updated 07/28/13, 12:04

Commit message

If other checks like "in_array" can be done first that are more
lightweight than calling class_exists and potentially causing
(multiple) autoloaders (without success) to search for files.

Review

  • Code review CR +2
    • Wouter Wolters +2
    • Christian Kuhn +1
  • Verified V +2
    • Wouter Wolters +2
    • Christian Kuhn +1

Issues 1

Files 2

Review log 8

  1. Mr. Jenkins commented on patch set 1 07/27/13, 20:24

  2. Stefan Neufeind commented on patch set 1 07/27/13, 20:27

    I've also looked at the other calls to class_exists (which might trigger an autoload). But imho there were none as obvious as these, where calling another condition first could avoid class_exists. But imho we also can't disable autoloading (via boolean-flag) for the other cases of class_exists since autoloading is an essential part for finding the classes in the first place. But somebody reviewing please also give a quick check of class_exists()-calls and if you think maybe an autoloading could be avoided here or there.
  3. Philipp Gampe voted on patch set 1 CR +1 07/27/13, 20:30

  4. Stefan Neufeind updated the commit message in patch set 1 07/27/13, 22:15

  5. Mr. Jenkins commented on patch set 2 07/27/13, 22:16

  6. Christian Kuhn voted on patch set 2 V +1 CR +1 07/27/13, 23:34

  7. Wouter Wolters voted on patch set 2 V +2 CR +2 07/28/13, 12:04

  8. Wouter Wolters merged patch set 3 07/28/13, 12:04