This PR was merged into the 2.8 branch.
Discussion
----------
Catch \Throwable
| Q | A
| ------------- | ---
| Branch? | 2.8, 3.0
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | Mostly!
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
The first commit is based on symfony/symfony#15949
Depends on symfony/symfony#18813, symfony/symfony#18812
----
I'm new to symfony, so I'm not sure where are all the places where it makes sense to actually catch the throwable and where not. I added most places that seemed logical and when I wasn't sure, I added it anyway. I'm hoping you guys (and girls?) can point out the places where the catch should not be added, I'll fix it and then I can create several PR's for the older branches. A lot of this IMHO should go also to 3.0.
Commits
-------
de671f4 Catch \Throwable
This PR was merged into the 3.2-dev branch.
Discussion
----------
Added people - person singularization
| Q | A
| ------------- | ---
| Branch? | 3.0, this 'bug' is present even in older versions
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Proper singularization for people into person. This change does not affect singularization of persons.
Commits
-------
5bc4b36 Added people - person inflection
This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes#18839).
Discussion
----------
People - person singularization
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Bugfix for version 2.8 - more information [#18824]
Commits
-------
02070f9 People - person singularization
This PR was merged into the 3.1 branch.
Discussion
----------
[Config] Allow schemed paths in FileResource
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #17598
| License | MIT
| Doc PR | -
This is a small new feature fixing a BC break that has been introduced in #17598 on 3.1.
It happens that 3.1 is breaking a `phar` app on our side where we end up doing something like `new FileResource('phar://...')`.
Ping @xabbuh and @javiereguiluz esp.
Commits
-------
c73f34d [Config] Allow schemed path in FileResource
This PR was merged into the 2.3 branch.
Discussion
----------
[Yaml] chomp newlines only at the end of YAML documents
| Q | A
| ------------- | ---
| Branch? | 2.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18784
| License | MIT
| Doc PR |
Commits
-------
a4b1fa6 chomp newlines only at the end of YAML documents
This PR was merged into the 2.7 branch.
Discussion
----------
[Serializer] Add test for ignored attributes during denormalization
| 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
Commits
-------
c2f7fed [Serializer] Add test for ignored attributes during denormalization
This PR was submitted for the 2.8 branch but it was merged into the 2.7 branch instead (closes#18814).
Discussion
----------
Fixed server status command when port has been omitted
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18810
| License | MIT
| Doc PR | -
Modified the status command to behave exactly as the server:start command. When the port is omitted in the address argument the default port is added from the port option.
Commits
-------
94e4706 Fixed server status command when port has been omitted
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes#18772).
Discussion
----------
Update UPGRADE FROM 2.x to 3.0
| Q | A
| ------------- | ---
| Branch? | "master"
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | deprecated in 2.7 removed in 3.0
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
| Doc PR | http://symfony.com/doc/2.8/reference/forms/types/text.html for starters
You missed the Form max_length option deprecation in several field types (Text, Password, Email, etc...).
Commits
-------
cd66a45 Update UPGRADE FROM 2.x to 3.0
This PR was submitted for the master branch but it was merged into the 3.0 branch instead (closes#18682).
Discussion
----------
[DependencyInjection] Avoid generating call_user_func in more cases
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
This is a follow up to #9807 to add the PHP 5.4 only coded I excluded when I split it off #9432.
Commits
-------
2718a6c [DependencyInjection] Avoid generating call_user_func in more cases
This PR was squashed before being merged into the 3.0 branch (closes#18759).
Discussion
----------
[Validator] Support for DateTimeImmutable
| Q | A
| ------------- | ---
| Branch? | 3.0
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18752
| License | MIT
| Doc PR |
When validating with DateTime constraint UnexpectedTypeException is thrown for DateTimeImmutable instances.
Why PR?
- DateTimeImmutable behaves like a DateTime. Both implements the same interface DateTimeInterface.
- DateTimeInterface cannot be implemented by the client.
Commits
-------
f49659f [Validator] Support for DateTimeImmutable
This PR was merged into the 2.8 branch.
Discussion
----------
[DX][DependencyInjection] Make Autowiring exceptions more future friendly
| Q | A
| ------------- | ---
| Branch? | 2.8, 3.0
| Bug fix? | no (forward compatibility)
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
This is a follow-up on #18766 (3.1, master) and #18691 (2.8, 3.0).
This PR changes the exception messages to the ones introduced in #18766 and #17877. I also unified the tests so they are exactly the same.
This way the error messages will be the same in 2.8 onward.
Commits
-------
834f550 [DX][DI] Make Autowiring exceptions more future friendly
This PR was merged into the 2.7 branch.
Discussion
----------
Use levenshtein level for better Bundle matching
| 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 targetted 2.7 branch since this was introduced in the 2.6 version but the 2.6 isn't maintain anymore._
**TL;DR:** I found unused code in bad bundle exception when Symfony try to find the best bundle to fix the typo. Should we remove that code (and got a potential lower matching bundle name) or keep it and make it work?
-----
I've noticed that a part of the code wasn't used when determining which bundle typo was written on _bad bundle exception_, from https://github.com/symfony/symfony/pull/11210.
```php
$alternative = null;
$shortest = null;
foreach ($bundleNames as $bundleName) {
// if there's a partial match, return it immediately
if (false !== strpos($bundleName, $nonExistentBundleName)) {
return $bundleName;
}
$lev = levenshtein($nonExistentBundleName, $bundleName);
if ($lev <= strlen($nonExistentBundleName) / 3 && ($alternative === null || $lev < $shortest)) {
$alternative = $bundleName;
}
}
```
In this snippet, the `$shortest` wasn't update in the `foreach`. Reading the code, I guess it was supposed to add an even better accuracy when multiple bundle matche the typo'd bundle name.
Which mean when an alternative is found, we have to assign the level `$lev` from that match to `$shortest`.
```php
if ($lev <= strlen($nonExistentBundleName) / 3 && ($alternative === null || $lev < $shortest)) {
$alternative = $bundleName;
$shortest = $lev;
}
```
Let say you have these bundles: `FoooooBundle` and `FooBundle` and you request the bundle `FoodBundle`.
- Without `$shortest` updated, you'll got a suggestion with `FoooooBundle` (first matching bundle found)
- With `$shortest` upadted, you'll got a suggestion with `FooBundle` (because it has a better level than `FoooooBundle`)
This isn't a _bug fix_ since this is only supposed to help developper but not the final user.
**Question is**: should we keep that level comparison or just remove it?
Commits
-------
ac7f74e Use levenshtein level for better Bundle matching
This PR was submitted for the master branch but it was merged into the 3.1 branch instead (closes#18792).
Discussion
----------
[Cache] Rename nonce to version
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony-docs/pull/6515#discussion_r63296493
| License | MIT
| Doc PR | -
ping @javiereguiluz
Commits
-------
0c8358b [Cache] Rename nonce to version
This PR was merged into the 2.7 branch.
Discussion
----------
[2.7][WebProfilerBundle] Fix CORS ajax security issues
| 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
The WebProfiler toolbar monitors ajax requests. However, when using cross domain ajax requests, it triggers a security issues `Refused to get unsafe header "X-Debug-Token"` `Refused to get unsafe header "X-Debug-Token-Link"` because if the other app is not a Symfony App configured to expose these headers in CORS.
![image](https://cloud.githubusercontent.com/assets/137574/14225799/f462c09c-f8cf-11e5-925d-88be99945a92.png)
This fixes the issue. It adds a new configuration node to explicitly activate it on purpose.
Commits
-------
f8dd87d [WebProfilerBundle] Fix CORS ajax security issues
This PR was merged into the 3.0 branch.
Discussion
----------
[Console] remove methods that were needed for PHP 5.3
| Q | A
| ------------- | ---
| Branch? | 3.0
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
7d9e74e remove methods that were needed for PHP 5.3
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Yaml] Allow using _ in some numeric notations
| Q | A
| ------------- | ---
| Branch | master
| Bug fix? | no ?
| New feature? | yes ?
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18094
| License | MIT
| Doc PR | ~
Allows to use the `_` to group "big" ints, as suggested in the yaml integer type specification. As discussed in #18094, we should check if it is still part of the 1.2 specification, but I don't really see why not ? I can't see anywhere anything saying it is not valid anymore... as there are links to these types in some other specs.
This is #18096, but targetted on master as this is considered as a new feature. I also support the dump of such values as only strings. I think I should change how it is dumped thoug, and use the escape filter instead though (as I was misusing the data provider and it provided strange results at the time)
Commits
-------
e6da11c [Yaml] Allow using _ in some numeric notations
This PR was merged into the 3.1-dev branch.
Discussion
----------
[Ldap] Added the possibility to configure all available Ldap options for connection
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18448
| License | MIT
| Doc PR |
This PR lets a user configure [all documented Ldap options](http://php.net/manual/fr/function.ldap-get-option.php), as well as a few undocumented ones (back-ported from the [OpenLdap C library](http://linux.die.net/man/3/ldap_set_option), as well as the [Ldap client specification](https://www.ietf.org/proceedings/50/I-D/ldapext-ldap-c-api-05.txt)).
Commits
-------
a8bae31 Added the possibility to configure all Ldap options for connection