Commit Graph

21427 Commits

Author SHA1 Message Date
Fabien Potencier
64e9584fae security #14759 n/a (jakzal)
This PR was merged into the 2.3 branch.

Discussion
----------

n/a

n/a

Commits
-------

d320d27 [HttpKernel] Do not call the FragmentListener if _controller is already defined
2015-05-26 23:41:30 +02:00
Fabien Potencier
ae2d062afc minor #14757 [Validators] Missing translations for arabic language. (amouhzi)
This PR was submitted for the 2.7 branch but it was merged into the 2.3 branch instead (closes #14757).

Discussion
----------

[Validators] Missing translations for arabic language.

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

This pull request is for adding missing translations in validators.ar.xlf.

Commits
-------

9a26e4b [Validators] Missing translations for arabic language.
2015-05-26 23:24:07 +02:00
Hassan Amouhzi
9a26e4beba [Validators] Missing translations for arabic language. 2015-05-26 23:24:07 +02:00
Alexander M. Turek
864136a739 Code style 2015-05-26 23:19:30 +02:00
Alexander M. Turek
0573f28d9b Support for array denormalization. 2015-05-26 22:25:23 +02:00
Fabien Potencier
2aeaa22e31 bug #14745 [Serializer] AbstractNormalizer::instantiateObject allow default values when not optional (boekkooi)
This PR was merged into the 2.7 branch.

Discussion
----------

[Serializer] AbstractNormalizer::instantiateObject allow default values when not optional

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

This PR fixes a bug in the AbstractNormalizer when denormalizing a array with a missing value but a default value set in the class constructor.

Commits
-------

266d53e [Serializer] AbstractNormalizer::instantiateObject allow default values when not optional
2015-05-25 09:45:54 +02:00
Fabien Potencier
36dfdaf3db fixed C 2015-05-25 09:43:48 +02:00
Fabien Potencier
51b3b83270 minor #14735 [HttpKernel][Bundle] Check extension implements ExtensionInterface (taueres)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #14735).

Discussion
----------

[HttpKernel][Bundle] Check extension implements ExtensionInterface

- Avoid fatal errors on line 89 (calling getAlias on objects of
  unknown type).
- Help developers solve problems with their extensions

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

Commits
-------

b6e0a92 [HttpKernel][Bundle] Check extension implements ExtensionInterface
2015-05-25 09:42:57 +02:00
Sergio Santoro
b6e0a9246d [HttpKernel][Bundle] Check extension implements ExtensionInterface
- Avoid fatal errors on line 89 (calling getAlias on objects of
  unknown type).
- Help developers solve problems with their extensions
2015-05-25 09:42:57 +02:00
Fabien Potencier
504548ec6c bug #14743 [DebugBundle] Fix config XSD (nicolas-grekas)
This PR was merged into the 2.6 branch.

Discussion
----------

[DebugBundle] Fix config XSD

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

Commits
-------

6b15ab5 [DebugBundle] Fix config XSD
2015-05-25 09:38:05 +02:00
Fabien Potencier
c563bbc2e4 bug #14711 [Serializer] AbstractNormalizer instantiateObject avoid null rejection (boekkooi)
This PR was submitted for the 2.8 branch but it was merged into the 2.7 branch instead (closes #14711).

Discussion
----------

[Serializer] AbstractNormalizer instantiateObject avoid `null` rejection

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

This PR fixes a bug in the AbstractNormalizer when denormalizing a array with a null argument.

Commits
-------

d546080 [Serializer] AbstractNormalizer::instantiateObject avoid `null` rejection
2015-05-25 09:37:02 +02:00
Warnar Boekkooi
d546080d20 [Serializer] AbstractNormalizer::instantiateObject avoid null rejection 2015-05-25 09:37:02 +02:00
Diego Saint Esteben
30aa4e96c6 Improved duplicated code in FileLocator 2015-05-24 22:52:55 -03:00
Warnar Boekkooi
266d53e5e8 [Serializer] AbstractNormalizer::instantiateObject allow default values when not optional 2015-05-25 07:36:47 +08:00
Nicolas Grekas
6b15ab5a4d [DebugBundle] Fix config XSD 2015-05-24 12:31:48 -07:00
ogizanagi
cd70ca8a51 [CS] [Console] StreamOuput : fix loose comparison 2015-05-24 20:51:45 +02:00
Nicolas Grekas
3fd7ceaa81 [Security] Add setVoters() on AccessDecisionManager 2015-05-23 12:08:33 -07:00
Fabien Potencier
237996eb6e minor #14730 [Framework][router commands] fixed failing tests. (aitboudad)
This PR was merged into the 2.6 branch.

Discussion
----------

[Framework][router commands] fixed failing tests.

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

Commits
-------

39cb661 [Framework][router commands] fixed failing test.
2015-05-23 13:12:55 +02:00
Abdellatif Ait boudad
39cb6616a2 [Framework][router commands] fixed failing test. 2015-05-22 19:35:43 +00:00
Fabien Potencier
58efb98c6f Merge branch '2.6' into 2.7
* 2.6: (30 commits)
  [Translation] fixed JSON loader on PHP 7 when file is empty
  Fix typo
  Check instance of FormBuilderInterface instead of FormBuilder
  [Security] TokenBasedRememberMeServices test to show why encoding username is required
  [Security] AbstractRememberMeServices::encodeCookie() validates cookie parts
  fixed typo
  [console][formater] allow format toString object.
  [HttpFoundation] Fix baseUrl when script filename is contained in pathInfo
  Avoid redirection to XHR URIs
  [HttpFoundation] IpUtils::checkIp4() should allow  networks
  [2.6] Fix HTML escaping of to-source links
  Fix HTML escaping of to-source links
  ExceptionHandler: More Encoding
  Fix the rendering of deprecation log messages
  [FrameworkBundle] Removed unnecessary parameter in TemplateController
  [DomCrawler] Throw an exception if a form field path is incomplete.
  Fixed the indentation in the compiled template for the DumpNode
  [Console] Delete duplicate test in CommandTest
  [TwigBundle] Refresh twig paths when resources change.
  WebProfiler break words
  ...

Conflicts:
	src/Symfony/Bridge/Twig/composer.json
	src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig
	src/Symfony/Component/Debug/ExceptionHandler.php
2015-05-22 16:54:25 +02:00
Fabien Potencier
dd744c9f53 Merge branch '2.3' into 2.6
* 2.3:
  Fix typo
  Check instance of FormBuilderInterface instead of FormBuilder
  [Security] TokenBasedRememberMeServices test to show why encoding username is required
  [Security] AbstractRememberMeServices::encodeCookie() validates cookie parts
  [console][formater] allow format toString object.
  [HttpFoundation] Fix baseUrl when script filename is contained in pathInfo
  Avoid redirection to XHR URIs
  [HttpFoundation] IpUtils::checkIp4() should allow  networks
  Fix HTML escaping of to-source links
  [FrameworkBundle] Removed unnecessary parameter in TemplateController
  [DomCrawler] Throw an exception if a form field path is incomplete.
  [Console] Delete duplicate test in CommandTest
  [TwigBundle] Refresh twig paths when resources change.
  WebProfiler break words
  fixed typo
  Update README.md
  [HttpKernel] Handle an array vary header in the http cache store
  [Security][Translation] fixes #14584
  [Framework] added test for Router commands.
  Handled bearer authorization header in REDIRECT_ form

Conflicts:
	src/Symfony/Component/Debug/ExceptionHandler.php
2015-05-22 16:53:08 +02:00
Fabien Potencier
836a661d63 bug #14726 [Translation] fixed JSON loader on PHP 7 when file is empty (fabpot)
This PR was submitted for the 2.5 branch but it was merged into the 2.6 branch instead (closes #14726).

Discussion
----------

[Translation] fixed JSON loader on PHP 7 when file is empty

| 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

For PHP7 compat.

Commits
-------

af36c34 [Translation] fixed JSON loader on PHP 7 when file is empty
2015-05-22 16:37:52 +02:00
Fabien Potencier
af36c341ac [Translation] fixed JSON loader on PHP 7 when file is empty 2015-05-22 16:37:51 +02:00
Fabien Potencier
cc749a67f6 bug #14715 [Form] Check instance of FormBuilderInterface instead of FormBuilder (dosten)
This PR was merged into the 2.3 branch.

Discussion
----------

[Form] Check instance of FormBuilderInterface instead of FormBuilder

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

Commits
-------

44469d0 Check instance of FormBuilderInterface instead of FormBuilder
2015-05-22 13:54:11 +02:00
Fabien Potencier
3e7b19e55e minor #14720 [2.7][DI] Definition deprecation notice includes the parameters given (iltar)
This PR was merged into the 2.7 branch.

Discussion
----------

[2.7][DI] Definition deprecation notice includes the parameters given

| Q             | A
| ------------- | ---
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #14687
| License       | MIT

This PR won't fix the issue at hand, but should make it a bit easier to debug. Because this is used by the configuration loader, it's hard to trace back where and how it's actually used.

Commits
-------

b322d46 Definition deprecation notice includes the parameters given
2015-05-22 13:51:10 +02:00
Fabien Potencier
ff0cb41ef7 minor #14724 [Intl/DateFormatter] Fix typo unitialized vs. uninitialized (SpacePossum)
This PR was merged into the 2.3 branch.

Discussion
----------

[Intl/DateFormatter] Fix typo unitialized vs. uninitialized

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

unitialized vs. uninitialized

Commits
-------

6ac8d29 Fix typo
2015-05-22 13:50:35 +02:00
Fabien Potencier
3331f0adcd bug #14654 [Console] SymfonyStyle : fix blocks failed when $messages is null (ogizanagi)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] SymfonyStyle : fix blocks failed when $messages is null

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

Using `SymfonyStyle:block` method with `null` as first argument failed, where most of other methods accepting both string and array arguments will simply output an empty string.

At first I wanted to output nothing, or even throw a proper exception. But then I realized how behaves other methods like text or write.

I encountered this issue while executing a console application, in non-interactive mode, that asks questions (without default value) and prints the result immediately using a note block:
```php
$output->note($output->choice('Choice question', array('choice 1', 'choice 2'));
```
![screenshot 2015-05-16 a 11 42 47](https://cloud.githubusercontent.com/assets/2211145/7665616/ba5f343c-fbc0-11e4-811d-6b109aaa8d27.PNG)

Commits
-------

cfd1022 [Console] SymfonyStyle : fix blocks failed when $messages is null.
2015-05-22 13:49:36 +02:00
Possum
6ac8d29d18 Fix typo 2015-05-22 12:24:03 +02:00
Iltar van der Berg
b322d4618c Definition deprecation notice includes the parameters given 2015-05-22 10:32:28 +02:00
Diego Saint Esteben
44469d01d1 Check instance of FormBuilderInterface instead of FormBuilder 2015-05-21 18:12:55 -03:00
Jakub Zalas
d320d27699 [HttpKernel] Do not call the FragmentListener if _controller is already defined 2015-05-21 10:29:06 +01:00
ogizanagi
cfd1022878 [Console] SymfonyStyle : fix blocks failed when $messages is null.
Using the `SymfonyStyle:block` method with `null` as first argument
failed, where most of other methods accepting both string and array arguments will simply output an empty string.
2015-05-21 09:48:52 +02:00
Fabien Potencier
b248bd1ee1 bug #14708 [TwigBridge] use proper class to fetch asset version strategy property (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[TwigBridge] use proper class to fetch asset version strategy property

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

Commits
-------

01b7dd6 [TwigBridge] use proper class to fetch asset version strategy property
2015-05-21 09:31:29 +02:00
Christian Flothmann
01b7dd6d9f [TwigBridge] use proper class to fetch asset version strategy property 2015-05-21 08:14:41 +02:00
Fabien Potencier
8e4fcfc7c1 minor #14707 [FrameworkBundle][TwigBundle] add changed debug command names to upgrade file (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle][TwigBundle] add changed debug command names to upgrade file

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

Thanks to @timglabisch for noticing this in https://github.com/symfony/symfony/pull/11627#issuecomment-66521130.

Commits
-------

4443c4d add changed debug command names to upgrade file
2015-05-21 06:30:54 +02:00
Fabien Potencier
089d9f734a minor #14670 [Security] TokenBasedRememberMeServices test to show why encoding username is required (MacDada)
This PR was squashed before being merged into the 2.3 branch (closes #14670).

Discussion
----------

[Security] TokenBasedRememberMeServices test to show why encoding username is required

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

241538d shows that it's not actually tested, 257b796 reimplements it with test.

I can remove the POC commit if it's not needed.

Commits
-------

63a9736 [Security] TokenBasedRememberMeServices test to show why encoding username is required
2015-05-21 06:29:49 +02:00
Dawid Nowak
63a9736350 [Security] TokenBasedRememberMeServices test to show why encoding username is required 2015-05-21 06:29:39 +02:00
Fabien Potencier
2cf230d6a6 bug #14678 [Security] AbstractRememberMeServices::encodeCookie() validates cookie parts (MacDada)
This PR was squashed before being merged into the 2.3 branch (closes #14678).

Discussion
----------

[Security] AbstractRememberMeServices::encodeCookie() validates cookie parts

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

`AbstractRememberMeServices::encodeCookie()` guards against `COOKIE_DELIMITER` in `$cookieParts`.

* it would make `AbstractRememberMeServices::cookieDecode()` broken
* all current extending classes do it anyway (see #14670 )
* added tests – it's not a public method, but it is expected to be used by user implementations – as such, it's good to know that it works properly

Commits
-------

464c39a [Security] AbstractRememberMeServices::encodeCookie() validates cookie parts
2015-05-21 06:28:27 +02:00
Dawid Nowak
464c39a77f [Security] AbstractRememberMeServices::encodeCookie() validates cookie parts 2015-05-21 06:28:25 +02:00
Fabien Potencier
438d394a1c bug #14635 [HttpKernel] Handle an array vary header in the http cache store (jakzal)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpKernel] Handle an array vary header in the http cache store

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

Commits
-------

5930800 [HttpKernel] Handle an array vary header in the http cache store
2015-05-21 06:26:25 +02:00
Fabien Potencier
84d2fdbe86 minor #14662 added supported format in commands supporting --format (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

added supported format in commands supporting --format

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

replaces #14084

Commits
-------

ea874b6 added supported format in commands supporting --format
c4bf217 deprecated the --xml option for commands
2015-05-21 06:22:51 +02:00
Abdellatif Ait boudad
a57ce907be feature #14630 [Translator] Dump translation constants as tree instead of simple list (gepo)
This PR was merged into the 2.8 branch.

Discussion
----------

[Translator] Dump translation constants as tree instead of simple list

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

PR #14434 for 2.8 branch

Commits
-------

29ec5ca [Translation] add options 'as_tree', 'inline' to YamlFileDumper to dump messages as tree instead of simple list.
2015-05-20 20:39:24 +00:00
Christian Flothmann
4443c4dd7e add changed debug command names to upgrade file 2015-05-20 21:43:40 +02:00
Nicolas Grekas
c27f564f68 [DependencyInjection] Avoid unnecessary calls to strtolower() 2015-05-20 11:44:03 -07:00
Fabien Potencier
1e0685711b fixed typo 2015-05-20 15:09:45 +02:00
Gennady Telegin
29ec5caf8a [Translation] add options 'as_tree', 'inline' to YamlFileDumper to dump messages as tree instead of simple list.
Dump messages as tree based on '.' character as a delimeter in path.
For example this rray('foo.bar' => 'value') will be converted to array('foo' => array('bar' => 'value')).

Correctly process cases like this ['foo.bar' => 'test1', 'foo' => 'test2'].
2015-05-20 12:35:10 +03:00
Christophe Coevoet
ab6400790b bug #14513 [console][formater] allow format toString object. (aitboudad)
This PR was submitted for the 2.7 branch but it was merged into the 2.3 branch instead (closes #14513).

Discussion
----------

[console][formater] allow format toString object.

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

reported by @micayael ( https://twitter.com/juanardissone/status/593859683502325761 )

Commits
-------

70b4964 [console][formater] allow format toString object.
2015-05-20 11:08:20 +02:00
Abdellatif Ait boudad
70b4964e4e [console][formater] allow format toString object. 2015-05-20 11:08:20 +02:00
Fabien Potencier
905bbbdd90 bug #14335 [HttpFoundation] Fix baseUrl when script filename is contained in pathInfo (danez)
This PR was squashed before being merged into the 2.3 branch (closes #14335).

Discussion
----------

[HttpFoundation] Fix baseUrl when script filename is contained in pathInfo

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

When the script filename is just /index.php, dirname() returns '/' for it. In Request::prepareBaseUrl() we append '/' to it (as introduced in #13039), which is wrong in this scenario as the resulting string is '//'.

When we rtrim('/') the output of dirname() then '/' would be constructed in this case, and in all other cases it makes no difference as dirname() already trims the right forward slash if there are path segments.

The test-cases should clarify the exact scenario.

Commits
-------

f24a6dd [HttpFoundation] Fix baseUrl when script filename is contained in pathInfo
2015-05-20 10:53:09 +02:00
Daniel Tschinder
f24a6dd43a [HttpFoundation] Fix baseUrl when script filename is contained in pathInfo 2015-05-20 10:53:07 +02:00