* 4.1:
[HttpFoundation] fix false-positive ConflictingHeadersException
[DI] Fix false-positive circular ref leading to wrong exceptions or infinite loops at runtime
* 3.4:
[HttpFoundation] fix false-positive ConflictingHeadersException
[DI] Fix false-positive circular ref leading to wrong exceptions or infinite loops at runtime
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] Fix false-positive circular ref leading to wrong exceptions or infinite loops at runtime
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28010, #27865
| License | MIT
| Doc PR | -
When circular loops involve references in properties, method calls or configurators, it is possible to properly instantiate the related services.
The current logic is broken: `ContainerBuilder` considers some of these loops as self-referencing circular references, leading to a runtime exception, and in similar situations, `PhpDumper` generates code that turns to infinite loops at runtime 💥. These badly handled situations happen with inlined definitions.
This PR fixes both classes by making them track which references are really part of the constructors' chain, including inline definitions.
It also fixes dumping infinite loops when dumping circular loops involving lazy services while proxy-manager-bridge is not installed.
Commits
-------
e843bb86c8 [DI] Fix false-positive circular ref leading to wrong exceptions or infinite loops at runtime
* 4.1:
[HttpKernel] Fixed invalid REMOTE_ADDR in inline subrequest when configuring trusted proxy with subnet
[FrameworkBundle] fixed guard event names for transitions
[DI] Improve class named servics error message
remove unnecessary instanceof in MongoDbSessionHandler
[HttpFoundation] fixed using _method parameter with invalid type
Renaming internal test class to help auto-completion
[Intl] Replace svn with git in the icu data update script
[Messenger] Fix error message on undefined message class for non-subscriber handler
[HttpFoundation] Fix Cookie::isCleared
* 4.0:
[HttpKernel] Fixed invalid REMOTE_ADDR in inline subrequest when configuring trusted proxy with subnet
[FrameworkBundle] fixed guard event names for transitions
[DI] Improve class named servics error message
[HttpFoundation] fixed using _method parameter with invalid type
[Intl] Replace svn with git in the icu data update script
[HttpFoundation] Fix Cookie::isCleared
* 3.4:
[HttpKernel] Fixed invalid REMOTE_ADDR in inline subrequest when configuring trusted proxy with subnet
[FrameworkBundle] fixed guard event names for transitions
[DI] Improve class named servics error message
[HttpFoundation] fixed using _method parameter with invalid type
[Intl] Replace svn with git in the icu data update script
[HttpFoundation] Fix Cookie::isCleared
This PR was squashed before being merged into the 3.4 branch (closes#28057).
Discussion
----------
[DI] Improve class named servics error message
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #28006
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Commits
-------
61de0601a1 [DI] Improve class named servics error message
* 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
* 4.0:
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
* 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
* 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
* 4.0:
do not mock the session in token storage tests
[DependencyInjection] resolve array env vars
Add Occitan plural rule
Fix security/* cross-dependencies
[Lock] Skip test if posix extension is not installed
[DI] Allow defining bindings on ChildDefinition
use strict compare in url validator
Disallow illegal characters like "." in session.name
[HttpKernel] do file_exists() check instead of silent notice
fix rounding from string
* 3.4:
do not mock the session in token storage tests
[DependencyInjection] resolve array env vars
Add Occitan plural rule
Fix security/* cross-dependencies
[Lock] Skip test if posix extension is not installed
[DI] Allow defining bindings on ChildDefinition
use strict compare in url validator
Disallow illegal characters like "." in session.name
[HttpKernel] do file_exists() check instead of silent notice
fix rounding from string
* 4.0: (22 commits)
[appveyor] use PHP 7.1 to run composer
[HttpKernel] Don't clean legacy containers that are still loaded
[VarDumper] Fix HtmlDumper classes match
Make the simple auth provider the same as in Symfony 2.7.
[PhpUnitBridge] silence wget
fix merge
[Security] guardAuthenticationProvider::authenticate cannot return null according to interface specification
[PhpUnitBridge] Fix#26994
[VarDumper] Remove decoration from actual output in tests
[PropertyInfo] Minor cleanup and perf improvement
[Bridge/Doctrine] fix count() notice on PHP 7.2
[Security] Skip user checks if not implementing UserInterface
[DI] Add check of internal type to ContainerBuilder::getReflectionClass
[HttpFoundation] Add HTTP_EARLY_HINTS const
[DoctrineBridge] Improve exception message at `IdReader::getIdValue()`
Add type hints
fixed CS
Use new PHP7.2 functions in hasColorSupport
[VarDumper] Fix dumping of SplObjectStorage
[HttpFoundation] Add functional tests for Response::sendHeaders()
...
* 3.4: (22 commits)
[appveyor] use PHP 7.1 to run composer
[HttpKernel] Don't clean legacy containers that are still loaded
[VarDumper] Fix HtmlDumper classes match
Make the simple auth provider the same as in Symfony 2.7.
[PhpUnitBridge] silence wget
fix merge
[Security] guardAuthenticationProvider::authenticate cannot return null according to interface specification
[PhpUnitBridge] Fix#26994
[VarDumper] Remove decoration from actual output in tests
[PropertyInfo] Minor cleanup and perf improvement
[Bridge/Doctrine] fix count() notice on PHP 7.2
[Security] Skip user checks if not implementing UserInterface
[DI] Add check of internal type to ContainerBuilder::getReflectionClass
[HttpFoundation] Add HTTP_EARLY_HINTS const
[DoctrineBridge] Improve exception message at `IdReader::getIdValue()`
Add type hints
fixed CS
Use new PHP7.2 functions in hasColorSupport
[VarDumper] Fix dumping of SplObjectStorage
[HttpFoundation] Add functional tests for Response::sendHeaders()
...
* 3.4:
fixed wrong merge
Tweak message to be Flex friendly
[Routing] fixed tests
Fixing wrong class_exists on interface
Preserve percent-encoding in URLs when performing redirects in the UrlMatcher
[Console] Fix a bug when passing a letter that could be an alias
add missing validation options to XSD file
Take advantage of AnnotationRegistry::registerUniqueLoader
[DI] Optimize Container::get() for perf
fix merge
Fix tests
Refactoring tests.
* 3.4: (22 commits)
fix merge
[Translation] Fix InvalidArgumentException when using untranslated plural forms from .po files
Fixed exit code with non-integer throwable code
[HttpFoundation] Support 0 bit netmask in IPv6 ()
[DI] Impossible to set an environment variable and then an array as container parameter
[Process] remove false-positive BC breaking exception on Windows
Tweaking class not found autowiring error
[LDAP] added missing dots at the end of some exception messages.
[TwigBridge] Add missing dev requirement for workflow
fixed#25440
empty lines don't count for indent detection
Set `width: auto` on WebProfiler toolbar's reset.
[Lock] Fix incorrect phpdoc
[Process] Dont rely on putenv(), it fails on ZTS PHP
[HttpKernel] detect deprecations thrown by container initialization during tests
[HttpKernel] Fix logging of post-terminate errors/exceptions
[DI] Add context to service-not-found exceptions thrown by service locators
[Debug] Fix catching fatal errors in case of nested error handlers
[VarDumper] Fixed file links leave blank pages when ide is configured
Fix hidden currency element with Bootstrap 3 theme
...
* 3.3:
[HttpFoundation] Support 0 bit netmask in IPv6 ()
[DI] Impossible to set an environment variable and then an array as container parameter
[LDAP] added missing dots at the end of some exception messages.
Set `width: auto` on WebProfiler toolbar's reset.
[Process] Dont rely on putenv(), it fails on ZTS PHP
[HttpKernel] detect deprecations thrown by container initialization during tests
[HttpKernel] Fix logging of post-terminate errors/exceptions
[Debug] Fix catching fatal errors in case of nested error handlers
[VarDumper] Fixed file links leave blank pages when ide is configured
Fix hidden currency element with Bootstrap 3 theme
This PR was squashed before being merged into the 3.3 branch (closes#25333).
Discussion
----------
[DI] Impossible to set an environment variable and then an array as container parameter
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25245
| License | MIT
When an environment variables and then an array is set as container parameters, an error is thrown (Warning: stripos() expects parameter 1 to be string, array given).
You can run my test without the fix in the Container builder to see it.
Commits
-------
484a082eb1 [DI] Impossible to set an environment variable and then an array as container parameter
* 3.4: (37 commits)
Remove some unused variables and properties
[appveyor] disable memory limit on composer up
[HttpFoundation] don't prefix cookies with "Set-Cookie:"
Remove some unused variables and properties
Fix debug:form definition
Remove some unused variables, properties and methods
fix some edge cases with indented blocks
[ExpressionLanguage] Fix parse error on 5.3
[HttpKernel] remove noisy frame in controller stack traces
[DI] Force root-namespace for function calls in the dumper container
[DI] Fix circular-aliases message
register system cache clearer only if it's used
doc : Namespace prefix must end with a "\"
[ExpressionLanguage] throw an SyntaxError instead of letting a undefined index notice
Prevent a loop in aliases within the `findDefinition` method
[HttpKernel] Disable inlining on PHP 5
Ensure that inlined services with parameterized class name can be dumped
[DI] Fix non-string class handling in PhpDumper
Throw a sensible exception when controller has been removed
Remove LOCK_EX That Breaks Cache Usage on NFS
...
* 3.3: (21 commits)
[appveyor] disable memory limit on composer up
Remove some unused variables and properties
Remove some unused variables, properties and methods
fix some edge cases with indented blocks
[ExpressionLanguage] Fix parse error on 5.3
[HttpKernel] remove noisy frame in controller stack traces
[DI] Fix circular-aliases message
[ExpressionLanguage] throw an SyntaxError instead of letting a undefined index notice
Prevent a loop in aliases within the `findDefinition` method
Fix php doc in Table class
bumped Symfony version to 3.3.15
updated VERSION for 3.3.14
updated CHANGELOG for 3.3.14
bumped Symfony version to 2.8.33
updated VERSION for 2.8.32
updated CHANGELOG for 2.8.32
bumped Symfony version to 2.7.40
updated VERSION for 2.7.39
update CONTRIBUTORS for 2.7.39
updated CHANGELOG for 2.7.39
...
* 3.4:
[DI] Add missing deprecation when fetching private services from ContainerBuilder
[FrameworkBundle] Rename getDotEnvVars to getDotenvVars
[DI] Fix false-positive circular exception
Use a more specific file for detecting the bridge
[HttpKernel] Fix issue when resetting DumpDataCollector
bumped Symfony version to 3.4.1
updated VERSION for 3.4.0
updated CHANGELOG for 3.4.0