Commit Graph

16423 Commits

Author SHA1 Message Date
Eric GELOEN ea4ae74011 [Form][DateTime] Propagate invalid_message & invalid_message parameters to date & time sub widgets 2014-09-25 15:00:50 +02:00
Fabien Potencier 87123f6e1d minor #12015 [Validator] Simplified testing of violations (webmozart)
This PR was merged into the 2.3 branch.

Discussion
----------

[Validator] Simplified testing of violations

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

I simplified the assertion of violations in preparation of a replacement PR for #7276.

Commits
-------

8e5537b [Validator] Simplified testing of violations
2014-09-25 11:38:09 +02:00
Fabien Potencier b2524d4988 minor #12033 [Form] Removed constructor argument from FormTypeHttpFoundationExtension for forward compatibility with 2.5 (webmozart)
This PR was merged into the 2.3 branch.

Discussion
----------

[Form] Removed constructor argument from FormTypeHttpFoundationExtension for forward compatibility with 2.5

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

This argument was introduced in #11924. No release was made of the 2.3 branch after merging that PR.

Since a different constructor argument (`$requestHandler`) was added to FormTypeHttpFoundationExtension in the 2.5 branch, we cannot merge this forward in a BC fashion. For this reason, I removed the argument again.

Commits
-------

6cbc862 [Form] Removed constructor argument from FormTypeHttpFoundationExtension for forward compatibility with 2.5
2014-09-25 11:33:23 +02:00
Bernhard Schussek 6cbc862e19 [Form] Removed constructor argument from FormTypeHttpFoundationExtension for forward compatibility with 2.5 2014-09-25 11:29:33 +02:00
Bernhard Schussek 8e5537b8a5 [Validator] Simplified testing of violations 2014-09-25 11:17:44 +02:00
Fabien Potencier d671406ae5 minor #12017 [Validator] Fixed StaticMethodLoaderTest to actually test something (webmozart)
This PR was merged into the 2.3 branch.

Discussion
----------

[Validator] Fixed StaticMethodLoaderTest to actually test something

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

This test is not testing anything, except for whether PHP throws a strict standards error when invalid code is loaded.

I disabled error reporting for this test, so that the actual functionality (ignoring static+abstract functions) is tested.

Commits
-------

1b1303a [Validator] Fixed StaticMethodLoaderTest to actually test something
2014-09-25 09:03:01 +02:00
Fabien Potencier 45ac2c4522 minor #12026 [FrameworkBundle] output failed matched path for clarification (Tobion)
This PR was merged into the 2.3 branch.

Discussion
----------

[FrameworkBundle] output failed matched path for clarification

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #11780
| License       | MIT
| Doc PR        | -

Because cygwin resolves the path behind the scenes, it is otherwise very unclear what path is actually used for matching.

Commits
-------

8d13af7 [FrameworkBundle] output failed matched path for clarification
2014-09-25 08:43:41 +02:00
Fabien Potencier 89d6bb7e65 minor #12027 remove obsolete test file (Tobion)
This PR was merged into the 2.3 branch.

Discussion
----------

remove obsolete test file

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

I don't think this file is used anymore.

Commits
-------

