This PR was squashed before being merged into the 4.1 branch (closes#28636).
Discussion
----------
[HttpFoundation] X-Accel-Mapping does not use HTTP key=value syntax
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? |no
| Tests pass? | yes
| Fixed tickets | #28627
| License | MIT
| Doc PR |
The `X-Accel-Mapping` header does not use the standard HTTP key=value syntax, so using `HeaderUtils::combine()` breaks paths with upper-case letters.
There is no good reason to use `HeaderUtils::combine()` in this case, so simply skip it.
Commits
-------
09343c27d7 [HttpFoundation] X-Accel-Mapping does not use HTTP key=value syntax
* 4.1:
[Console] simplified code
removed useless phpdoc
improve docblocks around group sequences
[Cache] prevent getting older entries when the version key is evicted
[WebProfilerBundle] added a note in the README
[Yaml] Skip parser test with root user
[Filesystem] Skip tests on readable file when run with root user
[FWBundle] Fix an error in WebTestCase::createClient's PHPDoc
[HttpFoundation][Security] forward locale and format to subrequests
[Console] Send the right exit code to console.terminate listeners
[HttpFoundation] fix hidding warnings from session handlers
Caching missed templates on cache warmup
* 3.4:
[Console] simplified code
removed useless phpdoc
improve docblocks around group sequences
[Cache] prevent getting older entries when the version key is evicted
[WebProfilerBundle] added a note in the README
[Yaml] Skip parser test with root user
[Filesystem] Skip tests on readable file when run with root user
[FWBundle] Fix an error in WebTestCase::createClient's PHPDoc
[HttpFoundation][Security] forward locale and format to subrequests
[Console] Send the right exit code to console.terminate listeners
[HttpFoundation] fix hidding warnings from session handlers
Caching missed templates on cache warmup
* 2.8:
improve docblocks around group sequences
[WebProfilerBundle] added a note in the README
[Filesystem] Skip tests on readable file when run with root user
[FWBundle] Fix an error in WebTestCase::createClient's PHPDoc
[HttpFoundation][Security] forward locale and format to subrequests
[Console] Send the right exit code to console.terminate listeners
Caching missed templates on cache warmup
This PR was merged into the 2.8 branch.
Discussion
----------
[Validator] improve docblocks around group sequences
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | no
| New feature? |no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #26889
| License | MIT
| Doc PR |
Commits
-------
179a081ee3 improve docblocks around group sequences
This PR was merged into the 4.2-dev branch.
Discussion
----------
[BrowserKit] throw exception when request() wasn't called
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | https://github.com/symfony/symfony/pull/27807#issuecomment-420985940
Commits
-------
41cfde19f6 throw exception when request() wasn't called
This PR was merged into the 4.2-dev branch.
Discussion
----------
[DI] add missing sprintf argument in AbstractRecursivePass::getExpressionLanguage
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| 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 -->
| License | MIT
runtime exception in AbstractRecursivePass::getExpressionLanguage is referencing service as third parameter in sprintf, but none was given.
Commits
-------
dc5bf84f15 third parameter of sprintf missing in AbstractRecursivePass::getExpressionLanguage
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Form] Check for Intl availibility
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Same as #28513 for the form component
Commits
-------
73c688c967 [Form] Check for Intl availibility
This PR was merged into the 2.8 branch.
Discussion
----------
[TwigBundle] Fixed caching of templates in src/Resources/<BundleName>/views on cache warmup
| 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 | -
Same as https://github.com/symfony/symfony/pull/27764, but in this case the convention is wrong.
Corrected according to:
992a174470/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php (L165)
Commits
-------
83a75f4313 Caching missed templates on cache warmup
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Cache] add "setCallbackWrapper()" on adapters implementing CacheInterface for more flexibility
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27730
| License | MIT
| Doc PR | -
Preparing my talk at SymfonyLive London, see you all there :)
This allows wrapping the callback passed to `->get($item, $callback, $beta)` in a callable that should at least return `$callback($item)`, but can do something around the call.
The default wrapper is locking the key to provide lock-based stampede protection.
That was already the case before this PR, but in a much dirtier way at the design level.
Fixes a few issues found meanwhile.
Commits
-------
8cf3625b11 [Cache] add "setCallbackWrapper()" on adapters implementing CacheInterface for more flexibility
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Cache] support configuring multiple Memcached servers in one DSN
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27855
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/issues/10402
Useful to reconfigure dynamically an array of memcached servers (eg removing a dead one or adding a new one).
DSN format is e.g. `memcached://localhost?host[foo.bar]=3`.
To ease generating the DSN programmatically, it works also with `memcached:?host[localhost]&host[localhost:12345]&host[/some/memcached.sock:]=3`.
The key of the "host" parameter is a "host:port" pair, the value is the weight of the "host:port" pair.
Sockets need to be specified with the trailing `:` (as shown in the last example).
Commits
-------
8e0605ac18 [Cache] support configuring multiple Memcached servers in one DSN
This PR was merged into the 2.8 branch.
Discussion
----------
[HttpFoundation][Security] forward locale and format to subrequests
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28368, #21546
| License | MIT
| Doc PR | -
See discussion in linked issue.
Commits
-------
41eb1914f6 [HttpFoundation][Security] forward locale and format to subrequests
This PR was merged into the 4.2-dev branch.
Discussion
----------
[HttpFoundation] make cookies auto-secure when passing them $secure=null + plan to make it and samesite=lax the defaults in 5.0
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #26731
| License | MIT
| Doc PR | -
By creating Cookie instances using `null` for the `$secure` argument, this PR allows making cookies inherit their "secure" attribute from the request.
This PR also adds a forward to make $secure=null and samesite=lax the defaults in Symfony 5.0:
- either define all constructor's arguments explicitly
- or use the new `Cookie::create()` factory
Commits
-------
9493cfd5f2 [HttpFoundation] make cookies auto-secure when passing them $secure=null + plan to make it and samesite=lax the defaults in 5.0
This PR was merged into the 4.2-dev branch.
Discussion
----------
[SecurityBundle] make remember-me cookies auto-secure + inherit their default config from framework.session.cookie_*
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28338
| License | MIT
| Doc PR | -
Let's make it easier to have a good default security level, now for the remember-me cookie.
Commits
-------
6ec223bf6f [SecurityBundle] make remember-me cookies auto-secure + inherit their default config from framework.session.cookie_*
This PR was merged into the 4.2-dev branch.
Discussion
----------
[VarExporter] add Instantiator::instantiate() to create+populate objects without calling their constructor nor any other methods
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
A blend of features also provided by https://github.com/doctrine/instantiator and https://github.com/Ocramius/GeneratedHydrator in one simple method. Because it's just a few more lines on top of the existing code infrastructure in the component :)
For example, from the docblock:
```php
// creates an empty instance of Foo
Instantiator::instantiate(Foo::class);
// creates a Foo instance and sets one of its public, protected or private properties
Instantiator::instantiate(Foo::class, ['propertyName' => $propertyValue]);
// creates a Foo instance and sets a private property defined on its parent Bar class
Instantiator::instantiate(Foo::class, [], [
Bar::class => ['privateBarProperty' => $propertyValue],
]);
```
Instances of ArrayObject, ArrayIterator and SplObjectHash can be created
by using the special `"\0"` property name to define their internal value:
```php
// creates an SplObjectHash where $info1 is attached to $obj1, etc.
Instantiator::instantiate(SplObjectStorage::class, ["\0" => [$obj1, $info1, $obj2, $info2...]]);
// creates an ArrayObject populated with $inputArray
Instantiator::instantiate(ArrayObject::class, ["\0" => [$inputArray, $optionalFlag]]);
```
Misses some tests for now, but reuses the existing code infrastructure used to "unserialize" objects.
Commits
-------
d9bade0385 [VarExporter] add Instantiator::instantiate() to create+populate objects without calling their constructor nor any other methods
This PR was merged into the 3.4 branch.
Discussion
----------
[Cache] prevent getting older entries when the version key is evicted
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28445
| License | MIT
| Doc PR | -
As described in linked issue, using a strategy described in
https://github.com/memcached/memcached/wiki/ProgrammingTricks#deleting-by-namespace
Commits
-------
00855895a8 [Cache] prevent getting older entries when the version key is evicted