Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-1251

EntityGenerator uses non-existing constant T_AMPERSAND

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.0.7, 2.1.1, 2.2
    • Component/s: Tools
    • Security Level: All
    • Labels:
      None
    • Environment:
      Irrelevant

      Description

      As per http://www.php.net/manual/en/tokens.php - the T_AMPERSAND token does not exist. I'm not sure what was the intent, but the entity generator fails on the following code:

                  $elems = array_map(function($el) {
                      return $el;
                  }, $elems);
      

      Due to the way notices are handled in Symfony, this basically stops the execution of the generator entirely. Not so great.

        [ErrorException]                                                                                            
        Notice: Use of undefined constant T_AMPERSAND - assumed 'T_AMPERSAND' in ./vendor/doctrine/lib/Doctrine/ORM/Tools/EntityGenerator.php line 454
      

      Commenting out the offending line makes it work fine though, so I think it's just choking while expecting a function that takes args by reference or something.

        Activity

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Jordi Boggiano
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: