* 3.4:
[Yaml] Recommend using quotes instead of PARSE_KEYS_AS_STRINGS
[DependencyInjection] Deprecate autowiring service auto-registration
Removed useless argument $definition
[DI] Generate shorter method names for class-based ids
Fix comment
[Config] Fix checking class existence freshness
bumped Symfony version to 3.3.7
updated VERSION for 3.3.6
updated CHANGELOG for 3.3.6
Autoconfigure instances of ArgumentValueResolverInterface
Deprecate Filesystem/LockHandler
improve sql explain table display
Bump minimal PHP version to ^5.5.9|>=7.0.8
* 3.4:
[DI] use assertStringEqualsFile when possible
[VarDumper] Adapt to php 7.2 changes
[DI] Fix using private services in expressions
[Form][TwigBridge] Don't render _method in form_rest() for a child form
[Form] Static call TimezoneType::getTimezones
Removed references for non existent validator constraints
Suggest using quotes instead of Yaml::PARSE_KEYS_AS_STRINGS
[DI] Fix test
[Cache] Handle unserialization failures for Memcached
Remove unused prop + added @deprecated
Remove unused mocks/vars
feature #22317 [Console] Make SymfonyQuestionHelper::ask optional by default (ro0NL)
[DoctrineBridge][PropertyInfo] Added support for Doctrine Embeddables
[Validator] Fix IbanValidator for ukrainian IBANs
Router: allow HEAD method to be defined first
[WebProfilerBundle] Display trace and context in the logger profiler
Fixing a bug where if a core class was autowired, autowiring tried to autowire optional args as if they were required
* 3.4: (22 commits)
use Precise on Travis to keep PHP LDAP support
Fix case sensitive sameSite cookie
[PropertyInfo] Use rawurlencode to escape PSR-6 keys
fix(security): ensure the 'route' index is set before attempting to use it
Fix registering lazy command services with autoconfigure enabled
Fix the design of the profiler exceptions when there is no message
[Config] Minor fix
document the TwigRenderer class deprecation
[Security] added more tests
[Security] fixed default target path when referer contains a query string
[Security] simplified tests
[Security] refactored tests
[WebProfilerBundle][TwigBundle] Fix infinite js loop on exception pages
[FrameworkBundle] fix ValidatorCacheWarmer: use serializing ArrayAdapter
Change "this" to "that" to avoid confusion
[VarDumper] Move locale sniffing to dump() time
[VarDumper] Use "C" locale when using "comma" flags
[Config] Make ClassExistenceResource throw on invalid parents
[DebugBundle] Added min_depth to Configuration
[Console] Add a factory command loader for standalone application with lazy-loading needs
...
* 3.4: (83 commits)
add missing version attribute
Show exception is checked twice in ExceptionController of twig
allow SSI fragments configuration in XML files
Display a better error message when the toolbar cannot be displayed
[SecurityBundle] Add user impersonation info and exit action to the profiler
render hidden _method field in form_rest()
Add Doctrine Cache to dev dependencies to fix failing unit tests.
return fallback locales whenever possible
Fix Predis client cluster with pipeline
[Dotenv] Test load() with multiple paths
[Console] Fix catching exception type in QuestionHelper
Improved the exception page when there is no message
[WebProfilerBundle] Eliminate line wrap on count columnt (routing)
[Profiler][Validator] Add a validator panel in profiler
[Validator] replace hardcoded service id
[Routing] Fix XmlFileLoader exception message
Remove duplicate changelog entries
[DI] Dedup tags when using instanceof/autoconfigure
[Translation] Fix FileLoader::loadResource() php doc
[Serializer] Fix workaround min php version
...
* 3.4:
[FrameworkBundle] removed doctrine/cache as a dependency
drop hard dependency on the Stopwatch component
Fix the conditional definition of the SymfonyTestsListener
[DI] Fix keys resolution in ResolveParameterPlaceHoldersPass
[FrameworkBundle] Fix colliding service ids
[FrameworkBundle] deprecated validator.mapping.cache.doctrine.apc
remove now useless condition
Lazy load security listeners
[EventDispatcher] Remove dead code in WrappedListener
[Process] Deprecate ProcessBuilder
Fix non-dumped voters in security panel
search case insensitive
[VarDumper] Cyclic searching dumps
[Yaml] Remove line number in deprecation notices
[SecurityBundle] Made 2 service aliases private
Automatically enable the routing annotation loader
[FrameworkBundle] KernelTestCase: deprecate not using KERNEL_CLASS
* 3.4:
Fix optional cache warmers are always instantiated whereas they should be lazy-loaded
add some \ on PHP_VERSION_ID for 2.8
[Di] Remove closure-proxy arguments
[PropertyInfo][DoctrineBridge] The bigint Doctrine's type must be converted to string
* 3.4: (31 commits)
Using FQ name for PHP_VERSION_ID
[EventDispatcher] Handle laziness internally instead of relying on ClosureProxyArgument
Fix CacheCollectorPass priority
[Form] Fix \IntlDateFormatter timezone parameter usage to bypass PHP bug #66323
[Routing] Allow GET requests to be redirected. Fixes#23004
[DI] Deal with inlined non-shared services
[Cache] Ignore missing annotations.php
[DI] Autowiring exception thrown when inlined service is removed
Improving deprecation message when hitting the "deprecated type" lookup, but an alias is available
Harden the debugging of Twig filters and functions
Fixing a bug where an autowiring exception was thrown even when that service was removed
Remove extra arg in call to TraceableAdapter::start()
Support unknown compiler log format
[Config] Allow empty globs
Fix decorating TagAware adapters in dev
[Profiler] Fix clicking on links inside toggle
[Profiler] Fix text selection on exception pages
bumped Symfony version to 3.3.1
updated VERSION for 3.3.0
updated CHANGELOG for 3.3.0
...
This PR was squashed before being merged into the 3.3 branch (closes#22993).
Discussion
----------
[DI] Autowiring exception thrown when inlined service is removed
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | yes
| Deprecations? | yes (on a new & internal method)
| Tests pass? | yes
| Fixed tickets | #22977
| License | MIT
| Doc PR | n/a
We suppress autowiring exceptions if a service is ultimately removed from the container. This fixes a bug where we incorrectly report that a service was NOT removed, when really, it WAS removed. This happens when `ServiceA` is inlined in `ServiceB`... but then `ServiceB` is removed from the container for being unused.
Commits
-------
793b9a001f [DI] Autowiring exception thrown when inlined service is removed
The specific report was for a service with a private constructor. This also clarifies
that the AutowirePass throws AutowiringFailedException for all situations. And a bug
was fixed in the constructor of AutowiringFailedException
* 3.4:
[DI] prepare for signature change in 4.0
[DI] Add missing deprecation on Extension::getClassesToCompile
[Lock] Re-add the Lock component in 3.4
[Routing] remove an unused routing fixture
[Yaml] fix multiline block handling
[WebProfilerBundle] Fix sub-requests display in time profiler panel
[FrameworkBundle] Handle project dir in cache:clear command
[WebServerBundle] Mark ServerCommand as internal
[DI] Fix autowire error for inlined services
Close PHP code in phpt file
[Profiler][VarDumper] Fix searchbar css when in toolbar
Prevent auto-registration of UserPasswordEncoderCommand
[Process] Fixed incorrectly escaping arguments on Windows when inheritEnvironmentVariables is set to false
avoid double blanks while rendering form attributes
use getProjectDir() when possible
[PhpUnitBridge] add a changelog file
[FrameworkBundle][Validator] Deprecate passing validator instances/aliases over using the service locator
This PR was merged into the 3.3-dev branch.
Discussion
----------
[DI] Do not throw autowiring exceptions for a service that will be removed
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no (arguable)
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Hi guys!
tl;dr Do no throw a "Cannot autowire service id foo_bar" if that service (`foo_bar`) is private and is ultimately removed from the container.
I ran into a problem with the new PSR-4 service loader: our existing projects often contains directories with a mixture of services and model classes. In reality, that's not a problem: since the services are private, if any "extra" classes are registered as service, they're removed from the container because they're not referenced. In other words, the system is great: model classes do *not* become services naturally... because nobody tries to inject them as services.
However, if your model classes have constructor args... then things blow up on compilation. This fixes that: it delays autowiring errors until after `RemoveUnusedDefinitionsPass` runs and then does *not* throw those exceptions if the service is gone.
Cheers!
Commits
-------
f4913feaa8 Fixing a bug where services that were eventually removed could cause autowire errors
Now that inherit_tags has been removed, 3.3 has the same functionality as 3.2: tags
are *never* cascaded from parent to child (but you tags do inherit from defaults
to a service and instanceof to a service).
Also, not allowing arguments or method calls for autoconfigure. This is a safety
mechanism, since we don't have merging logic. It will allow us to add this in the
future if we want to.
The reason is that parent-child definitions are a different mechanism for "inheritance"
than instanceofConditionas and defaults... creating some edge cases when trying to
figure out which settings "win". For example:
Suppose a child and parent definitions are defined in different YAML files. The
child receives public: false from its _defaults, and the parent receives public: true
from its _defaults. Should the final child definition be public: true (so the parent
overrides the child, even though it only came from _defaults) or public: false (where
the child wins... even though it was only set from its _defaults). Or, if the parent
is explicitly set to public: true, should that override the public: false of the
child (which it got from its _defaults)? On one hand, the parent is being explicitly
set. On the other hand, the child is explicitly in a file settings _defaults public
to false. There's no correct answer.
There are also problems with instanceof. The importance goes:
defaults < instanceof < service definition
But how does parent-child relationships fit into that? If a child has public: false
from an _instanceof, but the parent explicitly sets public: true, which wins? Should
we assume the parent definition wins because it's explicitly set? Or would the
_instanceof win, because that's being explicitly applied to the child definition's
class by an _instanceof that lives in the same file as that class (whereas the parent
definition may live in a different file).
Because of this, @nicolas-grekas and I (we also talked a bit to Fabien) decided that
the complexity was growing too much. The solution is to not allow any of these
new feature to be used by ChildDefinition objects. In other words, when you want some
sort of "inheritance" for your service, you should *either* giving your service a
parent *or* using defaults and instanceof. And instead of silently not applying
defaults and instanceof to child definitions, I think it's better to scream that it's
not supported.
This PR was merged into the 3.3-dev branch.
Discussion
----------
[DI] Allow service subscribers to leverage autowiring to know where their locator should be injected
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
e407b3d42e [DI] Allow service subscribers to leverage autowiring to know where the locator should be injected
This PR was squashed before being merged into the 3.3-dev branch (closes#22234).
Discussion
----------
[DI] Introducing autoconfigure: automatic _instanceof configuration
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes (mostly, a continuation of a new feature)
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/issues/7538
This is a proposal to allow the user to opt into some automatic `_instanceof` config. Suppose I want to auto-tag all of my voters and event subscribers
```yml
# current
services:
_defaults:
autowire: true
_instanceof:
Symfony\Component\Security\Core\Authorization\Voter\VoterInterface:
tags: [security.voter]
Symfony\Component\EventDispatcher\EventSubscriberInterface:
tags: [kernel.event_subscriber]
# services using the above tags
AppBundle\Security\PostVoter: ~
AppBundle\EventListener\CheckRequirementsSubscriber: ~
```
If I'm registering a service with a class that implements `VoterInterface`, when would I ever *not* want that to be tagged with `security.voter`? Here's the proposed code:
```yml
# proposed
services:
_defaults:
autowire: true
autoconfigure: true
# services using the auto_configure_instanceof functionality
AppBundle\Security\PostVoter: ~
AppBundle\EventListener\CheckRequirementsSubscriber: ~
```
The user must opt into this and it only applies locally to this configuration file. It works because each enabled bundle would have the opportunity to add one or more "automatic instanceof" definitions - e.g. SecurityBundle would add the `security.voter` instanceof config, FrameworkBundle would add the `kernel.event_subscriber` instanceof config, etc.
For another example, you can check out the proposed changes to `symfony-demo` - symfony/symfony-demo#483 - the `_instanceof` section is pretty heavy: 81694ac21e/app/config/services.yml (L20)
Thanks!
Commits
-------
18627bf9f6 [DI] Introducing autoconfigure: automatic _instanceof configuration
This PR was squashed before being merged into the 3.3-dev branch (closes#22420).
Discussion
----------
[DI] Make tagged abstract services throw earlier
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
As spotted by @stof in https://github.com/symfony/symfony/pull/22388#issuecomment-293565243, skipping abstract tagged services removes an opportunity to report config mistakes to users.
Instead of skipping them, let's throw as done before (thus reverting #22039, ping @chalasr).
I made `$container->findTaggedServiceIds()` accept a 2nd arg to make this more systematic.
To keep the possibility to have abstract tagged services *for the purpose of tag inheritance*, `ResolveTagsInheritancePass` now resets their tags.
Commits
-------
388e4b3389 [DI] Make tagged abstract services throw earlier
cd06c1297b Revert "minor #22039 Skip abstract definitions in compiler passes (chalasr)"
This PR was merged into the 3.3-dev branch.
Discussion
----------
Enhancing integration test to show that "override" tags show up first
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | not needed
Relates a bit to #22396, in that I'm clarifying and emphasizing the following types of situations:
```yml
services:
_instanceof:
Symfony\Component\Security\Core\Authorization\Voter\VoterInterface:
tags:
# you probably shouldn't set priority here, but let's pretend we did
- { name: security.voter, priority: 100 }
AppBundle\Security\CoolPersonVoter:
tags:
- { name: security.voter, priority: 50 }
```
In the final `Definition`, the tags will appear in this order:
* security.voter, priority 50
* security.voter, priority 100
It works the same for parent-child definitions.
tl;dr; If a service has the same tag multiple times, the one that should be used should appear *earlier* in the Definition. The code already works that way - this test emphasizes it.
Commits
-------
e9b96e5 Enhancing integration test to show that "override" tags always show up first
* 3.2:
Allow terminal dimensions to be set to 0 (unbounded)
[Cache] Remove exception false-positive from FilesystemAdapterTrait
fix risky tests
fix risky tests
[Yaml] release memory after parsing
[HttpFoundation] Fix and test status codes according to IANA's data
Add `use_strict_mode` in validOptions for session
[Console] Inherit phpdoc from OutputFormatterInterface
* 2.8:
fix risky tests
[Yaml] release memory after parsing
[HttpFoundation] Fix and test status codes according to IANA's data
Add `use_strict_mode` in validOptions for session
[Console] Inherit phpdoc from OutputFormatterInterface
This PR was merged into the 3.3-dev branch.
Discussion
----------
[DI] Rework config hierarchy: defaults > instanceof > service config
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Replaces #22294.
The main change is that ChildDefinition does not have "instanceof" applied anymore. All the complexity of the pass came from the merging logic required to deal with them. But in fact, we'd better not have any such logic and just not apply "instanceof" to ChildDefinition (but have them inherit from their parents with the usual logic).
Commits
-------
6d6116b920 Adding an integration test for the hirarchy of defaults, instanceof, child, parent definitions
ab86457b12 [DI] Rework config hierarchy: defaults > instanceof > service config
cbaee55223 [DI] Track changes at the "Definition" level
This PR was merged into the 3.3-dev branch.
Discussion
----------
[DI] Populate class of ChildDefinition when its id matches an existing FQCN
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | no
| New feature? | no
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #22345
| License | MIT
| Doc PR | -
See linked issue for expected DX.
Instead of doing a "continue", let's throw to force the resolution of any ambiguities.
There is a minor potential BC Break, if one uses an ambiguous FQCN as child-definition id in 3.2 or below.
To me, this should be rare, and easy to fix (compile time only).
The DX enhancement this PR provides looks worth it.
> Service definition "App\Foo\Child" has a parent but no class, and its name looks like a FQCN. Either the class is missing or you want to inherit it from the parent service. To resolve this ambiguity, please rename this service to a non-FQCN (e.g. using dots), or create the missing class.
Commits
-------
3200d3738a [DI] Populate class of ChildDefinition when its id matches an existing FQCN
This PR was merged into the 3.3-dev branch.
Discussion
----------
[DI] Fix named args overridding
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #22196
| License | MIT
| Doc PR | -
(The exception check in ResolveDefinitionTemplatesPass is not done in ResolveNamedArgumentsPass.)
Commits
-------
0c030d92f9 [DI] Fix named args overridding
* 3.2:
move provider after test
update dataProvider function name
cast substr result to string and remove empty function use
rename dataset provider
Add a test to prevent future regressions
Switch to `empty` native function to check emptiness
remove non relevant test case
Switch to `is_string` native method
Remove unnecessary parentheses
Add a test case to prevent future regressions
Move empty condition in return statement
Use LF line separator
fix coding standard to comply with fabbot
Remove malformed EmailValidatorTest + Update UrlValidator test
Add empty check on host in other methods + add unit tests
[Validator] Allow checkMX() to return false when $host is empty
[DI] Prevent AutowirePass from triggering irrelevant deprecations
[DI] Fix the xml schema
[Translation] avoid creating cache files for fallback locales.
* 2.8:
move provider after test
update dataProvider function name
cast substr result to string and remove empty function use
rename dataset provider
Add a test to prevent future regressions
Switch to `empty` native function to check emptiness
remove non relevant test case
Switch to `is_string` native method
Remove unnecessary parentheses
Add a test case to prevent future regressions
Move empty condition in return statement
Use LF line separator
fix coding standard to comply with fabbot
Remove malformed EmailValidatorTest + Update UrlValidator test
Add empty check on host in other methods + add unit tests
[Validator] Allow checkMX() to return false when $host is empty
[DI] Prevent AutowirePass from triggering irrelevant deprecations
[DI] Fix the xml schema
[Translation] avoid creating cache files for fallback locales.
* 3.2:
[DI] Autowiring and factories are incompatible with each others
[DI] Don't use auto-registered services to populate type-candidates
Lighten tests output by removing composer suggestions
support nullable array or collection
Complete the injection of the expression in all syntax errors
CS: Remove invisible chars
Disable resource tracking if the config component is missing
[EventDispatcher] Remove unneded count()
Fix tests expecting a valid date
Avoid forcing to define the choices_as_values option when using choice_loader
add expression text to SyntaxError
[Console] Fix table cell styling
[Console] Revised exception rendering
Fix @param in PHPDoc
[WebProfilerBundle] Normalize whitespace in exceptions passed in headers
Disable color support detection for tests
[Form] Improve the exceptions when trying to get the data in a PRE_SET_DATA listener and the data has not already been set
* 2.8:
[DI] Autowiring and factories are incompatible with each others
[DI] Don't use auto-registered services to populate type-candidates
Lighten tests output by removing composer suggestions
support nullable array or collection
Complete the injection of the expression in all syntax errors
CS: Remove invisible chars
Disable resource tracking if the config component is missing
[EventDispatcher] Remove unneded count()
Fix tests expecting a valid date
Avoid forcing to define the choices_as_values option when using choice_loader
add expression text to SyntaxError
[Console] Fix table cell styling
[Console] Revised exception rendering
[WebProfilerBundle] Normalize whitespace in exceptions passed in headers
Disable color support detection for tests
[Form] Improve the exceptions when trying to get the data in a PRE_SET_DATA listener and the data has not already been set
This PR was merged into the 2.8 branch.
Discussion
----------
[DI] Autowiring and factories are incompatible with each others
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
9b601633a7 [DI] Autowiring and factories are incompatible with each others
This PR was merged into the 3.3-dev branch.
Discussion
----------
[DI] Add "by-id" autowiring: a side-effect free variant of it based on the class<>id convention
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This PR adds a new autowiring mode, based only on the class <> id convention.
This way of autowiring is free from any conflicting behavior, which is what I was looking for to begin with.
The expected DX is a bit more involving than the current way we do autowiring. But it's worth it to me, because it's plain predictable - a lot less "magic" imho.
So in this mode, for each `App\Foo` type hint, a reference to an "App\Foo" service will be created. If no such service exists, an exception will be thrown. To me, this opens a nice DX: when type hinting interfaces (which is the best practice), this will tell you when you need to create the explicit interface <> id mapping that is missing - thus encourage things to be made explicit, but only when required, and gradually, in a way that will favor discoverability by devs.
Of course, this is opt-in, and BC. You'd need to do eg in yaml: `autowire: by_id`.
For consistency, the current mode (`autowire: true`) can be configured using `autowire: by_type`.
Commits
-------
c298f2a90c [DI] Add "by-id" autowiring: a side-effect free variant of it based on the class<>id convention
* 3.2:
Fixes a typo in the form collector styles
[WebProfilerBundle] Fix content-security-policy compatibility
[WebProfilerBundle] Drop dead code
[HttpKernel] Fixed bug with purging of HTTPS URLs
fix some risky tests
[DI] [YamlFileLoader] change error message of a non existing file
[WebProfilerBundle] Handle Content-Security-Policy-Report-Only header correctly
[Security] Added option to return true in the method isRememberMeRequested
* 2.8:
Fixes a typo in the form collector styles
[HttpKernel] Fixed bug with purging of HTTPS URLs
fix some risky tests
[DI] [YamlFileLoader] change error message of a non existing file
[Security] Added option to return true in the method isRememberMeRequested
* 2.7:
[HttpKernel] Fixed bug with purging of HTTPS URLs
fix some risky tests
[DI] [YamlFileLoader] change error message of a non existing file
[Security] Added option to return true in the method isRememberMeRequested
This PR was squashed before being merged into the 3.3-dev branch (closes#21763).
Discussion
----------
[DI] Replace wildcard-based methods autowiring by `@required` annotation
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no (affects things that are only on master)
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
While playing a bit with new features in master around DI configuration, several people around me got bitten by wildcard-based autowiring. The typical example is adding `autowire: [set*]` in `_defaults`: use that on `resource: ../src/Command/` PSR4-based loading and boom, `setApplication` and `setHelperSet` will now be wrongly called. You could tell me "of course, don't to that" - but being bitten so early on a master-only feature makes me really unconfident that this will be easy enough for people after the release.
If wildcard-based autowiring is removed, then I don't see anymore the need for allowing arrays as in `autowire: [setFoo,getBar]`. Moreover, this array syntax has a core DX issue: it's a dead end as far as the learning curve is concerned. You learn it, then when becoming a more advanced dev, someone teaches you that you'd better use another syntax: explicit wiring.
And in fact, we don't need it at all, because something else already exists: just declare a method call, but don't define its arguments. If `autowire: true` is set, then the AutowiringPass already fills in the holes. There is only one tweak required to make this work: don't autowire optional arguments for method calls - or that'd be a BC break. To my PoV that's even better: this makes autowiring fit a "do the minimum to make it work" strategy. A really good one to me.
But there is still an issue: wildcard-based autowiring fits a need. Namely, it allows one to define a convention (eg. `'set*'`), and have all such methods that follow the convention be autowired. To me, this looks like doing it reverse (the DI config should adapt to the code, not reverse). So, to fill this need, let the declaration be in the source: just use an annotation!
This PR adds support for the `@required` annotation, borrowed from the Spring framework:
https://www.tutorialspoint.com/spring/spring_required_annotation.htm
Using the annotation is totally optional of course. If you do, *and if autowiring is on*, then it'll be autowired. If you don't, nothing changes: do manual wiring.
Even when not using autowiring, the annotation is still a nice hint for the consumer of your classes: it tells the reader that this method needs to be called for correct instantiation - thus lowering one drawback of setter injection (discoverability).
The implementation of the annotation parsing is done using a few regexp (no dep on any complex parser) - and works with inheritance, by leveraging the `@inheritdoc` tag (the default behavior being to *not* inherit anything from parent methods).
All in all, looking at the diff stats, it makes everything simpler. Good sign, isn't it?
Commits
-------
f286fcc25f [DI] Replace wildcard-based methods autowiring by `@required` annotation
9081699980 Revert "minor #21315 [DI][FrameworkBundle] Show autowired methods in descriptors (ogizanagi)"
This PR was merged into the 3.3-dev branch.
Discussion
----------
[DI] Always consider abstract getters as autowiring candidates
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes (a missing part of getter autowiring really)
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
When a definition is set to be autowired with no method explicitly configured, we already wire the constructor.
We should also autowire abstract getters - with the same reasoning that makes us autowire the constructor: without concrete getters, the class is unusable. This just makes it usable again.
Commits
-------
8f246bde1d [DI] Always consider abstract getters as autowiring candidates
This PR was squashed before being merged into the 2.8 branch (closes#21663).
Discussion
----------
Updated PHPUnit namespaces
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Follow Up of #21564
Commits
-------
205ced4 Updated PHPUnit namespaces
* 3.2:
[DependencyInjection] Fix using autowiring types when there are more than 2 services
[DependencyInjection] Fix autowiring collisions detection
[DI] Bug in autowiring collisions detection
* 2.8:
[DependencyInjection] Fix using autowiring types when there are more than 2 services
[DependencyInjection] Fix autowiring collisions detection
[DI] Bug in autowiring collisions detection
This PR was merged into the 2.8 branch.
Discussion
----------
[DependencyInjection] Fix autowiring types when there are more than 2 services colliding
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
There is a bug in the `AutowirePass`, when using more than 2 services colliding and you want to use the autowiring types: it may not work depending on their order because `notGuessableTypes` is not reset.
Commits
-------
5981278537 [DependencyInjection] Fix using autowiring types when there are more than 2 services
This PR was merged into the 2.8 branch.
Discussion
----------
[DependencyInjection] Fix autowiring collisions detection
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR |
Fixes https://github.com/symfony/symfony/pull/21658 by implementing the second proposal of https://github.com/symfony/symfony/pull/21658#issuecomment-280858452:
> Another idea: store the types used previously and check that new services registered don't implement them.
Commits
-------
bb70472dce [DependencyInjection] Fix autowiring collisions detection
6f578ee514 [DI] Bug in autowiring collisions detection
* 3.2:
Fix typo in process error message
Update to PHPUnit namespaces
Minor typo fix messsagesData -> messagesData
remove translation data collector when not usable
* 3.2:
Permit empty suffix on Windows
fixed CS
[FrameworkBundle] Remove unused import
[Console][Table] fixed render when using multiple rowspans.
add docblocks for Twig url and path function to improve ide completion
check for circular refs caused by method calls
[Serializer] fix upper camel case conversion (see #21399)
[DI] Auto register extension configuration classes as a resource
[Console] Updated phpdoc on return types
* 2.8:
Permit empty suffix on Windows
[Console][Table] fixed render when using multiple rowspans.
add docblocks for Twig url and path function to improve ide completion
check for circular refs caused by method calls
[Serializer] fix upper camel case conversion (see #21399)
[DI] Auto register extension configuration classes as a resource
[Console] Updated phpdoc on return types
* 2.7:
Permit empty suffix on Windows
[Console][Table] fixed render when using multiple rowspans.
add docblocks for Twig url and path function to improve ide completion
check for circular refs caused by method calls
[Serializer] fix upper camel case conversion (see #21399)
[DI] Auto register extension configuration classes as a resource
[Console] Updated phpdoc on return types
This PR was merged into the 2.7 branch.
Discussion
----------
[DependencyInjection] check for circular refs caused by method calls
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19362
| License | MIT
| Doc PR |
Before we check for circular references, dependencies coming from method calls are not part of the dependency graph. That why the pass is not able to detect circular references like the one described in #19362 during compilation of the container.
If we add another check after all the optimisation passes have been processed, we should be able to detect these circular references too.
Commits
-------
fe4f7eccf7 check for circular refs caused by method calls
* 3.2: (27 commits)
Improve tracking of environment variables in the case of private services
[DI] Align AutowirePass with 2.8
property constraints can be added in child classes
added test for staticClassLoader in LazyLoadingMetadatafactory
fixed PHPUnit setUp and tearDown method visibility
spelling fixes
Readd Symfony version status in the toolbar
[Security] LdapUserProvider should not throw an exception if the UID key does not exist in an LDAP entry
make sure that null can be the invalid value
[VarDumper] Improve dump of AMQP* Object
Fix annotations cache folder path
[FrameworkBundle] Wire ArrayCache for annotation reader at bootstrap
Ignore missing 'debug.file_link_formatter' service in Debug bundle
[VarDumper] Fixed dumping of terminated generator
bumped Symfony version to 3.2.4
updated VERSION for 3.2.3
updated CHANGELOG for 3.2.3
bumped Symfony version to 2.8.18
updated VERSION for 2.8.17
updated CHANGELOG for 2.8.17
...
This PR was merged into the 3.3-dev branch.
Discussion
----------
[DI] Add getter injection
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20657
| License | MIT
| Doc PR | symfony/symfony-docs#7300
Getter overriding by the container will allow a new kind of dependency injection which enables easier laziness and more immutable classes, by not requiring any corresponding setter. See linked issue for more.
This is WIP:
- [x] wire the concept
- [x] dump anonymous classes with PhpDumper
- [x] generate at runtime in ContainerBuilder::createService
- [x] tests
- [x] make it work on PHP 5
Commits
-------
cb498580d1 [DI] Add getter injection
* 3.2:
fixed typo
fixed composer.json
[HttpKernel] Fix Bundle name regression
always check for all fields to be mapped
clarify exception when no args are configured
[PropertyAccess] Handle interfaces in the invalid argument exception
[DI] Fix defaults overriding empty strings in AutowirePass
[Debug] Workaround "null" $context
[Debug] Remove $context arg from handleError(), preparing for PHP 7.2
[FrameworkBundle] Dont wire "annotations.cached_reader" before removing passes
[Routing] Fix BC break in AnnotationClassLoader defaults attributes handling
Fix tests with ICU 57.1
Fix the condition checking the minimum ICU version
* 3.1:
fixed typo
fixed composer.json
always check for all fields to be mapped
clarify exception when no args are configured
[PropertyAccess] Handle interfaces in the invalid argument exception
[DI] Fix defaults overriding empty strings in AutowirePass
[Debug] Workaround "null" $context
[Debug] Remove $context arg from handleError(), preparing for PHP 7.2
[Routing] Fix BC break in AnnotationClassLoader defaults attributes handling
Fix tests with ICU 57.1
Fix the condition checking the minimum ICU version
* 2.8:
always check for all fields to be mapped
clarify exception when no args are configured
[PropertyAccess] Handle interfaces in the invalid argument exception
[DI] Fix defaults overriding empty strings in AutowirePass
[Debug] Workaround "null" $context
[Debug] Remove $context arg from handleError(), preparing for PHP 7.2
[Routing] Fix BC break in AnnotationClassLoader defaults attributes handling
Fix tests with ICU 57.1
Fix the condition checking the minimum ICU version
* 3.2:
[DI] Add missing legacy group on testLegacy
Minor tweaks
Fix merge
[DI] Dont share service when no id provided
Fix Container and PhpDumper test inaccuracies
[DI] Fix missing new line after private alias
[ClassLoader] Throw an exception if the cache is not writeable
Fixing regression in TwigEngine exception handling.
* 3.1:
Fix merge
[DI] Dont share service when no id provided
Fix Container and PhpDumper test inaccuracies
[DI] Fix missing new line after private alias
[ClassLoader] Throw an exception if the cache is not writeable
Fixing regression in TwigEngine exception handling.
* 2.8:
Fix merge
[DI] Dont share service when no id provided
Fix Container and PhpDumper test inaccuracies
[DI] Fix missing new line after private alias
[ClassLoader] Throw an exception if the cache is not writeable
Fixing regression in TwigEngine exception handling.
* 2.7:
[DI] Dont share service when no id provided
Fix Container and PhpDumper test inaccuracies
[DI] Fix missing new line after private alias
[ClassLoader] Throw an exception if the cache is not writeable
Fixing regression in TwigEngine exception handling.
This PR was merged into the 3.3-dev branch.
Discussion
----------
[DependencyInjection] Implement lazy collection type using generators
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | -
| Fixed tickets | #20875
| License | MIT
| Doc PR | -
Following the RFC https://github.com/symfony/symfony/issues/20875, this PR aims to implement lazy services collections using generators internally.
For now, I suggest to support only XML and PHP definitions. Supporting YAML means adding another convention to the language and this is not the aim of this PR.
- [x] value object holding the semantic (IteratorArgument)
- [x] iterator dumping
- [x] lazyness awareness in CheckCircularReferencesPass & GraphvizDumper
- [x] rewindable iterators
- [x] `*_ON_INVALID_REFERENCE` behavior
- [x] ContainerBuilder::createService
- [x] ArgumentInterface handling in compiler passes
Commits
-------
1dbf52ad03 [DI] Add "=iterator" arguments to Yaml loader
5313943692 [DependencyInjection] Implement lazy collection type using generators
* 3.1:
fixed obsolete getMock() usage
fixed obsolete getMock() usage
fixed obsolete getMock() usage
[WebProfilerBundle] Display multiple HTTP headers in WDT
do not remove the Twig ExceptionController service
removed obsolete condition
do not try to register incomplete definitions
* 2.8:
fixed obsolete getMock() usage
fixed obsolete getMock() usage
[WebProfilerBundle] Display multiple HTTP headers in WDT
do not remove the Twig ExceptionController service
removed obsolete condition
do not try to register incomplete definitions
The DefinitionDecorator class does not deal with decorated services. It
reflects a parent-child-relationship between definitions instead. To
avoid confusion, this commit deprecates the existing DefinitionDecorator
class and introduces a new ChildDefinition class as replacement.
* 3.1:
Fix edge case with StreamedResponse where headers are sent twice
removed usage of Twig_Compiler::addIndentation
A decorated service should not keep the autowiring types
merge tags instead of completely replacing them
* 2.8:
Fix edge case with StreamedResponse where headers are sent twice
removed usage of Twig_Compiler::addIndentation
A decorated service should not keep the autowiring types
merge tags instead of completely replacing them
* 2.7:
Fix edge case with StreamedResponse where headers are sent twice
removed usage of Twig_Compiler::addIndentation
merge tags instead of completely replacing them
* 3.1:
[TwigBridge] removed deprecations added in Twig 1.27
PHP CS Fixer: use php_unit_dedicate_assert
3.0 Upgrade Guide: Added details describing how to pass data to a form through the options resolver
fixed Filesystem:makePathRelative and added 2 more testcases
no 304 response if method is not cacheable
move tags from decorated to decorating service
* 2.8:
[TwigBridge] removed deprecations added in Twig 1.27
PHP CS Fixer: use php_unit_dedicate_assert
3.0 Upgrade Guide: Added details describing how to pass data to a form through the options resolver
fixed Filesystem:makePathRelative and added 2 more testcases
no 304 response if method is not cacheable
move tags from decorated to decorating service
* 2.7:
[TwigBridge] removed deprecations added in Twig 1.27
PHP CS Fixer: use php_unit_dedicate_assert
fixed Filesystem:makePathRelative and added 2 more testcases
no 304 response if method is not cacheable
move tags from decorated to decorating service
This PR was merged into the 3.2-dev branch.
Discussion
----------
[DependencyInjection] Automatically detect the definitions class when possible
| Q | A
| ------------- | ---
| Branch? | "master"
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/19161
| License | MIT
| Doc PR |
> Thanks to the features of php 7.0 we can now guess the class of a service created with a factory:
> ```php
> function myFactory(): MyServiceClass
> {
> }
> ```
>
> So I propose to create a new pass to automatically update the services definition when possible. This is particularly useful for autowiring (this way you don't have to copy-paste the class name of the service, especially when this is from a third party library).
>
> What do you think ?
Commits
-------
63afe3c [DependencyInjection] Automatically detect the definitions class when possible
* 3.1:
[travis] Use 7.0 until 7.1 is fixed
[DIC] Fix service autowiring inheritance
[Serializer] Fix denormalization of arrays
[SecurityBundle] Add missing deprecation notice for form_login.intention
Verify explicitly that the request IP is a valid IPv4 address
[WebProfilerBundle] replaces tabs characters by spaces.
* 2.8:
[travis] Use 7.0 until 7.1 is fixed
[DIC] Fix service autowiring inheritance
[SecurityBundle] Add missing deprecation notice for form_login.intention
Verify explicitly that the request IP is a valid IPv4 address
* 2.8:
Relax 1 test failing with latest PHP versions
bumped Symfony version to 2.8.10
Remove usage of __CLASS__ outside of a class
[HttpKernel] Fix variable conflicting name
[Process] Fix double-fread() when reading unix pipes
[Process] Fix AbstractPipes::write() for a situation seen on HHVM (at least)
[Validator] Fix dockblock typehint in XmlFileLoader
bumped Symfony version to 2.8.10
updated VERSION for 2.8.9
updated CHANGELOG for 2.8.9
bumped Symfony version to 2.7.17
updated VERSION for 2.7.16
update CONTRIBUTORS for 2.7.16
updated CHANGELOG for 2.7.16
Minor fixes
[Console] Overcomplete argument exception message tweak.
fixed bad auto merge
Console table cleanup
undefined offset fix (#19406)
[EventDispatcher] Removed unused variable
Conflicts:
CHANGELOG-2.7.md
CHANGELOG-3.0.md
src/Symfony/Bridge/Swiftmailer/DataCollector/MessageDataCollector.php
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php
src/Symfony/Component/Console/Tests/Helper/LegacyDialogHelperTest.php
src/Symfony/Component/Console/Tests/Helper/TableTest.php
src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/legacy-container9.php
src/Symfony/Component/EventDispatcher/Tests/AbstractEventDispatcherTest.php
src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/LegacyPdoSessionHandlerTest.php
src/Symfony/Component/HttpKernel/Kernel.php
* 3.1:
fixed CS
fixed CS
fixed CS
fixed CS
tweaked default CS fixer config
[HttpKernel] Dont close the output stream in debug
move HttpKernel component to require section
Fixed oci and sqlsrv merge queries when emulation is disabled - fixes#17284
[Session] fix PDO transaction aborted under PostgreSQL
[Console] Use InputInterface inherited doc as possible
Mention generating absolute urls in UPGRADE files and CHANGELOG
parse embedded mappings only if value is a string
add docblock type elements to support newly added IteratorAggregate::getIterator PhpStorm support
FormBuilderInterface: fix getForm() return type.
[YAML] Fixed parsing problem with nested DateTime lists
Fixed typo in PHPDoc
This PR was squashed before being merged into the 3.2-dev branch (closes#18482).
Discussion
----------
Created a trait to sort tagged services
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
When writing the `ControllerArgumentValueResolverPass`, I needed a sorting on `priority`. I ended up copying a method from another class. I noticed this was done more often and 99% of the code was the same. I've moved the most common notation into the trait and "used" the trait in the priority aware passes. This increases horizontal re-use and means people can also use this in their bundles.
The cases that were slightly different, are still working completely. I had to fix some tests because they returned an invalid value from the mocked find method.
Commits
-------
778a70b Created a trait to sort tagged services
* 2.8:
[Yaml] fix exception contexts
People - person singularization
[Yaml] properly handle unindented collections
[Serializer] Add test for ignored attributes during denormalization
chomp newlines only at the end of YAML documents
Fixed server status command when port has been omitted
Update UPGRADE FROM 2.x to 3.0
fix removed commands wording in upgrade file
Catch \Throwable
Catch \Throwable
Use levenshtein level for better Bundle matching
[WebProfilerBundle] Fix CORS ajax security issues
[DX][DI] Make Autowiring exceptions more future friendly
* 3.0: (31 commits)
Drop hirak/prestissimo
[MonologBridge] Uninstallable together with symfony/http-kernel in 3.0.6
bumped Symfony version to 3.0.7
updated VERSION for 3.0.6
updated CHANGELOG for 3.0.6
bumped Symfony version to 2.8.7
updated VERSION for 2.8.6
updated CHANGELOG for 2.8.6
bumped Symfony version to 2.7.14
updated VERSION for 2.7.13
updated CHANGELOG for 2.7.13
bumped Symfony version to 2.3.42
[Debug] Fix fatal error handlers on PHP 7
updated VERSION for 2.3.41
update CONTRIBUTORS for 2.3.41
updated CHANGELOG for 2.3.41
fixed bad merge
Fixed issue with blank password with Ldap
limited the maximum length of a submitted username
[2.3][Component/Security] Fixed phpdoc in AnonymousToken constructor for user param
...
Conflicts:
src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php
src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowirePassTest.php
src/Symfony/Component/HttpKernel/Kernel.php
* 2.8:
[EventDispatcher] check for method to exist
[DependencyInjection] Fixed the priority of service decoration on service with parent
Make failed autowiring error messages more explicit
This PR was merged into the 2.8 branch.
Discussion
----------
[DX][DI] Make failed autowiring error messages more explicit
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | no (better DX integration)
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18658
| License | MIT
| Doc PR | N/A
This is the PR improving the auto wiring error messages.
Two errors messages have augmented:
If a type-hint does not match any existing type and a service for this type cannot be automatically created, the error message now says so, instead of simply saying the type cannot be autowired.
If a type-hint matches multiple services and none of them provides an autowiringType for it, the error message now says so and list the candidate services, instead of simply saying the type cannot be autowired.
Commits
-------
2ac81f9 Make failed autowiring error messages more explicit
* 3.0:
use stable 1.0.x Composer versions
Fix typo in VarDumper README
[DI] Fix AutowirePass fatal error with classes that have non-existing parents
[DependencyInjection] Tests for AutowirePass with missing parent class
[WebProfilerBunde] Give an absolute url in case the request occured from another domain
Conflicts:
src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php
src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowirePassTest.php
* 2.8:
use stable 1.0.x Composer versions
Fix typo in VarDumper README
[DI] Fix AutowirePass fatal error with classes that have non-existing parents
[DependencyInjection] Tests for AutowirePass with missing parent class
[WebProfilerBunde] Give an absolute url in case the request occured from another domain
This PR was squashed before being merged into the 3.1-dev branch (closes#18144).
Discussion
----------
[DI] Only rebuild autowiring cache when actually needed
| Q | A
| ------------- | ---
| Branch | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
| Doc PR | n/a
With autowiring, the container is currently rebuilt when an autowired class is modified in any way. That makes it unusable for large systems. However, this doesn't need to be true: we only need to rebuild the cache if a construct argument changes. This adds that change, and it's quite simple
This idea can/should also be adapted easily to the `@Route` cache (I don't believe it has something "smart" like this).
Thanks!
Commits
-------
3e97626 [DI] Only rebuild autowiring cache when actually needed
* 3.0:
[Process] Fix stream_select priority when writing to stdin
bumped Symfony version to 3.0.5
updated VERSION for 3.0.4
updated CHANGELOG for 3.0.4
[Form] NumberToLocalizedStringTransformer should return floats when possible
[Form] remove useless code in ChoiceType
[DependencyInjection] Enabled alias for service_container
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
src/Symfony/Component/Process/Pipes/AbstractPipes.php
* 2.8:
[Process] Fix stream_select priority when writing to stdin
[Form] NumberToLocalizedStringTransformer should return floats when possible
[Form] remove useless code in ChoiceType
[DependencyInjection] Enabled alias for service_container
Conflicts:
src/Symfony/Component/DependencyInjection/Tests/Compiler/ReplaceAliasByActualDefinitionPassTest.php
src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php
* 2.7:
[Process] Fix stream_select priority when writing to stdin
[Form] NumberToLocalizedStringTransformer should return floats when possible
[Form] remove useless code in ChoiceType
[DependencyInjection] Enabled alias for service_container
Conflicts:
src/Symfony/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php
* 2.3:
[Form] NumberToLocalizedStringTransformer should return floats when possible
[DependencyInjection] Enabled alias for service_container
Conflicts:
src/Symfony/Component/DependencyInjection/Tests/Compiler/ReplaceAliasByActualDefinitionPassTest.php
This PR was merged into the 2.3 branch.
Discussion
----------
[DependencyInjection] Enable alias for service_container
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
6161438 [DependencyInjection] Enabled alias for service_container
* 3.0:
fixed issue with PHP 5.3
The WebProcessor now forwards the client IP
minor changes
[#17878] Fixing a bug where scalar values caused invalid ordering
[#17724] Fixing autowiring bug where if some args are set, new ones are put in the wrong spot
bumped Symfony version to 2.3.39
updated VERSION for 2.3.38
update CONTRIBUTORS for 2.3.38
updated CHANGELOG for 2.3.38
* 2.8:
fixed issue with PHP 5.3
The WebProcessor now forwards the client IP
minor changes
[#17878] Fixing a bug where scalar values caused invalid ordering
[#17724] Fixing autowiring bug where if some args are set, new ones are put in the wrong spot
bumped Symfony version to 2.3.39
updated VERSION for 2.3.38
update CONTRIBUTORS for 2.3.38
updated CHANGELOG for 2.3.38
* 3.0:
#17676 - making the proxy instantiation compatible with ProxyManager 2.x by detecting proxy features
#17676 - making the proxy instantiation compatible with ProxyManager 2.x by detecting proxy features
Fix bug when using an private aliased factory service
[Form] fix tests added by #17798 by removing `choices_as_values`
[Form] fix FQCN in tests added by #17798
[DependencyInjection] Remove unused parameter of private property
bug #17798 [Form] allow `choice_label` option to be `false`
[Form] fix tests added by #17760 with FQCN
ChoiceFormField of type "select" could be "disabled"
Update contributing docs
[Console] Fix escaping of trailing backslashes
Fix constraint validator alias being required
[DependencyInjection] Simplified code in AutowirePass
[ci] clone with depth=1 to kill push-forced PRs
Add check on If-Range header
* 2.8:
#17676 - making the proxy instantiation compatible with ProxyManager 2.x by detecting proxy features
Fix bug when using an private aliased factory service
ChoiceFormField of type "select" could be "disabled"
Update contributing docs
[Console] Fix escaping of trailing backslashes
Fix constraint validator alias being required
[ci] clone with depth=1 to kill push-forced PRs
Add check on If-Range header
* 2.7:
#17676 - making the proxy instantiation compatible with ProxyManager 2.x by detecting proxy features
Fix bug when using an private aliased factory service
ChoiceFormField of type "select" could be "disabled"
Update contributing docs
[Console] Fix escaping of trailing backslashes
Fix constraint validator alias being required
[ci] clone with depth=1 to kill push-forced PRs
Add check on If-Range header
* 2.3:
#17676 - making the proxy instantiation compatible with ProxyManager 2.x by detecting proxy features
Fix bug when using an private aliased factory service
ChoiceFormField of type "select" could be "disabled"
Update contributing docs
[Console] Fix escaping of trailing backslashes
Fix constraint validator alias being required
[ci] clone with depth=1 to kill push-forced PRs
Add check on If-Range header
* 2.8:
[Form] fix FQCN in tests added by #17798
bug #17798 [Form] allow `choice_label` option to be `false`
[DependencyInjection] Simplified code in AutowirePass
This PR was merged into the 2.8 branch.
Discussion
----------
[DependencyInjection] Simplified code in AutowirePass
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
ce0357e [DependencyInjection] Simplified code in AutowirePass
* 3.0:
[WIP] [3.0] [Form] fix tests added by #17760 by removing
removed obsolete code
[HttpFoundation] Remove @throws from ParameterBag::get() PHPDoc. This was for the now removed deep flag.
[Form] refactor `RadioListMapper::mapDataToForm()`
[Form] fix choice value "false" in ChoiceType
* 3.0:
[3.0] [Tests] minor fix following #17787
[2.8] [Form] minor fix some tests with placeholder in AbstractLayout
[DependencyInjection] fix tests
Validate XLIFF translation files
[DependencyInjection] replace alias in factories
replace alias in factory services