Commit Graph

18128 Commits

Author SHA1 Message Date
Fabien Potencier
aa5179b8c8 Merge branch '2.4' into 2.5
* 2.4:
  Make Doctrine's dependency injection test less fragile.
  [Finder] [Iterator] Make the tests less fragile
  [Form][DateTime] Propagate invalid_message & invalid_message parameters to date & time sub widgets
  Fix expression language in the container when using the "container" variable
2014-09-27 10:35:39 +02:00
Fabien Potencier
e768f37685 Merge branch '2.3' into 2.4
* 2.3:
  Make Doctrine's dependency injection test less fragile.
  [Finder] [Iterator] Make the tests less fragile
  [Form][DateTime] Propagate invalid_message & invalid_message parameters to date & time sub widgets
2014-09-27 10:35:25 +02:00
Fabien Potencier
2ecbf87aa3 minor #12058 [Doctrine][DependencyInjection] Make a test less fragile. (AlphaStream)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #12058).

Discussion
----------

[Doctrine][DependencyInjection] Make a test less fragile.

The test checks that a few items are ordered according to the value of their 'priority' attribute. However, a few of the items have the same value of this attribute. RegisterEventListenersAndSubscribersPass doesn't use a stable sorting, yet the test asserts that items that are 'equal' shall go in the original order. Modified so that the order of the original items is not checked.

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

Commits
-------

f1ae970 Make Doctrine's dependency injection test less fragile.
2014-09-27 09:50:52 +02:00
Alex Bakhturin
f1ae970a4e Make Doctrine's dependency injection test less fragile.
[Doctrine][DependencyInjection] The test checks that a few items are ordered according to the value of their 'priority' attribute. However, a few of the items have the same value of this attribute. RegisterEventListenersAndSubscribersPass doesn't use a stable sorting, yet the test asserts that items that are 'equal' shall go in the original order. Modified so that the order of the original items is not checked.
2014-09-27 09:50:52 +02:00
Bernhard Schussek
be819c162f [Intl] Integrated ICU data into Intl component 2014-09-26 16:16:55 +02:00
Fabien Potencier
55b35a2a64 minor #12028 [Finder] [Iterator] Make the tests less fragile (AlphaStream)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #12028).

Discussion
----------

[Finder] [Iterator] Make the tests less fragile

Modified the Iterator tests so that they assert only on what's actually being tested. In particular, the tests were checking the order of the files [that were created virtually simultaneously] after sorting them by date. This change is a part of the effort to make Symfony successfully pass tests on HHVM

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

Commits
-------

10f9135 [Finder] [Iterator] Make the tests less fragile
2014-09-26 06:59:53 +02:00
Alex Bakhturin
10f9135f63 [Finder] [Iterator] Make the tests less fragile 2014-09-26 06:59:53 +02:00
Fabien Potencier
d7615e70d2 bug #12016 [Validator] Added ConstraintValidator::buildViolation() helper for BC with the 2.4 API (webmozart)
This PR was merged into the 2.5 branch.

Discussion
----------

[Validator] Added ConstraintValidator::buildViolation() helper for BC with the 2.4 API

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

This PR adds a `buildViolation()` helper method to the base `ConstraintValidator` to remove the API checks (2.4 vs. 2.5) from the constraint validator implementations. Once the 2.4 API is removed, this helper method will be removed as well.

**Todos**

- [x] Backport changes from #12021

Commits
-------

6b0c24a [Validator] Added ConstraintValidator::buildViolation() helper for BC with 2.4 API
2014-09-25 16:01:10 +02:00
Fabien Potencier
07b234e1c7 bug #12031 [Validator] Fixed LegacyValidator when only a constraint is validated (webmozart)
This PR was merged into the 2.5 branch.

Discussion
----------

[Validator] Fixed LegacyValidator when only a constraint is validated

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

The 2.5-BC API is currently broken for the following use case:

```php
$validator->validate($value, $constraint);
```

This is fixed now.

Commits
-------

1d48206 [Validator] Fixed LegacyValidator when only a constraint is validated
2014-09-25 15:54:04 +02:00
Bernhard Schussek
1653ca5e59 bug #9453 [Form][DateTime] Propagate invalid_message & invalid_message_parameters to date & time (egeloen)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #9453).

Discussion
----------

[Form][DateTime] Propagate invalid_message & invalid_message_parameters to date & time

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

This PR propagates the `invalid_message` & `invalid_message_parameters` in the datetime form type to the date & time sub form types. It allows to have the good error message if you use something else than the `single_widget` widget.

I have looked the `DateTimeTypeTest` but I have not found tests related to this kind of propagation, so for now I have not added tests yet.

Commits
-------