83f556f remove obsolete test file
2014-09-25 07:59:15 +02:00
Tobias Schultze 83f556f0f9 remove obsolete test file 2014-09-25 02:08:46 +03:00
Tobias Schultze 8d13af77db [FrameworkBundle] output failed matched path for clarification 2014-09-25 01:57:27 +03:00
Fabien Potencier a05a95c30e bug #11058 [Security] bug #10242 Missing checkPreAuth from RememberMeAuthenticationProvider (glutamatt)
This PR was submitted for the 2.4 branch but it was merged into the 2.3 branch instead (closes #11058).

Discussion
----------

[Security] bug #10242 Missing checkPreAuth from RememberMeAuthenticationProvider

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #10242
| License       | MIT

[Security] fixed missing call to UserChecker::checkPreAuth

edit : after the discution with @hellomedia , i replaced postcheck with precheck
e0730e07ed (commitcomment-6580764)

Commits
-------

a38d1cd bug #10242 Missing checkPreAuth from RememberMeAuthenticationProvider
2014-09-24 17:03:22 +02:00
Mathieu Morlon a38d1cd8bf bug #10242 Missing checkPreAuth from RememberMeAuthenticationProvider 2014-09-24 17:03:18 +02:00
Bernhard Schussek 1b1303a8d8 [Validator] Fixed StaticMethodLoaderTest to actually test something 2014-09-24 16:07:14 +02:00
Fabien Potencier bc8ee6f497 bug #12004 [Form] Fixed ValidatorTypeGuesser to guess properties without constraints not to be required (webmozart)
This PR was merged into the 2.3 branch.

Discussion
----------

[Form] Fixed ValidatorTypeGuesser to guess properties without constraints not to be required

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #6645
| License       | MIT
| Doc PR        | -

Consider the following entity:

```php
class Author
{
    /**
     * @Assert\NotBlank
     */
    private $name;

    private $age;
}
```

Right now, the "required" HTML attribute is set for both fields (since the default value of the "required" option is true). IMO this is wrong.

With this fix, the ValidatorTypeGuesser guesses `false` for the "required" option unless a NotNull/NotBlank constraint is present.

Commits
-------

fd77b09 [Form] Fixed ValidatorTypeGuesser to guess properties without constraints not to be required
2014-09-24 14:19:03 +02:00
Bernhard Schussek fd77b09fba [Form] Fixed ValidatorTypeGuesser to guess properties without constraints not to be required 2014-09-24 14:11:43 +02:00
Fabien Potencier d0537e0efb bug #11904 Make twig ExceptionController conformed with ExceptionListener (megazoll)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #11904).

Discussion
----------

Make twig ExceptionController conformed with ExceptionListener

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #9083
| License       | MIT
| Doc PR        |

Parameter passed to exception controller from exception listener called ``format``, so variable ``_format`` in exception controller always takes default value.
https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php#L120

Commits
-------

24c5ba4 Use request format from request in twig ExceptionController
2014-09-24 09:29:50 +02:00
Vyacheslav Salakhutdinov 24c5ba4df3 Use request format from request in twig ExceptionController 2014-09-24 09:29:50 +02:00
Fabien Potencier 6ad5d31dd8 bug #11924 [Form] Moved POST_MAX_SIZE validation from FormValidator to request handler (rpg600, webmozart)
This PR was merged into the 2.3 branch.

Discussion
----------

[Form] Moved POST_MAX_SIZE validation from FormValidator to request handler

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #11729, #11877
| License       | MIT
| Doc PR        | -

Commits
-------

759ae1a [Form] Moved POST_MAX_SIZE validation from FormValidator to request handler
4780210 [Form] Add a form error if post_max_size has been reached.
2014-09-24 08:12:14 +02:00
Bernhard Schussek 759ae1a7a1 [Form] Moved POST_MAX_SIZE validation from FormValidator to request handler 2014-09-23 14:27:03 +02:00
Fabien Potencier c3feed6df2 minor #11504 [WebProfilerBundle] turbolinks compatibility (DraCzris)
This PR was merged into the 2.3 branch.

Discussion
----------

[WebProfilerBundle] turbolinks compatibility

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | no
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Fix profiler when using turbolinks. (Without this, profiler is rendered without assets)

Commits
-------

c65b4c7 [WebProfilerBundle] turbolinks compatibility
2014-09-23 12:52:48 +02:00
rpg600 47802105d3 [Form] Add a form error if post_max_size has been reached. 2014-09-23 12:20:25 +02:00
Fabien Potencier 3d11433950 bug #11079 Response::isNotModified returns true when If-Modified-Since is later than Last-Modified (skolodyazhnyy)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #11079).

Discussion
----------

Response::isNotModified returns true when If-Modified-Since is later than Last-Modified

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #10501,  #10857
| License       | MIT
| Doc PR        |

Patch for #10501. I have reworked a bit `Response::isNotModified` method to make it more readable. Now it's comparing If-Modified-Since and Last-Modified as dates.

Commits
-------

42ec76e Response::isNotModified returns true when If-Modified-Since is later than Last-Modified
2014-09-23 12:19:54 +02:00
Sergey Kolodyazhnyy 42ec76e9d0 Response::isNotModified returns true when If-Modified-Since is later than Last-Modified 2014-09-23 12:19:50 +02:00
Fabien Potencier e47e4fa56d bug #11989 [Finder][Urgent] Remove asterisk and question mark from folder name in test to prevent windows file system issues. (Adam)
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.
2014-09-23 07:24:00 +02:00
Fabien Potencier 3a67de274b minor #11986 typo fixed in AbstractProcessTest (getoutput() => getOutput()) (YevKov)
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())
2014-09-23 07:16:08 +02:00
Yevgen Kovalienia 36998bb629 typo fixed in AbstractProcessTest (getoutput() => getOutput()) 2014-09-23 07:16:08 +02:00
Fabien Potencier 3a3fb05cdf bug #11908 [Translation] [Config] Clear libxml errors after parsing xliff file (pulzarraider)
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
2014-09-23 07:15:05 +02:00
Adam 5fbb278b7a Avoid question mark and asterisk in folder names to prevent windows filesystem issues.
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.
2014-09-23 03:52:24 +00:00
Andrej Hudec fab61effaf [Translation] [Config] Clear libxml errors after parsing XML file 2014-09-22 20:11:23 +02:00
Fabien Potencier 4ac8adde5d minor #11340 [2.3] Add missing development dependencies (romainneutron)
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
2014-09-22 17:12:11 +02:00
Romain Neutron 3b02af9f79 [2.3] Add missing development dependencies 2014-09-22 17:11:59 +02:00
Fabien Potencier 902efb8a84 bug #11937 [HttpKernel] Make sure HttpCache is a trusted proxy (thewilkybarkid)
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/4239

