Commit Graph

16239 Commits

Author SHA1 Message Date
1emming
8a47b62bd3 [Finder] Fix findertest readability 2014-08-31 06:03:32 +02:00
Fabien Potencier
b5d0501860 minor #11574 [Security] Made optimization on constant-time algorithm removing modulus operator (yosmanyga)
This PR was merged into the 2.3 branch.

Discussion
----------

[Security] Made optimization on constant-time algorithm removing modulus operator

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

This fix improves the constant-time algorithm used to compare strings, as it removes the `%` operator inside the loop.

Commits
-------

000bd0d Made optimization deprecating modulus operator
2014-08-31 05:48:56 +02:00
Fabien Potencier
bdb01a68d2 bug #11772 [Filesystem] Add FTP stream wrapper context option to enable overwrite (Damian Sromek)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #11772).

Discussion
----------

[Filesystem] Add FTP stream wrapper context option to enable overwrite

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

Without this change it's not possible to override a file on FTP by calling Filesystem::copy($originFile, $targetFile, true) as PHP/FTP server responds with error like:

fopen(ftp://...@ftp/file.txt): failed to open stream: Remote file already exists and overwrite context option not specified FTP server reports 213 166440 []

TODO: Write an integration tests? How? Use some real FTP server?

Commits
-------

c056a9c [Filesystem] Add FTP stream wrapper context option to enable overwrite (override)
2014-08-31 05:30:41 +02:00
Damian Sromek
c056a9c426 [Filesystem] Add FTP stream wrapper context option to enable overwrite (override) 2014-08-31 05:30:23 +02:00
Fabien Potencier
2c9496bc77 minor #11802 [HttpKernel] add use statement for phpdoc (Miliooo)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #11802).

Discussion
----------

[HttpKernel] add use statement for phpdoc

| Q             | A
| ------------- | ---
| Fixed tickets | https://github.com/symfony/symfony/issues/11801
| License       | MIT

Added use statement for the Phpdoc

Commits
-------

0010fba [HttpKernel] add use statement for phpdoc
2014-08-30 09:46:13 +02:00
Miliooo
0010fba8b1 [HttpKernel] add use statement for phpdoc 2014-08-30 09:46:13 +02:00
Fabien Potencier
c730fc6f77 bug #11788 [Yaml] fixed mapping keys containing a quoted # (hvt, fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

[Yaml] fixed mapping keys containing a quoted #

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

Commits
-------

110f999 [Yaml] fixed mapping keys containing a quoted #
8ba3b28 Added fixture to test parsing of hash keys ending with a space and #
2014-08-29 11:22:54 +02:00
Fabien Potencier
c42302ef3b minor #11793 Disabled the PHPUnit self-update on Travis (stof)
This PR was merged into the 2.3 branch.

Discussion
----------

Disabled the PHPUnit self-update on Travis

The 4.2.2 release available on Travis currently ships with a broken self-update command. Given that it is new enough to contain the fixes for the other bugs affecting the build, it is fine to keep using the available phar without updating it.

This avoids making all builds except 5.3.3 fail before running tests.

FYI, the bug itself is already fixed in PHPUnit so 4.2.3 will have a working command.

Commits
-------

0fca352 Disabled the PHPUnit self-update on Travis
2014-08-29 11:20:55 +02:00
Christophe Coevoet
0fca35276a Disabled the PHPUnit self-update on Travis
The 4.2.2 release available on Travis currently ships with a broken
self-update command. Given that it is new enough to contain the fixes for
the other bugs affecting the build, it is fine to keep using the available
phar without updating it.
2014-08-28 22:43:41 +02:00
Christophe Coevoet
37f2c3dabd bug #11160 [DoctrineBridge] Abstract Doctrine Subscribers with tags (merk)
This PR was merged into the 2.3 branch.

Discussion
----------

[DoctrineBridge] Abstract Doctrine Subscribers with tags

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

I've hit a problem with some doctrine listeners, built by decorating an abstract definition.

I want the abstract definition to hold the tag, however because the RegisterEventListenersAndSubscribersPass runs before abstract definitions are removed, they get added as method calls to the EventManager definition, which once the abstract service is removed, we end up with a method call that breaks the container.

I don't know if this is the best approach, it might be better not to return abstract services when calling `findTaggedServiceIds` instead?

Commits
-------

cbcf513 Disallow abstract definitions from doctrine event listener registration
2014-08-28 21:58:08 +02:00
Fabien Potencier
8605c42441 [ClassLoader] simplified phpdoc 2014-08-28 16:35:12 +02:00
Fabien Potencier
f7769b52f1 bug #11768 [ClassLoader] Add a __call() method to XcacheClassLoader (tstoeckler)
This PR was squashed before being merged into the 2.3 branch (closes #11768).

Discussion
----------

[ClassLoader] Add a __call() method to XcacheClassLoader

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

Commits
-------

dd0d6af [ClassLoader] Add a __call() method to XcacheClassLoader
2014-08-28 16:33:47 +02:00
Tobias Stöckler
dd0d6afc21 [ClassLoader] Add a __call() method to XcacheClassLoader 2014-08-28 16:33:42 +02:00
Fabien Potencier
224844a7d1 minor #11790 [Process] fix some minor typos in tests (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[Process] fix some minor typos in tests

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

Commits
-------

24d2c9a fix some minor typos in tests
2014-08-28 16:31:01 +02:00
Christian Flothmann
24d2c9a5f0 fix some minor typos in tests 2014-08-28 11:02:24 +02:00
Fabien Potencier
110f999d05 [Yaml] fixed mapping keys containing a quoted # 2014-08-28 03:42:35 +02:00
Harm van Tilborg
8ba3b289fe Added fixture to test parsing of hash keys ending with a space and # 2014-08-28 03:41:39 +02:00
Fabien Potencier
bb97903684 bug #11726 [Filesystem Component] mkdir race condition fix #11626 (kcassam)
This PR was squashed before being merged into the 2.3 branch (closes #11726).

Discussion
----------

[Filesystem Component] mkdir race condition fix #11626

[Filesystem Component] Fix mkdir race condition

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

Commits
-------

0483452 [Filesystem Component] mkdir race condition fix #11626
2014-08-27 14:38:41 +02:00
Ka
04834521f1 [Filesystem Component] mkdir race condition fix #11626 2014-08-27 14:38:33 +02:00
Fabien Potencier
8990ac691c bug #11677 [YAML] resolve variables in inlined YAML (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[YAML] resolve variables in inlined YAML

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

#11569 does not resolve variables in inline YAML.

Commits
-------

45a5863 [YAML] resolve variables in inlined YAML
2014-08-27 14:37:38 +02:00
Fabien Potencier
7510d0648e [Validator] reverted permissions change on translation files 2014-08-27 10:38:16 +02:00
Fabien Potencier
c59f1dde6b bug #11639 [DependencyInjection] Fixed factory service not within the ServiceReferenceGraph. (boekkooi)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #11639).

Discussion
----------

[DependencyInjection] Fixed factory service not within the ServiceReferenceGraph.

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

Fixed a problem where Factory services are not added to the ServiceReferenceGraph.

Commits
-------

e992f8e Fixed Factory services not within the ServiceReferenceGraph.
2014-08-27 10:32:18 +02:00
Warnar Boekkooi
e992f8e3d1 Fixed Factory services not within the ServiceReferenceGraph. 2014-08-27 10:32:18 +02:00
Fabien Potencier
3cb9d7af35 bug #11778 [Validator] Fixed wrong translations for Collection constraints (samicemalone)
This PR was merged into the 2.3 branch.

Discussion
----------

[Validator] Fixed wrong translations for Collection constraints

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

The error messages for a missing field and an unexpected field did not match the Constraint class.

Commits
-------

808de2b [Validator] Fixed wrong translation keys/messages for Collection constraint. The error messages for a missing field and an unexpected field did not match the Contraint class
2014-08-27 10:28:50 +02:00
Fabien Potencier
dfce21ce86 minor #11779 [CssSelector] Fix URL to SimonSapin/cssselect repo in README (jwpage)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #11779).

Discussion
----------

[CssSelector] Fix URL to SimonSapin/cssselect repo in README

This fixes a broken link in the CssSelector README spotted by @philsturgeon in https://github.com/symfony/CssSelector/pull/2.

| Q             | A
| ------------- | ---
| Fixed tickets | none
| License       | MIT

Commits
-------

b9a237c [CssSelector] Fix URL to SimonSapin/cssselect repo
2014-08-27 10:24:06 +02:00
Johnson Page
b9a237c00b [CssSelector] Fix URL to SimonSapin/cssselect repo 2014-08-27 10:24:06 +02:00
Sam Malone
808de2b284 [Validator] Fixed wrong translation keys/messages for Collection constraint. The error messages for a missing field and an unexpected field did not match the Contraint class 2014-08-27 03:57:26 +01:00
Fabien Potencier
0c44306d34 bug #11756 [DependencyInjection] fix @return anno created by PhpDumper (jakubkulhan)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #11756).

Discussion
----------

[DependencyInjection] fix @return anno created by PhpDumper

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

If a generated container is inside namespace, generated @return annos are not valid.

Commits
-------

39c4cc3 [DependencyInjection] fix @return anno created by PhpDumper
2014-08-26 15:05:17 +02:00
Jakub Kulhan
39c4cc387d [DependencyInjection] fix @return anno created by PhpDumper 2014-08-26 15:05:12 +02:00
Fabien Potencier
baf9796adb minor #11758 Fixed the phpdoc of the VoterInterface (stof)
This PR was merged into the 2.3 branch.

Discussion
----------

Fixed the phpdoc of the VoterInterface

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

``null`` is an accepted value for voters (it is passed when you are not voting on a specific object, for instance for roles.

Commits
-------

b591404 Fixed the phpdoc of the VoterInterface
2014-08-25 17:18:00 +02:00
Christophe Coevoet
b591404bee Fixed the phpdoc of the VoterInterface 2014-08-25 10:05:09 +02:00
Christophe Coevoet
0233da8fd7 bug #11711 [DoctrineBridge] Fix empty parameter logging in the dbal logger (jakzal)
This PR was squashed before being merged into the 2.3 branch (closes #11711).

Discussion
----------

[DoctrineBridge] Fix empty parameter logging in the dbal logger

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

Commits
-------

ef23f02 [DoctrineBridge] Fix empty parameter logging in the dbal logger
2014-08-22 12:30:02 +02:00
Jakub Zalas
ef23f02415 [DoctrineBridge] Fix empty parameter logging in the dbal logger 2014-08-22 12:29:51 +02:00
Christophe Coevoet
b96e7f9707 bug #11692 [DomCrawler] check for the correct field type (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[DomCrawler] check for the correct field type

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

HTML allow to define different form fields with the same name. Imagine the following form:

```html
    <html>
        <body>
            <form action="/">
                <input type="hidden" name="option" value="default">
                <input type="radio" name="option" value="A">
                <input type="radio" name="option" value="B">
                <input type="hidden" name="settings[1]" value="0">
                <input type="checkbox" name="settings[1]" value="1" id="setting-1">
                <button>klickme</button>
            </form>
        </body>
    </html>
```

Since the `FormFieldRegistry` can only handle one field per name, the hidden field option is registered first before the radio field with the same name is evaluated. Thus, the `FormFieldRegistry` returns an `InputFormField` instance on which the `addChoices()` method can not be called.

Commits
-------

169b397 check for the correct field type
2014-08-21 02:21:59 +02:00
Tobias Schultze
f262b01c5f bug #11672 [Routing] fix handling of nullable XML attributes (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[Routing] fix handling of nullable XML attributes

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

As @Tobion pointed out in #11394, ``true`` and ``1`` are valid values in boolean XML attributes. The XmlFileLoader didn't handle ``1`` values properly.

Commits
-------

7b4d4b6 fix handling of nullable XML attributes
2014-08-20 10:56:18 +02:00
Christophe Coevoet
00aedfc150 bug #11624 [DomCrawler] fix the axes handling in a bc way (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[DomCrawler] fix the axes handling in a bc way

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

The previous fix in #11548 for handling XPath axes was not backward compatible. In previous Symfony versions the Crawler handled nodes by holding a "fake root node". This must be taken into account when evaluating (relativizing) XPath expressions.

Commits
-------

d26040f [DomCrawler] fix the axes handling in a bc way
2014-08-19 12:43:37 +02:00
Bernhard Schussek
afab3ee4c2 bug #11676 [Form] Fixed #11675 ValueToDuplicatesTransformer accept "0" value (Nek-)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #11676).

Discussion
----------

[Form] Fixed #11675 ValueToDuplicatesTransformer accept "0" value

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

Commits
-------

31d48ab Fixed #11675 ValueToDuplicatesTransformer accept "0" value
2014-08-19 11:05:04 +02:00
Nek (Maxime Veber)
31d48ab91f Fixed #11675 ValueToDuplicatesTransformer accept "0" value
Fixed wrong return null syntax

Added transformation to null on empty arrays

Removed useless statement in condition and switched to yoda condition
2014-08-19 11:05:04 +02:00
Bernhard Schussek
3d59e3417f bug #11695 [Validators] Fixed failing tests requiring ICU 52.1 which are skipped otherwise (webmozart)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #11695).

Discussion
----------

[Validators] Fixed failing tests requiring ICU 52.1 which are skipped otherwise

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

I just ran the tests with ICU 52.1 installed and noticed that a few of them failed. This PR fixes these tests.

Commits
-------

5440ed5 [Validators] Fixed failing tests requiring ICU 52.1 which are skipped otherwise
2014-08-19 10:50:01 +02:00
Bernhard Schussek
5440ed5c38 [Validators] Fixed failing tests requiring ICU 52.1 which are skipped otherwise 2014-08-19 10:50:01 +02:00
Bernhard Schussek
f825f5d1c3 minor #11615 [Validator] return empty metadata collection if none do exist (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[Validator] return empty metadata collection if none do exist

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        | [The reference to the documentation PR if any]

Backport of #11614 for Symfony 2.3 and 2.4.

Commits
-------

f5bc18d return empty metadata collection if none do exist
2014-08-19 10:48:01 +02:00
Christian Flothmann
169b3978ae check for the correct field type
HTML allow to define different form fields with the same name.
Imagine the following form:

    <html>
        <body>
            <form action="/">
                <input type="hidden" name="option" value="default">
                <input type="radio" name="option" value="A">
                <input type="radio" name="option" value="B">
                <input type="hidden" name="settings[1]" value="0">
                <input type="checkbox" name="settings[1]" value="1" id="setting-1">
                <button>klickme</button>
            </form>
        </body>
    </html>

Since the `FormFieldRegistry` can only handle one field per name, the
hidden field option is registered first before the radio field with
the same name is evaluated. Thus, the `FormFieldRegistry` returns an
`InputFormField` instance on which the `addChoices()` method can not
be called.
2014-08-18 17:01:30 +02:00
Christian Flothmann
45a5863508 [YAML] resolve variables in inlined YAML 2014-08-18 16:09:32 +02:00
Nicolas Grekas
b674e678db minor #11674 [Validator] Add missing translation NL (1emming)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #11674).

Discussion
----------

[Validator] Add missing translation NL

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

Commits
-------

2d5ab91 add missing options
2014-08-18 10:59:14 +02:00
Seb Koelen
2d5ab91fe4 add missing options 2014-08-18 10:59:14 +02:00
Christian Flothmann
7b4d4b63eb fix handling of nullable XML attributes
As @Tobion pointed out in #11394, true and 1 are valid values in
boolean XML attributes. The XmlFileLoader didn't handle 1 values
properly.
2014-08-15 11:05:55 +02:00
Nicolas Grekas
65862c9947 minor #11667 [HttpFoundation] revert #11510, moved to 2.6 (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpFoundation] revert #11510, moved to 2.6

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

This reverts PR #11510 from 2.3.

Commits
-------

fb120c7 revert #11510, moved to 2.6
2014-08-14 17:05:58 +02:00
Nicolas Grekas
a8b13a2999 bug #11529 [WebProfilerBundle] Fixed double height of canvas (hason)
This PR was merged into the 2.3 branch.

Discussion
----------

[WebProfilerBundle] Fixed double height of canvas

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

Commits
-------

c689186 [WebProfilerBundle] Fixed double height of canvas
2014-08-14 16:41:09 +02:00
Bernhard Schussek
0ecb34f23b minor #11646 [Validator] Backported constraint validator tests from 2.5 (webmozart)
This PR was merged into the 2.3 branch.

Discussion
----------

[Validator] Backported constraint validator tests from 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 PR backports the constraint validator tests from 2.5 to 2.3 to facilitate maintenance. When we adapt a test in 2.3, we can now easily merge the change forward to 2.5.

Commits
-------

87a47ea [Validator] Backported constraint validator tests from 2.5
2014-08-14 16:28:19 +02:00
Bernhard Schussek
87a47eadc9 [Validator] Backported constraint validator tests from 2.5 2014-08-14 15:44:06 +02:00