This PR was squashed before being merged into the 2.6-dev branch (closes#10698).
Discussion
----------
[Security] Added a REMOTE_USER based listener to security firewalls
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | /
| License | MIT
| Doc PR | symfony/symfony-docs#3912
TODO
- [x] submit changes to the documentation
I've seen myself implementing a few times a REMOTE_USER based authentication listener, as a large part of security modules for Apache (Kerberos, CAS, and more) are providing the username via an environment variable.
So I thought this could benefit the whole community if directly included in the framework. It is very similar to the X509AuthenticationListener, and basing the RemoteUserAuthenticationListener on the AbstractPreAuthenticatedListener is relevant and very convenient.
Using the X509AuthenticationListener could be possible, but it is confusing to use it directly when your authentication is not certificate based.
Please let me know if I need to update anything.
Regards
Commits
-------
a2872f2 [Security] Added a REMOTE_USER based listener to security firewalls
This PR was squashed before being merged into the 2.6-dev branch (closes#11183).
Discussion
----------
[Security] add an AbstractVoter implementation
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/4257
The idea is to reduce boilerplate required to create custom Voter, doing most of the work for the developer and guiding him on the path by providing simple requirements via abstract methods that will be called by the AbstractVoter.
P.S. This is meant to be a [DX Initiative](https://github.com/symfony/symfony/issues?labels=DX&state=open) improvement.
Commits
-------
d3bafc6 [Security] add an AbstractVoter implementation
This PR was submitted for the 2.5 branch but it was merged into the 2.6-dev branch instead (closes#11992).
Discussion
----------
[Console][Command][LogicException] The command name cannot be empty. #11991
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #11991
| License | MIT
| Doc PR | #11991
Commits
-------
7d6fbd9 [Console][Command][LogicException] The command name cannot be empty. #11991
This PR was merged into the 2.6-dev branch.
Discussion
----------
[Form] Add allow_html5 option to date and time FormType to disable HTML5 input type
[Form] added allow_html5 option to date and time FormType to disable HTML5 input type when widget is set to single_text
| Q | A
| --------------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #6927#7123
| License | MIT
| Doc PR |
With this little patch we can have a single text widget without HTML5 date input type which is required when using some javascript date or time picker .
Commits
-------
392d6c7 add allow_html5 option to date and time FormType to disable HTML5 date input when widget is set to single_text
* 2.5:
typo fixed in AbstractProcessTest (getoutput() => getOutput())
Avoid question mark and asterisk in folder names to prevent windows filesystem issues.
[Translation] [Config] Clear libxml errors after parsing XML file
check for the Validator if forms are enabled
Clear json_last_error
Fix JsonSerializable namespace
Catch exceptions to restore the error handler
[HttpFoundation] Silent only JSON errors
* 2.4:
typo fixed in AbstractProcessTest (getoutput() => getOutput())
Avoid question mark and asterisk in folder names to prevent windows filesystem issues.
[Translation] [Config] Clear libxml errors after parsing XML file
* 2.3:
typo fixed in AbstractProcessTest (getoutput() => getOutput())
Avoid question mark and asterisk in folder names to prevent windows filesystem issues.
[Translation] [Config] Clear libxml errors after parsing XML file
Conflicts:
src/Symfony/Component/Config/Util/XmlUtils.php
This PR was merged into the 2.3 branch.
Discussion
----------
[Finder][Urgent] Remove asterisk and question mark from folder name in test to prevent windows file system issues.
Bugfix: Yes
Fixed tickets: #11984 , #11985
Related tickets: #11970
Commit #11970 prevented Symphony from being checked out via windows due to invalid characters in a folder name within the tests.
The issue was reported in #11984 and was attempted to be fixed in #11985 but wasn't due to still including the question mark.
Please accept this ASAP as it entirely breaks any composer that relies on it.
Commits
-------
5fbb278 Avoid question mark and asterisk in folder names to prevent windows filesystem issues.
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes#11986).
Discussion
----------
typo fixed in AbstractProcessTest (getoutput() => getOutput())
Commits
-------
36998bb typo fixed in AbstractProcessTest (getoutput() => getOutput())
This PR was merged into the 2.3 branch.
Discussion
----------
[Translation] [Config] Clear libxml errors after parsing xliff file
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
If libxml_use_internal_errors is set to `true` before parsing xliff file, the libxml errors are not cleared correctly. An error `Validation failed: no DTD found !` occurs in libxml errors after parsing and it's available outside the xliff parser (can break other functionality that use `libxml_get_errors` function).
Commits
-------
fab61ef [Translation] [Config] Clear libxml errors after parsing XML file
A previous commit introduced a folder with a question mark and an asterisk which are invalid NTFS folder name characters and prevented checkout on those systems.
This PR was merged into the 2.5 branch.
Discussion
----------
[FrameworkBundle] check if the Validator component is present when forms are enabled
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
The `Symfony\Component\Validator\Validation` class is used in the
`FrameworkExtension` class. Therefore, it is required to have the
Validator component installed in production as well but not only when
being in a development environment.
Commits
-------
ed41da1 check for the Validator if forms are enabled
When the Form component is enabled, the container extension class
automatically enables the Validator component which therefore has to
be enabled. The container extension now throws an exception when forms
are enabled, but the Validator component is not present.
This PR was squashed before being merged into the 2.6-dev branch (closes#11078).
Discussion
----------
[WIP] [TwigBundle] [Exception] Make return value similar to error.json.twig
| Q | A
| ------------- | ---
| Bug fix? | I guess this is a bug
| New feature? | The exception structure changes for the default
| BC breaks? | The exception structure changes for the default
| Deprecations? | [yes|no]
| Tests pass? | [yes|no]
| Fixed tickets |
| License | MIT
| Doc PR |
The result for `error.json.twig` and `exception.json.twig` differ making the client forced to check for it's result.
We think the structure should be the same to make the ie a javascript client try to respond similar for --env=dev|prod
Commits
-------
4a59f98 [WIP] [TwigBundle] [Exception] Make return value similar to error.json.twig
This PR was submitted for the master branch but it was merged into the 2.5 branch instead (closes#11418).
Discussion
----------
[JsonResponse] Silent only JSON errors
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | maybe
| Fixed tickets | #11415
| License | MIT
| Doc PR | n/a
Commits
-------
6d6a3af Clear json_last_error
ef91f71 Fix JsonSerializable namespace
d952f90 Catch exceptions to restore the error handler
ddf95c7 [HttpFoundation] Silent only JSON errors
This PR was merged into the 2.6-dev branch.
Discussion
----------
[Filesystem] Check number of bytes copied.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10838
| License | MIT
| Doc PR | n/a
This only test local files (because of `filesize`), wonder if we should include the remote files using `get_headers` in order to get the Content-length for example. However, it will perform an additional request...
Here's a little benchmark for 500 copy from a remote origin file :
- Standard without check -> Time: 47.34 seconds, Memory: 3.75Mb
- Check with `get_headers` ->Time: 1.32 minutes, Memory: 3.75Mb
Commits
-------
81eca38 [Filesystem] Check number of bytes copied.
This PR was merged into the 2.6-dev branch.
Discussion
----------
[DependencyInjection] Added exception to avoid fatal during compile in a frozen dumped container
Q | A
------------- | ------------- | -----
Bug fix? | yes
New feature? | no
BC breaks? | no
Deprecations? | no
Tests pass? | yes
Fixed tickets | #10428
License | MIT
Doc PR | N/A
Commits
-------
2356eaa [DependencyInjection] Added exception to avoid fatal during compile in a frozen dumped container
* 2.5:
[2.3] Add missing development dependencies
Fix @return docs on HttpCache::restoreResponseBody()
[Finder] Escape location for regex searches
Make sure HttpCache is a trusted proxy
Conflicts:
src/Symfony/Component/Form/composer.json
* 2.4:
[2.3] Add missing development dependencies
Fix @return docs on HttpCache::restoreResponseBody()
[Finder] Escape location for regex searches
Make sure HttpCache is a trusted proxy
* 2.3:
[2.3] Add missing development dependencies
Fix @return docs on HttpCache::restoreResponseBody()
[Finder] Escape location for regex searches
Make sure HttpCache is a trusted proxy
Conflicts:
src/Symfony/Bridge/Doctrine/composer.json
src/Symfony/Bundle/FrameworkBundle/composer.json
src/Symfony/Bundle/SecurityBundle/composer.json
src/Symfony/Component/Form/composer.json
This PR was squashed before being merged into the 2.3 branch (closes#11340).
Discussion
----------
[2.3] Add missing development dependencies
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
I've also added a run of the test suite in every component scope.
Commits
-------
3b02af9 [2.3] Add missing development dependencies
This PR was squashed before being merged into the 2.6-dev branch (closes#11312).
Discussion
----------
Make assets:install smarter with symlinks
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | -
| Fixed tickets | #11297
| License | MIT
| Doc PR | -
Commits
-------
6537333 Make assets:install smarter with symlinks
This PR was merged into the 2.6-dev branch.
Discussion
----------
[Console] add overwrite flag to ProgressBar helper to allow non-decorated output
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | yes, but not critical
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #11542, #10011
| License | MIT
| Doc PR | symfony/symfony-docs#4206
By default, the `ProgressBar` helper overwrites the output to give the nice progress bar look. To prevent the output from blowing up in non-decorated environments, the output was hidden in these environments (see #9846).
This PR enables using the `ProgressBar` in non-decorated environments by adding an `overwrite` flag. When `false`, instead of overwriting the bar, it is rendered on a new line. To prevent flooding the output, you can adjust the `redrawFrequency`.
By default, when using the `ProgressBar` in a non-decorated environment, the `overwrite` flag is set to false. If a `max` is set, the `redrawFrequency` is set to a sensible default (10% of the max). If a `max` isn't set, the bar is output for every advance so to prevent flooding, a sensible `redrawFrequency` should be manually set.
The only BC break is that output will now display where it didn't before.
Commits
-------
cdee6f6 add overwrite flag to allow non-decorated output
This PR was merged into the 2.3 branch.
Discussion
----------
[HttpKernel] Make sure HttpCache is a trusted proxy
| Q | A
| ------------- | ---
| Bug fix? | yes (of sorts)
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9292
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/4239Fixes#9292 by adding `127.0.0.1` as a trusted proxy when using `HttpCache` (assuming it hasn't been already).
Commits
-------
ca65362 Make sure HttpCache is a trusted proxy
This PR was merged into the 2.6-dev branch.
Discussion
----------
[FrameworkBundle] Added link on server:* commands
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
ce62ccf [FrameworkBundle] Added link on server:* commands
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes#11981).
Discussion
----------
Fix @return docs on HttpCache::restoreResponseBody()
Commits
-------
37dc57b Fix @return docs on HttpCache::restoreResponseBody()
This PR was squashed before being merged into the 2.3 branch (closes#11970).
Discussion
----------
[Finder] Escape location for regex searches
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
If the location to start searching in contains a regex special char
like + or ? and the path restriction is a regular expresion with a start
limitation. No results will be found wtih at least GnuFindAdapter - e.g.:
```
use Symfony\Component\Finder\Finder;
use Symfony\Component\Finder\Adapter;
mkdir('/tmp/reg+ex/dir/subdir', 0777, true);
$finder = Finder::create()
->removeAdapters()
->addAdapter(new Adapter\GnuFindAdapter());
$finder->in('/tmp/reg+ex')->path('/^dir/');
print count($finder)."\n";
```
Expected result: 2
Actual result is: 0
This pull request consists of:
* a new test checking for this bug (0e81086a49425d0e12cff4f479fabeb97e9ed757)
* the actual fix (6595b6b2b71afc57ef08686b4584713c0e4e48ed)
* changes to comply with the coding standard (7f199c5b53b3c1f38b36dcc286d3b20ae877425b)
## How to reproduce
### Fastest way
1. Move or copy your local symfony clone into a location containing special regex chars:
* `mv symfony symfony+regex`
2. Run tests in there
* `cd symfony+regex && phpunit`
> Result: Some tests in the finder component will fail.
### Alternative: A new clone
1. Clone symfony in a directory containing at least one regex special char
* `git clone https://github.com/symfony/symfony.git /tmp/symfony+regexchar`
2. As usual get composer, install dependencies and get phpunit
* You might simply want to follow [this guide](http://symfony.com/doc/current/contributing/code/tests.html)
3. Run tests in there
* `cd /tmp/symfony+regexchar && phpunit`
> Result: Some tests in the finder component will fail.
### Alternative: Apply the new test
1. Apply commit a29d1207ced2949c918357cf271200523960caef to your symfony clone
2. Run tests
> Result: The new test will fail.
Commits
-------
b63926b [Finder] Escape location for regex searches