Commit Graph

14533 Commits

Author SHA1 Message Date
Geoffrey Brier
ab1198f4da [DomCrawler] Fixed image input case sensitive 2014-05-12 11:38:26 +02:00
Fabien Potencier
7e4b4a7ebb Merge branch '2.4'
* 2.4:
  Lower mbstring dependency
  [Console]Improve formatter for double-width character
  Lower mbstring dep, remove it for Yaml and CssSelector components
  [Security] Add check for supported attributes in AclVoter
  [Form] Fixed TrimListenerTest as of PHP 5.5
  Added more IDE links
  [DependencyInjection] Fix parameter description in ConfigurationExtensionInterface
  [Security] fixed wrong PHPDoc of the TokenGeneratorInterface
  [Finder] fixed typehint of the Finder::addAdapter() method
  [TwigBridge][Transchoice] set %count% from the current context.
  [DependencyInjection] Fix travis unit tests
  Update PHPUnit before run
  [Validator] fixed wrong test
  [WebProfilerBundle] added test case for #10773
  [WebProfilerBundle] fixed profiler homepage, fixed #10806
  [WebProfilerBundle] Added test case for #10806
  changed travis to run on the nightly builds of HHVM until everything gets stable
  Fixed issue #5427
  Allow URLs that don't contain a path

Conflicts:
	.travis.yml
	src/Symfony/Component/Console/Application.php
2014-05-12 11:28:39 +02:00
Fabien Potencier
934cd28ba6 Merge branch '2.3' into 2.4
* 2.3:
  [Console]Improve formatter for double-width character
  Lower mbstring dep, remove it for Yaml and CssSelector components
  [Security] Add check for supported attributes in AclVoter
  [Form] Fixed TrimListenerTest as of PHP 5.5
  Added more IDE links
  [DependencyInjection] Fix parameter description in ConfigurationExtensionInterface
  [Finder] fixed typehint of the Finder::addAdapter() method
  [TwigBridge][Transchoice] set %count% from the current context.
  [DependencyInjection] Fix travis unit tests
  Update PHPUnit before run
  [Validator] fixed wrong test
  [WebProfilerBundle] added test case for #10773
  [WebProfilerBundle] fixed profiler homepage, fixed #10806
  [WebProfilerBundle] Added test case for #10806
  changed travis to run on the nightly builds of HHVM until everything gets stable
  Fixed issue #5427
  Allow URLs that don't contain a path

Conflicts:
	.travis.yml
2014-05-12 11:27:48 +02:00
Fabien Potencier
d9fec7065b minor #10890 Lower mbstring dep, remove it for Yaml and CssSelector components (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

Lower mbstring dep, remove it for Yaml and CssSelector components

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

Commits
-------

a4b805d Lower mbstring dep, remove it for Yaml and CssSelector components
2014-05-12 11:26:07 +02:00
Nicolas Grekas
6ab671361b Lower mbstring dependency 2014-05-12 11:22:51 +02:00
Fabien Potencier
a29a60debd bug #10714 [Console]Improve formatter for double-width character (denkiryokuhatsuden)
This PR was squashed before being merged into the 2.3 branch (closes #10714).

Discussion
----------

[Console]Improve formatter for double-width character

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | yes for one that expecting current broken output
| Deprecations? | no
| Fixed tickets |
| Tests pass?   | yes
| License       | MIT
| Doc PR        |

EDIT: fixed the table above not to remove irrelevant line

As mb_strlen just returns "how many chars in the string",
formatting with double-width character is bit broken.

The test I add is skipped when mbstring extension is not loaded.
I'm afraid if some of you cannot properly display japanese string.
(表示するテキスト just means "Some text to display")

Commits
-------

a52f41d [Console]Improve formatter for double-width character
2014-05-12 11:19:00 +02:00
Daisuke Ohata
a52f41d414 [Console]Improve formatter for double-width character 2014-05-12 11:16:18 +02:00
Nicolas Grekas
a4b805dbf2 Lower mbstring dep, remove it for Yaml and CssSelector components 2014-05-12 11:13:35 +02:00
Fabien Potencier
1a64fef828 bug #10872 [Form] Fixed TrimListenerTest as of PHP 5.5 (webmozart)
This PR was merged into the 2.3 branch.

Discussion
----------

[Form] Fixed TrimListenerTest as of PHP 5.5

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

Commits
-------

b0bc83d [Form] Fixed TrimListenerTest as of PHP 5.5
2014-05-12 11:08:11 +02:00
Fabien Potencier
fe75bc6248 feature #10880 [DependencyInjection] GraphvizDumper now displays unresolved parameters (rosstuck)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[DependencyInjection] GraphvizDumper now displays unresolved parameters

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

Previously, the graphviz dumper would throw an exception if given a container with an unresolved parameter. This change allows it to render the parameter name instead of the class name if the class can not be resolved. This is also closer to the other DI dumpers which do not error out in these circumstances but simply carry the parameter name over.

For a practical use case, see: https://github.com/rosstuck/TuckConverterBundle/issues/1

Commits
-------

f800e15 GraphizDumper now displays unresolved parameters
2014-05-09 17:34:01 +02:00
umpirsky
0cc9746f87 Fix issue #10867 2014-05-09 17:32:36 +02:00
Fabien Potencier
894b4a09b5 bug #10762 [BrowserKit] Allow URLs that don't contain a path when creating a cookie from a string (thewilkybarkid)
This PR was merged into the 2.3 branch.

Discussion
----------

[BrowserKit] Allow URLs that don't contain a path when creating a cookie from a string

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

The Cookie class doesn't require a path, but the `fromString()` static method does, so when URL given is something like http://www.example.com (ie no trailing slash) it currently throws an exception. This PR removes the requirement.

Commits
-------

fc1223f Allow URLs that don't contain a path
2014-05-09 17:26:55 +02:00
Ross Tuck
f800e15020 GraphizDumper now displays unresolved parameters
Previously it would crash when given a container with an unresolved
parameter. This change will instead show the parameter name on the
final diagram, instead of the class name.
2014-05-09 16:22:29 +02:00
Joseph Bielawski
de2410a8c2 [Console] Make Helper\Table::setStyle() chainable
Fixes #10874.
2014-05-09 10:15:02 +02:00
Arturs Vonda
a605a3d925 [Security] Add check for supported attributes in AclVoter 2014-05-08 18:38:48 +02:00
Bernhard Schussek
b0bc83d2ac [Form] Fixed TrimListenerTest as of PHP 5.5 2014-05-08 17:34:38 +02:00
Nicolas Grekas
485e04749c [Debug] enhance perf of DebugClassLoader 2014-05-08 10:31:54 +02:00
Wouter J
239b738e98 Added more IDE links 2014-05-05 21:19:04 +02:00
Nicolas Grekas
95f3276309 [Debug] fix handling deprecated warnings and stacked errors turned into exceptions 2014-05-05 07:50:37 +00:00
Fabien Potencier
19db5f7c4b feature #10843 [TwigBridge] Added compile-time issues checking in twig:lint command (maxromanovsky)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[TwigBridge] Added compile-time issues checking in twig:lint command

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

Commits
-------

418cea1 [TwigBridge] Added compile-time issues checking in twig:lint command
2014-05-04 19:06:57 +02:00
umpirsky
25f1d85d6b Fix issue 9172 2014-05-04 18:56:58 +02:00
Max
418cea174d [TwigBridge] Added compile-time issues checking in twig:lint command 2014-05-03 09:54:10 +00:00
n-aleha
93544aadfa [DependencyInjection] Fix parameter description in ConfigurationExtensionInterface
| Q             | A
| ------------- | ---
| Fixed tickets | #10845
| License       | MIT

This fixes the description of parameter `array $config` in file ConfigurationExtensionInterface.php by removing the extra `$config`.
2014-05-02 22:42:57 +00:00
Hugo Hamon
0e32676032 [Security] fixed wrong PHPDoc of the TokenGeneratorInterface 2014-05-02 15:46:37 +02:00
Fabien Potencier
c6d88a8cf8 bug #10833 [TwigBridge][Transchoice] set %count% from the current context. (aitboudad)
This PR was merged into the 2.3 branch.

Discussion
----------

[TwigBridge][Transchoice] set %count% from the current context.

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

Commits
-------

8f7b2cc [TwigBridge][Transchoice] set %count% from the current context.
2014-05-02 09:31:13 +02:00
Hugo Hamon
f3b0ef1a6f [Finder] fixed typehint of the Finder::addAdapter() method 2014-05-02 00:38:16 +02:00
Abdellatif Ait boudad
8f7b2cc44d [TwigBridge][Transchoice] set %count% from the current context. 2014-05-01 19:10:47 +01:00
Fabien Potencier
d1267cb2d7 minor #10819 Fix a test that was ambiguous (fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

Fix a test that was ambiguous

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | see #9634 for a discussion of this and #9383 for the report
| License       | MIT
| Doc PR        | n/a

This PR fixes a test that was always passing as the exception catch was catching the PHP notice but also the exception sent by `fail`, so it was useless. That said, I'm not even convinced that this test is useful at all.

Commits
-------

a94b4e0 [Validator] fixed wrong test
2014-05-01 08:28:42 +02:00
Fabien Potencier
1b6daf304f minor #10826 [2.3] Fix phpunit test suite on travis #2 (romainneutron)
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3] Fix phpunit test suite on travis #2

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

This is a second approach to solve #10821.
Something is weird: `Symfony\Component\Form\Tests\Extension\Core\EventListener\TrimListenerTest` passes when using PHPUnit as phar and fails when using a composer global install

Commits
-------

32e5f67 [DependencyInjection] Fix travis unit tests
c7befd5 Update PHPUnit before run
2014-04-30 18:56:37 +02:00
Romain Neutron
32e5f6727a [DependencyInjection] Fix travis unit tests 2014-04-30 17:29:47 +02:00
Fabien Potencier
a94b4e0ae2 [Validator] fixed wrong test 2014-04-30 16:30:03 +02:00
Tugdual Saunier
16dd0e5dda [WebProfilerBundle] added test case for #10773 2014-04-30 10:15:45 +02:00
Tugdual Saunier
5b91e70777 [WebProfilerBundle] fixed profiler homepage, fixed #10806 2014-04-30 10:11:17 +02:00
Tugdual Saunier
7b425d229d [WebProfilerBundle] Added test case for #10806 2014-04-30 10:11:11 +02:00
Fabien Potencier
8f8b20c16f minor #10811 Use absolute URLs to assets on Symfony its internal pages. (RubenKruiswijk)
This PR was merged into the 2.5-dev branch.

Discussion
----------

Use absolute URLs to assets on Symfony its internal pages.

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

Commits
-------

e401533 Use absolute URLs to assets on Symfony its internal pages.
2014-04-30 09:36:21 +02:00
Fabien Potencier
135c174ee1 bug #10809 Fixed composer to include config component for mocks in phpunit (jpauli)
This PR was merged into the 2.5-dev branch.

Discussion
----------

Fixed composer to include config component for mocks in phpunit

Commits
-------

939e92d Fixed composer to include config component for mocks in phpunit
2014-04-30 08:46:20 +02:00
umpirsky
f308f521a6 Fixed issue #5427 2014-04-30 08:40:38 +02:00
Fabien Potencier
afca3cdf2d Revert "bug #10817 [Debug] fix #10313: FlattenException not found (nicolas-grekas)"
reverted in 2.5 as it does not make sense here.

