Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-24868

Autoload generation fails if "<ClassName>::class" is used in a parsed file

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 5.3.6, 2015.07, 5.4.4
    • Fix Version/s: 5.3.8, 2015.09, 5.4.5
    • Component/s: Legacy stack
    • Labels:
    • Environment:

      PHP >=5.5

      Description

      Since PHP 5.5, it is possible to use <ClassName>::class for class name resolution, in addition to get_class(), see PHP Manual: OOP Basics -> ::class.

      When this is used anywhere in a file parsed by the autoloaders generator, PHP Notices are thrown during autloads generation:

      $ php bin/php/ezpgenerateautoloads.php -e
      Scanning for PHP-files.
      
      Scan complete. Found 1525 PHP files.
      
      Searching for classes (tokenizing).
      
      PHP Notice:  Uninitialized string offset: 1 in kernel/private/classes/ezautoloadgenerator.php on line 632
      PHP Stack trace:
      PHP   1. {main}() bin/php/ezpgenerateautoloads.php:0
      PHP   2. eZAutoloadGenerator->buildAutoloadArrays() bin/php/ezpgenerateautoloads.php:174
      PHP   3. eZAutoloadGenerator->getClassFileList() kernel/private/classes/ezautoloadgenerator.php:192
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            jgamez Jérôme Gamez
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: