Commit Graph

10362 Commits

Author SHA1 Message Date
Steffen Roßkamp
c207d1dde2 [Form] Fix PHPDoc for builder setData methods
The underlying data variable is typed as mixed whereas the methods
paramers where typed as array.
2014-09-16 11:11:47 +02:00
Fabien Potencier
d853c0d43b minor #11820 [Security] Uniform AccessDecisionManager decide behaviour (mTorres)
This PR was merged into the 2.3 branch.

Discussion
----------

[Security] Uniform AccessDecisionManager decide behaviour

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

This PR uniforms the way the 3 decision policies (affirmative, consensus, unanimous) are handled in the Security\Core\Authoritzation\AccessDecisionManager.php

See #10170

Commits
-------

938ae4b [Security] Added more tests
2014-09-16 08:36:20 +02:00
Fabien Potencier
4fd0cf3927 fixed CS 2014-09-16 07:12:27 +02:00
Fabien Potencier
036726cf62 bug #11513 [Translation] made XliffFileDumper support CDATA sections. (hhamon)
This PR was merged into the 2.3 branch.

Discussion
----------

[Translation] made XliffFileDumper support CDATA sections.

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

Commits
-------

9926845 [Translation] made XliffFileDumper support CDATA sections.
2014-09-16 07:11:43 +02:00
Bernhard Schussek
f776e0c3d2 bug #11907 [Intl] Improved bundle reader implementations (webmozart)
This PR was merged into the 2.3 branch.

Discussion
----------

[Intl] Improved bundle reader implementations

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

This PR extracts bundle reader improvements from #9206.

The code is internal and used for resource bundle generation only, so I did not care about BC too much.

Commits
-------

c3cce5c [Intl] Improved bundle reader implementations
2014-09-15 22:32:55 +02:00
Bernhard Schussek
c3cce5c694 [Intl] Improved bundle reader implementations 2014-09-15 22:29:25 +02:00
Thierry Marianne
908101413f [Console] guarded against invalid aliases 2014-09-15 21:15:42 +02:00
Fabien Potencier
f12890c0db bug #11799 [YAML] fix handling of empty sequence items (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[YAML] fix handling of empty sequence items

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

When a line contains only a dash it cannot safely be assumed that it contains a nested list or an embedded mapping. If the next line starts with a dash at the same indentation, the current line's item is to be treated as `null`.

Commits
-------

fc85435 fix handling of empty sequence items
2014-09-15 20:23:23 +02:00
Bernhard Schussek
d35fd52b7a bug #11906 [Intl] Fixed a few bugs in TextBundleWriter (webmozart)
This PR was merged into the 2.3 branch.

Discussion
----------

[Intl] Fixed a few bugs in TextBundleWriter

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

See the included test cases for more information. This code was extracted from #9206.

Commits
-------

7b4a35a [Intl] Fixed a few bugs in TextBundleWriter
2014-09-15 20:17:36 +02:00
Fabien Potencier
15aec880ab fixed typo 2014-09-15 20:08:07 +02:00
1emming
59505714b3 [HttpFoundation] Request - URI - comment improvements 2014-09-15 20:07:32 +02:00
Bernhard Schussek
709db6fd75 [Validator] The ratio of the ImageValidator is rounded to two decimals now 2014-09-15 19:37:41 +02:00
Marc Torres
938ae4bf0d [Security] Added more tests 2014-09-15 19:24:27 +02:00
Bernhard Schussek
ba218540b1 bug #11459 [Form][Validator] All index items after children are to be considered grand-children when resolving ViolationPath (Andrew Moore)
This PR was merged into the 2.3 branch.

Discussion
----------

[Form][Validator] All index items after children are to be considered grand-children when resolving ViolationPath

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | unsure, see note below
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #11458
| License       | MIT
| Doc PR        | -

#### Possible BC Break
The old behavior had unit test cases specifically testing the case of a grand-children form. However, this behavior is not documented anywhere and the fix seems to have no adverse effects on form validation. `Symfony\Component\Form\FormInterface` implements `ArrayAccess`, therefore, semantically speaking, `children[direct_child].children[grand_children]` and `children[direct_child][grand_children]` are equivalent. `offsetGet` is expected to fetch an element from `children`. I do not see why both were not considered equivalent when resolving the ViolationPath.

This commit will indeed change how some errors are mapped. However since the old mapping is (in my opinion) a bug...

Commits
-------