This reverts commit c18bf19016, reversing
changes made to 585b61db95.
2014-04-30 08:24:35 +02:00
Fabien Potencier
49bc4f1469 Merge branch '2.4'
* 2.4:
  [Debug] fix #10313: FlattenException not found because of https://bugs.php.net/42098
2014-04-30 08:22:38 +02:00
Fabien Potencier
272490312a Merge branch '2.3' into 2.4
* 2.3:
  [Debug] fix #10313: FlattenException not found because of https://bugs.php.net/42098
2014-04-30 08:22:28 +02:00
Nicolas Grekas
b147cfaf15 [Debug] fix #10313: FlattenException not found because of https://bugs.php.net/42098 2014-04-29 21:42:43 +02:00
Ruben Kruiswijk
e40153354d Use absolute URLs to assets on Symfony its internal pages. 2014-04-29 13:32:21 +02:00
Fabien Potencier
89f7907c4f bumped Symfony version to 2.5.0 2014-04-29 12:38:03 +02:00
Julien Pauli
939e92d3ca Fixed composer to include config component for mocks in phpunit 2014-04-29 12:13:57 +02:00
Fabien Potencier
aea2c6427e updated VERSION for 2.5.0-BETA2 2014-04-29 09:08:19 +02:00
Fabien Potencier
9c202eacbc Merge branch '2.4'
* 2.4:
  [Debug] fix ErrorHandlerTest when context is not an array
2014-04-29 08:56:05 +02:00
Fabien Potencier
f800ade034 Merge branch '2.3' into 2.4
* 2.3:
  [Debug] fix ErrorHandlerTest when context is not an array

Conflicts:
	src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php
2014-04-29 08:55:57 +02:00
Nicolas Grekas
988a5dc937 [Debug] fix ErrorHandlerTest when context is not an array 2014-04-28 20:50:14 +02:00
Fabien Potencier
63d1255078 Merge branch '2.4'
* 2.4:
  [Debug] ErrorHandler: remove $GLOBALS from context in PHP5.3 fix #10292
  Allow File instance to be passed to BinaryFileResponse
  Add upgrade instructions for the LoggerInterface
  fixed CS
  Removed strict check when found variables inside a translation
  [ExpressionLanguage] Test for the non-strict in_array check in parsePrimaryExpression in Parser.php
  Strict in_array check in Parser.php
  Updated Serbian latin validation translation

Conflicts:
	src/Symfony/Component/Debug/ErrorHandler.php
2014-04-28 19:44:51 +02:00
Fabien Potencier
b1c4ece2d5 Merge branch '2.3' into 2.4
* 2.3:
  [Debug] ErrorHandler: remove $GLOBALS from context in PHP5.3 fix #10292
  Allow File instance to be passed to BinaryFileResponse
  Add upgrade instructions for the LoggerInterface
  fixed CS
  Removed strict check when found variables inside a translation
2014-04-28 19:43:58 +02:00
Fabien Potencier
48f26f7e94 bug #10801 [Debug] ErrorHandler: remove $GLOBALS from context in PHP5.3 fix #10292 (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[Debug] ErrorHandler: remove $GLOBALS from context in PHP5.3 fix #10292

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

Commits
-------

ed0ed80 [Debug] ErrorHandler: remove $GLOBALS from context in PHP5.3 fix #10292
2014-04-28 18:51:21 +02:00
Nicolas Grekas
ed0ed80286 [Debug] ErrorHandler: remove $GLOBALS from context in PHP5.3 fix #10292 2014-04-28 18:43:50 +02:00
Andreas Lutro
fc04ad2134 Allow File instance to be passed to BinaryFileResponse 2014-04-28 18:17:17 +02:00
Nicolas Grekas
d7a186f5ca [Debug] less intrusive work around for https://bugs.php.net/54275 2014-04-28 18:08:18 +02:00
Fabien Potencier
f4f09d176b bug #10798 [Console] Fix #10795: Allow instancing Console Application when STDIN is not declared (romainneutron)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[Console] Fix #10795: Allow instancing Console Application when STDIN is not declared

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

Commits
-------

3a5a525 [Console] Fix #10795: Allow instancing Console Application when STDIN is not declared
2014-04-28 15:26:08 +02:00
Romain Neutron
3a5a525aee [Console] Fix #10795: Allow instancing Console Application when STDIN is not declared 2014-04-28 14:32:01 +02:00
Fabien Potencier
17d7186cf8 fixed CS 2014-04-28 11:30:24 +02:00
Asmir Mustafic
074191e705 Removed strict check when found variables inside a translation 2014-04-28 11:28:59 +02:00
Dmitry Parnas
154c4a598a [ExpressionLanguage] Test for the non-strict in_array check in parsePrimaryExpression in Parser.php 2014-04-28 11:05:23 +02:00
parnas
e46513557a Strict in_array check in Parser.php
Otherwise it doesn't throw an error for the cases when passed parameters array includes zero key.
2014-04-28 11:05:23 +02:00
umpirsky
43e65dea9a Updated Serbian latin validation translation 2014-04-28 07:16:03 +02:00
Fabien Potencier
23286bc512 Merge branch '2.4'
* 2.4:
  bumped Symfony version to 2.4.5
  updated VERSION for 2.4.4
  updated CHANGELOG for 2.4.4
  bumped Symfony version to 2.3.14
  updated VERSION for 2.3.13
  update CONTRIBUTORS for 2.3.13
  updated CHANGELOG for 2.3.13
  Updated Serbian validation translation
  [Console] Fixed the rendering of exceptions on HHVM with a terminal width
  [WebProfilerBundle ] Fixed an edge case on WDT loading
  [Security] removed $csrfTokenManager type hint from SimpleFormAuthenticationListener constructor argument
  fixed typo
  [Process] Disable TTY mode on Windows platform
  [Validator] added missing ANNOTATION config to @Target annotation
  [Finder] Fix ignoring of unreadable dirs in the RecursiveDirectoryIterator.

Conflicts:
	src/Symfony/Component/HttpKernel/Kernel.php
2014-04-28 07:15:04 +02:00
Fabien Potencier
47d1af1ef1 bumped Symfony version to 2.4.5 2014-04-27 20:41:56 +02:00
Fabien Potencier
4697c33cdf updated VERSION for 2.4.4 2014-04-27 15:39:18 +02:00
Fabien Potencier
8003cfe801 Merge branch '2.3' into 2.4
* 2.3:
  bumped Symfony version to 2.3.14
  updated VERSION for 2.3.13
  update CONTRIBUTORS for 2.3.13
  updated CHANGELOG for 2.3.13
  [Console] Fixed the rendering of exceptions on HHVM with a terminal width
  [WebProfilerBundle ] Fixed an edge case on WDT loading
  fixed typo
  [Process] Disable TTY mode on Windows platform
  [Validator] added missing ANNOTATION config to @Target annotation
  [Finder] Fix ignoring of unreadable dirs in the RecursiveDirectoryIterator.

Conflicts:
	src/Symfony/Component/HttpKernel/Kernel.php
	src/Symfony/Component/Validator/Constraints/Callback.php
2014-04-27 15:34:57 +02:00
Fabien Potencier
d28149f75e bumped Symfony version to 2.3.14 2014-04-27 15:17:08 +02:00
Lars Strojny
b67ed43d32 Allow overloading ContextListener::refreshUser() 2014-04-27 11:38:05 +02:00
Fabien Potencier
9c4b11915d updated VERSION for 2.3.13 2014-04-27 10:34:33 +02:00
umpirsky
c9bb6c3990 Updated Serbian validation translation 2014-04-26 20:23:59 +02:00
Christophe Coevoet
6e57380d14 [Console] Fixed the rendering of exceptions on HHVM with a terminal width 2014-04-26 13:09:19 +02:00
Kévin Dunglas
a702124efb [SecurityBundle] added acl:set command 2014-04-25 18:41:16 +02:00
Fabien Potencier
555fde54fa bug #10773 [WebProfilerBundle ] Fixed an edge case on WDT loading (tucksaun)
This PR was squashed before being merged into the 2.3 branch (closes #10773).

Discussion
----------

[WebProfilerBundle ] Fixed an edge case on WDT loading

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

In some case you can notice the WDT just disappears.
By tracking it down, I noticed that the XHR call returns an empty response with 200 as status code, but if you go directly on the _wdt/my_token URL it works correctly.
What's happening is that when you have a slow listener on `kernel.terminate` (for example the SwiftMailer one with a slow connection), you response (and therefore the WDT javascript) is sent and processed by the browser, the XHR call is done, but the Profiler storage didn't happened yet so no profiling data is available and the `ProfilerController` just sends an empty response with 200 as status code.

Here we change to instead send a specific status code, and treat it in javascript by retrying several times before failing.

The question are:
* Is 204 the most appropriate response code?
* Are 500 ms and 5 max retries good values?

Commits
-------

9d885ed [WebProfilerBundle ] Fixed an edge case on WDT loading
2014-04-25 14:19:16 +02:00
Tugdual Saunier
9d885ed898 [WebProfilerBundle ] Fixed an edge case on WDT loading 2014-04-25 14:19:13 +02:00
Fabien Potencier
7f7e2d8954 [FrameworkBundle] removed support for HHVM built-in web server as it is deprecated now 2014-04-25 13:40:15 +02:00
Choong Wei Tjeng
b0202077fe [Security] removed $csrfTokenManager type hint from SimpleFormAuthenticationListener constructor argument 2014-04-25 09:06:20 +02:00
Arash Tabriziyan
dc3f3505e8 fixed typo 2014-04-25 08:54:53 +02:00
Nicolas Grekas
e3566c27b7 [Debug] fix #10771 DebugClassLoader can't load PSR4 libs 2014-04-24 17:48:28 +02:00
Fabien Potencier
544e43f5e2 bug #10763 [Process] Disable TTY mode on Windows platform (romainneutron)
This PR was merged into the 2.3 branch.

Discussion
----------

[Process] Disable TTY mode on Windows platform

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

Commits
-------

7942c2a [Process] Disable TTY mode on Windows platform
2014-04-24 15:28:08 +02:00
Romain Neutron
7942c2a64c [Process] Disable TTY mode on Windows platform 2014-04-24 14:53:00 +02:00
Fabien Potencier
67be44737e [Validator] added missing ANNOTATION config to @Target annotation 2014-04-24 07:32:02 +02:00
Jakub Zalas
13466415c4 [Finder] Fix ignoring of unreadable dirs in the RecursiveDirectoryIterator. 2014-04-23 22:00:27 +01:00
Fabien Potencier
aa5d62d8bc fixed typo 2014-04-23 17:17:21 +02:00
Fabien Potencier
61e287e0b6 Merge branch '2.4'
* 2.4:
  [Validator] added missing @Target
  [Validator] fixed @Target config
  added @Target annotations
  [Process] Add missing docblocks, remove variable declarations

Conflicts:
	src/Symfony/Component/Process/Process.php
	src/Symfony/Component/Process/ProcessBuilder.php
2014-04-23 16:08:54 +02:00
Fabien Potencier
dd175cfcd8 [Validator] added missing @Target 2014-04-23 16:07:18 +02:00
Fabien Potencier
99ca3f384e [Validator] fixed @Target config 2014-04-23 16:07:13 +02:00
Fabien Potencier
2a947953d5 Merge branch '2.3' into 2.4
* 2.3:
  added @Target annotations
2014-04-23 16:04:21 +02:00
Fabien Potencier
542d6fa580 added @Target annotations 2014-04-23 15:35:47 +02:00
Fabien Potencier
c87cfa2f5c Merge branch '2.3' into 2.4
* 2.3:
  [Process] Add missing docblocks, remove variable declarations

Conflicts:
	src/Symfony/Component/Process/ProcessBuilder.php
2014-04-23 08:33:25 +02:00
Fabien Potencier
5947eec36f minor #10756 [2.3][Process] Add missing docblocks, remove variable declarations (romainneutron)
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3][Process] Add missing docblocks, remove variable declarations

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

