Bug #76714
closedOverloading classes in CLI-mode, based on extension/plugin
0%
Description
I'm defining some concrete classes for interfaces in my extension by TypoScript, and since I don't want to interfere with other extensions, I'm doing it within 'plugin' section:
plugin.tx_myext { objects { Vendor\MyExt\Service\MyServiceInterface { className = Vendor\MyExt\Service\RestMyService } Psr\Http\Message\RequestInterface { className = GuzzleHttp\Psr7\Request } } }
That works fine in FE mode, but doesn't work in CLI mode.
And, yes, I've added following line to my TS:
module.tx_myext < plugin.tx_myext
When I'm defining my overloads globally via config.tx_extbase
, then it works fine, but this is not my initially desired result.
Updated by Georg Ringer over 8 years ago
- Status changed from New to Needs Feedback
but CLI is neither BE (module) nor FE (plugin). so why should it work... IMO using config is the correct way
Updated by Viktor Livakivskyi over 8 years ago
Hi Georg,
I agree on context, but then just imagine a situation, when I want to use a GuzzleHttp\Psr7\Request as implementation of Psr\Http\Message\RequestInterface in my_ext1 CLI CommandController, but MyVendor\Psr7\Request in my_ext2 CLI CommandController.
With current approach it is not possible (or possible by direct instantiation, which is not a good practice anyway).
Updated by Alexander Opitz about 8 years ago
- Status changed from Needs Feedback to New
Updated by Georg Ringer over 4 years ago
- Related to Task #87623: Replace config.persistence.classes typoscript added
Updated by Georg Ringer over 4 years ago
- Status changed from New to Closed
solved with 10 with #87623 as this is now configured not in TS anymore, therefore closing