Commit Graph

18257 Commits

Author SHA1 Message Date
Fabien Potencier
9182904f6f minor #11767 Improve the exception message of UrlMatcher (dawehner)
This PR was merged into the 2.6-dev branch.

Discussion
----------

Improve the exception message of UrlMatcher

The current exception message is not optimal, some more context always helps.

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

Commits
-------

ee1197d Improve the exception message in the UrlMatcher.
2014-08-27 10:35:34 +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
Pablo Godel
5ad4d8a359 Remove hard dependency of RequestContext in AssetsExtension 2014-08-26 16:24:52 -04:00
Fabien Potencier
4b507bd7a4 bug #11759 [Debug] fix and enhance exception messages (nicolas-grekas)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[Debug] fix and enhance exception messages

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

Commits
-------

8df1ce8 [Debug] fix and enhance exception messages
2014-08-26 19:33:51 +02:00
Daniel Wehner
ee1197d009 Improve the exception message in the UrlMatcher. 2014-08-26 17:25:16 +02:00
Fabien Potencier
b03530b781 minor #11619 added useful reminder about form.vars.errors into UPGRADE-2.5 notes (Oleg Andreyev)
This PR was submitted for the master branch but it was merged into the 2.5 branch instead (closes #11619).

Discussion
----------

added useful reminder about form.vars.errors into UPGRADE-2.5 notes

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

PR is just about upgrading UPGRADE-2.5 notes.
We've been upgrading from 2.4 to 2.5.3 and missing this part (upgrading templates)

Commits
-------

aefb1ca added useful reminder about form.vars.errors into UPGRADE-2.5 notes
2014-08-26 16:39:01 +02:00
Oleg Andreyev
aefb1cab05 added useful reminder about form.vars.errors into UPGRADE-2.5 notes 2014-08-26 16:39:01 +02:00
Fabien Potencier
c46125438c Merge branch '2.5'
* 2.5:
  [DependencyInjection] fix @return anno created by PhpDumper
  Fixed the phpdoc of the VoterInterface
  [DoctrineBridge] Fix empty parameter logging in the dbal logger
  [Validator] remove duplicate interface implementations
  [Validator] fix return doc of ClassMetadata::getCascadingStrategy
  Fixed #11675 ValueToDuplicatesTransformer accept "0" value
  check for the correct field type
  fix handling of nullable XML attributes
  [DomCrawler] fix the axes handling in a bc way
2014-08-26 16:16:42 +02:00
Fabien Potencier
c4615bfc93 Merge branch '2.4' into 2.5
* 2.4:
  [DependencyInjection] fix @return anno created by PhpDumper
  Fixed the phpdoc of the VoterInterface
  [DoctrineBridge] Fix empty parameter logging in the dbal logger
  Fixed #11675 ValueToDuplicatesTransformer accept "0" value
  check for the correct field type
  fix handling of nullable XML attributes
  [DomCrawler] fix the axes handling in a bc way

Conflicts:
	src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9.php
	src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_compiled.php
2014-08-26 16:16:33 +02:00
Fabien Potencier
16e3637ec1 Merge branch '2.3' into 2.4
* 2.3:
  [DependencyInjection] fix @return anno created by PhpDumper
  Fixed the phpdoc of the VoterInterface
  [DoctrineBridge] Fix empty parameter logging in the dbal logger
  Fixed #11675 ValueToDuplicatesTransformer accept "0" value
  check for the correct field type
  fix handling of nullable XML attributes
  [DomCrawler] fix the axes handling in a bc way

Conflicts:
	src/Symfony/Component/DomCrawler/Tests/CrawlerTest.php
2014-08-26 16:14:58 +02:00
Fabien Potencier
f6f7e7e927 feature #11731 [FrameworkBundle] Expose configuration of PropertyAccess (lyrixx)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[FrameworkBundle] Expose configuration of PropertyAccess

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

ping @webmozart

Commits
-------

75afdef [FrameworkBundle] Expose configuration of PropertyAccess
2014-08-26 15:10:49 +02: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
Nicolas Grekas
8df1ce826f [Debug] fix and enhance exception messages 2014-08-25 20:48:35 +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
Nicolas Grekas
1d7684ac3d feature #11673 [Validator] Added date support to comparison constraints and Range (webmozart)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[Validator] Added date support to comparison constraints and Range

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #3640, #7766, #9164, #9390, #8300
| License       | MIT
| Doc PR        | symfony/symfony-docs#4143

This commit adds frequently requested functionality to compare dates. Since the `DateTime` constructor is very flexible, you can do many fancy things now such as:

```php
/**
 * Only accept requests that start in at least an hour.
 * @Assert\GreaterThanOrEqual("+1 hours")
 */
private $date;

/**
 * Same as before.
 * @Assert\Range(min = "+1 hours")
 */
private $date;

/**
 * Only accept dates in the current year.
 * @Assert\Range(min = "first day of January", max = "first day of January next year")
 */
private $date;

/**
 * Timezones are supported.
 * @Assert\Range(min = "first day of January UTC", max = "first day of January next year UTC")
 */
private $date;
```

Commits
-------

60a5863 [Validator] Added date support to comparison constraints and Range
2014-08-24 18:08:05 +02:00
Damien Tournoud
cefe237c6f fix parsing of Authorization header 2014-08-22 18:41:26 +02:00
Grégoire Pineau
75afdef738 [FrameworkBundle] Expose configuration of PropertyAccess 2014-08-22 14:25:14 +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
Lee Rowlands
1ee96a8b1b Test examples from Drupal SA-CORE-2014-003 2014-08-22 11:57:03 +02:00
Nicolas Grekas
5506ee8f66 Fix potential DoS when parsing HOST 2014-08-22 11:56:47 +02:00
Tom Corrigan
580e1a7b46 [Validator] fixed: Expressions always valid for null values
The ExpressionValidator was incorrectly skipping validation of null or
empty string values.
2014-08-21 16:49:24 +10: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
14d3f97488 [Validator] add getConstraints to MetadataInterface 2014-08-20 16:22:55 +02:00
Issei.M
0deb505e64 [Form] FormBuilder::getIterator() now deals with resolved children 2014-08-20 19:06:28 +09: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
Bernhard Schussek
aa58bb8048 minor #11706 [Validator] ClassMetadata doc fix (Tobion)
This PR was merged into the 2.5 branch.

Discussion
----------

[Validator] ClassMetadata doc fix

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

- [Validator] fix return doc of ClassMetadata::getCascadingStrategy (int instead of bool)
- [Validator] remove duplicate interface implementations (they are already implemented by extension)

Commits
-------

1eec2d6 [Validator] remove duplicate interface implementations
6dd5592 [Validator] fix return doc of ClassMetadata::getCascadingStrategy
2014-08-20 10:30:39 +02:00
Christian Flothmann
a47a8848c3 add test for #11604
Adds a test case for #11604 to avoid regressions. The actual issue
has been fixed in Symfony 2.3 with the merge of #11615.
2014-08-19 17:38:34 +02:00
Tobias Schultze
04eb61b80e [Validator] deprecate member metadata accessors in favor of existing property metadata accessors
add changelog for deprecations

fix test
2014-08-19 17:31:17 +02:00
Tobias Schultze
1eec2d6fda [Validator] remove duplicate interface implementations 2014-08-19 17:15:19 +02:00
Tobias Schultze
6dd55923e3 [Validator] fix return doc of ClassMetadata::getCascadingStrategy 2014-08-19 17:01:40 +02:00
Bernhard Schussek
229355618b feature #11657 [Validator] Added ConstraintViolation::getConstraint() (webmozart)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[Validator] Added ConstraintViolation::getConstraint()

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

This PR adds a `getConstraint()` method to the `ConstraintViolation` in order to access the constraint causing the violation.

Related to #7276, #7273 and #9691.

Commits
-------

ce1d209 [Validator] Added ConstraintViolation::getConstraint()
2014-08-19 14:35:17 +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
ce1d2093bd [Validator] Added ConstraintViolation::getConstraint() 2014-08-19 11:39:05 +02:00
Bernhard Schussek
60a5863ba4 [Validator] Added date support to comparison constraints and Range 2014-08-19 11:31:05 +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
1d7599d97f Merge branch '2.5'
* 2.5:
  [Validator] Fixed missing use statements
  [Validators] Fixed failing tests requiring ICU 52.1 which are skipped otherwise
  [FrameworkBundle] Fixed validator factory definition when the Validator API is "auto" for PHP < 5.3.9
  return empty metadata collection if none do exist
2014-08-19 10:59:23 +02:00
Bernhard Schussek
fb97786a10 [Validator] Fixed missing use statements 2014-08-19 10:58:49 +02:00
Bernhard Schussek
59cd05f5b7 Merge branch '2.4' into 2.5
* 2.4:
  [Validators] Fixed failing tests requiring ICU 52.1 which are skipped otherwise
  return empty metadata collection if none do exist
2014-08-19 10:56:37 +02:00
Bernhard Schussek
9c69d7004d Merge branch '2.3' into 2.4
* 2.3:
  [Validators] Fixed failing tests requiring ICU 52.1 which are skipped otherwise
  return empty metadata collection if none do exist
2014-08-19 10:55:40 +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