Commits
-------

ff77f24 [Process] Add missing docblocks, remove variable declarations
2014-04-23 08:32:13 +02:00
thewilkybarkid
fc1223f924 Allow URLs that don't contain a path 2014-04-22 15:58:51 +01:00
Romain Neutron
ff77f24092 [Process] Add missing docblocks, remove variable declarations 2014-04-22 10:47:56 +02:00
Fabien Potencier
6658989fb8 Merge branch '2.4'
* 2.4:
  fix docblock
  Fixed incompatibility of x509 auth with nginx
  [Process] Setting STDIN while running should not be possible
  [Validator] slovenian translation updated
  [FrameworkBundle] improve English in RouterMatchCommand
  [Validator] Updated Hungarian translations
  [Doctrine Bridge] simplify session handler by using main connection
  [Validator] Fixed typos in German translation
  [Validator] Completed French translations
  [Validator] Completed German translations
  [Validator] Completed Luxembourgish translations
2014-04-22 10:11:23 +02:00
Fabien Potencier
0deaceb2ff Merge branch '2.3' into 2.4
* 2.3:
  fix docblock
  Fixed incompatibility of x509 auth with nginx
  [Process] Setting STDIN while running should not be possible
  [FrameworkBundle] improve English in RouterMatchCommand
  [Doctrine Bridge] simplify session handler by using main connection

Conflicts:
	src/Symfony/Component/Process/Tests/AbstractProcessTest.php
2014-04-22 10:11:06 +02:00
Loick Piera
68debfb190 fix docblock 2014-04-22 10:09:28 +02:00
Fabien Potencier
5cae63f084 minor #10752 [FrameworkBundle] improve English in RouterMatchCommand (shieldo)
This PR was merged into the 2.3 branch.

Discussion
----------

[FrameworkBundle] improve English in RouterMatchCommand

Improve English in command output.

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

Commits
-------

dd26d1e [FrameworkBundle] improve English in RouterMatchCommand
2014-04-22 09:21:18 +02:00
Fabien Potencier
882e9bac1e bug #10757 [2.3][Process] Setting STDIN while running should not be possible (romainneutron)
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3][Process] Setting STDIN while running should not be possible

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

Commits
-------

