* 3.4:
bumped Symfony version to 3.4.0
updated VERSION for 3.4.0-BETA1
updated CHANGELOG for 3.4.0-BETA1
Do not process bindings in AbstractRecursivePass
don't bind scalar values to controller method arguments
Add extra autowiring aliases
adding AdapterInterface alias for cache.app
Adding a new debug:autowiring command
[HttpFoundation] Make sessions secure and lazy
[Routing] Ensure uniqueness without repeated check
[Console] Sync ConsoleLogger::interpolate with the one in HttpKernel
* 2.8:
Username and password in basic auth are allowed to contain '.'
Remove obsolete PHPDoc from UriSigner
[Serializer] ObjectNormalizer: throw if PropertyAccess isn't installed
[PropertyInfo] Add support for the iterable type
pdo session fix
Fixed unsetting from loosely equal keys OrderedHashMap
[Debug] Fix same vendor detection in class loader
Updated the source text and translation
reject remember-me token if user check fails
* 2.7:
Username and password in basic auth are allowed to contain '.'
Remove obsolete PHPDoc from UriSigner
[Serializer] ObjectNormalizer: throw if PropertyAccess isn't installed
pdo session fix
Fixed unsetting from loosely equal keys OrderedHashMap
[Debug] Fix same vendor detection in class loader
Updated the source text and translation
reject remember-me token if user check fails
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpKernel] Don't bind scalar values to controller method arguments
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/24555#issuecomment-337071029
| License | MIT
| Doc PR | -
See linked issue.
Let's suppose we have this configuration:
```yaml
services:
_defaults:
# ...
bind:
$foo: '%foobar%'
```
`$foo` was successfully bound to any controller constructor, but in another controller I have this edit action (nothing to do with the intention of bind such a parameter, but it has the same name):
```php
/**
* @Route("/{foo}/edit")
*/
public function editAction(string $foo) {}
```
triggering:
> Type error: Argument 1 passed to Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument::__construct() must be an instance of Symfony\Component\DependencyInjection\Reference, string given, called in /home/yceruto/github/symfony/symfony-demo/vendor/symfony/dependency-injection/Compiler/ServiceLocatorTagPass.php on line 81
or after https://github.com/symfony/symfony/pull/24582:
> Invalid service locator definition: only services can be referenced, "string" found for key "foo". Inject parameter values using constructors instead.
Commits
-------
a1df9af20f don't bind scalar values to controller method arguments
This PR was merged into the 2.7 branch.
Discussion
----------
Username and password in basic auth are allowed to contain '.'
Initially reported by Fede Isas in https://github.com/beberlei/assert/pull/234
| Q | A
| ------------- | ---
| Branch? | 2.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
e5d57dd050 Username and password in basic auth are allowed to contain '.'
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] Do not process bindings in AbstractRecursivePass
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #24559
| License | MIT
| Doc PR | n/a
Commits
-------
6a6256c6a8 Do not process bindings in AbstractRecursivePass
The console formatter does a better job, unless the VarDumper component
is missing, in which case you will not see the "context" or "extra" keys
and the LineFormatter should be preferred.
This PR was merged into the 3.4 branch.
Discussion
----------
adding AdapterInterface alias for cache.app
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no-ish
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | TODO
I'd like to add this alias for autowiring. If only `CacheItemPoolInterface` is available, then it's a bit weird to use the extra Symfony cache features (e.g. tagging), as I'm calling methods on the `CacheItemPoolInterface` that don't exist. I'd rather type-hint `AdapterInterface` and confidently call those (+ get auto-complete).
Commits
-------
454f65a77d adding AdapterInterface alias for cache.app
This PR was merged into the 3.3 branch.
Discussion
----------
add DOMElement as return type in Crawler::getIterator to support foreach support in ide
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
In `Crawler::getIterator` return type is missing so ide (PhpStorm) is not able to provide completion inside foreach statements. This PR adds `DOMElement[]` to it
```php
$crawler = new Crawler('foobar');
foreach($crawler->filter('a') as $link) {
# support completion
$link->...
}
```
Commits
-------
2350597288 add DOMElement as return type in Crawler::getIterator to support foreach support in ide
This PR was merged into the 2.7 branch.
Discussion
----------
[Debug] Fix same vendor detection in class loader
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Fix about same vendor detection in ClassLoader. Actually, detected namespace for `Doctrine\ORM\Configuration` is `Doctrine\ORM` instead of `Doctrine\`. So deprecations are triggered for classes in same namespace.
Commits
-------
d2ab0d8019 [Debug] Fix same vendor detection in class loader
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpFoundation] Make sessions secure and lazy
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | not yet
| Fixed tickets | #6388, #6036, #12375, #12325
| License | MIT
| Doc PR | -
The `SessionUpdateTimestampHandlerInterface` (new to PHP 7.0) is mostly undocumented, and just not implemented anywhere. Yet, it's required to implement session fixation preventions and lazy write in userland session handlers (there is https://wiki.php.net/rfc/session-read_only-lazy_write which describes the behavior.)
By implementing it, we would make Symfony session handling much better and stronger. Meanwhile, doing some cookie headers management, this also gives the opportunity to fix the "don't start if session is only read issue".
So, here we are for the general idea. Now needs more (and green) tests, and review of course.
Commits
-------
347939c9b3 [HttpFoundation] Make sessions secure and lazy
This PR was merged into the 3.3 branch.
Discussion
----------
[3.3] Fixed pathinfo calculation for requests starting with a question mark.
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #24487
| License | MIT
| Doc PR | no
Fix of bad merge conflict resolving as mentioned in #24487. Port #21968 to 3.3+
Commits
-------
c17a92259a Fixed pathinfo calculation for requests starting with a question mark. - fix bad conflict resolving issue - port symfony/symfony#21968 to 3.3+
This PR was squashed before being merged into the 3.4 branch (closes#24556).
Discussion
----------
[Routing] Ensure uniqueness without repeated check
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
The RouteCollection ensures uniqueness of resources by using array_unique. The current implementation suffers from the following problems.
1. The array_unique method calls __toString for every element in the array but it is very inefficient in terms of the number of calls made. I.e. if the array has 50 elements it does not do 50 __toString calls. I did some tests with Blackfire in PHP 7.1 and found the following numbers.
25 elements => 240 calls
50 elements => 607 calls
100 elements => 1382 calls
200 elements => 3333 calls
2. The array_unique function is called every time the getResources() method is called, even when the resources did not change in the mean time. Combined with the above this leads to lower performance.
Many applications have a low number of routes so this is not a big issue. But for larger applications or bundles that generate routes (i.e. for CRUD or API / doc generation) this will have a bigger impact.
Commits
-------
16f7281178 [Routing] Ensure uniqueness without repeated check
This PR was merged into the 3.3 branch.
Discussion
----------
Fixed mistake in exception expectation
| 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 |
In some cases, (5 to be exact), the `expectException` is misused while attempting to provide compatibility with the older `setExpectedException` by making use of a non-existent parameter.
Firstly, this makes the tests inconsistent (old PHPUnit version test exception message, while newer one doesn't). Secondly, if PHPUnit interface suddenly starts making use of a 2nd parameter in `expectException`, the existing code might break or cause unexpected side-effects.
Original report: 87bb726712 (commitcomment-24848315)
Commits
-------
03be003 Fixed mistake in exception expectation
This PR was merged into the 2.7 branch.
Discussion
----------
[Security] Reject remember-me token if UserCheckerInterface::checkPostAuth() fails
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #24525
| License | MIT
| Doc PR | -
I think this is a security hole - a user can remain logged in with a remember me cookie even though they can no longer pass `UserCheckInterface::checkPostAuth()` (could be disabled).
This is a small BC break but shouldn't be an issue as I think it is a bug. I don't think this requires a BC layer but if so, I can add.
Commits
-------
fe190b6ee9 reject remember-me token if user check fails
* 3.4:
[TwigBridge] fix BC for FormExtension if renderer is FormRenderer
[Form] Fix 5.5 compatibility for ResizeFormListener
[BrowserKit] Handle deprecations triggered in insulated requests
[Bridge\PhpUnit] Handle deprecations triggered in separate processes
Fix LogLevel::DEBUG as min level
[Validator] added magic method __isset() to File Constraint class
Support array of types in allowed type
[DI] Fix possible incorrect php-code when dumped strings contains newlines
[Translation] minor: remove unused variable in test
added ability to handle parent classes for PropertyNormalizer
replace parameters in dummy identity translator
never match invalid IP addresses
* 3.3:
[BrowserKit] Handle deprecations triggered in insulated requests
[Bridge\PhpUnit] Handle deprecations triggered in separate processes
[Validator] added magic method __isset() to File Constraint class
[DI] Fix possible incorrect php-code when dumped strings contains newlines
[Translation] minor: remove unused variable in test
never match invalid IP addresses
* 2.8:
[Validator] added magic method __isset() to File Constraint class
[DI] Fix possible incorrect php-code when dumped strings contains newlines
[Translation] minor: remove unused variable in test
never match invalid IP addresses
* 2.7:
[Validator] added magic method __isset() to File Constraint class
[DI] Fix possible incorrect php-code when dumped strings contains newlines
[Translation] minor: remove unused variable in test
never match invalid IP addresses
This PR was squashed before being merged into the 3.4 branch (closes#24535).
Discussion
----------
[TwigBridge] fix BC for FormExtension if renderer is FormRenderer
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/24533
| License | MIT
| Doc PR | -
This fixes some issues within FormExtension since the renderer is now a `FormRenderer`.
Commits
-------
4a2f608f1e [TwigBridge] fix BC for FormExtension if renderer is FormRenderer
This PR was merged into the 3.4 branch.
Discussion
----------
[OptionsResolver] Support array of types in allowed type
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #17032, #15524
| License | MIT
| Doc PR | TBD
This replaces #17032 with a simpler approach to allow an array of types in the allowed types for the options resolver
Note: This implementation doesn't support nested values (I.E `int[][]`), but if there is a strong need for it, I'll add it in another PR
Commits
-------
d066a23860 Support array of types in allowed type
This PR was squashed before being merged into the 3.4 branch (closes#24321).
Discussion
----------
added ability to handle parent classes for PropertyNormalizer
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes <!-- 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 | #24152 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!--highly recommended for new features-->
<!--
- 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 3.4,
legacy code removals go to 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.
-->
This adds the ability for PropertyNormalizer to normalize/denormalize properties from parent classes.
Commits
-------
5ecafc5e25 added ability to handle parent classes for PropertyNormalizer
This PR was merged into the 3.4 branch.
Discussion
----------
[Console][HttpKernel] Handle new SHELL_VERBOSITY env var, also configures the default logger
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
On the CLI, the behavior of the new default logger is not nice: it's verbosity is controlled by `kernel.debug`, where I would expect to be able to control it by mean of verbosity.
To achieve this, I propose to handle a new `SHELL_VERBOSITY` env var, and use it to control both commands' verbosity, and the logger's log level.
Commits
-------
87bd741f2d [Console][HttpKernel] Handle new SHELL_VERBOSITY, also configures the default logger
This PR was merged into the 2.7 branch.
Discussion
----------
[HttpFoundation] never match invalid IP addresses
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #24424
| License | MIT
| Doc PR |
Commits
-------
8ad32f0ef5 never match invalid IP addresses
* 3.4:
fix merge
fix merge
[FORM] Prevent forms from extending itself as a parent
fix merge
Fix 7.2 compat layer
[DI] Prefixed env vars and load time inlining are incompatible
bug #24499 [Bridge\PhpUnit] Fix infinite loop when running isolated method (bis) (nicolas-grekas)
Fix PHP 7.2 support
[HttpFoundation] Add missing session.lazy_write config option
[DI] Exclude inline services declared in XML from autowiring candidates
[HttpFoundation] Combine Cache-Control headers
[Form] fix parsing invalid floating point numbers
Escape command usage when displaying it in the text descriptor
[DI] Throw accurate failures when accessing removed services
[DI] Turn private defs to non-public ones before removing passes
Use for=ID on radio/checkbox label.
* the `phpdocumentor/type-resolver` package was not PHP 7.2 compatible
before release 0.2.1 (see see phpDocumentor/TypeResolver@e224fb2)
* the validator must not call `get_class()` if no object but a class
name was passed to the `validatePropertyValue()` method
* 2.8:
fix merge
Fix 7.2 compat layer
Fix PHP 7.2 support
[HttpFoundation] Add missing session.lazy_write config option
[HttpFoundation] Combine Cache-Control headers
[Form] fix parsing invalid floating point numbers
Escape command usage when displaying it in the text descriptor
Use for=ID on radio/checkbox label.
* 2.7:
Fix 7.2 compat layer
Fix PHP 7.2 support
[HttpFoundation] Add missing session.lazy_write config option
[HttpFoundation] Combine Cache-Control headers
[Form] fix parsing invalid floating point numbers
Escape command usage when displaying it in the text descriptor
Use for=ID on radio/checkbox label.
This PR was merged into the 2.7 branch.
Discussion
----------
[HttpFoundation] Combine Cache-Control headers
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
If multiple `Cache-Control` headers are added to a `ResponseHeaderBag`, only the first is returned by `$bag->get('Cache-Control')`.
Commits
-------
1f76a70b6f [HttpFoundation] Combine Cache-Control headers
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] Throw accurate failures when accessing removed services
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #24444
| License | MIT
| Doc PR | -
See linked issue.
This will throw a useful message when accessing a removed service.
When setting a removed service, a deprecation notice will be thrown also so that in master we can throw an exception then.
Commits
-------
fe7f26d4f3 [DI] Throw accurate failures when accessing removed services
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] Prefixed env vars and load time inlining are incompatible
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
That's because env var processors are not registered yet.
Commits
-------
91c9287c55 [DI] Prefixed env vars and load time inlining are incompatible
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] Turn private defs to non-public ones before removing passes
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #24465
| License | MIT
| Doc PR | -
As spotted by @stof in https://github.com/symfony/symfony/issues/24465#issuecomment-334786670.
Commits
-------
e5d0934b87 [DI] Turn private defs to non-public ones before removing passes
This PR was merged into the 2.7 branch.
Discussion
----------
Fix support for PHP 7.2
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no
| Fixed tickets | #23671
| License | MIT
| Doc PR | -
There are still the deprecation problem with phpunit since it use `each()`.
There are 3 tests linked to session that I don't know how to fix / what to do, do you have any idea @nicolas-grekas ?
Commits
-------
fdf285b5c9 Fix 7.2 compat layer
e229dd0302 Fix PHP 7.2 support
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] Exclude inline services declared in XML from autowiring candidates
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #24311
| License | MIT
| Doc PR | -
As reported in #24311, inline services should not be candidates for autowiring.
This PR fixes the issue, but is submitted against 3.4 because there is a potential BC break here, for ppl that didn't realize they relied on this (already deprecated) behavior.
We *could* not merge this PR and consider the deprecation is fine - but in practice, the WTF is hitting several ppl already AFAIK, so we should close that door IMHO.
Commits
-------
d90e7212ea [DI] Exclude inline services declared in XML from autowiring candidates
This PR was merged into the 4.0-dev branch.
Discussion
----------
[Bridge\PhpUnit] Fix infinite loop when running isolated method (bis)
| 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 | -
The blacklisting system is a bit rigid, so let's work around it.
Commits
-------
9d9d596 [Bridge\PhpUnit] Fix infinite loop when running isolated method (bis)
This PR was merged into the 4.0-dev branch.
Discussion
----------
[Bridge\PhpUnit] Fix infinite loop when running isolated method (bis)
| 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 | -
The blacklisting system is a bit rigid, so let's work around it.
Commits
-------
9d9d596 [Bridge\PhpUnit] Fix infinite loop when running isolated method (bis)
* 3.4:
Clarify the exceptions are going to be rendered just after
[DI] Remove colon from env placeholders
fixed CS
[Yaml] initialize inline line numbers
[Workflow] Added tests for the is_valid() guard expression
[Workflow] Added guard 'is_valid()' method support
Add & use OptionResolverIntrospector
Add debug:form type option
This PR was merged into the 2.7 branch.
Discussion
----------
[Form] Use for=ID on radio/checkbox label.
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
I recently let Europe's leading accessibility experts (Funkanu.se) review a site of mine, they gave me (among other) this feedback.
> Putting the checkbox/radio input inside the label is great, but the label still needs the "for=ID". Screen readers like Jaws does not work properly without this attribute.
Commits
-------
53d7857092 Use for=ID on radio/checkbox label.
This PR was merged into the 4.0-dev branch.
Discussion
----------
[HttpKernel] minor: add ability to construct with headers on http exceptions
| 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 adds the ability to set the headers for the exception within the constructor.
With alot of the following exceptions its sometimes very useful to be able to set the headers. For example with a reverse proxy cache (Varnish) if you want to match the `Retry-After` with a Varnish cache header to protect the backend.
I see that `setHeaders()` did get added 6a1080f899 but that means the exception needs to be assigned to a variable and set and then thrown, it also doesn't merge with the existing header set in some of the constructors.
~~I've chosen to `array_merge()` where key/values~~ were being set within the constructor as I think this is the most useful and 'correct' whereas `setHeaders` is explicit that its setting not amending or adding to.
Commits
-------
612fb59b32 [HttpKernel] minor: add ability to construct with headers on http exceptions
This PR was merged into the 3.4 branch.
Discussion
----------
[DX][FrameworkBundle] Clarify where to find exceptions for non-registered commands
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ø
| License | MIT
| Doc PR | ø
As a developer, when I saw "Some commands could not be registered." displayed on my console... it wasn't clear ether the next displayed exception was related to this or not. Just adding a reference to the "following errors" would help.
Commits
-------
427212d869 Clarify the exceptions are going to be rendered just after
This PR was merged into the 3.3 branch.
Discussion
----------
[DependencyInjection] remove unused fixtures file
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
I was wondering why the conflict markers in the `master` branch (see b6e9471ded/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services31.php (L43-L52)) did not cause any issues. Turned out that this fixtures file was not used anymore (it was only partially removed in #23022).
Commits
-------
3702e5ff37 remove unused fixtures file
This PR was merged into the 3.4 branch.
Discussion
----------
[Workflow] add guard is_valid() method support
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | Yes
| License | MIT
Workflow guard configuration support expression language like **is_fully_authenticated()**, **has_role()** or **is_granted()**, etc...
I would like to add the support for a new **is_valid()** expression.
Configuration allow to validate subject against specific validation groups to check if a transition can be applied.
In the next configuration exemple, my issue must validate "affectable" validation group to apply "affect" transistion:
```yaml
framework:
workflows:
issue:
marking_store:
type: single_state
arguments:
- state
supports: AppBundle\Entity\Issue
initial_place: created
places:
- created
- affected
- closed
transitions:
affect:
guard: "is_valid(subject, ['affectable'])"
from: created
to: affected
close:
from: completed
to: closed
```
Commits
-------
06d8198714 [Workflow] Added tests for the is_valid() guard expression
9499bc291c [Workflow] Added guard 'is_valid()' method support
* 3.4: (26 commits)
bumped Symfony version to 3.3.11
updated VERSION for 3.3.10
updated CHANGELOG for 3.3.10
bumped Symfony version to 2.8.29
updated VERSION for 2.8.28
updated CHANGELOG for 2.8.28
bumped Symfony version to 2.7.36
updated VERSION for 2.7.35
update CONTRIBUTORS for 2.7.35
updated CHANGELOG for 2.7.35
Added deprecation to cwd not existing Fixes#18249
[Session] fix MongoDb session handler to gc all expired sessions
Add changelog for deprecated DbalSessionHandler
[Security] Look at headers for switch user username parameter
Updated Test name and exception name to be more accurate
newline at end of file
changed exception message
Ahh, I see. It actually wants a newline!
Removed newline
Created new Exception to throw and modified tests.
...
* 3.3: (23 commits)
bumped Symfony version to 3.3.11
updated VERSION for 3.3.10
updated CHANGELOG for 3.3.10
bumped Symfony version to 2.8.29
updated VERSION for 2.8.28
updated CHANGELOG for 2.8.28
bumped Symfony version to 2.7.36
updated VERSION for 2.7.35
update CONTRIBUTORS for 2.7.35
updated CHANGELOG for 2.7.35
[Session] fix MongoDb session handler to gc all expired sessions
Updated Test name and exception name to be more accurate
newline at end of file
changed exception message
Ahh, I see. It actually wants a newline!
Removed newline
Created new Exception to throw and modified tests.
Created new Exception to throw and modified tests
Code standard fixes
Changed automatic token generation to throw an exception instead
...
* 2.8:
bumped Symfony version to 2.7.36
updated VERSION for 2.7.35
update CONTRIBUTORS for 2.7.35
updated CHANGELOG for 2.7.35
[Session] fix MongoDb session handler to gc all expired sessions
This PR was merged into the 3.4 branch.
Discussion
----------
[Security] Look at headers for switch_user username
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #24260
| License | MIT
| Doc PR | n/a
Allowing `switch_user.parameter` config node to be a header name.
It's supported by SwitchUserStatelessBundle and I think it makes sense.
Forgotten in #24260 so targets 3.4 but not a blocker.
Commits
-------
3c801951c8 [Security] Look at headers for switch user username parameter
* 2.7:
bumped Symfony version to 2.7.36
updated VERSION for 2.7.35
update CONTRIBUTORS for 2.7.35
updated CHANGELOG for 2.7.35
[Session] fix MongoDb session handler to gc all expired sessions
This PR was merged into the 3.3 branch.
Discussion
----------
Added support for guards when advancing workflow from a command
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #23904
| License | MIT
| Doc PR | symfony/symfony-docs
Added support for advancing a workflow from the command line when the transition has guards.
Commits
-------
15fd863112 Updated Test name and exception name to be more accurate
fefc20233b newline at end of file
8f2fa6b047 changed exception message
49839e3c28 Ahh, I see. It actually wants a newline!
2c9d1e2d42 Removed newline
92308b4815 Created new Exception to throw and modified tests.
2ebc71a616 Created new Exception to throw and modified tests
3a8b2eded1 Code standard fixes
22b44e251f Changed automatic token generation to throw an exception instead
8ab59cb1c2 Updated if statement
324c208e12 Code standards update
b044ffb4a2 Added support for guards when advancing workflow from a command
This PR was merged into the 3.4 branch.
Discussion
----------
[Session] deprecate MemcacheSessionHandler
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
memcache extension didn't get a release since 4.5 years and is not compatible with PHP 7. see https://pecl.php.net/package/memcache
also the cache and lock components only provide adapters for memcached as well, no memcache
Commits
-------
989326b988 [Session] deprecate MemcacheSessionHandler
* 3.4:
[Bridge\Doctrine][FrameworkBundle] Deprecate some remaining uses of ContainerAwareTrait
[FrameworkBundle] Fix bad interface hint in AbstractController
[VarDumper] deprecate MongoCaster
[HttpFoundation] deprecate using with the legacy mongo extension; use it with the mongodb/mongodb package and ext-mongodb instead
Fix BC layer
Reset profiler.
[DI] Improve some deprecation messages
[DI] remove inheritdoc from dumped container
[Config] Fix dumped files invalidation by OPCache
[Security] Add Guard authenticator <supports> method
[Cache] Fix race condition in TagAwareAdapter
[DI] Allow setting any public non-initialized services
[Yaml] parse references on merge keys
treat trailing backslashes in multi-line strings
[FrameworkBundle] Expose dotenv in bin/console about
fix refreshing line numbers for the inline parser
fix version in changelog
[FrameworkBundle] Make Controller helpers final
[DoctrineBridge] Deprecate DbalSessionHandler
* 3.3:
[FrameworkBundle] Fix bad interface hint in AbstractController
[DI] Improve some deprecation messages
[Cache] Fix race condition in TagAwareAdapter
[Yaml] parse references on merge keys
treat trailing backslashes in multi-line strings
This PR was merged into the 3.3 branch.
Discussion
----------
[FrameworkBundle] Fix bad interface hint in AbstractController
| 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 | -
As spotted by @stof
Commits
-------
5d29dd0d28 [FrameworkBundle] Fix bad interface hint in AbstractController
This PR was merged into the 3.4 branch.
Discussion
----------
[Bridge\Doctrine][FrameworkBundle] Deprecate some remaining uses of ContainerAwareTrait
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
With this PR, the last two remaining uses of ContainerAwareTrait will be `Symfony\Component\HttpKernel\Bundle\Bundle` and `Symfony\Bundle\FrameworkBundle\Controller\Controller`.
For Bundle, I think it's legitimate, for Controller, I think it's not, but that we should wait for 4.1 before considering its deprecation, alongside with `ContainerAwareCommand` (maybe).
Commits
-------
df9c8748e3 [Bridge\Doctrine][FrameworkBundle] Deprecate some remaining uses of ContainerAwareTrait
This PR was squashed before being merged into the 3.4 branch (closes#24438).
Discussion
----------
[Session][VarDumper] Deprecate accepting legacy mongo extension
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
The old ext-mongo is deprecated and does not work with PHP 7. See http://php.net/manual/en/mongo.setup.php
People should use mongodb/mongodb and ext-mongodb instead. This deprecates functionality using the old ext-mongo classes.
Commits
-------
d535ff60c2 [VarDumper] deprecate MongoCaster
6651af07c2 [HttpFoundation] deprecate using with the legacy mongo extension; use it with the mongodb/mongodb package and ext-mongodb instead
This PR was merged into the 3.4 branch.
Discussion
----------
[DoctrineBridge] Deprecate dbal session handler
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #20501
| License | MIT
| Doc PR |
The DbalSessionHandler misses all the improvements from the PdoSessionHandler (lock modes, delayed GC, configurable naming). The only advantage it had was the ability to work with non-pdo drivers. But since DBAL requires PDO now as well (36df6828b3) even that is not really relevant anymore.
Stofs argument in https://github.com/symfony/symfony/issues/20501#issuecomment-260131521 sound like a new feature that can be implemented separately. Ref. #24267
Commits
-------
ffc74eb959 [DoctrineBridge] Deprecate DbalSessionHandler
This PR was merged into the 4.0-dev branch.
Discussion
----------
[Process] Removed dead code in the start method
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
1eee2a461c [Process] Removed dead code in the start method
This PR was merged into the 3.3 branch.
Discussion
----------
[Cache] Fix race condition in TagAwareAdapter
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #24240
| License | MIT
| Doc PR | -
This code is not needed, and might create a race condition (see linked issue). Let's drop it.
When no tags are set on an item, this stores an empty tags array, instead of deleting the tags array entry at all.
Commits
-------
fa24fa8a3c [Cache] Fix race condition in TagAwareAdapter
This PR was merged into the 3.4 branch.
Discussion
----------
[Security] Add Guard authenticator <supports> method
This method will be called before starting an authentication against a guard authenticator.
The authentication will be tried only if the supports method returned `true`
This improves understanding of code, increase consistency and removes responsability for `getCredentials` method to decide if the current request should be supported or not.
| Q | A |
| --- | --- |
| Bug fix? | no |
| New feature? | yes |
| BC breaks? | yes |
| Deprecations? | yes |
| Tests pass? | yes |
| Fixed tickets | none |
| License | MIT |
| Doc PR | |
Commits
-------
78eecba780 Fix BC layer
a7a6f8a678 [Security] Add Guard authenticator <supports> method
This method will be called before starting an authentication against a guard authhenticator.
The authentication will be tried only if the supports method returned <true>
This improves understanding of code, increase consistency and removes responsability for <getCredentials> method
To decide if the current request should be supported or not.
This PR was merged into the 4.0-dev branch.
Discussion
----------
[Intl] fix return type value
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
0e1ce34102 [Intl] fix return type value
This PR was merged into the 3.4 branch.
Discussion
----------
[FrameworkBundle] Make Controller helpers final
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
I propose to make all ControllerTrait methods final so we can add type hints.
I also propose to add ControllerTrait::has/get so that AbstractController also has the methods.
This will help move from Controller to AbstractController.
Commits
-------
bbc52a1d14 [FrameworkBundle] Make Controller helpers final
This PR was merged into the 3.4 branch.
Discussion
----------
[Yaml] fix refreshing line numbers for the inline parser
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
5518896c26 fix refreshing line numbers for the inline parser
* 3.4: (33 commits)
Remove remaining `@experimental` annotations
Tests and fix for issue in array model data in EntityType field with multiple=true
[Validator] Add unique entity violation cause
[Lock] Automaticaly release lock when user forget it
[Form] Fixed PercentToLocalizedStringTransformer to accept both comma and dot as decimal separator, if possible
fixed CS
[FrameworkBundle] Don't clear app pools on cache:clear
Hide label button when its setted to false
removed useless PHPDoc
[HttpFoundation] Return instance in StreamedResponse
[Form] Fix FormInterface::submit() annotation
[PHPUnitBridge] don't remove when set to empty string
PdoSessionHandler: fix advisory lock for pgsql when session.sid_bits_per_character > 4
HttpCache does not consider ESI resources in HEAD requests
Fix translation for "This field was not expected"
[Routing] Enhance Route(Collection) docblocks
Added improvement for accuracy in MoneyToLocalizedStringTransformer.
Removed unused private property
Use correct verb form in the pull request template
Use PHP_MAXPATHLEN in Filesystem.
...
* 3.3: (23 commits)
Tests and fix for issue in array model data in EntityType field with multiple=true
[Form] Fixed PercentToLocalizedStringTransformer to accept both comma and dot as decimal separator, if possible
removed useless PHPDoc
[Form] Fix FormInterface::submit() annotation
[PHPUnitBridge] don't remove when set to empty string
PdoSessionHandler: fix advisory lock for pgsql when session.sid_bits_per_character > 4
HttpCache does not consider ESI resources in HEAD requests
Fix translation for "This field was not expected"
[Routing] Enhance Route(Collection) docblocks
Added improvement for accuracy in MoneyToLocalizedStringTransformer.
Removed unused private property
Use correct verb form in the pull request template
Use PHP_MAXPATHLEN in Filesystem.
Added null as explicit return type (?TokenInterface)
[FrameworkBundle] Fix Routing\DelegatingLoader
Render all line breaks according to the exception message
[Form] Fix phpdoc
[DI] remove confusing code
[Form] Fixed GroupSequence with "constraints" option
[Validator] Clarify UUID validator behavior
...
* 2.8: (22 commits)
Tests and fix for issue in array model data in EntityType field with multiple=true
[Form] Fixed PercentToLocalizedStringTransformer to accept both comma and dot as decimal separator, if possible
removed useless PHPDoc
[Form] Fix FormInterface::submit() annotation
PdoSessionHandler: fix advisory lock for pgsql when session.sid_bits_per_character > 4
HttpCache does not consider ESI resources in HEAD requests
Fix translation for "This field was not expected"
[Routing] Enhance Route(Collection) docblocks
Added improvement for accuracy in MoneyToLocalizedStringTransformer.
Removed unused private property
Use correct verb form in the pull request template
Use PHP_MAXPATHLEN in Filesystem.
Added null as explicit return type (?TokenInterface)
[FrameworkBundle] Fix Routing\DelegatingLoader
Render all line breaks according to the exception message
[Form] Fix phpdoc
[DI] remove confusing code
[Form] Fixed GroupSequence with "constraints" option
[Validator] Clarify UUID validator behavior
[Filesystem] Fixed makePathRelative
...
* 2.7: (22 commits)
Tests and fix for issue in array model data in EntityType field with multiple=true
[Form] Fixed PercentToLocalizedStringTransformer to accept both comma and dot as decimal separator, if possible
removed useless PHPDoc
[Form] Fix FormInterface::submit() annotation
PdoSessionHandler: fix advisory lock for pgsql when session.sid_bits_per_character > 4
HttpCache does not consider ESI resources in HEAD requests
Fix translation for "This field was not expected"
[Routing] Enhance Route(Collection) docblocks
Added improvement for accuracy in MoneyToLocalizedStringTransformer.
Removed unused private property
Use correct verb form in the pull request template
Use PHP_MAXPATHLEN in Filesystem.
Added null as explicit return type (?TokenInterface)
[FrameworkBundle] Fix Routing\DelegatingLoader
Render all line breaks according to the exception message
[Form] Fix phpdoc
[DI] remove confusing code
[Form] Fixed GroupSequence with "constraints" option
[Validator] Clarify UUID validator behavior
[Filesystem] Fixed makePathRelative
...
This PR was squashed before being merged into the 2.7 branch (closes#23980).
Discussion
----------
Tests and fix for issue in array model data in EntityType field with multiple=true
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| License | MIT
| Fixed tickets | #23927
Provided some tests and the fix for #23927.
Rebased to 2.7, replaces #23930
Commits
-------
aaba6b4c2b Tests and fix for issue in array model data in EntityType field with multiple=true
This PR was squashed before being merged into the 3.4 branch (closes#23845).
Discussion
----------
[Validator] Add unique entity violation cause
| Q | A
| ------------- | ---
| Branch? | 3.4 or master
| Bug fix? | no
| New feature? | yes/no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | n/a
This PR adds unique entity validation error cause which can be array of entities to constraint violation
Commits
-------
7ae06dc617 [Validator] Add unique entity violation cause
This PR was squashed before being merged into the 3.4 branch (closes#22132).
Discussion
----------
[Lock] Automaticaly release lock when user forget it
| 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 objective of this PR is to automatically release the Lock when the user forget to call the `release` method (like the `fclose` function does in, php core).
The implementation is comparable to #22115 but the purpose is not the same.
I create a new PR to not mix things.
Commits
-------
2eedc1fd37 [Lock] Automaticaly release lock when user forget it
This PR was squashed before being merged into the 2.7 branch (closes#22586).
Discussion
----------
[Form] Fixed PercentToLocalizedStringTransformer to accept both comma and dot as decimal separator, if possible
| Q | A
| ------------- | ---
| Branch? | 2.7 <!-- see comment below -->
| Bug fix? | yes-ish
| 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 | <!-- #-prefixed issue number(s), if any -->
| License | MIT
<!--
- 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.
-->
Implements the same behaviour that `NumberToLocalizedStringTransformer` in order to accept both comma and dot implemented in #5941
Commits
-------
f96a7f81b8 [Form] Fixed PercentToLocalizedStringTransformer to accept both comma and dot as decimal separator, if possible
This PR was merged into the 3.4 branch.
Discussion
----------
Bootstrap4 support for Twig form theme
**This PR is a followup from #19648. That PR was closed because GitHub thought my branch contained no commits after a force push...**
| Q | A |
| --- | --- |
| Branch? | master |
| Bug fix? | no |
| New feature? | yes |
| BC breaks? | no |
| Deprecations? | no |
| Tests pass? | yes |
| Fixed tickets | #16289 |
| License | MIT |
| Doc PR | - |
I have made a port of the Twig form theming code for Bootstrap 3 to the α-5 version of Bootstrap 4.
- The (inheritance) structure of the form theming files has changed because a number of blocks are the same between BS 3 and 4. They have been migrated to `bootstrap_base_layout.html.twig`.
The new tree is as follows:
```
bootstrap_base_layout.html.twig
|-- bootstrap_3_layout.html.twig
| `-- bootstrap_3_horizontal_layout.html.twig
`-- bootstrap_4_layout.html.twig
`-- bootstrap_4_horizontal_layout.html.twig
```
- Any occurances of `.form-horizontal` have been removed from the BS 4 code.
- Checkboxes and radio buttons have been stacked using the `.form-check`, `.form-check-label` and `.form-check-input` classes. There is now no distinction between checkboxes and radio buttons in the markdown.
- All layout tests have been added and updated for BS4. The inheritance tree is as follows:
```
AbstractLayoutTest
`-- AbstractBootstrap3LayoutTest
|-- AbstractBootstrap3HorizontalLayoutTest
`-- AbstractBootstrap4LayoutTest
`-- AbstractBootstrap4HorizontalLayoutTest
```
All tests pass. The classes `FormExtensionBootstrap4LayoutTest` and `FormExtensionBootstrap4HorizontalLayoutTest` have been created similarly to the BS 3 versions.
- ~~The label coloring on an validation is not correct. I've made an issue (twbs/bootstrap#20535) of the problem.~~
- No [custom form elements](http://v4-alpha.getbootstrap.com/components/forms/#custom-forms) have been used.
- A docs PR can be created if this PR is accepted.
- The new code might have to be updated if large changes occur in the BS 4 α.
Screenshot of BS3 and 4 comparison for the same form:
![1](https://cloud.githubusercontent.com/assets/1073881/17732594/dfcb50d6-6472-11e6-8e96-c46987809322.PNG)
Commits
-------
f12e5887ff Removed unneeded wrapping quotes around a Twig key
709f134dc8 Removed unneeded wrapping quotes around a Twig key
4222d54a53 Initial commit for Bootstrap 4 form theme, based on Bootstrap 3 form theme
This PR was merged into the 3.4 branch.
Discussion
----------
[FrameworkBundle] Don't clear app pools on cache:clear
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no, but behavior change
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #23685
| License | MIT
| Doc PR | -
The cache:clear command currently clears all cache pools by default.
This is not expected and is a bad default behavior (as explained in linked issue).
If we don't want to have that behavior forever, I see no other option than just doing the change, as done here, targeting 3.4.
Commits
-------
b0c04f8354 [FrameworkBundle] Don't clear app pools on cache:clear
Added same behaviour in buttons like in other form components when label is setted to false, don't show it. It's very useful with buttons with icon and without text
This PR was merged into the 2.7 branch.
Discussion
----------
[Intl] Fixed support of Locale::getFallback
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #24154
| License | MIT
| Doc PR |
Commits
-------
256055218e [Intl] Fixed support of Locale::getFallback
This PR was merged into the 2.7 branch.
Discussion
----------
[HttpFoundation] Fix file upload multiple with no files
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
```php
<form method="post" enctype="multipart/form-data">
<input type="file" multiple name="img[]">
<input type="submit">
</form>
<?php
$loader = require __DIR__ . '/../app/autoload.php';
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$request = \Symfony\Component\HttpFoundation\Request::createFromGlobals();
var_export($request->files->all()['img']);
}
```
Expected result when I send the form without any files:
```
array ()
```
Actual result:
```
array ( 0 => NULL, )
```
This causes a problem later when using FileType with multiple option - if no files are sent the form data are `[0 => '']` instead of `[]`.
Of course I need to add a test for this.
Commits
-------
d4f6039dcd [HttpFoundation] Fix file upload multiple with no files
This PR was squashed before being merged into the 3.4 branch (closes#24374).
Discussion
----------
[HttpFoundation] Return instance in StreamedResponse
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
<!--
- 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 3.4,
legacy code removals go to 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
-------
2080582a75 [HttpFoundation] Return instance in StreamedResponse
* 3.4:
[FrameworkBundle] Register a NullLogger from test kernels
[SecurityBundle] Deprecate auto picking the first provider
[Security] Add user impersonation support for stateless authentication
This PR was merged into the 3.4 branch.
Discussion
----------
[FrameworkBundle] Register a NullLogger from test kernels
| Q | A
| ------------- | ---
| Branch? | 3.4 <!-- see comment below -->
| 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 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
Relates to #24300
This will avoid unnecessary output on Travis or when running FrameworkBundle tests locally:
- before: https://travis-ci.org/symfony/symfony/jobs/281624658#L3594-L3635
- after: https://travis-ci.org/symfony/symfony/jobs/281643868#L3599-L3617
but also needed for anyone running functional tests on their project and using the default logger, in order to not get garbage output.
Do we need to find a more generic solution (like exposing a `framework.default_logger` option so users can set it to false for test)? Or just documenting this?
Commits
-------
c109dcd5ae [FrameworkBundle] Register a NullLogger from test kernels
This PR was merged into the 3.4 branch.
Discussion
----------
[SecurityBundle] Deprecate auto picking the first provider
when no provider is explicitly configured on a firewall
| Q | A
| ------------- | ---
| Branch? | 3.4 <!-- see comment below -->
| Bug fix? | no
| New feature? | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks? | no
| Deprecations? | yes <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass? | yes
| Fixed tickets | https://symfony-devs.slack.com/archives/C3A2XAQ20/p1506626210000345 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
From @Pierstoval on Slack:
> Hey, guys, I learnt a few days ago that if you don't specify a user provider in a firewall configuration, the security will use the first one in the list. Don't anyone think specifying the user provider should be mandatory ? Or at least mandatory if we have more than one provider registered?
- [x] UPGRADE files
- [x] CHANGELOG
- [x] Fix other tests
- [x] Removal PR #24380
Commits
-------
2d1e3347a6 [SecurityBundle] Deprecate auto picking the first provider
This PR was squashed before being merged into the 3.4 branch (closes#24300).
Discussion
----------
[HttpKernel][FrameworkBundle] Add a minimalist default PSR-3 logger
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes <!-- 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 provides a minimalist PSR-3 logger that is always available when FrameworkBundle is installed.
By default, it writes errors on `stderr`, regular logs on `stdout` and discards debug data (this is configurable).
This approach has several benefits:
- It's what expect from an app logging systems of major containerization and orchestration tools including [Docker](https://docs.docker.com/engine/admin/logging/view_container_logs/) and [Kubernetes](https://kubernetes.io/docs/concepts/cluster-administration/logging/), as well as most cloud providers such as [Heroku](https://devcenter.heroku.com/articles/logging#writing-to-your-log) and [Google Container Engine](https://kubernetes.io/docs/tasks/debug-application-cluster/logging-stackdriver/). If the app follows this standard (and it's not currently the case with Symfony by default) logs will be automatically collected, aggregated and stored.
- It's in sync with the "back to Unix roots" philosophy of Flex
- Logs are directly displayed in the console when running the integrated PHP web server (`bin/console server:start` or Flex's `make serve`), Create React App also do that for instance.
- It fixes a common problem when installing Flex recipes: many bundles expect a logger service but currently there is none available by default, and you usually get a `"logger" service not found error` (because packages depend of the PSR, but the PSR doesn't provide a logger service).
Commits
-------
9a06513ec7 [HttpKernel][FrameworkBundle] Add a minimalist default PSR-3 logger
This PR was merged into the 2.7 branch.
Discussion
----------
[Form] Fix precision of MoneyToLocalizedStringTransformer's divisions and multiplications
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no
| License | MIT
There is a [PHP Bug](https://bugs.php.net/bug.php?id=75004) with the accuracy of divisions and multiplications when `/=` and `*=` are used.
Here is the proof: https://3v4l.org/u1DkX
It would be better to use `bcmul()` and `bcdiv()` in the `MoneyToLocalizedStringTransformer.php` to prevent this bug.
Commits
-------
ab47c7878e Added improvement for accuracy in MoneyToLocalizedStringTransformer.
* 3.4:
Argon2i Password Encoder
[DI] EnvVarProcessorInterface: fix missing use
[FrameworkBundle] Use PhpExtractor from Translation
[DowCrawler] Default to UTF-8 when possible
This PR was merged into the 3.4 branch.
Discussion
----------
[Security] Argon2i Password Encoder
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR | WIP
Since the [libsodium RFC](https://wiki.php.net/rfc/libsodium) passed with flying colours, I'd like to kick start a discussion about adding Argon2i as a password encoder to the security component. The initial code proposal in this PR supports both the upcoming public API confirmed for PHP 7.2, and the [libsodium PECL extension](https://pecl.php.net/package/libsodium) for those below 7.2 (available for PHP 5.4+).
#### Concerns
- Should the test cover hash length? At the moment the result of Argon2i is 96 characters, but because the hashing parameters are included in the result (`$argon2i$v=19$m=32768,t=4,p=1$...`) this is not guaranteed.
- I've used one password encoder class because the result *should* be the same whether running natively in 7.2 or from the PECL extension, but should the logic be split out into separate private methods (like `Argon2iPasswordEncoder::encodePassword()`) or not (like in `Argon2iPasswordEncoder::isPasswordValid()`)? Since I can't really find anything concrete on Symfony choosing one way over another I'm assuming it's down to personal preference?
#### The Future
Whilst the libsodium RFC has been approved and the public API confirmed, there has been no confirmation of Argon2i becoming an official algorithm for `passhword_hash()`. If that is confirmed, then the implementation should *absolutely* use the native `password_*` functions since the `sodium_*` functions do not have an equivalent to the `password_needs_rehash()` function.
Any feedback would be greatly appreciated 😃
Commits
-------
be093dd79a Argon2i Password Encoder
This PR was merged into the 3.4 branch.
Discussion
----------
[FrameworkBundle] Use PhpExtractor from Translation
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
The FrameworkBundle's one is legacy, so triggers a deprecation notice.
Commits
-------
3d19fd9837 [FrameworkBundle] Use PhpExtractor from Translation
This PR was merged into the 3.4 branch.
Discussion
----------
[DowCrawler] Default to UTF-8 when possible
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #17258
| License | MIT
| Doc PR | -
This can't be ambiguous, let's use UTF-8 when possible.
Commits
-------
73eda66b99 [DowCrawler] Default to UTF-8 when possible
Add the Argon2i hashing algorithm provided by libsodium as a core encoder in the Security component, and enable it in the SecurityBundle.
Credit to @chalasr for help with unit tests.
* 3.4:
Fix conflicts between Bridge/PhpUnit and Debug fixtures
[DI] Fix typehint
[PhpUnitBridge] Make CoverageListenerTest more robust when xdebug is not available
This PR was merged into the 3.3 branch.
Discussion
----------
[DependencyInjection] include file and line number in deprecation
| 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 |
In #23108 we removed line numbers from deprecation messages created by the YAML parser because those numbers were quite useless without the file being parsed. I suggest to revert this change and add the file being parsed to the deprecation message.
Commits
-------
cf03552 include file and line number in deprecation
This PR was merged into the 3.4 branch.
Discussion
----------
[PhpUnitBridge] Make CoverageListenerTest more robust when xdebug is not available
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
9fac290 [PhpUnitBridge] Make CoverageListenerTest more robust when xdebug is not available
* 3.4:
Moved PhpExtractor and PhpStringTokenParser to Translation component
[Asset] Provide default context
[HttpKernel] Deprecate some compiler passes in favor of tagged iterator args
Add exclusive Twig namespace for bundles path
Share connection factories between cache and lock
This PR was merged into the 3.4 branch.
Discussion
----------
[TwigBundle] Improve the overriding of bundle templates
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #17557
| License | MIT
| Doc PR | -
### [Overriding a Template that also extends itself](https://twig.symfony.com/doc/2.x/recipes.html#overriding-a-template-that-also-extends-itself)
Now that bundles inheritance is deprecated and removed (#24160, #24161), I'm wondering if we can solve this old issue defining an exclusive namespace only for root bundles in `3.4` just bundles in `4.0`:
```yaml
twig:
paths:
# adding paths behind the scene into TwigExtension
app/Resources/FooBundle/views: Foo
vendor/acme/foo-bundle/Resources/views: Foo
vendor/acme/foo-bundle/Resources/views: !Foo # exclusive
```
Thus, one can decide when use the exclusive namespace to avoid the issue and then [we could to say also](http://symfony.com/doc/current/templating/overriding.html):
> To override the bundle template partially (which contains `block`) creates a new `index.html.twig` template in `app/Resources/AcmeBlogBundle/views/Blog/index.html.twig` and extends from `@!AcmeBlogBundle/Blog/index.html.twig` to customize the bundle template:
```twig
{# app/Resources/FooBundle/views/layout.html.twig #}
{# this does not work: circular reference to itself #}
{% extends '@Foo/layout.html.twig' %}
{# this will work: load bundle layout template #}
{% extends '@!Foo/layout.html.twig' %}
{% block title 'New title' %}
```
I hear other suggestions about the excluse namespace.
We will need to update http://symfony.com/doc/current/templating.html#referencing-templates-in-a-bundle too to add this convention.
WDYT?
Commits
-------
0a658c6eef Add exclusive Twig namespace for bundles path
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpKernel] Deprecate some compiler passes in favor of tagged iterator args
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
More code that we can drop :)
Commits
-------
fa62e5068e [HttpKernel] Deprecate some compiler passes in favor of tagged iterator args
This PR was merged into the 3.4 branch.
Discussion
----------
[Lock] Use cache connection factories in lock
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no (feature removal)
| BC breaks? | no (if merged in 3.4)
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
An alternative to https://github.com/symfony/symfony/pull/24267 to share code between cache and lock.
Commits
-------
95358ac98f Share connection factories between cache and lock
This PR was squashed before being merged into the 3.4 branch (closes#21027).
Discussion
----------
[Asset] Provide default context
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19396
| License | MIT
| Doc PR | should be noted somewhere, ill create an issue
Allows configuring the default asset context to make things works on CLI for example. Same approach as the routing component.
Introduces
```yaml
# parameters.yml
asset.request_context.base_path: '/base/path'
asset.request_context.secure: false
```
Commits
-------
9137d57ecd [Asset] Provide default context
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] Reference tagged services in config
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #12269
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/issues/8404
This is a proof of concept to reference a sequence of tagged services.
The problem bugs me for some time, and at first i thought the solution was to have some super generic compiler pass. If it could replace a lot of compilers in core.. perhaps worth it, but eventually each tag comes with it's own logic, including how to deal with tag attributes.
However, writing the passes over and over again becomes tedious for the most basic usecase. So given the recent developments, this idea came to mind.
```yml
services:
a:
class: stdClass
properties: { a: true }
tags: [foo]
b:
class: stdClass
properties: { b: true }
tags: [foo]
c:
class: stdClass
properties:
#stds: !tagged_services foo (see #22198)
stds: !tagged_services
foo
```
```
dump(iterator_to_array($this->get('c')->stds));
```
```
array:2 [▼
0 => {#5052 ▼
+"a": true
}
1 => {#4667 ▼
+"b": true
}
]
```
Given the _basic_ example at https://symfony.com/doc/current/service_container/tags.html, this could replace that.
Any thoughts?
Commits
-------
979e58f [DI] Reference tagged services in config
This PR was squashed before being merged into the 3.4 branch (closes#24337).
Discussion
----------
Adding a shortcuts for the main security functionality
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
| Doc PR | Big ol' TODO
I'd like one class that I can inject (especially with autowiring) to get access to the User and `isGranted()` methods. This is *really* important... because to get the User currently, you need to type-hint `TokenStorageInterface`... and there are *two*! That's really bad DX!
Questions:
A) I hi-jacked the existing `Security` class... I wanted a simple class called Security
B) I called the service `security.helper`... for lack of a better id.
C) I did not make `Security` implement the 2 other interfaces (`TokenStorageInterface`, `AuthorizationCheckerInterface`... but I suppose we could?)
Cheers!
Commits
-------
0851189 Adding a shortcuts for the main security functionality
This PR was merged into the 3.4 branch.
Discussion
----------
[TwigBundle] register an identity translator as fallback
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/24303#issuecomment-331864529
| License | MIT
| Doc PR |
The Form component can be used without the Translation component.
However, to be able to use the default form themes provided by the
TwigBridge you need to have the `trans` filter to be available.
This change ensure that there will always be a `trans` filter which as
a fallback will just return the message key if no translator is present.
Commits
-------
f0876e5927 register an identity translator as fallback
This PR was merged into the 3.4 branch.
Discussion
----------
[Yaml] include file and line no in deprecation message
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Now that we know the filename being parsed we can improve deprecation messages which is especially useful when trying to find the DI config file that triggers a particular deprecation.
Commits
-------
f618e43234 include file and line no in deprecation message
This PR was merged into the 2.7 branch.
Discussion
----------
[Validator] minor translation text fix
Update validators.cs.xlf - Fix czech translation for "This field was not expected"
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | n/a
| Fixed tickets | none
| License | none
| Doc PR | none
This commit fixes grammatical issue for czech translation only.
Commits
-------
fbe7148000 Fix translation for "This field was not expected"
* 3.4:
[DI] Fix missing use + minor tweaks
[Routing] Enhance PHP DSL traits docblocks
Fix AclSchemaListener deprecation
Set a NullLogger in ApcuAdapter when Apcu is disabled in CLI
Minor reword
[HttpKernel] Make array vs "::" controller definitions consistent
Fix tests
[TwigBundle] Remove profiler related scripting
[TwigBundle][WebProfilerBundle] Switch to DOMContentLoaded event
[WebProfilerBundle] Hide inactive tabs from CSS
[TwigBundle] Make deprecations scream in logs
[TwigBundle] Hide logs if unavailable, i.e. webprofiler
[TwigBundle] Break long lines in exceptions
[WebProfilerBundle] Added missing link to profile token
[DI] Fix decorated service merge in ResolveInstanceofConditionalsPass
Preserve URI fragment in HttpUtils::generateUri()
[PhpUnitBridge] do not require an error context
This PR was merged into the 3.4 branch.
Discussion
----------
[FrameworkBundle] register class metadata factory alias
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #24296
| License | MIT
| Doc PR |
Commits
-------
d0235a00cc register class metadata factory alias
* 3.3:
Set a NullLogger in ApcuAdapter when Apcu is disabled in CLI
Minor reword
[HttpKernel] Make array vs "::" controller definitions consistent
Fix tests
[TwigBundle] Remove profiler related scripting
[TwigBundle][WebProfilerBundle] Switch to DOMContentLoaded event
[WebProfilerBundle] Hide inactive tabs from CSS
[TwigBundle] Make deprecations scream in logs
[TwigBundle] Hide logs if unavailable, i.e. webprofiler
[TwigBundle] Break long lines in exceptions
[WebProfilerBundle] Added missing link to profile token
[DI] Fix decorated service merge in ResolveInstanceofConditionalsPass
Preserve URI fragment in HttpUtils::generateUri()
[PhpUnitBridge] do not require an error context
This PR was squashed before being merged into the 2.7 branch (closes#24243).
Discussion
----------
HttpCache does not consider ESI resources in HEAD requests
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Due to this shortcut:
3b42d8859e/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php (L634-L642)
... the `HttpCache` never looks at the response body for `HEAD` requests. This makes it completely miss ESI-related tweaks like computing the correct TTL, removing validation headers or updating the `Content-Length`.
From RFC2616 (https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.4):
> The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response. The metainformation contained in the HTTP headers in response to a HEAD request SHOULD be identical to the information sent in response to a GET request.
Although it says "SHOULD", I think it can be misleading at best when HEAD requests do, for example, return different (greater) `s-maxage` values than a corresponding GET request.
Commits
-------
4dd0e53171 HttpCache does not consider ESI resources in HEAD requests
The Form component can be used without the Translation component.
However, to be able to use the default form themes provided by the
TwigBridge you need to have the `trans` filter to be available.
This change ensure that there will always be a `trans` filter which as
a fallback will just return the message key if no translator is present.
* 3.4:
fixed CS
[Serializer] Add Support for in CustomNormalizer
Remove Validator\TypeTestCase and add validator logic to base TypeTestCase
[Lock] Include lock component in framework bundle
[WebProfilerBundle] Render file links for twig templates
CsvEncoder handling variable structures and custom header order
Saltless Encoder Interface
[Serializer] throw more specific exceptions
# Conflicts:
# src/Symfony/Bundle/FrameworkBundle/composer.json
# src/Symfony/Bundle/SecurityBundle/Command/UserPasswordEncoderCommand.php
# src/Symfony/Component/Serializer/Encoder/XmlEncoder.php
# src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php
# src/Symfony/Component/Serializer/Serializer.php
This PR was squashed before being merged into the 3.4 branch (closes#21716).
Discussion
----------
[Serializer] Add Support for `object_to_populate` in CustomNormalizer
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #21715
| License | MIT
| Doc PR | n/a
This pulls a trait out of `AbstractNormalizer` with a method to extract the object to populate and adds some tests for it. Then uses that trait in both `AbstractNormalizer` and `CustomNormalizer` so both can support the `object_to_populate` key.
Commits
-------
ec9242d1ee [Serializer] Add Support for in CustomNormalizer
This PR was squashed before being merged into the 3.4 branch (closes#21960).
Discussion
----------
Remove Validator\TypeTestCase and add validator logic to base TypeTestCase
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no/possibly
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
| Doc PR | symfony/symfony-docs#7587
Based on a discussion in the docs, users should not really extend classes in the `Tests` namespace. This means that if you want to unit test forms, you need to extend the `Test\TypeTestCase` class which doesn't have the validation logic (Not adding the validator extension gives an error if you use the `constraints` option in your forms).
So I propose to remove the `Validator\TypeTestCase` class (or it can possibly be deprecated if it is wrongly used by someone), and add the validator extension logic to the base `TypTestCase` class.
The benefit is that there is only one class to extend (both for internal or userland tests), and it makes it easy to add more core extensions if necessary.
The one part that I don't like too much at the moment, is keeping the extension in the `getExtensions` method. This means that you extend the class and need to register custom extensions, that you would need to do `return array_merge(parent::getExtensions(), ... ` (only in the case when you want core extensions enabled). So I don't know if we rather want to add a private method like `getCoreExtensions`?
Commits
-------
5ab50103ae Remove Validator\TypeTestCase and add validator logic to base TypeTestCase
This PR was merged into the 4.0-dev branch.
Discussion
----------
[HttpFoundation] Removed compatibility layer for PHP <5.4 sessions
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This is a follow-up of https://github.com/symfony/symfony/pull/24239. This PR removes the compatibility layer added for sessions for PHP <5.4.
Commits
-------
37d1a212f9 Removed compatibility layer for PHP <5.4 sessions
This PR was merged into the 3.4 branch.
Discussion
----------
[Serializer] throw more specific exceptions
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20534
| License | MIT
| Doc PR |
Commits
-------
aa30d04243 [Serializer] throw more specific exceptions
This PR was squashed before being merged into the 3.4 branch (closes#24256).
Discussion
----------
CsvEncoder handling variable structures and custom header order
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #23278
| License | MIT
| Doc PR | TBD
This PR improves the CsvEncoder to handle variable nesting structures and adds a context option that allows custom csv header order.
Commits
-------
d173494e48 CsvEncoder handling variable structures and custom header order
This PR was merged into the 3.4 branch.
Discussion
----------
[Security] Saltless Encoder Interface
| 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 new interface for encoders that do not require a user-generated salt (generate their own built-in) as suggested by @stof ([comment](https://github.com/symfony/symfony/pull/21604/files#r101225470)), this will become useful as more password encoders are added in the future (such as symfony/symfony#21604).
Commits
-------
7c4aa0bccb Saltless Encoder Interface
* 3.4:
[PhpUnitBridge] Added a CoverageListener to enhance the code coverage report
Add a method to check if any results were found
[SecurityBundle] Deprecate ACL related code
[FrameworkBundle] Enable assets with templates only if the Asset component is installed
This PR was squashed before being merged into the 3.3 branch (closes#24244).
Discussion
----------
TwigBundle exception/deprecation tweaks
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes/no
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!--highly recommended for new features-->
- 1st commit) if you view a exception in the profiler, there is no logger available. Making the tab useless, disabled state is now triggered at zero log messages. There's a specialized panel here.
- 2nd commit) when an exception occurs this highlights deprecations in the log table outside the profiler with a warning status. This follows the same signal colors in the profiler.
- 3rd commit) hide the default inactive tabs from CSS to avoid scrollbar flickering.
- 4th commit) favors document.DOMContentLoaded over window.load, we dont want to wait for images to be loaded
Further out-of-scope improvements could be;
- From https://github.com/symfony/symfony/pull/24191; i think the logs table should show a direct `View file` link for every error/deprecation/red or yellow line in here. Traversing with `Show context` is tedious.
- links to file.php for your trigger_error() calls
- links to config.yml for trigger_error() calls by SF
- From #24151; having the same tooling on both sides is nice
- Events/Translations logs is noise, we have specialized panels for those. To further reduce the overall page size container logs can be moved away too, linked from Configuration and/or Logs. Also see #23247
Commits
-------
1c595fcf48 [TwigBundle][WebProfilerBundle] Switch to DOMContentLoaded event
ea4b0966ab [WebProfilerBundle] Hide inactive tabs from CSS
0c10f97f98 [TwigBundle] Make deprecations scream in logs
03cd9e553b [TwigBundle] Hide logs if unavailable, i.e. webprofiler
This PR was merged into the 3.4 branch.
Discussion
----------
[FrameworkBundle] Enable assets with templates only if the Asset component is installed
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR | -
Commits
-------
5bc0b0527e [FrameworkBundle] Enable assets with templates only if the Asset component is installed
This PR was merged into the 3.3 branch.
Discussion
----------
[TwigBundle] Remove profiler related scripting
| Q | A
| ------------- | ---
| Branch? | 3.3
| 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 | symfony/symfony-docs#... <!--highly recommended for new features-->
For sanity.
Also in case of an exception page we conflict with the profiler scripting/css.
```
Uncaught TypeError: Cannot set property 'className' of null
```
Happens because `Sfjs.createTabs` from the profiler tries to process tabs again, which twig has already done. The code doesnt handle this gracefully.
In case of ajax request (edgy yes) we see the CSS conflicting;
![image](https://user-images.githubusercontent.com/1047696/30712781-7680c8d2-9f0d-11e7-8a6c-27f460c1e780.png)
Note the table borders. Not sure how and if we want to solve this nor what it might affect otherwise; open for now.
Commits
-------
eb520e1e5b Minor reword
02dcdca014 [TwigBundle] Remove profiler related scripting
This PR was merged into the 3.4 branch.
Discussion
----------
[Finder] Add a method to check if any results were found
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
If I want to know if any results were found, but I don't want to start trawling through them, I have to do the rather ugly:
```php
$found = false;
foreach ($finder as $thing) {
$found = true;
break;
}
if ($found) {
```
This PR enables the much more readable:
```php
if ($finder->found()) {
```
This seemed like an obvious thing to me, so I suspect there might be a reason this doesn't exist already, but I couldn't find any previous discussion. If it'll be accepted then I'll glady create a docs PR
Commits
-------
24dcb5202c Add a method to check if any results were found
This PR was squashed before being merged into the 3.4 branch (closes#23149).
Discussion
----------
[PhpUnitBridge] Added a CoverageListener to enhance the code coverage report
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/8416
---
The code coverage computed by PHPUnit is not very accurate by default as it marks a line as tested as soon as it has been executed.
For example, if you have two classes A and B where A is using B and you write test only for the class A then the class B will be marked as tested.
You can fix this issue by adding `@covers A` on top of the class ATest, but it's a bit boring.
This Listener add this annotation on each test if it's applicable:
* If an annotation already exists, we do nothing.
* We try to find the SUT thanks to the Test class name, if it does not exist, we do nothing
---
If you wan to see it in action: https://github.com/lyrixx/phpunit-auto-cover
---
The PR is not finished, I think we could add this listener to symfony itself.
What do you think?
Commits
-------
e17206debd [PhpUnitBridge] Added a CoverageListener to enhance the code coverage report
This PR was merged into the 3.4 branch.
Discussion
----------
Forward compatibility for the removal of bundle inheritance in 4.0
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Compat layer so that 3.4 and master combinations of framework/twig bundles and http-kernel work together.
Commits
-------
fba7e543d1 added foward compatibility for the removal of bundle inheritance in 4.0
* 3.4:
Passing the newly generated security token to the event during user switching.
Fix changelog and minor tweak for #23485
[Config] extracted the xml parsing from XmlUtils::loadFile into XmlUtils::parse
[Security][SecurityBundle] Deprecate the HTTP digest auth
add ability to configure catching exceptions
Extract method refactoring for ResourceCheckerConfigCache
This PR was merged into the 3.4 branch.
Discussion
----------
[Security][Firewall] Passing the newly generated security token to the event during user switching
Event allows listeners to easily switch out the token if custom token updates are required
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Updated SwitchUserEvent to include the generated security Token. Allows the listeners to replace the token with their own (in case an application has some custom logic for token generation). The SwitchUserListener will now use the token returned by the event, so if token was not changed the self generated token will be used. If token was changed in the event then the new token would get used.
Reasons for this feature
--------------------------
In our current project users can have different Role sets depending on which organization they switch to. Our `User->getRoles()` always returns ["ROLE_USER"] and after login user is presented with choice of organizations they want to work in. Based on selected organization roles get updated with then stored token.
Without the change proposed in this PR. The only way we can setup the proper roles during user switch is by replacing `security.authentication.switchuser_listener` service with our own implementation of the listener.
With the proposed change, we can replace the security token with the one having all the roles we require directly inside our listener for `security.switch_user` event that gets thrown by Symfony's `SwitchUserListener`
Commits
-------
4205f1b Passing the newly generated security token to the event during user switching.
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpKernel] Add ability to configure catching exceptions for Client
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | todo
Debugging exceptions in functional tests is difficult as you need to look at the logs to see which exception was thrown. Disabling catching of exceptions in the client would allow the exception to bubble up to phpunit and make it easier to see what exception was thrown.
Commits
-------
4812e60 add ability to configure catching exceptions
This PR was squashed before being merged into the 3.4 branch (closes#22589).
Discussion
----------
Extract method refactoring for ResourceCheckerConfigCache
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Improves code readability.
Commits
-------
685c353 Extract method refactoring for ResourceCheckerConfigCache
This PR was squashed before being merged into the 3.4 branch (closes#24239).
Discussion
----------
[HttpFoundation] Deprecate compatibility with PHP <5.4 sessions
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This PR removes functionality added in Symfony 2.1 as a compatibility layer with sessions from PHP <5.4.
- [x] Fix tests
Commits
-------
3deb3940ab [HttpFoundation] Deprecate compatibility with PHP <5.4 sessions
This PR was squashed before being merged into the 3.4 branch (closes#23882).
Discussion
----------
[Security] Deprecated not being logged out after user change
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #17023
| License | MIT
| Doc PR | ~
This PR is an alternative approach to #19033. Due to a behavioral change that could break a lot of applications and websites, I've decided to trigger a deprecation instead of actually changing the behavior as that can be done for 4.0.
Whenever a user object is considered changed (`AbstractToken::hasUserChanged`) when setting a new user object after refreshing, it will now throw a deprecation, paving the way for a behavioral change in 4.0. The idea is that in 4.0 Symfony will simply trigger a logout when this case is encountered.
Commits
-------
22f525b [Security] Deprecated not being logged out after user change
This PR was merged into the 2.7 branch.
Discussion
----------
Added null as explicit return type (?TokenInterface)
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/23882#discussion_r140704737
| License | MIT
| Doc PR | ~
This fixes the returntype in the `ContextListener` so it can be merged upwards.
/cc @chalasr
Commits
-------
1ba4dd9 Added null as explicit return type (?TokenInterface)
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] Fix tracking of bound arguments when using autoconfiguration
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
An exception is currently thrown when using arguments bindings on an autoconfigured controller action.
This fixes the issue.
Commits
-------
091f943 [DI] Fix tracking of bound arguments when using autoconfiguration
* 3.4:
use the parseFile() method of the YAML parser
[Yaml] support parsing files
Adding Definition::addError() and a compiler pass to throw errors as exceptions
[DI] Add AutowireRequiredMethodsPass to fix bindings for `@required` methods
[Cache] Add ResettableInterface to allow resetting any pool's local state
[DI][DX] Throw exception on some ContainerBuilder methods used from extensions
added missing @author tag for new class
allow forms without translations and validator
[VarDumper] Make `dump()` a little bit more easier to use
[Form] Add ambiguous & exception debug:form tests
Reset the authentication token between requests.
[Serializer] Getter for extra attributes in ExtraAttributesException
[DI] Dont use JSON_BIGINT_AS_STRING
# Conflicts:
# src/Symfony/Component/Routing/composer.json
# src/Symfony/Component/Translation/composer.json
# src/Symfony/Component/Yaml/Inline.php
# src/Symfony/Component/Yaml/Tests/ParserTest.php
# src/Symfony/Component/Yaml/Yaml.php
This PR was merged into the 3.4 branch.
Discussion
----------
[DI][DX] Throw exception on some ContainerBuilder methods used from extensions
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks? | no (unlikely, that would mean there already was an issue in userland code)
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass? | yes
| Fixed tickets | #24282 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
Commits
-------
88549fff5b [DI][DX] Throw exception on some ContainerBuilder methods used from extensions
This PR was merged into the 4.0-dev branch.
Discussion
----------
[Lock] Add missing methods in LockInterface
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no (because 3.4 is not yet released)
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | /
| License | MIT
| Doc PR | /
Add methods to the LockInterface
Commits
-------
e66e5381d3 Add missing methods in LockInterface
This PR was merged into the 3.4 branch.
Discussion
----------
[Yaml] support parsing files
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/24191#issuecomment-329975423
| License | MIT
| Doc PR | TODO
This PR adds a new flag `PARSE_FILE` which can be passed to the YAML parser. When given, the input will be interpreted as a filename whose contents will then be parsed. We already supported passing filenames in the past. Back then the features was not deterministic as it just relied on the string being an existing file or not. Now that we are able to control the behaviour of the parser by passing flags this can be done in a much cleaner way and allows to properly deal with errors (i.e. non existent or unreadable files).
This change will also allow to improve error/deprecation messages to include the filename being parsed and thus showing more descriptive error messages when people are using the YAML parser with a bunch of files (e.g. as part of the DependencyInjection or Routing component).
Commits
-------
9becb8a [Yaml] support parsing files
This PR was squashed before being merged into the 3.4 branch (closes#24290).
Discussion
----------
Adding Definition::addError() and a compiler pass to throw errors as exceptions
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes & no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes (very minor)
| Tests pass? | yes
| Fixed tickets | #23606
| License | MIT
| Doc PR | Not needed
Hi guys!
Very simple: when there is an error with a Definition, we can now call `Definition::addError()` instead of throwing an exception. Then, a new compiler pass (after removal) actually throws an exception. The advantage is that we can avoid throwing exceptions for services that are ultimately removed from the container. That's important for auto-registration, where we commonly register all services in `src/`... but then many of them are removed later.
A few interesting notes:
- We can probably convert more things from exceptions to `Definition::addError()`. I've only converted autowiring errors and things in `CheckArgumentsValidityPass` (that was necessary because it was throwing exceptions in some cases due to autowiring failing... which was the true error)
- `Definition` can hold multiple errors, but I'm only showing the first error in the exception message. The reason is clarity: I think usually the first error is the most (or only) important. But having `Definition::addError()` avoids the possibility of a later error overriding an earlier one
Cheers!
Commits
-------
a85b37a Adding Definition::addError() and a compiler pass to throw errors as exceptions
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] Add AutowireRequiredMethodsPass to fix bindings for `@required` methods
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | yes
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Spotted while doing a SF4 workshop :)
Discovery of `@required` methods should be split from AutowirePass so that bindings can apply to these methods also when autowiring is enabled.
Commits
-------
dc55dd2 [DI] Add AutowireRequiredMethodsPass to fix bindings for `@required` methods
This PR was merged into the 3.4 branch.
Discussion
----------
[Cache] Add ResettableInterface to allow resetting any pool's local state
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
To allow pools to leverage #24155 so that they can be used in multi-request loops.
Commits
-------
14c91f2 [Cache] Add ResettableInterface to allow resetting any pool's local state
This PR was merged into the 3.4 branch.
Discussion
----------
[SecurityBundle] Reset the authentication token between requests
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #23984
| License | MIT
| Doc PR | N/A
Follow-up to #24155. This PR resets the token storage, making sure there's no user logged in at the beginning of a new request.
Commits
-------
e46b366 Reset the authentication token between requests.
This PR was submitted for the master branch but it was squashed and merged into the 3.4 branch instead (closes#24280).
Discussion
----------
[VarDumper] Make `dump()` a little bit more easier to use
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
Imagine you have this code:
```php
$object->method();
```
If you want to dump the object, this is currently the way to do that:
```php
dump($object);
$object->method();
```
This PR makes adding (and removing) the `dump` function easier. When using one argument is used, that argument is returned.
```php
dump($object)->method();
```
When dumping multiple things, they all get returned. So you can to this:
```php
$object->someMethod(...dump($arg1, $arg2, $arg3));
```
Commits
-------
42f0984 [VarDumper] Make `dump()` a little bit more easier to use
This PR was squashed before being merged into the 3.4 branch (closes#24277).
Discussion
----------
[Serializer] Getter for extra attributes in ExtraAttributesException
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes (failure unrelated)
| Fixed tickets |
| License | MIT
This PR adds a public getter for the extra attributes in `ExtraAttributesException` and makes it easier to create custom exception messages (e.g. JSON formatted).
Commits
-------
cb935e7 [Serializer] Getter for extra attributes in ExtraAttributesException
This PR was squashed before being merged into the 3.4 branch (closes#24257).
Discussion
----------
[HttpKernel][DI] Enable Kernel to implement CompilerPassInterface
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
In the same spirit as #13761 that allowed DI exts to be also compiler passes, and as #23812 that allowed the kernel to listen to events, in our new bundle-less world, should we allow the kernel to register itself as a compiler pass? That would make some scenario possible (like having a `TestKernel` that turns some services public.)
Commits
-------
6973a1a [HttpKernel][DI] Enable Kernel to implement CompilerPassInterface
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] Add "PHP fluent format" for configuring the container
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #22407
| License | MIT
| Doc PR | -
This PR allows one to write DI configuration using just PHP, with full IDE auto-completion.
Example:
```php
namespace Symfony\Component\DependencyInjection\Loader\Configurator;
use Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Foo;
return function (ContainerConfigurator $c) {
$c->import('basic.php');
$s = $c->services()->defaults()
->public()
->private()
->autoconfigure()
->autowire()
->tag('t', array('a' => 'b'))
->bind(Foo::class, ref('bar'))
->private();
$s->set(Foo::class)->args([ref('bar')])->public();
$s->set('bar', Foo::class)->call('setFoo')->autoconfigure(false);
};
```
Commits
-------
814cc31 [DI] Add "PHP fluent format" for configuring the container
This PR was merged into the 3.4 branch.
Discussion
----------
[Routing] Add PHP fluent DSL for configuring routes
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
If we add a PHP DSL for DI config (#23834), we must have a similar one for routing. Here it is. See fixtures.
So, you always start with a `RoutingConfigurator $routes`, which allows you to:
```php
$routes->add($name, $path); // adds a route
$routes->import($resource, $type = null, $ignoreErrors = false); // imports routes
$routes->collection($name = ''); // starts a collection, all *names* might be prefixed
```
then
- for "import" and "collection", you can `->prefix($path)`;
- for "add" and "collection", you can fluently "add" several times;
- for "collection" you add sub"`->collection()`";
- and on all, you can configure the route(s) with:
```php
->defaults(array $defaults)
->requirements(array $requirements)
->options(array $options)
->condition($condition)
->host($pattern)
->schemes(array $schemes)
->methods(array $methods)
->controller($controller)
```
Commits
-------
f433c9a [Routing] Add PHP fluent DSL for configuring routes
This PR was merged into the 2.7 branch.
Discussion
----------
[Console] Preserving line breaks between sentences according to the exception message
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #24212
| License | MIT
| Doc PR | -
Commits
-------
e2d4904 Render all line breaks according to the exception message
This PR was merged into the 3.4 branch.
Discussion
----------
[Serializer] Add local cache to normalizers
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #24206
| License | MIT
| Doc PR | -
Should help making the Serializer a bit faster.
Commits
-------
b0c5cf0 [Serializer] Add local cache to normalizers
* 3.4:
[DI] Turn services and aliases private by default, with BC layer
[WebProfiler] Fix z-index for pinned AJAX block
Require v3.4+ of the var-dumper component
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] Turn services and aliases private by default, with BC layer
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #20048
| License | MIT
| Doc PR | -
With this PR, all services and aliases are made private by default.
This is done in a BC way, thanks to the layer introduced in #24104.
We will require bundles to explicitly opt-in for "public", either using "defaults", or stating `public="true"` explicitly. Same in DI extension, where calling `->setPublic(true)` will be required in 4.0.
Commits
-------
9948b09 [DI] Turn services and aliases private by default, with BC layer
This PR was merged into the 3.3 branch.
Discussion
----------
[PhpUnitBridge] do not require an error context
| 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 |
The error context argument of an error handler is deprecated as of PHP
7.2. Requiring it in the error handler of the SymfonyTestsListenerTrait
will make error handlers fail that are executed when running PHPUnit
tests and forward the error handling to the previously registered error
handler.
Commits
-------
10ce932 [PhpUnitBridge] do not require an error context
This PR was merged into the 2.7 branch.
Discussion
----------
[DI] remove confusing code
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This code is a no-op. I guess the intention was to resolve a parametrized alias target, yet this never worked and we don't want to make it work.
Commits
-------
3da645efed [DI] remove confusing code
This PR was squashed before being merged into the 2.7 branch (closes#24230).
Discussion
----------
[Validator] Clarify UUID validator behavior
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #24209
| License | MIT
| Doc PR | symfony/symfony-docs#... <!--highly recommended for new features-->
TLDR; after some investigation this is now a doc update.
This fixes the variant detection of a UUID, in strict validation, as described by https://tools.ietf.org/html/rfc4122#section-4.1.1
Tested variant UUID's taken from [ramsey/uuid](https://github.com/ramsey/uuid/blob/master/tests/UuidTest.php#L506). I cannot produce an invalid variant UUID anymore, as i believe by now anything would be variant 3 (future reserved).
/cc @backbone87
Commits
-------
cde5a47 [Validator] Clarify UUID validator behavior
This PR was merged into the 3.4 branch.
Discussion
----------
[DebugBundle] Fix the var-dumper requirement in composer.json
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
The v3.4 of the debug bundle calls `VarCloner::setMinDepth()` and thus requires v3.4+ of the var-dumper component. However, the composer file has not been updated in 30cd70d.
I upped the var-dumper requirement to `~3.4|~4.0`.
Commits
-------
d761a76 Require v3.4+ of the var-dumper component
This PR was squashed before being merged into the 2.7 branch (closes#22321).
Discussion
----------
[Filesystem] Fixed makePathRelative
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Updating to Symfony 3.2.7 @agoat noticed a bug with `Filesystem::makePathRelative()` in contao/core-bundle#751:
- In Symfony 3.2.6 `makePathRelative('aa/cc', 'bb/cc')` returned correctly `../../aa/cc`
- In Symfony 3.2.7 the same method call returns `./`
I think this issue was introduced with #22133.
While working on the fix I noticed some other issues too:
- An unnecessary if construct that did nothing, fc745f45949fdb8d5aa590618ec73537721f99b4
- Missing normalization of `./` path segments, 15982d4b083723555cfa149368eaaae9609d0e22
- `../` got ignored at the beginning of relative paths, 9586e880d69f613b10e23dd53cea877e622b221a
- The documentation of the method only allowed absolute paths, but there are already unit tests ([FilesystemTest.php:1097](ab93feae3f/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php (L1097))) that test the behavior of relative paths, cec473eeb099c074b5883e7187f74663402f9d87
This pull request fixes all these issues and adds tests for them.
Commits
-------
2bc11505f4 [Filesystem] Fixed makePathRelative
This PR was merged into the 3.3 branch.
Discussion
----------
[Security] Preserve URI fragment in HttpUtils::generateUri()
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/23675
| License | MIT
| Doc PR | n/a
Commits
-------
4dd2e3e Preserve URI fragment in HttpUtils::generateUri()
This PR was squashed before being merged into the 3.4 branch (closes#23747).
Discussion
----------
[Serializer][FrameworkBundle] Add a DateInterval normalizer
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/8267
Could be useful for API needing to submit a duration.
Most code have been adapted from @MisatoTremor's DateInterval form type. Credits to him.
Commits
-------
6185cb1991 [Serializer][FrameworkBundle] Add a DateInterval normalizer
* 2.8:
[CS][2.7] yoda_style, no_unneeded_curly_braces, no_unneeded_final_method, semicolon_after_instruction
[Filesystem] mirror - fix copying content with same name as source/target.
.php_cs.dist - simplify config
[WebProfilerBundle] fixed TemplateManager when using Twig 2 without compat interfaces
* 2.7:
[Filesystem] mirror - fix copying content with same name as source/target.
.php_cs.dist - simplify config
[WebProfilerBundle] fixed TemplateManager when using Twig 2 without compat interfaces
This PR was merged into the 3.4 branch.
Discussion
----------
[FrameworkBundle] Reset stopwatch between requests
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #23984
| License | MIT
| Doc PR | N/A
Follow-up to #24155. This PR ensures that the stopwatch is reset between requests.
Commits
-------
7c3bdd9 Reset stopwatch.
This PR was squashed before being merged into the 4.0-dev branch (closes#24159).
Discussion
----------
Remove the profiler.matcher configuration
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | to be done
I've not removed (nor deprecated) the `ProfilerListener` constructor argument that allows to set a request matcher. That way, if someone really want to do that, it's still possible. WDTY?
Commits
-------
5b77d991e9 fixed CS
8092dc6838 removed the profiler.matcher configuration
* 3.4:
A DI tag for resettable services.
Add default templates directory and option to configure it
Feature #23583 Add current and fallback locales in WDT / Profiler
The error context argument of an error handler is deprecated as of PHP
7.2. Requiring it in the error handler of the SymfonyTestsListenerTrait
will make error handlers fail that are executed when running PHPUnit
tests and forward the error handling to the previously registered error
handler.
This PR was merged into the 3.4 branch.
Discussion
----------
Feature #23583 Add current and fallback locales in WDT / Profiler
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #23583
| License | MIT
| Doc PR | -
The goal of this PR is to add informations about the locale and the fallback locales in the translation WDT panel / and profiler
Commits
-------
98a8a6c735 Feature #23583 Add current and fallback locales in WDT / Profiler
This PR was squashed before being merged into the 2.7 branch (closes#23473).
Discussion
----------
[Filesystem] mirror - fix copying content with same name as source/target.
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #23472
| License | MIT
| Doc PR |
Uses `substr()` and lengths in `Filesystem::mirror()` rather than `str_replace()` to avoid multiple replacements.
Commits
-------
b524c84ce1 [Filesystem] mirror - fix copying content with same name as source/target.
This PR was merged into the 3.4 branch.
Discussion
----------
[TwigBundle] Add default templates directory and option to configure it
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Feature freeze is coming so this one should be important for the new structure. Moving forward and alternative of https://github.com/symfony/symfony/pull/23339 but I'm proposing `templates/bundles/<BundleName>` instead of `templates/bundles/<BundleTwigNamespace>` to override bundles templates and easy migration from current `app/Resources/<BundleName>/views` convention. Also this fix the pending comments.
Summary:
* Added new option to configure default path for templates directory:
```yaml
twig:
default_path: '%kernel.project_dir%/templates' # default
```
* Added new path convention to override bundle templates `<default_path>/bundles/<BundleName>`:
```
# Examples:
templates/bundles/TwigBundle/Exception/error.html.twig - @Twig/Exception/error.html.twig
templates/bundles/FOSUserBundle/layout.html.twig - @FOSUser/layout.html.twig
```
Current templates in `<kernel.root_dir>/Resources/<BundleName>/views` have priority over the new one, and both have priority over the bundle `views` path.
Commits
-------
a1b391fb00 Add default templates directory and option to configure it
This PR was merged into the 4.0-dev branch.
Discussion
----------
[Translation] drop MessageSelector support in the Translator
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
2028a83689 drop MessageSelector support in the Translator
This PR was merged into the 2.7 branch.
Discussion
----------
[WebProfilerBundle] fixed TemplateManager when using Twig 2 without compat interfaces
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yesno
| Fixed tickets | closes#23868
| License | MIT
| Doc PR | n/a
Commits
-------
10204ffe99 [WebProfilerBundle] fixed TemplateManager when using Twig 2 without compat interfaces
* 3.4:
[CS] Apply phpdoc_annotation_without_dot
bumped Symfony version to 3.3.10
updated VERSION for 3.3.9
updated CHANGELOG for 3.3.9
[DomCrawler] Fix conversion to int on GetPhpFiles
Remove `protected_to_private` rule.
Filtering empty uuids in ORMQueryBuilderLoader.
* 3.3:
[CS] Apply phpdoc_annotation_without_dot
bumped Symfony version to 3.3.10
updated VERSION for 3.3.9
updated CHANGELOG for 3.3.9
[DomCrawler] Fix conversion to int on GetPhpFiles
Remove `protected_to_private` rule.
Filtering empty uuids in ORMQueryBuilderLoader.
This PR was squashed before being merged into the 2.7 branch (closes#24149).
Discussion
----------
[CS] Apply phpdoc_annotation_without_dot
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | n/a
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Rule was manually applied here : https://github.com/symfony/symfony/pull/19198
In same PR, fixer for this rule was requested, later implementation was approved by Symfony in https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/2020 .
Rule is converting single sentence to not a sentence, dropping final dot and lowercasing first word.
If there are multiple sentences, it doesn't make any changes.
Status quo is that some annotation are in the middle - having first word uppercased, but no final stop.
Let us fix grammar by finishing applying the rule.
If, for some reason, you don't want to follow that rule that was requested by Symfony, please provide reasoning. If it's to some edge-case bug, simply raise that bug issue. If due to some other reasons, please send a PR to drop it from `@Symfony` ruleset.
Info: I did manually reviewed every single change of this PR.
Commits
-------
7a97b49436 [CS] Apply phpdoc_annotation_without_dot
* 3.4:
[SecurityBundle] Fix valid provider considered undefined
Revert "bug #24105 [Filesystem] check permissions if dump target dir is missing (xabbuh)"
[Filesystem] skip tests if not applicable
[Fabbot] Do not run php-cs-fixer if there are no change in src/
[ExpressionLanguage] make a proposal in SyntaxError message
[Security] Fix exception when use_referer option is true and referer is not set or empty
[HttpKernel] "controller.service_arguments" services should be public
Get KERNEL_DIR through $_ENV too for KernelTestCase
Get KERNEL_CLASS through $_ENV too
check permissions if dump target dir is missing
* 3.3:
Revert "bug #24105 [Filesystem] check permissions if dump target dir is missing (xabbuh)"
[Filesystem] skip tests if not applicable
[Fabbot] Do not run php-cs-fixer if there are no change in src/
[Security] Fix exception when use_referer option is true and referer is not set or empty
[HttpKernel] "controller.service_arguments" services should be public
Get KERNEL_DIR through $_ENV too for KernelTestCase
Get KERNEL_CLASS through $_ENV too
check permissions if dump target dir is missing
* 2.8:
Revert "bug #24105 [Filesystem] check permissions if dump target dir is missing (xabbuh)"
[Filesystem] skip tests if not applicable
[Fabbot] Do not run php-cs-fixer if there are no change in src/
[Security] Fix exception when use_referer option is true and referer is not set or empty
Get KERNEL_DIR through $_ENV too for KernelTestCase
check permissions if dump target dir is missing
This PR was merged into the 3.4 branch.
Discussion
----------
[ExpressionLanguage] SyntaxError : make a proposal when no function or variable found
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | needed ?
Now when an Expression fails to be parsed, a SyntaxError is raised with an explicit message but it's impossible to extract the function, variable or the pair token type/token value to parse.
When a functional user encounters a SyntaxError, by default there is no mechanism to understand why what he typed is incorrect.
This PR exposes when it's possible the subject of the violation and in case of function or variable undefined in the Expression, a proposal is made.
```php
<?php
require 'vendor/autoload.php';
use Symfony\Component\ExpressionLanguage\Lexer;
use Symfony\Component\ExpressionLanguage\Parser;
use Symfony\Component\ExpressionLanguage\SyntaxError;
$lexer = new Lexer();
$parser = new Parser(array());
try {
$parser->parse($lexer->tokenize('user.city.departement in [departement, departement2]'), array('user', 'departement1', 'departement2'));
} catch (SyntaxError $e) {
echo $e->getMessage();
}
```
Outputs :
> Variable "departement" is not valid around position 27 for expression `user.city.departement in [departement, departement2]`.
>
> Did you mean "departement1"?
Commits
-------
f19cf8a916 [ExpressionLanguage] make a proposal in SyntaxError message
This PR was merged into the 3.4 branch.
Discussion
----------
Fixed deprecations in WebProfiler tests
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
To avoid this error in tests:
```
The "web_profiler.position" configuration key has been deprecated in Symfony 3.4 and it will be removed in 4.0: 1x
1x in ConfigurationTest::testConfigTree from Symfony\Bundle\WebProfilerBundle\Tests\DependencyInjection
```
Can anybody propose a better solution to fix this issue? Thanks!
Commits
-------
2a696d3 Fixed deprecations in WebProfiler tests
* 2.7:
Revert "bug #24105 [Filesystem] check permissions if dump target dir is missing (xabbuh)"
[Filesystem] skip tests if not applicable
[Fabbot] Do not run php-cs-fixer if there are no change in src/
[Security] Fix exception when use_referer option is true and referer is not set or empty
Get KERNEL_DIR through $_ENV too for KernelTestCase
check permissions if dump target dir is missing
* 3.4:
Do not display short exception trace for built-in console exceptions
Deprecated the web_profiler.position option
[DI] rename ResolveDefinitionTemplatesPass to ResolveChildDefinitionsPass
Throw a meaningful exception when an undefined user provider is used inside a firewall
[DI] Allow processing env vars
This PR was squashed before being merged into the 3.4 branch (closes#24080).
Discussion
----------
Deprecated the web_profiler.position option
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #23528
| License | MIT
| Doc PR | -
Related to #23728, which removes the feature for Symfony 4.0.
Commits
-------
53387b4335 Deprecated the web_profiler.position option
This PR was merged into the 3.4 branch.
Discussion
----------
[SecurityBundle] Throw a meaningful exception when an undefined user provider is used inside a firewall
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Before
> The service "security.authentication.manager" has a dependency on a non-existent service "security.user.provider.concrete.undefined_provider".
After
> Invalid firewall "main": user provider "undefined_provider" not found.
Commits
-------
b884c6612d Throw a meaningful exception when an undefined user provider is used inside a firewall
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] rename ResolveDefinitionTemplatesPass to ResolveChildDefinitionsPass
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Because that name makes things harder to understand now.
This uses exactly the same BC layer logic as the one we have for the renaming of DefinitionDecorator to ChildDefinition.
Commits
-------
a7f98c60d9 [DI] rename ResolveDefinitionTemplatesPass to ResolveChildDefinitionsPass
This PR was merged into the 2.7 branch.
Discussion
----------
[Filesystem] check permissions if dump target dir is missing
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #24097
| License | MIT
| Doc PR |
`is_dir()` returns `false` if the parent directory misses the executable
bit even when the directory itself is present.
Commits
-------
a0f9f2c537 check permissions if dump target dir is missing
This PR was merged into the 3.3 branch.
Discussion
----------
[HttpKernel] "controller.service_arguments" services should be public
| 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 | -
Controller-as-services need to be public if they have constructor arguments (they don't need to if they have no arguments but that's for arcane reasons.)
Since services tagged "controller.service_arguments" *are* controllers, they need to be public to enhance DX and remove some WTFs that some ppl reported to me.
Commits
-------
b9c6928d7e [HttpKernel] "controller.service_arguments" services should be public
* 3.4:
[travis] fix minor php7.0 version
[travis] add ldap.so for php70
[HttpFoundation] Fix logic when JsonSerializable is missing
[travis] update to trusty
Add help description to debug:form command
Don't use return on Assert::markTestSkipped.
[TwigBridge] Show Twig's loader paths on debug:twig command
[FrameworkBundle] Fix Di config to allow for more private services
Create directories recursively in the PHPUnit bridge
[Dotenv] Add a BC break note
[Cache] Use options from Memcached DSN
Fix ArrayInput::toString() for VALUE_IS_ARRAY options/args
be able to enable workflow support explicitly
[Yaml] add inline parser context initializer
[ExpressionLanguage] throws an exception on calling uncallable method
* 3.3:
[travis] fix minor php7.0 version
[travis] add ldap.so for php70
[HttpFoundation] Fix logic when JsonSerializable is missing
[travis] update to trusty
Don't use return on Assert::markTestSkipped.
Create directories recursively in the PHPUnit bridge
[Dotenv] Add a BC break note
Fix ArrayInput::toString() for VALUE_IS_ARRAY options/args
[ExpressionLanguage] throws an exception on calling uncallable method
* 2.8:
[travis] update to trusty
Fix ArrayInput::toString() for VALUE_IS_ARRAY options/args
[ExpressionLanguage] throws an exception on calling uncallable method
* 2.7:
[travis] update to trusty
Fix ArrayInput::toString() for VALUE_IS_ARRAY options/args
[ExpressionLanguage] throws an exception on calling uncallable method
This PR was merged into the 3.4 branch.
Discussion
----------
[Yaml] add inline parser context initializer
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/23262#discussion_r131544176
| License | MIT
| Doc PR |
Calling the parser to initialize some internal context does not look
like a good idea. Additionally, this change allows to not accept null
values in `Inline::parse()` in 3.4 anymore.
Commits
-------
1be23c2a86 [Yaml] add inline parser context initializer
This PR was merged into the 3.4 branch.
Discussion
----------
[FrameworkBundle] be able to enable workflow support explicitly
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #24051
| License | MIT
| Doc PR |
Commits
-------
eaa506f562 be able to enable workflow support explicitly
This PR was squashed before being merged into the 3.4 branch (closes#24064).
Discussion
----------
[TwigBridge] Show Twig's loader paths on debug:twig command
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
`bin/console debug:twig`:
![twig-loader-paths](https://user-images.githubusercontent.com/2028198/29986784-ee5a4094-8f32-11e7-86c8-c78183630221.png
)
This information is not displayed anywhere ATM and it should be important to know:
* The Twig's namespaces availables
* The Twig's paths availables
* The order that templates will be loaded ( regarding its namespace -> LOAD PRIORITY ! )
So it should help us to debug any issue related to circular templates reference, invalid namespaces, unsuccessful attempt to override a template, etc.
WDYT?
Commits
-------
3fdcb40df3 [TwigBridge] Show Twig's loader paths on debug:twig command
This PR was merged into the 2.7 branch.
Discussion
----------
[ExpressionLanguage] throws an exception on calling uncallable method
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
When we evaluate an expression, if a callable is incorrect (not exists or not accessible) a warning is printed.
This PR handles this case and throws a \RuntimeException when `is_callable()` returns `false` :
```php
$el = new ExpressionLanguage();
$el->evaluate('foo.myfunction()', array('foo' => new \stdClass()));
```
**Before:**
`Warning: call_user_func_array() expects parameter 1 to be a valid callback, class 'stdClass' does not have a method 'myfunction' in /home/.../src/Symfony/Component/ExpressionLanguage/Node/GetAttrNode.php on line 84`
**After:**
`Fatal error: Uncaught RuntimeException: Unable to call method "myfunction" of object "stdClass". in /home/.../src/Symfony/Component/ExpressionLanguage/Node/GetAttrNode.php:81`
Commits
-------
c8b65aeb8b [ExpressionLanguage] throws an exception on calling uncallable method
This PR was squashed before being merged into the 3.3 branch (closes#24081).
Discussion
----------
[Dotenv] Add a BC break note
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? |no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #24078
| License | MIT
Commits
-------
66621cc [Dotenv] Add a BC break note
* 3.4:
Implemented PruneableInterface on TagAwareAdapter
Do not trigger deprecation if node has not been explicitly filled
Improve microseconds support in date caster
Use new configuration node depreciation method
This PR was merged into the 3.4 branch.
Discussion
----------
[VarDumper] Improve microseconds support in date caster
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | /
| License | MIT
| Doc PR | /
This PR adds the microseconds in ``period`` virtual property and in tooltip overview.
Before:
![](https://user-images.githubusercontent.com/4578773/29843773-58a2e212-8d0d-11e7-9053-3eb1cf933e3b.png)
After:
![](https://user-images.githubusercontent.com/4578773/29843774-58bd8342-8d0d-11e7-8d83-40835c89313c.png)
And fixes interval caster:
```php
dump((new DateTime('00:00:00'))->diff(new DateTime('00:00:00.123')));
// before
DateInterval {
interval: + 00:00:00.0.123
}
// after
DateInterval {
interval: + 00:00:00.123
}
```
Commits
-------
479b5d6 Improve microseconds support in date caster
This PR was merged into the 3.4 branch.
Discussion
----------
Use new configuration depreciation method
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
In keeping with #22382
Commits
-------
4a62cc6 Do not trigger deprecation if node has not been explicitly filled
012e381 Use new configuration node depreciation method
* 3.4:
[3.4][DI] Inline trivial services
sync upgrade file for Symfony 4.0 between branches
Fix ability to deprecate a config node
[DI] Minor fix in dumped code
[Console] Display file and line on Exception
Fix deprecations regarding core commands registered as services
#24046 added check for ext-dom to XmlUtil::loadFile
Calling the parser to initialize some internal context does not look
like a good idea. Additionally, this change allows to not accept null
values in `Inline::parse()` in 3.4 anymore.
This PR was merged into the 4.0-dev branch.
Discussion
----------
Add scalar typehints/return types
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no (final, already breaks if doc not respected)
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/23242#issuecomment-310327150
| License | MIT
| Doc PR | n/a
Commits
-------
7b1715b078 [Yaml] use scalar type hints where possible
6ce70e4bf9 Add scalar typehints/return types on final/internal/private code
This PR was merged into the 3.4 branch.
Discussion
----------
Fix deprecations regarding core commands registered as services
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/23624#discussion_r131979501
| License | MIT
| Doc PR | n/a
Current deprecation messages can be confusing (see fixed ticket), this improves them and adds a bunch of missing CHANGELOG/UPGRADE entries on the same topic
Commits
-------
4659975944 Fix deprecations regarding core commands registered as services
This PR was merged into the 3.4 branch.
Discussion
----------
[Console] Display file and line on Exception
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes/no
| Fixed tickets | -
| License | MIT
| Doc PR | -
When an exception occured:
If you have not set a verbose mode when running the command, you don't have information about the file and the line on which the exception occured.
So you must run a second time the command but the exception may not occured this time (if based on some databases datas which have changed) and it's a waste of time if you process is very long and the exception occured at the end.
The feature #21003 solve the problem if you are in a standard Symfony edition, if you leave the default settings and if you are in dev mode
Commits
-------
484d278 [Console] Display file and line on Exception
* 3.4:
[HttpKernel] Deprecate EnvParametersResource
[Lock] Check TTL expiration in lock acquisition
Fix race condition in tests between cache and lock
Improved how links are displayed in exception messages
This PR was squashed before being merged into the 3.4 branch (closes#24068).
Discussion
----------
[HttpKernel] Deprecate EnvParametersResource
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!--highly recommended for new features-->
See #24067
Commits
-------
76ea6df [HttpKernel] Deprecate EnvParametersResource
This PR was squashed before being merged into the 3.4 branch (closes#22542).
Discussion
----------
[Lock] Check TTL expiration in lock acquisition
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #22452
| License | MIT
| Doc PR | NA
This PR improve lock acquisition by throwing exception when the TTL is expired during the lock process.
Commits
-------
f74ef35778 [Lock] Check TTL expiration in lock acquisition
* 3.4:
Improved the design of the redirection method in the web toolbar
Mark SemaphoreStore::isSupported() as internal
[DI] Add ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE
[FrameworkBundle] Fix form conflict rule
[Security] add impersonator_user to "User was reloaded" log message
[DI] Add upgrade note about case insenstive params
add (pdo|chain) cache (adapter|simple) prune method
Update NoSuchPropertyException message for writeProperty
[Routing] added the possibility to define a prefix for all routes of a controller
[DI] Don't track merged configs when the extension doesn't expose it
[Cache] Use namespace versioning for backends that dont support clearing by keys
[VarDumper] add force-collapse/expand + use it for traces
* 3.3:
Improved the design of the redirection method in the web toolbar
Update NoSuchPropertyException message for writeProperty
[DI] Don't track merged configs when the extension doesn't expose it
[Cache] Use namespace versioning for backends that dont support clearing by keys
This PR was merged into the 3.4 branch.
Discussion
----------
[Routing] Add the possibility to define a prefix for all routes of a controller
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | sensiolabs/SensioFrameworkExtraBundle#283
| License | MIT
| Doc PR | not yet
This PR adds the possibility to define a name on a `@Route` annotation set on a controller class. The name is then used as a prefix for all routes defined in the controller.
Commits
-------
00d959c933 [Routing] added the possibility to define a prefix for all routes of a controller
This PR was merged into the 4.0-dev branch.
Discussion
----------
[DI] Remove case insensitive parameter names
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!--highly recommended for new features-->
First round, lets see :)
Commits
-------
ed3df04da8 [DI] Remove case insensitive parameter names
This PR was merged into the 4.0-dev branch.
Discussion
----------
[Lock] Remove old version check
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/23724
| License | MIT
| Doc PR | /
Because minimal required version PHP is currenty 7.1.3.
ping @jderusse
Commits
-------
d817f98004 Remove old version check
This PR was merged into the 3.4 branch.
Discussion
----------
[Lock] Make SemaphoreStore::isSupported() internal
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/24053#discussion_r136391875
| License | MIT
| Doc PR | /
Commits
-------
86f2f25856 Mark SemaphoreStore::isSupported() as internal
Fixed Bootstrap 4 error output
Updated form errors to look correctly
Cranked Twig Bridge Composer version to ~3.2
Added @ author PHPdoc tag to BS 4 test classes
Fixed small items, and added fieldset/legend support
- Fixed form class for File type
- Added fieldset element for expanded form types
- Added legend element as label for expanded form types
- Fixed horizontal form classes for labels
Added test for legend form label
Fixed form label coloring on validation errors
Fixed concrete Bootstrap layout test classes to use new code
Fixed tests for form-control-label class on form labels
Fixed a typo in using old Bootstrap 4 concrete test code
Processed proposed changes from stof
Processed proposed changes in bootstrap base layout from stof
Updated margin-top for error list in the alpha-5 version of BS 4
Fixed {% endblock ... %} and fixed BS error class in test
Fixed TwigRenderer => FormRenderer code change
Minor fixed for radio/checkboxes and fixed validation feedback
Added ~3.4 require of symfony/form (and <3.4 conflict) to Twig Bridge
composer.json
Updated Boostrap 4 file input to have class .form-control-file
This PR was merged into the 3.4 branch.
Discussion
----------
[VarDumper] add force-collapse/expand + use it for traces
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | not yet
| Fixed tickets | -
| License | MIT
| Doc PR | -
This improves dumping stack traces by expanding only frames that are outside of vendor dirs.
Here the new CLI output (everything was expanded before):
![capture du 2017-08-24 15-24-01](https://user-images.githubusercontent.com/243674/29668407-614dfe32-88e0-11e7-85b3-8b4f774559a5.png)
And here is the HTML output, with toggle-able frames:
![capture du 2017-08-24 15-24-40](https://user-images.githubusercontent.com/243674/29668410-65170c16-88e0-11e7-9388-147475a76b9f.png)
Todo:
- [x] make tests pass :)
Commits
-------
0e2d2b8c08 [VarDumper] add force-collapse/expand + use it for traces
This PR was merged into the 3.3 branch.
Discussion
----------
[Cache] Use namespace versioning for backends that dont support clearing by keys
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #23960
| License | MIT
| Doc PR | -
Commits
-------
f8a75180e0 [Cache] Use namespace versioning for backends that dont support clearing by keys
This PR was merged into the 3.3 branch.
Discussion
----------
[DI] Don't track merged configs when the extension doesn't expose it
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #24020
| License | MIT
| Doc PR | -
This is driving me crazy :)
Commits
-------
a8e6aac2f5 [DI] Don't track merged configs when the extension doesn't expose it
This PR was squashed before being merged into the 3.4 branch (closes#24026).
Discussion
----------
[Security] add impersonator_user to "User was reloaded" log message
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
My main concern is this: I use the swift monolog handler to get emails for exceptions.
I would like to see the impersonator in these mails.
But I'm not sure, if this is a good place for the log message.
Commits
-------
fc44215e70 [Security] add impersonator_user to "User was reloaded" log message
This PR was merged into the 3.3 branch.
Discussion
----------
[PropertyAccess] Update NoSuchPropertyException message for writeProperty
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no
| License | MIT
Hi,
I've get a NoSuchPropertyException error while creating REST API forms.
Having the property name in the exception is great, but in some case, this property is available in many objects. Having more information about the object that generate this exception is better.
I simply suggest to add a get_class of the current object in the error message.
Before:
`Could not determine access type for property "id".`
After (edit)
`Could not determine access type for property "id" in class "App\Command\UserUpdateCommand".`
Commits
-------
7855748c78 Update NoSuchPropertyException message for writeProperty
This PR was merged into the 3.4 branch.
Discussion
----------
[Cache] Add (pdo|chain) cache (adapter|simple) prune method
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR | symfony/symfony-docs#8209
This is additional work toward making more cache implementations use the `PruneableInterface` contract. Specifically, this pull request focuses on `(Pdo|Chain)(Cache|Adapter)`, as suggested by @nicolas-grekas in https://github.com/symfony/symfony/pull/23451#issuecomment-316735763.
Commits
-------
b20a237 add (pdo|chain) cache (adapter|simple) prune method
This PR was merged into the 4.0-dev branch.
Discussion
----------
[VarDumper] Prepare period caster for 4.0
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/23668
| License | MIT
| Doc PR | /
Commits
-------
fd7352e Prepare period caster for 4.0
* 3.4:
[HttpKernel] Fix loading legacy 3.3 containers in 3.4 context
[TwigBundle] require twig-bridge ~3.4
[Yaml] mark some classes as final
Fixed the escaping of back slashes and << in console output
Add debug:form command
bumped Symfony version to 2.8.28
updated VERSION for 2.8.27
updated CHANGELOG for 2.8.27
bumped Symfony version to 2.7.35
updated VERSION for 2.7.34
update CONTRIBUTORS for 2.7.34
updated CHANGELOG for 2.7.34
* 3.3:
Fixed the escaping of back slashes and << in console output
bumped Symfony version to 2.8.28
updated VERSION for 2.8.27
updated CHANGELOG for 2.8.27
bumped Symfony version to 2.7.35
updated VERSION for 2.7.34
update CONTRIBUTORS for 2.7.34
updated CHANGELOG for 2.7.34
* 2.8:
Fixed the escaping of back slashes and << in console output
bumped Symfony version to 2.8.28
updated VERSION for 2.8.27
updated CHANGELOG for 2.8.27
bumped Symfony version to 2.7.35
updated VERSION for 2.7.34
update CONTRIBUTORS for 2.7.34
updated CHANGELOG for 2.7.34
* 2.7:
Fixed the escaping of back slashes and << in console output
bumped Symfony version to 2.7.35
updated VERSION for 2.7.34
update CONTRIBUTORS for 2.7.34
updated CHANGELOG for 2.7.34
This PR was merged into the 3.4 branch.
Discussion
----------
[Form] Add debug:form command
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/23688
| License | MIT
| Doc PR | -
![debug-form](https://user-images.githubusercontent.com/2028198/29007125-c3508cd6-7aca-11e7-91e2-c2b509847db5.png)
A short class name (e.g. `DateType`) can be passed as `class` argument too (the command will try to resolve its FQCN if it's in known form type namespaces).
Commits
-------
4f040d78fe Add debug:form command
* 3.4: (38 commits)
Fix merge
[Lock] Expose an expiringDate and isExpired method in Lock
[VarDumper] fix DateCasterTest
[config] Add ability to deprecate a node
feature #22382 [config] Add abbitily to deprecate a node (Nyholm, fabpot, sanpii)
Fix segfault in period caster
Create an interface for TranslationReader and moved TranslationLoader to Translation component
Always require symfony/polyfill-apcu to provide APCuIterator everywhere
[Lock] Fix some tests that require pcntl_sigwaitinfo() function
bumped Symfony version to 3.3.9
updated VERSION for 3.3.8
updated CHANGELOG for 3.3.8
[DI] Fix tracking env var placeholders nested in object graphs
bumped Symfony version to 3.3.8
updated VERSION for 3.3.7
updated CHANGELOG for 3.3.7
Add period caster
[DI] improve psr4-based service discovery with namespace option
[DI] Fix tracking env vars when merging configs (bis)
removed obsolete comment
...
* 3.3: (27 commits)
Always require symfony/polyfill-apcu to provide APCuIterator everywhere
bumped Symfony version to 3.3.9
updated VERSION for 3.3.8
updated CHANGELOG for 3.3.8
[DI] Fix tracking env var placeholders nested in object graphs
bumped Symfony version to 3.3.8
updated VERSION for 3.3.7
updated CHANGELOG for 3.3.7
[DI] Fix tracking env vars when merging configs (bis)
removed obsolete comment
install PHPUnit 6 on PHP 7.2
[Cache] Use zend.detect_unicode instead of zend.multibyte
Fix case sensitive typo in use class name
[VarDumper] Enhance docblock to tell about AbstractDumper::dumpLine(-1)
[Debug] Remove false-positive check in DebugClassLoader
[Validator] Fix use of GroupSequenceProvider in child classes
Change number PHPDoc type to int|float
[Cache] Workaround zend.detect_unicode + zend.multibyte
[VarDumper] Strengthen dumped JS
[VarDumper] Strengthen dumped JS
...
This PR was squashed before being merged into the 3.4 branch (closes#22543).
Discussion
----------
[Lock] Expose an expiringDate and isExpired method in Lock
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #22452
| License | MIT
| Doc PR | NA
This PR store the expiration date of the lock in the key and exposes public method to let the user know the state of the Lock expiration.
Commits
-------
279430800e [Lock] Expose an expiringDate and isExpired method in Lock
This PR was merged into the 4.0-dev branch.
Discussion
----------
[VarDumper] Use spl_object_id() with php72 polyfill when needed
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Not possible on lower branches because the polyfill doesn't support HHVM.
Commits
-------
6dd695e3bc [VarDumper] Use spl_object_id() with php72 polyfill when needed
This PR was merged into the 3.4 branch.
Discussion
----------
[Translation] Create an TranslationReaderInterface and move TranslationLoader to TranslationComponent
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Create an interface for TranslationLoader. I put this in the Translation component even though the TranslationLoader implementation is in the FrameworkBundle. (Here is a PR moving the TranslationLoader to the Translation component: #23666)
We need this in PHP-translation. We currently have to rewrite things in strange mannar like: https://github.com/php-translation/symfony-storage/blob/0.2.2/src/FileStorage.php#L62-L64
Commits
-------
5bc50da677 Create an interface for TranslationReader and moved TranslationLoader to Translation component
This PR was squashed before being merged into the 2.7 branch (closes#23730).
Discussion
----------
Fixed the escaping of back slashes and << in console output
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18481
| License | MIT
| Doc PR | -
Not sure if it's a valid solution, but this is my attempt to solve #18481.
Commits
-------
d5cb1fe711 Fixed the escaping of back slashes and << in console output
This PR was merged into the 3.4-dev branch.
Discussion
----------
[config] Add abbitily to deprecate a node
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | maybe
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/7794
For BC breaks, I don’t know if modifying the Xml and Yaml dumper output is considering as a BC break (it’s just a comment).
Commits
-------
31d2250f4c [config] Add abbitily to deprecate a node
3b6442f8b2 feature #23947 [Translation] Adding the ability do load <notes> in xliff2.0 (Nyholm)
b0cdb53d67 [Translation] Adding the ability do load <notes> in xliff2.0
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] Improve psr4-based service discovery (alternative implementation)
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #22397
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/8310
This is an alternative to #23986. It is simpler and doesn't require a second glob in the service id. This adds a `namespace` option. It is optional and if it isn't used, then it falls back to using the service id (current behaviour).
As stof mentions in https://github.com/symfony/symfony/issues/22397#issuecomment-324972955, it is consistent with the xml loader.
With this feature, you can define your services like this:
```yaml
services:
command_handlers:
namespace: App\Domain\
resource: ../../src/Domain/*/CommandHandler
tags: [command_handler]
event_subscribers:
namespace: App\Domain\
resource: ../../src/Domain/*/EventSubscriber
tags: [event_subscriber]
```
ping @stof, @nicolas-grekas
Commits
-------
00d7f6f [DI] improve psr4-based service discovery with namespace option
* 2.8:
[VarDumper] Enhance docblock to tell about AbstractDumper::dumpLine(-1)
[Debug] Remove false-positive check in DebugClassLoader
[Validator] Fix use of GroupSequenceProvider in child classes
Change number PHPDoc type to int|float
[VarDumper] Strengthen dumped JS
[travis] Add timing info
[Validator] Fix Greek translation
[Console] Initialize lazily to render exceptions properly
[Validator] Add a property tag for File::$maxSize
This PR was merged into the 3.3 branch.
Discussion
----------
Fix case sensitive typo in use class name
closes#24001
Change is simple typo: Parameterbag = ParameterBag
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Fixes this:
`
[RuntimeException]
An error occurred when executing the "'cache:clear --no-warmup'" command:
Fatal error: Uncaught RuntimeException: Case mismatch between loaded and declared class names: "Symfony\Component\DependencyInjection\Parameterbag\EnvPlaceholderParameterBag" v
s "Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag". in /Users/phil/Sites/maintain.myjoomla.com/vendor/symfony/symfony/src/Symfony/Component/Debug
/DebugClassLoader.php:165
`
Commits
-------
6fe9072c42 Fix case sensitive typo in use class name
* 2.7:
[VarDumper] Enhance docblock to tell about AbstractDumper::dumpLine(-1)
[Debug] Remove false-positive check in DebugClassLoader
[Validator] Fix use of GroupSequenceProvider in child classes
Change number PHPDoc type to int|float
[VarDumper] Strengthen dumped JS
[travis] Add timing info
[Validator] Fix Greek translation
[Console] Initialize lazily to render exceptions properly
[Validator] Add a property tag for File::$maxSize
This PR was merged into the 2.7 branch.
Discussion
----------
[VarDumper] Enhance docblock to tell about AbstractDumper::dumpLine(-1)
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #23992
| License | MIT
| Doc PR | -
Commits
-------
0164038998 [VarDumper] Enhance docblock to tell about AbstractDumper::dumpLine(-1)
This PR was merged into the 4.0-dev branch.
Discussion
----------
[config] Add abbitily to deprecate a node
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | maybe
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/7794
For BC breaks, I don’t know if modifying the Xml and Yaml dumper output is considering as a BC break (it’s just a comment).
Commits
-------
31d2250f4c [config] Add abbitily to deprecate a node
3b6442f8b2 feature #23947 [Translation] Adding the ability do load <notes> in xliff2.0 (Nyholm)
b0cdb53d67 [Translation] Adding the ability do load <notes> in xliff2.0
This PR was squashed before being merged into the 2.7 branch (closes#23925).
Discussion
----------
[Validator] Fix use of GroupSequenceProvider in child classes
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | not in real cases
| Deprecations? | no
| Tests pass? | yes
| License | MIT
For example validation of doctrine proxy objects fails.
Commits
-------
8d7b203d80 [Validator] Fix use of GroupSequenceProvider in child classes
* 3.4:
[Console] Add protected static $defaultName to set the default name of a Command
removed sf2 references
[Console] Allow commands to provide a default name for compile time registration
[DI] Case sensitive parameter names
This PR was merged into the 3.4 branch.
Discussion
----------
[Console] Allow commands to provide a default name for compile time registration
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #23796
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/issues/8147
Commits
-------
eda7d42955 [Console] Add protected static $defaultName to set the default name of a Command
5d9ae6b56f [Console] Allow commands to provide a default name for compile time registration
This PR was merged into the 3.3 branch.
Discussion
----------
[Cache] Fix >30 days expirations with Memcached
| 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 | -
As documented in https://github.com/memcached/memcached/wiki/Programming#expiration, expiration times > 30 days are considered as unix timestamps by Memcached.
Commits
-------
2348d64b86 [Cache] Fix >30 days expirations with Memcached
This PR was merged into the 2.7 branch.
Discussion
----------
[Validator] Add a property tag for File::$maxSize
| Q | A
| ------------- | ---
| Branch? | 2.7
| 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? | Not confirmed (because minor change)
| Fixed tickets | -
| License | MIT
| Doc PR | -
For helping IDE to static analyze.
Commits
-------
b72ced22ad [Validator] Add a property tag for File::$maxSize
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] Case sensitive parameter names
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #23809
| License | MIT
| Doc PR | symfony/symfony-docs#... <!--highly recommended for new features-->
@GuilhemN took your patch.. but i use the same deprecation messages as for case sensitive service id's, i found it more clear. Also comparing to $origName to keep the diff smaller
Commits
-------
8a1d16839e [DI] Case sensitive parameter names
This PR was merged into the 3.4 branch.
Discussion
----------
Remove some sf2 references
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Those `sf2` references can be safely remove and changed to `symfony` as there are internal or they don't break anything when upgrading Symfony's version:
* Flashes are ephemeral, so changing the key in the session is not a problem;
* Changing the local storage key for the profiler is not an issue as this is a dev tool.
Commits
-------
1b0265417b removed sf2 references
* 3.4:
[Webprofiler] Added blocks that allows extension of the profiler page.
[Dotenv] Get env using $_SERVER to work with fastcgi_param and workaround thread safety issues
[Dotenv][WebServerBundle] Override previously loaded variables
Create an interface for TranslationWriter
[Translation] Adding the ability do dump <notes> in xliff2.0
[DI] Use GlobResource for non-tracked directories
[DI] Fix resolving env vars when compiling a ContainerBuilder
[SecurityBundle] resolve class name parameter inside AddSecurityVotersPass
[FrameworkBundle] Add soft conflict rule of "cache:clear" + HttpKernel 3.4
[WebProfilerBundle] Re add missing link to the controller
* 3.3:
[Dotenv] Get env using $_SERVER to work with fastcgi_param and workaround thread safety issues
[Dotenv][WebServerBundle] Override previously loaded variables
[DI] Use GlobResource for non-tracked directories
[WebProfilerBundle] Re add missing link to the controller
This PR was squashed before being merged into the 3.4 branch (closes#23680).
Discussion
----------
[Webprofiler] Added blocks that allows extension of the profiler page.
| Q | A
| ------------- | ---
| Branch? | 3.4 (to be retargeted)
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Im not sure if we allow this but I thought I would try to submit this PR.
The [TranslationBundle](https://github.com/php-translation/symfony-bundle) is extending the Symfony profiler page for translation. It would be great if it didn't have to replace all the contents but just replace some smaller blocks.
Commits
-------
ffd25fb9c2 [Webprofiler] Added blocks that allows extension of the profiler page.
This PR was squashed before being merged into the 3.3 branch (closes#23799).
Discussion
----------
[Dotenv][WebServerBundle] Override previously loaded variables
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #23723
| License | MIT
This PR implements @nicolas-grekas's idea about how we could refresh loaded environment variables. See his comment https://github.com/symfony/symfony/issues/23723#issuecomment-320455669
Commits
-------
c5a1218555 [Dotenv][WebServerBundle] Override previously loaded variables
This PR was merged into the 3.3 branch.
Discussion
----------
[WebProfilerBundle] Re add missing link to the controller
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes (because it was on 3.2 but not in 3.3)
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
---
![screenshot at 2017-07-26 10-54-16](https://user-images.githubusercontent.com/408368/28612883-ea88f398-71f0-11e7-8361-a8e95036cf07.png)
Commits
-------
1d10857179 [WebProfilerBundle] Re add missing link to the controller
This PR was squashed before being merged into the 3.4 branch (closes#23665).
Discussion
----------
Create an interface for TranslationWriter
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | ~~~no~~~ yes
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
We should provide an interface for the TranslationWriter. This allows other libraries (php-translation) that depend on the Translation component provide different implementations.
Commits
-------
c25eafa Create an interface for TranslationWriter
This PR was merged into the 3.3 branch.
Discussion
----------
[DI] Use GlobResource for non-tracked directories
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
I noticed that some of my excluded directories are still tracked by the container and changes to files inside them make it recompile. This brought me to the `$trackContents || is_dir($path)` line introduced in #21505.
Commits
-------
048eb18 [DI] Use GlobResource for non-tracked directories
This PR was squashed before being merged into the 3.4 branch (closes#23890).
Discussion
----------
[Translation] Adding the ability do dump <notes> in xliff2.0
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR | n/a
The Xliff2.0 dumper do not dump notes. The note section is the only place (as far as I can see) you can add arbitrary data. See [specification](http://docs.oasis-open.org/xliff/xliff-core/v2.0/os/xliff-core-v2.0-os.html).
This will be useful when you want to add data like "approved", "status" etc. I can see from the test code that a previous author intends to use attributes to the <target> for such data. That is [not allowed](http://docs.oasis-open.org/xliff/xliff-core/v2.0/os/xliff-core-v2.0-os.html#target), not even with a custom namespace.
If you want to validate my test fixture, here is the validator: http://okapi-lynx.appspot.com/validation
Commits
-------
c4dd11c [Translation] Adding the ability do dump <notes> in xliff2.0
This PR was merged into the 3.3 branch.
Discussion
----------
[DI] Fix resolving env vars when compiling a ContainerBuilder
| 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 | -
As spotted by @ro0NL, `$container->compile(true)` doesn't resolve direct env var references found in service definitions. Fixed here.
Commits
-------
9219594 [DI] Fix resolving env vars when compiling a ContainerBuilder
This PR was squashed before being merged into the 3.4 branch (closes#23862).
Discussion
----------
[SecurityBundle] resolve class name parameter inside AddSecurityVotersPass
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #23733
| License | MIT
Commits
-------
a86bf52 [SecurityBundle] resolve class name parameter inside AddSecurityVotersPass
* 3.4:
[HttpKernel][FrameworkBundle] Add RebootableInterface, fix and un-deprecate cache:clear with warmup
[DI] Fix merging of env vars in configs
Allow to get alternatives when ServiceNotFoundException occurs.
[DI] Rererence parameter arrays when possible
Revert "feature #21038 [FrameworkBundle] deprecated cache:clear with warmup (fabpot)"
This PR was merged into the 3.3 branch.
Discussion
----------
[DI] Fix merging of env vars in configs
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #22561, #23520
| License | MIT
| Doc PR | -
Commits
-------
00b9273 [DI] Fix merging of env vars in configs
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] Allow get available services from service locator
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| 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 3.4,
legacy code removals go to 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.
-->
Sometimes we are using service locators and throw context specific exceptions if service not found inside it. Would be nice inform user about available services in our custom exception, like:
```php
try {
return $this->transports->get($transport);
} catch (NotFoundExceptionInterface $e) {
$availableTransports = method_exists($e, 'getAlternatives') ? $e->getAlternatives() : [];
throw TransportNotFoundException::create($transport, $availableTransports, $e);
}
```
Commits
-------
4993b1c14c Allow to get alternatives when ServiceNotFoundException occurs.
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] Rererence parameter arrays when possible
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no (perf optim)
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This a minor optim that might save memory and CPU for cases where big array parameters are inlined by DI extensions. This re-references them when possible.
Commits
-------
62c1bb5d3b [DI] Rererence parameter arrays when possible
This PR was merged into the 3.3 branch.
Discussion
----------
Revert "feature #21038 [FrameworkBundle] deprecated cache:clear with warmup (fabpot)"
This reverts commit 3495b35e4f, reversing
changes made to 7f7b897ee2.
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #21038
| License | MIT
| Doc PR | -
Sibling to #23792: there is no need to trigger the deprecation in 3.3 if we un-deprecate in 3.4.
Commits
-------
90099706c6 Revert "feature #21038 [FrameworkBundle] deprecated cache:clear with warmup (fabpot)"
* 3.4:
[VarDumper] Fix tests with phpredis 3.1.3
[Routing] Use "controller" keyword for configuring routes controllers
[VarDumper] Fix interval caster with PT3600S-like spec
[DI] Fix reading env vars from fastcgi params
[HttpKernel] Remove old container files
Allow phpdocumentor/reflection-docblock 4.
[VarDumper] play nice with open_basedir when looking for composer.json
* 3.3:
[VarDumper] Fix tests with phpredis 3.1.3
[DI] Fix reading env vars from fastcgi params
Allow phpdocumentor/reflection-docblock 4.
[VarDumper] play nice with open_basedir when looking for composer.json
This PR was merged into the 3.3 branch.
Discussion
----------
[DI] Fix reading env vars from fastcgi params
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #23348
| License | MIT
| Doc PR | -
Values in fastcgi_param populate `$_SERVER`, never `$_ENV`.
This PR makes `$container->getEnv()` read from `$_SERVER`, excluding any vars whose name start by `HTTP_` as that would be a security issue (values injection via HTTP headers.)
Embeds a few other fixes found meanwhile.
Commits
-------
adff65a [DI] Fix reading env vars from fastcgi params
This PR was squashed before being merged into the 3.4 branch (closes#23793).
Discussion
----------
[VarDumper] Fix interval caster with PT3600S-like spec
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | /
| License | MIT
| Doc PR | /
According [ISO 8601](https://fr.wikipedia.org/wiki/ISO_8601):
> The standard does not prohibit date and time values in a duration representation from exceeding their "carry over points" except as noted below. Thus, "PT36H" could be used as well as "P1DT12H" for representing the same duration.
But this *breaks* ``interval`` representation, and this PR improves this.
```php
dump(new DateInterval('PT3600S'));
// before
DateInterval {
interval: + 00:00:3600.0
}
// after
DateInterval {
interval: + 01:00:00.0
}
```
Commits
-------
046f8c1 [VarDumper] Fix interval caster with PT3600S-like spec
This PR was merged into the 3.3 branch.
Discussion
----------
[VarDumper] play nice with open_basedir when looking for composer.json
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #23661
| License | MIT
| Doc PR | -
ping @pounard, can you please confirm this fixes the issue you reported?
Commits
-------
1bea774 [VarDumper] play nice with open_basedir when looking for composer.json
This PR was merged into the 3.3 branch.
Discussion
----------
Allow phpdocumentor/reflection-docblock 4
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
| Doc PR | N/A
The PHPDocumentor team bumped their reflection-docblock library to version 4 due to a breaking change that should not affect Symfony, as far as I can tell. This PR indicates compatibility with the new major version.
Commits
-------
1a5fd79 Allow phpdocumentor/reflection-docblock 4.
* 3.4:
Update JsonBundleReader.php
[HttpKernel] Clean test directory on tear down
[Console] Remove useless http-kernel dev dep
Fix testHtml method with regexp
Fixed some param/return annotations in PHPDOC blocks.
[Workflow] fixed InvalidDefinitionException message for StateMachineValidator
* 3.3:
Update JsonBundleReader.php
[HttpKernel] Clean test directory on tear down
[Console] Remove useless http-kernel dev dep
Fix testHtml method with regexp
Fixed some param/return annotations in PHPDOC blocks.
[Workflow] fixed InvalidDefinitionException message for StateMachineValidator
This PR was merged into the 2.7 branch.
Discussion
----------
[HttpKernel] Clean test directory on tear down
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
I've been bitten by this leftover too often.
Commits
-------
0a3dc11 [HttpKernel] Clean test directory on tear down
This PR was merged into the 3.3 branch.
Discussion
----------
[Console] Remove useless http-kernel dev dep
| Q | A
| ------------- | ---
| Branch? | 3.3
| 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
-------
8cbf094 [Console] Remove useless http-kernel dev dep
* 3.4:
Made some SecurityBundle tests case-insensitive to prepare for future Symfony versions
[Console] Added a case-insensitive fallback for console command names
fix merge
[DI] Fix dumping abstract with YamlDumper
restrict reflection doc block
[DI] Fix YamlDumper not dumping abstract and autoconfigure
This PR was squashed before being merged into the 3.4 branch (closes#23852).
Discussion
----------
Made some SecurityBundle tests case-insensitive to prepare for future Symfony versions
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This is what @nicolas-grekas [told me to do](https://github.com/symfony/symfony/pull/23797#issuecomment-320579781) to unlock #23797.
Commits
-------
9b7750a Made some SecurityBundle tests case-insensitive to prepare for future Symfony versions
This PR was merged into the 3.3 branch.
Discussion
----------
restrict reflection doc block
| Q | A
| ------------- | ---
| Branch? | 3.1, 3.2, 3.3, master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
I think we should have same behavior on 2.8 and 3.0 but there `phpdocumentor/reflection` is required and i whanted to avoid conflicts.
### Reason:
The version 3.2.0 and 3.2.1 of phpdocumentor/reflection-docblock is really broken. All Annotations lide `@api`, means without any bracket, leads to errors like `Uninitialized string offset: 0`. We in the CMF do not require that bundle directly, but symfony does and so we get braking builds.
Commits
-------
6760127 restrict reflection doc block
* 3.4: (23 commits)
[DI] Allow dumping inline services in Yaml
fixed CS
[2.8] Modify 2.8 upgrade doc - key option is deprecated.
Fix lock failling test
[Debug] Correctly detect methods not from the same vendor
[HttpKernel] Deprecated commands auto-registration
Fix minors in date caster
[FrameworkBundle] Catch Fatal errors in commands registration
[Debug] Detect internal and deprecated methods
[Profiler] Make the validator toolbar item consistent with the form one
[DebugBundle] Reword an outdated comment about var dumper wiring
updated CHANGELOG
[HttpFoundation] Remove length limit on ETag
[DI] Fix some docblocks
[DI] Fix some docblocks
Fixed the exception page design in responsive mode
[Console] Log exit codes as debug messages instead of errors
Fixed UPGRADE-4.0 about Container::set
Ignore memcached missing key error on dession destroy
[FrameworkBundle] Allow micro kernel to subscribe events easily
...
This PR was merged into the 3.4 branch.
Discussion
----------
[Profiler] Make the validator toolbar item consistent with the form one
| Q | A
| ------------- | ---
| Branch? | 3.4 <!-- see comment below -->
| 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 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
After more time experiencing it, I changed my mind about https://github.com/symfony/symfony/pull/22554#pullrequestreview-37818648.
I do think replicating the form toolbar item behavior is the best thing to do.
Displaying a different property under some conditions may seem to be a bad idea, but the difference is clearly expressed by the background color used:
|-|-|
|--|--|
|<img alt="screenshot 2017-08-09 a 15 59 56" src="https://user-images.githubusercontent.com/2211145/29125368-de340da4-7d1b-11e7-9b04-8ff395e118f0.PNG">| Red: something wrong happened. Shows the relevant information: the number of violations.|
|<img alt="screenshot 2017-08-09 a 16 00 05" src="https://user-images.githubusercontent.com/2211145/29125374-e28dd6a0-7d1b-11e7-8ed6-b0d7634a5b21.PNG">| Grey: Everything went fine. Acknowledge the validator calls were made and passed by showing the number of calls.|
In any case, everything is clear when hovering the toolbar item (and most users are probably already used to this behavior due to the form item):
|Violations|No violations|
|--|--|
|<img width="173" alt="screenshot 2017-08-09 a 15 51 18" src="https://user-images.githubusercontent.com/2211145/29125023-e35ca602-7d1a-11e7-82d5-0ff3c0d9c46c.PNG">|<img width="172" alt="screenshot 2017-08-09 a 15 51 31" src="https://user-images.githubusercontent.com/2211145/29125037-ebbf0614-7d1a-11e7-8cd2-de6cb963a282.PNG">|
Commits
-------
b622d26978 [Profiler] Make the validator toolbar item consistent with the form one
This PR was merged into the 3.4 branch.
Discussion
----------
[Lock] Fix/lock test
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
Test on the Lock component often fail, the purpose of this PR is to fix it.
The goal of this failling test is to assert that blocking locks works. To test the blocking mode, I had to create 2 concurent process and I used pcntl_fork for that.
Sadly, travis takes more time to fork the process than configured TTL.
This PR replace the previous "sleep" to let child and parent starts, by a pcntl communication between child and parent.
| Process 1 | Process 2
| ----------------------- | ----------
| Wait N°2 |
| | Acquire Lock
| | Send signal to N°1
| Wake up | Wait N°1
| Try lock(non block) |
| => assert failure |
| Send signal to N°2 |
| lock(block) | Wake up
| .. | sleep 50 000ms
| .. | ..
| .. | Release lock
| => assert Acquired | exit
| Release lock |
| => assert child exit 0 |
Commits
-------
ff951697b6 Fix lock failling test
* 3.3:
fixed CS
[2.8] Modify 2.8 upgrade doc - key option is deprecated.
[DebugBundle] Reword an outdated comment about var dumper wiring
[DI] Fix some docblocks
[DI] Fix some docblocks
Fixed the exception page design in responsive mode
[Console] Log exit codes as debug messages instead of errors
Fixed UPGRADE-4.0 about Container::set
Ignore memcached missing key error on dession destroy
bumped Symfony version to 3.2.14
updated VERSION for 3.2.13
updated CHANGELOG for 3.2.13
* 3.2:
[DebugBundle] Reword an outdated comment about var dumper wiring
Ignore memcached missing key error on dession destroy
bumped Symfony version to 3.2.14
updated VERSION for 3.2.13
updated CHANGELOG for 3.2.13
* 2.8:
fixed CS
[2.8] Modify 2.8 upgrade doc - key option is deprecated.
[DebugBundle] Reword an outdated comment about var dumper wiring
[DI] Fix some docblocks
Ignore memcached missing key error on dession destroy
Github template: Remove EOM 3.2 from branch suggestion
[Security] Fix security.interactive_login event const doc block
Avoid infinite loops when profiler data is malformed
[Bridge\ProxyManager] Dont call __destruct() on non-instantiated services
Docblock improvement
bumped Symfony version to 2.8.27
updated VERSION for 2.8.26
updated CHANGELOG for 2.8.26
bumped Symfony version to 2.7.34
updated VERSION for 2.7.33
update CONTRIBUTORS for 2.7.33
updated CHANGELOG for 2.7.33
[HttpFoundation] Generate safe fallback filename for wrongly encoded filename
This PR was merged into the 3.4 branch.
Discussion
----------
[Debug] Correctly detect methods not from the same vendor
| Q | A
| ------------- | ---
| Branch? | 3.4
| 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 |
| License | MIT
| Doc PR |
I just realized there were two issues in https://github.com/symfony/symfony/pull/23816:
* when a class extended another class from the same vendor itself extending a class from another vendor containing deprecated methods, the deprecation wasn't triggered in case the first class extended a deprecated method from the last class because the parent from the same vendor was used for "the same vendor check".
* As stated in https://github.com/symfony/symfony/pull/23816#issuecomment-320661894, ReflectionMethod::$class doesn't contain the right value when using a trait so if you extended a trait containing methods from another vendor you would have always get deprecations. I fixed this by comparing the method file to the filename of the class using the trait.
@nicolas-grekas are you aware of any issue of `ReflectionMethod::getFilename()`?
Commits
-------
08d352a [Debug] Correctly detect methods not from the same vendor
This PR was merged into the 3.4 branch.
Discussion
----------
[VarDumper] Minor fix in date caster
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | /
| License | MIT
| Doc PR | /
Commits
-------
9fdb5d4 Fix minors in date caster
This PR was merged into the 2.7 branch.
Discussion
----------
[DebugBundle] Reword an outdated comment about var dumper wiring
| Q | A
| ------------- | ---
| Branch? | 2.7 <!-- see comment below -->
| 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? | no
| Fixed tickets | N/A <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
This comment is outdated since #19647, as the default config is now the one used all the way through in HTTP mode, while it's overridden in CLI mode by the `DumpListener` on `console.command` event.
Commits
-------
f876fd9 [DebugBundle] Reword an outdated comment about var dumper wiring
This PR was squashed before being merged into the 3.4 branch (closes#23816).
Discussion
----------
[Debug] Detect internal and deprecated methods
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes <!-- 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 |
| License | MIT
| Doc PR |
I just realized we do not detect `@deprecated` methods like we do for `@final` methods, so here's a fix.
I reorganized the file to avoid code duplication... so the diff is kind of impressive but the behavior is the same.
Commits
-------
16eeabf [Debug] Detect internal and deprecated methods
This PR was merged into the 2.7 branch.
Discussion
----------
Ignore memcached missing key error on session destroy
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18574
| License | MIT
| Doc PR | NA
Since PHP 7 session_regenerate_id triggers a warning when the session is not started.
This PR, changes the behaviours of session_destroy in the `MemcachedSessionHandler` by returning true when the user try to delete a non-existing session.
Other handler:
- LegacyPdoSessionHandler => don't check if key exists
- MongoDbSessionHandler => don't check if key exists
- NullSessionHandler => always true
- PdoSessionHandler => don't check if key exists
Commits
-------
29538b621c Ignore memcached missing key error on dession destroy
This PR was merged into the 3.3 branch.
Discussion
----------
Fixed the exception page design in responsive mode
| 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 | -
I broke the design of the exception pages in responsive mode between Symfony 3.3.5 and 3.3.6:
### Symfony 3.3.5
![sf-335](https://user-images.githubusercontent.com/73419/29074568-127cbf92-7c50-11e7-9e4e-51ad1c61e03c.png)
### Symfony 3.3.6
![sf-336](https://user-images.githubusercontent.com/73419/29074567-11d38b48-7c50-11e7-9114-036cbe4d07e9.png)
---
This PR fixes the issue and also removes some CSS leftovers used during the redesign.
Commits
-------
cd8af2284d Fixed the exception page design in responsive mode
This PR was squashed before being merged into the 3.4 branch (closes#22187).
Discussion
----------
[DependencyInjection] Support local binding
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes <!-- 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 | https://github.com/symfony/symfony/issues/22167, #23718
| License | MIT
| Doc PR |
> A great idea came out on Slack about local bindings.
> We could allow injecting services based on type hints on a per service/file basis:
> ```yml
> services:
> _defaults:
> bind:
> BarInterface: '@usual_bar'
>
> Foo:
> bind:
> BarInterface: '@alternative_bar'
> $quz: 'quzvalue'
> ```
>
> This way, `@usual_bar` will be injected in any parameter type hinted as `BarInterface` (in a constructor or a method signature), but only for this service/file.
> Note that bindings could be unused, giving a better solution than https://github.com/symfony/symfony/pull/22152 to https://github.com/symfony/symfony/pull/21711.
>
> As named parameters are usable in arguments, bindings could be usable in arguments too:
> ```yml
> services:
> Foo:
> arguments:
> BarInterface: '@bar'
> ```
~Named parameters aren't supported yet.~
Edit:
> Note that bindings could be unused
Current behavior is throwing an exception when a binding is not used at all, in no services of a file if it was inherited from `_defaults` or in no services created from a prototype.
It will pass if the bindings are all used in at least one service.
Commits
-------
81f2652 [DependencyInjection] Support local binding
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] Generate one file per service factory
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #23601
| License | MIT
| Doc PR | -
See #23678 for background on this proposal.
Commits
-------
4037009490 [DI] Generate one file per service factory
This PR was squashed before being merged into the 3.4 branch (closes#23807).
Discussion
----------
[Debug] Trigger a deprecation when using an internal class/trait/interface
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks? | no
| Deprecations? | not truly <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/23800
| License | MIT
| Doc PR |
Trigger a deprecation when the user uses an internal class/trait/interface.
The deprecation is not triggered when an `@internal` is used in the same vendor.
Commits
-------
b89ba29 [Debug] Trigger a deprecation when using an internal class/trait/interface
This PR was merged into the 3.3 branch.
Discussion
----------
[Cache] Hash cache key on save
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | ye
| Fixed tickets | n.A.
| License | MIT
| Doc PR | n.A.
Cache keys are not hashed right now in adapters extending from `AbstractAdapter`. This PR fixes this. I am not familiar enough with the cache test suite so I don't know where to add an regression test.
Commits
-------
94b1b12 Hash cache keys on save
This PR was merged into the 3.3 branch.
Discussion
----------
[HttpKernel] Remove isset call used for legacy
| Q | A
| ------------- | ---
| Branch? | 3.3 <!-- see comment below -->
| 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 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
Added in #9628 in which the request stack dependency was nullable. Forgotten to be removed in #14634.
Commits
-------
e0a6010 [HttpKernel] Remove isset call used for legacy
This PR was squashed before being merged into the 3.4 branch (closes#23801).
Discussion
----------
Continuation of #23624
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!--highly recommended for new features-->
See https://github.com/symfony/symfony/pull/23624#discussion_r131539736
cc @chalasr
Also included service injection for init:acl + set:acl and simplification of lint:xliff + lintt:yaml.
Btw, i think init:acl needs to be renamed to acl:init :)
Commits
-------
5f637c1 Continuation of #23624
* 3.4:
[FrameworkBundle] Commands as a service
[Config] Enable cannotBeEmpty along with requiresAtLeastOneElement
Remove leading 0 in ms of date caster
[Workflow] feature: add getter in workflow
[Workflow] do not emit not needed guard events
add groups support to the Valid constraint
This PR was squashed before being merged into the 3.4 branch (closes#23624).
Discussion
----------
[FrameworkBundle] Commands as a service
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes/no
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!--highly recommended for new features-->
Next step towards #23488
It's a work in progress if we want to do all commands at once (im fine :)). But i think we should review `assets:install` first.
Also im assuming framework commands can rely on `getApplication()->getKernel()` from the framework application (we already do that in some commands). That saves a dep on `@kernel`.
And filesystem as a service; perhaps drop that as well :)
Commits
-------
de1dc0b [FrameworkBundle] Commands as a service
This PR was merged into the 3.4 branch.
Discussion
----------
[Workflow] do not emit not needed guard events
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #23677
| License | MIT
| Doc PR |
Commits
-------
47c68e12ea [Workflow] do not emit not needed guard events
This PR was merged into the 3.4 branch.
Discussion
----------
[Validator] add groups support to the Valid constraint
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #3622, #17622
| License | MIT
| Doc PR | TODO
Commits
-------
0ca27ccfde add groups support to the Valid constraint
This PR was squashed before being merged into the 3.4 branch (closes#20361).
Discussion
----------
[Config] Enable cannotBeEmpty along with requiresAtLeastOneElement
| Q | A |
| --- | --- |
| Branch? | "master" |
| Bug fix? | no |
| New feature? | yes |
| BC breaks? | no |
| Deprecations? | no |
| Tests pass? | yes
| Fixed tickets | #20356 |
| License | MIT |
| Doc PR | reference to the documentation PR, if any |
As @vudaltsov mentioned, we ignore any calls to `ArrayNodeDefinition::cannotBeEmpty`, which can lead to unexpected behavior. Imo. all subclasses should follow the base API.
Commits
-------
d40e7e4c2d [Config] Enable cannotBeEmpty along with requiresAtLeastOneElement
This PR was merged into the 3.4 branch.
Discussion
----------
[VarDumper] Remove leading 0 in microseconds of date caster
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | /
| License | MIT
| Doc PR | /
It looks more like a [engineering notation](https://en.wikipedia.org/wiki/Engineering_notation). We can now better discern **milli**seconds and **micro**seconds.
```php
// before -> after
1.000000 -> 1.0
1.100000 -> 1.100
1.120000 -> 1.120
1.123000 -> 1.123
1.123400 -> 1.123400
1.123450 -> 1.123450
1.123456 -> 1.123456
```
Commits
-------
94956ebae4 Remove leading 0 in ms of date caster
This PR was merged into the 2.7 branch.
Discussion
----------
[HttpFoundation] Generate safe fallback filename for wrongly encoded filename
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
This handles the case where the encoding of a random string cannot be detected. Until now this causes a PHP Warning `mb_strlen(): Unknown encoding ""`.
Commits
-------
8fd5569 [HttpFoundation] Generate safe fallback filename for wrongly encoded filename
This PR was squashed before being merged into the 3.4 branch (closes#22913).
Discussion
----------
[Yaml] Deprecate tags using colon
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Using a colon in a tag doesn't look like yaml and causes trouble (see https://github.com/symfony/symfony/pull/22878), so I propose to just deprecate these tags in favor of more consistent tags.
```yml
- !php/const:PHP_INT_MAX
- !php/object:O:30:"Symfony\Component\Yaml\Tests\A":1:{s:1:"a";s:3:"foo";}
```
would become
```yml
- !php/const PHP_INT_MAX
- !php/object O:30:"Symfony\Component\Yaml\Tests\A":1:{s:1:"a";s:3:"foo";}
```
Commits
-------
9815af3 [Yaml] Deprecate tags using colon
This PR was merged into the 3.3 branch.
Discussion
----------
[FrameworkBundle][Workflow] better errors when security deps are missing
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/23499#discussion_r128752026
| License | MIT
| Doc PR |
All the referenced services must either be explicitly configured or the SecurityBundle must be installed with some security related config being enabled. Otherwise, you will end up with a not so useful error message.
Commits
-------
56ee4aa better errors when security deps are missing
* 3.4:
[Bridge\ProxyManager] Dont call __destruct() on non-instantiated services
Consistently use 7 chars of sha256 for hash-based id generation
Docblock improvement
bumped Symfony version to 2.8.27
updated VERSION for 2.8.26
updated CHANGELOG for 2.8.26
bumped Symfony version to 2.7.34
updated VERSION for 2.7.33
update CONTRIBUTORS for 2.7.33
updated CHANGELOG for 2.7.33
* 3.3:
[Bridge\ProxyManager] Dont call __destruct() on non-instantiated services
Docblock improvement
bumped Symfony version to 2.8.27
updated VERSION for 2.8.26
updated CHANGELOG for 2.8.26
bumped Symfony version to 2.7.34
updated VERSION for 2.7.33
update CONTRIBUTORS for 2.7.33
updated CHANGELOG for 2.7.33
* 2.8:
[Bridge\ProxyManager] Dont call __destruct() on non-instantiated services
Docblock improvement
bumped Symfony version to 2.8.27
updated VERSION for 2.8.26
updated CHANGELOG for 2.8.26
bumped Symfony version to 2.7.34
updated VERSION for 2.7.33
update CONTRIBUTORS for 2.7.33
updated CHANGELOG for 2.7.33
* 2.7:
[Bridge\ProxyManager] Dont call __destruct() on non-instantiated services
bumped Symfony version to 2.7.34
updated VERSION for 2.7.33
update CONTRIBUTORS for 2.7.33
updated CHANGELOG for 2.7.33
This PR was merged into the 2.7 branch.
Discussion
----------
[Bridge\ProxyManager] Dont call __destruct() on non-instantiated services
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
While working on making #23678 green, I discovered that if a lazy service implements `__destruct`, then that service is not lazy anymore: it is created at destruct time.
That behavior is documented at https://github.com/Ocramius/ProxyManager/issues/258 (+related issues).
While I may understand why this behavior is the default for ProxyManager, it does not fit our "lazy-services" use case to me. Typically, nobody wants a database connection to be created to destruct the uninitialized lazy-proxy.
Blocks #23678
Commits
-------
2d79ffa0ca [Bridge\ProxyManager] Dont call __destruct() on non-instantiated services
This PR was merged into the 3.4 branch.
Discussion
----------
Consistently use 7 chars of sha256 for hash-based id generation
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This prevents generating over long service ids, and for filesystem-related changes, makes the Windows 258 chars limit farther.
Commits
-------
bc22cdd034 Consistently use 7 chars of sha256 for hash-based id generation
* 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.3:
Removed useless argument $definition
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
Bump minimal PHP version to ^5.5.9|>=7.0.8
This PR was squashed before being merged into the 3.4 branch (closes#22948).
Discussion
----------
[Yaml] Recommend using quotes instead of PARSE_KEYS_AS_STRINGS
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks? | no
| Deprecations? | yes <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass? | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR |
Sorry for opening this so lately... I just realized that we could get rid of `Yaml::PARSE_KEYS_AS_STRINGS` just by recommending using quotes...
~This way we don't allow a behavior not respecting the spec and we won't need to deprecate `PARSE_KEYS_AS_STRINGS` later.~
~Is it too late for this to be merged in 3.3?~
ping @xabbuh
Commits
-------
b63c55c [Yaml] Recommend using quotes instead of PARSE_KEYS_AS_STRINGS
This PR was merged into the 3.4 branch.
Discussion
----------
Autoconfigure instances of ArgumentValueResolverInterface
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #23701
| License | MIT
| Doc PR | n/a
Autoconfigure instances of `Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface` so they get the `controller.argument_value_resolver` tag automatically added to them.
This avoids avoid having to tag each resolver or add an `_instanceof` configuration such as
```yaml
_instanceof:
Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface:
tags: [controller.argument_value_resolver]
```
Commits
-------
ee4dc20 Autoconfigure instances of ArgumentValueResolverInterface
This PR was merged into the 3.3 branch.
Discussion
----------
[FrameworkBundle] Fix comment
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no
| Fixed tickets |
| License | MIT
| Doc PR |
Actually, DataUriNormalizer runs before the serializer.normalizer.object since it has a higher priority (-920 vs -1000).
Commits
-------
103b23e Fix comment
This PR was merged into the 3.3 branch.
Discussion
----------
Bump minimal PHP version to ^5.5.9|>=7.0.8
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #22973
| License | MIT
| Doc PR | -
As spotted in the linked issue, because of https://bugs.php.net/72229.
Commits
-------
2282a6f Bump minimal PHP version to ^5.5.9|>=7.0.8
This PR was merged into the 3.3 branch.
Discussion
----------
[Form] Removed useless argument $definition
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
After https://github.com/symfony/symfony/pull/22175/files this argument is not used anymore.
Commits
-------
81396c7fac Removed useless argument $definition
This PR was merged into the 4.0-dev branch.
Discussion
----------
[VarDumper] Make dump() variadic
| 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
-------
33b737b82f Make dump() variadic
This PR was merged into the 2.7 branch.
Discussion
----------
[Console] Fix passing options with defaultCommand
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Seems like overwriting input for the default command is not needed (anymore?). I don't know where the removed comment comes from originally.
Use case: i want to call default command and use options at the same time:
app/console --abc=true
Commits
-------
761de99552 Fix passing options with defaultCommand
This PR was merged into the 3.3 branch.
Discussion
----------
[Form] Add notice to upgrade to PHP v7.0.8+
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #22973
| License | MIT
| Doc PR | -
So that PHP7 < 7.0.8 users get a notice about the issue.
Commits
-------
0347e5a5d3 [Form] Add notice to upgrade to PHP v7.0.8+
* 3.4:
[DI] Remove unused props from the PhpDumper
[VarDumper] Keep and reuse array stubs in memory
[DI][ProxyManager] Pass the factory code to execute to DumperInterface::getProxyFactoryCode()
[Workflow] Adding workflow name to the announce event
[ProxyManager] Cleanup fixtures
[Console][WebServerBundle] Use "exec" when possible
[Debug] HTML-escape array key
Add some phpdocs for IDE autocompletion and better SCA
Fixed typo in docblock
* 3.3:
[DI] Remove unused props from the PhpDumper
[VarDumper] Keep and reuse array stubs in memory
[ProxyManager] Cleanup fixtures
[Console][WebServerBundle] Use "exec" when possible
[Debug] HTML-escape array key
Add some phpdocs for IDE autocompletion and better SCA
Fixed typo in docblock
* 3.2:
[DI] Remove unused props from the PhpDumper
[ProxyManager] Cleanup fixtures
[Debug] HTML-escape array key
Add some phpdocs for IDE autocompletion and better SCA
Fixed typo in docblock
* 2.8:
[DI] Remove unused props from the PhpDumper
[ProxyManager] Cleanup fixtures
[Debug] HTML-escape array key
Add some phpdocs for IDE autocompletion and better SCA
Fixed typo in docblock
* 2.7:
[DI] Remove unused props from the PhpDumper
[ProxyManager] Cleanup fixtures
[Debug] HTML-escape array key
Add some phpdocs for IDE autocompletion and better SCA
This PR was merged into the 2.8 branch.
Discussion
----------
Fixed typo in docblock in AuthenticationExpiredException
| 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 | ~
Found a small typo, applied it in the lowest branch possible.
Commits
-------
432d2de Fixed typo in docblock
This PR was merged into the 3.4 branch.
Discussion
----------
[DI][ProxyManager] Pass the factory code to execute to DumperInterface::getProxyFactoryCode()
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Passing the full code to call the factory is more flexible, as spotted while working on #23678.
Commits
-------
0754617c52 [DI][ProxyManager] Pass the factory code to execute to DumperInterface::getProxyFactoryCode()
This PR was merged into the 3.3 branch.
Discussion
----------
[VarDumper] Keep and reuse array stubs in memory
| 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 | -
(to be reviewed [ignoring whitespaces](https://github.com/symfony/symfony/pull/23683/files?w=1))
As highlighted by @vtsykun in #23620, the patch in #23644 improves performance but increases the memory usage.
The issue is that even a small `array($k => $v)` consumes more memory than a `new Stub()`.
That's a shame, but since our small arrays have a low variety, we can keep them in a cache and leverage php's COW mechanism to reduce memory. Effectively, this creates a memory leak. But the leak is upper bounded by the data you had already in memory, since that's what is cloned. Looking at the numbers, it looks worth it:
| | 3.3.5 | +#23644 | +this PR
| --- | --- | --- | ---
| Wall Time | 39.4s | 26.1s | ~~18.6s~~ 17.3s
| Memory | 391MB | 539MB | ~~217MB~~ 216MB
https://blackfire.io/profiles/compare/846b58bc-7863-4502-9ca2-f82eebd4173f/graph
Commits
-------
92fa55dd8b [VarDumper] Keep and reuse array stubs in memory
This PR was merged into the 2.7 branch.
Discussion
----------
[ProxyManager] Cleanup fixtures
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Just noticed that these fixture files are not maintainable. And we don't need them at all in fact, let's drop them.
Commits
-------
31843d6f98 [ProxyManager] Cleanup fixtures
This PR was merged into the 2.7 branch.
Discussion
----------
[Form] Add some phpdocs for IDE autocompletion and better SCA
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
@ogizanagi I've tryed add single phpdoc `@method FormInterface[] getIterator()` to `FormInterface` but it not works correctly in PHPStorm. Have you any ideas?
<!--
- 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 3.4,
legacy code removals go to 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
-------
d30c751781 Add some phpdocs for IDE autocompletion and better SCA
This PR was merged into the 2.7 branch.
Discussion
----------
[Debug] Missing escape in debug output
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
When pretty-printing an exception, the debug handler does not properly escape array keys.
The problem only occurs when debug output is enabled, so this is not considered a [security issue](http://symfony.com/doc/current/contributing/code/security.html) (according to @fabpot), because the debug tools [should not be used in production](https://symfony.com/doc/current/components/debug.html#usage).
A test for this is included in my patch for #18722.
Commits
-------
636777d [Debug] HTML-escape array key
* 3.4:
minor fix
[DI] Make dumped docblocks less verbose
[VarDumper] Dont use Stub objects for arrays
[Form] Allow pass filter callback to delete_empty option.
This PR was merged into the 3.3 branch.
Discussion
----------
[VarDumper] Dont use Stub objects for arrays - lower GC pressure
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #23644
| License | MIT
| Doc PR | -
Several recent profiles have shown that VarDumper triggers the garbage collector quite often, leading to high CPU usage. The reason for this is that internally, VarCloner creates one Stub object per array+object+resource.
This PR removes the need for Stub objects for each arrays, replacing them with stub arrays. This should almost remove the GC pressure, since the number of Stub objects now has the same magnitude than the number of dumped objects.
Meanwhile, this PR removes any use of the `symfony_debug` extension, which is mostly useless anyway. This helps make the code simpler (really :) ), thus helps maintenance (eg merging up to master.)
I also changed the values of the constants defined in the Stub class, and removed the corresponding Data::mapStubConsts() method. Since the serialized format has changed (and we have to do it as there is no other way to fix this GC issue), there is no need to keep any sort of compat mapping there.
Commits
-------
0d5012d20e [VarDumper] Dont use Stub objects for arrays
* 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.3:
[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
[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.2:
[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
Remove unused mocks/vars
[DoctrineBridge][PropertyInfo] Added support for Doctrine Embeddables
[Validator] Fix IbanValidator for ukrainian IBANs
* 2.8:
[DI] use assertStringEqualsFile when possible
[VarDumper] Adapt to php 7.2 changes
[Form][TwigBridge] Don't render _method in form_rest() for a child form
[DoctrineBridge][PropertyInfo] Added support for Doctrine Embeddables
[Validator] Fix IbanValidator for ukrainian IBANs
* 2.7:
[DI] use assertStringEqualsFile when possible
[VarDumper] Adapt to php 7.2 changes
[Form][TwigBridge] Don't render _method in form_rest() for a child form
[Validator] Fix IbanValidator for ukrainian IBANs
This PR was merged into the 2.7 branch.
Discussion
----------
[DI] use assertStringEqualsFile when possible
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
To make failure reporting more accurate, and maintaining tests easier (assertStringEqualsFile is already heavily used in the same file.)
Commits
-------
eebae7e [DI] use assertStringEqualsFile when possible
This PR was merged into the 3.3 branch.
Discussion
----------
[Cache] Handle serialization failures for Memcached
| 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 | -
Fixes two issues with serialization + memcached: with the memcached extension, the default serializer is automatically selected as igbinary when possible, native php otherwise. That creates obvious migration/portability issues (ie just installing igbinary wipes out the value of your cache.)
Then, handling unserializing failures (esp. "php_incomplete_class") is a paramount feature of the component. You must be able to deal with migrating you code base without being blocked by some legacy serialized data.
Commits
-------
cccc88f [Cache] Handle unserialization failures for Memcached
This PR was merged into the 3.2 branch.
Discussion
----------
[DI] Fix using private services in expressions
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Since 3.2, fetching private services via `$container->get()` is deprecated.
This makes it impossible to use a private service in an expression.
Until this PR :)
Commits
-------
f3da6cf [DI] Fix using private services in expressions
This PR was merged into the 2.7 branch.
Discussion
----------
[VarDumper] Adapt to php 7.2 changes
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
As required by this change on PHP 7.2:
https://wiki.php.net/rfc/convert_numeric_keys_in_object_array_casts
Tests pass locally (until we add 7.2 to Travis)
Commits
-------
3c2f5f7 [VarDumper] Adapt to php 7.2 changes
This PR was merged into the 3.3 branch.
Discussion
----------
[WebProfilerBundle] Display trace and context in the logger profiler
| 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 | -
Right now the behavior is not perfect. It can display only the trace **or** the context.
Some time, we want both.
More over, using `{{ profiler_dump_log(log.message, trace) }}` is wrong
Commits
-------
ef1e50802e [WebProfilerBundle] Display trace and context in the logger profiler
This PR was merged into the 4.0-dev branch.
Discussion
----------
[Console] Make SymfonyQuestionHelper::ask optional by default
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes (nothing in core depends on it)
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!--highly recommended for new features-->
i noticed when writing commands i always keep doing
```php
$io = new SymfonyStyle($input, $output);
$answer = $io->ask('...', null, function ($value) { return $value; });
// instead of just
$answer = $io->ask('...');
```
only to bypass a built-in validation, of which im not sure why it's there. Note the base question helper doesnt make this assumption...
Commits
-------
2da429cd0a [Console] Make SymfonyQuestionHelper::ask optional by default
This PR was squashed before being merged into the 2.8 branch (closes#23023).
Discussion
----------
[DoctrineBridge][PropertyInfo] Added support for Doctrine Embeddables
| Q | A
| ------------- | ---
| Branch? | 2.8 and higher
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Note that [Embeddables appeared only in doctrine/orm 2.5](http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/changelog/migration_2_5.html). I added class_exists checks for that.
Commits
-------
7816f3b7c7 [DoctrineBridge][PropertyInfo] Added support for Doctrine Embeddables
This PR was squashed before being merged into the 3.4 branch (closes#23519).
Discussion
----------
[TwigBundle] Commands as a service
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!--highly recommended for new features-->
tiny step towards #23488
Commits
-------
98391402d1 [TwigBundle] Commands as a service
This PR was merged into the 3.3 branch.
Discussion
----------
[DI][Bug] Autowiring thinks optional args on core classes are required
| Q | A
| ------------- | ---
| Branch? | 3,3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
| Doc PR | n/a
Currently, the following fails:
```yml
services:
PDO:
class: PDO
arguments:
- 'sqlite:/foo.db'
```
The error:
> Cannot autowire service "PDO": argument "$username" of method "__construct()" must have a type-hint or be given a value explicitly
`$username` is the second argument to `PDO`, and it's optional. Here's the reason: it appears that `$parameter->isDefaultValueAvailable()` returns false for optional arguments of core classes. But, `$parameter->isOptional()` returns true.
This allows optional arguments to not throw an exception. I can't think of any edge cases this will cause - but it's possible I'm not thinking of something :).
Cheers!
Commits
-------
178a0f73b7 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.3:
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 the design of the profiler exceptions when there is no message
[Config] Minor fix
[WebProfilerBundle] Fix full sized dump hovering in toolbar
* 3.2:
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
[WebProfilerBundle] Fix full sized dump hovering in toolbar
* 2.8:
use Precise on Travis to keep PHP LDAP support
fix(security): ensure the 'route' index is set before attempting to use it
[WebProfilerBundle] Fix full sized dump hovering in toolbar
This PR was merged into the 4.0-dev branch.
Discussion
----------
[Bridge\Doctrine] Fix BC with DI v3.4
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
As allowed by composer.json.
Code borrowed from branch 3.4
Commits
-------
b03f0bdb06 [Bridge\Doctrine] Fix BC with DI v3.4
This PR was merged into the 3.4 branch.
Discussion
----------
[Console] Fix registering lazy command services with autoconfigure enabled
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
For
```yaml
_defaults:
autoconfigure: true
App\:
resource: '../../src/*'
App\Command\FooCommand:
tags:
- { name: console.command, command: foo }
```
Before you get the following error:
> Missing "command" attribute on tag "console.command" for service "App\Command\FooCommand"
Now the command is lazy.
----
Btw, @Tobion's https://github.com/symfony/symfony/pull/22734#discussion_r127410411
> Wouldn't it be more straightforward if aliases are just the additional tags using the command attribute as well?
Then there is no need for an alias property at all and this strange condition doesn't apply either.
Partially addressed here by removing the need for repeating the `command` attribute on each `console.command` tag
```yaml
# before
tags:
- { name: console.command, command: foo }
- { name: console.command, command: foo, alias: foobar }
# after
tags:
- { name: console.command, command: foo }
- { name: console.command, alias: foobar }
```
Tobias proposal:
```yaml
tags:
- { name: console.command, command: app:my-command }
- { name: console.command, command: app:my-alias }
```
I wanted to propose exactly the same at first, but finally found more clear to add a specific attribute for aliases, especially because relying on the order on which tags are defined sounds less good to me. Please tell me about your preference.
(And sorry for the noise around this feature, I want to polish it for 3.4)
Commits
-------
8a71aa31bb Fix registering lazy command services with autoconfigure enabled
This PR was merged into the 4.0-dev branch.
Discussion
----------
[Console] Make SymfonyQuestionHelper::ask optional by default
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes (nothing in core depends on it)
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!--highly recommended for new features-->
i noticed when writing commands i always keep doing
```php
$io = new SymfonyStyle($input, $output);
$answer = $io->ask('...', null, function ($value) { return $value; });
// instead of just
$answer = $io->ask('...');
```
only to bypass a built-in validation, of which im not sure why it's there. Note the base question helper doesnt make this assumption...
Commits
-------
2da429cd0a [Console] Make SymfonyQuestionHelper::ask optional by default
- added `Symfony\Component\Cache\PruneableInterface` so PSR-6 or PSR-16 cache implementations can declare support
for manual stale cache pruning
- added FilesystemTrait::prune() and PhpFilesTrait::prune() implementations
- now FilesystemAdapter, PhpFilesAdapter, FilesystemCache, and PhpFilesCache implement PruneableInterface and
supports manual stale cache pruning
- Added `cache:pool:prune` command via `Symfony\Bundle\FrameworkBundle\Command\CachePoolPruneCommand` to allow
manual stale cache item pruning of supported PSR-6 and PSR-16 cache pool implementations
- Added `Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\CachePoolPrunerPass` compiler pass to fetch
all cache pools implementing `PruneableInterface` and pass them to the command as an `IteratorArgument` so
these references are lazy loaded by the command
- updated changelogs as appropriate
This PR was merged into the 2.8 branch.
Discussion
----------
[WebProfilerBundle] Fix full sized dump hovering in toolbar
| Q | A
| ------------- | ---
| Branch? | 2.8 <!-- see comment below -->
| 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 | #23563 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
Since #22953, the dump block shown on hovering the toolbar item takes the full width. But at least on OS X chrome, safari and firefox, the behavior is buggy and makes it unusable as the cursor can't reach the dumped content:
![juin-29-2017 21-09-38](https://user-images.githubusercontent.com/2211145/27705877-b25c1496-5d0f-11e7-8fff-169e080e335c.gif)
Honestly, I don't really understand the issue here and tried some tweaks until it works everywhere, (including trying to add a `.no-resize` class on `sf-toolbar-info` to avoid executing the related js event listener in case it was conflicting).
As shown in the screenshot, it also fixes the case where the dump wasn't full width under a certain size.
Commits
-------
28930c5 [WebProfilerBundle] Fix full sized dump hovering in toolbar
This PR was merged into the 3.3 branch.
Discussion
----------
[Config] Minor fix
| 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 | -
My bad.
BTW @javiereguiluz I confirm my diagnosis on #23573
Here is the last exception in that error page:
![capture du 2017-07-19 09-37-41](https://user-images.githubusercontent.com/243674/28355877-2bc71b5e-6c66-11e7-8e53-a88c42bec4e5.png)
Commits
-------
fa0b942 [Config] Minor fix
This PR was merged into the 3.4 branch.
Discussion
----------
[Console] Add a factory command loader for standalone application with lazy-loading needs
| Q | A
| ------------- | ---
| Branch? | 3.4 <!-- see comment below -->
| Bug fix? | no
| New feature? | yes <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks? | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass? | yes (failure unrelated)
| Fixed tickets | https://github.com/symfony/symfony/pull/22734#issuecomment-314706630 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | todo (with https://github.com/symfony/symfony-docs/issues/8147)
So standalone applications can also benefit from the lazy loading feature without requiring a PSR-11 implementation specifically for this need.
The loader does not memoize any resolved command from factories, as it's the `Application` responsibility and the `ContainerCommandLoader` does not either (the PSR-11 does not enforce two successive calls to return the same value).
Commits
-------
9b40b4a [Console] Add a factory command loader for standalone application with lazy-loading needs
* 3.3:
[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
This PR was merged into the 3.4 branch.
Discussion
----------
[DebugBundle] Added min_depth to Configuration
This enables calling the recently-added `setMinDepth` function on `VarCloner`.
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
| Doc PR | symfony/symfony-docs#8185
Commits
-------
30cd70d [DebugBundle] Added min_depth to Configuration
This PR was squashed before being merged into the 3.2 branch (closes#23558).
Discussion
----------
[FrameworkBundle] fix ValidatorCacheWarmer: use serializing ArrayAdapter
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/23544
| License | MIT
| Doc PR | -
The `ValidatorCacheWarmer` was using an `ArrayAdapter` with `$storeSerialized=false`. This is a problem as inside the `LazyLoadingMetadataFactory` the metaData objects are mutated (parent class constraints are merged into it) after they have been written into the cache.
So this means that currently when warming up the validator cache actually the merged metaData version is finally taken from the `ArrayAdapter` and written into the `PhpFilesAdapter`.
Which then caused some duplicate constraints as the parent constraints are merged again after fetching from the cache inside `LazyLoadingMetadataFactory`.
This fix makes sure we serialize objects into the `ArrayAdapter`.
Writing a test case for this does not seem easy to me. Any ideas?
EDIT: Maybe its even safer to just clone the object when writing it into the cache?
```diff
diff --git a/src/Symfony/Component/Validator/Mapping/Factory/LazyLoadingMetadataFactory.php b/src/Symfony/Component/Validator/Mapping/Factory/LazyLoadingMetadataFactory.php
index 79ad1f2..88eaf33 100644
--- a/src/Symfony/Component/Validator/Mapping/Factory/LazyLoadingMetadataFactory.php
+++ b/src/Symfony/Component/Validator/Mapping/Factory/LazyLoadingMetadataFactory.php
@@ -117,7 +117,7 @@ class LazyLoadingMetadataFactory implements MetadataFactoryInterface
}
if (null !== $this->cache) {
- $this->cache->write($metadata);
+ $this->cache->write(clone $metadata);
}
```
Opinions?
Commits
-------
c0556cb204 [FrameworkBundle] fix ValidatorCacheWarmer: use serializing ArrayAdapter
This PR was merged into the 4.0-dev branch.
Discussion
----------
[DI] Optimize use of private and pre-defined services
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes (perf)
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
By making private services really private and taking into account that (un)setting pre-defined services is not allowed anymore, we can go one step further into optimizing the dumped container.
Commits
-------
c0c1881fe4 [DI] Optimize use of private and pre-defined services
This PR was merged into the 3.3 branch.
Discussion
----------
[Config] Make ClassExistenceResource throw on invalid parents
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #23564
| License | MIT
| Doc PR | -
Let's throw a more specific exception when a parent class/interface/trait is missing.
Fine tunes #23041
Commits
-------
53b01903ce [Config] Make ClassExistenceResource throw on invalid parents
This PR was merged into the 3.2 branch.
Discussion
----------
[DI] Change "this" to "that" in `findAndSortTaggedServices` doc to reduce confusion
Continuation of PR #23578 which I royally messed up.....
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
| Doc PR | None
I know this is extremely minor, but reading the description of this method, I got confused. Wondering if it's just me.
Where it says:
> The order of additions must be respected for services having the same priority, and knowing that the \SplPriorityQueue class does not respect the FIFO method, we should not use **this** class.
Should it not say "we should not use **that** class"?
Commits
-------
04b7b04b65 Change "this" to "that" to avoid confusion
This PR was merged into the 3.4 branch.
Discussion
----------
[TwigBridge] fix tests
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
~The changed test did not pass locally. I do probably miss something important, but I fail to see why this did not occur when running the tests on Travis CI.~ Never mind, I was looking at the wrong build. It fails on Travis CI too.
Commits
-------
62410b6b7e [TwigBridge] fix tests
* 3.4:
[DI] Resolve aliases earlier
[DI] Mark Container::$privates as internal
[DI] Minor dumping logic simplification
bumped Symfony version to 3.3.6
updated VERSION for 3.3.5
updated CHANGELOG for 3.3.5
bumped Symfony version to 3.2.13
updated VERSION for 3.2.12
updated CHANGELOG for 3.2.12
bumped Symfony version to 2.8.26
updated VERSION for 2.8.25
updated CHANGELOG for 2.8.25
bumped Symfony version to 2.7.33
updated VERSION for 2.7.32
update CONTRIBUTORS for 2.7.32
updated CHANGELOG for 2.7.32
* 3.3:
[DI] Resolve aliases earlier
[DI] Mark Container::$privates as internal
[DI] Minor dumping logic simplification
bumped Symfony version to 3.3.6
updated VERSION for 3.3.5
updated CHANGELOG for 3.3.5
bumped Symfony version to 3.2.13
updated VERSION for 3.2.12
updated CHANGELOG for 3.2.12
bumped Symfony version to 2.8.26
updated VERSION for 2.8.25
updated CHANGELOG for 2.8.25
bumped Symfony version to 2.7.33
updated VERSION for 2.7.32
update CONTRIBUTORS for 2.7.32
updated CHANGELOG for 2.7.32
* 3.2:
[DI] Resolve aliases earlier
[DI] Mark Container::$privates as internal
bumped Symfony version to 3.2.13
updated VERSION for 3.2.12
updated CHANGELOG for 3.2.12
bumped Symfony version to 2.8.26
updated VERSION for 2.8.25
updated CHANGELOG for 2.8.25
bumped Symfony version to 2.7.33
updated VERSION for 2.7.32
update CONTRIBUTORS for 2.7.32
updated CHANGELOG for 2.7.32
* 2.8:
[DI] Resolve aliases earlier
bumped Symfony version to 2.8.26
updated VERSION for 2.8.25
updated CHANGELOG for 2.8.25
bumped Symfony version to 2.7.33
updated VERSION for 2.7.32
update CONTRIBUTORS for 2.7.32
updated CHANGELOG for 2.7.32
* 2.7:
[DI] Resolve aliases earlier
bumped Symfony version to 2.7.33
updated VERSION for 2.7.32
update CONTRIBUTORS for 2.7.32
updated CHANGELOG for 2.7.32
This PR was merged into the 2.7 branch.
Discussion
----------
[DI] Resolve aliases earlier
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Not a bug fix because a compiler pass already resolves aliases, but makes reasoning locally about the code easier.
Commits
-------
9922827cc2 [DI] Resolve aliases earlier
* 3.4: (22 commits)
Fix lazy commands registration
[TwigBridge] deprecate TwigRenderer
[FrameworkBundle] Set default public directory on install assets
[Security] Fix wrong term in UserProviderInterface
[HttpFoundation] Set meta refresh time to 0 in RedirectResponse content
disable inlining deprecated services
[Stopwatch] Fix precision for root section
[Cache] add constructor docblocks for clarity
[WebServerBundle] allowed public/ root directory to be auto-discovered along side web/
[WebServerBundle] remove duplicate code
[SecurityBundle] Clarify deprecation in UserPasswordEncoderCommand::getContainer
[Profiler][Validator] ValidatorDataCollector: use new DataCollector::getCasters() method
[Profiler] Fix data collector getCasters() call
[VarDumper] Added setMinDepth to VarCloner
remove symfony/process suggestion
[DI] Remove unused dynamic property
[Cache] add constructor docblocks for clarity
[Security] validate empty passwords again
[Process] Fixed issue between process builder and exec
non-conflicting anonymous service ids across files
...
phpdocumentor/reflection-docblock included a change in release 3.2.0
which required a tag to be followed by a space. This conflicts with our
use of the `@Group` annotation:
```php
/**
* @var \DateTime[]
* @Groups({"a", "b"})
*/
public $collection;
```
* 3.3:
[FrameworkBundle] Set default public directory on install assets
[Security] Fix wrong term in UserProviderInterface
[HttpFoundation] Set meta refresh time to 0 in RedirectResponse content
disable inlining deprecated services
[Cache] add constructor docblocks for clarity
[WebServerBundle] allowed public/ root directory to be auto-discovered along side web/
[WebServerBundle] remove duplicate code
[SecurityBundle] Clarify deprecation in UserPasswordEncoderCommand::getContainer
[Cache] add constructor docblocks for clarity
[Security] validate empty passwords again
[DI] Remove irrelevant comment from container
[TwigBridge] cleaner implementation of the TwigRenderer
* 3.2:
[Security] Fix wrong term in UserProviderInterface
[HttpFoundation] Set meta refresh time to 0 in RedirectResponse content
disable inlining deprecated services
[Cache] add constructor docblocks for clarity
[Security] validate empty passwords again
[DI] Remove irrelevant comment from container
[TwigBridge] cleaner implementation of the TwigRenderer
* 2.8:
[Security] Fix wrong term in UserProviderInterface
[HttpFoundation] Set meta refresh time to 0 in RedirectResponse content
disable inlining deprecated services
[Security] validate empty passwords again
[DI] Remove irrelevant comment from container
[TwigBridge] cleaner implementation of the TwigRenderer
* 2.7:
[Security] Fix wrong term in UserProviderInterface
[HttpFoundation] Set meta refresh time to 0 in RedirectResponse content
[Security] validate empty passwords again
[DI] Remove irrelevant comment from container
[TwigBridge] cleaner implementation of the TwigRenderer
This PR was merged into the 3.4 branch.
Discussion
----------
[Console] Application is not responsible for setting the name of lazy commands
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Fixes `all` not calling `get()` for lazy commands and stop setting the command name from Application (the command loader is responsible for returning valid commands).
Commits
-------
f25a8b5c41 Fix lazy commands registration
This PR was squashed before being merged into the 3.3 branch (closes#23513).
Discussion
----------
[FrameworkBundle] Set default public directory on install assets
| 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 | -
After https://github.com/symfony/flex/pull/122 and https://github.com/symfony/recipes/pull/106 the default directory to install assets is `public`.
Commits
-------
1bdfe0b39b [FrameworkBundle] Set default public directory on install assets
This PR was merged into the 2.7 branch.
Discussion
----------
[Security] validate empty passwords again
| 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/23341#issuecomment-315341226
| License | MIT
| Doc PR |
It looks like this part of #23341 causes serious security issues for some users who rely on the validator to also compare the empty string with their user's password (see for example https://github.com/symfony/symfony/pull/23341#issuecomment-315341226). Thus I suggest to revert this part of #23341.
Commits
-------
878198cefa [Security] validate empty passwords again
This PR was merged into the 3.4 branch.
Discussion
----------
[Profiler][Validator] ValidatorDataCollector: use new DataCollector::getCasters() method
| Q | A
| ------------- | ---
| Branch? | 3.4 <!-- see comment below -->
| 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 | https://github.com/symfony/symfony/pull/23465#discussion_r126382240 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
~~First commit targets 3.3; see https://github.com/symfony/symfony/pull/23516.~~
I didn't re-used the `ConstraintViolationInterface` caster used in the form collector, as it's the purpose of the validator collector to show the constraints data.
Commits
-------
c725a700cf [Profiler][Validator] ValidatorDataCollector: use new DataCollector::getCasters() method
This PR was merged into the 3.4 branch.
Discussion
----------
[VarDumper] Added setMinDepth to VarCloner
This new function allows VarCloner users to specify a minimum tree
depth that must be fully explored before we start limiting the number of
cloned items via the existing setMaxItems functionality.
It’s useful for dumping arguments from a backtrace to ensure some
minimum level of detail, while keeping a very low setMaxItems value to
ensure fast performance at the deeper levels.
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes <!-- 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 | none
| License | MIT
| Doc PR | symfony/symfony-docs#8155 <!--highly recommended for new features-->
<!--
- 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 3.4,
legacy code removals go to 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
-------
d6534f5cfc [VarDumper] Added setMinDepth to VarCloner
This PR was merged into the 2.7 branch.
Discussion
----------
[DI] Remove irrelevant comment from container
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes-ish
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!--highly recommended for new features-->
Spotted in #22811
Commits
-------
595a225a0f [DI] Remove irrelevant comment from container
This PR was squashed before being merged into the 3.3 branch (closes#23535).
Discussion
----------
Make server:* commands work out of the box with the public/ root dir
| Q | A
| ------------- | ---
| Branch? | 3.3
| 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 first commit removes code that is not needed as the WebserverConfig class already throws the exact same error and the display is exactly the same in that case.
The second commit adds support for `public/` along side `web/`.
Commits
-------
34c8566be1 [WebServerBundle] allowed public/ root directory to be auto-discovered along side web/
bc6b57c208 [WebServerBundle] remove duplicate code
This PR was merged into the 3.3 branch.
Discussion
----------
[SecurityBundle] Clarify deprecation in UserPasswordEncoderCommand::getContainer
| Q | A
| ------------- | ---
| Branch? | 3.3
| 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 | symfony/symfony-docs#... <!--highly recommended for new features-->
@ogizanagi in 4.0 it will simply extend `Command` right.. wdyt?
Also we dont deprecate `setContainer` is that intentional?
Commits
-------
7ea2d0437a [SecurityBundle] Clarify deprecation in UserPasswordEncoderCommand::getContainer
* 3.3:
[Profiler] Fix data collector getCasters() call
remove symfony/process suggestion
[DI] Remove unused dynamic property
[Process] Fixed issue between process builder and exec
non-conflicting anonymous service ids across files
This new function allows VarCloner users to specify a minimum tree
depth that must be fully explored before we start limiting the number of
cloned items via the existing setMaxItems functionality.
It’s useful for dumping arguments from a backtrace to ensure some
minimum level of detail, while keeping a very low setMaxItems value to
ensure fast performance.
This PR was merged into the 2.7 branch.
Discussion
----------
[TwigBridge] cleaner implementation of the TwigRenderer
| Q | A
| ------------- | ---
| Branch? | 2.7
| 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 | https://github.com/symfony/symfony/pull/23432#discussion_r125880092
| 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 3.4,
legacy code removals go to 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
-------
c7c5ba8 [TwigBridge] cleaner implementation of the TwigRenderer
This PR was merged into the 4.0-dev branch.
Discussion
----------
[DI] Remove remaining deprecated features
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
* removed autowiring services based on the types they implement
* removed the `DefinitionDecorator` class, replaced by `ChildDefinition`
* removed the `AutowireServiceResource` class and related `AutowirePass::createResourceForClass()` method
* removed `LoggingFormatter`, `Compiler::getLoggingFormatter()` and `addLogMessage()` class and methods, use the `ContainerBuilder::log()` method instead
* removed `FactoryReturnTypePass`
* removed `ContainerBuilder::addClassResource()`, use the `addObjectResource()` or the `getReflectionClass()` method instead.
* removed support for top-level anonymous services
* removed silent behavior for unused attributes and elements
* Removed the "framework.validation.cache" configuration option. Configure the "cache.validator" service under "framework.cache.pools" instead.
Commits
-------
4bd7b921f4 [DI] Remove remaining deprecated features
This PR was merged into the 3.2 branch.
Discussion
----------
[FrameworkBundle] Fix tests
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Related to the changes introduced in #23440.
Commits
-------
2e0c6bc [FrameworkBundle] Fix tests
This PR was merged into the 3.4 branch.
Discussion
----------
[Serializer] AbstractObjectNormalizer: Allow to disable type enforcement
| Q | A
| ------------- | ---
| Branch? | 3.4 <!-- see comment below -->
| Bug fix? | no
| New feature? | yes <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks? | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass? | yes (failure unrelated)
| Fixed tickets | N/A <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
This allows to denormalize simple DTOs with public properties using the property-info component and the `ObjectNormalizer`. The raised exception is not really useful in such cases, as it cannot be easily handled gracefully to build a proper violation response (too generic and no real hint on the complete attribute path for instance).
Instead, I use the validator component to validate my DTOs and the properties' types, get a proper violation list, and build a response from it.
I wasn't really inspired for the `DISABLE_TYPE_ENFORCEMENT` name.
Commits
-------
959ac2a [Serializer] AbstractObjectNormalizer: Allow to disable type enforcement
* 3.4:
Add TokenProcessor
[DI] Handle root namespace in service definitions
Add support for command lazy-loading
Use rawurlencode() to transform the Cookie into a string
[TwigBundle] Added a RuntimeExtensionInterface to take advantage of autoconfigure
[Process] Fix parsing args on Windows
Add exculde verbosity test
[HttpKernel][VarDumper] Truncate profiler data & optim perf
[DI] Allow imports in string format for YAML
[Validator] Allow to use a property path to get value to compare in comparison constraints
[Security] Fix authentication.failure event not dispatched on AccountStatusException
add option to define the access decision manager
Add support for doctrin/dbal 2.6 types
This PR was merged into the 3.4 branch.
Discussion
----------
[MonologBridge] Add TokenProcessor
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
``TokenProcessor`` is an out-of-the-box class that adds token in extra info log, like this:
```
[2016-12-29 14:48:09] app.INFO: admin connected! [] {"token":{
"username":"admin",
"authenticated":true,
"roles":["ROLE_ADMIN"]}
}
```
Commits
-------
3763515 Add TokenProcessor
* 3.3:
[DI] Handle root namespace in service definitions
Use rawurlencode() to transform the Cookie into a string
[Process] Fix parsing args on Windows
[HttpKernel][VarDumper] Truncate profiler data & optim perf
[Security] Fix authentication.failure event not dispatched on AccountStatusException
* 3.2:
[DI] Handle root namespace in service definitions
Use rawurlencode() to transform the Cookie into a string
[Security] Fix authentication.failure event not dispatched on AccountStatusException
* 2.8:
[DI] Handle root namespace in service definitions
Use rawurlencode() to transform the Cookie into a string
[Security] Fix authentication.failure event not dispatched on AccountStatusException
* 2.7:
[DI] Handle root namespace in service definitions
Use rawurlencode() to transform the Cookie into a string
[Security] Fix authentication.failure event not dispatched on AccountStatusException
This PR was merged into the 3.4 branch.
Discussion
----------
[Validator] Allow to use a property path to get value to compare in comparison constraints
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
| Doc PR | todo
So we can simply declare something like:
```php
class Activity
{
/**
* @var \DateTime
*
* @Assert\DateTime()
*/
private $startDate;
/**
* @var \DateTime
*
* @Assert\DateTime()
* @Assert\GreaterThan(propertyPath="startDate")
*/
private $endDate;
// [...]
public function getStartDate(): \DateTime
{
return $this->startDate;
}
public function getEndDate(): \DateTime
{
return $this->startDate;
}
}
```
Of course, this is actually already possible by using an `Expression` constraint (or a callable), but it feels more natural to me to use proper comparison constraints for this.
Commits
-------
07c5aa6 [Validator] Allow to use a property path to get value to compare in comparison constraints
This PR was merged into the 3.4 branch.
Discussion
----------
[DoctrineBridge] Add support for doctrin/dbal v2.6 types
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Add support for the following doctrine types in the property info extractor:
- date_immutable
- datetime_immutable
- datetimetz_immutable
- time_immutable
- dateinterval
I didn't include the json type since it can be anything that can be stored in a json.
And add support for the dateinterval type for the form type guesser (the form component doesn't support using DateTimeImmutable instances).
Commits
-------
b30fd4f Add support for doctrin/dbal 2.6 types
This PR was merged into the 3.4 branch.
Discussion
----------
[Console] Add support for command lazy-loading
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/12063https://github.com/symfony/symfony/pull/16438https://github.com/symfony/symfony/pull/13946#21781
| License | MIT
| Doc PR | todo
This PR adds command lazy-loading support to the console, based on PSR-11 and DI tags.
(https://github.com/symfony/symfony/issues/12063#issuecomment-57173784)
Commands registered as services which set the `command` attribute on their `console.command` tag are now instantiated when calling `Application::get()` instead of all instantiated at `run()`.
__Usage__
```yaml
app.command.heavy:
tags:
- { name: console.command, command: app:heavy }
```
This way private command services can be inlined (no public aliases, remain really private).
With console+PSR11 implem only:
```php
$application = new Application();
$container = new ServiceLocator(['heavy' => function () { return new Heavy(); }]);
$application->setCommandLoader(new ContainerCommandLoader($container, ['app:heavy' => 'heavy']);
```
Implementation is widely inspired from Twig runtime loaders (without the definition/runtime separation which is not needed here).
Commits
-------
7f97519 Add support for command lazy-loading
This PR was squashed before being merged into the 2.7 branch (closes#23468).
Discussion
----------
[DI] Handle root namespace in service definitions
| Q | A
| ------------- | ---
| Branch? | 2.7
| 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 | symfony/symfony-docs#... <!--highly recommended for new features-->
Fixes
```
Cannot dump definition because of invalid class name ('\\stdClass')
```
for
```yaml
services:
foo: {class: '\stdClass' }
```
`ContainerBuilder` allows it, so `PhpDumper` should as well.
Commits
-------
05170c8 [DI] Handle root namespace in service definitions
This PR was merged into the 3.4 branch.
Discussion
----------
[Security] make it possible to configure a custom access decision manager service
| Q | A |
| --- | --- |
| Branch? | 3.4 |
| Bug fix? | no |
| New feature? | yes |
| BC breaks? | no |
| Deprecations? | no |
| Tests pass? | yes |
| Fixed tickets | #942, #14049, #15295, #16828, #16843, |
| License | MIT |
| Doc PR | TODO |
These changes will make it possible to let users define their own voting strategies without the need for custom compiler passes that replace the built-in `AccessDecisionManager` (see linked issues in the PR table for some use cases).
Commits
-------
e0913a2 add option to define the access decision manager
This PR was merged into the 3.3 branch.
Discussion
----------
[Process] Fix parsing args on Windows
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #23455
| License | MIT
| Doc PR | -
Commits
-------
8826da1 [Process] Fix parsing args on Windows
This PR was merged into the 3.4 branch.
Discussion
----------
[TwigBundle] Added a RuntimeExtensionInterface to take advantage of autoconfigure
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | - (asked by @nicolas-grekas)
| License | MIT
| Doc PR | -
---
Before:
```yaml
#app/config/services.yml
services:
_defaults:
autoconfigure: true
AppBundle\Twig\HelloExtension:
tags: ['twig.runtime']
```
After:
```yaml
#app/config/services.yml
services:
_defaults:
autoconfigure: true
#Yes, there are nothing anymore
```
Commits
-------
ba8763b [TwigBundle] Added a RuntimeExtensionInterface to take advantage of autoconfigure
This PR was merged into the 2.7 branch.
Discussion
----------
[Security] Fix authentication.failure event not dispatched on AccountStatusException
| 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/issues/18807
| License | MIT
| Doc PR | n/a
Authentication fails if the user exists but its account is disabled/expired/locked, the failure event should be dispatched in this case, so that you can hook into as for any authentication exception.
Commits
-------
64c2efd [Security] Fix authentication.failure event not dispatched on AccountStatusException
This PR was squashed before being merged into the 2.7 branch (closes#23461).
Discussion
----------
Use rawurlencode() to transform the Cookie into a string
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #23255
| License | MIT
| Doc PR | -
Commits
-------
025dfff Use rawurlencode() to transform the Cookie into a string
This PR was merged into the 3.4 branch.
Discussion
----------
[VarDumper] Test ReflectionCaster excluding verbosity
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | /
| License | MIT
| Doc PR | /
Cover better ``ReflectionCaster`` in tests thanks to ``EXCLUDE_*`` filter which was added in https://github.com/symfony/symfony/pull/22588.
Commits
-------
e535089 Add exculde verbosity test
This PR was squashed before being merged into the 4.0-dev branch (closes#22811).
Discussion
----------
[DI] Remove deprecated case insensitive service ids
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!--highly recommended for new features-->
See #21223
Commits
-------
63e26fc [DI] Remove deprecated case insensitive service ids
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] Allow imports in string format for YAML
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!--highly recommended for new features-->
I see no real reasons why this shouldnt be allowed..
Before
```yml
imports:
- { resource: config.yml }
```
After
```yml
imports:
- config.yml
```
Commits
-------
632e934cfa [DI] Allow imports in string format for YAML
This PR was merged into the 3.4 branch.
Discussion
----------
[VarDumper] Test ExceptionCaster excluding verbosity
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | /
| License | MIT
| Doc PR | /
Cover better ``ExceptionCaster`` in tests thanks to filter which was added in https://github.com/symfony/symfony/pull/22588.
Commits
-------
85766c9 Add exculde verbosity test
* 3.4: (23 commits)
Don't display the Symfony debug toolbar when printing the page
[Routing] also add matched params for redirect due to trailing slash
do not wire namespaces for the ArrayAdapter
check _controller attribute is a string before parsing it
[Cache] Added test for ApcuAdapter when using in CLI
[Validator] sync upgrade file with latest code changes
allow to configure custom formats in XML configs
[HttpKernel] fix DumpDataCollector tests
[FrameworkBundle] fix changelog
[WebProfilerBundle] Cleanup profiler leftover
[Routing] Add matched and default parameters to redirect responses
[DotEnv] Fix variable substitution
require the XML PHP extension
Fix phpdoc for serializer normalizers exceptions
Fixed absolute url generation for query strings and hash urls
bumped Symfony version to 2.8.25
updated VERSION for 2.8.24
updated CHANGELOG for 2.8.24
bumped Symfony version to 2.7.32
[Filesystem] Dont copy perms when origin is remote
...
* 3.3:
Don't display the Symfony debug toolbar when printing the page
do not wire namespaces for the ArrayAdapter
check _controller attribute is a string before parsing it
[Cache] Added test for ApcuAdapter when using in CLI
allow to configure custom formats in XML configs
[HttpKernel] fix DumpDataCollector tests
[FrameworkBundle] fix changelog
[WebProfilerBundle] Cleanup profiler leftover
[DotEnv] Fix variable substitution
require the XML PHP extension
Fix phpdoc for serializer normalizers exceptions
Fixed absolute url generation for query strings and hash urls
bumped Symfony version to 2.8.25
updated VERSION for 2.8.24
updated CHANGELOG for 2.8.24
bumped Symfony version to 2.7.32
[Filesystem] Dont copy perms when origin is remote
updated VERSION for 2.7.31
update CONTRIBUTORS for 2.7.31
updated CHANGELOG for 2.7.31
* 3.2:
Don't display the Symfony debug toolbar when printing the page
do not wire namespaces for the ArrayAdapter
[Cache] Added test for ApcuAdapter when using in CLI
allow to configure custom formats in XML configs
[HttpKernel] fix DumpDataCollector tests
[FrameworkBundle] fix changelog
[WebProfilerBundle] Cleanup profiler leftover
require the XML PHP extension
Fix phpdoc for serializer normalizers exceptions
Fixed absolute url generation for query strings and hash urls
bumped Symfony version to 2.8.25
updated VERSION for 2.8.24
updated CHANGELOG for 2.8.24
bumped Symfony version to 2.7.32
[Filesystem] Dont copy perms when origin is remote
updated VERSION for 2.7.31
update CONTRIBUTORS for 2.7.31
updated CHANGELOG for 2.7.31
* 2.8:
Don't display the Symfony debug toolbar when printing the page
allow to configure custom formats in XML configs
require the XML PHP extension
Fixed absolute url generation for query strings and hash urls
bumped Symfony version to 2.8.25
updated VERSION for 2.8.24
updated CHANGELOG for 2.8.24
bumped Symfony version to 2.7.32
[Filesystem] Dont copy perms when origin is remote
updated VERSION for 2.7.31
update CONTRIBUTORS for 2.7.31
updated CHANGELOG for 2.7.31
* 2.7:
allow to configure custom formats in XML configs
require the XML PHP extension
Fixed absolute url generation for query strings and hash urls
bumped Symfony version to 2.7.32
[Filesystem] Dont copy perms when origin is remote
updated VERSION for 2.7.31
update CONTRIBUTORS for 2.7.31
updated CHANGELOG for 2.7.31
This PR was merged into the 3.2 branch.
Discussion
----------
[FrameworkBundle] do not wire namespaces for the ArrayAdapter
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #23214
| License | MIT
| Doc PR |
Commits
-------
9380614 do not wire namespaces for the ArrayAdapter
The `framework.serializer.cache` option was also deprecated in Symfony
3.1. This was documented in the upgrade file, but was not reflected in
the bundle's changelog.
* 3.4:
Deprecate support for stacked errors
fixed tests
[HttpFoundation] Find the original request protocol version
fixed CS
Add support for microseconds in Stopwatch
Preserve HttpOnly value when deserializing a header
add minimum and maximum amount of pixels to Image validator
fixed CHANGELOG
[DX] [TwigBundle] Enhance the new exception page design
[BrowserKit] Emulate back/forward browser navigation
Fix deprecated message
[Component][Serializer][Normalizer] : Deal it with Has Method for the Normalizer/Denormalizer
[Validator] improve the changelog
[FrameworkBundle] Wire inner translator
[FrameworkBundle][HttpKernel] Move addcachearmer, addcacheclearer compiler pass
[FrameworkBundle][Translation] Move translation compiler pass
* 3.3: (33 commits)
Preserve HttpOnly value when deserializing a header
[DX] [TwigBundle] Enhance the new exception page design
Fix deprecated message
[DI][Security] Prevent unwanted deprecation notices when using Expression Languages
bumped Symfony version to 3.3.5
updated VERSION for 3.3.4
updated CHANGELOG for 3.3.4
[VarDumper] Reduce size of serialized Data objects
bumped Symfony version to 3.2.12
updated VERSION for 3.2.11
updated CHANGELOG for 3.2.11
fixed bad merge
Fix indent of methods
[Cache] Handle APCu failures gracefully
[DoctrineBridge] Use normalizedIds for resetting entity manager services
[FrameworkBundle] Do not remove files from assets dir
[FrameworkBundle] 3.3: Don't get() private services from debug:router
bumped Symfony version to 3.3.4
updated VERSION for 3.3.3
updated CHANGELOG for 3.3.3
...
This PR was merged into the 3.4 branch.
Discussion
----------
[Debug] Deprecate support for stacked errors
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #22804
| License | MIT
| Doc PR | n/a
Per discussion in #22804 this deprecates support for error stacking. // @nicolas-grekas
Commits
-------
04b8b80 Deprecate support for stacked errors
This PR was merged into the 3.4 branch.
Discussion
----------
[Validator] Add min/max amount of pixels to Image constraint
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/7756
Useful for asserting image sizes/areas in pixels, for instance to estimate processing work load.
**This PR continues #22288**. I cleaned up my associated branch a while ago and found no way of restoring or re-linking.
@fabpot: "Could you rename to [TOO_FEW_PIXEL_ERROR](9ab5263d71/src/Symfony/Component/Validator/Constraints/Image.php (L28))? Same for the other constant?"
This is done.
@fabpot "Can you change the base to 3.4 instead of master and rebase on current 3.4? Thanks."
This is done too.
Commits
-------
9ab5263d71 add minimum and maximum amount of pixels to Image validator
This PR was squashed before being merged into the 3.4 branch (closes#23223).
Discussion
----------
Add support for microseconds in Stopwatch
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no?
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18756
| License | MIT
| Doc PR | -
Stopwatch component already supports microseconds (and nanoseconds, etc.) ... but the problem is that it converts the millisecond times to integers, so anything smaller to 1 millisecond is lost. This PR changes that to fix issues like the one explained in #18756.
### Before
![before-stopwatch](https://user-images.githubusercontent.com/73419/27279393-c745db54-54e4-11e7-8f26-01e2063604ce.png)
### After
![after-stopwatch](https://user-images.githubusercontent.com/73419/27279396-c8894dac-54e4-11e7-9a3a-bff027377047.png)
Commits
-------
0db8d7fb6a Add support for microseconds in Stopwatch
This PR was merged into the 3.3 branch.
Discussion
----------
[Ldap] Fix deprecated message
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/20390https://github.com/symfony/symfony/pull/23402
| License | MIT
| Doc PR | /
``RenameEntryInterface`` is **deprecated** in 3.3 and **removed/merged** in 4.0.
Commits
-------
bbd0c7f69f Fix deprecated message
The normalizers throw exceptions. They need to be documented for DX
in the normalizer/denormalizer interfaces.
[Serializer] fit Symfony phpdoc standard
It also adds meaning of each exception throw.
Fix grammary in phpdoc
This PR was squashed before being merged into the 3.3 branch (closes#22439).
Discussion
----------
[DX] [TwigBundle] Enhance the new exception page design
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
- [x] Fix the problem with wrapping wide lines (https://github.com/symfony/symfony/pull/20951#issuecomment-292201983)
I got motivated by recent PR https://github.com/symfony/symfony/pull/20951 and redesigned the exception page even more.
Compare before: ![before](https://cloud.githubusercontent.com/assets/885946/25052220/0756b74e-2151-11e7-98b6-c99fd9eaabec.png)
with after: ![after](https://cloud.githubusercontent.com/assets/885946/25052225/0c76581a-2151-11e7-96ff-eb502ee8e97b.png)
(Ignore the the "sf" toolbar icon in the middle of the page. This is how Firefox does full-page screenshots.)
The most noticeable changes:
- removed double line spacing (it just does not feel natural)
- file context increased from 3 to 10 lines (it helps me to better orientate in the code)
- added horizontal scrollbar for the cases when the code is wider
- the highlighted line color is more saturated in order to be noticed easily
Commits
-------
43212b9a90 [DX] [TwigBundle] Enhance the new exception page design
* 3.3:
[DI][Security] Prevent unwanted deprecation notices when using Expression Languages
bumped Symfony version to 3.3.5
updated VERSION for 3.3.4
updated CHANGELOG for 3.3.4
[VarDumper] Reduce size of serialized Data objects
bumped Symfony version to 3.2.12
updated VERSION for 3.2.11
updated CHANGELOG for 3.2.11
[DoctrineBridge] Use normalizedIds for resetting entity manager services
* 3.2:
[DI][Security] Prevent unwanted deprecation notices when using Expression Languages
bumped Symfony version to 3.2.12
updated VERSION for 3.2.11
updated CHANGELOG for 3.2.11
This PR was squashed before being merged into the 2.7 branch (closes#23261).
Discussion
----------
Fixed absolute url generation for query strings and hash urls
| Q | A
| ------------- | ---
| Branch? | 2.7, ...
| Bug fix? | yes
| New feature? |no
| BC breaks? | yes? absolute_url will change its output but the old was incorrect
| Deprecations? |no
| Tests pass? | yes?
| Fixed tickets | fixes#23260
| License | MIT
Fixed absolute url generation for query strings
Commits
-------
89ad27d544 Fixed absolute url generation for query strings and hash urls
This PR was merged into the 2.7 branch.
Discussion
----------
[Filesystem] Dont copy perms when origin is remote
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #23312
| License | MIT
| Doc PR | -
Commits
-------
7b442211dc [Filesystem] Dont copy perms when origin is remote
This PR was merged into the 3.3 branch.
Discussion
----------
[DoctrineBridge] Fix resetting entity managers with case sensitive id
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Commits
-------
9737bcc024 [DoctrineBridge] Use normalizedIds for resetting entity manager services
* 3.3: (21 commits)
fixed bad merge
Fix indent of methods
[Cache] Handle APCu failures gracefully
[FrameworkBundle] Do not remove files from assets dir
[FrameworkBundle] 3.3: Don't get() private services from debug:router
bumped Symfony version to 3.3.4
updated VERSION for 3.3.3
updated CHANGELOG for 3.3.3
bumped Symfony version to 3.2.11
updated VERSION for 3.2.10
updated CHANGELOG for 3.2.10
bumped Symfony version to 2.8.24
updated VERSION for 2.8.23
updated CHANGELOG for 2.8.23
Don't access private services from container aware commands (deprecated)
bumped Symfony version to 2.7.31
updated VERSION for 2.7.30
update CONTRIBUTORS for 2.7.30
updated CHANGELOG for 2.7.30
call setContainer() for autowired controllers
...
* 3.2:
fixed bad merge
[Cache] Handle APCu failures gracefully
[FrameworkBundle] Do not remove files from assets dir
bumped Symfony version to 3.2.11
updated VERSION for 3.2.10
updated CHANGELOG for 3.2.10
bumped Symfony version to 2.8.24
updated VERSION for 2.8.23
updated CHANGELOG for 2.8.23
bumped Symfony version to 2.7.31
updated VERSION for 2.7.30
update CONTRIBUTORS for 2.7.30
updated CHANGELOG for 2.7.30
* 2.8:
[FrameworkBundle] Do not remove files from assets dir
bumped Symfony version to 2.8.24
updated VERSION for 2.8.23
updated CHANGELOG for 2.8.23
bumped Symfony version to 2.7.31
updated VERSION for 2.7.30
update CONTRIBUTORS for 2.7.30
updated CHANGELOG for 2.7.30
* 2.7:
[FrameworkBundle] Do not remove files from assets dir
bumped Symfony version to 2.7.31
updated VERSION for 2.7.30
update CONTRIBUTORS for 2.7.30
updated CHANGELOG for 2.7.30
This PR was merged into the 3.3 branch.
Discussion
----------
[FrameworkBundle] call setContainer() for autowired controllers
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #23200, FriendsOfSymfony/FOSRestBundle#1719
| License | MIT
| Doc PR |
Previously, you either did not use controllers as services or you explicitly wired everything yourself. In case of a non-service controller the FrameworkBundle took care of calling `setContainer()` inside the `instantiateController()` method:
```php
protected function instantiateController($class)
{
$controller = parent::instantiateController($class);
if ($controller instanceof ContainerAwareInterface) {
$controller->setContainer($this->container);
}
if ($controller instanceof AbstractController && null !== $previousContainer = $controller->setContainer($this->container)) {
$controller->setContainer($previousContainer);
}
return $controller;
}
```
With the new autowired controllers as services this is no longer happening as controllers do not need to be instantiated anymore (the container already returns fully built objects).
Commits
-------
1d07a28 call setContainer() for autowired controllers
* 3.4:
[Console] Fix descriptor tests
Change wording from object to subject
add changelog entry for Stopwatch::reset()
Add DateCaster
[Dotenv] parse concatenated variable values
[Yaml] deprecate the !str tag
Add filter in VarDumperTestTrait
Support for parsing PHP constants in yaml loader
This PR was merged into the 3.4 branch.
Discussion
----------
[VarDumper] Add filter in VarDumperTestTrait
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no
| Fixed tickets | /
| License | MIT
| Doc PR | /
Many casters uses ``EXCLUDE_*`` flags in their cast method. It would be usefull to use this flags directly with ``VarDumperTestTrait`` to tests many cases.
Commits
-------
1da8e71 Add filter in VarDumperTestTrait
This PR was merged into the 3.4 branch.
Discussion
----------
[Yaml] deprecate the !str tag
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
The tag specified in the YAML spec is actually !!str.
Commits
-------
976b93a040 [Yaml] deprecate the !str tag
This PR was merged into the 3.4 branch.
Discussion
----------
[Validator] Support for parsing PHP constants in yaml loader
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Yaml components supports PHP constants. It would be great if we could use it also in validator component.
Commits
-------
37afeeae7a Support for parsing PHP constants in yaml loader
This PR was merged into the 3.4 branch.
Discussion
----------
[VarDumper] Add date caster
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | /
| License | MIT
| Doc PR | /
I propose to add a ``DateCaster`` that casts date (with timestamp, date, time, timezone (offset + id), literal date, delta from now and DST) and interval.
Todo:
- [x] cast date
- [x] cast interval
- [x] add tests
Commits
-------
1dbdf1c Add DateCaster
This PR was merged into the 3.4 branch.
Discussion
----------
Change wording from object to subject
| Q | A
| ------------- | ---
| Branch? | 3.4
| 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
| License | MIT
The authorization checker has been changed to support any value
recently. The naming should reflect that to avoid confusion.
Refs https://github.com/sonata-project/SonataAdminBundle/issues/4518
Commits
-------
d261894c6e Change wording from object to subject
* 3.4:
Misspelled word
Display a better error design when the toolbar cannot be displayed
fixed CS
do not validate empty values
[Cache] fix cleanup of expired items for PdoAdapter
[Dotenv] clean up before running assertions
[Console] fix description of INF default values
parse escaped quotes in unquoted env var values
[PropertyAccess] Fix TypeError discard
[Validator] Throw exception on Comparison constraints null options
[FrameworkBundle] Display a proper warning on cache:clear without the --no-warmup option
[Security] Fix Firewall ExceptionListener priority
Allow * to bind all interfaces (as INADDR_ANY)
Identify tty tests in Component/Process
[Workflow] Added more events to the announce function
[Validator] Remove property path suggestion for using the Expression validator
[WebProfilerBundle] Fix css trick used for offsetting html anchor from fixed header
disable unusable fragment renderers
[Stopwatch] Add a reset method
[Security] Fix annotation
* 3.3:
Misspelled word
Display a better error design when the toolbar cannot be displayed
do not validate empty values
[Cache] fix cleanup of expired items for PdoAdapter
[Dotenv] clean up before running assertions
[Console] fix description of INF default values
parse escaped quotes in unquoted env var values
[PropertyAccess] Fix TypeError discard
[Validator] Throw exception on Comparison constraints null options
[FrameworkBundle] Display a proper warning on cache:clear without the --no-warmup option
[Security] Fix Firewall ExceptionListener priority
Identify tty tests in Component/Process
[Workflow] Added more events to the announce function
[Validator] Remove property path suggestion for using the Expression validator
[WebProfilerBundle] Fix css trick used for offsetting html anchor from fixed header
[Security] Fix annotation
* 3.2:
Misspelled word
Display a better error design when the toolbar cannot be displayed
do not validate empty values
[Cache] fix cleanup of expired items for PdoAdapter
[Console] fix description of INF default values
[PropertyAccess] Fix TypeError discard
[Validator] Throw exception on Comparison constraints null options
Identify tty tests in Component/Process
[Workflow] Added more events to the announce function
[Validator] Remove property path suggestion for using the Expression validator
[WebProfilerBundle] Fix css trick used for offsetting html anchor from fixed header
[Security] Fix annotation
* 2.8:
Misspelled word
Display a better error design when the toolbar cannot be displayed
do not validate empty values
[Console] fix description of INF default values
[PropertyAccess] Fix TypeError discard
[Validator] Throw exception on Comparison constraints null options
Identify tty tests in Component/Process
[Security] Fix annotation
* 2.7:
Misspelled word
Display a better error design when the toolbar cannot be displayed
do not validate empty values
[Console] fix description of INF default values
[PropertyAccess] Fix TypeError discard
[Validator] Throw exception on Comparison constraints null options
Identify tty tests in Component/Process
[Security] Fix annotation
This PR was merged into the 2.7 branch.
Discussion
----------
[DoctrineBridge][Security][Validator] do not validate empty values
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #23319
| License | MIT
| Doc PR |
Nearly all validators operating on scalar values (except for some special constraints) do ignore empty values. If you want to forbid them, you have to use the `NotBlank` constraint instead.
Commits
-------
fd7ad234bc do not validate empty values
This PR was squashed before being merged into the 4.0-dev branch (closes#23216).
Discussion
----------
Remove HHVM support (second edition)
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
| Doc PR | not needed
This PR removes HHVM compatiblity following #22758 as some things were missing. It also removes some useless comments.
Commits
-------
471b84c Remove HHVM support (second edition)
This PR was merged into the 3.4 branch.
Discussion
----------
[Stopwatch] Add a reset method
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #23284
| License | MIT
| Doc PR | symfony/symfony-docs#8082
Let the Stopwatch to be reset to its original state, deleting all the data measured so far. This allows the stopwatch to be reusable, and emulates an actual stopwatch's reset button.
Commits
-------
7cda099663 [Stopwatch] Add a reset method
This PR was squashed before being merged into the 2.7 branch (closes#23274).
Discussion
----------
Display a better error design when the toolbar cannot be displayed
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes (failure unrelated)
| Fixed tickets | https://github.com/symfony/symfony/pull/23266
| License | MIT
| Doc PR | n/a
Fixing the left position of the bar (tested in app without style) and escaping the literal newline (ES5) as some IDEs fails with previous syntax (and Github diff too). Btw, I have added the Symfony icon to make clear that this message comes from Symfony ;)
**Before:**
![current_toolbar_error](https://user-images.githubusercontent.com/2028198/27466735-cd5f0da8-57aa-11e7-8431-3025c41557e6.png)
**After:**
![after_toolbar_27](https://user-images.githubusercontent.com/2028198/27467928-75e45d4e-57b4-11e7-9e1f-e252d9085596.png)
Commits
-------
ed3e403b4b Display a better error design when the toolbar cannot be displayed
This PR was merged into the 3.4 branch.
Discussion
----------
[WebServer] Allow * to bind all interfaces (as INADDR_ANY)
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no-tests
| Fixed tickets | ~
| License | MIT
| Doc PR |
In Python and elsewhere, binding to '*' means '0.0.0.0' (INADDR_ANY). I just added that to WebServer command.
Commits
-------
1880bcfde2 fixed CS
b31ebae4cb Allow * to bind all interfaces (as INADDR_ANY)
This PR was merged into the 3.3 branch.
Discussion
----------
[Security] Fix Firewall ExceptionListener priority
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #23253
| License | MIT
| Doc PR | n/a
When making EventDispatcher able to lazy load listeners, we stopped using `ContainerAwareEventDispatcher::addListenerService/addSubcriberService`, we use `EventDispatcher::addListener()` instead. This change makes that the order of listeners is different than before, because `ContainerAwareEventDispatcher` calls `addListener()` tardily so that factories are never stored in `EventDispatcher::$listeners`.
Example diff due to the behavior change in 3.3 (registering an `AppBundle\ExceptionListener::doCatch()` exception listener in the fullstack):
3.2
----
```php
array:5
0 => "Symfony\Component\Security\Http\Firewall\ExceptionListener::onKernelException"
1 => "AppBundle\ExceptionListener::doCatch"
2 => "Symfony\Component\HttpKernel\EventListener\ProfilerListener::onKernelException"
3 => "Symfony\Bundle\SwiftmailerBundle\EventListener\EmailSenderListener::onException"
4 => "Symfony\Component\HttpKernel\EventListener\ExceptionListener::onKernelException"
]
```
3.3
----
```php
array:5 [
0 => "AppBundle\ExceptionListener::doCatch"
1 => "Symfony\Component\HttpKernel\EventListener\ProfilerListener::onKernelException"
2 => "Symfony\Bundle\SwiftmailerBundle\EventListener\EmailSenderListener::onException"
3 => "Symfony\Component\Security\Http\Firewall\ExceptionListener::onKernelException"
4 => "Symfony\Component\HttpKernel\EventListener\ExceptionListener::onKernelException"
]
```
(that is what breaks #23253, the lazy listener is called before the runtime firewall exception listener on dispatch).
This fixes the order by increasing the security exception listener priority.
Commits
-------
8014b38055 [Security] Fix Firewall ExceptionListener priority
This PR was merged into the 3.2 branch.
Discussion
----------
[Validator] Remove property path suggestion for using the Expression validator
| Q | A
| ------------- | ---
| Branch? | 3.2 <!-- see comment below -->
| 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 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
This suggestion is erroneous since #17398 removed any usage of the PropertyAccess component within the Validator one, so it's not even required anymore by the ExpressionValidator.
Commits
-------
e9e1534cde [Validator] Remove property path suggestion for using the Expression validator
This PR was merged into the 2.7 branch.
Discussion
----------
[Validator] Throw exception on Comparison constraints null options
| Q | A
| ------------- | ---
| Branch? | 2.7 <!-- see comment below -->
| Bug fix? | no. There is no bug, but the constraint can be silently created in an invalid state.
| 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 (failure unrelated)
| Fixed tickets | N/A <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
Commits
-------
2de59a7381 [Validator] Throw exception on Comparison constraints null options
This PR was merged into the 4.0-dev branch.
Discussion
----------
[Yaml][Lint] Add line numbers to JSON output.
| Q | A
| ------------- | ---
| Branch? | 2.7?
| Bug fix? | no?
| New feature? | yes?
| BC breaks? | no?
| Deprecations? | no?
| Tests pass? | Hopefully
| Fixed tickets | n/a
| License | MIT
| Doc PR | TODO?
- [ ] Run tests?
- [ ] Check if it will break BC?
- [ ] Update changelog?
The JSON output is not very useful for me without the line number. I don't want to have to parse it from the message.
Is this the right way of doing it?
With PR:
```
[
{
"file": "",
"line": 13,
"valid": false,
"message": "Unable to parse at line 13 (near \"sdf \")."
}
]
```
Before:
```
[
{
"file": "",
"valid": false,
"message": "Unable to parse at line 13 (near \"sdf \")."
}
]
```
Commits
-------
c6d19b1976 [Yaml][Twig][Lint] Added line numbers to JSON output.
This PR was merged into the 4.0-dev branch.
Discussion
----------
[Security] remove support for defining voters that don't implement VoterInterface.
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
Commits
-------
f527790080 [Security] remove support for defining voters that don't implement the VoterInterface interface.
* 3.4:
fixed tests
swiftmailer bridge is gone
respect the API in FirewallContext map
[TwigBundle] add back exception check
Dont call count on non countable object
Fix undefined variable $filesystem
* 3.3:
fixed tests
swiftmailer bridge is gone
respect the API in FirewallContext map
[TwigBundle] add back exception check
Dont call count on non countable object
Fix undefined variable $filesystem
* 3.2:
fixed tests
swiftmailer bridge is gone
[TwigBundle] add back exception check
Dont call count on non countable object
Fix undefined variable $filesystem
This PR was merged into the 2.7 branch.
Discussion
----------
Don't call count on non countable object
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
| Doc PR |
From PHP 7.2, calling `count` on a non-countable object will emit a warning (https://wiki.php.net/rfc/counting_non_countables).
Based on the current test suit, this is the only place where I found this warning
Commits
-------
635bccdf8f Dont call count on non countable object
* 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.3: (64 commits)
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
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)
[Validator] replace hardcoded service id
[Routing] Fix XmlFileLoader exception message
[DI] Dedup tags when using instanceof/autoconfigure
[Translation] Fix FileLoader::loadResource() php doc
Sessions: configurable "use_strict_mode" option for NativeSessionStorage
[FrameworkBundle] [Command] Clean bundle directory, fixes#23177
fixed CS
[WebProfilerBundle] Fix the icon for the Cache panel
[WebServerBundle] Fix router script path and check existence
...
* 3.2: (42 commits)
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
render hidden _method field in form_rest()
Add Doctrine Cache to dev dependencies to fix failing unit tests.
return fallback locales whenever possible
[Console] Fix catching exception type in QuestionHelper
[WebProfilerBundle] Eliminate line wrap on count columnt (routing)
[Routing] Fix XmlFileLoader exception message
[Translation] Fix FileLoader::loadResource() php doc
Sessions: configurable "use_strict_mode" option for NativeSessionStorage
[FrameworkBundle] [Command] Clean bundle directory, fixes#23177
Reset redirectCount when throwing exception
[TwigBundle] Remove template.xml services when templating is disabled
add content-type header on exception response
Embedding a response that combines expiration and validation, that should not defeat expiration on the combined response
fixed bad merge
Fix two edge cases in ResponseCacheStrategy
[Routing] Expose request in route conditions, if needed and possible
[Routing] Expose request in route conditions, if needed and possible
...
* 2.8: (40 commits)
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
render hidden _method field in form_rest()
return fallback locales whenever possible
[Console] Fix catching exception type in QuestionHelper
[WebProfilerBundle] Eliminate line wrap on count columnt (routing)
[Routing] Fix XmlFileLoader exception message
[Translation] Fix FileLoader::loadResource() php doc
Sessions: configurable "use_strict_mode" option for NativeSessionStorage
[FrameworkBundle] [Command] Clean bundle directory, fixes#23177
Reset redirectCount when throwing exception
[TwigBundle] Remove template.xml services when templating is disabled
add content-type header on exception response
Embedding a response that combines expiration and validation, that should not defeat expiration on the combined response
Fix two edge cases in ResponseCacheStrategy
[Routing] Expose request in route conditions, if needed and possible
[Routing] Expose request in route conditions, if needed and possible
[Translation][FrameworkBundle] Fix resource loading order inconsistency reported in #23034
[Filesystem] added workaround in Filesystem::rename for PHP bug
...
* 2.7:
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
render hidden _method field in form_rest()
return fallback locales whenever possible
This PR was merged into the 2.7 branch.
Discussion
----------
Display a better error message when the toolbar cannot be displayed
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #23264
| License | MIT
| Doc PR | -
In action:
![profiler-error](https://user-images.githubusercontent.com/73419/27444352-5d0a1d60-5776-11e7-89c3-430cd6f38454.png)
Commits
-------
cc7275bccc Display a better error message when the toolbar cannot be displayed
This PR was merged into the 2.8 branch.
Discussion
----------
[Console] Fix catching exception type in QuestionHelper
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
When generic exceptions were replaced by domain exceptions in dd17dc00ee one catch statement was missed. The existing code works fine because a `RuntimeException` extends a `\RuntimeException`.
Commits
-------
1c091eb703 [Console] Fix catching exception type in QuestionHelper
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpFoundation] Adds support for the immutable directive in the cache-control header
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #21425
| License | MIT
| Doc PR |
Added support for the immutable directive in the cache-control header, tries to resolve#21425.
Commits
-------
33573c6eb1 Added support for the immutable directive in the cache-control header
* 2.7:
[Routing] Fix XmlFileLoader exception message
Sessions: configurable "use_strict_mode" option for NativeSessionStorage
[FrameworkBundle] [Command] Clean bundle directory, fixes#23177
Reset redirectCount when throwing exception
[TwigBundle] Remove template.xml services when templating is disabled
add content-type header on exception response
Embedding a response that combines expiration and validation, that should not defeat expiration on the combined response
Fix two edge cases in ResponseCacheStrategy
[Routing] Expose request in route conditions, if needed and possible
[Routing] Expose request in route conditions, if needed and possible
[Translation][FrameworkBundle] Fix resource loading order inconsistency reported in #23034
[Filesystem] added workaround in Filesystem::rename for PHP bug
Add tests for ResponseCacheStrategy to document some more edge cases
[HttpFoundation] added missing docs
fixes#21606
[VarDumper] fixes
[Security] fix switch user _exit without having current token
This PR was merged into the 2.7 branch.
Discussion
----------
[Security] fix switch user _exit without having current token
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #22729
| License | MIT
| Doc PR | -
Attempting to `_exit` from a switched user caused an error when not having any token in the storage (for example happens when not logged in + disallowing anonymous users on that firewall):
`[1] Symfony\Component\Debug\Exception\FatalThrowableError: Type error: Argument 1 passed to Symfony\Component\Security\Http\Firewall\SwitchUserListener::getOriginalToken()
must be an instance of Symfony\Component\Security\Core\Authentication\Token\TokenInterface, null given, called in
symfony/symfony/src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php on line 164`
Commits
-------
16da6861be [Security] fix switch user _exit without having current token
This PR was merged into the 2.7 branch.
Discussion
----------
[Routing] Fix XmlFileLoader exception message
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
When an `XmlFileLoader` encounters an unknown tag it throws an exception with message like `Unknown tag "foo" used in file "bar". Expected "default", "requirement" or "option".`. A proper message should be `Unknown tag "foo" used in file "bar". Expected "default", "requirement", "option" or "condition".`
Commits
-------
f6a94cb56f [Routing] Fix XmlFileLoader exception message
This PR was squashed before being merged into the 3.4 branch (closes#22124).
Discussion
----------
Shift responsibility for keeping Date header to ResponseHeaderBag
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
This is an improvement over #22036. It shifts responsibility for preserving a `Date` header to the `ResponseHeaderBag`.
We already have similar logic there for the `Cache-Control` header.
Commits
-------
5d838360f3 Shift responsibility for keeping Date header to ResponseHeaderBag
This PR was squashed before being merged into the 2.7 branch (closes#23195).
Discussion
----------
[FrameworkBundle] [Command] Clean bundle directory, fixes#23177
| Q | A
| ------------- | ---
| Branch? | 2.7 <!-- see comment below -->
| 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? | no
| Fixed tickets | #23177
| License | MIT
This PR fix#23177
when running an assets:install, it will remove directorys who do not have anymore a valid Bundle
Commits
-------
180f178f43 [FrameworkBundle] [Command] Clean bundle directory, fixes#23177
This PR was merged into the 3.3 branch.
Discussion
----------
Fixed composer resources between web/cli
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no (reverts one)
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #23212
| License | MIT
| Doc PR | ~
This is a possible fix for the flawed module check for the composer resource. As this is the easiest fix, I've created a PR ready to be merged.
Commits
-------
9e047122f1 Fixed composer resources between web/cli
This PR was squashed before being merged into the 3.3 branch (closes#23160).
Discussion
----------
[WebProfilerBundle] Fix the icon for the Cache panel
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #23159
| License | MIT
| Doc PR | -
Commits
-------
50c1d478ce [WebProfilerBundle] Fix the icon for the Cache panel
This PR was merged into the 2.7 branch.
Discussion
----------
[TwigBundle] Add Content-Type header for exception response
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
This PR comes after I was looking to customize the way exceptions are served for a JSON API (grabbed the info at http://symfony.com/doc/current/controller/error_pages.html#overriding-the-default-exceptioncontroller).
I noticed that even when changing the request format to 'json' so that the right json.twig template is served:
```php
// in my override of the ExceptionController
public function showAction(Request $request, FlattenException $exception, DebugLoggerInterface $logger = null)
{
$request->setRequestFormat('json');
return parent::showAction($request, $exception, $logger);
}
```
the response Content-Type header was still 'text/html'.
By now, the response Content-Type should be corresponding to the given request format.
I also feel there's some room for improvement with the general "displaying error for a JSON API" chapter as it feels strange that there's no configuration option to just say "serve me anything as json", but that's another issue.
Commits
-------
9e2b408f25 add content-type header on exception response
This PR was merged into the 3.3 branch.
Discussion
----------
[WebServerBundle] Fix router script option BC
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #23206
| License | MIT
| Doc PR | -
Server commands does not work with router script given by a relative path eg.:
```
bin/console server:run -r router.php
```
but, this was working before and was removed (by accident I guess) in https://github.com/symfony/symfony/pull/21039/files#diff-b915f83f99a4166eb34eab581a92501bL187
Commits
-------
aeab2fe1f7 [WebServerBundle] Fix router script path and check existence
This PR was merged into the 2.7 branch.
Discussion
----------
Reset redirectCount when throwing exception
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #23197
| License | MIT
When catching the exception throw when exceeding the redirect limit, all new request which results in a redirect fail. By resetting the redirectCount we can still use the same client instance.
Commits
-------
83fd578f96 Reset redirectCount when throwing exception
This PR was merged into the 3.3 branch.
Discussion
----------
[FrameworkBundle] Expose the AbstractController's container to its subclasses
| Q | A
| ------------- | ---
| Branch? | 3.3
| 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 useful if an application provides their own base Controller that
references items in the container. It also makes it simpler for that
base controller to add additional optional dependencies by only overriding
getSubscribedServices instead of having to reimplement setContainer and
use ControllerTrait.
Commits
-------
ee17131fca Expose the AbstractController's container to its subclasses
This PR was merged into the 3.4 branch.
Discussion
----------
[Validator] Adds support to check specific DNS record type for URL
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
URL validation with the `checkDNS` option can time out for some international registrars or for reasons unknown. When the `URL` constraint is implemented, the context may logically allow for a single DNS record type to be checked, which is less prone to timing out. This updates the `checkDNS` option value to be one of any valid for the underlying `checkdnsrr()` method with backwards compatibility for the original boolean value.
Commits
-------
e66d8f1bef [Validator] Adds support to check specific DNS record type for URL
This PR was squashed before being merged into the 3.4 branch (closes#22629).
Discussion
----------
[Security] Trigger a deprecation when a voter is missing the VoterInterface
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
Right now it's possible to add voters to the access decision manager that do not have a `VoterInterface`.
- No Interface, no `vote()` method, and it will give a PHP error.
- No Interface, but `vote()` method, it will still work.
- If I don't implement the interface _and_ have no `vote()` method, I will get weird exception that's not meaningful: `Attempted to call an undefined method named "vote" of class "App\Voter\MyVoter".`
This PR will deprecate the ability to use voters without the interface, it will also throw a proper exception when missing the interface _and_ the `vote()` method. Why when using and not when setting? Due to the fact that the voters can be set lazily via the `IteratorArgument`. The SecurityBundle will trigger a deprecation if the interface is not implemented and an exception if there's not even a `vote()` method present (to prevent exceptions at run-time).
This should have full backwards compatibility with 3.3, but give more meaningful errors. The only behavioral difference, might be that the container will throw an exception instead of maybe succeeding in voting when 1 voter would be broken at the end of the list (based on strategy). This case however, will be detected during development and deployment, rather than run-time.
Commits
-------
9c253e1ff6 [Security] Trigger a deprecation when a voter is missing the VoterInterface
Useful if an application provides their own base Controller that
references items in the container. It also makes it simpler for that
base controller to add additional optional dependencies by only overriding
getSubscribedServices instead of having to reimplement setContainer and
use ControllerTrait.
This PR was squashed before being merged into the 2.7 branch (closes#23129).
Discussion
----------
Fix two edge cases in ResponseCacheStrategy
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
While reviewing how `ResponseCacheStrategy` calculates the caching-related headers for responses that embed subrequests, I came across two cases that I think are currently implemented incorrectly.
a) When the main response is public and cacheable with an expiration time, but it embeds (via ESI) a controller that does not set any caching-related headers, this embedded response is more constrained. So, the resulting (combined) response must not be cacheable, especially it may not keep the s-maxage.
b) When the main response is public and cacheable with an expiration time, but it embeds (via ESI) a controller that explicitly creates a "private" response, the resulting (combined) response must be private as well.
Commits
-------
c6e8c07e4d Fix two edge cases in ResponseCacheStrategy
This PR was merged into the 3.4 branch.
Discussion
----------
[Yaml] Deprecate using the non-specific tag
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Values tagged with the non-specific tag must not be transformed in an integer, this tag means that they must not be evaluated (see [the spec](http://www.yaml.org/spec/1.2/spec.html#tag/non-specific/)).
I applied this change in https://github.com/symfony/symfony/pull/22762 to comply with the spec.
Commits
-------
60f5046661 [Yaml] Deprecate using the non-specific tag
* 3.2:
[SecurityBundle] Move cache of the firewall context into the request parameters
Fix Usage with anonymous classes
[Workflow] Added more keywords in the composer.json
[Cache] APCu isSupported() should return true when apc.enable_cli=Off
[PropertyAccess] Do not silence TypeErrors from client code.
This PR was squashed before being merged into the 3.2 branch (closes#22943).
Discussion
----------
[SecurityBundle] Move cache of the firewall context into the request parameters
Following [this proposal](https://github.com/symfony/symfony/pull/22605#issuecomment-301276639). Since the matching context relates to the request, this information should have been cached inside the request parameters.
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #22605
| License | MIT
| Doc PR | n/a
* Avoid memory leak when handling multiple requests
* Adding the new request parameter `_firewall_context` might be considered as a breaking change. That adds a new "public" property that could be used by end developers.
Commits
-------
b3203cb8ab [SecurityBundle] Move cache of the firewall context into the request parameters
This PR was squashed before being merged into the 3.3 branch (closes#23088).
Discussion
----------
[FrameworkBundle] Dont set pre-defined esi/ssi services
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | not sure
| Deprecations? | no
| Tests pass? | yes/no
| Fixed tickets | #23080
| License | MIT
| Doc PR | symfony/symfony-docs#... <!--highly recommended for new features-->
It fixes the issue, but im not sure what's expected if you dont use http cache (solely enabled ssi/esi in config). Before the services were initialized, now they are synthetic as http cache sets them, but thats optional =/
Commits
-------
8c26aab0fe [FrameworkBundle] Dont set pre-defined esi/ssi services
This PR was squashed before being merged into the 2.7 branch (closes#23057).
Discussion
----------
[Translation][FrameworkBundle] Fix resource loading order inconsistency reported in #23034
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #23034
| License | MIT
| Doc PR |
Fixes the bug reported in #23034:
When mixing `addResource()` calls and providing the `resource_files` option, the order in which resources are loaded depends on the `kernel.debug` setting and whether a cache is used.
In particular, when several loaders provide translations for the same message, the one that "wins" may change between development and production mode.
Commits
-------
2a9e65dea9 [Translation][FrameworkBundle] Fix resource loading order inconsistency reported in #23034
This PR was merged into the 3.4 branch.
Discussion
----------
Consistent error handling in remember me services
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | yes
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
RememberMeServices lacked consistent error handling so far making it impossible for implementors to e.g. maintain sufficiently detailed audit logs for remember me errors. Since remember me is a very sensitive area in any application, detailed logging is crucial.
The change proposed allows `loginFail` to optionally take the exception object as a second parameter and uses said exception consistently internally by calling `loginFail` instead of `cancelCookie`.
Commits
-------
eda1888f71 Consistent error handling in remember me services
This PR was squashed before being merged into the 2.7 branch (closes#23092).
Discussion
----------
[Filesystem] added workaround in Filesystem::rename for PHP bug
[Filesystem] added workaround in Filesystem::rename for https://bugs.php.net/bug.php?id=54097
Standard PHP rename() of dirs across devices/mounted filesystems produces confusing copy error & throws IOException in Filesystem::rename. I got it during console cache:clear in the Docker environment. This PR possible fixes https://github.com/symfony/symfony/issues/19851 and other environment related issues.
Workaround is on \rename() fails try to Filesystem::mirror & Filesystem::remove if $origin is directory
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
3ccbc479da [Filesystem] added workaround in Filesystem::rename for PHP bug
This PR was squashed before being merged into the 2.7 branch (closes#23123).
Discussion
----------
Add tests for ResponseCacheStrategy to document some more edge cases
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Adds some test cases for possible combinations of master/subrequest responses to better document behaviour in edge cases. Should now cover the entire `ResponseCacheStrategy`.
I hope 2.7 is the right target branch because having more tests for all releases should be a good thing™️.
Commits
-------
69e84633dd Add tests for ResponseCacheStrategy to document some more edge cases
This PR was merged into the 3.3 branch.
Discussion
----------
[HttpFoundation] add back support for legacy constant values
| 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 |
Due to the data type change of the `Request::HEADER_` constants in Symfony 3.3 #23067 introduced a small BC break if someone used the old constant values statically instead of referring to the constants themselves.
Commits
-------
fddd754c0a add back support for legacy constant values
This PR was merged into the 2.7 branch.
Discussion
----------
[HttpFoundation] fix for Support for new 7.1 session options
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #21606
| License | MIT
| Doc PR | n/a
Commits
-------
71c1b6f5bffixes#21606
This PR was merged into the 3.4 branch.
Discussion
----------
[Serializer] DateTimeNormalizer: allow to provide timezone
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
My own use-case was for denormalization of a csv file provided by a third-party. The datetime format inside does not contain any timezone information, and won't change, but it's established to be UTC (or at least consistent).
So by providing the new `datetime_timezone` option, the returned instance of `\DateTime(Interface)` will properly be set with the expected timezone. (In case the format already supports the time offset, the provided timezone is ignored in favor of the one parsed by the `\DateTime` object)
Regarding normalization, the expected behavior of this feature is to consistently return the same time offset.
Commits
-------
c10a780afb [Serializer] DateTimeNormalizer: allow to provide timezone
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] Reference instead of inline for array-params
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
- [x] Tests to be written.
This PR is part of my "container on a diet" quest.
When big array parameters are resolved, they create data duplication in the dumped container. This is even worse when the same big array parameters are used several times.
Even though OPcache stores static arrays in shared memory (php7), it does not deduplicate them (it does for strings.)
Instead of inlining arrays, this PR leverages the `$this->parameters` property when possible.
Commits
-------
7c3d0c7a46 [DI] Reference instead of inline for array-params
This PR was merged into the 3.2 branch.
Discussion
----------
[PropertyAccess] Do not silence TypeErrors from client code.
| Q | A
| ------------- | ---
| Branch? | 3.2
| 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 |
| License | MIT
| Doc PR |
Fixes TypeError silencing in `setValue()` when said error is thrown inside setter/adder/etc.
An example is given in the included test, but more real-life story is botched accessors for a many-to-one association on a Doctrine entity:
```php
class B {
function setA(A $a) { ... } // forgotten "= null" here
}
class A {
function removeB(B $b) {
if ($this->bs->contains($b)) {
$this->bs->removeElement($b);
$b->setA(null); // TypeError thrown
}
return $this;
}
}
```
No error is shown to the user, even though removing doesn't work.
This bug is not present in 2.7 & 2.8.
Commits
-------
45b961de2e [PropertyAccess] Do not silence TypeErrors from client code.
This PR was squashed before being merged into the 3.4 branch (closes#23154).
Discussion
----------
[WebProfilerBundle] Sticky ajax window
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #23125
| License | MIT
| Doc PR | -
This toggles the ajax toolbar block being sticky on click. I find it quite useful in heavy ajax apps :)
Not sure the state needs to be persisted in local storage or so, could be done :) however for our app all the navigating happens via react router, hence no real need for us to persist it between requests.
Commits
-------
b92929b0be [WebProfilerBundle] Sticky ajax window
This PR was merged into the 3.2 branch.
Discussion
----------
[PropertyAccess] Fix Usage with anonymous classes
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #23136
| License | MIT
Replace forbidden characters in the the class names of Anonymous Classes in form of
"class@anonymous /symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php0x7f3f5f267ad5"
Wrapped in eval to avoid PHP parsing errors < 7 and using `rawurlenceode` for perf reasons
Thanks @nicolas-grekas for the help and patience. Let me know if anything is missing.
Commits
-------
3f7fd432df Fix Usage with anonymous classes
This PR was merged into the 3.3 branch.
Discussion
----------
[Config] Fix ** GlobResource on Windows
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #23103
| License | MIT
| Doc PR | -
We cannot tell Finder to use RecursiveDirectoryIterator::UNIX_PATHS so we have to fix paths on Windows.
Commits
-------
44955bea53 [Config] Fix ** GlobResource on Windows
This PR was merged into the 3.3 branch.
Discussion
----------
Fix AutowiringTypesTest transient tests
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
In 3.3, we have a race condition because FrameworkBundle and SecurityBundle use the same test folder for their respective AutowiringTypesTest.
Commits
-------
408e56e404 Fix AutowiringTypesTest transient tests
* 3.3:
[TwigBundle] Add Doctrine Cache to dev dependencies
[Yaml] Fix linting yaml with constants as keys
[Routing] Revert the change in [#b42018] with respect to Routing/Route.php
* 3.4:
[FrameworkBundle] Deprecate useless --no-prefix option
Add Doctrine Cache to dev dependencies to fix failing unit tests.
Give info about called security listeners in profiler
Fix the usage of FrameworkBundle in debug mode without Stopwatch
This PR was merged into the 3.4 branch.
Discussion
----------
[FrameworkBundle] Deprecate useless --no-prefix option
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
It was a workaround, not needed since https://github.com/symfony/symfony/pull/21228. Let's deprecate it and remove it in 4.0.
Commits
-------
f7afa777d8 [FrameworkBundle] Deprecate useless --no-prefix option
This PR was merged into the 3.4 branch.
Discussion
----------
[TwigBundle] Add Doctrine Cache to dev dependencies to fix failing unit tests
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | None
| License | MIT
| Doc PR | N/A
Currently, the unit tests of TwigBundle are failing because Doctrine Cache is missing. Before the changes of #23131, this dependency was pulled via FrameworkBundle. This PR adds Doctrine Cache to the dev dependencies of TwigBundle, so the tests pass again.
```
There were 3 errors:
1) Symfony\Bundle\TwigBundle\Tests\CacheWarmingTest::testCacheIsProperlyWarmedWhenTemplatingIsAvailable
Symfony\Component\DependencyInjection\Exception\LogicException: Annotations cannot be enabled as the Doctrine Cache library is not installed.
2) Symfony\Bundle\TwigBundle\Tests\CacheWarmingTest::testCacheIsProperlyWarmedWhenTemplatingIsDisabled
Symfony\Component\DependencyInjection\Exception\LogicException: Annotations cannot be enabled as the Doctrine Cache library is not installed.
3) Symfony\Bundle\TwigBundle\Tests\NoTemplatingEntryTest::test
Symfony\Component\DependencyInjection\Exception\LogicException: Annotations cannot be enabled as the Doctrine Cache library is not installed.
```
Commits
-------
2dfde58851 Add Doctrine Cache to dev dependencies to fix failing unit tests.
This PR was merged into the 3.4 branch.
Discussion
----------
[SecurityBundle][Profiler] Give info about called security listeners in profiler
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #11134
| License | MIT
| Doc PR | n/a
Currently the profiler gives no info about security listeners (see fixed ticket), this displays each called listener with the time spent at calling it and its response if any.
![preview](https://image.prntscr.com/image/Wx-n-Ni_RQK5JGTdTZsdGw.png)
Commits
-------
369f19fcfd Give info about called security listeners in profiler
Replace forbidden characters in the the class names of Anonymous Classes in form of
"class@anonymous /symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php0x7f3f5f267ad5"
Wrapped in eval to avoid PHP parsing errors < 7
This PR was merged into the 2.7 branch.
Discussion
----------
[FormBuilderInterface] Fixed PHPdoc return references
| Q | A
| ------------- | ---
| Branch? | 2.7 and higher
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | N/A (phpdoc)
| License | MIT
In a case where the method `createFormBuilder()` was used where the methods `add()` and `getForm()` were chained onto it, the final resulting object was no longer a FormBuilder object as the `add()` and `remove()` methods was using a return variable that didn't work.
Should reference `self` as interfaces do not have a `$this` object.
Commits
-------
2f350d1d38 Fixed PHPdoc return references in FormBuilderInterface
* 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
This PR was merged into the 3.4 branch.
Discussion
----------
[FrameworkBundle] drop hard dependency on the Stopwatch component
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | related to symfony/flex#14
| License | MIT
| Doc PR |
Commits
-------
8d70ca0ff4 drop hard dependency on the Stopwatch component
This PR was squashed before being merged into the 3.4 branch (closes#23131).
Discussion
----------
[FrameworkBundle] Remove dependency on Doctrine cache
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | yes
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | related to symfony/flex#14
| License | MIT
| Doc PR | n/a
In our quest to remove hard dependencies, I propose to remove `doctrine/cache` from the default dependencies on the Framework bundle. That's possible now as we have PSR6 cache support in Symfony and because Doctrine cache is only used for the validator mapping cache.
The two other occurrences are for the serializer (already deprecated in 3.3) and for annotations, where we need to keep it, but as Doctrine annotations is already optional, that's not an issue.
Commits
-------
a4e336ea34 [FrameworkBundle] removed doctrine/cache as a dependency
b57895ccaf [FrameworkBundle] deprecated validator.mapping.cache.doctrine.apc
* 3.3:
Fix the conditional definition of the SymfonyTestsListener
[DI] Fix keys resolution in ResolveParameterPlaceHoldersPass
[EventDispatcher] Remove dead code in WrappedListener
Fix non-dumped voters in security panel
[Yaml] Remove line number in deprecation notices
[SecurityBundle] Made 2 service aliases private
This PR was merged into the 3.3 branch.
Discussion
----------
[DI] Fix keys resolution in ResolveParameterPlaceHoldersPass
| 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 | -
Keys are resolved in 3.2, but we broke that when moving to AbstractRecursivePass.
Commits
-------
9251a2143d [DI] Fix keys resolution in ResolveParameterPlaceHoldersPass
This PR was squashed before being merged into the 2.7 branch (closes#22931).
Discussion
----------
SCA with Php Inspections (EA Extended): 2.7
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Static Code Analysis with Php Inspections (EA Extended): dead code and control flow tweaks.
Commits
-------
598ae56cc9 SCA with Php Inspections (EA Extended): 2.7
This PR was squashed before being merged into the 2.7 branch (closes#23120).
Discussion
----------
Remove deprecated each function
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
| Doc PR |
Replace the `each()` function which is deprecated in PHP 7.2 (https://wiki.php.net/rfc/deprecations_php_7_2#each)
Commits
-------
232caad876 Remove deprecated each function
This PR was merged into the 3.3 branch.
Discussion
----------
[EventDispatcher] Remove dead code in WrappedListener
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
The static `$cloner` property is unused since ab716c64de
Commits
-------
8b7de02413 [EventDispatcher] Remove dead code in WrappedListener
This PR was merged into the 3.4 branch.
Discussion
----------
[FrameworkBundle] KernelTestCase: deprecate not using KERNEL_CLASS
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/22668#issuecomment-299875161
| License | MIT
| Doc PR | N/A
Commits
-------
d102fc08e4 [FrameworkBundle] KernelTestCase: deprecate not using KERNEL_CLASS
This PR was merged into the 2.8 branch.
Discussion
----------
#22839 - changed debug toolbar dump section to relative and use full window width
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #22839
| License | MIT
My approach to fix#22839 - instead of adding min-width I have switched the section to fill the full available width:
![zrzut ekranu 2017-05-30 o 10 18 25](https://cloud.githubusercontent.com/assets/1044032/26574462/bf80b6dc-4521-11e7-96cc-bec0de075329.png)
Commits
-------
65297de3aa#22839 - changed debug toolbar dump section to relative and use full window width
This PR was merged into the 3.4 branch.
Discussion
----------
Automatically enable the routing annotation loader
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes <!-- 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 | there's probably one but I didn't find it
| License | MIT
| Doc PR |
Thanks to fqcn services, most of the time, we don't need the SensioFrameworkExtraBundle to use `@Route`.
So I suggest to automatically enable it when annotations are enabled. This way we could simplify https://github.com/symfony/recipes/blob/master/symfony/framework-bundle/3.3/etc/routing.yaml#L5.
Note: I added priority support for routing loaders to make sure sensio loaders are executed before ours.
Commits
-------
c2f796fa15 Automatically enable the routing annotation loader
This PR was merged into the 2.7 branch.
Discussion
----------
[FrameworkBundle] Fix perf issue in CacheClearCommand::warmup()
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
On slow file systems (eg on Windows), I noticed that writing files without doing any changes just kills perf.
Limiting the depth also helps when the symfony/cache component is used (because it can store thousands of files in its cache pool directory structure, and iterating there is also a waste of *fs* time).
I choose the max depth by looking at where existing apps put their files and added one level more just in case.
Commits
-------
b58f060fda [FrameworkBundle] Fix perf issue in CacheClearCommand::warmup()
This PR was merged into the 3.3 branch.
Discussion
----------
[SecurityBundle] Made 2 service aliases private
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | no
| Fixed tickets | -
| License | MIT
| Doc PR | -
We missed making them private :(
Is it too late to fix that?
Commits
-------
4442c636c8 [SecurityBundle] Made 2 service aliases private
* 2.7:
bumped Symfony version to 2.7.30
Cache ipCheck
updated VERSION for 2.7.29
update CONTRIBUTORS for 2.7.29
updated CHANGELOG for 2.7.29
show unique inherited roles
This PR was merged into the 2.7 branch.
Discussion
----------
Cache ipCheck (2.7)
In our app we use trusted proxies. Using Blackfire we found `IpUtils::checkIp` was being called 454 times taking 3.15ms.
Caching the result saves those 3ms.
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
bcb80569cb Cache ipCheck
* 3.4:
[MonologBridge] Do not silence errors in ServerLogHandler::formatRecord
bumped Symfony version to 3.3.3
updated VERSION for 3.3.2
updated CHANGELOG for 3.3.2
[HttpKernel][Debug] Fix missing trace on deprecations collected during bootstrapping & silenced errors
[PropertyInfo] Made ReflectionExtractor's prefix lists instance variables
* 3.3:
[MonologBridge] Do not silence errors in ServerLogHandler::formatRecord
bumped Symfony version to 3.3.3
updated VERSION for 3.3.2
updated CHANGELOG for 3.3.2
[HttpKernel][Debug] Fix missing trace on deprecations collected during bootstrapping & silenced errors
This PR was merged into the 3.4 branch.
Discussion
----------
[PropertyInfo] Made ReflectionExtractor's prefix lists instance variables
| Q | A
| ------------- | ---
| Branch? | `3.4`
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
This PR makes `ReflectionExtractor`'s mutator/accessor prefixes instance variables in order to be able to override them to change its behavior.
Commits
-------
58e733b49e [PropertyInfo] Made ReflectionExtractor's prefix lists instance variables
This PR was merged into the 2.7 branch.
Discussion
----------
[SecurityBundle] Show unique Inherited roles in profile panel
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
When more than one assigned role reaches the same inherited role then it's duplicated in the "Inherited roles" list.
The changes in the test case show the unexpected result before fix it:
```console
There was 1 failure:
1) Symfony\Bundle\SecurityBundle\Tests\DataCollector\SecurityDataCollectorTest::testCollectAuthenticationTokenAndRoles with data set #4 (array('ROLE_ADMIN', 'ROLE_OPERATOR'), array('ROLE_ADMIN', 'ROLE_OPERATOR'), array('ROLE_USER', 'ROLE_ALLOWED_TO_SWITCH'))
Failed asserting that Array &0 (
0 => 'ROLE_USER'
1 => 'ROLE_ALLOWED_TO_SWITCH'
2 => 'ROLE_USER'
) is identical to Array &0 (
0 => 'ROLE_USER'
1 => 'ROLE_ALLOWED_TO_SWITCH'
)
```
Commits
-------
7061bfbf3a show unique inherited roles
* 3.4:
[TwigBridge] Fix namespaced classes
bumped Symfony version to 3.3.2
updated VERSION for 3.3.1
updated CHANGELOG for 3.3.1
[DependencyInjection] Fix named args support in ChildDefinition
[Cache] Fallback to positional when keyed results are broken
[HttpFoundation][FrameworkBundle] Revert "trusted proxies" BC break
[Cache] MemcachedAdapter not working with TagAwareAdapter
Remove closure-proxy leftovers
fix used class name in deprecation message
[DependencyInjection] Use more clear message when unused environment variables detected
[Form][Profiler] Fixes form collector triggering deprecations
mitigate BC break with empty trusted_proxies
[Profiler] Never wrap in code excerpts
[Form][FrameworkBundle] Remove non-existing arg for data_collector.form
explain that a role can be an instance of Role
[Cache] fix Redis scheme detection
Implement ServiceSubscriberInterface in optional cache warmers
Deprecate passing a concrete service in optional cache warmers
mix attr options between type-guess options and user options
* 3.3:
[TwigBridge] Fix namespaced classes
bumped Symfony version to 3.3.2
updated VERSION for 3.3.1
updated CHANGELOG for 3.3.1
[DependencyInjection] Fix named args support in ChildDefinition
[Cache] Fallback to positional when keyed results are broken
[HttpFoundation][FrameworkBundle] Revert "trusted proxies" BC break
[Cache] MemcachedAdapter not working with TagAwareAdapter
Remove closure-proxy leftovers
[DependencyInjection] Use more clear message when unused environment variables detected
[Form][Profiler] Fixes form collector triggering deprecations
mitigate BC break with empty trusted_proxies
[Profiler] Never wrap in code excerpts
[Form][FrameworkBundle] Remove non-existing arg for data_collector.form
explain that a role can be an instance of Role
[Cache] fix Redis scheme detection
mix attr options between type-guess options and user options
* 3.2:
[TwigBridge] Fix namespaced classes
[Cache] MemcachedAdapter not working with TagAwareAdapter
[DependencyInjection] Use more clear message when unused environment variables detected
mix attr options between type-guess options and user options
This PR was merged into the 3.3 branch.
Discussion
----------
[HttpFoundation][FrameworkBundle] Revert "trusted proxies" BC break
| 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 | -
Basically reverts #22238 + cleanups some comments + adds missing syncing logic in setTrustedHeaderName.
The reason for this proposal is that the BC break can go un-noticed until prod, *even if you have proper CI*. That's because your CI may not replicate exactly what your prod have (ie a reverse proxy), so that maybe only prod has a trusted-proxies configuration. I realized this while thinking about #23049: it made this situation even more likely, by removing an opportunity for you to notice the break before prod.
The reasons for the BC break are still valid and all of this is security-related. But the core security issue is already fixed. The remaining issue still exists (an heisenbug related to some people having both Forwarded and X-Forwarded-* set for some reason), but deprecating might still be enough.
WDYT? (I'm sure everyone is going to be happy with the BC break reversal, but I'm asking for feedback from people who actually could take the time to *understand* and *balance* the rationales here, thanks :) )
Commits
-------
2132333059 [HttpFoundation][FrameworkBundle] Revert "trusted proxies" BC break
This PR was merged into the 3.3 branch.
Discussion
----------
[Cache] Fallback to positional when keyed results are broken
| 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 | -
Works around https://github.com/krakjoe/apcu/issues/247 ~~and https://github.com/facebook/hhvm/issues/7867~~
Commits
-------
28aaa8eb05 [Cache] Fallback to positional when keyed results are broken
This PR was squashed before being merged into the 3.3 branch (closes#22981).
Discussion
----------
[DependencyInjection] Fix named args support in ChildDefinition
| Q | A
| ------------- | ---
| Branch? | 3.3
| 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
Following @Tobion's review of #21383.
Commits
-------
1ab3e413d4 [DependencyInjection] Fix named args support in ChildDefinition
It seems that when MemcachedAdapter is used with TagAwareAdapter, it fails to fetch items, even though I thoroughly tested fetching items with the exact same keys under the same namespace.
Turns out the issue lies in `const TAGS_PREFIX = "\0tags\0";` for unknown to me reasons. Hardcoding that to '__tags__' in my project did the trick and I've been using it for a couple of days now and it seems fine.
The reason I had to completely copy/paste this file in my local project is self:: instead of static:: usage. I am not sure whether that is a mistake or is done on purpose, but in order to have this work for me I need to be able to override that constant. Going with static:: seems like a good solution to me, then I can set whatever prefix I need for the tags.
This PR was merged into the 3.3 branch.
Discussion
----------
[Form][Profiler] Fixes form collector triggering deprecations
| Q | A
| ------------- | ---
| Branch? | 3.3 <!-- see comment below -->
| 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 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
Since 3.3, if you inspect your logs when accessing the form profiler panel, you'll see some of these:
```sh
php.INFO: User Deprecated: The Symfony\Bundle\WebProfilerBundle\Twig\WebProfilerExtension::dumpValue() method is deprecated since version 3.2 and will be removed in 4.0.
[...] at /src/Symfony/Bundle/WebProfilerBundle/Twig/WebProfilerExtension.php:119
```
The [WebProfilerExtension](https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/WebProfilerBundle/Twig/WebProfilerExtension.php#L73) is still using a `ValueExporter` instance for BC reasons when the $value ins't an instance of `Data` and this BC layer will be removed in 4.0 (so it'll throw an exception/error when trying to use it with something else than a `Data` instance).
The issue is since #21638, collectors (including forms one) have been drastically simplified to leverage the "seamless usage of Data clones", which is great!... But there is a slightly different implementation between `Data::seek()` and [`Data::__get()`](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/VarDumper/Cloner/Data.php#L123-L130). There are probably good reasons for this, but it prevents from using classic Twig property access when the underlying data may be a scalar (`null`, `false`, ...).
I already spot that while working on the [Validator panel](https://github.com/symfony/symfony/pull/22554/files#diff-deac3c5ce4aa87243093dcd6a3f77a56R84). Perhaps there is a better solution, though.
Anyway, current `master` is currently broken, as it still tries to use the `ValueExporter`, which is already removed. And removing the BC layer in `WebProfilerExtension` isn't enough for now. It needs this fix.
BTW it also fixes rendering of the concerned inlined-dumps:
|Before|After|
|--|--|
|<img width="818" alt="screenshot 2017-06-03 a 13 35 25" src="https://cloud.githubusercontent.com/assets/2211145/26753222/01a692e6-4862-11e7-90d5-9cc9e4832648.PNG">|<img width="817" alt="screenshot 2017-06-03 a 13 35 47" src="https://cloud.githubusercontent.com/assets/2211145/26753224/090d5d6c-4862-11e7-87c1-73d5346f602c.PNG">|
Commits
-------
9de898d69f [Form][Profiler] Fixes form collector triggering deprecations
This PR was merged into the 3.3 branch.
Discussion
----------
[Profiler] Fix code excerpt wrapping
| Q | A
| ------------- | ---
| Branch? | 3.3 <!-- see comment below -->
| Bug fix? | yesish
| 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 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
|Before|After|
|--|--|
|<img width="1346" alt="screenshot 2017-05-30 a 19 09 03" src="https://cloud.githubusercontent.com/assets/2211145/26595449/b8c4302c-456b-11e7-83c4-3471f915437b.PNG">|<img width="1075" alt="screenshot 2017-05-30 a 19 09 35" src="https://cloud.githubusercontent.com/assets/2211145/26595450/b8c61e64-456b-11e7-8b33-bdbe2e90b160.PNG">|
However, I think my own preference for code excerpts would be to never wrap, at the risk of scrolling horizontally. 1024px is enough to read most of the code excerpt without scrolling, and it feels less messy (to me) when a line is too long. WDYT?
Commits
-------
6c87863a0e [Profiler] Never wrap in code excerpts
This PR was merged into the 3.3 branch.
Discussion
----------
[FrameworkBundle] mitigate BC break with empty trusted_proxies
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | kind of
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/22238#issuecomment-305932238
| License | MIT
| Doc PR |
Commits
-------
ff055ef7f3 mitigate BC break with empty trusted_proxies
This PR was merged into the 2.7 branch.
Discussion
----------
[Form] Mix attr option between guessed options and user options
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19871
| License | MIT
Commits
-------
84f5de902d mix attr options between type-guess options and user options
This PR was squashed before being merged into the 3.2 branch (closes#22976).
Discussion
----------
[DependencyInjection] Use more clear message when unused environment variables detected
| Q | A
| ------------- | ---
| Branch? |3.2
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #22955
| License | MIT
Old error message:
```
Incompatible use of dynamic environment variables "DATABASE_URL", "MAILER_URL" found in parameters.
```
New error message:
```
Environment variables "DATABASE_URL", "MAILER_URL" are never used. Please, check your container's configuration.
```
Commits
-------
6dbdb1b750 [DependencyInjection] Use more clear message when unused environment variables detected
* 3.4:
[Yaml] Clarify "incompatible key casting" deprecation message
minor #23043 add \ to PHP_VERSION_ID fixes#22650
[PhpUnitBridge] Fix detection of PHPUnit 5
Adding a new event subscriber that "parses" the _controller attribute in the FW
* 3.3:
[Yaml] Clarify "incompatible key casting" deprecation message
minor #23043 add \ to PHP_VERSION_ID fixes#22650
[PhpUnitBridge] Fix detection of PHPUnit 5
Adding a new event subscriber that "parses" the _controller attribute in the FW
This PR was squashed before being merged into the 3.3 branch (closes#23031).
Discussion
----------
[Yaml] Clarify "incompatible key casting" deprecation message
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
In the process of upgrading to Symfony 3.3 our Yaml linter tests started throwing errors. The exception was a bit unclear to us, so hope this message will help others with fixing their deprecations as well.
Commits
-------
67895f4dd3 [Yaml] Clarify "incompatible key casting" deprecation message
This PR was merged into the 3.3 branch.
Discussion
----------
Parse the _controller format in sub-requests
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | possibly (edge case)
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #22966
| License | MIT
| Doc PR | n/a
As mentioned on the issue (https://github.com/symfony/symfony/issues/22966#issuecomment-305289227), the new "controller service args" functionality relies on the `_controller` attribute to be in either the service format `App\Controller\Foo:bar` or at least the final parsed format `App\Controller\Foo::bar`. But when you make a sub-request with the `App:Foo:bar` format, the `ControllerResolver` correctly parses this, but the `_controller` request attribute will always contain the original `App:Foo:bar` format. That causes the `ServiceValueResolver` to fail.
The only way I can think to fix this - reliably - is to parse the `_controller` attribute in a listener. And this, works great! Notes:
A) There is a small chance for a BC break: if you were relying on the `_controller` old format in a `kernel.request` format in the framework, in a listener between the priority of 25 and 31 for sub-requests (because normal requests have `_controller` normalized during routing)... then you will see a behavior change.
B) We could load the `ControllerNameParser` lazily via a service locator.
C) We could deprecate calling the parser in the FW's `ControllerResolver`. Along with (B), I think it would (in 4.0) mean that the `ControllerNameParser` is not instantiated at runtime (except for sub-requests).
If someone can think of a different/better solution, please let me know!
Cheers!
Commits
-------
9578fd3eb6 Adding a new event subscriber that "parses" the _controller attribute in the FW
This PR was merged into the 3.3 branch.
Discussion
----------
[PhpUnitBridge] Fix detection of PHPUnit 5
| 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 |
Codeception 2.3 supports both PHPUnit 5 and PHPUnit 6 by defining [aliases](https://github.com/Codeception/Codeception/blob/2.3/shim.php). This confuses symfony/phpunit-bridge and it tries to load BC code for PHPUnit 5 even though I'm using PHPUnit 6.
Commits
-------
dfb5549f63 [PhpUnitBridge] Fix detection of PHPUnit 5
This PR was squashed before being merged into the 3.3 branch (closes#23043).
Discussion
----------
minor #23043 add \ to PHP_VERSION_ID fixes#22650
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #22650
| License | MIT
| Doc PR | n/a
this PR is the last one fixing the \ before PHP_VERSION_ID closes definitively #22650
Commits
-------
d3e6a2d6f6 minor #23043 add \ to PHP_VERSION_ID fixes#22650
* 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.3:
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.2:
Fix optional cache warmers are always instantiated whereas they should be lazy-loaded
add some \ on PHP_VERSION_ID for 2.8
[PropertyInfo][DoctrineBridge] The bigint Doctrine's type must be converted to string
* 2.8:
Fix optional cache warmers are always instantiated whereas they should be lazy-loaded
add some \ on PHP_VERSION_ID for 2.8
[PropertyInfo][DoctrineBridge] The bigint Doctrine's type must be converted to string
This PR was merged into the 2.8 branch.
Discussion
----------
[PropertyInfo][DoctrineBridge] The bigint Doctrine's type must be converted to string
| Q | A
| ------------- | ---
| Branch? | 2.8
| 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
According to the Doctrine's docs, the `bigint` type is converted to a `string`: http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/types.html#bigint
/cc @clementtalleu
Commits
-------
47d5e6b [PropertyInfo][DoctrineBridge] The bigint Doctrine's type must be converted to string
This PR was merged into the 2.8 branch.
Discussion
----------
add some \ on PHP_VERSION_ID for 2.8
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #22650
| License | MIT
| Doc PR | symfony/symfony-docs#... <!--highly recommended for new features-->
Commits
-------
7f4824c add some \ on PHP_VERSION_ID for 2.8
This PR was merged into the 2.8 branch.
Discussion
----------
[2.8]Fix optional cache warmers are always instantiated whereas they should be lazy-loaded
| Q | A
| ------------- | ---
| Branch? | 2.8
| 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
Since version 2.8, if a Twig extension throws an exception in constructor, then the Kernel can not boot anymore because a service used by the Twig cache warmer instantiates Twig. As Twig cache warmer is optional, Twig should not be loaded at Kernel boot, and this patch fixes the issue
Commits
-------
3371db9 Fix optional cache warmers are always instantiated whereas they should be lazy-loaded
This PR was merged into the 3.3 branch.
Discussion
----------
[Di] Remove closure-proxy arguments
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | no
| New feature? | no
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
With #23008, we don't need this in core anymore.
Let's drop it now.
Technically that's a BC break, but for a feature that is very new, and still quite hidden.
Doing this now would save us from maintaining this code, and help reduce the overall complexity.
Basically reverts #20953
Commits
-------
57daadb [Di] Remove closure-proxy arguments
* 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
...
* 3.3: (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
...
* 3.2:
Using FQ name for PHP_VERSION_ID
[Form] Fix \IntlDateFormatter timezone parameter usage to bypass PHP bug #66323
Harden the debugging of Twig filters and functions
bumped Symfony version to 3.2.10
updated VERSION for 3.2.9
updated CHANGELOG for 3.2.9
bumped Symfony version to 2.8.22
updated VERSION for 2.8.21
updated CHANGELOG for 2.8.21
bumped Symfony version to 2.7.29
updated VERSION for 2.7.28
update CONTRIBUTORS for 2.7.28
updated CHANGELOG for 2.7.28
* 2.8:
Using FQ name for PHP_VERSION_ID
[Form] Fix \IntlDateFormatter timezone parameter usage to bypass PHP bug #66323
Harden the debugging of Twig filters and functions
bumped Symfony version to 2.8.22
updated VERSION for 2.8.21
updated CHANGELOG for 2.8.21
bumped Symfony version to 2.7.29
updated VERSION for 2.7.28
update CONTRIBUTORS for 2.7.28
updated CHANGELOG for 2.7.28
* 2.7:
Using FQ name for PHP_VERSION_ID
[Form] Fix \IntlDateFormatter timezone parameter usage to bypass PHP bug #66323
Harden the debugging of Twig filters and functions
bumped Symfony version to 2.7.29
updated VERSION for 2.7.28
update CONTRIBUTORS for 2.7.28
updated CHANGELOG for 2.7.28
This PR was merged into the 3.3 branch.
Discussion
----------
[EventDispatcher] Handle laziness internally instead of relying on ClosureProxyArgument
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #22970
| License | MIT
| Doc PR | -
If we decide to go this way, we might drop ClosureProxyArgument entirely because we won't need it internally. I'll propose it in another PR for discussion if this one is accepted.
This PR allows "high-order" listeners, as `array(Closure, method)`. Closure is called to get the actual instance when needed only.
How does it look to you? (I'll add tests once confirmed)
Commits
-------
c17a009d66 [EventDispatcher] Handle laziness internally instead of relying on ClosureProxyArgument
This PR was merged into the 3.3 branch.
Discussion
----------
[FrameworkBundle] Fix CacheCollectorPass priority
| 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 | https://github.com/symfony/symfony/pull/22960#issuecomment-305460507
It was run before optimization, so child definitions were not resolved yet.
Commits
-------
28b253ab40 Fix CacheCollectorPass priority
This PR was merged into the 3.3 branch.
Discussion
----------
[Routing] Allow GET requests to be redirected. Fixes#23004
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #23004
| License | MIT
| Doc PR | NA
GET requests didn't get the same redirect treatment as HEAD requests. I've also added tests cases for all the different trailing/non-trailing slash situations.
Commits
-------
71d4e366a9 [Routing] Allow GET requests to be redirected. Fixes#23004
This PR was merged into the 2.7 branch.
Discussion
----------
[2.7][Form] Fix \IntlDateFormatter timezone parameter usage to bypass PHP bug #66323
| 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 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
The issue is documented here.
The current symfony code works when `intl.use_exception` is off. however, it's on on PHP 7+ and the issue is reproducible. See https://3v4l.org/PllP1 and https://3v4l.org/3XnKI
Commits
-------
f42c73f [Form] Fix \IntlDateFormatter timezone parameter usage to bypass PHP bug #66323
This PR was squashed before being merged into the 3.3 branch (closes#22965).
Discussion
----------
[Cache] Ignore missing annotations.php
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes (different in 3.2)
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!--highly recommended for new features-->
Avoids the following notices if cache is not warmed up (i.e. `cache:clear --no-warmup` > hit the browser).
```
Warning: include(<base-path>/app/cache/<env>/annotations.php): failed to open stream: No such file or directory
Warning: include(): Failed opening '<base-path>/app/cache/<env>/annotations.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php')
```
Commits
-------
e8f70c75b9 [Cache] Ignore missing annotations.php
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
This PR was merged into the 3.3 branch.
Discussion
----------
Better DI type deprecation message
| Q | A
| ------------- | ---
| Branch? | 3,3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #22951
| License | MIT
| Doc PR | n/a
This is the most common autowiring deprecation:
```php
public function __construct(UserPasswordEncoder $encoder)
```
You *should* type-hint `UserPasswordEncoderInterface`
Current deprecation message:
> Autowiring services based on the types they implement is deprecated since Symfony 3.3 and won’t be supported in version 4.0. You should rename (or alias) the "security.user_password_encoder.generic" service to "Symfony\Component\Security\Core\Encoder\UserPasswordEncoder" instead.
Updated message:
> Autowiring services based on the types they implement is deprecated since Symfony 3.3 and won't be supported in version 4.0. Try changing the type-hint for argument "$encoder" of method "AppBundle\Service\TestServiceSubscriber::__construct()" to "Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface" instead.
This only happens if we detect that there is a service/alias in the container (e.g. `...\UserPasswordEncoderInterface`) for the type-hint (`...\UserPasswordEncoder)`. Otherwise, if there is no correct type-hint in the container, we give the old recommendation (about aliasing).
The only complex case (of giving good directions on *where* to fix things) is with a class that implements `ServiceSubscriberInterface` (where the type-hint is in the `getSusbcribedServices()` method). In that case, the notice is:
> Autowiring services based on the types they implement is deprecated since Symfony 3.3 and won't be supported in version 4.0. Try changing the type-hint for "Symfony\Component\Security\Core\Encoder\UserPasswordEncoder" in "AppBundle\Service\TestServiceSubscriber" to "Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface" instead.
Commits
-------
a990d5c558 Improving deprecation message when hitting the "deprecated type" lookup, but an alias is available
This PR was merged into the 3.3 branch.
Discussion
----------
[Config] Allow empty globs
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #22950
| License | MIT
| Doc PR | -
This considers globs as valid even if they return no matches when they have a prefix (and when that prefix exists, according to `$ignoreErrors`).
This means there is an edge-case:
`*.abc` with at least one match is OK, but when it has no match, it falls back to regular import, then usually will fil.
But rewriting this to `./*.abc` resolves the ambiguity and turns this into a glob that won't fail if no matches are found.
This should provide the expected behavior in most cases (but ambiguous described one of course).
Commits
-------
c5b9c1a8c8 [Config] Allow empty globs
This PR was merged into the 3.3 branch.
Discussion
----------
[HttpKernel] Support unknown format in LoggerDataCollector
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #22952
| License | MIT
| Doc PR | ~
The new expected format for the compiler log is `CompilerPassClass: Message`. However, this is not enforced by the old logging method as seen in schmittjoh/JMSDiExtraBundle#276
This PR adds the ability to read those lines without crashing with `Uncaught Notice: Undefined offset: 1`.
Please note that I have not tested this in an application so testers are welcome to confirm this fix!
Commits
-------
a8dfbb1180 Support unknown compiler log format
This PR was merged into the 3.3 branch.
Discussion
----------
[DI] Don't throw Autowire exception for removed service with private __construct
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none (was talking to a user)
| License | MIT
| Doc PR | n/a
Suppose you have:
```php
class A
{
private function construct() {}
}
```
This service will fail to be autowired. But, like other autowiring failures, if this service will ultimately be removed from the container, this exception should be ignored. This fixes that. Unless someone is using the `AutowirePass` directly inside a `try/catch`, there is no BC break (the behavior change is that the exception is now stored, instead of being thrown).
This also clarifies (in the test & phpdoc) that `AutowirePass` always throws `AutowiringFailedException`s.
Thanks!
Commits
-------
2d3e44e11e Fixing a bug where an autowiring exception was thrown even when that service was removed
This PR was squashed before being merged into the 3.3 branch (closes#22968).
Discussion
----------
[Profiler] Fix text selection & click on file links on exception pages
| Q | A
| ------------- | ---
| Branch? | 3.3 <!-- see comment below -->
| 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 | #22957, #22978 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
I don't really know the purpose of this css rule here, but I admit it's quite frustrating not to be able to select something here.
This PR also prevents the following annoying behavior (selecting text collapses/uncollapses traces):
![mai-30-2017 18-26-29](https://cloud.githubusercontent.com/assets/2211145/26593977/3afbc510-4566-11e7-9114-8934ba6126a2.gif)
About the trick used, I think the browser support is safe enough: https://caniuse.com/#search=window.getSelection
EDIT: new commit added which allows to fix#22978
Commits
-------
8618399e42 [Profiler] Fix clicking on links inside toggle
ff6151b15f [Profiler] Fix text selection on exception pages
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:
[Console] ChoiceQuestion must have choices
[Filesystem] improve error handling in lock()
[FrameworkBundle][Console] Fix the override of a command registered by the kernel
* 3.3:
[Console] ChoiceQuestion must have choices
[Filesystem] improve error handling in lock()
[FrameworkBundle][Console] Fix the override of a command registered by the kernel
* 3.2:
[Console] ChoiceQuestion must have choices
[Filesystem] improve error handling in lock()
[FrameworkBundle][Console] Fix the override of a command registered by the kernel
* 2.8:
[Console] ChoiceQuestion must have choices
[Filesystem] improve error handling in lock()
[FrameworkBundle][Console] Fix the override of a command registered by the kernel
* 2.7:
[Console] ChoiceQuestion must have choices
[Filesystem] improve error handling in lock()
[FrameworkBundle][Console] Fix the override of a command registered by the kernel
This PR was squashed before being merged into the 2.7 branch (closes#22847).
Discussion
----------
[Console] ChoiceQuestion must have choices
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #22842
| License | MIT
| Doc PR | symfony/symfony-docs#... <!--highly recommended for new features-->
<!--
![image](https://cloud.githubusercontent.com/assets/1047696/26301309/1bfa52ca-3ee1-11e7-883b-f627f16e9d2f.png)
-->
Commits
-------
96e307fd5c [Console] ChoiceQuestion must have choices
This PR was merged into the 2.7 branch.
Discussion
----------
[FrameworkBundle][Console] Fix the override of a command registered by the kernel
| 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 | #18558 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | <!--highly recommended for new features-->
<!--
- 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 3.4,
legacy code removals go to 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.
-->
Fix the override of a command registered by the kernel
Commits
-------
3e6643bd90 [FrameworkBundle][Console] Fix the override of a command registered by the kernel
This PR was merged into the 4.0-dev branch.
Discussion
----------
Revert "bug #22925 [PhpUnitBridge] Adjust PHPUnit class_alias check
This reverts commit cfb090d1c5, reversing
changes made to 4e8f403a7c.
| 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 | -
PR #22925 made the bridge fail with:
> Fatal error: Declaration of Symfony\Bridge\PhpUnit\SymfonyTestsListener::addSkippedTest() must be compatible with that of PHPUnit_Framework_TestListener::addSkippedTest() in /home/travis/build/symfony/symfony/vendor/symfony/phpunit-bridge/SymfonyTestsListener.php on line 32
See https://travis-ci.org/symfony/symfony/builds/236863221 on 3.3
and https://travis-ci.org/symfony/symfony/builds/236863238 on 3.4
Commits
-------
934c0c0 Revert "bug #22925 [PhpUnitBridge] Adjust PHPUnit class_alias check to also check for namespaced class (GawainLynch)"
* 3.4:
typo
Fixed options stub values display in form profiler
[Console] Fix tests
Make the simple exception pages match the new style
[Console] Fixed different behaviour of key and value user inputs in multiple choice question
Adjust PHPUnit class_alias check to also check for namespaced class
[Cache] Dont use pipelining with RedisCluster
[Yaml] fix colon without space deprecation
[Intl] Fix intl tests for PHP < 5.5.10
* 3.3:
typo
Fixed options stub values display in form profiler
[Console] Fix tests
Make the simple exception pages match the new style
[Console] Fixed different behaviour of key and value user inputs in multiple choice question
Adjust PHPUnit class_alias check to also check for namespaced class
[Cache] Dont use pipelining with RedisCluster
[Yaml] fix colon without space deprecation
[Intl] Fix intl tests for PHP < 5.5.10
* 3.2:
typo
[Console] Fix tests
[Console] Fixed different behaviour of key and value user inputs in multiple choice question
[Cache] Dont use pipelining with RedisCluster
[Yaml] fix colon without space deprecation
[Intl] Fix intl tests for PHP < 5.5.10
This PR was merged into the 3.2 branch.
Discussion
----------
[Cache] Dont use pipelining with RedisCluster
| Q | A
| ------------- | ---
| Branch? | 3.é
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #22922
| License | MIT
| Doc PR | -
phpredis doesn't support pipelining with RedisCluster
see https://github.com/phpredis/phpredis/blob/develop/cluster.markdown#pipelining
and multiple operations (MSET/MGET) work but only "per-shard".
We have to fetch keys one by one for now at least.
Commits
-------
eb93ac9 [Cache] Dont use pipelining with RedisCluster
This PR was squashed before being merged into the 2.7 branch (closes#22718).
Discussion
----------
[Console] Fixed different behaviour of key and value user inputs in multiple choice question
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #22706
| License | MIT
| Doc PR | -
Fixed a bug when value from multiple choice list could not be selected by user's input
while it could be selected by typing its index in the list.
Commits
-------
2861bd7b01 [Console] Fixed different behaviour of key and value user inputs in multiple choice question
This PR was merged into the 3.3 branch.
Discussion
----------
[FrameworkBundle][Validator] Move the PSR-11 factory to the component
| Q | A
| ------------- | ---
| Branch? | 3.3 <!-- see comment below -->
| Bug fix? | no
| New feature? | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks? | no
| Deprecations? | yes <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/22887#issuecomment-303765795 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
Instead of the 3 following deprecations:
* The `ConstraintValidatorFactory::$validators` and `$container` properties
have been deprecated and will be removed in 4.0.
* Extending `ConstraintValidatorFactory` is deprecated and won't be supported in 4.0.
* Passing an array of validators or validator aliases as the second argument of
`ConstraintValidatorFactory::__construct()` is deprecated since 3.3 and will
be removed in 4.0. Use the service locator instead.
I'd suggest simply deprecating the FrameworkBundle's class in favor of using a new `ContainerConstraintValidatorFactory`. To me, there is no reason anyone using the validator component without the framework bundle cannot use this PSR-11 compliant implementation, nor I see a reason to make it final.
Commits
-------
68c1917af9 [FrameworkBundle][Validator] Move the PSR-11 factory to the component