Bug #25448

Use of undefined constant 'X' during prototype injection

Added by Karsten Dambekalns over 4 years ago. Updated over 4 years ago.

Status:Closed Start date:2011-03-30
Priority:Must have Due date:
Assigned To:Robert Lemke % Done:

0%

Category:Object
Target version:-
PHP Version: Complexity:
Has patch: Affected Flow version:

Description

When a prototype is needed for DI but has constructor arguments (that can be created through a factory), everything could be fine. But since ProxyClassBuilder, line 398, contains only unfinished code, the proxy class contains code like

    /**
     * Autogenerated Proxy Method
     */
    public function FLOW3_Proxy_injectProperties() {
        $this->mailer = new \F3\SwiftMailer\Mailer(X));
    }

This then leads to exceptions in FLOW3 because PHP produces a notice: Use of undefined constant X - assumed 'X' in .../Data/Temporary/902451e70049/StaticObjectContainer.php line ...

One way to reproduce this is to try and use SwiftMailer.


Related issues

related to TYPO3.Flow - Bug #10595: ObjectManager should not allow injection of prototypes Rejected 2010-11-02
duplicated by TYPO3.Flow - Bug #25908: ProxyClassBuilder produces invalid code for prototype arg... Resolved 2011-04-12

History

#1 Updated by Karsten Dambekalns over 4 years ago

  • Status changed from New to Closed

Duplicate with nicer description provided by Bastian :)

Also available in: Atom PDF