3e3517a [Process] Setting STDIN while running should not be possible
2014-04-22 09:18:13 +02:00
Fabien Potencier
4dcb158ba1 bug #10749 Fixed incompatibility of x509 auth with nginx (alcaeus)
This PR was squashed before being merged into the 2.3 branch (closes #10749).

Discussion
----------

Fixed incompatibility of x509 auth with nginx

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

This commit fixes x509 authentication when using nginx as web server.
X509AuthenticationListener depends on the SSL_CLIENT_S_DN_Email field being set.
As is, this field is specific to Apache and cannot be provided by nginx. nginx
can provide the DN of the certificate in SSL_CLIENT_S_DN. If the email field is
not set, the listener tries to extract the email address from the DN.

Commits
-------

ba8fc16 Fixed incompatibility of x509 auth with nginx
2014-04-22 09:12:34 +02:00
alcaeus
ba8fc166ca Fixed incompatibility of x509 auth with nginx 2014-04-22 09:12:31 +02:00
Romain Neutron
3e3517abfd [Process] Setting STDIN while running should not be possible 2014-04-21 23:11:42 +02:00
Peter Kokot
c6c5cad5a3 [Validator] slovenian translation updated 2014-04-21 21:16:29 +02:00
Douglas Greenshields
dd26d1e50a [FrameworkBundle] improve English in RouterMatchCommand 2014-04-21 15:42:14 +01:00
Gábor Egyed
e9e09fd48a [Validator] Updated Hungarian translations 2014-04-21 03:18:54 +02:00
Tobias Schultze
6518b74995 [Doctrine Bridge] simplify session handler by using main connection 2014-04-20 18:21:59 +02:00
Michel Weimerskirch
5e1ee8aa3c [Validator] Fixed typos in German translation 2014-04-20 11:40:39 +02:00
Fabien Potencier
a594e46199 minor #10744 [Validator] Completed Luxembourgish translations (mweimerskirch)
This PR was merged into the 2.4 branch.

Discussion
----------

[Validator] Completed Luxembourgish translations

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

Commits
-------

bc66e8f [Validator] Completed Luxembourgish translations
2014-04-20 09:33:50 +02:00
Fabien Potencier
00d779e120 minor #10745 [Validator] Completed German translations (mweimerskirch)
This PR was merged into the 2.4 branch.

Discussion
----------

[Validator] Completed German translations

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

Commits
-------

47e5a4b [Validator] Completed German translations
2014-04-20 09:32:46 +02:00
Michel Weimerskirch
dcc34c1698 [Validator] Completed French translations
| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | n/a
| Fixed tickets | -
| License       | MIT
| Doc PR        | -
2014-04-20 01:24:43 +02:00
Michel Weimerskirch
47e5a4b198 [Validator] Completed German translations 2014-04-20 01:08:17 +02:00
Michel Weimerskirch
bc66e8f158 [Validator] Completed Luxembourgish translations 2014-04-20 01:07:01 +02:00
Fabien Potencier
27e1a893a0 feature #10725 [Debug] Handled errors (nicolas-grekas)
This PR was squashed before being merged into the 2.5-dev branch (closes #10725).

Discussion
----------

[Debug] Handled errors

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

Enhance error handling and thus displaying for catchable PHP errors.
Code is tricky thanks to https://bugs.php.net/54275

Before:

![capture du 2014-04-17 10 03 40](https://cloud.githubusercontent.com/assets/243674/2729324/4de3eedc-c607-11e3-8b23-c88657bbecd0.png)

After:

![capture du 2014-04-17 10 03 14](https://cloud.githubusercontent.com/assets/243674/2729326/534ec504-c607-11e3-82dd-49b7770b1e75.png)

Commits
-------

0279fbf [Debug] Handled errors
2014-04-19 10:12:20 +02:00
Nicolas Grekas
0279fbfdad [Debug] Handled errors 2014-04-19 10:12:16 +02:00
Fabien Potencier
02fdbb25ad Merge branch '2.4'
* 2.4:
  Little correction for case 'ar'
  No need to use mb functions here
  Fix doc-blocks
  Fix doc blocks
  [HttpFoundation] update phpdoc of SessionHandlerInterface and unify parameters of all handlers according to interface
  [Doctrine Bridge] fix DbalSessionHandler for high concurrency, interface compliance, compatibility with all drivers (oci8, mysqli, pdo with mysql, sqlsrv, sqlite)
  [Finder] Marked test skipped when ftp stream wrapper is not available

Conflicts:
	src/Symfony/Component/Security/Core/Authorization/Voter/ExpressionVoter.php
2014-04-18 23:02:40 +02:00
Fabien Potencier
bbadcfd01b Merge branch '2.3' into 2.4
* 2.3:
  Little correction for case 'ar'
  No need to use mb functions here
  [HttpFoundation] update phpdoc of SessionHandlerInterface and unify parameters of all handlers according to interface
  [Doctrine Bridge] fix DbalSessionHandler for high concurrency, interface compliance, compatibility with all drivers (oci8, mysqli, pdo with mysql, sqlsrv, sqlite)
  [Finder] Marked test skipped when ftp stream wrapper is not available
2014-04-18 23:02:05 +02:00
klyk50
ef85f4cd97 Little correction for case 'ar' 2014-04-18 23:01:08 +02:00
Fabien Potencier
7b7a0efce2 minor #10719 [Finder] Marked test skipped when ftp stream wrapper is not available (deguif)
This PR was merged into the 2.3 branch.

Discussion
----------

[Finder] Marked test skipped when ftp stream wrapper is not available

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

This should prevent test from failing on hhvm as ftp stream wrapper is not currently implemented.
See https://github.com/facebook/hhvm/issues/2108 for more details.

Commits
-------

f35fc81 [Finder] Marked test skipped when ftp stream wrapper is not available
2014-04-18 22:56:28 +02:00
Fabien Potencier
5eacace321 bug #10720 [HttpFoundation] Fix DbalSessionHandler (Tobion)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpFoundation] Fix DbalSessionHandler

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

This is basically the same as #10652 for the DbalSessionHandler.

- First commit fixes fix DbalSessionHandler for high concurrency, interface compliance, compatibility with all drivers (oci8, mysqli, pdo with mysql, sqlsrv, sqlite).
- Second commit updates phpdoc of SessionHandlerInterface and unifies parameters of all handlers according to interface (so inheritdoc actually makes sense).

Commits
-------

524bf84 [HttpFoundation] update phpdoc of SessionHandlerInterface and unify parameters of all handlers according to interface
ccdfbe6 [Doctrine Bridge] fix DbalSessionHandler for high concurrency, interface compliance, compatibility with all drivers (oci8, mysqli, pdo with mysql, sqlsrv, sqlite)
2014-04-18 22:55:02 +02:00
Romain Neutron
90294ec90c Fix doc blocks 2014-04-18 22:54:24 +02:00
Miha Vrhovnik
4e8ba13874 No need to use mb functions here
When mb functions are used and a large response is given the OOM happens as mb functions will use large quantities of memory.
2014-04-18 22:46:01 +02:00
Romain Neutron
7fab25e48d Fix doc-blocks 2014-04-18 22:45:55 +02:00
Fabien Potencier
7505c19dec minor #10738 [2.4] Fix doc blocks (romainneutron)
This PR was merged into the 2.4 branch.

Discussion
----------

[2.4] Fix doc blocks

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

this follows #10737

Commits
-------

c01915d Fix doc blocks
2014-04-18 22:41:38 +02:00
Fabien Potencier
8ef8a1d289 unified return null usages 2014-04-18 22:40:52 +02:00
Fabien Potencier
0bab829372 Merge branch '2.4'
* 2.4:
  unified return null usages
  [Validator] added Japanese translation
  Textarea value should default to empty string instead of null.
  Fix doc blocks
  [Process] Fix #10681, process are failing on Windows Server 2003
  updated doc
  [Security] fix DBAL connection typehint
  [HttpFoundation] status 201 is allowed to have a body
  unified return null usages

Conflicts:
	src/Symfony/Component/DependencyInjection/ContainerBuilder.php
	src/Symfony/Component/DomCrawler/Crawler.php
	src/Symfony/Component/Security/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php
2014-04-18 22:40:13 +02:00
Fabien Potencier
e50d263f7a unified return null usages 2014-04-18 22:38:54 +02:00
Romain Neutron
c01915da95 Fix doc blocks 2014-04-18 22:37:14 +02:00
Fabien Potencier
2827747108 Merge branch '2.3' into 2.4
* 2.3:
  Textarea value should default to empty string instead of null.
  Fix doc blocks
  [Process] Fix #10681, process are failing on Windows Server 2003
  [Security] fix DBAL connection typehint
  [HttpFoundation] status 201 is allowed to have a body
  unified return null usages

Conflicts:
	src/Symfony/Component/Console/Helper/DescriptorHelper.php
	src/Symfony/Component/DependencyInjection/ContainerBuilder.php
	src/Symfony/Component/Finder/Tests/Iterator/RecursiveDirectoryIteratorTest.php
	src/Symfony/Component/Form/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformer.php
	src/Symfony/Component/HttpKernel/Fragment/InlineFragmentRenderer.php
2014-04-18 22:37:09 +02:00
Fabien Potencier
5b72e5ab04 minor #10717 unified return null usages (fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

unified return null usages

| Q             | A
| ------------- | ---
| License       | MIT

This PR unifies the way we return `null` from a function or method:

 * always use `return;` instead of `return null;` (the current code base uses both);
 * never use `return;` at the end of a function/method.

Commits
-------

d1d569b unified return null usages
2014-04-18 22:35:25 +02:00
Fabien Potencier
b2e906ea41 minor #10726 [HttpFoundation] factorize out the way output buffers should be closed (nicolas-grekas)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[HttpFoundation] factorize out the way output buffers should be closed

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

Closing output buffers was done in three different files, but not exactly the same way, with subtle differences.
This PR factorizes out the best way to do this in a new public static function of the Response class.

Commits
-------

469943c [HttpFoundation] factorize out the way output buffers should be closed
2014-04-18 22:33:23 +02:00
Fabien Potencier
78e72fe3bf bug #10721 [HttpFoundation] status 201 is allowed to have a body (Tobion)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpFoundation] status 201 is allowed to have a body

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | only if someone relied on wrong behavior
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #10673
| License       | MIT

Status 201 is allowed to have a response body.

Commits
-------

1761f64 [HttpFoundation] status 201 is allowed to have a body
2014-04-18 22:26:13 +02:00
Fabien Potencier
45184aac06 bug #10728 [2.3][Process] Fix #10681, process are failing on Windows Server 2003 (romainneutron)
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3][Process] Fix #10681, process are failing on Windows Server 2003

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

Commits
-------

46fdfbb [Process] Fix #10681, process are failing on Windows Server 2003
2014-04-18 22:23:17 +02:00
Issei.M
7b91e03251 [Validator] added Japanese translation 2014-04-18 22:22:10 +02:00
Fabien Potencier
4f9e05cb55 minor #10737 [2.3] Fix doc blocks (romainneutron)
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3] Fix doc blocks

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

Commits
-------

de5d627 Fix doc blocks
2014-04-18 22:20:50 +02:00
Sascha Grossenbacher
f6725648cc Textarea value should default to empty string instead of null. 2014-04-18 22:19:23 +02:00
Romain Neutron
de5d62775a Fix doc blocks 2014-04-18 22:17:16 +02:00
Fabien Potencier
3c42345293 fixed typo 2014-04-18 21:44:02 +02:00
ibasaw
e0433297b2 Update PackageInterface.php 2014-04-18 13:56:04 +02:00
Nicolas Grekas
469943cd1c [HttpFoundation] factorize out the way output buffers should be closed 2014-04-17 16:18:17 +00:00
Romain Neutron
46fdfbbdef [Process] Fix #10681, process are failing on Windows Server 2003 2014-04-17 14:29:47 +02:00
Issei.M
b1202b030b updated doc 2014-04-17 15:05:16 +09:00
Tobias Schultze
c05edcc68d [Security] fix DBAL connection typehint 2014-04-17 00:04:03 +02:00
Tobias Schultze
1761f64023 [HttpFoundation] status 201 is allowed to have a body 2014-04-16 23:31:51 +02:00
Tobias Schultze
524bf846db [HttpFoundation] update phpdoc of SessionHandlerInterface and unify parameters of all handlers according to interface 2014-04-16 17:40:08 +02:00
Tobias Schultze
ccdfbe6628 [Doctrine Bridge] fix DbalSessionHandler for high concurrency, interface compliance, compatibility with all drivers (oci8, mysqli, pdo with mysql, sqlsrv, sqlite) 2014-04-16 17:38:17 +02:00
Fabien Potencier
f72eb34fc4 fixed types in phpdocs 2014-04-16 12:36:34 +02:00
Fabien Potencier
2314328b16 Merge branch '2.4'
* 2.4:
  fixed types in phpdocs
  fixed types in phpdocs

Conflicts:
	src/Symfony/Component/Security/Core/Encoder/BasePasswordEncoder.php
	src/Symfony/Component/Security/Http/RememberMe/TokenBasedRememberMeServices.php
	src/Symfony/Component/Serializer/Encoder/JsonEncoder.php
	src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php
	src/Symfony/Component/Validator/Mapping/ClassMetadata.php
	src/Symfony/Component/Validator/Mapping/ElementMetadata.php
	src/Symfony/Component/Validator/Mapping/MemberMetadata.php
	src/Symfony/Component/Validator/MetadataFactoryInterface.php
2014-04-16 12:36:21 +02:00
Fabien Potencier
0ecdda1770 fixed types in phpdocs 2014-04-16 12:34:42 +02:00
Fabien Potencier
d5bd9bdd68 Merge branch '2.3' into 2.4
* 2.3:
  fixed types in phpdocs

Conflicts:
	src/Symfony/Bridge/Twig/TwigEngine.php
	src/Symfony/Bundle/FrameworkBundle/Templating/Loader/FilesystemLoader.php
	src/Symfony/Component/Filesystem/Tests/FilesystemTest.php
	src/Symfony/Component/Form/Extension/Core/ChoiceList/SimpleChoiceList.php
	src/Symfony/Component/HttpKernel/Controller/ControllerResolver.php
	src/Symfony/Component/HttpKernel/Controller/ControllerResolverInterface.php
	src/Symfony/Component/PropertyAccess/PropertyAccessorBuilder.php
	src/Symfony/Component/Serializer/Encoder/XmlEncoder.php
	src/Symfony/Component/Stopwatch/StopwatchEvent.php
	src/Symfony/Component/Templating/PhpEngine.php
2014-04-16 12:34:31 +02:00
Fabien Potencier
e96b018805 fixed types in phpdocs 2014-04-16 12:30:19 +02:00
François-Xavier de Guillebon
f35fc818d1 [Finder] Marked test skipped when ftp stream wrapper is not available 2014-04-16 11:24:56 +02:00
Fabien Potencier
339c0c8099 made {@inheritdoc} annotations consistent across the board 2014-04-16 10:09:16 +02:00
Fabien Potencier
24dde55feb made types consistent with those defined in Hack 2014-04-16 10:09:01 +02:00
Fabien Potencier
df3d543349 Merge branch '2.4'
* 2.4:
  made types consistent with those defined in Hack
  made {@inheritdoc} annotations consistent across the board
  made {@inheritdoc} annotations consistent across the board
  fixed types in phpdocs
  [Debug] Fixed ClassNotFoundFatalErrorHandler on windows.
  made phpdoc types consistent with those defined in Hack
  Add support Thai translations
  [Validator] Add missing czech translations
  made types consistent with those defined in Hack
  removed extra/unsupported arguments
  [HttpKernel] fixed an error message
  [TwigBundle] removed undefined argument
  [Translation] Make IcuDatFileLoader/IcuResFileLoader::load invalid resource compatible with HHVM.

Conflicts:
	src/Symfony/Component/Console/Helper/TableHelper.php
	src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php
	src/Symfony/Component/Form/FormError.php
	src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php
	src/Symfony/Component/Process/ProcessPipes.php
	src/Symfony/Component/PropertyAccess/PropertyAccessor.php
	src/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.php
	src/Symfony/Component/Security/Http/RememberMe/TokenBasedRememberMeServices.php
	src/Symfony/Component/Translation/Dumper/FileDumper.php
	src/Symfony/Component/Validator/ConstraintViolation.php
	src/Symfony/Component/Validator/Constraints/EmailValidator.php
	src/Symfony/Component/Validator/ExecutionContextInterface.php
	src/Symfony/Component/Validator/Mapping/BlackholeMetadataFactory.php
2014-04-16 10:08:40 +02:00
Fabien Potencier
041cb7b103 made types consistent with those defined in Hack 2014-04-16 10:04:32 +02:00
Fabien Potencier
03f0c2de8a made {@inheritdoc} annotations consistent across the board 2014-04-16 10:03:46 +02:00
Fabien Potencier
29b6f6b3a0 Merge branch '2.3' into 2.4
* 2.3:
  made {@inheritdoc} annotations consistent across the board
  fixed types in phpdocs
  made phpdoc types consistent with those defined in Hack
  Add support Thai translations
  made types consistent with those defined in Hack
  removed extra/unsupported arguments
  [HttpKernel] fixed an error message
  [TwigBundle] removed undefined argument
  [Translation] Make IcuDatFileLoader/IcuResFileLoader::load invalid resource compatible with HHVM.

Conflicts:
	src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Fixtures/php/lazy_service.php
	src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php
	src/Symfony/Bundle/FrameworkBundle/Templating/Loader/FilesystemLoader.php
	src/Symfony/Bundle/WebProfilerBundle/EventListener/WebDebugToolbarListener.php
	src/Symfony/Component/Config/Definition/ReferenceDumper.php
	src/Symfony/Component/Console/Helper/DescriptorHelper.php
	src/Symfony/Component/Debug/ErrorHandler.php
	src/Symfony/Component/Finder/Tests/Iterator/RecursiveDirectoryIteratorTest.php
	src/Symfony/Component/Form/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformer.php
	src/Symfony/Component/Form/Tests/Extension/Core/DataMapper/PropertyPathMapperTest.php
	src/Symfony/Component/HttpFoundation/Response.php
	src/Symfony/Component/HttpFoundation/StreamedResponse.php
	src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php
	src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php
	src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php
	src/Symfony/Component/HttpKernel/Fragment/RoutableFragmentRenderer.php
	src/Symfony/Component/HttpKernel/Kernel.php
	src/Symfony/Component/HttpKernel/Tests/Fixtures/KernelForTest.php
	src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php
	src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php
	src/Symfony/Component/Stopwatch/StopwatchPeriod.php
	src/Symfony/Component/Translation/TranslatorInterface.php
	src/Symfony/Component/Validator/ConstraintValidatorFactory.php
2014-04-16 10:02:57 +02:00
Fabien Potencier
d1d569bf7b unified return null usages 2014-04-16 09:43:51 +02:00
Fabien Potencier
d56ea768cc minor #10713 made {@inheritdoc} annotations consistent across the board (fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

made {@inheritdoc} annotations consistent across the board

| Q             | A
| ------------- | ---
| License       | MIT

Commits
-------

810b9ed made {@inheritdoc} annotations consistent across the board
2014-04-16 09:04:52 +02:00
Fabien Potencier
810b9ed107 made {@inheritdoc} annotations consistent across the board 2014-04-16 09:04:20 +02:00
Fabien Potencier
a693545324 fixed types in phpdocs 2014-04-16 08:51:57 +02:00
Grégoire Pineau
2ce8cd993e [Debug] Fixed ClassNotFoundFatalErrorHandler on windows.
Because $path is realpath'ed. So we have to use DIRECTORY_SEPARATOR
instead of / because the default directory separator on windows is
\. And so the str_replace can not work and can lead to a fatal error
because class could already be loaded. For example, the Response class
in symfony full stack is in the bootstrap.php.cache.
2014-04-15 18:41:05 +02:00
Fabien Potencier
c2e134fbb9 minor #10701 Made types used by Symfony compatible with the ones of Hack (fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

Made types used by Symfony compatible with the ones of Hack

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

PHP supports several ways to express types: like Boolean/bool or integer/int. Hack only supports one of them, so this PR proposes to use the Hack type to make Symfony a bit more "compatible" with Hack (gradual upgrade ;)).

Commits
-------

3c9c10f made phpdoc types consistent with those defined in Hack
0555b7f made types consistent with those defined in Hack
2014-04-15 07:44:12 +02:00
Fabien Potencier
3c9c10f3a0 made phpdoc types consistent with those defined in Hack 2014-04-15 07:41:45 +02:00
Fabien Potencier
5033e7ac3b minor #10708 Add support Thai translations (liverbool)
This PR was squashed before being merged into the 2.3 branch (closes #10708).

Discussion
----------

Add support Thai translations

Add [Thai](http://www.thai-language.com/) translations to:
+ Symfony/Component/Validator/Resources/translations/
+ Symfony/Component/Security/Resources/translations/

Commits
-------

4bc2951 Add support Thai translations
2014-04-15 07:28:39 +02:00
ツ Liverbool
4bc2951616 Add support Thai translations 2014-04-15 07:28:35 +02:00
jskvara
995ec7208d [Validator] Add missing czech translations 2014-04-15 00:10:03 +01:00
Fabien Potencier
0555b7f2ab made types consistent with those defined in Hack 2014-04-13 20:00:14 +02:00
Fabien Potencier
4b7a275363 removed extra/unsupported arguments 2014-04-12 19:21:42 +02:00
Fabien Potencier
f4adfc4d79 [HttpKernel] fixed an error message 2014-04-12 19:21:42 +02:00
Fabien Potencier
8aa322ca72 [TwigBundle] removed undefined argument 2014-04-12 18:24:05 +02:00
Fabien Potencier
f50b2c59d5 bug #10697 [Translation] Make IcuDatFileLoader/IcuResFileLoader::load invalid resource compatible with HHVM. (idn2104)
This PR was squashed before being merged into the 2.3 branch (closes #10697).

Discussion
----------

[Translation] Make IcuDatFileLoader/IcuResFileLoader::load invalid resource compatible with HHVM.

[Translation] HHVM throws when an invalid ResourceBundle is constructed, while zend returns FALSE from the constructor. This patch makes IcuResFileLoader and IcuDatFileLoader compatible with HHVM.

The following tests now pass on HHVM:
https://github.com/symfony/symfony/blob/2.3/src/Symfony/Component/Translation/Tests/Loader/IcuDatFileLoaderTest.php#L33
https://github.com/symfony/symfony/blob/2.3/src/Symfony/Component/Translation/Tests/Loader/IcuResFileLoaderTest.php#L54

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

Commits
-------

9bc08c0 [Translation] Make IcuDatFileLoader/IcuResFileLoader::load invalid resource compatible with HHVM.
2014-04-12 17:24:40 +02:00
Ioan Negulescu
9bc08c0279 [Translation] Make IcuDatFileLoader/IcuResFileLoader::load invalid resource compatible with HHVM. 2014-04-12 17:24:34 +02:00
Fabien Potencier
c875acf3a2 bumped Symfony version to 2.5.0 2014-04-12 16:58:29 +02:00
Fabien Potencier
2aea588ceb updated VERSION for 2.5.0-BETA1 2014-04-11 22:04:22 +02:00
Fabien Potencier
203a532257 fixed a test 2014-04-11 21:30:22 +02:00
Fabien Potencier
dd957bca47 fixed a test 2014-04-11 21:14:26 +02:00
Fabien Potencier
1251e136b4 Merge branch '2.4'
* 2.4:
  [Validator] Fix hack for nested Collection/All losing context
  [Config] Fix NodeBuilderTest::testNumericNodeCreation to use BaseNodeBuilder alias.
  [Profiler] Prevent throwing fatal errors when searching timestamps or invalid dates
  [HttpKernel] Added the resource ID when printing a resource in the DataCollector
  [HttpFoundation] use insert or replace for sqlite session handler
  [HttpFoundation] use MERGE SQL for MS SQL Server session storage
  [HttpFoundation] fix PDO session handler under high concurrency

Conflicts:
	src/Symfony/Component/Validator/Tests/ExecutionContextTest.php
2014-04-11 20:34:16 +02:00
Fabien Potencier
55351677ca Merge branch '2.3' into 2.4
* 2.3:
  [Config] Fix NodeBuilderTest::testNumericNodeCreation to use BaseNodeBuilder alias.
  [Profiler] Prevent throwing fatal errors when searching timestamps or invalid dates
  [HttpKernel] Added the resource ID when printing a resource in the DataCollector
  [HttpFoundation] use insert or replace for sqlite session handler
  [HttpFoundation] use MERGE SQL for MS SQL Server session storage
  [HttpFoundation] fix PDO session handler under high concurrency

Conflicts:
	src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php
	src/Symfony/Component/HttpKernel/Tests/Profiler/ProfilerTest.php
2014-04-11 20:33:45 +02:00
Fabien Potencier
e81c872bc8 bug #10652 [HttpFoundation] fix PDO session handler under high concurrency (Tobion)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpFoundation] fix PDO session handler under high concurrency

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #8448 and http://trac.symfony-project.org/ticket/4777 (which was never really fixed as you can see here)
| License       | MIT

- The first commit fixes PDO session handler under high concurrency.
- The second commit uses MERGE SQL for MS SQL Server. Tested with http://sqlfiddle.com/#!6/66b6d/14
- The third commit uses INSERT OR REPLACE for sqlite session handler http://sqlfiddle.com/#!7/e6707/3

What I find rather bad with the class design is that it depends on the table definition, but it's not part of the class. Also it doesn't make use of open() and close() which could be used to make the database connection lazy instead of having is open all the time when not needed. Doctrine also only lazy connects, but we use PDO directly here.
Furthermore, the session handlers should not throw exceptions, from what I read, but return false when an error occurs. This is not followed in this class. Maybe @drak knows how php session management behaves when the session handlers return false?

Commits
-------

5c08e29 [HttpFoundation] use insert or replace for sqlite session handler
05ea19a [HttpFoundation] use MERGE SQL for MS SQL Server session storage
e58d7cf [HttpFoundation] fix PDO session handler under high concurrency
2014-04-11 20:29:09 +02:00
Jérôme Tamarelle
edfa6d547d [Validator] Fix hack for nested Collection/All losing context 2014-04-11 13:48:13 +02:00
Fabien Potencier
241dc10245 bug #10669 [Profiler] Prevent throwing fatal errors when searching timestamps or invalid dates (stloyd)
This PR was merged into the 2.3 branch.

Discussion
----------

[Profiler] Prevent throwing fatal errors when searching timestamps or invalid dates

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

Commits
-------

eea9d24 [Profiler] Prevent throwing fatal errors when searching timestamps or invalid dates
2014-04-11 13:44:37 +02:00
Ioan Negulescu
022c4af446 [Config] Fix NodeBuilderTest::testNumericNodeCreation to use BaseNodeBuilder alias. 2014-04-11 13:41:46 +02:00
Charles Sarrazin
f1a7361aae Fixed wrong typehint in documentation for XmlEncoder 2014-04-11 10:02:41 +02:00
Joseph Bielawski
eea9d24719 [Profiler] Prevent throwing fatal errors when searching timestamps or invalid dates 2014-04-11 08:45:03 +02:00
Bernhard Schussek
01983a553a [HttpKernel] Added the resource ID when printing a resource in the DataCollector 2014-04-10 19:43:37 +02:00
Fabien Potencier
a45e464bc3 Merge branch '2.4'
* 2.4:
  Update MimeTypeExtensionGuesser.php
  [Validator] Add missing polish translations
  [Validator] Added missing strings from Image validator
  [Templating] PhpEngine should propagate charset to its helpers
  Fix ticket #10663 - Added setCharset method call to PHP templating engine.
  Changed the typehint of the EsiFragmentRenderer to the interface
  [Form] Improved test coverage of UrlType
  [BrowserKit] Fix #10641 : BrowserKit is broken when using ip as host
2014-04-10 15:01:02 +02:00
Fabien Potencier
144b58ccef Merge branch '2.3' into 2.4
* 2.3:
  Update MimeTypeExtensionGuesser.php
  [Templating] PhpEngine should propagate charset to its helpers
  Fix ticket #10663 - Added setCharset method call to PHP templating engine.
  Changed the typehint of the EsiFragmentRenderer to the interface
  [Form] Improved test coverage of UrlType
  [BrowserKit] Fix #10641 : BrowserKit is broken when using ip as host

Conflicts:
	src/Symfony/Component/HttpKernel/Fragment/EsiFragmentRenderer.php
	src/Symfony/Component/Templating/PhpEngine.php
2014-04-10 15:00:56 +02:00
Mark Topper
be0e362116 Update MimeTypeExtensionGuesser.php
Fixed bug for MimeType `image/x-ms-bmp`
2014-04-10 14:53:44 +02:00
WouterJ
9ba2861408 Fixed Yaml loader/dumper to use underscores 2014-04-10 14:44:40 +02:00
Joseph Bielawski
6e014050ca [Validator] Add missing polish translations 2014-04-10 09:02:51 +02:00
Fabien Potencier
b5ba7e109b minor #10668 [RFR] [Serializer] Refactored XmlEncoder to remove dependency to SimpleXml (csarrazi)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[RFR] [Serializer] Refactored XmlEncoder to remove dependency to SimpleXml

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

Instead of switching between SimpleXml and DOM Xml, we only use DOM Xml, in order to parse the source XML when decoding an XML string.

Commits
-------

db44f0f [Serializer] Refactored XmlEncoder to remove dependency to SimpleXml
2014-04-10 04:23:19 +02:00
Mario Young
df37461b99 [Validator] Added missing strings from Image validator 2014-04-10 04:21:46 +02:00
Fabien Potencier
5599eb0aae bug #10670 [Templating] PhpEngine should propagate charset to its helpers (stloyd)
This PR was merged into the 2.3 branch.

Discussion
----------

[Templating] PhpEngine should propagate charset to its helpers

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

Commits
-------

ed9e48b [Templating] PhpEngine should propagate charset to its helpers
2014-04-10 04:17:51 +02:00
Charles Sarrazin
db44f0fdd7 [Serializer] Refactored XmlEncoder to remove dependency to SimpleXml 2014-04-10 02:57:01 +02:00
Joseph Bielawski
ed9e48b472 [Templating] PhpEngine should propagate charset to its helpers 2014-04-09 20:38:51 +02:00
Koen Kuipers
0bc79ca009 Fix ticket #10663 - Added setCharset method call to PHP templating engine. 2014-04-09 19:05:14 +02:00
Tobias Schultze
5c08e29b97 [HttpFoundation] use insert or replace for sqlite session handler 2014-04-09 16:14:23 +02:00
Christophe Coevoet
d1fca907f9 Changed the typehint of the EsiFragmentRenderer to the interface 2014-04-09 15:45:02 +02:00
Pascal Borreli
46bb8b99de Fixed typo 2014-04-09 09:13:16 +01:00
Bernhard Schussek
f3e172f6e5 [Form] Improved test coverage of UrlType 2014-04-09 05:11:36 +02:00
Fabien Potencier
9a95f520c9 bug #10649 [BrowserKit] Fix #10641 : BrowserKit is broken when using ip as host (romainneutron)
This PR was merged into the 2.3 branch.

Discussion
----------

[BrowserKit] Fix #10641 : BrowserKit is broken when using ip as host

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

As documented in http://php.net/manual/en/function.preg-replace.php, we have to use the `$` notation for replacing the backreference

>When working with a replacement pattern where a backreference is immediately followed by another number (i.e.: placing a literal number immediately after a matched pattern), you cannot use the familiar \\1 notation for your backreference. \\11, for example, would confuse preg_replace() since it does not know whether you want the \\1 backreference followed by a literal 1, or the \\11 backreference followed by nothing. In this case the solution is to use \${1}1. This creates an isolated $1 backreference, leaving the 1 as a literal.

Commits
-------

e946da3 [BrowserKit] Fix #10641 : BrowserKit is broken when using ip as host
2014-04-09 05:10:38 +02:00
Tobias Schultze
05ea19a4bf [HttpFoundation] use MERGE SQL for MS SQL Server session storage 2014-04-08 22:01:45 +02:00
Tobias Schultze
e58d7cf6c6 [HttpFoundation] fix PDO session handler under high concurrency 2014-04-08 21:48:40 +02:00
Romain Neutron
e946da303d [BrowserKit] Fix #10641 : BrowserKit is broken when using ip as host 2014-04-08 15:30:36 +02:00
Fabien Potencier
40db85d9da bumped Symfony version to 2.4.4 2014-04-05 13:49:17 +02:00
Fabien Potencier
3199b2e0d1 updated VERSION for 2.4.3 2014-04-04 12:27:02 +02:00
Jakub Zalas
009c4b8451 [FrameworkBundle] Only initialize a fully configured service if APC is available.
At the moment we only provide ApcCache for mapping caching (out of the box). DoctrineCache is available but not configured.
2014-04-03 17:10:06 +01:00
Romain Neutron
8163427b71 [DependencyInjection] Fix #10626, use better check on attribute existence and values on XML load 2014-04-03 14:00:33 +02:00
Fabien Potencier
a18ee423f9 bumped Symfony version to 2.3.13 2014-04-03 10:18:27 +02:00
Fabien Potencier
3574df3d5e updated VERSION for 2.3.12 2014-04-03 07:42:39 +02:00
Fabien Potencier
8d69022c04 Merge branch '2.4'
* 2.4:
  Revert PHPUnit version, revert APC configuration
  removed APC on the CLI for Travis as it does not work well with PHPUnit and Composer anyway
  [Security] Replace exception mocks with actual exception instances.
  Remove an unused argument.
  Use `Filesystem::chmod` instead of `chmod` when dumping file
  [Form] Added test for disabling buttons
  [Form] Added check for parent disabled status in Button form elements
  Fixes URL validator to accept single part urls
  tweaked Travis configuration to get more tests running
  fixed float comparison in unit tests for HHVM
  upgraded PHPUnit to version 4 for better HHVM support
  [Process] fixed HHVM usage on the CLI
  Fix class names in ApcUniversalClassLoader tests.
  fixed the profiler when an uncalled listener throws an exception when instantiated
  fixed CS
  Added test case for 4c6a2d15095c13b2a35751b2b2712b183be489c4
  Fixed bug in ChoiceType triggering a warning when not using utf-8
  fixed CS
  Avoid levenshtein comparison when using ContainerBuilder.
2014-04-03 07:23:57 +02:00
Fabien Potencier
785e82f814 Merge branch '2.3' into 2.4
* 2.3:
  Revert PHPUnit version, revert APC configuration
  removed APC on the CLI for Travis as it does not work well with PHPUnit and Composer anyway
  [Security] Replace exception mocks with actual exception instances.
  Remove an unused argument.
  Use `Filesystem::chmod` instead of `chmod` when dumping file
  [Form] Added test for disabling buttons
  [Form] Added check for parent disabled status in Button form elements
  Fixes URL validator to accept single part urls
  tweaked Travis configuration to get more tests running
  fixed float comparison in unit tests for HHVM
  upgraded PHPUnit to version 4 for better HHVM support
  [Process] fixed HHVM usage on the CLI
  Fix class names in ApcUniversalClassLoader tests.
  fixed the profiler when an uncalled listener throws an exception when instantiated
  fixed CS
  Added test case for 4c6a2d15095c13b2a35751b2b2712b183be489c4
  Fixed bug in ChoiceType triggering a warning when not using utf-8
  fixed CS
  Avoid levenshtein comparison when using ContainerBuilder.

Conflicts:
	src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php
	src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php
2014-04-03 07:23:50 +02:00
Fabien Potencier
b7be0b86b9 Merge branch '2.4'
* 2.4:
  [Process] Fix Process test suite
  [Form] Fixed infinite tests when ICU is available
2014-04-02 19:10:49 +02:00
Romain Neutron
099e480c1c Fix travis build 2014-04-02 18:54:39 +02:00
Fabien Potencier
db4230ef8c feature #10619 [DependencyInjection] Use DOM instead of SimpleXML for namespace support (sandermarechal, romainneutron)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[DependencyInjection] Use DOM instead of SimpleXML for namespace support

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

This PR replaces #9350

Commits
-------

a3c60c8 [DependencyInjection] Deprecate SimpleXMLElement
33c91f9 [DependencyInjection] Use DOM instead of SimpleXML for namespace support
2014-04-02 17:51:57 +02:00
Fabien Potencier
afc34cf14c feature #10606 [Console] added a better way to ask questions to the user (fabpot, romainneutron)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[Console] added a better way to ask questions to the user

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

This PR replaces #9811

- [x] add missing phpdocs
- [x] add unit tests
- [ ] submit doc PR

Commits
-------

336bba2 [Console] Add docblocks and unit tests to QuestionHelper
c413f89 [Console] added a better way to ask questions to the user
2014-04-02 17:45:58 +02:00
Romain Neutron
a3c60c8039 [DependencyInjection] Deprecate SimpleXMLElement 2014-04-02 17:32:21 +02:00
Sander Marechal
33c91f9be8 [DependencyInjection] Use DOM instead of SimpleXML for namespace support 2014-04-02 17:32:21 +02:00
Romain Neutron
336bba2fd8 [Console] Add docblocks and unit tests to QuestionHelper 2014-04-02 17:11:48 +02:00
Fabien Potencier
01f21e3c31 bug #10604 [PropertyAccessor] Wrong number of parameters (coma)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[PropertyAccessor] Wrong number of parameters

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

Since [6d2af217aafd03e3f1600ce0ebc9c30cf0a7fc70#diff-3e45cf556c0330623c0167841d303dff](6d2af217aa (diff-3e45cf556c0330623c0167841d303dff)) the PropertyAccessor is failing on setters with default values because  [ReflectionFunctionAbstract::getNumberOfRequiredParameters](http://www.php.net/manual/es/reflectionfunctionabstract.getnumberofparameters.php) only count the parameters without default values.

Commits
-------

6157be0 Wrong number of parameters
2014-04-01 18:23:27 +02:00
Jakub Zalas
9438f88af0 [Security] Replace exception mocks with actual exception instances.
It is done for two reasons:
* consistency - we use real exception objects in most of the code
* latest phpunit does not like the way we were creating mocks for exceptions (it could be also fixed by letting phpunit to call the original constructor)
2014-04-01 15:48:06 +01:00
Fabien Potencier
c413f89723 [Console] added a better way to ask questions to the user 2014-04-01 14:31:41 +02:00
Eduardo García Sanz
6157be0a1d Wrong number of parameters
Wrong number of parameters

Wrong number of parameters

Wrong number of parameters
2014-04-01 14:30:09 +02:00
Romain Neutron
140f807346 [DependencyInjection] Update dumpers and loaders, add unit tests 2014-04-01 14:25:44 +02:00
Jakub Zalas
8882dad46e Remove an unused argument. 2014-03-31 22:49:46 +01:00
Fabien Potencier
1eb1f4dd73 [DependencyInjection] added a simple way to replace a service by keeping a reference to the old one 2014-03-31 20:47:44 +02:00
Romain Neutron
1642094cfe [Templating] Update changelog 2014-03-31 15:27:29 +02:00
Martin Hasoň
6fce503432 [Templating] Added ability to set a specific version of the asset 2014-03-31 15:27:29 +02:00
Fabien Potencier
7792ba90db fixed typo in composer.json 2014-03-31 13:19:58 +02:00
Fabien Potencier
b094ea7fe2 bug #10586 Fixes URL validator to accept single part urls (merk)
This PR was merged into the 2.3 branch.

Discussion
----------

Fixes URL validator to accept single part urls

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

This PR replaces #6817 and has been rebased for 2.3, making a change to the regex to be simpler for single dot matches. (changing `([\pL\pN\pS-\.])+([\.]{0,1}[\pL]+[\.]{0,1})` to `([\pL\pN\pS-\.])+(\.?[\pL]+\.?)`)

Commits
-------

91e226e Fixes URL validator to accept single part urls
2014-03-31 13:10:34 +02:00
Fabien Potencier
3e678e7923 minor #10590 [2.3] Use Filesystem::chmod instead of chmod when dumping file (romainneutron)
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3] Use `Filesystem::chmod` instead of `chmod` when dumping file

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

This adds consistency as discussed in ca5eea5c19 (commitcomment-5804089)

Commits
-------

c2ffefd Use `Filesystem::chmod` instead of `chmod` when dumping file
2014-03-31 13:09:33 +02:00
Fabien Potencier
bd577b11a2 feature #10287 [WIP][Validator] New NodeTraverser implementation (webmozart)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[WIP][Validator] New NodeTraverser implementation

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

This PR is ready for review.

#### Todo

- [x] Test extensively to avoid regressions
- [x] Test more extensively
- [x] Finish inline documentation
- [x] Provide a layer to choose the desired API through ValidatorBuilder
- [x] Provide a layer to choose the desired API through FrameworkBundle
- [x] Update UPGRADE file
- [x] Update CHANGELOG
- [ ] Update user documentation

#### Goal

The goal of this PR is to be able to fix the following tickets:

- [x] #6138 Simplify adding of constraint violations
- [x] #7146 Support group sequences in Validator API
- [x] #7432 Poorly implemented Visitor Pattern
- [x] #8617 Control traversal on class level
- [x] #9888 Improve support for collection validation (PR: #9988)

The following tickets are probably fixed, but require testing first:

- [ ] #8376 Using validation_group causes error message to display multiple times
- [ ] #9939 GroupSequences still execute next group if first fail

Of course, full backwards compatibility **must** be guaranteed.

Other tickets I want to fix in follow-up PRs:

* #3622 Constraints\Valid does not respect "groups" option
* #4453 walk constraints by groups
* #7700 Propagate implicit group names in constraints
* #9051 Always ask value event if field isn't in the validating group
* #10163 poor collection validation test coverage
* #10221 TypeValidator does not enforce desired type when value is NULL
* #10495 Class Valid Constraint can't be used on a Form Type

#### In a nutshell

The implementation removes the Visitor pattern, which was implemented badly. I tried fixing it via a NodeTraverser/NodeVisitor implementation, but performance degraded too much so I decided to remove the pattern altogether.

A couple of new features and bug fixes are possible thanks to the new implementation. See below for details.

#### PHP Versions

PHP 5.3.8 and older does not allow to implement two different interfaces which both contain a method with the same name. This is used in the compatibility layer that supports both the old and the new API.

For this reason, the compatibility layer is disabled on PHP < 5.3.9. Older PHP versions need to decide on the old API or the new API (without compatibility layer).

#### Choosing the API Version

The API version can be specified by one of `Validation::API_VERSION_2_4`, `Validation::API_VERSION_2_5` and `Validation::API_VERSION_2_5_BC` to `setApiVersion()` when building the validator:

```php
// Old implementation
$validator = Validation::createValidatorBuilder()
    ->setApiVersion(Validation::API_VERSION_2_4)
    ->getValidator();

// New implementation with BC API
// Does not work on PHP < 5.3.9
$validator = Validation::createValidatorBuilder()
    ->setApiVersion(Validation::API_VERSION_2_5)
    ->getValidator();

// New implementation without BC API
$validator = Validation::createValidatorBuilder()
    ->setApiVersion(Validation::API_VERSION_2_5_BC)
    ->getValidator();
```

#### Features

##### Constraint validation as first-class citizen

The new API merges `validateValue()` and `validate()`. The idea is that the validation of values against constraints should be as simple as possible. Object validation is a special case where an object is tested against the `Valid` constraint. A backwards compatibility layer is provided to use both `validate()` and `validateValue()` with the old signature.

```php
// Validate against explicit constraints
$violations = $validator->validate($firstName, array(
    new NotNull(),
    new Length(array('min' => 3)),
));

// Validate against metadata
$violations = $validator->validate($object);

// Same, more expressive notation
$violations = $validator->validate($object, new Valid());

// Validate each entry against its metadata
$violations = $validator->validate($array);
```

##### Aggregate violations

It is now possible to call the methods of the validator multiple times and aggregate the violations to a common violation list. To do so, call `startContext()`, execute the calls and call `getViolations()` in the end to retrieve the violations:

```php
$violations = $validator->startContext()
    ->validate($title, new NotNull())
    ->validate($text, new NotNull())
    ->validate($author->getName(), new NotNull())
    ->getViolations()
```

Most of the time, you will want to specify a property path for each validation. Use the method `atPath()` for that:

```php
$violations = $validator->startContext()
    ->atPath('title')->validate($title, new NotNull())
    ->atPath('text')->validate($text, new NotNull())
    ->atPath('author.name')->validate($author->getName(), new NotNull())
    ->getViolations()
```

##### Control the context of nested validations

In Symfony <= 2.4, you can validate objects or constraints from within a constraint validator like this:

```php
$this->context->validate($object);
$this->context->validateValue($value, new Length(array('min' => 3)));
```

The validations will run and all violations will be added to the current context.

This way, it is impossible though to validate something, inspect the result and then decide what kind of violations to add to the context. This is needed, for example, for the `Some` constraint (proposed in #9888), which should succeed if any of the validated values did *not* generate violations.

For this reason, the new context API features a method `getValidator()`. This method returns the validator instance, you can use it to validate anything in a new context (as the validator always does):

```php
$validator = $this->context->getValidator();
$violations = $validator->validate($object);

if (count($violations)  > 0) {
    $this->context->addViolation('The validation did not pass');
}
```

You can also explicitly start a new context:

```php
$validator = $this->context->getValidator();
$violations = $validator->startContext()
    ->atPath('title')->validate($title, new NotNull())
    ->atPath('text')->validate($text, new NotNull())
    ->getViolations()
```

If you want to execute the validation in the current context, use the `inContext()` method of the validator instead:

```php
// violations are added to $this->context
$validator->inContext($this->context)
    ->atPath('title')->validate($title, new NotNull())
    ->atPath('text')->validate($text, new NotNull())
;
```

With this feature, #9888 (especially the PR for it: #9988) can be finished.

##### Custom group sequences (#7146)

It is now possible to pass `GroupSequence` instances whenever you can pass a group to the validator. For example:

```php
$violations = $validator->validate($object, new Valid(), new GroupSequence('Basic', 'Strict'));
```

Or in the context of the Form component:

```php
$form = $this->createForm(new BlogType(), new Blog(), array(
    'validation_groups' => new GroupSequence('Basic', 'Strict'),
));
```

##### Constraint violation builders (#6138)

The API for adding constraint violations was simplified:

```php
$this->context->addViolation('message', array('param' => 'value'));

// or

$this->context->buildViolation('message')
    ->atPath('property')
    ->setParameter('param', 'value')
    ->setTranslationDomain('validation_strict')
    ->addViolation();
```

##### Control traversal at class level (#8617)

Currently, it is possible whether to traverse a `Traversable` object or not in the `Valid` constraint:

```php
/**
 * @Assert\Valid(traverse=true)
 */
private $tags = new TagList();
```

(actually, `true` is the default)

In this way, the validator will iterate the `TagList` instance and validate each of the contained objects. You can also set "traverse" to `false` to disable iteration.

What if you want to specify, that `TagList` instances should always (or never) be traversed? That's currently not possible.

With this PR, you can do the following:

```php
/**
 * @Assert\Traverse(false)
 */
class TagList implements \IteratorAggregate
{
    // ...
}
```

#### Follow-up features

Features of the follow-up PRs will be described directly there.

#### Backwards compatibility

I implemented a new `AbstractValidatorTest` which tests both the old and the new implementation for compatibility. I still want to extend this test to make sure we don't introduce any regressions.

Almost none of the existing classes were modified (or only slightly). If users depend on the current (now "legacy") implementation, they will have the choice to continue using it until 3.0 (of course, without the new features).

#### Your task

Congrats, you made it till here :) If you have time, please skim over the code and give me feedback on the overall implementation and the class/method names. Again, no feedback on details yet, there are quite a few areas in the code that are still work in progress.

Thanks,
Bernhard

[1] That means that only the nodes from the root of the graph until the currently validated node are held in memory.

Commits
-------

ca6a722 [Validator] Converted `@deprecate` doc comment into regular doc comment
68d8018 [Validator] Documented changes in the UPGRADE files
b1badea [Validator] Fixed failing CsrfFormLoginTest
0bfde4a [Validator] Fixed misnamed method calls in FrameworkExtension
3dc2b4d [Validator] Made "symfony/property-access" an optional dependency
c5629bb [Validator] Added getObject() to ExecutionContextInterface
9b204c9 [FrameworkBundle] Implemented configuration to select the desired Validator API
0946dbe [Validator] Adapted CHANGELOG
1b111d0 [Validator] Fixed typos pointed out by @cordoval
7bc952d [Validator] Improved inline documentation of RecursiveContextualValidator
166d71a [Validator] Removed unused property
90c27bb [Validator] Removed traverser implementation
3183aed [Validator] Improved performance of cache key generation
029a716 [Validator] Moved logic of replaceDefaultGroup() to validateNode()
2f23d97 [Validator] Reduced number of method calls on the execution context
73c9cc5 [Validator] Optimized performance by calling spl_object_hash() only once per object
94ef21e [Validator] Optimized use statements
1622eb3 [Validator] Fixed reference to removed class in ValidatorBuilder
be508e0 [Validator] Merged DefaultGroupReplacingVisitor and ContextUpdateVisitor into NodeValidationVisitor
50bb84d [Validator] Optimized RecursiveContextualValidator
eed29d8 [Validator] Improved performance of *ContextualValidator::validate()
5c479d8 [Validator] Simplified validateNodeForGroup
eeed509 [Validator] Improved phpdoc of RecursiveValidator
274d4e6 [Validator] Changed ValidatorBuilder to always use LegacyExecutionContext
38e26fb [Validator] Decoupled RecursiveContextualValidator from Node
23534ca [Validator] Added a recursive clone of the new implementation for speed comparison
f61d31e [Validator] Fixed grammar
886e05e [Validator] Removed unused use statement
93fdff7 [Validator] The supported API versions can now be passed to the ValidatorBuilder
987313d [Validator] Improved inline documentation of the violation builder
79387a7 [Validator] Improved inline documentation of the metadata classes
01ceeda [Validator] Improved test coverage of the Traverse constraint
9ca61df [Validator] Improved inline documentation of CascadingStrategy and TraversalStrategy
524a953 [Validator] Improved inline documentation of the validators
9986f03 [Validator] Added inline documentation for the PropertyPath utility class
be7f055 [Validator] Visitors may now abort the traversal by returning false from beforeTraversal()
299c2dc [Validator] Improved test coverage and prevented duplicate validation of constraints
186c115 [Validator] Improved test coverage of NonRecursiveNodeTraverser
822fe47 [Validator] Completed inline documentation of the Node classes and the NodeTraverser
dbce5a2 [Validator] Updated outdated doc blocks
8558377 [Validator] Added deprecation notes
e8fa15b [Validator] Fixed the new validator API under PHP < 5.3.9
2936d10 [Validator] Removed unused use statement
6fc6ecd [Validator] Fixed tests under PHP<5.3.9
778ec24 [Validator] Removed helper class Traversal
76d8c9a [Validator] Fixed typos
4161371 [Validator] Removed unused use statements
aeb6822 [Validator] Improved visitor names
08172bf [Validator] Merged validate(), validateObject() and validateObjects() to simplify usage
51197f6 [Validator] Made traversal of Traversables consistent
117b1b9 [Validator] Wrapped collections into CollectionNode instances
94583a9 [Validator] Changed NodeTraverser to traverse nodes iteratively, not recursively
cf1281f [Validator] Added "Visitor" suffix to all node visitors
230f2a7 [Validator] Fixed exception message
e057b19 [Validator] Decoupled ContextRefresher from ExecutionContext
e440690 [Validator] Renamed validateCollection() to validateObjects()
df41974 [Validator] Changed context manager to context factory
26eafa4 [Validator] Removed unused use statements
bc29591 [Validator] Clearly separated classes supporting the API <2.5/2.5+
a3555fb [Validator] Fixed: Objects are not traversed unless they are instances of Traversable
2c65a28 [Validator] Completed test coverage and documentation of the Node classes
9c9e715 [Validator] Completed documentation of GroupManagerInterface
1e81f3b [Validator] Finished test coverage and documentation of ExecutionContextManager
feb3d6f [Validator] Tested the validation in a separate context
718601c [Validator] Changed validateValue() to validate() in the new API
ee1adad [Validator] Implemented handling of arrays and Traversables in LegacyExecutionContext::validate()
09f744b [Validator] Implemented BC traversal of traversables through validate()
297ba4f [Validator] Added a note why scalars are passed to cascadeObject() in NodeTraverser
9b07b0c [Validator] Implemented BC validation of arrays through validate()
405a03b [Validator] Updated deprecation notes in GroupSequence
499b2bb [Validator] Completed test coverage of ExecutionContext
adc1437 [Validator] Fixed failing tests
4ea3ff6 [Validator] Finished inline documentation of ExecutionContext[Interface]
f6b7288 [Validator] Removed unused use statement
8318286 [Validator] Completed GroupSequence implementation
5fbf848 [Validator] Added note about Callback constraint to CHANGELOG
c1b1e03 [Validator] Added TODO reminder
8ae68c9 [Validator] Made tests green (yay!)
680f1ee [Validator] Renamed $params to $parameters
321d5bb [Validator] Throw exception if ObjectInitializer is constructed without visitors
1156bde [Validator] Extracted code for group sequence resolving into GroupSequenceResolver
b1a9477 [Validator] Added ObjectInitializer visitor
7e3a41d [Validator] Moved visitors to NodeVisitor namespace
a40189c [Validator] Decoupled the new classes a bit
a6ed4ca [Validator] Prototype of the traverser implementation
25cdc68 [Validator] Refactored ValidatorTest and ValidationVisitorTest into an abstract validator test class
2014-03-31 13:08:13 +02:00
Fabien Potencier
880880b838 feature #10569 [Form] Accept interfaces to be passed to "data_class" (webmozart)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[Form] Accept interfaces to be passed to "data_class"

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

Commits
-------

b44e07b [Form] Added test case for 4759e062ed004749dbdc2ba31aef0f8ac2601895
7bc7a8a [Form] Accept interfaces to be passed to "data_class"
2014-03-31 13:06:03 +02:00
Fabien Potencier
c5a3008123 feature #10570 [PropertyAccess] Added isReadable() and isWritable() (webmozart)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[PropertyAccess] Added isReadable() and isWritable()

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | yes
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #8659
| License       | MIT
| Doc PR        | symfony/symfony-docs#3729

This PR introduces BC breaks that are described in detail in the UPGRADE file. The BC breaks conform to our policy. They shouldn't affect many people, so I think we can safely do them.

Commits
-------

f7fb855 [PropertyAccess] Added missing exceptions to phpdoc
9aee2ad [PropertyAccess] Removed the argument $value from isWritable()
4262707 [PropertyAccess] Fixed CS and added missing documentation
6d2af21 [PropertyAccess] Added isReadable() and isWritable()
20e6bf8 [PropertyAccess] Refactored PropertyAccessorCollectionTest
0488389 [PropertyAccess] Refactored PropertyAccessorTest
2014-03-31 13:04:12 +02:00
Fabien Potencier
2ab27aba8b feature #10572 [Form] ObjectChoiceList now compares choices by their value, if a value path is given (webmozart)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[Form] ObjectChoiceList now compares choices by their value, if a value path is given

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

Commits
-------

ce0efb1 [Form] ObjectChoiceList now compares choices by their value, if a value path is given
2014-03-31 12:59:41 +02:00
Romain Neutron
c2ffefd0ef Use Filesystem::chmod instead of chmod when dumping file
This adds consistency as discussed in ca5eea5c19 (commitcomment-5804089)
2014-03-31 12:15:50 +02:00
Bernhard Schussek
ebfee723c9 [Form] Added test for disabling buttons 2014-03-31 11:59:54 +02:00
Adrià López Lozano
6bb355e2fd [Form] Added check for parent disabled status in Button form elements
The Button form element did not check for the parent disabled configuration status,
making them behave differently to all other form widgets.
2014-03-31 11:59:54 +02:00
Bernhard Schussek
f7fb855f46 [PropertyAccess] Added missing exceptions to phpdoc 2014-03-31 10:36:17 +02:00
Bernhard Schussek
9dfebd529e [Form] Disabled violation mapping of unsubmitted forms 2014-03-31 10:27:06 +02:00
Romain Neutron
a42fbd7ade [Process] Fix Process test suite 2014-03-31 10:11:45 +02:00
Tim Nagel
91e226e06e Fixes URL validator to accept single part urls 2014-03-31 10:23:29 +11:00
Bernhard Schussek
ca6a722a45 [Validator] Converted @deprecate doc comment into regular doc comment 2014-03-30 20:08:02 +02:00
Bernhard Schussek
68d80187ed [Validator] Documented changes in the UPGRADE files 2014-03-30 20:03:32 +02:00
Bernhard Schussek
b1badeaa1f [Validator] Fixed failing CsrfFormLoginTest 2014-03-30 18:56:20 +02:00
Bernhard Schussek
0bfde4a44b [Validator] Fixed misnamed method calls in FrameworkExtension 2014-03-30 18:31:31 +02:00
Bernhard Schussek
3dc2b4d861 [Validator] Made "symfony/property-access" an optional dependency 2014-03-30 18:31:31 +02:00
Bernhard Schussek
c5629bb7ee [Validator] Added getObject() to ExecutionContextInterface 2014-03-30 18:31:00 +02:00
Bernhard Schussek
9b204c9354 [FrameworkBundle] Implemented configuration to select the desired Validator API 2014-03-30 18:31:00 +02:00
Bernhard Schussek
0946dbe7a0 [Validator] Adapted CHANGELOG 2014-03-30 18:30:09 +02:00
Bernhard Schussek
1b111d0e83 [Validator] Fixed typos pointed out by @cordoval 2014-03-30 18:30:09 +02:00
Bernhard Schussek
7bc952de55 [Validator] Improved inline documentation of RecursiveContextualValidator 2014-03-30 18:30:09 +02:00
Bernhard Schussek
166d71a7de [Validator] Removed unused property 2014-03-30 18:30:09 +02:00
Bernhard Schussek
90c27bb1e7 [Validator] Removed traverser implementation
The traverser is too slow compared to the current, recursive approach.
Testing showed a performance decrease of about 70% without a lot of
optimization potential.
2014-03-30 18:30:09 +02:00
Bernhard Schussek
3183aed7cd [Validator] Improved performance of cache key generation 2014-03-30 18:30:09 +02:00
Bernhard Schussek
029a71638e [Validator] Moved logic of replaceDefaultGroup() to validateNode() 2014-03-30 18:30:09 +02:00
Bernhard Schussek
2f23d9725b [Validator] Reduced number of method calls on the execution context 2014-03-30 18:30:09 +02:00
Bernhard Schussek
73c9cc5806 [Validator] Optimized performance by calling spl_object_hash() only once per object 2014-03-30 18:30:09 +02:00
Bernhard Schussek
94ef21e495 [Validator] Optimized use statements 2014-03-30 18:30:09 +02:00
Bernhard Schussek
1622eb3a98 [Validator] Fixed reference to removed class in ValidatorBuilder 2014-03-30 18:28:59 +02:00
Bernhard Schussek
be508e01dd [Validator] Merged DefaultGroupReplacingVisitor and ContextUpdateVisitor into NodeValidationVisitor 2014-03-30 18:28:59 +02:00
Bernhard Schussek
50bb84d06b [Validator] Optimized RecursiveContextualValidator 2014-03-30 18:28:59 +02:00
Bernhard Schussek
eed29d8ad3 [Validator] Improved performance of *ContextualValidator::validate() 2014-03-30 18:28:59 +02:00
Bernhard Schussek
5c479d803c [Validator] Simplified validateNodeForGroup 2014-03-30 18:28:59 +02:00
Bernhard Schussek
eeed509dfc [Validator] Improved phpdoc of RecursiveValidator 2014-03-30 18:28:59 +02:00
Bernhard Schussek
274d4e6195 [Validator] Changed ValidatorBuilder to always use LegacyExecutionContext
This is necessary because, until Symfony 3.0, constraint validators will continue
to rely on the old context methods in order to be backwards compatible.
2014-03-30 18:28:59 +02:00
Bernhard Schussek
38e26fbcaf [Validator] Decoupled RecursiveContextualValidator from Node 2014-03-30 18:28:59 +02:00
Bernhard Schussek
23534ca6ab [Validator] Added a recursive clone of the new implementation for speed comparison 2014-03-30 18:28:59 +02:00
Bernhard Schussek
f61d31e5fa [Validator] Fixed grammar 2014-03-30 18:28:58 +02:00
Bernhard Schussek
886e05e7ed [Validator] Removed unused use statement 2014-03-30 18:28:58 +02:00
Bernhard Schussek
93fdff764a [Validator] The supported API versions can now be passed to the ValidatorBuilder 2014-03-30 18:28:58 +02:00
Bernhard Schussek
987313d315 [Validator] Improved inline documentation of the violation builder 2014-03-30 18:28:58 +02:00
Bernhard Schussek
79387a7d5e [Validator] Improved inline documentation of the metadata classes 2014-03-30 18:28:58 +02:00
Bernhard Schussek
01ceeda376 [Validator] Improved test coverage of the Traverse constraint 2014-03-30 18:28:58 +02:00
Bernhard Schussek
9ca61df923 [Validator] Improved inline documentation of CascadingStrategy and TraversalStrategy 2014-03-30 18:28:58 +02:00
Bernhard Schussek
524a9538bc [Validator] Improved inline documentation of the validators 2014-03-30 18:28:58 +02:00
Bernhard Schussek
9986f03ce2 [Validator] Added inline documentation for the PropertyPath utility class 2014-03-30 18:28:58 +02:00
Bernhard Schussek
be7f055237 [Validator] Visitors may now abort the traversal by returning false from beforeTraversal() 2014-03-30 18:28:58 +02:00
Bernhard Schussek
299c2dca10 [Validator] Improved test coverage and prevented duplicate validation of constraints 2014-03-30 18:28:58 +02:00
Bernhard Schussek
186c115894 [Validator] Improved test coverage of NonRecursiveNodeTraverser 2014-03-30 18:28:58 +02:00
Bernhard Schussek
822fe4712f [Validator] Completed inline documentation of the Node classes and the NodeTraverser 2014-03-30 18:28:58 +02:00
Bernhard Schussek
dbce5a2f6a [Validator] Updated outdated doc blocks 2014-03-30 18:28:58 +02:00
Bernhard Schussek
8558377945 [Validator] Added deprecation notes 2014-03-30 18:28:57 +02:00
Bernhard Schussek
e8fa15b27c [Validator] Fixed the new validator API under PHP < 5.3.9 2014-03-30 18:28:57 +02:00
Bernhard Schussek
2936d10aa4 [Validator] Removed unused use statement 2014-03-30 18:28:57 +02:00
Bernhard Schussek
6fc6ecdd8e [Validator] Fixed tests under PHP<5.3.9
The new implementation is disabled on those PHP versions.
2014-03-30 18:28:57 +02:00
Bernhard Schussek
778ec2458b [Validator] Removed helper class Traversal 2014-03-30 18:28:57 +02:00
Bernhard Schussek
76d8c9a1f7 [Validator] Fixed typos 2014-03-30 18:28:57 +02:00
Bernhard Schussek
416137165e [Validator] Removed unused use statements 2014-03-30 18:28:57 +02:00
Bernhard Schussek
aeb68228b1 [Validator] Improved visitor names 2014-03-30 18:28:56 +02:00
Bernhard Schussek
08172bfe7b [Validator] Merged validate(), validateObject() and validateObjects() to simplify usage 2014-03-30 18:28:56 +02:00
Bernhard Schussek
51197f68a3 [Validator] Made traversal of Traversables consistent
If the traversal strategy is IMPLICIT (the default), the validator will now
traverse any object that implements \Traversable and any array
2014-03-30 18:28:56 +02:00
Bernhard Schussek
117b1b9a17 [Validator] Wrapped collections into CollectionNode instances 2014-03-30 18:28:56 +02:00
Bernhard Schussek
94583a9289 [Validator] Changed NodeTraverser to traverse nodes iteratively, not recursively
In this way, the deep method call chains are avoided. Also, it is possible to
avoid the many calls to leaveNode(), which are currently not really needed.
2014-03-30 18:28:56 +02:00
Bernhard Schussek
cf1281feef [Validator] Added "Visitor" suffix to all node visitors 2014-03-30 18:28:56 +02:00
Bernhard Schussek
230f2a72fa [Validator] Fixed exception message 2014-03-30 18:28:56 +02:00
Bernhard Schussek
e057b19964 [Validator] Decoupled ContextRefresher from ExecutionContext 2014-03-30 18:28:56 +02:00
Bernhard Schussek
e440690bb4 [Validator] Renamed validateCollection() to validateObjects() 2014-03-30 18:28:56 +02:00
Bernhard Schussek
df41974f31 [Validator] Changed context manager to context factory
The current context is not stored anymore. Instead, it is passed around the traverser
and the visitors. For this reason, validation can occur in multiple contexts at the
same time.
2014-03-30 18:28:56 +02:00
Bernhard Schussek
26eafa43f7 [Validator] Removed unused use statements 2014-03-30 18:28:56 +02:00
Bernhard Schussek
bc29591935 [Validator] Clearly separated classes supporting the API <2.5/2.5+ 2014-03-30 18:28:55 +02:00
Bernhard Schussek
a3555fbd99 [Validator] Fixed: Objects are not traversed unless they are instances of Traversable 2014-03-30 18:28:55 +02:00