Fixes #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
2014-09-22 15:44:41 +02:00
Fabien Potencier 13139d759c minor #11981 Fix @return docs on HttpCache::restoreResponseBody() (znerol)
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()
2014-09-22 15:25:53 +02:00
znerol 37dc57bda2 Fix @return docs on HttpCache::restoreResponseBody() 2014-09-22 15:25:52 +02:00
Fabien Potencier 677aefbbaa bug #11970 [Finder] Escape location for regex searches (ymc-dabe)
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
2014-09-22 14:44:11 +02:00
Daniel Beyer b63926b246 [Finder] Escape location for regex searches 2014-09-22 14:44:08 +02:00
Fabien Potencier 369aebf431 fixed CS 2014-09-22 10:32:35 +02:00
Fabien Potencier f5d4515200 minor #11966 [HttpFoundation] fixed some volatile tests (fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpFoundation] fixed some volatile tests

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | see #11588
| License       | MIT
| Doc PR        | n/a

Commits
-------

00c1b75 [Process] fixed some volatile tests
974bf01 [HttpKernel] fixed a volatile test
6020c43 [HttpFoundation] fixed some volatile tests
2014-09-21 09:12:05 +02:00
Fabien Potencier 00c1b759cd [Process] fixed some volatile tests 2014-09-20 10:00:00 +02:00
Fabien Potencier 974bf01eb3 [HttpKernel] fixed a volatile test 2014-09-20 09:56:12 +02:00
Fabien Potencier 6020c43191 [HttpFoundation] fixed some volatile tests 2014-09-20 09:53:54 +02:00
Fabien Potencier 3da421f2c2 bug #11837 Use getPathname() instead of string casting to get BinaryFileReponse file path (nervo)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #11837).

Discussion
----------

Use getPathname() instead of string casting to get BinaryFileReponse file path

According to the code, should be "File" instead of "\SplFileInfo"

Commits
-------

e1eb788 Use getPathname() instead of string casting to get BinaryFileReponse file path
2014-09-17 13:01:55 +02:00
nervo e1eb788d2f Use getPathname() instead of string casting to get BinaryFileReponse file path 2014-09-17 13:01:47 +02:00
thewilkybarkid ca65362b9b Make sure HttpCache is a trusted proxy 2014-09-16 19:36:21 +01:00
Fabien Potencier 7b6161cec6 minor #11934 [Form] Fix PHPDoc for builder setData methods (MisatoTremor)
This PR was merged into the 2.3 branch.

Discussion
----------

[Form] Fix PHPDoc for builder setData methods

| Q             | A
| ------------- | ---
| Fixed tickets | #11933
| License       | MIT

The underlying data variable is typed as mixed whereas the methods paramers where typed as array.
The method is also described to accept objects, etc. in the documentation.

Commits
-------

c207d1d [Form] Fix PHPDoc for builder setData methods The underlying data variable is typed as mixed whereas the methods paramers where typed as array.
2014-09-16 17:34:43 +02:00
Steffen Roßkamp c207d1dde2 [Form] Fix PHPDoc for builder setData methods
The underlying data variable is typed as mixed whereas the methods
paramers where typed as array.
2014-09-16 11:11:47 +02:00
Fabien Potencier d853c0d43b minor #11820 [Security] Uniform AccessDecisionManager decide behaviour (mTorres)
This PR was merged into the 2.3 branch.

Discussion
----------

[Security] Uniform AccessDecisionManager decide behaviour

| Q                     | A
| --------------------|---
| Bug fix?           | yes
| New feature?   | no
| BC breaks?     | no
| Deprecations? | no
| Tests pass?     | yes
| Fixed tickets    | #10170
| License           | MIT
| Doc PR           | none

This PR uniforms the way the 3 decision policies (affirmative, consensus, unanimous) are handled in the Security\Core\Authoritzation\AccessDecisionManager.php

See #10170

Commits
-------

938ae4b [Security] Added more tests
2014-09-16 08:36:20 +02:00
Fabien Potencier 4fd0cf3927 fixed CS 2014-09-16 07:12:27 +02:00
Fabien Potencier 036726cf62 bug #11513 [Translation] made XliffFileDumper support CDATA sections. (hhamon)
This PR was merged into the 2.3 branch.

Discussion
----------

[Translation] made XliffFileDumper support CDATA sections.

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | maybe
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #11256
| License       | MIT

Commits
-------

9926845 [Translation] made XliffFileDumper support CDATA sections.
2014-09-16 07:11:43 +02:00
Bernhard Schussek f776e0c3d2 bug #11907 [Intl] Improved bundle reader implementations (webmozart)
This PR was merged into the 2.3 branch.

Discussion
----------

[Intl] Improved bundle reader implementations

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

This PR extracts bundle reader improvements from #9206.

The code is internal and used for resource bundle generation only, so I did not care about BC too much.

Commits
-------

c3cce5c [Intl] Improved bundle reader implementations
2014-09-15 22:32:55 +02:00