Feature #44157

Object configuration should imply annotated object name

Added by Adrian Föder almost 9 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
Should have
Assignee:
Category:
Object
Target version:
-
Start date:
2012-12-20
Due date:
% Done:

100%

Estimated time:
PHP Version:
Has patch:
No
Complexity:

Description

consider the following use case:

/**
 * @Flow\Scope("singleton")
 */
class FooService {

    /**
     * @var \TYPO3\Flow\Monitor\FileMonitor
     */
    protected $fileMonitor;
}

Acme\Acme\FooService: properties: fileMonitor: object: # name: TYPO3\Flow\Monitor\FileMonitor arguments: 1: value: 'MyPackage_MonitorIdentifier'

When running this way, Flow complains

  Uncaught Exception
    Object configuration for property "fileMonitor" contains neither
    object name nor factory object name in configuration of package ...

So, the commented line in the yaml above becomes necessary, however I think the default object name in this case should still be the annotated one.

Do you agree on this?

Also available in: Atom PDF