Nicolas Grekas
c1cb43e2c2
Merge branch '4.4' into 5.1
...
* 4.4:
Add missing `@return` annotations to fix deprecations on PHP 8
[ProxyManagerBridge] fix PHP notice, switch to "friendsofphp/proxy-manager-lts"
2020-12-23 16:26:14 +01:00
Nicolas Grekas
3ffe5573e9
Add missing @return
annotations to fix deprecations on PHP 8
2020-12-23 16:11:26 +01:00
Alexander M. Turek
651bd12d75
Merge branch '4.4' into 5.1
...
* 4.4:
[Cache] Prevent notice on case matching metadata trick
[DI] The default index method wasn't used if the "index_by" attribute is missing
2020-12-10 14:41:20 +01:00
Fabien Potencier
2dd4561d3f
bug #39203 [DI] Fix not working if only "default_index_method" used (malteschlueter)
...
This PR was merged into the 4.4 branch.
Discussion
----------
[DI] Fix not working if only "default_index_method" used
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix #35349
| License | MIT
The default index method wasn't used if the "index_by" attribute is missing. The documentation is showing an example, see https://symfony.com/doc/current/service_container/tags.html#tagged-services-with-index .
This problem also appears in symfony 5.
I created two example projects, the first in the current behaviour and the second with my bugfix branch.
Current 4.4: https://github.com/malteschlueter/symfony-reproducers/blob/bugfix/dependency-injection-default-index-method-not-working--not-fixed/tests/HandlerCollectionTest.php
This bugfix branch: https://github.com/malteschlueter/symfony-reproducers/blob/bugfix/dependency-injection-default-index-method-not-working--with-fix/tests/HandlerCollectionTest.php
Commits
-------
eb25d5c275
[DI] The default index method wasn't used if the "index_by" attribute is missing
2020-12-10 08:05:48 +01:00
Nicolas Grekas
a8b992f8a2
Merge branch '4.4' into 5.1
...
* 4.4:
Update .php_cs.dist
Apply "visibility_required" CS rule to constants
2020-12-08 18:02:38 +01:00
Nicolas Grekas
ff22d30cb0
Apply "visibility_required" CS rule to constants
...
php-cs-fixer fix --rules='{"visibility_required": ["property", "method", "const"]}'
2020-12-08 17:59:59 +01:00
Malte Schlüter
eb25d5c275
[DI] The default index method wasn't used if the "index_by" attribute is missing
2020-12-08 17:11:59 +01:00
Alexander M. Turek
294cffea25
Merge branch '4.4' into 5.1
2020-10-28 22:31:18 +01:00
Alexander M. Turek
659decf594
Use short array deconstruction syntax.
2020-10-28 21:42:29 +01:00
Nicolas Grekas
abb463c749
[DI] fix definition and usage of AbstractArgument
2020-04-23 22:40:01 +02:00
Nicolas Grekas
daf1c6605e
Leverage PHP8's get_debug_type()
2020-03-16 17:46:21 +01:00
Fabien Potencier
1866a2a88c
Merge branch '5.0'
...
* 5.0:
Fix quotes in exception messages
Fix quotes in exception messages
Fix quotes in exception messages
Fix quotes in exception messages
Fix quotes in exception messages
2020-03-16 14:12:54 +01:00
Fabien Potencier
aab0e40cd2
Fix quotes in exception messages
2020-03-16 12:24:17 +01:00
Islam93
62fefaa59f
[DI] added possibility to define services with abstract arguments
2020-02-05 20:15:48 +01:00
Alexandru Năstase
f5bd421597
Add missing defaultPriorityMethod field in TaggedIteratorArgument
2019-11-23 11:53:09 +01:00
Grégoire Pineau
c1917c2999
[DependencyInjection] added Ability to define a priority method for tagged service
2019-10-02 17:30:24 +02:00
Nicolas Grekas
962dcfeed0
Add return types to internal & magic methods when possible
2019-08-22 15:18:41 +02:00
Nicolas Grekas
fc186bb78f
Add return types to tests and final|internal|private methods
2019-08-21 17:14:41 +02:00
Nicolas Grekas
b3467e641c
Merge branch '3.4' into 4.3
...
* 3.4:
Remove superfluous phpdoc tags
2019-08-14 14:26:46 +02:00
Philippe Segatori
608e23c09a
Remove superfluous phpdoc tags
2019-08-14 13:59:53 +02:00
Nicolas Grekas
52e827c9cf
[DI] default to service id - *not* FQCN - when building tagged locators
2019-05-11 18:47:04 +02:00
Fabien Potencier
546b1146c4
fixed CS
2019-04-08 07:16:00 +02:00
Christian Flothmann
44eb7a0485
fix backwards compatibility breaks
2019-04-07 23:31:58 +02:00
Przemysław Bogusz
35bf4203e8
[DI] Fix bad error message for unused bind under _defaults
2019-04-07 12:22:52 +02:00
Mateusz Sip
aaf5422cfb
[DI][Contracts] add and implement ServiceProviderInterface
2019-03-28 12:22:02 +01:00
Nicolas Grekas
cb3c56bc0c
Support indexing tagged locators by FQCN as fallback
2019-03-11 14:33:24 +01:00
Anthony MARTIN
250a2c8332
[DI] Allow tagged_locator tag to be used as an argument
...
Signed-off-by: Anthony MARTIN <anthony.martin@sensiolabs.com>
2019-03-11 14:33:24 +01:00
Anthony MARTIN
101bfd79bf
[DI] change name to tag + add XMl support + adding yaml/xml tests
2019-02-22 14:36:50 +01:00
François-Xavier de Guillebon
845d3a681b
Allow to choose an index for tagged collection
2019-02-22 11:27:55 +01:00
Fabien Potencier
c0323bd24b
Merge branch '4.1' into 4.2
...
* 4.1:
fixed tests
fixed CS
fixed CS
fixed CS
fixed short array CS in comments
fixed CS in ExpressionLanguage fixtures
fixed CS in generated files
fixed CS on generated container files
fixed CS on Form PHP templates
fixed CS on YAML fixtures
fixed fixtures
switched array() to []
2019-01-16 21:31:39 +01:00
Fabien Potencier
572864b223
Merge branch '3.4' into 4.1
...
* 3.4:
fixed CS
fixed short array CS in comments
fixed CS in ExpressionLanguage fixtures
fixed CS in generated files
fixed CS on generated container files
fixed CS on Form PHP templates
fixed CS on YAML fixtures
fixed fixtures
switched array() to []
2019-01-16 19:21:11 +01:00
Fabien Potencier
33a001e460
switched array() to []
2019-01-16 10:39:14 +01:00
Nicolas Grekas
13dc341d7f
feature #27806 [DI] Allow autoconfiguring bindings (nicolas-grekas)
...
This PR was merged into the 4.2-dev branch.
Discussion
----------
[DI] Allow autoconfiguring bindings
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
I've come up with a case where we will need to inject a different service based on which interfaces a consumer service implements: injecting a different token storage for monolog processor than for everything else. Required in #27801 .
Commits
-------
7c29977037
[DI] Allow autoconfiguring bindings
2018-08-08 10:30:15 +02:00
Nicolas Grekas
e81285249b
Merge branch '4.1'
...
* 4.1:
Fix Clidumper tests
Enable the fixer enforcing fully-qualified calls for compiler-optimized functions
Apply fixers
Disable the native_constant_invocation fixer until it can be scoped
Update the list of excluded files for the CS fixer
2018-07-26 10:59:12 +02:00
Nicolas Grekas
b9433001cb
Merge branch '3.4' into 4.0
...
* 3.4:
Fix Clidumper tests
Enable the fixer enforcing fully-qualified calls for compiler-optimized functions
Apply fixers
Disable the native_constant_invocation fixer until it can be scoped
Update the list of excluded files for the CS fixer
2018-07-26 10:51:09 +02:00
Nicolas Grekas
f5939a8336
Merge branch '2.8' into 3.4
...
* 2.8:
Fix Clidumper tests
Enable the fixer enforcing fully-qualified calls for compiler-optimized functions
Apply fixers
Disable the native_constant_invocation fixer until it can be scoped
Update the list of excluded files for the CS fixer
2018-07-26 10:45:46 +02:00
Nicolas Grekas
7c29977037
[DI] Allow autoconfiguring bindings
2018-07-11 10:40:03 +02:00
Nicolas Grekas
6c8e9576a3
[DI] Add ServiceLocatorArgument to generate array-based locators optimized for OPcache shared memory
2018-07-04 16:01:49 +02:00
Nicolas Grekas
aaf2265203
Replace more docblocks by type-hints
2017-11-07 15:45:01 +01:00
Roland Franssen
979e58f370
[DI] Reference tagged services in config
2017-09-28 16:10:08 +02:00
Guilhem Niot
81f2652371
[DependencyInjection] Support local binding
2017-08-09 11:26:25 +02:00
Nicolas Grekas
57daadbf67
[Di] Remove closure-proxy arguments
2017-06-01 22:59:07 +02:00
Nicolas Grekas
8783602946
[DI] Fix invalid callables dumped for ArgumentInterface objects
2017-04-29 20:26:39 +02:00
Nicolas Grekas
4d3dce1c0f
[DI] Fix inlining conflict by restricting IteratorArgument to Reference[]
2017-04-21 14:38:43 +02:00
Nicolas Grekas
8ff764be82
[DI] add ServiceLocatorTagPass::register() to share service locators
2017-04-01 13:57:21 +02:00
Nicolas Grekas
5d230b5871
[DI] Introduce "container.service_locator" tag, replaces ServiceLocatorArgument
2017-03-17 17:49:32 +01:00
Nicolas Grekas
1d9663326e
[DI] Allow creating ServiceLocator-based services in extensions
2017-03-05 14:36:05 +01:00
Robin Chalas
256b836482
[DI] Fix ServiceLocatorArgument::setValues() for non-reference values
2017-02-28 10:31:03 +01:00
Robin Chalas
46dc47af11
[DI] Remove experimental status from service-locator argument type
2017-02-26 11:25:49 +01:00
Robin Chalas
e7935c0adb
[DI] Replace container injection by explicit service locators
...
[SecurityBundle] Avoid container injection in FirewallMap
2017-02-13 11:05:06 +01:00