services.yml
files. These have worked fine on my development board (apart from the occasional error - which I have managed to fix)Once an extension goes into production then there are numerous errors with being incompatible with other extensions (This also applies to extensions by other authors who use autowire)
The problem arises where another extension uses a FQCN - for example (I am not criticising anyone/anything here)
Code: Select all
blitze.sitemaker.icon_picker:
class: blitze\sitemaker\services\icon_picker
arguments:
- '@language'
- '@blitze.sitemaker.util'
- '@blitze.sitemaker.template'
MyException: Cannot autowire service "david63.userdetails.data.controller": argument "$template" of method "david63\userdetails\controller\data_controller::__construct()" references interface "phpbb\template\template" but no such service exists. You should maybe alias this interface to one of these existing services: "template", "blitze.sitemaker.template".
services.yml
file isCode: Select all
imports:
- { resource: userdetails_constants.yml }
- { resource: arraydata.yml }
services:
_defaults:
autowire: true
bind:
$root_path: '%core.root_path%'
$php_ext: '%core.php_ext%'
$tables: '%tables%'
$ext_images_path: '%core.root_path%ext/david63/userdetails/adm/style/images'
$select_ary: '%select_ary%'
$constants: '%constants%'
public: true
david63.userdetails.data.controller:
class: david63\userdetails\controller\data_controller
david63.userdetails.core.functions:
class: david63\userdetails\core\functions
# alias to allow autowiring
phpbb\extension\manager: '@ext.manager'
So my questions are:
- How should we handle these incompatibilities with other extensions?
- Is autowire possible with the way that phpBB is configured with Symfony?
- Is there a bug within the core of phpBB that is preventing this from working?
- Am I not understanding how autwire works (most probable reason!)?