[DDC-1251] EntityGenerator uses non-existing constant T_AMPERSAND Created: 05/Jul/11  Updated: 09/Jul/11  Resolved: 09/Jul/11

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: Tools
Affects Version/s: 2.1
Fix Version/s: 2.0.7, 2.1.1, 2.2
Security Level: All

Type: Bug Priority: Blocker
Reporter: Jordi Boggiano Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
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.



 Comments   
Comment by Benjamin Eberlei [ 09/Jul/11 ]

Fixed

Generated at Sat Dec 20 17:22:28 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.