This PR was merged into the 2.7 branch.
Discussion
----------
[appveyor] Fix cache handling
| 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 noticed that the cache for the c:\php dir was almost always skipped. After looking more carefully at appveyor's doc, there is only one cache for all branches/PRs.
Which means we can't have variations for cached items in the same way we have on travis.
Thus, we can only cache things that are the same across all branches. Namely our phpunit wrapper and composer.phar.
Commits
-------
fb828d7 [appveyor] Fix cache handling
* 3.1:
[travis] fix after box updates
Console: Fix indentation of Help: section of txt usage help
[Intl] Update ICU data to 57.1
[Config] Improved test
Added class existence check if is_subclass_of() fails in compiler passes
* 2.8:
[travis] fix after box updates
Console: Fix indentation of Help: section of txt usage help
[Intl] Update ICU data to 57.1
[Config] Improved test
Added class existence check if is_subclass_of() fails in compiler passes
* 2.7:
[travis] fix after box updates
Console: Fix indentation of Help: section of txt usage help
[Intl] Update ICU data to 57.1
[Config] Improved test
Added class existence check if is_subclass_of() fails in compiler passes
This PR was squashed before being merged into the 3.2-dev branch (closes#19511).
Discussion
----------
Use a dedicated exception in the file locator
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This PR adds a dedicated `FileLocatorFileNotFoundException` class to the file locator, so it is possible to catch file locator exceptions separately from invalid argument exceptions.
```php
try {
foreach ($container->get('file_locator')->locate('file.php', null, false) as $file) {
include $file;
}
} catch (\InvalidArgumentException $e) {
// this will catch both file locator exceptions as well as
// any invalid argument exception thrown in an included file
}
```
With the dedicated exceptions, we could do this:
```php
try {
foreach ($container->get('file_locator')->locate('file.php', null, false) as $file) {
include $file;
}
} catch (FileLocatorFileNotFoundException $e) {
// this will only ignore file locator exceptions
}
```
Commits
-------
ee4adaa Use a dedicated exception in the file locator
This PR was squashed before being merged into the 3.2-dev branch (closes#19529).
Discussion
----------
Add Yaml::PARSE_EXCEPTION_ON_DUPLICATE to throw exceptions on duplicates
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/19526
| License | MIT
| Doc PR |
Commits
-------
cb362f2 Add Yaml::PARSE_EXCEPTION_ON_DUPLICATE to throw exceptions on duplicates
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Security] Expose the required roles in AccessDeniedException
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Nowadays it is more and more common to protect some sensitive actions and part of a website using 2FA or some re-authentication mechanism (per example, on Github you have to enter your password again when you add an ssh key). But currently, in Symfony, it is really hard to implement without having to duplicate the logic, provide an explicit list of URLs to protect or hack into the security component.
A good way to achieve that would be to add a special role (like IS_AUTHENTICATED_FULLY) and use it in the access map. But it requires us to be able to have a custom logic in an ExceptionListener depending on the roles behind an AccessDeniedException.
With this patch we could write an ExceptionListener of this kind (a similar logic could also be used in an AccessDeniedHandler):
```php
public function onKernelException(GetResponseForExceptionEvent $event)
{
$exception = $event->getException();
do {
if ($exception instanceof AccessDeniedException) {
foreach ($exception->getAttributes() as $role) {
if ($role === 'IS_AUTHENTICATED_2FA' && !$this->accessDecisionManager->decide($this->tokenStorage->getToken(), $role, $exception->getObject())) {
// Start 2FA
}
}
}
} while (null !== $exception = $exception->getPrevious());
}
```
Replaces #18661
Commits
-------
6618c18 [Security] Expose the required roles in AccessDeniedException
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes#19561).
Discussion
----------
[Console] Fix indentation of Help: section of txt usage help
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
I noticed that all of the sections output by `TextDescriptor` (*Usage*, *Arguments*, *Options*, *Available commands*, &c.) are indented by 2 spaces, except for the *Help* section, which is indented by only 1 space:
<img width="1039" alt="screen shot 2016-08-07 at 08 53 53" src="https://cloud.githubusercontent.com/assets/122095/17462818/34c99cfc-5c7e-11e6-9674-9324c537fc01.png">
This PR makes the indentation consistent with the other sections. (I don't *think* that qualifies as a BC break?)
Commits
-------
4e4c674 Console: Fix indentation of Help: section of txt usage help
This PR was squashed before being merged into the 2.7 branch (closes#19468).
Discussion
----------
[Intl] Update ICU data to 57.1
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19315
| License | MIT
| Doc PR | -
I think the only thing that makes sense with ICU is to always be on the latest available version.
Commits
-------
a48c00b [Intl] Update ICU data to 57.1
This PR was merged into the 2.7 branch.
Discussion
----------
[Config] Improved test
| 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
-------
456d53a [Config] Improved test
This PR was merged into the 2.7 branch.
Discussion
----------
Added class existence check if is_subclass_of() fails in compiler passes
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | comma-separated list of tickets fixed by the PR, if any
| License | MIT
| Doc PR | no
Backport of #19342 to 2.7 branch
Commits
-------
77adea7 Added class existence check if is_subclass_of() fails in compiler passes
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Cache] Add generic TagAwareAdapter wrapper (replaces TagAwareRedisAdapter)
| Q | A
| ------------- | ---
| Branch? | master
| 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/6858
This PR replaces TagAwareRedisAdapter introduced in #19047 by a generic `TagAwareAdapter` that works with any two adapters.
Commits
-------
288308b [Cache] Add generic TagAwareAdapter wrapper (replaces TagAwareRedisAdapter)
* 3.1:
[Routing] Reorder assert parameters
[Cache] Use SCAN instead of KEYS with Redis >= 2.8
Added missing czech validators translation of not expected charset
Improved deprecation message
Workaround another buggy PHP warning
Add czech translation for Url and Length validator
Add slovak translation for Url and Length validator
This PR was merged into the 3.1 branch.
Discussion
----------
[Cache] Use SCAN instead of KEYS with Redis >= 2.8
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
With #19521 coming, clearing cache keys by prefix is going to be used a lot more often.
Time to fix Redis cache clearing.
Commits
-------
aadeb11 [Cache] Use SCAN instead of KEYS with Redis >= 2.8
This PR was merged into the 2.7 branch.
Discussion
----------
[Routing] Reorder assert parameters
| 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 |
The expected value must be the first parameter.
Commits
-------
7f88796 [Routing] Reorder assert parameters
This PR was merged into the 3.1 branch.
Discussion
----------
[DX] Improved YAML deprecation message
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no
| Fixed tickets | -
| License | MIT
| Doc PR | -
This eases the upgrade as it shows you which strings you need to update.
Commits
-------
3e16ef8 Improved deprecation message
This PR was merged into the 2.7 branch.
Discussion
----------
Added missing czech validators translation of not expected charset
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Profiler was complaining about using a not translated message so I translated it.
Not sure if bug or feature. The bug label is probably not apropriate, sorry. But I guess it should be merged to all versions.
Commits
-------
7eacae8 Added missing czech validators translation of not expected charset
This PR was merged into the 2.7 branch.
Discussion
----------
Workaround another buggy PHP warning
| 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 |
Added error-suppression to the `is_executable($path)` call, too, per the bug noted just above.
The cited issue manifests as such without it:
```
ErrorException in ExecutableFinder.php line 63:
is_executable(): open_basedir restriction in effect. File(/usr/share/php) is not within the allowed path(s): (/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/usr/local/zend/var/zray/extensions:/usr/local/zend/share:/usr/local/zend/var/plugins)
```
Commits
-------
4348f4b Workaround another buggy PHP warning
This PR was merged into the 3.1 branch.
Discussion
----------
[Cache] Skip tests that sleep() but can't be clock-mocked
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Skip tests that require real calls to `sleep()`: they slow down the test suite too much and don't test much.
`@group time-sensitive` tests will run these test cases just fine, but they can't be used on tests that use an external source for time, i.e. for redis or apcu.
Commits
-------
d476725 [Cache] Skip tests that sleep() but can't be clock-mocked
* 3.1:
Relax 1 test failing with latest PHP versions
bumped Symfony version to 2.8.10
[Cache] Minor cleanup
Remove usage of __CLASS__ outside of a class
[HttpKernel] Fix variable conflicting name
[Process] Fix double-fread() when reading unix pipes
[Process] Fix AbstractPipes::write() for a situation seen on HHVM (at least)
[Validator] Fix dockblock typehint in XmlFileLoader
bumped Symfony version to 3.1.4
updated VERSION for 3.1.3
updated CHANGELOG for 3.1.3
bumped Symfony version to 2.8.10
updated VERSION for 2.8.9
updated CHANGELOG for 2.8.9
bumped Symfony version to 2.7.17
updated VERSION for 2.7.16
update CONTRIBUTORS for 2.7.16
updated CHANGELOG for 2.7.16
Conflicts:
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
src/Symfony/Component/HttpKernel/Kernel.php
This PR was merged into the 3.1 branch.
Discussion
----------
[Cache] Minor cleanup
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
34d9518 [Cache] Minor cleanup