c64a75f [Form][Validator] All index items after children are to be considered grand-children when resolving ViolationPath (fixes #11458)
2014-09-15 19:17:27 +02:00
Bernhard Schussek
cee0ff8d64 bug #11715 [Form] FormBuilder::getIterator() now deals with resolved children (issei-m)
This PR was merged into the 2.3 branch.

Discussion
----------

[Form] FormBuilder::getIterator() now deals with resolved children

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

I think FormBuilder::getIterator() should resolve children before makes an iterator because it seems to be used in same purpose with FormBuilder::all().
What do you think?

Commits
-------

0deb505 [Form] FormBuilder::getIterator() now deals with resolved children
2014-09-15 17:17:27 +02:00
Bernhard Schussek
05c720734b feature #11917 [Validator] Add ClassMetadata plural methods for convinience (jakzal)
This PR was squashed before being merged into the 2.6-dev branch (closes #11917).

Discussion
----------

[Validator] Add ClassMetadata plural methods for convinience

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

I realised there's no specific place to document this methods, as the code examples always include all the formats. I think it's enough if IDE autocompletes these methods.

Commits
-------

0fd6769 [Validator] Add ClassMetadata plural methods for convinience
2014-09-15 16:53:41 +02:00
Jakub Zalas
0fd6769d2a [Validator] Add ClassMetadata plural methods for convinience 2014-09-15 16:53:34 +02:00
Fabien Potencier
fcbbe90646 bug #11918 [DependencyInjection] remove service parameter type from XSD (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[DependencyInjection] remove `service` parameter type from XSD

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

Referencing a service in a parameter doesn't work and will lead to an error when the configuration is loaded (see symfony/symfony-docs#4211).

Commits
-------

7333c2d remove `service` parameter type from XSD
2014-09-13 11:36:04 +02:00
Christian Flothmann
7333c2d1cb remove service parameter type from XSD
Referencing a service in a parameter doesn't work and will lead to an
error when the configuration is loaded.
2014-09-13 09:57:08 +02:00
Grégoire Pineau
9ad8957a0b [Filesystem] Added a lock handler 2014-09-12 16:19:59 +02:00
Bernhard Schussek
ef5bdb2afa minor #11913 [Intl] Updated icu.ini up to ICU 53 (webmozart)
This PR was merged into the 2.3 branch.

Discussion
----------

[Intl] Updated icu.ini up to ICU 53

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

Extracted from #9206.

Commits
-------

260e2fe [Intl] Updated icu.ini up to ICU 53
2014-09-12 15:41:47 +02:00
Bernhard Schussek
9052efc499 [Intl] Added exception handler to command line scripts 2014-09-12 15:40:41 +02:00
Bernhard Schussek
7b4a35a844 [Intl] Fixed a few bugs in TextBundleWriter 2014-09-12 13:27:08 +02:00
Bernhard Schussek
260e2fe172 [Intl] Updated icu.ini up to ICU 53 2014-09-12 13:10:21 +02:00
Bernhard Schussek
2349839738 bug #11905 [Intl] Removed non-working $fallback argument from ArrayAccessibleResourceBundle (webmozart)
This PR was merged into the 2.3 branch.

Discussion
----------

[Intl] Removed non-working $fallback argument from ArrayAccessibleResourceBundle

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

The code in question didn't actually work. This was extracted from #9206.

Commits
-------

5feda5e [Intl] Removed non-working $fallback argument from ArrayAccessibleResourceBundle
2014-09-12 12:39:43 +02:00
Bernhard Schussek
90660255a2 [OptionsResolver] Added a light-weight, low-level API for basic option resolving 2014-09-12 12:25:18 +02:00
Bernhard Schussek
5feda5e9a6 [Intl] Removed non-working $fallback argument from ArrayAccessibleResourceBundle 2014-09-11 18:28:58 +02:00
Jérémy JOURDIN
ee75af0c89 Use separated function to resolve command and related arguments 2014-09-11 18:27:13 +02:00
Fabien Potencier
a45e3da3e4 minor #11822 [Security] Use hash_equals for constant-time string comparison (again) (dunglas)
This PR was merged into the 2.3 branch.

Discussion
----------

[Security] Use hash_equals for constant-time string comparison (again)

| 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

Use the `hash_equals` function (introduced in PHP 5.6) for timing attack safe string comparison when available.

Add in the DocBlock that length will leak (https://github.com/symfony/symfony/pull/11797#issuecomment-53990712).

Commits
-------

3071557 [Security] Add more tests for StringUtils::equals
03bd74b [Security] Use hash_equals for constant-time string comparison
2014-09-10 15:18:42 +02:00
Fabien Potencier
d4e056c877 bug #11374 [DI] Added safeguards against invalid config in the YamlFileLoader (stof)
This PR was merged into the 2.3 branch.

Discussion
----------

[DI] Added safeguards against invalid config in the YamlFileLoader

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

Exceptions explaining the mistake are better than fatal errors or weird notices appearing when trying to deal with such invalid data.

The XML file loader is not affected by this because the data are validated with the XSD before being processed

Commits
-------

5183501 [DI] Added safeguards against invalid config in the YamlFileLoader
2014-09-10 15:14:47 +02:00
Bernhard Schussek
7fd5e8b201 [Intl] Added "internal" tag to all classes under Symfony\Component\Intl\ResourceBundle
We didn't have this tag yet when this component was first written. The code in that
namespace is only used for resource bundle generation and was never meant for public
use.
2014-09-09 16:20:39 +02:00
Philipp Wahala
86873f29f8 #11652 [HttpKernel] Remove unused method Kernel::isClassInActiveBundle 2014-09-08 21:56:05 +02:00
Morgan Auchede
131abd816f [Security] Fix usage of unexistent method in DoctrineAclCache. 2014-09-05 15:11:41 +02:00
Clément Gautier
2356eaad5f [DependencyInjection] Added exception to avoid fatal during compile in a frozen dumped container 2014-09-05 14:28:20 +02:00
Kevin Bond
cdee6f6e58 add overwrite flag to allow non-decorated output 2014-09-05 08:08:33 -04:00
Tristan Maindron
30fed6a620 [Translation][Cache] Removed the options from the arguments of Translator
Fixed phpdoc

Aligned variables and description

Removed enableCache and added cache setup in constructor

Added tests for locales with . and @ with caching
2014-09-05 13:44:55 +02:00
Fabien Potencier
cfe60a4a47 bug #11850 [YAML] properly mask escape sequences in quoted strings (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[YAML] properly mask escape sequences in quoted strings

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

Commits
-------

a7d0cf2 properly mask escape sequences in quoted strings
2014-09-05 12:07:58 +02:00
bertillon
81eca38d5a [Filesystem] Check number of bytes copied. 2014-09-05 11:25:44 +02:00
Abdellatif Ait boudad
8b2d9a8d4d [FrameworkBundle][Translation] moved cache to Translation component
[Translation][Cache] removed accessors for options.
2014-09-05 10:11:24 +02:00
Romain Neutron
888f0eb3f5 minor #11842 [Process] add missing exceptions to docblock (xabbuh)
This PR was merged into the 2.5 branch.

Discussion
----------

[Process] add missing exceptions to docblock

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

Commits
-------

1be80c6 add missing exceptions to docblock
2014-09-05 09:43:27 +02:00
Fabien Potencier
eb1e3c344c minor #11851 [HttpKernel] Escape SSI virtual in generated response (Jérémy Derussé)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[HttpKernel] Escape SSI virtual in generated response

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

If a template with an `<!--#inlude -->` tag  is configured with an "virtual" containing a `'` ; the HttpCache will generate invalide php code.

See #11845 for the same issue on `<esi>` tags

Commits
-------

b50a434 Fix CS
1862427 Escape SSI virtual in generated response
2014-09-05 09:37:13 +02:00
Fabien Potencier
7e5ec59fc8 minor #11845 [HttpKernel] Escape ESI url in generated response (Jérémy Derussé)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpKernel] Escape ESI url in generated response

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

If a template with an `<esi>` tag  is configured with an URL containing a `'` (in  `src` or `alt`) ; the HttpCache will generate invalide php code.

It's not a security issue, given the template and the `<esi>` tag is written by the developper, but, as the character quote is allowed in URL (https://tools.ietf.org/html/rfc3986) it coud be a potential bug.

Commits
-------

b044c45 Escape parameter on generated response
2014-09-05 09:35:40 +02:00
Kévin Dunglas
3071557ec8 [Security] Add more tests for StringUtils::equals 2014-09-04 23:39:11 +02:00
Kévin Dunglas
03bd74bdea [Security] Use hash_equals for constant-time string comparison 2014-09-04 23:37:08 +02:00
Jérémy Derussé
b30317e5f3 Ignore warning on fopen 2014-09-04 23:09:17 +02:00
Christian Flothmann
a7d0cf2070 properly mask escape sequences in quoted strings 2014-09-04 22:00:25 +02:00
Jérémy Derussé
b50a4345f6 Fix CS 2014-09-04 21:31:49 +02:00
Jérémy Derussé
18624270bb Escape SSI virtual in generated response 2014-09-04 20:59:01 +02:00
Fabien Potencier
80536d012d bug #11843 [Yaml] improve error message when detecting unquoted asterisks (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[Yaml] improve error message when detecting unquoted asterisks

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

Asterisks in unquoted strings are used in YAML to reference variables. Before Symfony 2.3.19, Symfony 2.4.9 and Symfony 2.5.4, unquoted asterisks in inlined YAML code were treated as regular strings. This was fixed for the inline parser in #11677. However, an unquoted * character now led to an error message like this:

```
PHP Warning:  array_key_exists(): The first argument should be either a string or an integer in vendor/symfony/symfony/src/Symfony/Component/Yaml/Inline.php on line 409

  [Symfony\Component\Yaml\Exception\ParseException]
  Reference "" does not exist at line 171 (near "- { foo: * }").
```

Commits
-------

854e07b improve error when detecting unquoted asterisks
2014-09-04 11:57:59 +02:00
Christian Flothmann
1be80c64d2 add missing exceptions to docblock 2014-09-03 22:47:09 +02:00
Jérémy Derussé
b044c45679 Escape parameter on generated response 2014-09-03 22:47:06 +02:00
Christian Flothmann
854e07b1de improve error when detecting unquoted asterisks
Asterisks in unquoted strings are used in YAML to reference
variables. Before Symfony 2.3.19, Symfony 2.4.9 and Symfony 2.5.4,
unquoted asterisks in inlined YAML code were treated as regular
strings. This was fixed for the inline parser in #11677. However, an
unquoted * character now led to an error message like this:

```
PHP Warning:  array_key_exists(): The first argument should be either a string or an integer in vendor/symfony/symfony/src/Symfony/Component/Yaml/Inline.php on line 409

  [Symfony\Component\Yaml\Exception\ParseException]
  Reference "" does not exist at line 171 (near "- { foo: * }").
```
2014-09-03 21:08:43 +02:00
Fabien Potencier
afb82e83af bumped Symfony version to 2.5.5 2014-09-03 14:51:22 +02:00
Fabien Potencier
8d6b59b0bd bumped Symfony version to 2.4.10 2014-09-03 14:51:14 +02:00
Fabien Potencier
1033dc59cd bumped Symfony version to 2.3.20 2014-09-03 14:50:59 +02:00
Fabien Potencier
3a369dddea updated VERSION for 2.5.4 2014-09-03 11:51:48 +02:00
Fabien Potencier
6266883049 updated VERSION for 2.4.9 2014-09-03 11:50:20 +02:00
Fabien Potencier
1fc0575804 updated VERSION for 2.3.19 2014-09-03 11:45:27 +02:00
Fabien Potencier
f940d92a32 Merge branch '2.5'
* 2.5:
  Revert "minor #11808 [Security] Add more tests for StringUtils::equals (dunglas)"
2014-09-03 11:22:23 +02:00
Fabien Potencier
1ec88bed2c Merge branch '2.4' into 2.5
* 2.4:
  Revert "minor #11808 [Security] Add more tests for StringUtils::equals (dunglas)"
2014-09-03 11:22:15 +02:00
Fabien Potencier
1205e75f7a Revert "minor #11808 [Security] Add more tests for StringUtils::equals (dunglas)"
This reverts commit 8fdfb6fc35, reversing
changes made to e99dfdf87a.
2014-09-03 11:22:04 +02:00
Fabien Potencier
d31bf634da Merge branch '2.5'
* 2.5: (23 commits)
  [HttpKernel] fixed some unit tests for 2.4 (signature now uses SHA256 instead of MD5)
  [HttpKernel] simplified code
  [HttpKernel] fixed internal fragment handling
  fixing yaml indentation
  Unexpexted ));"
  [WebProfiler] replaced the import/export feature from the web interface to a CLI tool
  Forced all fragment uris to be signed, even for ESI
  Add tests and more assertions
  [FrameworkBundle][Translator] Validate locales.
  [HttpFoundation] added some missing tests
  [HttpFoundation] Improve string values in test codes
  [Security] Add more tests for StringUtils::equals
  fix comment: not fourth but sixth argument
  fixing typo in a comment
  [FrameworkBundle] fixed CS
  [FrameworkBundle] PhpExtractor bugfix and improvements
  [Finder] Fix findertest readability
  [Filesystem] Add FTP stream wrapper context option to enable overwrite (override)
  fix parsing of Authorization header
  Test examples from Drupal SA-CORE-2014-003
  ...

Conflicts:
	src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/admin.html.twig
	src/Symfony/Component/Filesystem/Filesystem.php
	src/Symfony/Component/HttpKernel/Fragment/EsiFragmentRenderer.php
2014-09-03 11:12:11 +02:00
Fabien Potencier
c1b1b109b4 Merge branch '2.4' into 2.5
* 2.4: (21 commits)
  [HttpKernel] fixed some unit tests for 2.4 (signature now uses SHA256 instead of MD5)
  [HttpKernel] simplified code
  [HttpKernel] fixed internal fragment handling
  fixing yaml indentation
  [WebProfiler] replaced the import/export feature from the web interface to a CLI tool
  Forced all fragment uris to be signed, even for ESI
  Add tests and more assertions
  [FrameworkBundle][Translator] Validate locales.
  [HttpFoundation] added some missing tests
  [HttpFoundation] Improve string values in test codes
  [Security] Add more tests for StringUtils::equals
  fix comment: not fourth but sixth argument
  fixing typo in a comment
  [FrameworkBundle] fixed CS
  [FrameworkBundle] PhpExtractor bugfix and improvements
  [Finder] Fix findertest readability
  [Filesystem] Add FTP stream wrapper context option to enable overwrite (override)
  fix parsing of Authorization header
  Test examples from Drupal SA-CORE-2014-003
  Fix potential DoS when parsing HOST
  ...

Conflicts:
	src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php
	src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php
2014-09-03 11:00:14 +02:00
Fabien Potencier
4ef1328f32 [HttpKernel] fixed some unit tests for 2.4 (signature now uses SHA256 instead of MD5) 2014-09-03 10:52:18 +02:00
Fabien Potencier
f6e9248c0c [HttpKernel] simplified code 2014-09-03 10:44:56 +02:00
Fabien Potencier
8358ebb15a Merge branch '2.3' into 2.4
* 2.3:
  [HttpKernel] fixed internal fragment handling
  fixing yaml indentation
  [WebProfiler] replaced the import/export feature from the web interface to a CLI tool
  Forced all fragment uris to be signed, even for ESI
  Add tests and more assertions
  [FrameworkBundle][Translator] Validate locales.
  [HttpFoundation] added some missing tests
  [HttpFoundation] Improve string values in test codes
  fix comment: not fourth but sixth argument
  fixing typo in a comment
  [FrameworkBundle] fixed CS
  [FrameworkBundle] PhpExtractor bugfix and improvements
  [Finder] Fix findertest readability
  [Filesystem] Add FTP stream wrapper context option to enable overwrite (override)
  fix parsing of Authorization header
  Test examples from Drupal SA-CORE-2014-003
  Fix potential DoS when parsing HOST
  Made optimization deprecating modulus operator

Conflicts:
	src/Symfony/Bundle/FrameworkBundle/Resources/config/esi.xml
	src/Symfony/Component/HttpFoundation/Request.php
	src/Symfony/Component/HttpFoundation/Tests/RequestTest.php
	src/Symfony/Component/HttpKernel/Fragment/EsiFragmentRenderer.php
2014-09-03 10:42:07 +02:00
Fabien Potencier
23eb033abb [HttpKernel] fixed internal fragment handling 2014-09-03 10:09:50 +02:00
Fabien Potencier
439c5a3357 security #11831 n/a (stof)
This PR was merged into the 2.3 branch.

Discussion
----------

n/a

n/a

Commits
-------

654b1f2 Forced all fragment uris to be signed, even for ESI
2014-09-03 09:40:02 +02:00
Fabien Potencier
c558b159fe security #11830 n/a (aitboudad, Jérémy Derussé)
This PR was merged into the 2.3 branch.

Discussion
----------

n/a

n/a

Commits
-------

9e1bc22 Add tests and more assertions
101a3b7 [FrameworkBundle][Translator] Validate locales.
2014-09-03 09:39:11 +02:00
Fabien Potencier
e30bb17b7e security #11829 n/a (damz, fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

n/a

n/a

Commits
-------

3b4046e [HttpFoundation] added some missing tests
cefe237 fix parsing of Authorization header
2014-09-03 09:38:23 +02:00
Fabien Potencier
0aaabbfe8b security #11828 n/a (nicolas-grekas, larowlan)
This PR was merged into the 2.3 branch.

Discussion
----------

n/a

n/a

Commits
-------

1ee96a8 Test examples from Drupal SA-CORE-2014-003
5506ee8 Fix potential DoS when parsing HOST
2014-09-03 09:37:21 +02:00
Christophe Coevoet
654b1f281e Forced all fragment uris to be signed, even for ESI 2014-09-02 09:39:57 +02:00
Christophe Coevoet
5183501e0b [DI] Added safeguards against invalid config in the YamlFileLoader
Exceptions explaining the mistake are better than fatal errors or weird
notices appearing when trying to deal with such invalid data.
Closes #11333
2014-09-02 09:31:18 +02:00
Jérémy Derussé
9e1bc22388 Add tests and more assertions 2014-09-02 09:12:49 +02:00
Fabien Potencier
8fdfb6fc35 minor #11808 [Security] Add more tests for StringUtils::equals (dunglas)
This PR was merged into the 2.4 branch.

Discussion
----------

[Security] Add more tests for StringUtils::equals

| 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

More tests for `StringUtils::equals`.

Commits
-------

a676863 [Security] Add more tests for StringUtils::equals
2014-09-02 09:07:06 +02:00
Fabien Potencier
3b4046e894 [HttpFoundation] added some missing tests 2014-09-01 23:16:21 +02:00
DQNEO
05f5860c56 [HttpFoundation] Improve string values in test codes 2014-09-01 13:58:07 +02:00
Kévin Dunglas
a6768635f0 [Security] Add more tests for StringUtils::equals 2014-09-01 13:47:09 +02:00
Fabien Potencier
32f1143e60 minor #11814 [Security] fixing typo in a comment (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[Security] fixing typo in a comment

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

As reported [here](https://github.com/symfony/symfony/pull/11574/files#r16934052).

Commits
-------

faefd66 fixing typo in a comment
2014-09-01 13:45:45 +02:00
DQNEO
42841e845b fix comment: not fourth but sixth argument 2014-09-01 13:44:28 +02:00
Christian Flothmann
faefd66b10 fixing typo in a comment 2014-09-01 09:40:12 +02:00
Fabien Potencier
800b7b2752 feature #11324 [SecurityBundle] error helper added symfony/symfony#11147 (i3or1s)
This PR was squashed before being merged into the 2.6-dev branch (closes #11324).

Discussion
----------

[SecurityBundle] error helper added symfony/symfony#11147

Added helper that extracts last authentication error and username.

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

Commits
-------

1722f60 [SecurityBundle] error helper added symfony/symfony#11147
2014-08-31 06:19:40 +02:00
Boris Vujicic
1722f60d42 [SecurityBundle] error helper added symfony/symfony#11147 2014-08-31 06:19:38 +02:00
Fabien Potencier
e85ab46b17 feature #9235 [Console] Skip commands from ConsoleCommandEvent (tPl0ch)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[Console] Skip commands from ConsoleCommandEvent

Use case: We have different variations of the same application, for which
only certain commands are allowed. Right now this is done in a custom
Application class, but it would be much easier to just be able to skip
commands from a listener, where you can disable commands via the Event
object.

This patch provides this feature and corresponding test cases.

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes - for Console tests
| Fixed tickets | None
| License       | MIT
| Doc PR        | symfony/symfony-docs#4058

Commits
-------

acb1ae6 [Console] Skip commands from ConsoleCommandEvent
2014-08-31 06:11:39 +02:00
1emming
8a47b62bd3 [Finder] Fix findertest readability 2014-08-31 06:03:32 +02:00
Fabien Potencier
0f59bca7b0 feature #11501 [OptionsResolver] Changed order of validation (WouterJ)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[OptionsResolver] Changed order of validation

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | yes
| BC breaks?    | no (I don't think it causes breaks)
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        | -

It's both a new feature and bug fix actually... I let @fabpot decide on this one.

<s>@sstok can you please confirm if this fixes #4500 ? I couldn't fully follow
that ticket and then I discovered this error. If not, can you please add more
information to your ticket about the problems?</s>

Commits
-------

a4f208b Changed order of validation
2014-08-31 05:52:06 +02:00
Fabien Potencier
b5d0501860 minor #11574 [Security] Made optimization on constant-time algorithm removing modulus operator (yosmanyga)
This PR was merged into the 2.3 branch.

Discussion
----------

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

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

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

Commits
-------

000bd0d Made optimization deprecating modulus operator
2014-08-31 05:48:56 +02:00
Fabien Potencier
77aa12fcd3 feature #11703 [Validator] deprecate member metadata accessors (Tobion)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[Validator] deprecate member metadata accessors

| Q             | A
| ------------- | ---
| Bug fix?      | sort of
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/11614/files#r16385109
| License       | MIT
| Doc PR        |

deprecate member metadata accessors in favor of existing property metadata accessors

Commits
-------

14d3f97 [Validator] add getConstraints to MetadataInterface
04eb61b [Validator] deprecate member metadata accessors in favor of existing property metadata accessors
2014-08-31 05:47:52 +02:00
Fabien Potencier
69d4dd9a19 feature #11709 [Validator] Expression validator now processes null values (tommygnr)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[Validator] Expression validator now processes null values

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

The ExpressionValidator was incorrectly skipping validation of null or empty string values.

For example the following was (incorrectly) considered valid if hairColour is null because the validator was skipped
```php
<?php

namespace Acme\DemoBundle\Model\Person;

use Symfony\Component\Validator\Constraints as Assert;

class Person
{
    private $hasHair;

    /**
     * @Assert\Expression(
     *     "!(this.hasHair() and value == null)",
     *     message="If you have hair you must pick its colour!"
     * )
     */
    private $hairColour;
}
```

This is a follow on from #11590 but is targeted against master as the BC break introduced was considered undesirable for currently released versions of symfony.

I will squash and create a documentation PR once there is consensus that this is ready to be merged.

Commits
-------

580e1a7 [Validator] fixed: Expressions always valid for null values
2014-08-31 05:42:10 +02:00
Fabien Potencier
94990a2769 minor #11707 [Validator] Test that validateProperty() works if no constraint is defined (xabbuh)
This PR was merged into the 2.5 branch.

Discussion
----------

[Validator] Test that validateProperty() works if no constraint is defined

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes (2.3 has to be merged into 2.5 first)
| Fixed tickets | #11604, #11614
| License       | MIT
| Doc PR        |

Adds a test case for #11604 to avoid regressions. The actual issue has been fixed in Symfony 2.3 with the merge of #11615.

Commits
-------

a47a884 add test for #11604
2014-08-31 05:34:15 +02:00
Fabien Potencier
c00c8fd70a minor #11684 [DX] Removed strict alias name check (WouterJ)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[DX] Removed strict alias name check

Symfony allows to change the DI alias by overriding `Extension#getAlias()`, but it does throw an exception when it is anything else than the default. That doesn't sound nice and it makes it harder to change the alias. This can result in problems when the bundle is called WouterJEloquentBundle for instance (which has a default alias of `wouter_j_eloquent_bundle`, where I want it to be `wouterj_eloquent_bundle`).

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

Commits
-------

69d71c1 Made the exception message nicer
2014-08-31 05:32:49 +02:00
Damian Sromek
c056a9c426 [Filesystem] Add FTP stream wrapper context option to enable overwrite (override) 2014-08-31 05:30:23 +02:00
Fabien Potencier
4b53873d7a Merge branch '2.5'
* 2.5:
  fix typos
  [HttpKernel] add use statement for phpdoc
  fixed DateComparator if file does not exist
  Disabled the PHPUnit self-update on Travis
  fix mustRun() in sigchild environments
  [ClassLoader] simplified phpdoc
  [ClassLoader] Add a __call() method to XcacheClassLoader
  fix some minor typos in tests
  [Yaml] fixed mapping keys containing a quoted #
  Added fixture to test parsing of hash keys ending with a space and #
  [Validator] Pass strict argument into the strict email validator
  [Filesystem Component] mkdir race condition fix #11626
  [Validator] reverted permissions change on translation files
  Fixed Factory services not within the ServiceReferenceGraph.
  [CssSelector] Fix URL to SimonSapin/cssselect repo
  [Validator] Fixed wrong translation keys/messages for Collection constraint. The error messages for a missing field and an unexpected field did not match the Contraint class
  Remove hard dependency of RequestContext in AssetsExtension
  added useful reminder about form.vars.errors into UPGRADE-2.5 notes
  [YAML] resolve variables in inlined YAML
  Disallow abstract definitions from doctrine event listener registration

Conflicts:
	src/Symfony/Component/Yaml/Inline.php
	src/Symfony/Component/Yaml/Parser.php
	src/Symfony/Component/Yaml/Tests/InlineTest.php
2014-08-31 05:28:38 +02:00
Fabien Potencier
6ff62cc675 Merge branch '2.4' into 2.5
* 2.4:
  fix typos
  [HttpKernel] add use statement for phpdoc
  Disabled the PHPUnit self-update on Travis
  [ClassLoader] simplified phpdoc
  [ClassLoader] Add a __call() method to XcacheClassLoader
  fix some minor typos in tests
  [Yaml] fixed mapping keys containing a quoted #
  Added fixture to test parsing of hash keys ending with a space and #
  [Filesystem Component] mkdir race condition fix #11626
  [Validator] reverted permissions change on translation files
  Fixed Factory services not within the ServiceReferenceGraph.
  [CssSelector] Fix URL to SimonSapin/cssselect repo
  [Validator] Fixed wrong translation keys/messages for Collection constraint. The error messages for a missing field and an unexpected field did not match the Contraint class
  [YAML] resolve variables in inlined YAML
  Disallow abstract definitions from doctrine event listener registration

Conflicts:
	src/Symfony/Component/Process/Tests/SigchildDisabledProcessTest.php
	src/Symfony/Component/Yaml/Inline.php
2014-08-31 05:22:04 +02:00
Fabien Potencier
e99dfdf87a Merge branch '2.3' into 2.4
* 2.3:
  [HttpKernel] add use statement for phpdoc
  Disabled the PHPUnit self-update on Travis
  [ClassLoader] simplified phpdoc
  [ClassLoader] Add a __call() method to XcacheClassLoader
  fix some minor typos in tests
  [Yaml] fixed mapping keys containing a quoted #
  Added fixture to test parsing of hash keys ending with a space and #
  [Filesystem Component] mkdir race condition fix #11626
  [Validator] reverted permissions change on translation files
  Fixed Factory services not within the ServiceReferenceGraph.
  [CssSelector] Fix URL to SimonSapin/cssselect repo
  [Validator] Fixed wrong translation keys/messages for Collection constraint. The error messages for a missing field and an unexpected field did not match the Contraint class
  [YAML] resolve variables in inlined YAML
  Disallow abstract definitions from doctrine event listener registration

Conflicts:
	src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPass.php
	src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPassTest.php
	src/Symfony/Bundle/FrameworkBundle/EventListener/SessionListener.php
	src/Symfony/Component/Filesystem/Filesystem.php
2014-08-31 05:18:18 +02:00
Tobias Schultze
e91269bd7c fix typos 2014-08-30 22:47:12 +02:00
WouterJ
69d71c17dc Made the exception message nicer 2014-08-30 19:12:40 +02:00
Fabien Potencier
06de353635 bug #11791 [Process] fix mustRun() in sigchild environments (xabbuh)
This PR was merged into the 2.5 branch.

Discussion
----------

[Process] fix mustRun() in sigchild environments

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

When being run in sigchild environments, the sigchild compatibility mode needs to be enabled to be able to call `getExitCode()`. Since `mustRun()` uses `getExitCode()` to determine whether or not a process terminated successfully, it cannot be used in sigchild environments when the sigchild compatibility mode is disabled.

Commits
-------

b764f6c fix mustRun() in sigchild environments
2014-08-30 09:50:17 +02:00
Fabien Potencier
4d3ebd1c11 minor #11769 [HttpKernel] Change exception message in case no controller found (ghostika)
This PR was squashed before being merged into the 2.6-dev branch (closes #11769).

Discussion
----------

[HttpKernel] Change exception message in case no controller found

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

Change the NotFoundHttpException message.

Commits
-------

b0a839c [HttpKernel] Change exception message in case no controller found
2014-08-30 09:41:27 +02:00
Andras Ratz
b0a839cc6e [HttpKernel] Change exception message in case no controller found 2014-08-30 09:41:24 +02:00
Christian Flothmann
fc85435915 fix handling of empty sequence items
When a line contains only a dash it cannot safely be assumed that
it contains a nested list or an embedded mapping. If the next line
starts with a dash at the same indentation, the current line's item
is to be treated as `null`.
2014-08-29 15:58:19 +02:00
Fabien Potencier
c730fc6f77 bug #11788 [Yaml] fixed mapping keys containing a quoted # (hvt, fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

[Yaml] fixed mapping keys containing a quoted #

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

Commits
-------

110f999 [Yaml] fixed mapping keys containing a quoted #
8ba3b28 Added fixture to test parsing of hash keys ending with a space and #
2014-08-29 11:22:54 +02:00
Fabien Potencier
b74acdb797 bug #11787 fixed DateComparator if file does not exist (avi123)
This PR was squashed before being merged into the 2.5 branch (closes #11787).

Discussion
----------

fixed DateComparator if file does not exist

Description:
When a file is deleted after the iterator is created, the accept function throws the following exception: SplFileInfo::getMTime(): stat failed.  This is because the function doesn't check first for the existence of the file.  In theory, a deletion between existence being checked and getMTime getting called would still result in this error, but the risk area for this race condition is much smaller than the current risk area.

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

Commits
-------

c6e9e06 fixed DateComparator if file does not exist
2014-08-29 11:14:46 +02:00
avi123
c6e9e06abb fixed DateComparator if file does not exist 2014-08-29 11:14:43 +02:00
Fabien Potencier
1a99d5a1ac minor #11762 [DependencyInjection] Enhance tests for class Container (kerdany)
This PR was squashed before being merged into the 2.6-dev branch (closes #11762).

Discussion
----------

[DependencyInjection] Enhance tests for class Container

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

Added missing tests/assertions:
- Assertions that ->compile() resolves parameter bag.
- Asserton that ->getServiceIds() shows ids defined by set() after ids defined by get*Service() methods.
- Test that ->set() automatically calls synchronize*Service if defined. Updated associated fixtures in the ProjectServiceContainer class definition.
- Assertion that ->get() is case insensitive.
- Assertion that leaving an inner scope with active child scope, to an outer scope, deactivates/resets the child scope(s).
- Test that entering a child scope recursively resets the inner scope.
- Test that a scope can not be entered before it's added first.
- Test that a scope can not be entered before adding and entering the parent scope first (for non container scopes).
- Test for underscore().

Other changes:
- Added missing messages in some assertions.
- Moved testGetThrowsException*() methods close to testGet*() tests.
- Renamed variable(s) '$services' (referencing the $sc->scopedServices field) to $scoped, so as not to confuse it with the global scope map.
- Minor refactoring in class Container for code consistency and reducing redundancy.

Commits
-------

6211205 [DependencyInjection] Enhance tests for class Container
2014-08-29 11:07:47 +02:00
Hany el-Kerdany
6211205659 [DependencyInjection] Enhance tests for class Container 2014-08-29 11:07:45 +02:00
Christian Flothmann
b764f6c61e fix mustRun() in sigchild environments
When being run in sigchild environments, the sigchild compatibility
mode needs to be enabled to be able to call `getExitCode()`. Since
`mustRun()` uses `getExitCode()` to determine whether or not a process
terminated successfully, it cannot be used in sigchild environments
when the sigchild compatibility mode is disabled.
2014-08-28 18:39:24 +02:00
Fabien Potencier
8605c42441 [ClassLoader] simplified phpdoc 2014-08-28 16:35:12 +02:00
Fabien Potencier
f7769b52f1 bug #11768 [ClassLoader] Add a __call() method to XcacheClassLoader (tstoeckler)
This PR was squashed before being merged into the 2.3 branch (closes #11768).

Discussion
----------

[ClassLoader] Add a __call() method to XcacheClassLoader

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

Commits
-------

dd0d6af [ClassLoader] Add a __call() method to XcacheClassLoader
2014-08-28 16:33:47 +02:00
Tobias Stöckler
dd0d6afc21 [ClassLoader] Add a __call() method to XcacheClassLoader 2014-08-28 16:33:42 +02:00
Christian Flothmann
24d2c9a5f0 fix some minor typos in tests 2014-08-28 11:02:24 +02:00
Fabien Potencier
9d6c5d807d feature #11313 [Config][Exception] Improve Routing Syntax Import Error (Jan Decavele, tvlooy)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[Config][Exception] Improve Routing Syntax Import Error

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

Commits
-------

fec9a4a removed some more spaces
16134d9 Merge remote-tracking branch 'upstream/master'
b099936 - Removed spaces around the concation dots to be more consitent - adjusted some formatting
0459d89 Addition of the symfony license text
de43182 Add test and small code fix
8ac5275 ISSUE #11300: Improve Routing Syntax Import Error
2014-08-28 09:05:14 +02:00
Fabien Potencier
110f999d05 [Yaml] fixed mapping keys containing a quoted # 2014-08-28 03:42:35 +02:00
Harm van Tilborg
8ba3b289fe Added fixture to test parsing of hash keys ending with a space and # 2014-08-28 03:41:39 +02:00
Brian Freytag
d2a634d73d [Validator] Pass strict argument into the strict email validator 2014-08-27 22:16:07 +02:00
Fabien Potencier
c6ef1bb1c6 feature #11777 [HttpFoundation] added class constants in Request for HTTP request methods (phansys)
This PR was squashed before being merged into the 2.6-dev branch (closes #11777).

Discussion
----------

[HttpFoundation] added class constants in Request for HTTP request methods

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

Also added constants for methods OPTIONS, TRACE and CONNECT according to [rfc2616](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html).

Commits
-------

635e880 [HttpFoundation] added class constants in Request for HTTP request methods
2014-08-27 15:19:41 +02:00
Javier Spagnoletti
635e880839 [HttpFoundation] added class constants in Request for HTTP request methods 2014-08-27 15:19:39 +02:00
Fabien Potencier
7a4e02aca9 feature #11346 [Console] ProgressBar developer experience (stefanosala, gido)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[Console] ProgressBar developer experience

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

## TODO

- [x] Create `getProgress/setProgress` methods to replace `getStep/setCurrent`
- [x] `ProgressBar::setCurrent` should auto-start the ProgressBar.
- [x] You should be able to pass `max` to `start`
- [x] `barCharOriginal` not needed. Logic can simply be part of `getBarChar`
- [x] `getStepWidth` is internal information that should not be public
- [x] when verbosity set to quiet, the progress bar does not even need to execute all the logic to generate output that is then thrown away
- [x] Allow to advance past max.
- [x] negative max needs to be validated
- [x] `getProgressPercent` should return float instead of int.

Commits
-------

42b95df [Console][ProgressBar] Developer experience:  - Removed barCharOriginal  - getProgressPercent should return float instead of int.  - Minor refactoring
3011685 [Console][ProgressBar] Allow to advance past max.
73ca340 [Console][ProgressBar] Developer experience  - Create getProgress/setProgress methods to replace getStep/setCurrent  - ProgressBar::setCurrent should auto-start the ProgressBar.  - You should be able to pass max to start  - getStepWidth is internal information that should not be public  - when verbosity set to quiet, the progress bar does not even need to    execute all the logic to generate output that is then thrown away
2014-08-27 15:03:54 +02:00
Fabien Potencier
1d027be648 fixed CS 2014-08-27 14:56:02 +02:00
Fabien Potencier
31d2f6b296 feature #9859 [Translation] added method to expose collected message (Grygir)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[Translation] added method to expose collected message

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

Commits
-------

ef5d7c5 [Translation] added method to expose collected messages
2014-08-27 14:55:31 +02:00
Fabien Potencier
bb97903684 bug #11726 [Filesystem Component] mkdir race condition fix #11626 (kcassam)
This PR was squashed before being merged into the 2.3 branch (closes #11726).

Discussion
----------

[Filesystem Component] mkdir race condition fix #11626

[Filesystem Component] Fix mkdir race condition

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

Commits
-------

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

Discussion
----------

[YAML] resolve variables in inlined YAML

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

#11569 does not resolve variables in inline YAML.

Commits
-------

45a5863 [YAML] resolve variables in inlined YAML
2014-08-27 14:37:38 +02:00
Fabien Potencier
7510d0648e [Validator] reverted permissions change on translation files 2014-08-27 10:38:16 +02:00
Fabien Potencier
df244f27e6 fixed CS 2014-08-27 10:36:12 +02:00
Fabien Potencier
9182904f6f minor #11767 Improve the exception message of UrlMatcher (dawehner)
This PR was merged into the 2.6-dev branch.

Discussion
----------

Improve the exception message of UrlMatcher

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

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

Commits
-------

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

Discussion
----------

[Validator] Fixed wrong translations for Collection constraints

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

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

Commits
-------

808de2b [Validator] Fixed wrong translation keys/messages for Collection constraint. The error messages for a missing field and an unexpected field did not match the Contraint class
2014-08-27 10:28:50 +02:00
Johnson Page
b9a237c00b [CssSelector] Fix URL to SimonSapin/cssselect repo 2014-08-27 10:24:06 +02:00
Sam Malone
808de2b284 [Validator] Fixed wrong translation keys/messages for Collection constraint. The error messages for a missing field and an unexpected field did not match the Contraint class 2014-08-27 03:57:26 +01:00
Fabien Potencier
4b507bd7a4 bug #11759 [Debug] fix and enhance exception messages (nicolas-grekas)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[Debug] fix and enhance exception messages

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

Commits
-------

8df1ce8 [Debug] fix and enhance exception messages
2014-08-26 19:33:51 +02:00
Daniel Wehner
ee1197d009 Improve the exception message in the UrlMatcher. 2014-08-26 17:25:16 +02:00
Fabien Potencier
c46125438c Merge branch '2.5'
* 2.5:
  [DependencyInjection] fix @return anno created by PhpDumper
  Fixed the phpdoc of the VoterInterface
  [DoctrineBridge] Fix empty parameter logging in the dbal logger
  [Validator] remove duplicate interface implementations
  [Validator] fix return doc of ClassMetadata::getCascadingStrategy
  Fixed #11675 ValueToDuplicatesTransformer accept "0" value
  check for the correct field type
  fix handling of nullable XML attributes
  [DomCrawler] fix the axes handling in a bc way
2014-08-26 16:16:42 +02:00
Fabien Potencier
c4615bfc93 Merge branch '2.4' into 2.5
* 2.4:
  [DependencyInjection] fix @return anno created by PhpDumper
  Fixed the phpdoc of the VoterInterface
  [DoctrineBridge] Fix empty parameter logging in the dbal logger
  Fixed #11675 ValueToDuplicatesTransformer accept "0" value
  check for the correct field type
  fix handling of nullable XML attributes
  [DomCrawler] fix the axes handling in a bc way

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

Conflicts:
	src/Symfony/Component/DomCrawler/Tests/CrawlerTest.php
2014-08-26 16:14:58 +02:00
Jakub Kulhan
39c4cc387d [DependencyInjection] fix @return anno created by PhpDumper 2014-08-26 15:05:12 +02:00
Nicolas Grekas
8df1ce826f [Debug] fix and enhance exception messages 2014-08-25 20:48:35 +02:00
Christophe Coevoet
b591404bee Fixed the phpdoc of the VoterInterface 2014-08-25 10:05:09 +02:00
Nicolas Grekas
1d7684ac3d feature #11673 [Validator] Added date support to comparison constraints and Range (webmozart)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[Validator] Added date support to comparison constraints and Range

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

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

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

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

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

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

Commits
-------

60a5863 [Validator] Added date support to comparison constraints and Range
2014-08-24 18:08:05 +02:00
Damien Tournoud
cefe237c6f fix parsing of Authorization header 2014-08-22 18:41:26 +02:00
Lee Rowlands
1ee96a8b1b Test examples from Drupal SA-CORE-2014-003 2014-08-22 11:57:03 +02:00
Nicolas Grekas
5506ee8f66 Fix potential DoS when parsing HOST 2014-08-22 11:56:47 +02:00
Tom Corrigan
580e1a7b46 [Validator] fixed: Expressions always valid for null values
The ExpressionValidator was incorrectly skipping validation of null or
empty string values.
2014-08-21 16:49:24 +10:00
Christophe Coevoet
b96e7f9707 bug #11692 [DomCrawler] check for the correct field type (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[DomCrawler] check for the correct field type

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

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

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

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

Commits
-------

169b397 check for the correct field type
2014-08-21 02:21:59 +02:00
Tobias Schultze
14d3f97488 [Validator] add getConstraints to MetadataInterface 2014-08-20 16:22:55 +02:00
Issei.M
0deb505e64 [Form] FormBuilder::getIterator() now deals with resolved children 2014-08-20 19:06:28 +09:00
Tobias Schultze
f262b01c5f bug #11672 [Routing] fix handling of nullable XML attributes (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[Routing] fix handling of nullable XML attributes

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

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

Commits
-------

7b4d4b6 fix handling of nullable XML attributes
2014-08-20 10:56:18 +02:00
Christian Flothmann
a47a8848c3 add test for #11604
Adds a test case for #11604 to avoid regressions. The actual issue
has been fixed in Symfony 2.3 with the merge of #11615.
2014-08-19 17:38:34 +02:00
Tobias Schultze
04eb61b80e [Validator] deprecate member metadata accessors in favor of existing property metadata accessors
add changelog for deprecations

fix test
2014-08-19 17:31:17 +02:00
Tobias Schultze
1eec2d6fda [Validator] remove duplicate interface implementations 2014-08-19 17:15:19 +02:00
Tobias Schultze
6dd55923e3 [Validator] fix return doc of ClassMetadata::getCascadingStrategy 2014-08-19 17:01:40 +02:00
Christophe Coevoet
00aedfc150 bug #11624 [DomCrawler] fix the axes handling in a bc way (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[DomCrawler] fix the axes handling in a bc way

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

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

Commits
-------

d26040f [DomCrawler] fix the axes handling in a bc way
2014-08-19 12:43:37 +02:00
Bernhard Schussek
ce1d2093bd [Validator] Added ConstraintViolation::getConstraint() 2014-08-19 11:39:05 +02:00
Bernhard Schussek
60a5863ba4 [Validator] Added date support to comparison constraints and Range 2014-08-19 11:31:05 +02:00
Nek (Maxime Veber)
31d48ab91f Fixed #11675 ValueToDuplicatesTransformer accept "0" value
Fixed wrong return null syntax

Added transformation to null on empty arrays

Removed useless statement in condition and switched to yoda condition
2014-08-19 11:05:04 +02:00
Bernhard Schussek
1d7599d97f Merge branch '2.5'
* 2.5:
  [Validator] Fixed missing use statements
  [Validators] Fixed failing tests requiring ICU 52.1 which are skipped otherwise
  [FrameworkBundle] Fixed validator factory definition when the Validator API is "auto" for PHP < 5.3.9
  return empty metadata collection if none do exist
2014-08-19 10:59:23 +02:00
Bernhard Schussek
fb97786a10 [Validator] Fixed missing use statements 2014-08-19 10:58:49 +02:00
Bernhard Schussek
59cd05f5b7 Merge branch '2.4' into 2.5
* 2.4:
  [Validators] Fixed failing tests requiring ICU 52.1 which are skipped otherwise
  return empty metadata collection if none do exist
2014-08-19 10:56:37 +02:00
Bernhard Schussek
9c69d7004d Merge branch '2.3' into 2.4
* 2.3:
  [Validators] Fixed failing tests requiring ICU 52.1 which are skipped otherwise
  return empty metadata collection if none do exist
2014-08-19 10:55:40 +02:00
Bernhard Schussek
5440ed5c38 [Validators] Fixed failing tests requiring ICU 52.1 which are skipped otherwise 2014-08-19 10:50:01 +02:00
Bernhard Schussek
f825f5d1c3 minor #11615 [Validator] return empty metadata collection if none do exist (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[Validator] return empty metadata collection if none do exist

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

Backport of #11614 for Symfony 2.3 and 2.4.

Commits
-------

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

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

Since the `FormFieldRegistry` can only handle one field per name, the
hidden field option is registered first before the radio field with
the same name is evaluated. Thus, the `FormFieldRegistry` returns an
`InputFormField` instance on which the `addChoices()` method can not
be called.
2014-08-18 17:01:30 +02:00
Christian Flothmann
45a5863508 [YAML] resolve variables in inlined YAML 2014-08-18 16:09:32 +02:00
Hryhorii Hrebiniuk
ef5d7c596e [Translation] added method to expose collected messages 2014-08-18 16:11:02 +03:00
Bernhard Schussek
d405f43a9b [Validator] Fixed Constraint class to not destroy custom groups upon serialization 2014-08-18 13:53:05 +02:00
Chris Sedlmayr
beca900a61 [HttpFoundation] MongoDbSessionHandler supports auto expiry via configurable expiry_field 2014-08-18 11:06:41 +02:00
Nicolas Grekas
7f38207967 Merge branch '2.5'
* 2.5:
  add missing options
  [Form] Fixed ValidatorExtension to work with the 2.5 Validation API
  revert #11510, moved to 2.6
  [WebProfilerBundle] Fixed double height of canvas
2014-08-18 11:02:08 +02:00
Nicolas Grekas
de871dc6f8 Merge branch '2.4' into 2.5
* 2.4:
  add missing options
  revert #11510, moved to 2.6
  [WebProfilerBundle] Fixed double height of canvas
2014-08-18 11:01:49 +02:00
Nicolas Grekas
562ca3d19c Merge branch '2.3' into 2.4
* 2.3:
  add missing options
  revert #11510, moved to 2.6
  [WebProfilerBundle] Fixed double height of canvas
2014-08-18 11:01:24 +02:00
Seb Koelen
2d5ab91fe4 add missing options 2014-08-18 10:59:14 +02:00
Bernhard Schussek
ff74f4e565 [Form] Fixed ValidatorExtension to work with the 2.5 Validation API 2014-08-15 11:41:31 +02:00
Christian Flothmann
7b4d4b63eb fix handling of nullable XML attributes
As @Tobion pointed out in #11394, true and 1 are valid values in
boolean XML attributes. The XmlFileLoader didn't handle 1 values
properly.
2014-08-15 11:05:55 +02:00
Bernhard Schussek
8725243a88 Merge branch '2.5'
* 2.5: (37 commits)
  [Validator] Backported constraint validator tests from 2.5
  [Validator] Backported constraint validator tests from 2.5
  [DIC] Fixed: anonymous services are always private
  Fix toolbar vertical alignment.
  [HttpFoundation] MongoDbSessionHandler supports auto expiry via configurable expiry_field
  [Validator] Fix little typo in ExecutionContextInterface::buildViolation() method comments
  fix dependencies on HttpFoundation component
  [FrameworkBundle] add missing attribute to XSD
  Allow basic auth in url. Improve regex. Add tests.
  fix typos and syntax in Profiler controller method comments
  resolve parameters before the configs are processed
  add symfony/yaml suggestion to composer.json
  [HttpKernel] added an analyze of environment parameters for built-in server.
  remove volatile tests
  [Console] fixed style creation when providing an unknown tag option
  change command to which available under most unix systems
  add way to test command under windows
  fix shell command injection
  [Form] allowed CallbackTransformer to use callable
  [Process] Added process synchronization to the incremental output tests
  ...

Conflicts:
	src/Symfony/Component/Form/Extension/Validator/Constraints/FormValidator.php
	src/Symfony/Component/HttpKernel/Kernel.php
	src/Symfony/Component/HttpKernel/composer.json
	src/Symfony/Component/Validator/Constraints/AllValidator.php
	src/Symfony/Component/Validator/Constraints/CollectionValidator.php
	src/Symfony/Component/Validator/Constraints/LegacyAllValidator.php
	src/Symfony/Component/Validator/Constraints/LegacyCollectionValidator.php
	src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php
2014-08-14 18:37:29 +02:00
Bernhard Schussek
0801a3a8f0 Merge branch '2.4' into 2.5
* 2.4:
  [Validator] Backported constraint validator tests from 2.5
  [Validator] Backported constraint validator tests from 2.5
  Fix toolbar vertical alignment.
  [HttpFoundation] MongoDbSessionHandler supports auto expiry via configurable expiry_field
  [FrameworkBundle] add missing attribute to XSD
  Allow basic auth in url. Improve regex. Add tests.
  fix typos and syntax in Profiler controller method comments
  remove volatile tests
  [Console] fixed style creation when providing an unknown tag option
  [Validator] Convert objects to string in comparison validators. Reapplies 6cf5e0812e
  [HttpFoundation] Update QUERY_STRING when overrideGlobals

Conflicts:
	src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php
	src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/full.xml
	src/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php
	src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorTest.php
	src/Symfony/Component/Security/Core/Tests/Validator/Constraints/UserPasswordValidatorTest.php
	src/Symfony/Component/Validator/Constraints/AllValidator.php
	src/Symfony/Component/Validator/Constraints/ChoiceValidator.php
	src/Symfony/Component/Validator/Constraints/CollectionValidator.php
	src/Symfony/Component/Validator/Constraints/ExpressionValidator.php
	src/Symfony/Component/Validator/Tests/Constraints/AbstractConstraintValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/AllValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/BlankValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/CallbackValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/CardSchemeValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/ChoiceValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/CollectionValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/CountValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/CountryValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/CurrencyValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/DateTimeValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/DateValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/EmailValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/ExpressionValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/FalseValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/GroupSequenceTest.php
	src/Symfony/Component/Validator/Tests/Constraints/IbanValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/ImageValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/IpValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/IsbnValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/IssnValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/LanguageValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/LengthValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/LocaleValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/LuhnValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/NotBlankValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/NotNullValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/NullValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/RangeValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/RegexValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/TimeValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/TrueValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/TypeValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/UrlValidatorTest.php
	src/Symfony/Component/Validator/Tests/Fixtures/StubGlobalExecutionContext.php
2014-08-14 18:10:54 +02:00
Nicolas Grekas
65862c9947 minor #11667 [HttpFoundation] revert #11510, moved to 2.6 (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpFoundation] revert #11510, moved to 2.6

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

This reverts PR #11510 from 2.3.

Commits
-------

fb120c7 revert #11510, moved to 2.6
2014-08-14 17:05:58 +02:00
Bernhard Schussek
845c33cfaa [Validator] Backported constraint validator tests from 2.5 2014-08-14 16:56:25 +02:00
Bernhard Schussek
054f1b5536 Merge branch '2.3' into 2.4
* 2.3:
  [Validator] Backported constraint validator tests from 2.5
  Fix toolbar vertical alignment.
  [HttpFoundation] MongoDbSessionHandler supports auto expiry via configurable expiry_field
  [FrameworkBundle] add missing attribute to XSD
  Allow basic auth in url. Improve regex. Add tests.
  fix typos and syntax in Profiler controller method comments
  remove volatile tests
  [Console] fixed style creation when providing an unknown tag option
  [Validator] Convert objects to string in comparison validators. Reapplies 6cf5e0812e
  [HttpFoundation] Update QUERY_STRING when overrideGlobals

Conflicts:
	src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueValidatorTest.php
	src/Symfony/Component/HttpFoundation/Tests/RequestTest.php
	src/Symfony/Component/Validator/Constraints/AllValidator.php
	src/Symfony/Component/Validator/Constraints/CollectionValidator.php
	src/Symfony/Component/Validator/Tests/Constraints/AbstractComparisonValidatorTestCase.php
	src/Symfony/Component/Validator/Tests/Constraints/CallbackValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/EqualToValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/GreaterThanValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/IdenticalToValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/ImageValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/LessThanOrEqualValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/LessThanValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/NotEqualToValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/NotIdenticalToValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/UrlValidatorTest.php
2014-08-14 16:51:32 +02:00
Bernhard Schussek
87a47eadc9 [Validator] Backported constraint validator tests from 2.5 2014-08-14 15:44:06 +02:00
Yosmany Garcia
000bd0d863 Made optimization deprecating modulus operator 2014-08-14 12:15:45 +00:00
Stefano Sala
42b95dfd2b [Console][ProgressBar] Developer experience:
- Removed barCharOriginal
 - getProgressPercent should return float instead of int.
 - Minor refactoring
2014-08-14 13:37:55 +02:00
Gilles Doge
30116859e6 [Console][ProgressBar] Allow to advance past max. 2014-08-14 13:36:34 +02:00
Stefano Sala
73ca340827 [Console][ProgressBar] Developer experience
- Create getProgress/setProgress methods to replace getStep/setCurrent
 - ProgressBar::setCurrent should auto-start the ProgressBar.
 - You should be able to pass max to start
 - getStepWidth is internal information that should not be public
 - when verbosity set to quiet, the progress bar does not even need to
   execute all the logic to generate output that is then thrown away
2014-08-14 13:32:40 +02:00
Nicolas Grekas
fb120c7827 revert #11510, moved to 2.6 2014-08-14 10:11:24 +02:00
Grégoire Pineau
7f4f9ab461 [DIC] Fixed: anonymous services are always private 2014-08-14 09:56:48 +02:00
Nicolas Grekas
8c222110c9 bug #11637 fix dependencies on HttpFoundation component (xabbuh)
This PR was merged into the 2.5 branch.

Discussion
----------

fix dependencies on HttpFoundation component

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

The ``closeOutputBuffers()`` method was added to the ``Response`` class of the HttpFoundation in Symfony 2.5. Therefore, parts that are calling this method must depend on ``symfony/http-foundation`` 2.5 or higher.

Commits
-------

fe2f007 fix dependencies on HttpFoundation component
2014-08-13 21:16:20 +02:00
Nicolas Grekas
6b9ce52a11 bug #11559 [Validator] Convert objects to string in comparison validators (webmozart)
This PR was merged into the 2.3 branch.

Discussion
----------

[Validator] Convert objects to string in comparison validators

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

In the [latest merge from 2.3 into 2.4](/symfony/symfony/commit/3bed1b7988e94a897a64c6a2ad3bf70bde9005c1), the changes from 6cf5e0812e in 2.4 got lost. This PR brings back these changes and backports them to 2.3.

The change is BC, because the former value `true` of the `$prettyDateTime` will be cast to `1`, which corresponds to the `PRETTY_DATE` format constant.

Commits
-------

273671e [Validator] Convert objects to string in comparison validators. Reapplies 6cf5e0812e
2014-08-13 21:13:32 +02:00
Nicolas Grekas
4f098dc5a4 feature #11510 [HttpFoundation] MongoDbSessionHandler supports auto expiry via configurable expiry_field (catchamonkey)
This PR was squashed before being merged into the 2.3 branch (closes #11510).

Discussion
----------

[HttpFoundation] MongoDbSessionHandler supports auto expiry via configurable expiry_field

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

ToDo

 * [x] Fix Tests

Looking for feedback on this early PR.

This adds a config option that disables the PHP GC method call from doing anything,
It also means that the write method sets up the auto expiring index.

Ref: #11508

Commits
-------

b56b740 [HttpFoundation] MongoDbSessionHandler supports auto expiry via configurable expiry_field
2014-08-13 21:10:05 +02:00
Chris Sedlmayr
b56b740940 [HttpFoundation] MongoDbSessionHandler supports auto expiry via configurable expiry_field 2014-08-13 21:06:50 +02:00
Nicolas Grekas
511b20d837 bug #11408 [HttpFoundation] Update QUERY_STRING when overrideGlobals (yguedidi)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpFoundation] Update QUERY_STRING when overrideGlobals

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

Commits
-------

777666f [HttpFoundation] Update QUERY_STRING when overrideGlobals
2014-08-13 21:04:07 +02:00
Jérôme Parmentier
b8c0a1206a [Validator] Fix little typo in ExecutionContextInterface::buildViolation() method comments 2014-08-12 15:12:25 +02:00
Christian Flothmann
fe2f007fde fix dependencies on HttpFoundation component
The closeOutputBuffers() method was added to the Response class of
the HttpFoundation in Symfony 2.5. Therefore, parts that are calling
this method must depend on symfony/http-foundation 2.5 or higher.
2014-08-11 11:10:42 +02:00
Benjamin Laugueux
f1ea987f35 Allow basic auth in url.
Improve regex. Add tests.
2014-08-09 12:41:29 +02:00
Fabien Potencier
7b3bd56f77 minor #11603 remove volatile tests (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

remove volatile tests

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

Commits
-------

24fb66d remove volatile tests
2014-08-09 12:40:05 +02:00
Fabien Potencier
5b1d913174 bug #11609 [Console] fixed style creation when providing an unknown tag option (fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

[Console] fixed style creation when providing an unknown tag option

| 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

When formatting a string, the console ignore style it cannot parse. But if a string looks like an option (`<setting=value>`) for instance, instead of displaying the text as is, it currently throws an exception.

Commits
-------

8814920 [Console] fixed style creation when providing an unknown tag option
2014-08-09 12:37:57 +02:00
Christian Flothmann
d26040f356 [DomCrawler] fix the axes handling in a bc way
The previous fix in #11548 for handling XPath axes was not backward
compatible. In previous Symfony versions the Crawler handled nodes
by holding a "fake root node". This must be taken into account when
evaluating (relativizing) XPath expressions.
2014-08-09 11:40:56 +02:00
Fabien Potencier
5ca28c0d71 Merge branch '2.4' into 2.5
* 2.4:
  [HttpKernel] added an analyze of environment parameters for built-in server.
  change command to which available under most unix systems
  add way to test command under windows
  fix shell command injection
  [Form] allowed CallbackTransformer to use callable
  [Process] Added process synchronization to the incremental output tests
2014-08-08 17:50:54 +02:00
Fabien Potencier
05c3314a06 Merge branch '2.3' into 2.4
* 2.3:
  [HttpKernel] added an analyze of environment parameters for built-in server.
  change command to which available under most unix systems
  add way to test command under windows
  fix shell command injection
  [Form] allowed CallbackTransformer to use callable
  [Process] Added process synchronization to the incremental output tests
2014-08-08 17:50:44 +02:00
Fabien Potencier
3baea1f370 bug #11610 [Console] fixed output escaping when using the process helper (fabpot)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[Console] fixed output escaping when using the process helper

| 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

When displaying the output of a process run, we must escape the `<` to avoid any formatting.

Commits
-------

bf7a90e [Console] fixed output escaping when using the process helper
2014-08-08 16:32:04 +02:00
Fabien Potencier
bf7a90eb87 [Console] fixed output escaping when using the process helper 2014-08-08 16:16:59 +02:00
Christian Flothmann
f5bc18d648 return empty metadata collection if none do exist
The PropertyMetadataContainerInterface defines that the method
getPropertyMetadata() has to return an empty collection if no
metadata have been configured for the given property. Though, its
implementation in the ClassMetadata class didn't check for
existence of such metadata. This behavior led to unexpected PHP
notices when validating a property or a property value of a property
without any configured constraints (only affects the new 2.5 API).
Additionally, the getMemberMetadatas() didn't check for existing
array keys as well which has also been fixed.
2014-08-08 11:23:54 +02:00
Christian Flothmann
24fb66ddf3 remove volatile tests
Some tests relying on timings and external network resources were not
reliable and occasionally made builds on Travis fail.
2014-08-08 10:12:23 +02:00
Fabien Potencier
88149209ae [Console] fixed style creation when providing an unknown tag option 2014-08-07 17:55:24 +02:00
Tobias Nyholm
d2bd92f681 [Validator] Added Swedish translations 2014-08-07 17:09:41 +02:00
Fabien Potencier
6b8fe14f3c minor #11587 [Validator] Removed legacy validator classes (webmozart)
This PR was merged into the 2.5 branch.

Discussion
----------

[Validator] Removed legacy validator classes

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

This PR removes the legacy validator classes again and adds the API checks inside the constraint validators instead.

Commits
-------

e844ed0 [Validator] Removed legacy validator classes
2014-08-07 15:09:54 +02:00
Fabien Potencier
56a75179d1 minor #11565 [Process] Added process synchronization to the incremental output tests (webmozart)
This PR was merged into the 2.3 branch.

Discussion
----------

[Process] Added process synchronization to the incremental output tests

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

The tests currently fail from time to time if the executing machine is under
heavy load. This leads to false negatives on Travis CI.

A side effect of the change is that the tests are much faster now.

Commits
-------

6dd3946 [Process] Added process synchronization to the incremental output tests
2014-08-07 15:08:01 +02:00
Gordon Franke
c70a226121 change command to which available under most unix systems
agree i will change it which is available under suse, ubuntu, debian, fedora, bsd
2014-08-07 14:55:21 +02:00
Bernhard Schussek
8bedf86f31 bug #11582 [DoctrineBridge] Changed UniqueEntityValidator to use the 2.5 Validation API (webmozart)
This PR was merged into the 2.5 branch.

Discussion
----------

[DoctrineBridge] Changed UniqueEntityValidator to use the 2.5 Validation API

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

Commits
-------

f45f1ab [DoctrineBridge] Changed UniqueEntityValidator to use the 2.5 Validation API
2014-08-07 09:58:17 +02:00
Gordon Franke
85e77b14f7 add way to test command under windows 2014-08-07 09:02:32 +02:00
Gordon Franke
4fa9288fda fix shell command injection 2014-08-07 09:01:16 +02:00
Issei.M
e77022ba6d [Form] allowed CallbackTransformer to use callable 2014-08-06 15:53:52 +02:00
Bernhard Schussek
6dd3946a7e [Process] Added process synchronization to the incremental output tests
The tests currently fail from time to time if the executing machine is under
heavy load. This leads to false negatives on Travis CI.

A side effect of the change is that the tests are much faster now.
2014-08-06 15:45:25 +02:00
Bernhard Schussek
e844ed0fb5 [Validator] Removed legacy validator classes 2014-08-06 15:23:29 +02:00
Bernhard Schussek
f45f1ab20c [DoctrineBridge] Changed UniqueEntityValidator to use the 2.5 Validation API 2014-08-06 15:02:45 +02:00
Bernhard Schussek
06534265ad [SecurityBundle] Added UserPasswordValidator tests for the different Validation APIs 2014-08-06 14:45:51 +02:00
Fabien Potencier
0c13296d30 bumped Symfony version to 2.5.4 2014-08-06 10:24:10 +02:00
Fabien Potencier
f077a238c7 updated VERSION for 2.5.3 2014-08-06 09:03:01 +02:00
Fabien Potencier
6f07919307 Merge branch '2.4' into 2.5
* 2.4:
  Fixed relative redirects for ambiguous paths
  [BrowserKit] Fix browser kit redirect with ports
  [TwigBridge] [Form] Fixed some extra empty spaces
  Plural fix
  removed some .gitattributes that should have been removed a lot time ago
  [DependencyInjection] fixed missing 'factory-class' attribute in XmlDumper output
  fixed whitespace in Twig form template
  built-in server: exit when docroot does not exist

Conflicts:
	src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php
	src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services9.xml
2014-08-06 08:44:37 +02:00
Fabien Potencier
6f56ea423d Merge branch '2.3' into 2.4
* 2.3:
  Fixed relative redirects for ambiguous paths
  [BrowserKit] Fix browser kit redirect with ports
  [TwigBridge] [Form] Fixed some extra empty spaces
  Plural fix
  removed some .gitattributes that should have been removed a lot time ago
  [DependencyInjection] fixed missing 'factory-class' attribute in XmlDumper output
  fixed whitespace in Twig form template
  built-in server: exit when docroot does not exist

Conflicts:
	src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig
2014-08-06 08:41:27 +02:00
Bernhard Schussek
f6c070d073 [Validator] Fixed group handling in composite constraints 2014-08-05 17:52:01 +02:00
Bernhard Schussek
6ac130e331 [Form] Fixed FormValidator compatibility with the non-BC 2.5 Validation API 2014-08-05 17:39:31 +02:00
Bernhard Schussek
27a2280d29 Merge branch '2.5'
* 2.5: (33 commits)
  [Validator] Added Swedish translations
  [Validator] Fixed ExpressionValidator when the validation root is not an object
  [Validator] Fixed: Made it possible (again) to pass a class name to Validator::validatePropertyValue()
  Fix incorrect romanian plural translations
  fix axes handling in Crawler::filterXPath()
  fix some docblocks
  Fixed self-reference in 'service_container' service breaks garbage collection (and clone).
  [Process] Fix tests when pcntl is not available.
  [DependencyInjection] Roll back changes made to generated files.
  [Console] Roll back changes made to fixture files.
  Issue #11489 Added some CA and ES translations
  [Validator] Added more detailed inline documentation
  [Validator] Removed information from the violation output if the value is an array, object or resource
  partially reverted previous commit
  fixed CS
  Add point about ConsoleLogger to Console 2.5 changelog
  [Validator] Fixed failing tests
  [Validator] CS fixes
  [FrameworkBundle] Made ConstraintValidatorFactory aware of the legacy validators
  [Validator] Added extensive test coverage for the constraint validators for the different APIs
  ...

Conflicts:
	src/Symfony/Component/Validator/Resources/translations/validators.ca.xlf
2014-08-05 11:07:51 +02:00
Bernhard Schussek
98c0621d21 Merge branch '2.4' into 2.5
* 2.4: (24 commits)
  [Validator] Added Swedish translations
  Fix incorrect romanian plural translations
  fix axes handling in Crawler::filterXPath()
  fix some docblocks
  Fixed self-reference in 'service_container' service breaks garbage collection (and clone).
  [Process] Fix tests when pcntl is not available.
  [DependencyInjection] Roll back changes made to generated files.
  [Console] Roll back changes made to fixture files.
  Issue #11489 Added some CA and ES translations
  [Validator] Added more detailed inline documentation
  [Validator] Removed information from the violation output if the value is an array, object or resource
  partially reverted previous commit
  fixed CS
  properly handle null data when denormalizing
  [Validator] Renamed valueToString() to formatValue(); added missing formatValue() calls
  [Validator] Fixed CS
  [Validator] Fixed date-to-string conversion tests to match ICU 51
  [Validator] Added "{{ value }}" parameters where they were missing
  [Validator] Simplified and explained the LuhnValidator
  [Validator] Simplified IssnValidator
  ...

Conflicts:
	src/Symfony/Bridge/Propel1/Form/ChoiceList/ModelChoiceList.php
	src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php
	src/Symfony/Component/Security/Core/Encoder/BasePasswordEncoder.php
	src/Symfony/Component/Validator/Constraints/ChoiceValidator.php
	src/Symfony/Component/Validator/Constraints/CollectionValidator.php
	src/Symfony/Component/Validator/Constraints/FileValidator.php
	src/Symfony/Component/Validator/Constraints/Isbn.php
	src/Symfony/Component/Validator/Constraints/IsbnValidator.php
	src/Symfony/Component/Validator/Constraints/LengthValidator.php
	src/Symfony/Component/Validator/Tests/Constraints/AbstractComparisonValidatorTestCase.php
	src/Symfony/Component/Validator/Tests/Constraints/BlankValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/ChoiceValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/CollectionValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/DateTimeValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/DateValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/EmailValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/FalseValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/FileValidatorPathTest.php
	src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/IbanValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/IpValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/IsbnValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/LengthValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/NullValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/RegexValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/TimeValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/TrueValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/UrlValidatorTest.php
2014-08-05 11:00:40 +02:00
Peter Kruithof
5ecc449898 Fixed relative redirects for ambiguous paths 2014-08-05 09:20:55 +02:00
Walther Lalk
39973de230 [BrowserKit] Fix browser kit redirect with ports 2014-08-05 09:17:23 +02:00
Seb Koelen
9b550d6324 Plural fix 2014-08-05 09:05:24 +02:00
Fabien Potencier
59d6912b40 bug #11558 [DependencyInjection] Fixed missing 'factory-class' attribute in XmlDumper output (kerdany)
This PR was merged into the 2.3 branch.

Discussion
----------

[DependencyInjection] Fixed missing 'factory-class' attribute in XmlDumper output

| 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

Problem: XmlDumper doesn't write 'factory-class' XML attribute for definitions on which setFactoryClass() was called.

Impact: Container[Builder] to throws an exception when the relevant service is being requested/initiated after loading the dumped XML.
`Uncaught Exception Symfony\Component\DependencyInjection\Exception\RuntimeException: "Cannot create service "xxx" from factory method without a factory service or factory class." at /<path>/<to>//DependencyInjection/ContainerBuilder.php`

Solution: Made XmlDumper write the 'factory-class' attribute, and updated the relevant test fixture.

Another related problem, is that XMLFileLoader doesn't complain if the 'factory-class' attribute is missing for a 'service' elements that include 'factory-method' attribute, resulting in an ill-configured Definition object in the ContainerBuilder. I'll post an issue/ticket, and probably send another PR for that.

Commits
-------

18e3e6f [DependencyInjection] fixed missing 'factory-class' attribute in XmlDumper output
2014-08-05 09:04:05 +02:00
Bernhard Schussek
a6a7f5d2f5 minor #11485 [Validator] Constraint validators now use the 2.5 API (webmozart)
This PR was squashed before being merged into the 2.5 branch (closes #11485).

Discussion
----------

[Validator] Constraint validators now use the 2.5 API

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

See the comments in #11049 for the origin of this PR.

Currently, the 2.5 API needs to use `LegacyExecutionContextFactory` because the constraint validators rely on methods from the old `ExecutionContext` class (like `validate()`, `validateValue()`). Consequently it is impossible to switch to the pure 2.5 API and check whether all calls to deprecated methods were removed from application code. This is fixed now.

This PR also introduces a complete test suite to test each constraint validator against all three APIs: 2.4, 2.5-BC and 2.5. Currently, some tests are not executed yet when running the complete test suite is run. I expect this to be fixed soon (ticket: sebastianbergmann/phpunit#529, pr: sebastianbergmann/phpunit#1327).

Commits
-------

295e5bb [Validator] Fixed failing tests
3bd6d80 [Validator] CS fixes
870a41a [FrameworkBundle] Made ConstraintValidatorFactory aware of the legacy validators
7504448 [Validator] Added extensive test coverage for the constraint validators for the different APIs
8e461af [Validator] Constraint validators now use the 2.5 API. For incompatible validators, legacy validators were created
2014-08-04 16:36:36 +02:00
Bernhard Schussek
c43253e363 bug #11498 [Validator] Made it possible (again) to pass a class name to validatePropertyValue() (webmozart)
This PR was merged into the 2.5 branch.

Discussion
----------

[Validator] Made it possible (again) to pass a class name to validatePropertyValue()

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

In the 2.4 API it was possible to do both:

```php
$validator->validatePropertyValue($object, 'propertyName', $myValue);
$validator->validatePropertyValue('\Vendor\Namespace\ClassName', 'propertyName', $myValue);
```

In the 2.5 API, the second case was not supported anymore. This is fixed now.

Together with the fix comes also a small change (also in the 2.4 API) which I'll demonstrate with a code snippet:

```php
$metadata->addPropertyConstraint('ClassName', 'propertyName', new Callback(
    function ($value, $context) {
        var_dump($context->getRoot());
        var_dump($context->getPropertyPath());
    }
));

$validator->validatePropertyValue('ClassName', 'propertyName', 'foobar');
```

Before this PR, the output would be:

```
string(9) "ClassName"
string(12) "propertyName"
```

This doesn't make a lot of sense, because usually the following condition holds during validation:

```php
'' === $context->getPropertyPath() || $value === $propertyAccessor->getValue($context->getRoot(), $context->getPropertyPath())
```

which obviously cannot work if root is a class name. Thus I changed the root and property path to become:

```
string(6) "foobar"
string(0) ""
```

With this change, the condition holds also in this case.

Commits
-------

2bf1b37 [Validator] Fixed ExpressionValidator when the validation root is not an object
ef6f5f5 [Validator] Fixed: Made it possible (again) to pass a class name to Validator::validatePropertyValue()
2014-08-04 16:33:56 +02:00
Tobias Nyholm
a361f10b1d [Validator] Added Swedish translations 2014-08-04 15:49:20 +02:00
Bernhard Schussek
2bf1b375c1 [Validator] Fixed ExpressionValidator when the validation root is not an object 2014-08-04 14:11:37 +02:00
Bernhard Schussek
ef6f5f50c5 [Validator] Fixed: Made it possible (again) to pass a class name to Validator::validatePropertyValue() 2014-08-04 14:11:35 +02:00
Bernhard Schussek
273671ec59 [Validator] Convert objects to string in comparison validators. Reapplies 6cf5e0812e 2014-08-04 12:43:57 +02:00
Fabien Potencier
99ee01d482 removed some .gitattributes that should have been removed a lot time ago 2014-08-04 12:32:26 +02:00
Bernhard Schussek
3bed1b7988 Merge branch '2.3' into 2.4
* 2.3: (22 commits)
  Fix incorrect romanian plural translations
  fix axes handling in Crawler::filterXPath()
  fix some docblocks
  Fixed self-reference in 'service_container' service breaks garbage collection (and clone).
  [Process] Fix tests when pcntl is not available.
  [DependencyInjection] Roll back changes made to generated files.
  [Console] Roll back changes made to fixture files.
  [Validator] Added more detailed inline documentation
  [Validator] Removed information from the violation output if the value is an array, object or resource
  partially reverted previous commit
  fixed CS
  properly handle null data when denormalizing
  [Validator] Renamed valueToString() to formatValue(); added missing formatValue() calls
  [Validator] Fixed CS
  [Validator] Fixed date-to-string conversion tests to match ICU 51
  [Validator] Added "{{ value }}" parameters where they were missing
  [Validator] Simplified and explained the LuhnValidator
  [Validator] Simplified IssnValidator
  [Validator] Fixed and simplified IsbnValidator
  [Validator] Simplified IBAN validation algorithm
  ...

Conflicts:
	src/Symfony/Component/Console/Helper/DescriptorHelper.php
	src/Symfony/Component/DependencyInjection/Container.php
	src/Symfony/Component/DomCrawler/Tests/CrawlerTest.php
	src/Symfony/Component/HttpFoundation/File/UploadedFile.php
	src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php
	src/Symfony/Component/Validator/Constraints/AbstractComparisonValidator.php
	src/Symfony/Component/Validator/Constraints/CollectionValidator.php
	src/Symfony/Component/Validator/Tests/Constraints/EqualToValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/GreaterThanValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/IdenticalToValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/LessThanOrEqualValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/LessThanValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/NotEqualToValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/NotIdenticalToValidatorTest.php
2014-08-04 12:16:36 +02:00
moldcraft
0c6f750c1e Fix incorrect romanian plural translations 2014-08-04 11:02:01 +02:00
Hany el-Kerdany
18e3e6fe20 [DependencyInjection] fixed missing 'factory-class' attribute in XmlDumper output
Symfony\Component\DependencyInjection\Dumper\XmlDumper didn't write 'factory-class' XML attribute for definitions on which setFactoryClass() was called.

This caused the Container[Builder] to throw an exception when the relevant service is being requested/initiated after loading the dumped XML:

`Uncaught Exception Symfony\Component\DependencyInjection\Exception\RuntimeException: "Cannot create service "xxx" from factory method without a factory service or factory class." at /<path>/<to>/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ContainerBuilder.php`

Fixed the problem, and updated the relevant test fixture.
2014-08-04 10:10:46 +03:00
Fabien Potencier
9ac2234eb8 bug #11548 [Component][DomCrawler] fix axes handling in Crawler::filterXPath() (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[Component][DomCrawler] fix axes handling in Crawler::filterXPath()

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

Due to some limitations in the ``relativize()`` method, it was not possible to use XPath axes other than ``descendant`` or ``descendant-or-self`` in the ``filterXPath()`` method of the ``Crawler`` class. This commit adds support for the ``ancestor``, ``ancestor-or-self``, ``attribute``, ``child``, ``following``, ``following-sibling``, ``parent``, ``preceding``, ``preceding-sibling`` and ``self`` axes.

The only axis missing after this is the ``namespace`` axis. Filtering for namespace nodes returns ``DOMNameSpaceNode`` instances which can't be passed to the ``add()`` method.

Commits
-------

8dc322b fix axes handling in Crawler::filterXPath()
2014-08-03 08:32:28 +02:00
Christian Flothmann
8dc322be34 fix axes handling in Crawler::filterXPath()
Due to some limitations in the relativize() method, it was not
possible to use XPath axes other than descendant or descendant-or-self
in the filterXPath() method of the Crawler class. This commit adds
support for the ancestor, ancestor-or-self, attribute, child,
following, following-sibling, parent, preceding, preceding-sibling and
self axes.
2014-08-02 10:47:58 +02:00
Vincent AUBERT
50791c6571 [Validator] refs #11489 add some translations in french 2014-08-02 10:13:09 +02:00
Fabien Potencier
abf2edf81a minor #11483 fix some docblocks (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

fix some docblocks

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

Commits
-------

1775da5 fix some docblocks
2014-08-02 09:53:48 +02:00
Hugo Hamon
9926845cf3 [Translation] made XliffFileDumper support CDATA sections. 2014-08-02 09:13:43 +02:00
Christian Flothmann
1775da5925 fix some docblocks 2014-08-02 08:27:27 +02:00
sun
440322effc Fixed self-reference in 'service_container' service breaks garbage collection (and clone). 2014-08-02 08:06:01 +02:00
Jakub Zalas
e40f24f0a9 [Process] Fix tests when pcntl is not available. 2014-08-01 11:51:55 +01:00
Fabien Potencier
c812379479 minor #11534 Issue #11489 Translated 78 in Català (mmoreram)
This PR was merged into the 2.6-dev branch.

Discussion
----------

Issue #11489 Translated 78 in Català

Just 78 is created because 73 to 77 are in another PR to branch 2.4.

Commits
-------

88eac04 Issue #11532 Translated 78 in Català
2014-08-01 08:20:52 +02:00
Fabien Potencier
94ff4e999a minor #11531 [HttpKernel][FrameworkBundle] Replaced ESI mentions with SSI when appropriate (pgodel)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[HttpKernel][FrameworkBundle] Replaced ESI mentions with SSI when appropriate

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

Commits
-------

7ee23c1 Replaced ESI mentions with SSI when appropriate
2014-08-01 08:18:37 +02:00
Fabien Potencier
a292a489c5 minor #11537 Make builds green again (jakzal)
This PR was merged into the 2.3 branch.

Discussion
----------

Make builds green again

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

This PR rolls back changes made to the fixture and generated files in e9022adaef (#11512).

Commits
-------

88b4e70 [DependencyInjection] Roll back changes made to generated files.
f89811d [Console] Roll back changes made to fixture files.
2014-08-01 08:16:34 +02:00
Fabien Potencier
73ddf39ffc bug #11428 [Serializer] properly handle null data when denormalizing (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[Serializer] properly handle null data when denormalizing

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

Commits
-------

123fc62 properly handle null data when denormalizing
2014-08-01 08:14:57 +02:00
Jakub Zalas
88b4e7008d [DependencyInjection] Roll back changes made to generated files.
Original change was made in e9022adaef.
2014-07-31 22:03:37 +01:00
Jakub Zalas
f89811d8d1 [Console] Roll back changes made to fixture files.
Original change was made in e9022adaef.
2014-07-31 21:49:10 +01:00
mmoreram
88eac04057 Issue #11532 Translated 78 in Català 2014-07-31 18:50:41 +02:00
mmoreram
67a6b75a47 Issue #11489 Added some CA and ES translations
* Added some translations in CA
* Fixed some translations in ES
2014-07-31 18:46:41 +02:00
Pablo Godel
7ee23c1fd3 Replaced ESI mentions with SSI when appropriate 2014-07-31 10:51:20 -04:00
Christian Flothmann
412f04f919 [Validator] German translation for empty file errors 2014-07-31 16:08:14 +02:00
Bernhard Schussek
7d7b5c724f bug #10687 [Validator] Fixed string conversion in constraint violations (eagleoneraptor, webmozart)
This PR was merged into the 2.3 branch.

Discussion
----------

[Validator] Fixed string conversion in constraint violations

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

Commits
-------

32ae95b [Validator] Added more detailed inline documentation
08ea6d3 [Validator] Removed information from the violation output if the value is an array, object or resource
d6a783f [Validator] Renamed valueToString() to formatValue(); added missing formatValue() calls
71897d7 [Validator] Fixed CS
cea4155 [Validator] Fixed date-to-string conversion tests to match ICU 51
5aa7e6d [Validator] Added "{{ value }}" parameters where they were missing
f329552 [Validator] Simplified and explained the LuhnValidator
bff09f2 [Validator] Simplified IssnValidator
224e70f [Validator] Fixed and simplified IsbnValidator
fd58870 [Validator] Simplified IBAN validation algorithm
97243bc [Validator] Fixed value-to-string conversion in constraint violations
75e8815 [Validator] Fix constraint violation message parameterization
2014-07-30 14:38:50 +02:00
Bernhard Schussek
32ae95bdda [Validator] Added more detailed inline documentation 2014-07-30 14:36:14 +02:00
Bernhard Schussek
08ea6d3621 [Validator] Removed information from the violation output if the value is an array, object or resource
This was decided in the discussion of #10687.
2014-07-30 14:36:07 +02:00
mmoreram
e23863721f This files have an invalid namespace
* These namespaces do not match the files according to PSR-0 rules
* Used php-cs-fixer
2014-07-30 12:26:20 +02:00
Yassine Guedidi
777666fac1 [HttpFoundation] Update QUERY_STRING when overrideGlobals 2014-07-30 12:14:11 +02:00
Fabien Potencier
71edf38d59 partially reverted previous commit 2014-07-29 20:14:16 +02:00
Fabien Potencier
e9022adaef fixed CS 2014-07-29 20:09:11 +02:00
Jeroen De Dauw
874482632b Add point about ConsoleLogger to Console 2.5 changelog 2014-07-29 13:56:02 +02:00
WouterJ
a4f208b95b Changed order of validation 2014-07-28 23:12:49 +02:00
Bernhard Schussek
cd29962dc0 minor #11463 [Validator] prevent unnecessary calls inside ExecutionContext (Tobion)
This PR was merged into the 2.5 branch.

Discussion
----------

[Validator] prevent unnecessary calls inside ExecutionContext

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

Small performance improvement by preventing calls to `PropertyPath::append($this->propertyPath, $subPath)` when not needed.

Commits
-------

d6d462a [Validator] do not call getter inside ExecutionContext to prevent unnecessary calls
2014-07-28 16:51:00 +02:00
Bernhard Schussek
295e5bb178 [Validator] Fixed failing tests 2014-07-28 15:52:59 +02:00
Bernhard Schussek
3bd6d802ed [Validator] CS fixes 2014-07-28 15:52:59 +02:00
Bernhard Schussek
7504448ee7 [Validator] Added extensive test coverage for the constraint validators for the different APIs 2014-07-28 15:52:58 +02:00
Bernhard Schussek
8e461af756 [Validator] Constraint validators now use the 2.5 API. For incompatible validators, legacy validators were created 2014-07-28 15:52:58 +02:00
Fabien Potencier
3e21c4d052 Merge branch '2.5'
* 2.5:
  Update validators.eu.xlf
  fixed CS
  remove unused imports
  [Validator] Added markObjectAsInitialized() and isObjectInitialized() to ExecutionContextInterface
  [Validator] Fixed doc block
  [Routing] simplify the XML schema file
  Unify null comparisons
  [EventDispatcher] don't count empty listeners
  [Process] Fix unit tests in sigchild environment
  [Process] fix signal handling in wait()
  [BrowserKit] refactor code and fix unquoted regex
  Fixed server HTTP_HOST port uri conversion
  [HttpFoundation] moved test file to the right directory
  [Validator] Made sure that context changes don't leak out of (Contextual)ValidatorInterface
  [MonologBridge] fixed Console handler priorities
  Bring code into standard
  [Process] Add test to verify fix for issue #11421
  [Process] Fixes issue #11421
  [DependencyInjection] Pass a Scope instance instead of a scope name.
2014-07-28 15:20:53 +02:00
Fabien Potencier
7e175ef8f3 Merge branch '2.4' into 2.5
* 2.4:
  Update validators.eu.xlf
  fixed CS
  remove unused imports
  [Routing] simplify the XML schema file
  Unify null comparisons
  [EventDispatcher] don't count empty listeners
  [Process] Fix unit tests in sigchild environment
  [Process] fix signal handling in wait()
  [BrowserKit] refactor code and fix unquoted regex
  Fixed server HTTP_HOST port uri conversion
  [MonologBridge] fixed Console handler priorities
  Bring code into standard
  [Process] Add test to verify fix for issue #11421
  [Process] Fixes issue #11421
  [DependencyInjection] Pass a Scope instance instead of a scope name.

Conflicts:
	src/Symfony/Bundle/FrameworkBundle/Test/WebTestCase.php
	src/Symfony/Component/DependencyInjection/Tests/Dumper/GraphvizDumperTest.php
	src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorCollectionTest.php
2014-07-28 15:20:46 +02:00
Fabien Potencier
4413dacc07 Merge branch '2.3' into 2.4
* 2.3:
  Update validators.eu.xlf
  fixed CS
  remove unused imports
  Unify null comparisons
  [EventDispatcher] don't count empty listeners
  [Process] Fix unit tests in sigchild environment
  [Process] fix signal handling in wait()
  [BrowserKit] refactor code and fix unquoted regex
  Fixed server HTTP_HOST port uri conversion
  Bring code into standard
  [Process] Add test to verify fix for issue #11421
  [Process] Fixes issue #11421
  [DependencyInjection] Pass a Scope instance instead of a scope name.

Conflicts:
	src/Symfony/Component/EventDispatcher/Tests/EventDispatcherTest.php
2014-07-28 15:13:16 +02:00
Bernhard Schussek
e8b53e9c21 bug #11412 [Validator] Made sure that context changes don't leak out of (Contextual)ValidatorInterface (webmozart)
This PR was merged into the 2.5 branch.

Discussion
----------

[Validator] Made sure that context changes don't leak out of (Contextual)ValidatorInterface

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

Commits
-------

ff48939 [Validator] Added markObjectAsInitialized() and isObjectInitialized() to ExecutionContextInterface
14b60c8 [Validator] Fixed doc block
91bf277 [Validator] Made sure that context changes don't leak out of (Contextual)ValidatorInterface
2014-07-28 12:07:02 +02:00
g123456789l
d4323951f2 Update validators.eu.xlf
Spelling of 'CSRF' was incorrect
2014-07-28 11:30:47 +02:00
Fabien Potencier
24cd42555c bug #11475 [EventDispatcher] don't count empty listeners (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[EventDispatcher] don't count empty listeners

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

When event listeners for certain events are removed from the event
dispatcher, empty arrays are not being removed. Therefore, counting
on empty arrays leads to wrong results of the hasListeners() method.

Thanks to @mlindenb for discovering this an proposing a solution.

Commits
-------

fdbb04a [EventDispatcher] don't count empty listeners
2014-07-27 10:29:33 +02:00
Fabien Potencier
ff4a37ff24 minor #11484 remove unused imports (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

remove unused imports

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

Commits
-------

9cd059e remove unused imports
2014-07-27 10:26:10 +02:00
Fabien Potencier
0bce1483c1 fixed CS 2014-07-27 10:25:12 +02:00
Christian Flothmann
9cd059ee1f remove unused imports 2014-07-26 20:24:56 +02:00
Bernhard Schussek
ff489390c6 [Validator] Added markObjectAsInitialized() and isObjectInitialized() to ExecutionContextInterface 2014-07-26 14:46:01 +02:00
Bernhard Schussek
14b60c8c8f [Validator] Fixed doc block 2014-07-26 14:41:49 +02:00
Christian Flothmann
dbac46a9ae [Routing] simplify the XML schema file
Conditions that are defined for certain routes are just simple strings.
Thus, there is no need to use a dedicated element when xsd:string does
the same.
2014-07-26 12:08:20 +02:00
WouterJ
be04c5000c Unify null comparisons 2014-07-26 11:54:23 +02:00
Christian Flothmann
fdbb04a6ac [EventDispatcher] don't count empty listeners
When event listeners for certain events are removed from the event
dispatcher, empty arrays are not being removed. Therefore, counting
on empty arrays leads to wrong results of the hasListeners() method.
2014-07-25 17:00:14 +02:00
Thomas Ploch
acb1ae6616 [Console] Skip commands from ConsoleCommandEvent
Use case: We have different variations of the same application, for which
only certain commands are allowed. Right now this is done in a custom
Application class, but it would be much easier to just be able to skip
commands from a listener, where you can disable commands via the Event
object.

This patch provides this feature and corresponding test cases.

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes - for Console tests
| Fixed tickets | None
| License       | MIT
| Doc PR        | None
2014-07-25 11:21:17 +02:00
Fabien Potencier
e4dd60ae0d minor #11215 [Security] Add missing dot at the end of an exception message (rybakit)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[Security] Add missing dot at the end of an exception message

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

Commits
-------

8e1f978 Add missing dot at the end of an exception message
2014-07-25 11:13:45 +02:00
Fabien Potencier
eb48706ae4 feature #11306 [DX] New service to simplify password encoding (aferrandini)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[DX] New service to simplify password encoding

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #11299
| License       | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/3995

This new service siplifies the way to encode a password. Just get the `security.password_encoder` service and encode the `User` password.

```php
$encoded = $this->container->get('security.password_encoder')
    ->encodePassword($user, $plainPassword);

$user->setPassword($encoded);
```

Commits
-------

7bc190a New service to simplify password encoding
2014-07-25 10:49:22 +02:00
Romain Neutron
5939d34c17 [Process] Fix unit tests in sigchild environment 2014-07-25 10:39:28 +02:00
Christian Flothmann
eb68662360 [Process] fix signal handling in wait()
wait() throws an exception when the process was terminated by a signal.
This should not happen when the termination was requested by calling
either the stop() or the signal() method (for example, inside a callback
which is passed to wait()).
2014-07-25 10:39:21 +02:00
Fabien Potencier
bf140a8487 feature #10702 [HttpKernel][FrameworkBundle] SSI support (KingCrunch)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[HttpKernel][FrameworkBundle] SSI support

| Q             | A
| ------------- | ---
| Bug fix?      | No
| New feature?  | Yes
| BC breaks?    | No
| Deprecations? | No
| Tests pass?   | Yes
| Fixed tickets | #9419 (, #10684)
| License       | MIT

It does not support comments, or alternative URIs, or "continue" in case of errors. Maybe I can workaround that, but I've decided to left it out for this PR. Especially as far as I can see a "alternative URIs"-hack would _always_ lead to two requests, even if it's not needed.

Commits
-------

06cea08 SSI support
2014-07-25 09:35:01 +02:00
Fabien Potencier
fb9dc6adc3 feature #10793 [Security] Allow exception bubbling in RememberMeListener (lstrojny)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[Security] Allow exception bubbling in RememberMeListener

- Allow optional exception bubbling so that the exception listener has a chance to handle those exceptions

#### While at it
- Test for dispatching the InteractiveLogin event
- Smaller cleanups in the test

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

Commits
-------

fcb7f74 Allow exception bubbling in RememberMeListener
2014-07-25 09:32:50 +02:00
Fabien Potencier
94ffc4fab2 bug #11469 [BrowserKit] Fixed server HTTP_HOST port uri conversion (bcremer, fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

 [BrowserKit] Fixed server HTTP_HOST port uri conversion

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

See #11356

Commits
-------

103fd88 [BrowserKit] refactor code and fix unquoted regex
f401ab9 Fixed server HTTP_HOST port uri conversion
2014-07-25 08:30:34 +02:00
Fabien Potencier
103fd88b40 [BrowserKit] refactor code and fix unquoted regex 2014-07-25 07:47:26 +02:00
Benjamin Cremer
f401ab9032 Fixed server HTTP_HOST port uri conversion 2014-07-25 07:41:17 +02:00
Fabien Potencier
045cbc53cc bug #11425 Fix issue described in #11421 (Ben, ben-rosio)
This PR was merged into the 2.3 branch.

Discussion
----------

Fix issue described in #11421

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

This pull request fixes the issue described in #11421.  It also adds a test for the issue.  The issue is present in 2.0 forward, but I decided to fix it on the 2.3 branch so that I could also write a test for it (2.0 had no tests for the Process component, and 2.1 and 2.2 didn't have tests for the `ExecutableFinder` class).

Commits
-------

4cf50e8 Bring code into standard
9f4313c [Process] Add test to verify fix for issue #11421
02eb765 [Process] Fixes issue #11421
2014-07-25 07:28:54 +02:00
Fabien Potencier
21e7ad751d fixed CS 2014-07-25 07:27:09 +02:00
Fabien Potencier
c0e4dc678a feature #11375 Added support for encoding and decoding namespaced xml (xmlns) (mattvick)
This PR was merged into the 2.6-dev branch.

Discussion
----------

Added support for encoding and decoding namespaced xml (xmlns)

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

Complete this PR : https://github.com/symfony/symfony/pull/9156

Commits
-------

9d6b20c Added support for encoding and decoding namespaced xml (xmlns)
2014-07-25 07:26:10 +02:00
Fabien Potencier
96cd78e43b feature #11426 [DomCrawler] Added node name getter (fejese)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[DomCrawler] Added node name getter

[DomCrawler] Added node name getter

Based on the use case came up in a SO question (http://stackoverflow.com/questions/22564465/getting-the-tag-name-of-a-element-crawled-with-domcrawler-in-php) I propose a new helper function to get the name of the active node

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

(Follow up of symfony/symfony#11351)

Commits
-------

2fee576 [DomCrawler] Added node name getter
2014-07-25 07:24:34 +02:00
Fabien Potencier
f5bfa9bc9e bug #11423 Pass a Scope instance instead of a scope name when cloning a container in the GrahpvizDumper (jakzal)
This PR was merged into the 2.3 branch.

Discussion
----------

Pass a Scope instance instead of a scope name when cloning a container in the GrahpvizDumper

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

Commits
-------

6787669 [DependencyInjection] Pass a Scope instance instead of a scope name.
2014-07-25 07:22:20 +02:00
Fabien Potencier
d6bbf0448d minor #11462 [HttpFoundation] moved test file to the right directory (fabpot)
This PR was merged into the 2.5 branch.

Discussion
----------

[HttpFoundation] moved test file to the right directory

| 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
-------

a260623 [HttpFoundation] moved test file to the right directory
2014-07-25 06:56:08 +02:00
Fabien Potencier
5b905726fe feature #11173 [HttpFoundation] ResponseHeaderBag::clearCookie now accepts secure/httpOnly (adrienbrault)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[HttpFoundation] ResponseHeaderBag::clearCookie now accepts secure/httpOnly

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

Commits
-------

83f4ac5 [HttpFoundation] ResponseHeaderBag::clearCookie now accepts secure/httpOnly
2014-07-25 06:40:32 +02:00
Christian Flothmann
123fc62652 properly handle null data when denormalizing
If null is passed to denormalize(), no property values can be set on
the denormalized object. Additionally, this fixes passing values to
the denormalized object's constructor if the incoming data is an object.
2014-07-24 20:40:16 +02:00