* 3.4:
[DI] configure inlined services before injecting them when dumping the container
Consistently throw exceptions on a single line
fix fopen calls
Update .editorconfig
* 4.1:
[appveyor] fix
[DI] Fix dumping some complex service graphs
Revert "minor #28321 [Routing] Fixed the interface description of the url generator interface (Toflar)"
Fixed caching of templates in default path on cache warmup
added missing LICENSE file
remove cache warmers when Twig cache is disabled
[Workflow] Make sure we do not run the next transition on an updated state
change baseUrl to basePath to fix wrong profiler url
[HttpKernel][FrameworkBundle] Fix escaping of serialized payloads passed to test clients
chore: rename Appveyor filename
Fixed the interface description of the url generator interface
Format file size in validation message according to binaryFormat option
* 3.4:
[appveyor] fix
Revert "minor #28321 [Routing] Fixed the interface description of the url generator interface (Toflar)"
Fixed caching of templates in default path on cache warmup
remove cache warmers when Twig cache is disabled
[HttpKernel][FrameworkBundle] Fix escaping of serialized payloads passed to test clients
chore: rename Appveyor filename
Fixed the interface description of the url generator interface
Format file size in validation message according to binaryFormat option
* 2.8:
[appveyor] fix
Revert "minor #28321 [Routing] Fixed the interface description of the url generator interface (Toflar)"
remove cache warmers when Twig cache is disabled
[HttpKernel][FrameworkBundle] Fix escaping of serialized payloads passed to test clients
chore: rename Appveyor filename
Fixed the interface description of the url generator interface
Format file size in validation message according to binaryFormat option
This PR was merged into the 4.2-dev branch.
Discussion
----------
[FrameworkBundle] Allow user to specify folder for flock
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| License | MIT
| Doc PR |
In case multiple applications running on same server allow user to specify folder for flock
example:
```
framework:
lock:` 'flock://var/flock' # var/flock will be provided as path to flock constructor
lock: 'flock:///var/flock' # /var/flock will be provided as path to flock constructor
lock: flock # works as usual, null is provided to constructor and system temp folder is used
```
Commits
-------
244d762400 added ability to specify folder for flock
This PR was merged into the 4.2-dev branch.
Discussion
----------
[FrameworkBundle] add class description to debug:container command
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Our developer finds it useful when the `console debug:container <service>` command print out the class description.
![bildschirmfoto vom 2018-08-02 14-22-17](https://user-images.githubusercontent.com/200904/43583449-d4bf74e4-965f-11e8-8e88-0db8017c5a90.png)
* [x] json
* [x] txt
* [x] xml
* [x] md
Commits
-------
5fc6155225 [FrameworkBundle] add class description to debug:container command
This PR was merged into the 4.2-dev branch.
Discussion
----------
[FrameworkBundle] [Command] TranslationUpdate change default output to xlf
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | Not applicable
| License | MIT
| Doc PR | Not applicable
Simple modification on the default output for the translation: update command to XLIFF (xlf)
It's to be in agreement with the documentation
![image](https://user-images.githubusercontent.com/2004449/42637935-a91dcabc-85ec-11e8-86db-9c8bea5e710b.png)
Link to the documentation :
https://symfony.com/doc/master/translation.html#translation-resource-file-names-and-locations
Commits
-------
137593ec80 [FrameworkBundle] Cmd TranslationUpdate change default output to xlf
This PR was merged into the 4.2-dev branch.
Discussion
----------
[FrameworkBundle] Don't populate fallback cache on warmup
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Since we populate the front PhpArrayCache, there is no need to also populate its fallback pool, since it will never be hit for the warmed up values.
This saves creating a myriad of small cache files and some MB.
Commits
-------
c857ba5ded [FrameworkBundle] Don't populate fallback cache on warmup
* 4.1:
Use the real image URL for the filesystem tests
[Finder] Update PHPdoc append()
[DI] Fix phpdoc
Fix code examples in PHPDoc
[HttpKernel] Fix inheritdocs
bumped Symfony version to 3.4.16
updated VERSION for 3.4.15
updated CHANGELOG for 3.4.15
* 3.4:
Use the real image URL for the filesystem tests
[Finder] Update PHPdoc append()
[DI] Fix phpdoc
Fix code examples in PHPDoc
[HttpKernel] Fix inheritdocs
bumped Symfony version to 3.4.16
updated VERSION for 3.4.15
updated CHANGELOG for 3.4.15
* 2.8:
Use the real image URL for the filesystem tests
[Finder] Update PHPdoc append()
[DI] Fix phpdoc
Fix code examples in PHPDoc
[HttpKernel] Fix inheritdocs
* 4.1:
Move commands-specifics to a compiler pass in FWB
bumped Symfony version to 4.1.5
updated VERSION for 4.1.4
updated CHANGELOG for 4.1.4
[travis] disable symfony/flex during phpunit install
Uses `session.cookie_samesite` for PHP >= 7.3. For PHP < 7.3 it first
does a session_start(), find the emitted header, changes it, and emits
it again with the value for SameSite added.
This PR was squashed before being merged into the 4.2-dev branch (closes#28176).
Discussion
----------
[DI] [FrameworkBundle] Add LoggerAwareInterface to auto configuration
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Add the method call `setLogger` for every service implementing `Psr\Log\LoggerAwareInterface`
Commits
-------
afda3c8844 [DI] [FrameworkBundle] Add LoggerAwareInterface to auto configuration
* 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
* 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.1:
fix merge
bumped Symfony version to 4.1.3
[PhpUnitBridge] Describe weak_vendors properly
[HttpKernel] Fix merging bindings for controllers' locators
updated VERSION for 4.1.2
updated CHANGELOG for 4.1.2
bumped Symfony version to 4.0.14
updated VERSION for 4.0.13
updated CHANGELOG for 4.0.13
bumped Symfony version to 3.4.14
updated VERSION for 3.4.13
updated CHANGELOG for 3.4.13
bumped Symfony version to 2.8.44
Chaining senders with their aliases should work
This PR was squashed before being merged into the 3.4 branch (closes#26193).
Discussion
----------
Fix false-positive deprecation notices for TranslationLoader and WriteCheckSessionHandler
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25518
| License | MIT
Symfony 3.4 emits deprecation warnings for `TranslationLoader` and `WriteCheckSessionHandler` as soon as these classes are loaded, yet at the same time these classes are part of the default services defined in Symfony 3.4, so if these classes are loaded during container compilation a deprecation warning is emitted, even if these classes are never actually used.
An example would be the following within a compiler pass:
foreach ($containerBuilder->getDefinitions() as $definition) {
if (is_subclass_of($definition->getClass(), SomeClass::class)) {
$definition->addMethodCall('setSomething', [new Reference('someservice')]);
}
}
This will load both `TranslationLoader` and `WriteCheckSessionHandler` in order to check their definition. No instance of the classes are ever used and the classes are not loaded after compilation ever, yet the deprecation notices are shown on every single page. More details are provided in issue #25518 .
By moving the deprecation notices to the class constructors false-positives are avoided while actual usage of the classes should still generate the deprecation warnings.
Commits
-------
1a427b181d Fix false-positive deprecation notices for TranslationLoader and WriteCheckSessionHandler
This PR was merged into the 4.2-dev branch.
Discussion
----------
[FrameworkBundle] fix compatibility with older Cache versions
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
FrameworkBundle 4.2 will be compatible with older versions of the Cache
component. In those versions adapters don't implement `ResetInterface`.
For backwards compatibility they still need to be tagged.
Commits
-------
ec795cca78 fix compatibility with older Cache versions
* 4.1:
fixed typo
[FrameworkBundle] fixed brackets position in method calls
Add placeholder support in bootstrap 4 file fields
[Form] Improve rendering of `file` field in bootstrap 4
[Form] Fix PHPDoc for FormConfigBuilder $dataClass argument
[Security] Update user phpdoc on tokens
[WebProfilerBundle] Fixed icon alignment issue using Bootstrap 4.1.2
suppress side effects in 'get' or 'has' methods of NamespacedAttributeBag
[HttpFoundation] reset callback on StreamedResponse when setNotModified() is called
[HttpFoundation] Fixed phpdoc for get method of HeaderBag
fix typo in ContainerBuilder docblock
[Form/Profiler] Massively reducing memory footprint of form profiling pages by removing redundant 'form' variable from view variables.
[Console] correctly return parameter's default value on "--"
[DependencyInjection] add missing test for #27710
[EventDispatcher] Clear orphaned events on TraceableEventDispatcher::reset
Fix serialization of abstract items with groups across multiple entities
* 4.0:
fixed typo
[FrameworkBundle] fixed brackets position in method calls
[Form] Fix PHPDoc for FormConfigBuilder $dataClass argument
[Security] Update user phpdoc on tokens
[WebProfilerBundle] Fixed icon alignment issue using Bootstrap 4.1.2
suppress side effects in 'get' or 'has' methods of NamespacedAttributeBag
[HttpFoundation] reset callback on StreamedResponse when setNotModified() is called
[HttpFoundation] Fixed phpdoc for get method of HeaderBag
fix typo in ContainerBuilder docblock
[Form/Profiler] Massively reducing memory footprint of form profiling pages by removing redundant 'form' variable from view variables.
[Console] correctly return parameter's default value on "--"
* 3.4:
[FrameworkBundle] fixed brackets position in method calls
[Form] Fix PHPDoc for FormConfigBuilder $dataClass argument
[Security] Update user phpdoc on tokens
[WebProfilerBundle] Fixed icon alignment issue using Bootstrap 4.1.2
suppress side effects in 'get' or 'has' methods of NamespacedAttributeBag
[HttpFoundation] reset callback on StreamedResponse when setNotModified() is called
[HttpFoundation] Fixed phpdoc for get method of HeaderBag
fix typo in ContainerBuilder docblock
[Form/Profiler] Massively reducing memory footprint of form profiling pages by removing redundant 'form' variable from view variables.
[Console] correctly return parameter's default value on "--"
FrameworkBundle 4.2 will be compatible with older versions of the Cache
component. In those versions adapters don't implement `ResetInterface`.
For backwards compatibility they still need to be tagged.
This PR was merged into the 4.2-dev branch.
Discussion
----------
Add symfony/contracts: a set of abstractions extracted out of the Symfony components
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | -
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
A set of abstractions extracted out of the Symfony components.
This is a topic I've been thinking about for a long time. I feel like the time has come for Symfony to publish some abstractions so that people could build on them in a decoupled way.
I've identified interfaces in some components that would greatly benefit from being moved out from the components where they are for now. E.g. #26929 is something that has a broader scope than the Cache component itself.
By putting them in a new `symfony/abstractions` package, we would allow more innovation in the Symfony community, at the abstraction level.
In order to start small, I propose only one interface that gathers a concept that is shared amongst many components already: `ResetInterface`. It would provide a standard `reset()` method, whose purpose is to set an object back to its initial state, allowing it to be reused many times with no side effects/leaks related to its history. By this definition, it could also be autoconfigured (as done here, see update in FrameworkExtension). See wording in the docblock in the attached source code.
Ideally, I'd like this package to provide not only interfaces, by also generic traits, and reference test suites when possible. We could work on adding more abstractions during the 4.2 cycle. WDYT?
## Here is the attached README:
A set of abstractions extracted out of the Symfony components.
Can be used to build on semantics that the Symfony components proved useful - and
that already have battle tested implementations.
Design Principles
-----------------
* contracts are split by domain, each into their own sub-namespaces;
* contracts are small and consistent sets of PHP interfaces, traits, normative
docblocks and reference test suites when applicable, etc.;
* all contracts must have a proven implementation to enter this repository;
* they must be backward compatible with existing Symfony components.
FAQ
---
### How to use this package?
The abstractions in this package are useful to achieve loose coupling and
interoperability. By using the provided interfaces as type hints, you are able
to reuse any implementations that match their contracts. It could be a Symfony
component, or another one provided by the PHP community at large.
Depending on their semantics, some interfaces can be combined with autowiring to
seamlessly inject a service in your classes.
Others might be useful as labeling interfaces, to hint about a specific behavior
that could be enabled when using autoconfiguration or manual service tagging (or
any other means provided by your framework.)
### How is this different from PHP-FIG's PSRs?
When applicable, the provided contracts are built on top of PHP-FIG's PSR. We
encourage relying on them and won't duplicate the effort. Still, the FIG has
different goals and different processes. Here, we don't need to seek universal
standards. Instead, we're providing abstractions that are compatible with the
implementations provided by Symfony. This should actually also contribute
positively to the PHP-FIG (from which Symfony is a member), by hinting the group
at some abstractions the PHP world might like to take inspiration from.
### Why isn't this package split into several packages?
Putting all interfaces in one package eases discoverability and dependency
management. Instead of dealing with a myriad of small packages and the
corresponding matrix of versions, you just need to deal with one package and one
version. Also when using IDE autocompletion or just reading the source code, it
makes it easier to figure out which contracts are provided.
There are two downsides to this approach: you may have unused files in your
`vendor/` directory, and in the future, it will be impossible to use two
different sub-namespaces in different major versions of the package. For the
"unused files" downside, it has no practical consequences: their file sizes are
very small, and there is no performance overhead at all since they are never
loaded. For major versions, this package follows the Symfony BC + deprecation
policies, with an additional restriction to never remove deprecated interfaces.
Resources
---------
* [Documentation](https://symfony.com/doc/current/components/contracts.html)
* [Contributing](https://symfony.com/doc/current/contributing/index.html)
* [Report issues](https://github.com/symfony/symfony/issues) and
[send Pull Requests](https://github.com/symfony/symfony/pulls)
in the [main Symfony repository](https://github.com/symfony/symfony)
Commits
-------
898203649f Added symfony/contracts: a set of abstractions extracted out of the components
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Cache] Add `MarshallerInterface` allowing to change the serializer, providing a default one that automatically uses igbinary when available
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #19895
| License | MIT
| Doc PR | -
With this PR, when igbinary is available, it is automatically used to serialize values.
This provides faster and smaller cache payloads.
The unserializing logic is autoadaptative:
- when an igbinary-serialized value is unserialized but the extension is missing, a cache miss is triggered
- when a natively-serialized value is unserialized and the extension is available, the native `unserialize()` is used
Ping @palex-fpt since you provided very useful comments on the topic and might be interested in reviewing here also.
Commits
-------
9c328c4894 [Cache] Add `MarshallerInterface` allowing to change the serializer, providing a default one that automatically uses igbinary when available
This PR was merged into the 4.2-dev branch.
Discussion
----------
[FrameworkBundle][Cache] Allow configuring PDO-based cache pools, with table auto-creation on first use
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
* Allowed configuring PDO-based cache pools via a new `cache.adapter.pdo` abstract service
* added automatic table creation when using Doctrine DBAL with PDO-based backends
Commits
-------
1484117430 [FrameworkBundle][Cache] Allow configuring PDO-based cache pools, with table auto-creation on first use
This PR was merged into the 4.2-dev branch.
Discussion
----------
[FrameworkBundle] allow turning routes to utf8 mode by default
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This allows building optimized routers that match in a single regexp instead of an alternate of utf8/non-utf8 set of routes.
Commits
-------
8f359cc047 [FrameworkBundle] allow turning routes to utf8 mode by default
This PR was merged into the 4.2-dev branch.
Discussion
----------
[HttpKernel][FrameworkBundle] Turn HTTP exceptions to HTTP status codes by default
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25844
| License | MIT
| Doc PR | -
When an exception is thrown, *if it is not handled* then it will be reinjected as a 2nd exception event via `HttpKernel::terminateWithException()`. When this happens, this will generate a proper HTTP status code.
Commits
-------
80b0739fc2 [HttpKernel][FrameworkBundle] Turn HTTP exceptions to HTTP status codes by default
This PR was merged into the 4.2-dev branch.
Discussion
----------
[DI] Add ServiceLocatorArgument to generate array-based locators optimized for OPcache shared memory
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | -
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Right now, to generate service locators, we use collections of closures described using `ServiceClosureArgument`. This works well, but it doesn't scale well when the number of services grows, because we have to load as many closures as there are services, even if we never call them.
This PR introduces `ServiceLocatorArgument`, which describes the same thing, but allows dumping optimized locators: instead of a collection of closures, this generates a static array that OPcache can put in shared memory (see fixtures for example.)
Once this PR is merged, we'll be able to update `ServiceLocatorPass::register()` to leverage it and generate these optimized locators everywhere. One particular I have in mind in the locator used by `ServiceArgumentResolver`, which can grow fast (it has as many entries as there are actions.)
Commits
-------
6c8e9576a3 [DI] Add ServiceLocatorArgument to generate array-based locators optimized for OPcache shared memory
* 4.1:
[DomCrawler] Fix ChoiceFormField::select() PHPDoc
[Security] LdapUserProvider uidKey could be null
[HttpFoundation] add tests for FlashBagInterface::setAll()
Check for Hyper terminal on all operating systems.
[DI] Don't show internal service id on binding errors
Fix a bug when having more than one named handler per message subscriber
Prevent toolbar links color override by css
add conflict for non-compatible TwigBridge version
This PR was merged into the 4.1 branch.
Discussion
----------
[FrameworkBundle] add conflict for non-compatible TwigBridge version
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27713
| License | MIT
| Doc PR |
The argument was dropped in #27454.
Commits
-------
251e684fe6 add conflict for non-compatible TwigBridge version
* 4.1:
[Routing] Disallow object usage inside Route
[HttpFoundation] missing namespace for RedisProxy
[Routing] fix too much greediness in host-matching regex
[HttpFoundation] fix registration of session proxies
failing test to reproduce session problem
[HttpFoundation] fix session tracking counter
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Config] deprecate tree builders without root nodes
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
While reviewing #27472 I wondered if we really need support config trees without a root node. If we did not support it, users wouldn't create pseudo configuration classes when they were actually not needed.
Commits
-------
c2ce15301c deprecate tree builders without root nodes
This PR was squashed before being merged into the 4.2-dev branch (closes#27247).
Discussion
----------
[Form] Deprecate `searchAndRenderBlock` returning empty string
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #26531
| License | MIT
| Doc PR | -
I would like to remove this silent behavior, because it's confusing
Commits
-------
02f2f0ed39 [Form] Deprecate `searchAndRenderBlock` returning empty string
* 4.1:
[Lock] use 'r+' for fopen (fixes issue on Solaris)
[HttpKernel] fix test compat with PHP 5.3
fix handling of nested Error instances
fix file lock on SunOS
Ignore keepQueryParams attribute when generating route redirect.
[Cache] more granular handling of exceptions in AbstractTrait::clear()
change `evaluate()` docblock return type from string to mixed
Set serialize_precision explicitly to avoid fancy float rounding
* 4.1:
[HttpKernel] fix PHP 5.4 compat
Fix surrogate not using original request
[Finder] Update RealIteratorTestCase
[Routing] remove unneeded dev dep on doctrine/common
[minor] SCA
[Validator] Remove BOM in some xlf files
Ensure updateTimestamp returns a boolean
Fix#27378: Error when rendering a DateIntervalType form with exactly 0 weeks
[HttpKernel] fix session tracking in surrogate master requests
* 4.0:
[HttpKernel] fix PHP 5.4 compat
Fix surrogate not using original request
[Finder] Update RealIteratorTestCase
[Routing] remove unneeded dev dep on doctrine/common
[minor] SCA
[Validator] Remove BOM in some xlf files
Fix#27378: Error when rendering a DateIntervalType form with exactly 0 weeks
[HttpKernel] fix session tracking in surrogate master requests
* 3.4:
[HttpKernel] fix PHP 5.4 compat
Fix surrogate not using original request
[Finder] Update RealIteratorTestCase
[Routing] remove unneeded dev dep on doctrine/common
[minor] SCA
[Validator] Remove BOM in some xlf files
Fix#27378: Error when rendering a DateIntervalType form with exactly 0 weeks
[HttpKernel] fix session tracking in surrogate master requests
This PR was merged into the 4.2-dev branch.
Discussion
----------
[FrameworkBundle] Fixed tests added in #27611
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
- Bug fixes must be submitted against the lowest branch where they apply
(lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the master branch.
-->
Commits
-------
be97006c57 [FrameworkBundle] Fixed tests added in #27611
This PR was merged into the 4.2-dev branch.
Discussion
----------
CacheWarmerAggregate handle deprecations logs
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #27387
| License | MIT
Actually the Web Debug Toolbar warning you about the deprecation messages thrown during the container built (#21502).
Cache warmup can throw deprecated message without any persistance, it may cause issue like #27387
This PR reproduce the same job for the cache warmer, and so on, handle deprecated messages during the warmup of Twig, Translator, Validator, Security and all `kernel.cache_warmer` services.
Here are the point that may be improvable in this PR:
1. Actually I've "duplicate" the callable used in the `set_error_handler` of the Kernel.
IMHO I think that Kernel and CacheWarmerAggregate have differents jobs and a trait may be a good solution to share this error handler setter without duplicating the code, but I'm a little bit lost about the repercussion of adding a Trait in the Kernel.
2. I've think about extending the `CacheWarmerAggregate` into a `DeprecatedLogHandlingCacheWarmerAggregate` to add the debug and containerClass argument, and declare it as the `cache_warmer` service only in debug mode (by declaring it in the DebugBundle/Resources/config/services.xml).
Commits
-------
f03b8bba9d CacheWarmerAggregate handle deprecations logs
This PR was merged into the 4.2-dev branch.
Discussion
----------
[FrameworkBundle] show public/private for aliases in debug:container command
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | not needed <!-- required for new features -->
It could be helpful to see the public/private status for aliases in `debug:container` command.
Otherwise you need to dive into the code to get the information, because the result only shows the options of the aliased service.
## Look & Feel for public alias
![screenshot 2018-06-08 09 25 50](https://user-images.githubusercontent.com/995707/41144664-f3b50766-6afd-11e8-92d0-ca30513a1afc.png)
_text has slightly changed_
## Look & Feel for private alias
![screenshot 2018-06-08 09 23 31](https://user-images.githubusercontent.com/995707/41144593-b354aad2-6afd-11e8-8ab1-f9196e567f67.png)
_text has slightly changed_
//cc @nicolas-grekas
Commits
-------
1df7742345 [FrameworkBundle] show public/private for aliases in debug:container command
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Cache] serialize objects using native arrays when possible
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This PR allows leveraging OPCache shared memory when storing objects in `Php*` pool storages (as done by default for all system caches). This improves performance a bit further when loading e.g. annotations, etc. (bench coming);
Instead of using native php serialization, this uses a marshaller that represents objects in plain static arrays. Unmarshalling these arrays is faster than unserializing the corresponding PHP strings (because it works with copy-on-write, while unserialize cannot.)
php-serialization is still a possible format because we have to use it when serializing structures with internal references or with objects implementing `Serializable`. The best serialization format is selected automatically so this is completely seamless.
ping @palex-fpt since you gave me the push to work on this, and are pursuing a similar goal in #27484. I'd be thrilled to get some benchmarks on your scenarios.
Commits
-------
866420e2eb [Cache] serialize objects using native arrays when possible
* 4.1:
remove HHVM code
[VarDumper] Fix dumping ArrayObject and ArrayIterator instances
[ProxyManagerBridge] Fixed support of private services
[Cache] Fix typo in comment.
[FrameworkBundle] give access to non-shared services when using test.service_container
Fix bad method call with guard authentication + session migration
Avoid calling eval when there is no script embedded in the toolbar
This PR was merged into the 4.1 branch.
Discussion
----------
[FrameworkBundle] give access to non-shared services when using test.service_container
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27488
| License | MIT
| Doc PR | -
Commits
-------
516ff5a985 [FrameworkBundle] give access to non-shared services when using test.service_container
* 4.1:
[FrameworkBundle] decouple some cache-warmer's test from internal details
bug #27405 [Cache] TagAwareAdapter should not corrupt memcached connection in ascii mode
Remove released semaphore
* 4.0:
[FrameworkBundle] decouple some cache-warmer's test from internal details
bug #27405 [Cache] TagAwareAdapter should not corrupt memcached connection in ascii mode
Remove released semaphore
* 3.4:
[FrameworkBundle] decouple some cache-warmer's test from internal details
bug #27405 [Cache] TagAwareAdapter should not corrupt memcached connection in ascii mode
Remove released semaphore
* 4.1:
[Cache][Security] Use Throwable where possible
revert #27545
Update Finder.php
[FrameworkBundle] remove dead code in CachePoolClearerPass
Fix security-core cross-dependencies, fixes#27507
Pass previous exception to FatalErrorException
* 4.0:
[Cache][Security] Use Throwable where possible
revert #27545
Update Finder.php
[FrameworkBundle] remove dead code in CachePoolClearerPass
Fix security-core cross-dependencies, fixes#27507
Pass previous exception to FatalErrorException
* 4.1:
[FrameworkBundle] Fix test-container on kernel reboot, revert to returning the real container from Client::getContainer()
Remove mentions of "beta" in composer.json files
[DI] Ignore missing tree root nodes on validate
[WebProfilerBundle] fixed getSession when no session has been set deprecation warnings
bug #27299 [Cache] memcache connect should not add duplicate entries on sequential calls
[Router] regression when matching a route
[FrameworkBundle][SecurityBundle] Remove no-longer necessary Bundle::registerCommands override
[Routing] Don't reorder past variable-length placeholders
[DebugBundle] DebugBundle::registerCommands should be noop
[BrowserKit] Fix a BC break in Client affecting Panthère
[DX] Improve exception message when AbstractController::getParameter fails
simple-phpunit: remove outdated appveryor workaround
This PR was merged into the 4.1 branch.
Discussion
----------
[FrameworkBundle] Fix test-container on kernel reboot, revert to returning the real container from Client::getContainer()
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | -
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27494
| License | MIT
| Doc PR | -
By making `Client::getContainer()` return the new test container, we broke BC, as spotted in linked issue.
Always use `static::$container` in your tests instead.
While reverting to returning the real container, I noticed we have a serious design issue in the way the test container currently works: because the kernel can be rebooted, we cannot inject the container directly, but have to go through the kernel all the time. Fixing this forces doing a BC break on the constructor of `TestContainer`. Since this is a new class and since it's mostly internal, I think we should do it now. I've marked the class as internal to further strengthen this.
Commits
-------
6764d4e012 [FrameworkBundle] Fix test-container on kernel reboot, revert to returning the real container from Client::getContainer()
This PR was merged into the 4.2-dev branch.
Discussion
----------
[FrameworkBundle] Deprecate auto-injection of the container in AbstractController instances
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Should enhance DX by preventing situations like #27436.
Commits
-------
e2f344fa32 [FrameworkBundle] Deprecate auto-injection of the container in AbstractController instances
This PR was squashed before being merged into the 4.1 branch (closes#27443).
Discussion
----------
[DX] Improve exception message when AbstractController::getParameter fails
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | no (DX)
| 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 | #27436
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Improve exception message for situations where the `parameter_bag` is not present in `AbstractController`. Also fixed the exception to the correct type.
Commits
-------
a8f4128 [DX] Improve exception message when AbstractController::getParameter fails
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Cache] Remove TaggableCacheInterface, alias cache.app.taggable to CacheInterface
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Actually, there is no downside in using a taggable cache pool as a backend for CacheInterface.
This means we can simplify things and remove the TaggableCacheInterface and keep only CacheInterface (master-only).
Commits
-------
c250fbdda0 [Cache] Remove TaggableCacheInterface, alias cache.app.taggable to CacheInterface
* 4.1: (22 commits)
[HttpKernel] Fix restoring trusted proxies in tests
Update UPGRADE-4.0.md
[Messenger] Fix suggested enqueue adapter package
bumped Symfony version to 4.1.1
updated VERSION for 4.1.0
updated CHANGELOG for 4.1.0
Insert correct parameter_bag service in AbstractController
Revert "feature #26702 Mark ExceptionInterfaces throwable (ostrolucky)"
CODEOWNERS: some more rules
removed unneeded comments in tests
removed unneeded comments in tests
Change PHPDoc in ResponseHeaderBag::getCookies() to help IDEs
[HttpKernel] fix registering IDE links
update UPGRADE-4.1 for feature #26332 Form field help option
[HttpKernel] Set first trusted proxy as REMOTE_ADDR in InlineFragmentRenderer.
[Process] Consider \"executable\" suffixes first on Windows
Triggering RememberMe's loginFail() when token cannot be created
bumped Symfony version to 4.1.0
updated VERSION for 4.1.0-BETA3
updated CHANGELOG for 4.1.0-BETA3
...
* 4.0:
[HttpKernel] Fix restoring trusted proxies in tests
Update UPGRADE-4.0.md
CODEOWNERS: some more rules
removed unneeded comments in tests
removed unneeded comments in tests
Change PHPDoc in ResponseHeaderBag::getCookies() to help IDEs
[HttpKernel] fix registering IDE links
[HttpKernel] Set first trusted proxy as REMOTE_ADDR in InlineFragmentRenderer.
[Process] Consider \"executable\" suffixes first on Windows
Triggering RememberMe's loginFail() when token cannot be created
[Serializer] Fix serializer tries to denormalize null values on nullable properties
[FrameworkBundle] Change priority of AddConsoleCommandPass to TYPE_BEFORE_REMOVING
* 3.4:
[HttpKernel] Fix restoring trusted proxies in tests
Update UPGRADE-4.0.md
CODEOWNERS: some more rules
removed unneeded comments in tests
removed unneeded comments in tests
Change PHPDoc in ResponseHeaderBag::getCookies() to help IDEs
[HttpKernel] fix registering IDE links
[HttpKernel] Set first trusted proxy as REMOTE_ADDR in InlineFragmentRenderer.
[Process] Consider \"executable\" suffixes first on Windows
Triggering RememberMe's loginFail() when token cannot be created
[Serializer] Fix serializer tries to denormalize null values on nullable properties
[FrameworkBundle] Change priority of AddConsoleCommandPass to TYPE_BEFORE_REMOVING
This PR was squashed before being merged into the 4.2-dev branch (closes#27429).
Discussion
----------
[PropertyInfo] Auto-enable PropertyInfo component
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ø
| License | MIT
| Doc PR | ø
The PropertyInfo component (used by the Serializer to provide more insights from PhpDocs, etc...) is disabled by default, not sure why. This enables it by default when the component is installed.
Commits
-------
06ea72e3b2 [PropertyInfo] Auto-enable PropertyInfo component
This PR was merged into the 3.4 branch.
Discussion
----------
[FrameworkBundle] Change priority of AddConsoleCommandPass to TYPE_BEFORE_REMOVING
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27259
| License | MIT
| Doc PR | no
Hello!
There is fix for #27259 issue. It changes priority of `AddConsoleCommandPass` to `TYPE_BEFORE_REMOVING` as @chalasr advised. I'm not sure about side effects by that.
Commits
-------
e36099503f [FrameworkBundle] Change priority of AddConsoleCommandPass to TYPE_BEFORE_REMOVING
* 4.1: (26 commits)
Revert "bug #27312 Supress deprecation notices thrown when getting private servies from container in tests (arderyp)"
[HttpKernel] reset kernel start time on reboot
Add code of Conduct links in our README
bumped Symfony version to 4.0.12
[FrameworkBundle] Fix using test.service_container when Client is rebooted
[DI] never inline lazy services
updated VERSION for 4.0.11
updated CHANGELOG for 4.0.11
bumped Symfony version to 3.4.12
updated VERSION for 3.4.11
updated CHANGELOG for 3.4.11
Default testsuite to latest PHPUnit 6.*
[Github] Update the pull-request template
bumped Symfony version to 2.8.42
updated VERSION for 2.8.41
updated CHANGELOG for 2.8.41
Tweak Argon2 test config
[HttpFoundation] Fix cookie test with xdebug
[FrameworkBundle] cleanup generated test container
[Serializer] Check the value of enable_max_depth if defined
...
This PR was merged into the 4.1 branch.
Discussion
----------
Remove reference to the test container after kernel shutdown
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
This reference is not working anymore, as the main container was reset and cleaned. Keeping a reference to the test container will prevent collecting the object graph.
Commits
-------
d8fb1b97c9 Remove reference to the test container after kernel shutdown
This PR was merged into the 4.1 branch.
Discussion
----------
[FrameworkBundle] cleanup generated test container
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Cleans up removed and hidden services, fixes an issue when the private container locator is inlined.
Commits
-------
d8cbec00ad [FrameworkBundle] cleanup generated test container
* 4.1: (21 commits)
Fixed content trace CSS in profiler
[Form] fix tests on old phpunit versions
[FrameworkBundle] fix typo in CacheClearCommand
[Serializer] Fix and improve constraintViolationListNormalizer's RFC7807 compliance
bumped Symfony version to 4.1.0
updated VERSION for 4.1.0-BETA2
updated CHANGELOG for 4.1.0-BETA2
bumped Symfony version to 4.0.11
updated VERSION for 4.0.10
updated CHANGELOG for 4.0.10
bumped Symfony version to 3.4.11
updated VERSION for 3.4.10
updated CHANGELOG for 3.4.10
bumped Symfony version to 2.8.41
updated VERSION for 2.8.40
updated CHANGELOG for 2.8.40
bumped Symfony version to 2.7.48
updated VERSION for 2.7.47
update CONTRIBUTORS for 2.7.47
updated CHANGELOG for 2.7.47
...
* 4.0:
Fixed content trace CSS in profiler
[Form] fix tests on old phpunit versions
[FrameworkBundle] fix typo in CacheClearCommand
bumped Symfony version to 4.0.11
updated VERSION for 4.0.10
updated CHANGELOG for 4.0.10
bumped Symfony version to 3.4.11
updated VERSION for 3.4.10
updated CHANGELOG for 3.4.10
bumped Symfony version to 2.8.41
updated VERSION for 2.8.40
updated CHANGELOG for 2.8.40
bumped Symfony version to 2.7.48
updated VERSION for 2.7.47
update CONTRIBUTORS for 2.7.47
updated CHANGELOG for 2.7.47
fixed test
This reference is not working anymore, as the main container was reset and
cleaned. Keeping a reference to the test container will prevent collecting
the object graph.
* 3.4:
[Form] fix tests on old phpunit versions
[FrameworkBundle] fix typo in CacheClearCommand
bumped Symfony version to 3.4.11
updated VERSION for 3.4.10
updated CHANGELOG for 3.4.10
fixed test
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Cache] Add [Taggable]CacheInterface, the easiest way to use a cache
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25903
| License | MIT
| Doc PR | -
This feature is a no-brainer, yet it provides a wonderful DX when using a cache:
by type-hinting the new `CacheInterface` or `TaggableCacheInterface`, you get access to:
```php
public function get(string $key, callable $callback);
```
`$callback` is called when `$key` is not found in the cache pool.
It is given one arguments: a `CacheItemInterface $item` (a `CacheItem` for a `TaggableCacheInterface`), and should return the corresponding value.
```php
$value = $cache->get($key, function (CacheItemInterface $item) {
$item->expiresAfter(3600);
return $this->computeValue();
});
```
or for tags, on a `TaggableCacheInterface $cache`:
```php
$value = $cache->get($key, function (CacheItem $item) {
$item->tag('foo_tag');
return $this->computeValue();
});
```
Plain simple, I love it, why didn't we have the idea earlier, isn't it ?! :)
Commits
-------
589ff697f4 [Cache] Add [Taggable]CacheInterface, the easiest way to use a cache