Commit Graph

21716 Commits

Author SHA1 Message Date
Nicolas Grekas
660449da08 bug #15625 Various fixes esp. on Windows (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

Various fixes esp. on Windows

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

Commits
-------

464a1b3 Various fixes esp. on Windows
2015-08-27 08:47:33 +02:00
Nicolas Grekas
464a1b3152 Various fixes esp. on Windows 2015-08-27 08:45:45 +02:00
Tobias Schultze
755f3c0223 Merge branch '2.3' into 2.7
Conflicts:
	src/Symfony/Bundle/FrameworkBundle/Templating/TemplateFilenameParser.php
2015-08-26 19:56:37 +02:00
Tobias Schultze
051cb35c8d bug #15428 Fix the validation of form resources to register the default theme (stof)
This PR was merged into the 2.3 branch.

Discussion
----------

Fix the validation of form resources to register the default theme

| 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

https://github.com/symfony/symfony/pull/14173 made some wrong changes, changing the behavior of the code. This reverts to the right behavior in affected places

Commits
-------

ea92610 Fix the validation of form resources to register the default theme
2015-08-26 19:46:48 +02:00
Tobias Schultze
c9927bf277 bug #15623 Fix the retrieval of the value with property path when using a loader (stof)
This PR was merged into the 2.7 branch.

Discussion
----------

Fix the retrieval of the value with property path when using a loader

| 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

the ChoiceType is transforming the form data to its value in case of non-expanded fields.

When creating the choice list from choices, this works fine when using a property path for the choice_value, because it has a safeguard against values which are not object or arrays (a typical case being ``null`` because nothing is selected yet).
However, when loading from a ChoiceLoader, the generated closure was missing the same safeguard, breaking the usage of ChoiceLoader with property path.
This went unnoticed because the only usage of choice_loader in core is for the doctrine type, and this one uses its own logic to get the choice value

I added test on the PropertyAccessDecorator directly, to have fast tests. We could imagine adding tests in the ChoiceTypeTest using a ChoiceLoader too, matching all existing tests for other ways to specify arguments, but I'm not sure it is worth it.

Commits
-------

5df64dc Fix the retrieval of the value with property path when using a loader
2015-08-26 19:45:33 +02:00
Christophe Coevoet
ea92610a85 Fix the validation of form resources to register the default theme 2015-08-26 18:52:32 +02:00
Christophe Coevoet
5df64dca52 Fix the retrieval of the value with property path when using a loader 2015-08-26 18:42:09 +02:00
Fabien Potencier
bdfc9dc7b3 minor #15614 consistently use str_replace to unify directory separators (Tobion)
This PR was merged into the 2.3 branch.

Discussion
----------

consistently use str_replace to unify directory separators

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

We used a mix of `str_replace` and `strtr` for the same thing. `str_replace` is faster as [I tested myself](https://3v4l.org/MNrgC) which is logical since strtr adds logic we don't need here.

Commits
-------

b9760ef consistently use str_replace to unify directory separators
2015-08-26 18:41:06 +02:00
Nicolas Grekas
fac7f2146e Merge branch '2.3' into 2.7
* 2.3:
  [appveyor] minor enhancements
2015-08-26 16:20:37 +02:00
Nicolas Grekas
0df822d466 minor #15621 [appveyor] minor enhancements (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[appveyor] minor enhancements

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

Commits
-------

ea9780e [appveyor] minor enhancements
2015-08-26 16:13:30 +02:00
Nicolas Grekas
ea9780e4ac [appveyor] minor enhancements 2015-08-26 16:04:28 +02:00
Nicolas Grekas
c63bcbe3d3 [Process] Disable failing tests on Windows 2015-08-26 13:41:45 +02:00
Nicolas Grekas
7f4f7131dd Merge branch '2.3' into 2.7
* 2.3:
  [Translation] Fix the string casting in the XliffFileLoader

Conflicts:
	src/Symfony/Component/Translation/Loader/XliffFileLoader.php
2015-08-26 12:49:32 +02:00
Nicolas Grekas
e924d567e9 Merge branch '2.3' into 2.7
* 2.3:
  Windows and Intl fixes
  Add appveyor.yml for C.I. on Windows
  [travis] merge php: nightly and deps=high test-matrix lines
  [Security] Add missing docblock in PreAuthenticatedToken

Conflicts:
	.travis.yml
	src/Symfony/Component/Filesystem/Tests/FilesystemTest.php
	src/Symfony/Component/HttpFoundation/JsonResponse.php
	src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php
2015-08-26 12:48:03 +02:00
Abdellatif Ait boudad
034c24717d bug #15619 [Translation] Fix the string casting in the XliffFileLoader (stof)
This PR was merged into the 2.3 branch.

Discussion
----------

[Translation] Fix the string casting in the XliffFileLoader

| 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

https://github.com/symfony/symfony/pull/15611 broke the usage of Xliff translation files (and so all Symfony projects as they are used in core) because it stores SimpleXmlElement instances in the MessageCatalogue, which breaks when loading the cache:

```
PHP Fatal error:  Call to undefined method SimpleXMLElement::__set_state() in .../app/cache/test/translations/catalogue.en.1cd7e874b24ab41081c7781e4161053bf515fc91.php on line 9
```

this is how the cache looks like (truncated a lot of course):

```php

$catalogue = new MessageCatalogue('en', array (
  'validators' =>
  array (
    'This value should be false.' =>
    SimpleXMLElement::__set_state(array(
       0 => 'This value should be false.',
    )),
  ),
));
```

This is a critical bug in the 2.3 and 2.7 branches

Commits
-------

b856f62 [Translation] Fix the string casting in the XliffFileLoader
2015-08-26 10:24:46 +00:00
Christophe Coevoet
b856f62cd4 [Translation] Fix the string casting in the XliffFileLoader 2015-08-26 11:54:34 +02:00
Fabien Potencier
fed77a3d80 minor #15484 [Security] Add missing docblock in PreAuthenticatedToken (tgalopin)
This PR was merged into the 2.3 branch.

Discussion
----------

[Security] Add missing docblock in PreAuthenticatedToken

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

I noticed the `PreAuthenticatedToken` does not provide any dockblock about its constructor parameters so PHPStorm uses the `AbstractToken` parameters and think I'm using `PreAuthenticatedToken` badly.

This fix it by adding the missing docblock and I also added the string[] possibility for roles in `AbstractToken` as it's present in the code and the exception message.

Commits
-------

1dda0a6 [Security] Add missing docblock in PreAuthenticatedToken
2015-08-26 11:25:14 +02:00
Fabien Potencier
d87e42fbe0 minor #15510 [travis] merge php-nightly and deps=high test-matrix lines (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[travis] merge php-nightly and deps=high test-matrix lines

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

Commits
-------

b4b930d [travis] merge php: nightly and deps=high test-matrix lines
2015-08-26 11:12:48 +02:00
Fabien Potencier
c13b5c1a43 bug #15575 Add appveyor.yml for C.I. on Windows (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

Add appveyor.yml for C.I. on Windows

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | YES, both on Travis (Linux) and on Appveyor (Windows)!
| Fixed tickets | #13934, #15049, #14259, #15045, #15444
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/5654

- testing two matrix lines:
  - one without mbtring nor fileinfo nor intl
  - one with these ext enables, intl version 51.2 so that almost no test is skipped on our Intl component
- bug fixes thanks to these harder testing conditions
- some display bug on appveyor, [reported here](http://help.appveyor.com/discussions/suggestions/197-support-ansi-color-codes).

Commits
-------

ea5d656 Windows and Intl fixes
8bbd8d9 Add appveyor.yml for C.I. on Windows
2015-08-26 11:00:07 +02:00
Nicolas Grekas
ea5d656ddd Windows and Intl fixes 2015-08-25 23:41:39 +02:00
Nicolas Grekas
8bbd8d90fe Add appveyor.yml for C.I. on Windows 2015-08-25 23:41:37 +02:00
Nicolas Grekas
de7b255871 bug #15493 [VarDumper] fixed HtmlDumper to target specific the head tag (SaschaDens)
This PR was submitted for the 2.6 branch but it was merged into the 2.7 branch instead (closes #15493).

Discussion
----------

[VarDumper] fixed HtmlDumper to target specific the head tag

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

On our webportals we faced the issue that we received the following js error: `Uncaught HierarchyRequestError: Failed to execute 'appendChild' on 'Node': This node type does not support this method.` and then the full dump is displaying without the arrows to collapse.

To simulate this error I've created a [Gist](https://gist.github.com/SaschaDens/0c5cc610ba168f6206d2) and as reference used [Adventures With document.documentElement.firstChild](https://robert.accettura.com/blog/2009/12/12/adventures-with-document-documentelement-firstchild/)

This PR specifically targets the head by using `document.getElementsByTagName('head')[0]` instead of `document.documentElement.firstChild`

Commits
-------

cbba074 [VarDumper] fixed HtmlDumper to target specific the head tag
2015-08-25 18:19:32 +02:00
SaschaDens
cbba07450e [VarDumper] fixed HtmlDumper to target specific the head tag 2015-08-25 18:19:32 +02:00
Nicolas Grekas
b4b930d14b [travis] merge php: nightly and deps=high test-matrix lines 2015-08-25 15:23:14 +02:00
Abdellatif Ait boudad
ffdab9259a Merge branch '2.3' into 2.7
Conflicts:
	.travis.yml
	src/Symfony/Component/Translation/Loader/XliffFileLoader.php
2015-08-25 12:59:36 +00:00
Tobias Schultze
b9760efb02 consistently use str_replace to unify directory separators 2015-08-25 14:59:33 +02:00
Abdellatif Ait boudad
4ca74b0d99 bug #15611 [Translation][Xliff Loader] Support omitting the <target> node in an .xlf file. (leofeyer)
This PR was merged into the 2.3 branch.

Discussion
----------

[Translation][Xliff Loader] Support omitting the <target> node in an .xlf file.

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

This is a cherry pick of #15604 on 2.3

Commits
-------

3dcda1a Support omitting the <target> node in an .xlf file.
2015-08-25 12:46:29 +00:00
Leo Feyer
3dcda1a8bd Support omitting the <target> node in an .xlf file. 2015-08-25 11:54:38 +00:00
Fabien Potencier
c9e63f8fc1 bug #15608 [Form] Fix the handling of values for multiple choice types (stof)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Fix the handling of values for multiple choice types

| 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

Choice values must always be strings (the ChoiceListInterface documents this requirement), but a place was missing the casting, breaking the comparison of selected choices when the callback does not return a string. This happens when a property path is used and points to a non-string property for instance (in the tests, the id is an integer, which is common).
Single choice types are not affected by the bug because the data transformer was also taking care of the string casting in this case.

Commits
-------

f31fa8c Fix the handling of values for multiple choice types
2015-08-25 13:24:37 +02:00
Christophe Coevoet
f31fa8c786 Fix the handling of values for multiple choice types
Choice values must always be strings, but a place was missing the
casting, breaking the comparison of selected choices when the callback
does not return a string.
2015-08-25 11:17:05 +02:00
Fabien Potencier
cca29d849a minor #15598 moved PHP nightly to PHP 7.0 (fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

moved PHP nightly to PHP 7.0

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

40e3ab0 moved PHP nightly to PHP 7.0
2015-08-25 08:41:38 +02:00
Fabien Potencier
40e3ab0621 moved PHP nightly to PHP 7.0 2015-08-24 11:20:39 +02:00
Fabien Potencier
c25e054d9e minor #15597 fixes CS (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

fixes CS

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

c0e4495 fixes CS
2015-08-24 09:16:32 +02:00
Fabien Potencier
c0e4495b66 fixes CS 2015-08-24 09:13:45 +02:00
Fabien Potencier
ce93f61437 Merge branch '2.3' into 2.7
* 2.3:
  fixed CS
  [FrameworkBundle] Fix precedence of xdebug.file_link_format
2015-08-24 08:37:42 +02:00
Fabien Potencier
cbe6bc9ac4 fixed CS 2015-08-24 08:32:52 +02:00
Tobias Schultze
b62e91c245 minor #15595 [DependencyInjection] Add missing file headers (dunglas)
This PR was squashed before being merged into the 2.7 branch (closes #15595).

Discussion
----------

[DependencyInjection] Add missing file headers

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

6ad4877 [DependencyInjection] Add missing file headers
2015-08-24 04:28:52 +02:00
Kévin Dunglas
6ad4877cde [DependencyInjection] Add missing file headers 2015-08-24 04:28:49 +02:00
Fabien Potencier
1076a0f551 bug #15549 [FrameworkBundle] Fix precedence of xdebug.file_link_format (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[FrameworkBundle] Fix precedence of xdebug.file_link_format

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

See https://github.com/symfony/symfony-demo/pull/148#issuecomment-131058728

Commits
-------

adb5327 [FrameworkBundle] Fix precedence of xdebug.file_link_format
2015-08-23 23:27:21 +02:00
Fabien Potencier
c9df5953de Merge branch '2.3' into 2.7
* 2.3:
  made Symfony compatible with both Twig 1.x and 2.x
2015-08-23 20:40:15 +02:00
Fabien Potencier
34bbd126d9 bug #15589 made Symfony compatible with both Twig 1.x and 2.x (fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

made Symfony compatible with both Twig 1.x and 2.x

Commits
-------

4de4180 made Symfony compatible with both Twig 1.x and 2.x
2015-08-23 20:39:03 +02:00
Fabien Potencier
2da03b186a fixed typo 2015-08-23 18:18:32 +02:00
Fabien Potencier
95a2ab385f bug #15590 Made Symfony 2.7 compatible with Twig 2.0 (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

Made Symfony 2.7 compatible with Twig 2.0

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

7b64354 fixed Twig deprecations
99a1fcc replaced deprecated Twig sameas test by same as
2015-08-23 18:16:21 +02:00
Fabien Potencier
7b64354058 fixed Twig deprecations 2015-08-23 17:59:39 +02:00
Bernhard Schussek
d3c70fe1a4 minor #15529 [Form][2.7] fix a namespace in the upgrade file (craue)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form][2.7] fix a namespace in the upgrade file

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

Commits
-------

f4a785b fixed a namespace in the upgrade file
2015-08-23 15:09:29 +02:00
Fabien Potencier
99a1fcc3e2 replaced deprecated Twig sameas test by same as 2015-08-23 09:32:15 +02:00
Fabien Potencier
4de4180457 made Symfony compatible with both Twig 1.x and 2.x 2015-08-22 18:18:42 +02:00
Fabien Potencier
e25aca7072 Merge branch '2.3' into 2.7
* 2.3:
  made Symfony compatible with both Twig 1.x and 2.x
2015-08-22 09:41:51 +02:00
Fabien Potencier
cc73e19175 bug #15535 made Symfony compatible with both Twig 1.x and 2.x (fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

made Symfony compatible with both Twig 1.x and 2.x

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

a5c7a85 made Symfony compatible with both Twig 1.x and 2.x
2015-08-22 09:40:01 +02:00
Fabien Potencier
b4de379a15 bug #15561 [Form] only use PropertyPath if not already callable (Tobion)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] only use PropertyPath if not already callable

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | could be in edge cases
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #15542
| License       | MIT
| Doc PR        | -

Currently it uses a PropertyPath even when the string is already a callable. But the callable string should have higher priority since that is also the one documented in ChoiceListFactoryInterface.

Commits
-------

470b140 [Form] only use PropertyPath if not already callable
2015-08-22 09:21:30 +02:00