ea4ae74 [Form][DateTime] Propagate invalid_message & invalid_message parameters to date & time sub widgets
2014-09-25 15:00:50 +02:00
Eric GELOEN
ea4ae74011 [Form][DateTime] Propagate invalid_message & invalid_message parameters to date & time sub widgets 2014-09-25 15:00:50 +02:00
Bernhard Schussek
6b0c24adf7 [Validator] Added ConstraintValidator::buildViolation() helper for BC with 2.4 API 2014-09-25 12:25:17 +02:00
Fabien Potencier
da4e85e1c6 bug #12030 Fix expression language in the container when using the "container" variable (fabpot)
This PR was squashed before being merged into the 2.4 branch (closes #12030).

Discussion
----------

Fix expression language in the container when using the "container" variable

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

See #11995 for the description of the problem.

Commits
-------

2b2f0df Fix expression language in the container when using the "container" variable
2014-09-25 11:55:41 +02:00
Fabien Potencier
2b2f0df27e Fix expression language in the container when using the "container" variable 2014-09-25 11:55:38 +02:00
Fabien Potencier
f94ba9ab43 bug #12032 [Command] Set the process title as late as possible (lyrixx)
This PR was submitted for the master branch but it was merged into the 2.5 branch instead (closes #12032).

Discussion
----------

[Command] Set the process title as late as possible

| Q             | A
| ------------- | ---
| Bug fix?      | yes (so it could be merged into 2.5)
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

To be able to customize to process title in the `initialize` method of the
current command with some arguments or options

Commits
-------

44997d3 [Command] Set the process title as late as possible
2014-09-25 11:53:57 +02:00
Grégoire Pineau
44997d35af [Command] Set the process title as late as possible
To be able to customize to process title in the `initialize`
method of the current command with some arguments or option
2014-09-25 11:53:56 +02:00
Bernhard Schussek
c48ae250ac Merge branch '2.4' into 2.5
* 2.4:
  [Form] Removed constructor argument from FormTypeHttpFoundationExtension for forward compatibility with 2.5
  [Validator] Simplified testing of violations
  remove obsolete test file
  [FrameworkBundle] output failed matched path for clarification
  bug #10242 Missing checkPreAuth from RememberMeAuthenticationProvider
  [Validator] Fixed StaticMethodLoaderTest to actually test something
  [Form] Fixed ValidatorTypeGuesser to guess properties without constraints not to be required
  Use request format from request in twig ExceptionController
  fixed bug
  added the possibility to return null from SimplePreAuthenticationListener
  [Form] Moved POST_MAX_SIZE validation from FormValidator to request handler
  [Form] Add a form error if post_max_size has been reached.
  Response::isNotModified returns true when If-Modified-Since is later than Last-Modified
  [WebProfilerBundle] turbolinks compatibility

Conflicts:
	src/Symfony/Component/Form/Extension/Core/Type/FormType.php
	src/Symfony/Component/Form/Extension/Validator/Constraints/FormValidator.php
	src/Symfony/Component/Form/Extension/Validator/Util/ServerParams.php
	src/Symfony/Component/Security/Core/Tests/Authentication/Provider/RememberMeAuthenticationProviderTest.php
	src/Symfony/Component/Validator/Tests/Constraints/AbstractConstraintValidatorTest.php
2014-09-25 11:52:29 +02:00
Fabien Potencier
efb1237b72 Merge branch '2.3' into 2.4
* 2.3:
  [Form] Removed constructor argument from FormTypeHttpFoundationExtension for forward compatibility with 2.5
  [Validator] Simplified testing of violations
2014-09-25 11:38:53 +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
43b83cf8db Merge branch '2.3' into 2.4
* 2.3:
  remove obsolete test file
  [FrameworkBundle] output failed matched path for clarification
  bug #10242 Missing checkPreAuth from RememberMeAuthenticationProvider
  [Validator] Fixed StaticMethodLoaderTest to actually test something
  [Form] Fixed ValidatorTypeGuesser to guess properties without constraints not to be required
  Use request format from request in twig ExceptionController
  [Form] Moved POST_MAX_SIZE validation from FormValidator to request handler
  [Form] Add a form error if post_max_size has been reached.
  Response::isNotModified returns true when If-Modified-Since is later than Last-Modified
  [WebProfilerBundle] turbolinks compatibility

Conflicts:
	src/Symfony/Component/Form/CHANGELOG.md
	src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php
	src/Symfony/Component/Security/Core/Tests/Authentication/Provider/RememberMeAuthenticationProviderTest.php
2014-09-25 10:51:47 +02:00
Bernhard Schussek
1d48206b45 [Validator] Fixed LegacyValidator when only a constraint is validated 2014-09-25 09:57: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
Fabien Potencier
93333957e1 bug #12002 [Security] [Firewall] Bug fixed in SimplePreAuthenticationListener when createToken() not return TokenInterface object (adenkejawen, fabpot)
This PR was merged into the 2.4 branch.

Discussion
----------

[Security] [Firewall] Bug fixed in SimplePreAuthenticationListener when createToken() not return TokenInterface object

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

This is a follow-up for #11414 on the right branch.

Commits
-------

faa8e98 fixed bug
e85cb7f added the possibility to return null from SimplePreAuthenticationListener
2014-09-24 07:53:10 +02:00
Fabien Potencier
faa8e98063 fixed bug 2014-09-24 07:52:20 +02:00
adenkejawen
e85cb7fe2a added the possibility to return null from SimplePreAuthenticationListener 2014-09-23 16:11:05 +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
1c254a4f09 Merge branch '2.4' into 2.5
* 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
2014-09-23 07:25:11 +02:00
Fabien Potencier
924d06adf6 Merge branch '2.3' into 2.4
* 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
2014-09-23 07:24:59 +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