This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component/DependencyInjection/Loader
Fabien Potencier e87f86b550 feature #35076 [DI] added possibility to define services with abstract arguments (Islam93)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[DI] added possibility to define services with abstract arguments

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | Fix #31769
| License       | MIT
| Doc PR        | n/a

feature caused by rfc #31769 from issues list
I hope, this PR will be useful

   Abstract argument have to replaced by one of compiler passes or exception will be thrown.
   Example:
   This service definition
   ```xml
   ...
    <service id="App\Test\Test">
       <argument key="$a" type="abstract">should be defined by TestPass</argument>
    </service>
   ...
   ```
or this for yaml
```yaml
    App\Test\Test:
        arguments:
            $a: !abstract should be defined by TestPass
```
   causes exception like `Argument "$a" of service "App\Test\Test" is abstract (should be defined by TestPass), did you forget to define it?`
   if argument was not replaced by compiler pass
   ```php
   ...
    public function process(ContainerBuilder $container)
    {
        $test = $container->getDefinition(Test::class);
        $test->setArgument('$a', 'test');
    }
   ...
   ```

Commits
-------

62fefaa59f [DI] added possibility to define services with abstract arguments
2020-02-06 14:42:43 +01:00
..
Configurator Merge branch '5.0' 2020-02-04 10:50:54 +01:00
schema/dic/services [DI] added possibility to define services with abstract arguments 2020-02-05 20:15:48 +01:00
ClosureLoader.php [Config] finish adding parameter types 2019-06-30 00:48:28 +02:00
DirectoryLoader.php [Config] finish adding parameter types 2019-06-30 00:48:28 +02:00
FileLoader.php Fix CS 2020-02-04 10:47:34 +01:00
GlobFileLoader.php [Config] finish adding parameter types 2019-06-30 00:48:28 +02:00
IniFileLoader.php Fix CS 2020-02-04 10:47:34 +01:00
PhpFileLoader.php Merge branch '4.4' into 5.0 2019-11-30 15:12:50 +01:00
XmlFileLoader.php [DI] added possibility to define services with abstract arguments 2020-02-05 20:15:48 +01:00
YamlFileLoader.php [DI] added possibility to define services with abstract arguments 2020-02-05 20:15:48 +01:00