Commit Graph

16558 Commits

Author SHA1 Message Date
Christian Flothmann
38e9623ca4 don't raise warnings when exception is thrown
`array_map()` raises a warning when an exception is thrown inside the
callback (see https://bugs.php.net/bug.php?id=55416). To avoid these
warnings, `selectorToXPath()` is applied inside the loop.
2014-10-09 14:30:02 +02:00
Tobias Schultze
28eabd84f8 [Form] fix form handling with unconventional request methods like OPTIONS 2014-10-08 20:31:39 +02:00
Kristof Van Cauwenbergh
deb70aba15 CSRF warning docs on Request::enableHttpMethodParameterOverride()
[HttpFoundation] fixed the docs so that it gives some explanation about how you are vulnerable to CSRF when you enable the httpMethodeParameterOverride
2014-10-07 16:13:01 +02:00
Fabien Potencier
6df49bb9e1 minor #12130 [FrameworkBundle] minor fix (NAYZO)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #12130).

Discussion
----------

[FrameworkBundle] minor fix

A small fix in the "parse" function of the "ControllerNameParser" Controller.
We should use "!==" instead of "!=" since it's better and faster in this case.

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

Commits
-------

cd966c6 [FrameworkBundle] minor fix
2014-10-05 15:47:18 +02:00
Ala Eddine Khefifi
cd966c6826 [FrameworkBundle] minor fix
A small fix in the "parse" function of the "ControllerNameParser" Controller.
We should use "!==" instead of "!=" since it's better and faster in this case.

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | NA
| License       | MIT
| Doc PR        | NA
2014-10-05 15:47:08 +02:00
Fabien Potencier
db44606580 minor #12135 [Console] add a dot (MightyBranch)
This PR was submitted for the 2.5 branch but it was merged into the 2.3 branch instead (closes #12135).

Discussion
----------

[Console] add a dot

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

Added a "." at the end of an InputOption description, as the rest of the InputOption descriptions have it.

Commits
-------

fb0e685 [Console] add a dot
2014-10-05 15:45:15 +02:00
MightyBranch
fb0e685286 [Console] add a dot 2014-10-05 15:45:10 +02:00
Fabien Potencier
34a638bc64 minor #12134 [Form] remove unnecessary call (Tobion)
This PR was merged into the 2.3 branch.

Discussion
----------

[Form] remove unnecessary call

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

Commits
-------

4e45a39 [Form] remove unnecessary call
2014-10-05 09:29:26 +02:00
Tobias Schultze
4e45a39cc0 [Form] remove unnecessary call 2014-10-05 05:13:10 +02:00
Fabien Potencier
0e7694e5e9 Merge branch 'pull/12053' into 2.3
* pull/12053:
  [Doc] Use Markdown syntax highlighting

Conflicts:
	src/Symfony/Component/Finder/README.md
2014-10-01 07:39:06 +02:00
Laurent Ghirardotti
638ce847b3 [Doc] Use Markdown syntax highlighting 2014-10-01 07:38:33 +02:00
Fabien Potencier
03f3dec065 [Finder] tweaked docs 2014-10-01 07:36:12 +02:00
Fabien Potencier
c8daa9c420 minor #12059 [Finder] Add info about possibilities offered by SplFileInfo (ywarnier)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #12059).

Discussion
----------

[Finder] Add info about possibilities offered by SplFileInfo

Minor documentation improvement

Commits
-------

b2219cf [Finder] Add info about possibilities offered by SplFileInfo
2014-10-01 07:33:40 +02:00
Yannick Warnier
b2219cf150 [Finder] Add info about possibilities offered by SplFileInfo 2014-10-01 07:33:40 +02:00
Fabien Potencier
d002f1744a minor #12088 fix components tests (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

fix components tests

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

Since #12006, the `ContainerBuilder` contains the `addExpressionLanguageProvider()` method which references a class from the ExpressionLanguage component. By default, the PHPUnit mock API tries to mock all methods of the class being doubled. Since the ExpressionLanguage component is not required to run the tests, creating the mock objects fails when the mock API fails to mock the `addExpressionLanguageProvider()` method.

Commits
-------

2f2a732 fix components tests
2014-10-01 07:29:49 +02:00
Christian Flothmann
2f2a732807 fix components tests
Since #12006, the `ContainerBuilder` contains the
`addExpressionLanguageProvider()` method which references a class from
the ExpressionLanguage component. By default, the PHPUnit mock API
tries to mock all methods of the class being doubled. Since the
ExpressionLanguage component is not required to run the tests,
creating the mock objects fails when the mock API fails to mock
the `addExpressionLanguageProvider()` method.
2014-10-01 00:07:12 +02:00
Bernhard Schussek
b45ebef229 [Intl] FIxed failing test 2014-09-30 23:25:54 +02:00
Bernhard Schussek
40eaa80ef6 bug #11998 [Intl] Integrated ICU data into Intl component #2 (webmozart)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #11998).

Discussion
----------

[Intl] Integrated ICU data into Intl component #2

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

Follow-up PR to #11920. This PR contains generated data files only.

Commits
-------

65a8b9f [Intl] Generated the data for ICU version 54-rc
2014-09-30 23:21:32 +02:00
Bernhard Schussek
65a8b9fc93 [Intl] Generated the data for ICU version 54-rc 2014-09-30 23:21:31 +02:00
Bernhard Schussek
1ce0f875be bug #11920 [Intl] Integrated ICU data into Intl component #1 (webmozart)
This PR was merged into the 2.3 branch.

Discussion
----------

[Intl] Integrated ICU data into Intl component #1

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

This PR is an alternative implementation to #11884. It depends on ~~#11906~~ and ~~#11907~~ being merged first (~~these are included in the diff until after a merge+rebase~~ merged+rebased now).

With this PR, the ICU component becomes obsolete. The ICU data is bundled with Intl in two different formats: JSON and the binary ICU resource bundle format (version 2) readable by PHP's `\ResourceBundle` class. For a performance comparison between the two, see my [benchmark](/webmozart/json-res-benchmark).

~~The data is contained in two zip files: json.zip (2.6MB) and rb-v2.zip (3.8MB). The handler~~

```php
\Symfony\Component\Intl\Composer\ScriptHandler::decompressData()
```

~~needs to be added as Composer hook and decompresses the data after install/update.~~

The data is included as text/binary now. Git takes care of the compression.

Before this PR can be merged, I would like to find out what the performance difference between the two formats is in real applications. For that, I need benchmarks from some real-life applications which use ICU data - e.g. in forms (language drop-downs, country selectors etc.) - for both the JSON and the binary data. You can force either format to be used by hard-coding the return value of `Intl::detectDataFormat()` to `Intl::JSON` and `Intl::RB_V2` respectively. I'll also try to create some more realistic benchmarks.

If JSON is not significantly slower/takes up significantly more memory than the binary format, we can drop the binary format altogether.

Commits
-------

be819c1 [Intl] Integrated ICU data into Intl component
2014-09-30 23:20:37 +02:00
Fabien Potencier
e24a822c40 minor #12080 [EventDispatcher] fix doc bloc on EventDispatcherInterface (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[EventDispatcher] fix doc bloc on EventDispatcherInterface

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

The doc block says that an array of event names is accepted as input, but no implementation is compliant with that description.

Commits
-------

e3dacbd [EventDispatcher] fix doc bloc on EventDispatcherInterface
2014-09-30 16:01:01 +02:00
Nicolas Grekas
e3dacbd08c [EventDispatcher] fix doc bloc on EventDispatcherInterface 2014-09-30 09:22:23 +02:00
Fabien Potencier
4af20505a6 minor #12070 [Validator] Update validators.zh_CN.xlf, fix translation error (michaeljayt)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #12070).

Discussion
----------

[Validator] Update validators.zh_CN.xlf, fix translation error

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

Commits
-------

ab5aaab [Validator] Update validators.zh_CN.xlf, fix translation error
2014-09-29 08:58:14 +02:00
Michael J
ab5aaab414 [Validator] Update validators.zh_CN.xlf, fix translation error 2014-09-29 08:58:14 +02:00
Fabien Potencier
6beca0a945 bumped Symfony version to 2.3.21 2014-09-28 18:55:34 +02:00
Fabien Potencier
5ef0ea8414 updated VERSION for 2.3.20 2014-09-28 18:24:47 +02:00
Fabien Potencier
523b9b78b8 update CONTRIBUTORS for 2.3.20 2014-09-28 18:24:25 +02:00
Fabien Potencier
f0d90031a3 updated CHANGELOG for 2.3.20 2014-09-28 18:24:13 +02:00
Fabien Potencier
98b2db5a1d [SecurityBundle] fixed tests when used in standalone 2014-09-27 21:29:57 +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
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
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