* 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
* 2.7:
[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.2 branch.
Discussion
----------
[Cache] Remove exception false-positive from FilesystemAdapterTrait
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20517
| License | MIT
| Doc PR | -
As reported in the linked issue, there seem to be a race condition in FilesystemAdapterTrait (maybe related to realpath cache?).
Let's remove that exception: if the mkdir really fails, the error will be logged later on when a cache entry will be written (or succeed if the race is over.)
Commits
-------
a756db78d0 [Cache] Remove exception false-positive from FilesystemAdapterTrait
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.2 branch.
Discussion
----------
[Console] Allow terminal dimensions to be set to 0 (unbounded)
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #21513
| License | MIT
A previous PR (#20328) changed the behavior of terminals with undefined widths from unbounded to 80 characters. And due to the way the existing code worked it become impossible to set a terminal to be unbounded again. This PR provides a way to restore the previous behavior:
```php
putenv('COLUMNS=0');
```
Commits
-------
4c1b001891 Allow terminal dimensions to be set to 0 (unbounded)
This PR was merged into the 3.3-dev branch.
Discussion
----------
[FrameworkBundle] Use findDefinition() instead of getDefinition() on aliases
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
The services for which `has()` is called might be aliases at this point so `getDefinition()` gives an exception, I ran into by executing this pass but not the removing ones (skipping ReplaceAliasByActualDefinitionPass) while working on https://github.com/symfony/symfony/issues/16388. Let's make it safe to use independently.
Commits
-------
41f3d1f166 Use findDefinition() instead of getDefinition() after calling has()
This PR was merged into the 2.7 branch.
Discussion
----------
[Yaml] release memory after parsing
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/22351#discussion_r110647360
| License | MIT
| Doc PR |
Follow up of #22351 to release memory after parsing as suggested by @stof.
Commits
-------
c891413f6c [Yaml] release memory after parsing
This PR was merged into the 3.3-dev branch.
Discussion
----------
[Dotenv] Throwing an error when loading nothing
| 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 | n/a
This is a quick fix to prevent anoying when you follow a tutorial using another dotenv component. For example, this code uses [vlucas/phpdotenv](https://packagist.org/packages/vlucas/phpdotenv):
```php
$dotenv = new Dotenv\Dotenv(__DIR__.'/../');
$dotenv->load();
```
Silently failed with symfony/dotenv.
Commits
-------
911bc68991 [Dotenv] Throwing an error when loading nothing
This PR was squashed before being merged into the 3.3-dev branch (closes#22368).
Discussion
----------
[Bridge] [Twig] get and flush only flash sessions you need in getFlashes method
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks? | no ?!
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass? | yes
| Fixed tickets | #22359
| License | MIT
| Doc PR | symfony/symfony-docs
@xabbuh comments about empty array to return
Commits
-------
33b044a [Bridge] [Twig] get and flush only flash sessions you need in getFlashes method
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 squashed before being merged into the 3.3-dev branch (closes#22239).
Discussion
----------
[Finder] Glob wildcard while using double-star without ending slash
| 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 allows to use the `Glob::toRegex` method to dump a glob that will match "everything after" while using the double-star without leading slash. `/foo/**` will therefore match `/foo/a` or `/foo/a/b/c` or even `/foo/a/b/c/d.e`.
The use-case for this change is an application allowing its users to match a list of files/folders from such glob pattern.
Happy to add a line in the CHANGELOG and documentation if you feel that would make sense.
Commits
-------
170b0ace2c [Finder] Glob wildcard while using double-star without ending slash
This PR was merged into the 3.3-dev branch.
Discussion
----------
[Dotenv] Throwing an exception when loading a directory
| 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 | n/a
Commits
-------
8b83b58aa5 Throwing an exception when loading a directory
This PR was squashed before being merged into the 3.3-dev branch (closes#22344).
Discussion
----------
[DX] [TwigBundle] Improve default expand states of exception template
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass? | yes
| Fixed tickets | #22334
| License | MIT
As discussed in #22334 this PR changes the default exception template to more intelligently decide which call stack to initially expand:
- All exceptions are scanned for user code, ignoring the front controller and callbacks
- Only exceptions containing user code are expanded
- If no user code is found the first exception is expanded
Commits
-------
df25691250 [DX] [TwigBundle] Improve default expand states of exception template
This PR was merged into the 3.3-dev branch.
Discussion
----------
[HttpKernel et al.] Move DataCollector::cloneVar() to lateCollect()
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #22166
| License | MIT
| Doc PR | -
<!--
- 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.
- Please fill in this template according to the PR you're about to submit.
- Replace this comment by a description of what your PR is solving.
-->
Commits
-------
f83f971c3f [HttpKernel et al.] Move DataCollector::cloneVar() to lateCollect()
This PR was squashed before being merged into the 3.3-dev branch (closes#22273).
Discussion
----------
Add a new Link component
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? |no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks? | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | todo
This a proposal to extract HTTP preloading features introduced in #21478 in their own component.
There are some good reasons to do it:
* HTTP preloading is not (only) about assets: this standalone component could be very useful to replace resources embedding in APIs by HTTP/2 pushes like described in [this article](https://evertpot.com/rest-embedding-hal-http2/) by @evert. In such case, there is no reason to carry the whole asset component for an API.
* There is no dependency nor relation at all between the code of the asset compnent and the one I've added for Preloading features
* It makes the code cleaner (no more optional dependency in the `Asset` Twig extension)
This component would also better fit in HttpFoundation than in Asset. But there is no dependency between it and HttpFoundation and it can easily be used with PSR-7 too, so IMO it better belongs in a standalone component.
Btw, ~~~I plan to add support for prefetching to this component. Except a PR soon.~~~ Prefetching and prerendering support added in this PR.
ping @symfony/deciders
Commits
-------
053de25edf Add a new Link component
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
This PR was merged into the 2.7 branch.
Discussion
----------
[HttpFoundation] Add `use_strict_mode` in validOptions for session
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9258
| License | MIT
| Doc PR |
PHP ini `session.use_strict_mode` was added in PHP 5.5.2 so I didn't target 2.8 as this still uses PHP 5.3. https://secure.php.net/manual/en/session.configuration.php#ini.session.use-strict-mode
Commits
-------
130ee327d4 Add `use_strict_mode` in validOptions for session
This PR was merged into the 2.7 branch.
Discussion
----------
[HttpFoundation] Fix and test status codes according to IANA's data
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks? | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
This PR updates HTTP status code according to values [standardized by the IANA](https://www.iana.org/assignments/http-status-codes/http-status-codes.xml). It also add a test to check the conformance (we'll also be notified when a code is added, ~~removed~~ or modified).
All credits go to @fcabralpacheco for is work in Zend Diactoros: https://github.com/zendframework/zend-diactoros/pull/234
Commits
-------
72d25ccca7 [HttpFoundation] Fix and test status codes according to IANA's data
This PR was merged into the 3.3-dev branch.
Discussion
----------
[Bridge] [Twig] Get and flush only flash sessions you need in getFlashes method
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no ?!
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass? | yes
| Fixed tickets | #22355
| License | MIT
| Doc PR | symfony/symfony-docs
PR to get only flash sessions you need without flush everything
Commits
-------
ff82cb29bb [Bridge] [Twig] AppVariable: get and flush only flash sessions you need in getFlashes method