Commit Graph

20175 Commits

Author SHA1 Message Date
Nicolas Grekas
5cabf880d6 [DI] Add missing check in PhpDumper 2017-04-21 13:48:46 +02:00
Kévin Dunglas
1eeadb0c98
[Serializer] XmlEncoder: fix negative int and large numbers handling 2017-04-19 22:42:09 +02:00
Nicolas Grekas
6d6b04ae97 [Console] Fix dispatching throwables from ConsoleEvents::COMMAND 2017-04-14 21:35:59 +02:00
Fabien Potencier
301bfa4bc4 minor #22430 [Console] Add throws PHPDoc in Application::run() (maidmaid)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Add throws PHPDoc in Application::run()

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

Same idea than merged #22411.

Commits
-------

28332afb38 Add trhows PHPDoc in Application::run
2017-04-14 07:55:35 -07:00
Fabien Potencier
5d83502ab5 bug #22424 [Debug] Set exit status to 255 on error (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Debug] Set exit status to 255 on error

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes (no easily testable in fact)
| Fixed tickets | #20775
| License       | MIT
| Doc PR        | -

Commits
-------

67e249dc81 [Debug] Set exit status to 255 on error
2017-04-13 15:15:37 -07:00
Dany Maillard
28332afb38 Add trhows PHPDoc in Application::run 2017-04-13 23:07:15 +02:00
Nicolas Grekas
67e249dc81 [Debug] Set exit status to 255 on error 2017-04-13 22:03:51 +02:00
Kévin Dunglas
4d2c454fad
[HttpFoundation] Store IANA's RNG files in the repository 2017-04-13 21:16:53 +02:00
Fabien Potencier
5742958a49 minor #22418 [HttpFoundation] Fix getClientIp @return docblock (e-moe)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] Fix getClientIp @return docblock

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

Commits
-------

af3424fb95 [HttpFoundation] Fix getClientIp @return docblock
2017-04-13 08:44:20 -07:00
Fabien Potencier
eff4feb7a1 minor #22411 [Console] Add @throws PHPDoc in Command::run() (maidmaid)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Add @throws PHPDoc in Command::run()

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

Commits
-------

7489a14656 Add @throws phpdoc
2017-04-13 08:31:13 -07:00
Nikolay Labinskiy
af3424fb95 [HttpFoundation] Fix getClientIp @return docblock 2017-04-13 14:19:24 +03:00
Dany Maillard
7489a14656 Add @throws phpdoc 2017-04-13 00:55:15 +02:00
Christian Flothmann
53ad49b4ef unify PHPUnit config files
* add XML namespace attributes
* remove attributes using default values
* remove unknown `syntaxCheck` option
2017-04-12 21:20:43 +02:00
Fabien Potencier
92eb9e1616 bug #22396 Prevent double registrations related to tag priorities (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

Prevent double registrations related to tag priorities

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

The current logic is inconsistent, and allows the same id to be used several times. This makes the first explicit priority to always win.

Commits
-------

6764dcdf39 Prevent double registrations related to tag priorities
2017-04-12 09:30:10 -07:00
Nicolas Grekas
6764dcdf39 Prevent double registrations related to tag priorities 2017-04-12 17:35:56 +02:00
Christian Flothmann
3792ee6c93 fail when detecting risky tests 2017-04-12 09:39:27 +02:00
Christian Flothmann
c891413f6c [Yaml] release memory after parsing 2017-04-11 09:50:01 +02:00
Fabien Potencier
f8e1098712 minor #22342 [Console] Inherit phpdoc from OutputFormatterInterface (ro0NL)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Inherit phpdoc from OutputFormatterInterface

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/22225#discussion_r109361374
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

Commits
-------

ff3cb9cb27 [Console] Inherit phpdoc from OutputFormatterInterface
2017-04-10 10:33:28 -07:00
Fabien Potencier
63592a646c bug #22352 [HttpFoundation] Add use_strict_mode in validOptions for session (sstok)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] Add `use_strict_mode` in validOptions for session

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

PHP ini `session.use_strict_mode` was added in PHP 5.5.2 so I didn't target 2.8 as this still uses PHP 5.3. https://secure.php.net/manual/en/session.configuration.php#ini.session.use-strict-mode

Commits
-------

130ee327d4 Add `use_strict_mode` in validOptions for session
2017-04-10 08:18:38 -07:00
Kévin Dunglas
72d25ccca7
[HttpFoundation] Fix and test status codes according to IANA's data 2017-04-10 16:36:56 +02:00
Sebastiaan Stok
130ee327d4
Add use_strict_mode in validOptions for session 2017-04-09 18:30:35 +02:00
Fabien Potencier
34655e69dd bug #22351 [Yaml] don't keep internal state between parser runs (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Yaml] don't keep internal state between parser runs

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

Commits
-------

faf671db0f don't keep internal state between parser runs
2017-04-09 07:34:06 -07:00
Christian Flothmann
faf671db0f don't keep internal state between parser runs 2017-04-09 10:04:00 +02:00
Jakub Sacha
761de99552 Fix passing options with defaultCommand 2017-04-07 23:55:19 +02:00
MetalArend
5310f11418 Add \Traversable typehint to phpdoc 2017-04-07 10:05:02 -07:00
Michal Čihař
81de5fef4b [ExpressionLanguage] Avoid dependency on ctype
This avoids ExpressionLanguage library dependency on ctype.
2017-04-07 09:40:11 -07:00
Roland Franssen
ff3cb9cb27 [Console] Inherit phpdoc from OutputFormatterInterface 2017-04-07 16:02:07 +02:00
Nicolas Grekas
d48fae7f8c bug #22307 [Debug] Fix php notice (enumag)
This PR was submitted for the 2.8 branch but it was merged into the 2.7 branch instead (closes #22307).

Discussion
----------

[Debug] Fix php notice

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

Of course autoloading of an empty string should not actually happen (fixed that in https://github.com/twigphp/Twig/pull/2438) but if it does happen it should not throw a php notice.

```
Notice: Uninitialized string offset 0
```

Commits
-------

e333a1a [Debug] Fix php notice
2017-04-07 14:20:28 +02:00
Jáchym Toušek
e333a1a86e [Debug] Fix php notice 2017-04-07 14:16:45 +02:00
apetitpa
7104c4e849 move provider after test 2017-04-05 11:10:47 -07:00
apetitpa
c07fb416ff update dataProvider function name 2017-04-05 11:10:47 -07:00
apetitpa
1825d0f2ae cast substr result to string and remove empty function use 2017-04-05 11:10:47 -07:00
apetitpa
894127bf09 rename dataset provider 2017-04-05 11:10:47 -07:00
apetitpa
d973eb1f7d Add a test to prevent future regressions 2017-04-05 11:10:47 -07:00
apetitpa
6f24b05467 Switch to empty native function to check emptiness
Switch to `empty` because depending on the PHP version, substr returns '' or false
2017-04-05 11:10:47 -07:00
apetitpa
f390f29173 remove non relevant test case 2017-04-05 11:10:47 -07:00
apetitpa
91b665c12a Switch to is_string native method 2017-04-05 11:10:46 -07:00
apetitpa
6071ff6c8f Remove unnecessary parentheses 2017-04-05 11:10:32 -07:00
apetitpa
9753a2773e Add a test case to prevent future regressions 2017-04-05 11:10:32 -07:00
apetitpa
4fcb24bacb Move empty condition in return statement 2017-04-05 11:10:32 -07:00
apetitpa
a090ef855a Use LF line separator 2017-04-05 11:10:32 -07:00
apetitpa
60392fdd43 fix coding standard to comply with fabbot 2017-04-05 11:10:32 -07:00
apetitpa
197d19f34c Remove malformed EmailValidatorTest + Update UrlValidator test
Remove malformed EmailValidatorTest + Update UrlValidator test
2017-04-05 11:10:32 -07:00
apetitpa
6b0702e52a Add empty check on host in other methods + add unit tests
Add empty on host in other methods where checkdnsrr is called and add unit tests to prevent future regressions
2017-04-05 11:10:31 -07:00
apetitpa
6dd023f255 [Validator] Allow checkMX() to return false when $host is empty
| Q | A |
| --- | --- |
| Branch? | master |
| Bug fix? | yes |
| New feature? | no |
| BC breaks? | no |
| Deprecations? | no |
| Tests pass? | yes |
| Fixed tickets | #22106 |
| License | MIT |
| Doc PR | n/a |
2017-04-05 11:10:12 -07:00
Fabien Potencier
933835c13b bug #22280 [DI] Fix the xml schema (GuilhemN)
This PR was merged into the 2.7 branch.

Discussion
----------

[DI] Fix the xml schema

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Commits
-------

f2ef1eecef [DI] Fix the xml schema
2017-04-05 08:21:50 -07:00
Fabien Potencier
a2003579e9 bug #22255 [Translation] avoid creating cache files for fallback locales. (aitboudad)
This PR was merged into the 2.7 branch.

Discussion
----------

[Translation] avoid creating cache files for fallback locales.

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

Commits
-------

22425b2692 [Translation] avoid creating cache files for fallback locales.
2017-04-05 07:56:27 -07:00
Douglas Reith
a03dbd2cca Fixes #22264 - add support for Chrome headless, see also Seldaek/monolog#966 2017-04-05 12:36:22 +00:00
Nicolas Grekas
4951d3c962 Dont call sprintf() when no placeholders are used 2017-04-04 20:32:29 +02:00
Guilhem Niot
f2ef1eecef
[DI] Fix the xml schema 2017-04-04 20:13:57 +02:00
Fabien Potencier
a2cd63c885 minor #22267 fix some more risky tests (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

fix some more risky tests

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

Continuation of #22066 fixing the tests for the following components:

* Config
* Form
* HttpFoundation
* Security

Commits
-------

fffcd247b2 fix some risky tests
2017-04-04 08:21:03 -07:00
Abdellatif Ait boudad
22425b2692 [Translation] avoid creating cache files for fallback locales. 2017-04-04 16:15:29 +01:00
Christian Flothmann
fffcd247b2 fix some risky tests 2017-04-04 16:55:33 +02:00
Fabien Potencier
e580c68899 bumped Symfony version to 2.7.27 2017-04-03 21:47:45 -07:00
Fabien Potencier
4cc567782e updated VERSION for 2.7.26 2017-04-03 21:31:58 -07:00
Fabien Potencier
a9da8a3858 bug #22229 [ExpressionLanguage] Provide the expression in syntax errors (k0pernikus, stof)
This PR was merged into the 2.7 branch.

Discussion
----------

[ExpressionLanguage] Provide the expression in syntax errors

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

This finishes the PR #19449.

Commits
-------

7cd744133d Complete the injection of the expression in all syntax errors
dc55db2a9d add expression text to SyntaxError
2017-04-03 14:52:00 -07:00
Christophe Coevoet
7cd744133d Complete the injection of the expression in all syntax errors 2017-04-03 10:58:13 +02:00
Nicolas Grekas
d518e42ec9 minor #22232 CS: Remove invisible chars (keradus)
This PR was squashed before being merged into the 2.7 branch (closes #22232).

Discussion
----------

CS: Remove invisible chars

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

I found out that we have 2 non-visible in regular IDE chars in codebase.
One is just inside a comment, it could be safely removed.
But second is inside a real code, I have replaced it with `pack`, so one won't accidentally replace non-breaking space with regular space.

Commits
-------

0f623f4 CS: Remove invisible chars
2017-04-03 10:10:25 +02:00
Dariusz Ruminski
0f623f4220 CS: Remove invisible chars 2017-04-03 10:10:21 +02:00
Nicolas Grekas
03755ee8b3 minor #22237 [EventDispatcher] Remove unneded count() (ostrolucky)
This PR was merged into the 2.7 branch.

Discussion
----------

[EventDispatcher] Remove unneded count()

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

Commits
-------

9a1915f [EventDispatcher] Remove unneded count()
2017-04-03 10:06:44 +02:00
Robin Chalas
75d5cb1bad Disable resource tracking if the config component is missing 2017-04-02 15:41:57 +02:00
Gabriel Ostrolucký
9a1915f88b [EventDispatcher] Remove unneded count() 2017-04-01 00:21:40 +02:00
Fabien Potencier
6008489153 bug #22140 [Form] Improve the exceptions when trying to get the data in a PRE_SET_DATA listener and the data has not already been set (fancyweb)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Improve the exceptions when trying to get the data in a PRE_SET_DATA listener and the data has not already been set

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

Commits
-------

ef39b704cc [Form] Improve the exceptions when trying to get the data in a PRE_SET_DATA listener and the data has not already been set
2017-03-31 16:36:01 +02:00
Fabien Potencier
d62b765298 bug #22217 [Console] Fix table cell styling (ro0NL)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Fix table cell styling

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | tiny one
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

Fixes an issue with newlines and table cells. Remembered this little trick from @chalasr as we had it before with style blocks i believe..

```php
$table = new Table($output);
$table->setRows(array(
    array(new TableCell('<error>Dont break'."\n".'here</error>', array('colspan' => 2))),
    new TableSeparator(),
    array('foo', new TableCell('<error>Dont break'."\n".'here</error>', array('rowspan' => 2))),
    array('bar'),
));
$table->render();
```

Before

![image](https://cloud.githubusercontent.com/assets/1047696/24467857/74dacc9e-14b6-11e7-8f62-3831508ac949.png)

After

![image](https://cloud.githubusercontent.com/assets/1047696/24467923/bb578f0e-14b6-11e7-85ed-039cd73b81a0.png)

Commits
-------

53ecf8393e [Console] Fix table cell styling
2017-03-31 16:33:09 +02:00
Fabien Potencier
fb6de49fd0 bug #22194 [Console] CommandTester: disable color support detection (julienfalque)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] CommandTester: disable color support detection

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

By default, the command tester relies on [color support guessing](3fe419cf66/src/Symfony/Component/Console/Output/StreamOutput.php (L91)) to enable output decoration.

This is an issue for tests in that guessing is done against the stream instance on Linux and against the actual environment running the test on Windows, so color support can be detected on Windows even when the used stream is a memory stream like here, resulting in non-deterministic tests.

This PR disables output decoration by default. This will only change behavior on Windows with color support, as guessing on Linux always detects color as not supported for memory streams anyway. Tests should enable decoration explicitly when they want to test it.

A better fix would be to actually detect that we are using a memory stream on Windows as well, but I'm not sure it's possible.

Commits
-------

3fe419cf66 Disable color support detection for tests
2017-03-31 14:44:27 +02:00
Christophe Coevoet
071548090b Fix tests expecting a valid date 2017-03-31 14:26:28 +02:00
Philipp Kretzschmar
dc55db2a9d add expression text to SyntaxError
fixes #19445
2017-03-31 09:39:36 +02:00
Roland Franssen
53ecf8393e [Console] Fix table cell styling 2017-03-30 10:19:40 +02:00
Fabien Potencier
11a06ccced bug #22188 [Console] Revised exception rendering (ro0NL)
This PR was squashed before being merged into the 2.7 branch (closes #22188).

Discussion
----------

[Console] Revised exception rendering

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

Continuation of #22142, as escaping can break too i just realized.

Before

![image](https://cloud.githubusercontent.com/assets/1047696/24376962/fc85a15c-133d-11e7-90fe-a8c754cbf592.png)

After

![image](https://cloud.githubusercontent.com/assets/1047696/24377289/340a8f2e-133f-11e7-83b3-54e1ea6f46bd.png)

cc @chalasr

Commits
-------

17f1f079b2 [Console] Revised exception rendering
2017-03-29 07:27:06 +02:00
Roland Franssen
17f1f079b2 [Console] Revised exception rendering 2017-03-29 07:27:03 +02:00
Fabien Potencier
9466237db0 bug #22154 [WebProfilerBundle] Normalize whitespace in exceptions passed in headers (curry684)
This PR was merged into the 2.7 branch.

Discussion
----------

[WebProfilerBundle] Normalize whitespace in exceptions passed in headers

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

If an exception was thrown with line separators in its message the WebProfiler would cause an exception by passing it through unsanitized into the X-Debug-Error HTTP header. This commit fixes that by replacing all whitespace sequences with a single space in the header.

Commits
-------

d64679014b [WebProfilerBundle] Normalize whitespace in exceptions passed in headers
2017-03-29 07:19:30 +02:00
Niels Keurentjes
d64679014b [WebProfilerBundle] Normalize whitespace in exceptions passed in headers
If an exception was thrown with line separators in its message the
WebProfiler would cause an exception by passing it through unsanitized
into the X-Debug-Error HTTP header. This commit fixes that by replacing
all whitespace sequences with a single space in the header.
2017-03-28 22:44:31 +02:00
Julien Falque
3fe419cf66
Disable color support detection for tests 2017-03-28 08:19:43 +02:00
Fabien Potencier
dd3712601d minor #22177 [HttpKernel] Fix test (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpKernel] Fix test

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

Should make 2.7 green again on Travis.

Commits
-------

ba8f46ad23 [HttpKernel] Fix test
2017-03-27 07:44:58 -07:00
Fabien Potencier
46cf21506c bug #22142 [Console] Escape exception messages in renderException (chalasr)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Escape exception messages in renderException

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

Adding style on exception messages should be prevented, it leads to weird results.

> Allowing formatting in them would be a nightmare, given that Symfony itself applies some formatting when rendering the exception.

Commits
-------

cb1348231a [Console] Escape exception messages
2017-03-27 07:36:47 -07:00
Nicolas Grekas
ba8f46ad23 [HttpKernel] Fix test 2017-03-27 16:31:27 +02:00
Andreas Braun
dbcfa5c659
Remove port from default host in server:status command 2017-03-27 08:24:12 +02:00
Nicolas Grekas
0577c7b089 [Bridge\Doctrine] Fix change breaking doctrine-bundle test suite 2017-03-26 17:09:07 +02:00
Robin Chalas
cb1348231a [Console] Escape exception messages 2017-03-25 13:51:36 +01:00
Fabien Potencier
da0b520a50 bug #22133 [Filesystem] normalize paths before making them relative (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Filesystem] normalize paths before making them relative

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

Commits
-------

d50ffa1de7 normalize paths before making them relative
2017-03-24 15:53:44 -07:00
Fabien Potencier
be3d2d2389 minor #22139 [HttpFoundation][DX] MockArraySessionStorage: phpdocs update (MacDada)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation][DX] MockArraySessionStorage: phpdocs update

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

Commits
-------

967f7a7add MockArraySessionStorage: updated phpdoc for $bags so that IDE autocompletion would work
2017-03-24 15:51:36 -07:00
Dawid Nowak
d984c73e66 [HttpFoundation][bugfix] should always be initialized 2017-03-24 07:50:55 -07:00
Dawid Nowak
967f7a7add MockArraySessionStorage: updated phpdoc for $bags so that IDE autocompletion would work 2017-03-24 15:14:19 +01:00
Thomas Calvet
ef39b704cc [Form] Improve the exceptions when trying to get the data in a PRE_SET_DATA listener and the data has not already been set 2017-03-24 10:02:28 +01:00
Christian Flothmann
d50ffa1de7 normalize paths before making them relative 2017-03-24 08:21:37 +01:00
Fabien Potencier
80af0838f5 removed test that does not test anything 2017-03-23 09:07:35 -07:00
Fabien Potencier
e31d3461ea fixed tests 2017-03-23 09:02:44 -07:00
Antanas Arvasevicius
6d23c8c41c #21809 [SecurityBundle] bugfix: if security provider's name contains upper cases then container didn't compile 2017-03-23 08:57:18 -07:00
Fabien Potencier
a6b20d1e5c bug #19778 [Security] Fixed roles serialization on token from user object (eko)
This PR was merged into the 2.7 branch.

Discussion
----------

[Security] Fixed roles serialization on token from user object

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

This PR fixes the serialization of tokens when using `Role` objects provided from the user. Indeed, there were actually a reference issue that can causes fatal errors like the following one:

```
FatalErrorException in RoleHierarchy.php line 43:
Error: Call to a member function getRole() on string
```

Here is a small code example to reproduce and its output:

``` php
$user = new Symfony\Component\Security\Core\User\User('name', 'password', [
    new Symfony\Component\Security\Core\Role\Role('name')
]);
$token = new Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken($user, 'password', 'providerKey', $user->getRoles());

$serialized = serialize($token);
$unserialized = unserialize($serialized);

var_dump($unserialized->getRoles());
```

Before:

```
array(1) { [0]=> bool(true) }
```

After:

```
array(1) { [0]=> object(Symfony\Component\Security\Core\Role\Role)#15 (1) {["role":"Symfony\Component\Security\Core\Role\Role":private]=> string(4) "name" } }
```

Thank you

Commits
-------

dfa7f5020e [Security] Fixed roles serialization on token from user object
2017-03-22 14:44:57 -07:00
Nikolay Labinskiy
3599c476bf [Validator] fix URL validator to detect non supported chars according to RFC 3986 2017-03-22 13:42:34 -07:00
Fabien Potencier
2240ecfa14 minor #22049 [Security] simplify the SwitchUserListenerTest (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Security] simplify the SwitchUserListenerTest

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

While working on #22048 I noticed that the `SwitchUserListenerTest` was more complicated than necessary by mocking a lot of stuff that didn't need to be mocked.

Commits
-------

923bbdbf9f [Security] simplify the SwitchUserListenerTest
2017-03-22 13:38:16 -07:00
Fabien Potencier
e8653b9964 bug #21968 Fixed pathinfo calculation for requests starting with a question mark. (syzygymsu)
This PR was squashed before being merged into the 2.7 branch (closes #21968).

Discussion
----------

Fixed pathinfo calculation for requests starting with a question mark.

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

With  improper `strpos` result check calculated pathinfo for requests starting with '?' equals to request itself.
Correct pathinfo for those requests should be '/'.

Commits
-------

43297b45de Fixed pathinfo calculation for requests starting with a question mark.
2017-03-22 13:27:23 -07:00
Anton A. Sumin
43297b45de Fixed pathinfo calculation for requests starting with a question mark. 2017-03-22 13:27:21 -07:00
Fabien Potencier
d562cacf44 bug #21846 [HttpFoundation] Fix Request::getHost() when having several hosts in X_FORWARDED_HOST (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] Fix Request::getHost() when having several hosts in X_FORWARDED_HOST

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

The first "host" in the list provided by `X_FORWARDED_HOST` should be the one, not the last.
Already the case for "port" and "scheme".

Commits
-------

9a2b2de64f [HttpFoundation] Fix Request::getHost() when having several hosts in X_FORWARDED_HOST
2017-03-22 13:01:02 -07:00
Claudio Zizza
4bd2c22871 [Validator] Add object handling of invalid constraints in Composite 2017-03-22 12:05:13 -07:00
Fabien Potencier
f9b64a206b minor #22099 HttpCache: New test for revalidating responses with an expired TTL (mpdude)
This PR was squashed before being merged into the 2.7 branch (closes #22099).

Discussion
----------

HttpCache: New test for revalidating responses with an expired TTL

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

See #22035, in particular [this and the following comments](https://github.com/symfony/symfony/pull/22035#issuecomment-287572234).

Commits
-------

067ab52ba0 HttpCache: New test for revalidating responses with an expired TTL
2017-03-21 15:46:55 -07:00
Matthias Pigulla
067ab52ba0 HttpCache: New test for revalidating responses with an expired TTL 2017-03-21 15:46:50 -07:00
Fabien Potencier
bca4778ef1 bug #22044 [Serializer] [XML] Ignore Process Instruction (jordscream)
This PR was merged into the 2.7 branch.

Discussion
----------

[Serializer] [XML] Ignore Process Instruction

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

This Pull request ignores Process instruction data in XML for decoding the data.

Commits
-------

0c741f5704 [Serializer] [XML] Ignore Process Instruction
2017-03-21 15:20:34 -07:00
Jordan Samouh
0c741f5704 [Serializer] [XML] Ignore Process Instruction 2017-03-21 23:11:30 +01:00
Fabien Potencier
65260bc346 minor #22066 fix some risky tests (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

fix some risky tests

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

PHPUnit 6 marks tests as risky when they have no assertions (and are not marked as skipped or incomplete). This PR will update our test suite accordingly.

Component that still need to be covered:

- [ ] Config
- [ ] Form
- [ ] HttpFoundation
- [ ] Security
- [ ] Workflow

Commits
-------

abf1787dcc fix some risky tests
2017-03-21 14:36:30 -07:00
Fabien Potencier
8ba279bc22 minor #22015 [Security] Added option to return true in the method isRememberMeRequested (WhiteEagle88)
This PR was merged into the 2.7 branch.

Discussion
----------

[Security] Added option to return true in the method isRememberMeRequested

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

Replaces #21989

Commits
-------

522ec3ef0c [Security] Added option to return true in the method isRememberMeRequested
2017-03-21 07:31:45 -07:00
Martin Auswöger
f50915066f [HttpKernel] Fixed bug with purging of HTTPS URLs 2017-03-20 17:24:37 -07:00
Christian Flothmann
abf1787dcc fix some risky tests 2017-03-20 16:03:41 +01:00
Fabien Potencier
2ba564d984 minor #22012 [DI] [YamlFileLoader] change error message of a non existing file (jordscream)
This PR was squashed before being merged into the 2.7 branch (closes #22012).

Discussion
----------

[DI] [YamlFileLoader] change error message of a non existing file

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

This PR replaces the error message when non existing Yaml file is loaded. It gives more sense for the user.

Commits
-------

1c2ea97585 [DI] [YamlFileLoader] change error message of a non existing file
2017-03-20 07:02:55 -07:00
Jordan Samouh
1c2ea97585 [DI] [YamlFileLoader] change error message of a non existing file 2017-03-20 07:02:54 -07:00
Nicolas Grekas
3185dc9c8f [Yaml] CS 2017-03-20 10:41:03 +01:00
Christian Flothmann
923bbdbf9f [Security] simplify the SwitchUserListenerTest 2017-03-17 23:55:35 +01:00
Fabien Potencier
ab1d9383b9 bug #21523 #20411 fix Yaml parsing for very long quoted strings (RichardBradley)
This PR was squashed before being merged into the 2.7 branch (closes #21523).

Discussion
----------

#20411 fix Yaml parsing for very long quoted strings

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

This is a second fix for the issue discussed in #20411. My first PR (#21279) didn't fix the bug in all cases, sorry.

If a YAML string has too many spaces in the value, it can trigger a `PREG_BACKTRACK_LIMIT_ERROR` error in the Yaml parser.

There should be no behavioural change other than the bug fix

I have included a test which fails before this fix and passes after this fix.

I have also added checks that detect other PCRE internal errors and throw a more descriptive exception. Before this patch, the YAML engine would often give incorrect results, rather than throwing, on a PCRE `PREG_BACKTRACK_LIMIT_ERROR` error.

Commits
-------

c9a1c09182 #20411 fix Yaml parsing for very long quoted strings
2017-03-17 09:20:26 -07:00
Richard Bradley
c9a1c09182 #20411 fix Yaml parsing for very long quoted strings 2017-03-17 09:20:23 -07:00
Fabien Potencier
ac109f154b bug #22001 [Doctrine Bridge] fix priority for doctrine event listeners (dmaicher)
This PR was merged into the 2.7 branch.

Discussion
----------

[Doctrine Bridge] fix priority for doctrine event listeners

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

This fixes handling the priorities for doctrine event listeners. As found out by @chapterjason in https://github.com/symfony/symfony/issues/21977 the priority was incorrectly handled as soon as a listener had more than one tag (so listening to multiple events).

With this changes all tagged listeners are globally sorted by priority (using the same stable sort approach as in the later available `PriorityTaggedServiceTrait`) and then added one by one to the event manager.

I also updated the tests a bit as it was not covering all cases.

We also have to extend the docs for it I think as it does not mention the `priority` and `lazy` option at all? http://symfony.com/doc/current/doctrine/event_listeners_subscribers.html

Commits
-------

9d9d4efb88 [Doctrine Bridge] fix priority for doctrine event listeners
2017-03-17 09:17:57 -07:00
Dmytro Boiko
522ec3ef0c [Security] Added option to return true in the method isRememberMeRequested 2017-03-16 00:06:02 +02:00
David Maicher
9d9d4efb88 [Doctrine Bridge] fix priority for doctrine event listeners 2017-03-14 21:52:39 +01:00
Fabien Potencier
dd8e50baa1 minor #21994 Use PHP functions as array_map callbacks when possible (javiereguiluz)
This PR was merged into the 2.7 branch.

Discussion
----------

Use PHP functions as array_map callbacks when possible

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

We already do that in 99% of the cases ... but there were 3 occurrences where we didn't do it.

Commits
-------

405bd4cc81 Use PHP functions as array_map callbacks when possible
2017-03-14 12:43:03 -07:00
Fabien Potencier
26198cf60a bug #21981 [Console] Use proper line endings in BufferedOutput (julienfalque)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Use proper line endings in BufferedOutput

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

`BufferOutput` should be consistent with `StreamOutput` when writing newlines.

I faced an issue using this class in tests where the expected output was platform dependent (using `PHP_EOL` too).

Commits
-------

33946e69c0 Use proper line endings
2017-03-14 11:38:54 -07:00
Javier Eguiluz
405bd4cc81 Use PHP functions as array_map callbacks when possible 2017-03-14 12:32:10 +01:00
Christian Flothmann
86e8afaea0 [Validator] revert wrong Phpdoc change 2017-03-14 09:04:19 +01:00
Nicolas Grekas
ac89b1c548 minor #21972 [FrameworkBundle] Fix cleaning of test dirs (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] Fix cleaning of test dirs

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

I spent an hour or two today debugging a non existent issue that was related to a non removed temporary file.
Let's cleanup properly now in the base WebTestCase.

Commits
-------

4842c86 [FrameworkBundle] Fix cleaning of test dirs
2017-03-14 08:31:41 +01:00
Nicolas Grekas
4842c86324 [FrameworkBundle] Fix cleaning of test dirs 2017-03-13 22:39:55 +01:00
Julien Falque
33946e69c0
Use proper line endings 2017-03-13 08:27:40 +01:00
Nicolas Grekas
6831b984e1 [VarDumper] ExceptionCaster robustness fix 2017-03-12 17:00:52 +01:00
Fred Cox
ed211e9c74 [Form] Choice type int values (BC Fix) 2017-03-10 11:10:39 -08:00
Nicolas Grekas
7f1f0cb630 [travis] Test with hhvm 3.18 2017-03-08 10:42:29 +01:00
Guilhem Niot
5107b94baf
[Yaml] Fix the tests 2017-03-06 21:37:41 +01:00
Christian Flothmann
3a7cd08fe7 respect the umask argument in dumpFile() 2017-03-06 19:56:39 +01:00
ChS
040a9abdbf dumpFile(), preserve existing file permissions 2017-03-06 10:29:45 -08:00
Fabien Potencier
3effed88e0 bug #21865 [Security] context listener: hardening user provider handling (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Security] context listener: hardening user provider handling

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

After the wrong fix in #21791 this is the second attempt to solve #4498. If more than one user provider support the user for the current context, all of them will be applied instead of returning prematurely when the first user provider does not find the logged in user.

Commits
-------

0fb09293fd context listener: hardening user provider handling
2017-03-06 08:15:02 -08:00
Fabien Potencier
ec134c7014 bug #21883 [HttpKernel] fix Kernel name when stored in a directory starting with a number (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpKernel] fix Kernel name when stored in a directory starting with a number

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

replaces #20750

Commits
-------

f244eb8414 [HttpKernel] fixed Kernel name when stored in a directory starting with a number
2017-03-06 07:51:41 -08:00
Pierre du Plessis
4013e7b998 Add validate method to mockec validator in form TypeTestCase 2017-03-06 09:20:15 +02:00
Fabien Potencier
7311ef36e9 bumped Symfony version to 2.7.26 2017-03-05 18:34:03 -08:00
Fabien Potencier
cb24ce3b52 updated VERSION for 2.7.25 2017-03-05 17:33:35 -08:00
Fabien Potencier
f244eb8414 [HttpKernel] fixed Kernel name when stored in a directory starting with a number 2017-03-05 14:37:48 -08:00
Fabien Potencier
4816f65c04 minor #21882 [Form] Fixed typo in a test after #21877 (HeahDude)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Fixed typo in a test after #21877

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

Reviewing the diff on GitHub, I realized I've missed some typos in a new test of #21877. Sorry!

Commits
-------

b21a0978de [Form] Fixed typo in a test after #21877
2017-03-05 11:48:05 -08:00
Fabien Potencier
511e0c372a minor #21868 [Form] backport DependencyInjectionExtension tests (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] backport DependencyInjectionExtension tests

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

Commits
-------

97361f1815 [Form] backport DependencyInjectionExtension tests
2017-03-05 11:42:52 -08:00
Christian Flothmann
97361f1815 [Form] backport DependencyInjectionExtension tests 2017-03-05 20:15:18 +01:00
HeahDude
b21a0978de [Form] Fixed typo in a test after #21877 2017-03-05 20:10:06 +01:00
Fabien Potencier
ea8025b863 minor #21877 [Form] Hardened form type tests (HeahDude)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Hardened form type tests

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

This one the PRs to come targeting 2.7 needed to harden the code base before doing some changes in master.

It takes care of the form types tests part (even if some other tests will be added later, it will also be easier after it), and unlocks merging https://github.com/symfony/symfony/pull/21481.
It also back ports tests added in https://github.com/symfony/symfony/pull/18357 for the TextType.

Since it's very hard to merge branches when modifying tests because of BC, and making every test type extend the base type test would involve many function calls to get the tested type, the function `getTestedType` is no longer abstract and return a constant to override instead, it's much better for performance, I didn't change the call in the base type test to keep BC but I suggest to deprecate it in master. Even if those are tests I really think it is worth keeping BC here.

The constants also ease testing in the ecosystem of form related libraries that need to be compatible with Symfony 2.7 and 3. I think using "test" as both prefix and suffix on namespaces, classes and names of the constants should discourage using them in real application code. Since this is just about our test suite, I don't think this should be considered a feature, so tis change should be good for 2.7.

Two other PRs will follow to solve conflicts in 2.8 and 3.2.

I missed last month patches, I hope I won't this time :).

Commits
-------

8cfc3e92ed [Form] Hardened form type tests
2017-03-05 09:34:46 -08:00
Fabien Potencier
69bb7582ad bug #21671 [Serializer] Xml encoder throws exception for valid data (gr1ev0us)
This PR was squashed before being merged into the 2.7 branch (closes #21671).

Discussion
----------

[Serializer] Xml encoder throws exception for valid data

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

#21617  Xml encoder throws exception for valid data

- add tests for bool and object encoding
- fix encoding for object in array and field

Commits
-------

5c2d4c671e [Serializer] Xml encoder throws exception for valid data
2017-03-05 09:23:36 -08:00
gr1ev0us
5c2d4c671e [Serializer] Xml encoder throws exception for valid data 2017-03-05 09:23:23 -08:00
HeahDude
8cfc3e92ed [Form] Hardened form type tests 2017-03-05 17:53:01 +01:00
Fabien Potencier
fd94048285 fixed CS 2017-03-04 06:54:02 -08:00
Christian Flothmann
0fb09293fd context listener: hardening user provider handling 2017-03-04 13:36:23 +01:00
Nicolas Grekas
d75ca7fa44 minor #21864 [Security] fix Composer constraint (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Security] fix Composer constraint

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

The `MAX_USERNAME_LENGTH` constant introduced by #18733 that is used in the `UsernamePasswordFormAuthenticationListener` was first part of Symfony 2.7.13 and 2.8.6.

Commits
-------

69a572d [Security] fix Composer constraint
2017-03-04 13:01:21 +01:00
Christian Flothmann
69a572dc5d [Security] fix Composer constraint 2017-03-04 12:40:30 +01:00
Nicolas Grekas
af40fd789c minor #21862 [Security] fix test class location (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Security] fix test class location

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

Keeping the test file in the old location means that it is not available in the `symfony/security-http` subtree split.

Commits
-------

1ed0092 fix test class location
2017-03-04 11:57:10 +01:00
Daniel Wehner
1d43007f3c Provide less state in getRequestFormat 2017-03-04 11:53:31 +01:00
Christian Flothmann
1ed0092a62 fix test class location 2017-03-04 11:20:42 +01:00
Vladimir Reznichenko
e1773ee2b8 Static code analysis with Php Inspections (EA Extended): dead code dropped, couple bugs fixed 2017-03-03 17:35:37 +01:00
Nicolas Grekas
9a2b2de64f [HttpFoundation] Fix Request::getHost() when having several hosts in X_FORWARDED_HOST 2017-03-03 11:02:41 +01:00
Fabien Potencier
cb12e323a5 minor #21814 fixed CS (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

fixed CS

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| 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
-------

ad0bb6ac53 fixed CS
2017-03-02 13:32:57 -08:00
Fabien Potencier
c579b96cef bug #21832 [Routing] Ignore hidden directories when loading routes from annotations (jakzal)
This PR was merged into the 2.7 branch.

Discussion
----------

[Routing] Ignore hidden directories when loading routes from annotations

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

The problem surfaced after implementing #18869. Therefore it doesn't exist on 2.7, but I'd still merge it there to avoid conflicts when merging between branches. Without this fix, the oldest branch the added test will fail is 3.2.

Commits
-------

ce9df0237c [Routing] Ignore hidden directories when loading routes from annotations
2017-03-02 07:54:09 -08:00
foaly-nr1
e50804cef4 [Form] Improve rounding precision 2017-03-02 07:52:21 -08:00
Jakub Zalas
ce9df0237c
[Routing] Ignore hidden directories when loading routes from annotations 2017-03-02 14:51:26 +00:00
Fabien Potencier
ad0bb6ac53 fixed CS 2017-03-01 11:43:24 -08:00
Fabien Potencier
a786b5aaaf revert typo fix 2017-03-01 06:59:13 -08:00
Fabien Potencier
817524889c bug #21267 [Form] Fix ChoiceType to ensure submitted data is not nested unnecessarily (issei-m)
This PR was squashed before being merged into the 2.7 branch (closes #21267).

Discussion
----------

[Form] Fix ChoiceType to ensure submitted data is not nested unnecessarily

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

Fixed ChoiceType to protect against some problem caused by treating of array.

Let's say we have the choice-form like:

```php
$form = $factory->create(ChoiceType, null, [
    'choices' => [
        'A',
        'B',
        'C',
    ],
    'expanded' => true,
    'multiple' => true,
]);
```

Then, submit data like this:

```php
$form->submit([
    [], // unnecessality nested
]);
```

(Yes, I agree in most cases these situation doesn't happen, but can be)

Then, we get `array_flip(): Can only flip STRING and INTEGER values!` error at [here](6babdb3296/src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php (L114)).
Even if form is not `multiple`, annoying `Array to string conversion` error occurs in [here](6babdb3296/src/Symfony/Component/Form/ChoiceList/ArrayChoiceList.php (L144)) (via [ChoicesToValuesTransformer](5129c4cf7e/src/Symfony/Component/Form/Extension/Core/DataTransformer/ChoicesToValuesTransformer.php (L74))).
(As far as I know, non-multiple and non-expanded form has no problem, thanks to [ChoiceToValueTransformer](6babdb3296/src/Symfony/Component/Form/Extension/Core/DataTransformer/ChoiceToValueTransformer.php (L43)))

To resolve these problems, I just added a simple-validation listener to choice type.

Commits
-------

64d7a82d28 [Form] Fix ChoiceType to ensure submitted data is not nested unnecessarily
2017-03-01 06:57:41 -08:00
Issei.M
64d7a82d28 [Form] Fix ChoiceType to ensure submitted data is not nested unnecessarily 2017-03-01 06:57:38 -08:00
Fabien Potencier
0a15eea264 minor #21650 [Yaml] add tests for specific mapping keys (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Yaml] add tests for specific mapping keys

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | see https://github.com/symfony/symfony/pull/21643#discussion_r101703130
| License       | MIT
| Doc PR        |

Commits
-------

b8e0d705f6 [Yaml] add tests for specific mapping keys
2017-03-01 06:39:50 -08:00
Fabien Potencier
ffc1cd507b bug #21731 Fix emacs link (rubenrua)
This PR was merged into the 2.7 branch.

Discussion
----------

Fix emacs link

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

When an Emacs buffer is modified, by default Emacs automatically creates a
temporary symlink in the same directory as the file being edited (e.g. Controller.php):

```
.#Controller.php -> user@host.12345:1296583136
```

where '12345' is [the Emacs' PID][1].

In this case Symfony breaks with a RuntimeException:

```
SplFileInfo::getMTime(): stat failed for ...Bundle/Controller/.#APIController.php
```

in
vendor/symfony/symfony/src/Symfony/Component/Config/Resource/DirectoryResource.php
at line 89

```
$newestMTime = max($file->getMTime(), $newestMTime);
```

[1]: https://www.gnu.org/software/emacs/manual/html_node/emacs/Interlocking.html

Commits
-------

c6f7ca6fa1 Fix RuntimeException when an Emacs buffer is modified
2017-03-01 06:05:48 -08:00
Julien Falque
8530e05574
Test inline styles with non-decorated formatter 2017-02-28 19:03:12 +01:00
Romain Neutron
e473aa8bc1
[2.7] Fix issues reported by static analyse 2017-02-28 14:08:19 +01:00
Nicolas Grekas
0f353ad6c9 minor #21754 [Serializer] Reduce nesting in YamlFileLoader (gadelat)
This PR was merged into the 2.7 branch.

Discussion
----------

[Serializer] Reduce nesting in YamlFileLoader

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

We don't need to check if $this->classes is empty, because isset takes care of it in next call anyway

Diffs on GH are hard to read for this type of change, here is old and new code:

```php
public function loadClassMetadata(ClassMetadataInterface $classMetadata)
{
    if (null === $this->classes) {
        $this->classes = $this->getClassesFromYaml();
    }

    if (!$this->classes) {
        return false;
    }

    if (isset($this->classes[$classMetadata->getName()])) {
        $yaml = $this->classes[$classMetadata->getName()];

        if (isset($yaml['attributes']) && is_array($yaml['attributes'])) {
           ...
        }

        return true;
    }

    return false;
}
```

```php
public function loadClassMetadata(ClassMetadataInterface $classMetadata)
{
    if (null === $this->classes) {
        $this->classes = $this->getClassesFromYaml();
    }

    if (!isset($this->classes[$classMetadata->getName()])) {
        return false;
    }

    $yaml = $this->classes[$classMetadata->getName()];

    if (isset($yaml['attributes']) && is_array($yaml['attributes'])) {
        ...
    }

    return true;
}
```

Commits
-------

45f0b16 [Serializer] Reduce nesting in YamlFileLoader
2017-02-28 13:57:37 +01:00
Nicolas Grekas
9aebfad501 bug #21798 Revert "bug #21791 [SecurityBundle] only pass relevant user provider (xabbuh)" (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

Revert "bug #21791 [SecurityBundle] only pass relevant user provider (xabbuh)"

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

#21791 was a mistake as pointed out by @slaci (see https://github.com/symfony/symfony/pull/21791#issuecomment-282990746) and @stof (see https://github.com/symfony/symfony/pull/21792#issuecomment-282980046).

Commits
-------

f6637dd Revert "bug #21791 [SecurityBundle] only pass relevant user provider (xabbuh)"
2017-02-28 13:27:45 +01:00
Christian Flothmann
f6637dd900 Revert "bug #21791 [SecurityBundle] only pass relevant user provider (xabbuh)"
This reverts commit eb750be851, reversing
changes made to 70be4ba3ca.
2017-02-28 13:20:26 +01:00
rubenrua
c6f7ca6fa1 Fix RuntimeException when an Emacs buffer is modified
When an Emacs buffer is modified, by default Emacs automatically creates a
temporary symlink in the same directory as the file being edited (e.g. Controller.php):

```
.#Controller.php -> user@host.12345:1296583136
```

where '12345' is Emacs' PID.

In this case Symfony breaks with a RuntimeException:

```
SplFileInfo::getMTime(): stat failed for ...Bundle/Controller/.#APIController.php
```

in
vendor/symfony/symfony/src/Symfony/Component/Config/Resource/DirectoryResource.php
at line 89

```
$newestMTime = max($file->getMTime(), $newestMTime);
```
2017-02-28 12:10:07 +01:00
Hugo Hamon
b7b7c5433a [DependencyInjection] inline conditional statements. 2017-02-28 10:12:48 +01:00
Fabien Potencier
eb750be851 bug #21791 [SecurityBundle] only pass relevant user provider (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[SecurityBundle] only pass relevant user provider

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #4498, #12465, #20401, #21737
| License       | MIT
| Doc PR        |

There is no need for the context listener to be aware of all the configured user providers. It must only use the provider for the current firewall (the one identified by the context key passed to the constructor) to refresh the user from the session.

Commits
-------

d97e07fd6a [SecurityBundle] only pass relevant user provider
2017-02-27 18:22:58 -08:00
Fabien Potencier
70be4ba3ca minor #21790 [Intl] Update ICU data to 58.2 (jakzal)
This PR was squashed before being merged into the 2.7 branch (closes #21790).

Discussion
----------

[Intl] Update ICU data to 58.2

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

ICU 58.2 was released: http://site.icu-project.org/download/58

Commits
-------

d135e5cd2f [Intl] Make tests pass after the ICU data update
65faa1043d [Intl] Update ICU data to 58.2
2017-02-27 13:58:46 -08:00
Gabriel Ostrolucký
45f0b16b78 [Serializer] Reduce nesting in YamlFileLoader 2017-02-27 22:43:30 +01:00
Christian Flothmann
d97e07fd6a [SecurityBundle] only pass relevant user provider 2017-02-27 22:20:22 +01:00
Jakub Zalas
d135e5cd2f
[Intl] Make tests pass after the ICU data update 2017-02-27 19:39:35 +00:00
Jakub Zalas
65faa1043d
[Intl] Update ICU data to 58.2 2017-02-27 19:39:27 +00:00
Hugo Hamon
158b689e76 [DependencyInjection] removed dead code. 2017-02-27 16:11:02 +01:00
Gabriel Ostrolucký
d9674401de [Yaml] Stop replacing NULLs when merging 2017-02-25 19:32:58 +01:00
Robin Chalas
1e9ca7bead Fix missing namespace in AddConstraintValidatorPassTest 2017-02-23 22:30:07 +01:00
Dany Maillard
e305369f98 [ExpressionLanguage] Registering functions after calling evaluate(), compile() or parse() is not supported 2017-02-22 14:24:23 -08:00
Fabien Potencier
b675d0518c bug #21679 [SecurityBundle] fix priority ordering of security voters (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[SecurityBundle] fix priority ordering of security voters

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

Could be updated in the `3.2` branch to make use of the `PriorityTaggedServiceTrait `.

Commits
-------

dcd19f3cf9 fix priority ordering of security voters
2017-02-21 18:27:23 -08:00
Nicolas Grekas
96ecd3c798 Use PHPUnit 6.0 on PHP 7.* test lines 2017-02-21 14:43:45 +01:00
Nicolas Grekas
c55b7349ae minor #21688 Further refactorings to PHPUnit namespaces (peterrehm)
This PR was squashed before being merged into the 2.7 branch (closes #21688).

Discussion
----------

Further refactorings to PHPUnit namespaces

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

Continued work to make Symfony PHPUnit 6 compatible

Commits
-------

de8106f Further refactorings to PHPUnit namespaces
2017-02-21 09:32:28 +01:00
Peter Rehm
de8106fea6 Further refactorings to PHPUnit namespaces 2017-02-21 09:32:25 +01:00
Fabien Potencier
f1cf0ad334 minor #21680 [FrameworkBundle] resolve parameters in definition classes (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] resolve parameters in definition classes

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

Commits
-------

37ce682947 resolve parameters in definition classes
2017-02-20 08:59:53 -08:00
Nicolas Grekas
3e83e02f2c Add missing conflict rules for phpunit 2017-02-20 13:48:07 +01:00
Christian Flothmann
37ce682947 resolve parameters in definition classes 2017-02-20 09:01:13 +01:00
Christian Flothmann
dcd19f3cf9 fix priority ordering of security voters 2017-02-20 08:38:24 +01:00
Gabriel Ostrolucký
32fcd91397 [Serializer] Removed duplicate operation in camelcase denormalization 2017-02-19 15:30:59 -08:00
Fabien Potencier
eb0ffaaee7 bug #21115 [Validator] do not guess getter method names (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Validator] do not guess getter method names

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #5219, #18700
| License       | MIT
| Doc PR        | TODO

Commits
-------

bd3a90a0c3 [Validator] do not guess getter method names
2017-02-19 14:49:47 -08:00
Fabien Potencier
245eaa8fa2 fixed Composer constraints 2017-02-18 10:28:08 -08:00
Nicolas Grekas
bc34081d37 minor fix 2017-02-18 19:10:02 +01:00
David Buchmann
15da53ca9f purge both http and https from http cache store 2017-02-18 09:59:47 -08:00
Fabien Potencier
c9684ad31f minor #21564 Update to PHPUnit namespaces (peterrehm)
This PR was squashed before being merged into the 2.7 branch (closes #21564).

Discussion
----------

Update to PHPUnit namespaces

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

Replaces #21540

@nicolas-grekas Is the update of the cache-id like this sufficient? Do we maybe have to specifiy 4.8.35 in simple-phpunit?

Commits
-------

ddd2dff9b2 Update to PHPUnit namespaces
2017-02-18 08:02:55 -08:00
Peter Rehm
ddd2dff9b2 Update to PHPUnit namespaces 2017-02-18 08:02:39 -08:00
Fabien Potencier
9d2bbc6dbe bug #21637 [FrameworkBundle] remove translation data collector when not usable (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] remove translation data collector when not usable

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

Commits
-------

303bb73971 remove translation data collector when not usable
2017-02-17 08:12:20 -08:00
Christian Flothmann
b8e0d705f6 [Yaml] add tests for specific mapping keys 2017-02-17 14:54:22 +01:00
Fabien Potencier
68d6415955 Revert "bug #21436 [DependencyInjection] check for circular refs caused by method calls (xabbuh)"
This reverts commit 3441b1586f, reversing
changes made to d1f4cb27fd.
2017-02-16 14:39:07 -08:00
Fabien Potencier
a5c099c829 minor #21537 Static code analysis with Php Inspections (EA Extended) (kalessil)
This PR was squashed before being merged into the 2.7 branch (closes #21537).

Discussion
----------

Static code analysis with Php Inspections (EA Extended)

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

- Unnecessary proxy methods and methods duplicating  parents ones removed;
- Type casings instead of PHP4 functions;
- Usage of copy instead of file combining file get/put contents;
- One time use variables cleaned up;
- Superfluous functions calls in loop termination conditions fixed;

Commits
-------

3feeca74d0 Static code analysis with Php Inspections (EA Extended)
2017-02-16 14:27:03 -08:00
Vladimir Reznichenko
3feeca74d0 Static code analysis with Php Inspections (EA Extended) 2017-02-16 14:26:15 -08:00
Christian Flothmann
303bb73971 remove translation data collector when not usable 2017-02-16 23:20:46 +01:00
Fabien Potencier
38490dac21 bug #21634 [VarDumper] Added missing persistent stream cast (lyrixx)
This PR was merged into the 2.7 branch.

Discussion
----------

[VarDumper] Added missing persistent stream cast

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

Commits
-------

cab9f7eb8f [VarDumper] Added missing persistent stream cast
2017-02-16 11:29:17 -08:00
Grégoire Pineau
cab9f7eb8f [VarDumper] Added missing persistent stream cast 2017-02-16 18:03:48 +01:00
Fabien Potencier
3441b1586f bug #21436 [DependencyInjection] check for circular refs caused by method calls (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[DependencyInjection] check for circular refs caused by method calls

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

Before we check for circular references, dependencies coming from method calls are not part of the dependency graph. That why the pass is not able to detect circular references like the one described in #19362 during compilation of the container.

If we add another check after all the optimisation passes have been processed, we should be able to detect these circular references too.

Commits
-------

fe4f7eccf7 check for circular refs caused by method calls
2017-02-16 05:23:11 -08:00
Fabien Potencier
d1f4cb27fd bug #21400 [Serializer] fix upper camel case conversion (see #21399) (markusu49)
This PR was merged into the 2.7 branch.

Discussion
----------

[Serializer] fix upper camel case conversion (see #21399)

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

Improve upper camel case support of CamelCaseToSnakeCaseConverter (`ThisIsATest` now converts to `this_is_a_test` instead of `_this_is_a_test`).

Commits
-------

81e771ca1a [Serializer] fix upper camel case conversion (see #21399)
2017-02-16 05:20:16 -08:00
Fabien Potencier
be854e16d5 bug #21599 [Console][Table] fixed render when using multiple rowspans. (aitboudad)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console][Table] fixed render when using multiple rowspans.

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

Commits
-------

17e459e688 [Console][Table] fixed render when using multiple rowspans.
2017-02-16 04:36:16 -08:00
Bilge
412db4ca51 Permit empty suffix on Windows 2017-02-16 04:33:37 -08:00
Fabien Potencier
85ae59a15b minor #21536 [TwigBridge] Add docblocks for Twig url and path function to improve ide completion (Haehnchen)
This PR was merged into the 2.7 branch.

Discussion
----------

[TwigBridge] Add docblocks for Twig url and path function to improve ide completion

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

`RoutingExtension` missed docblock for Twig extension so `path` and `url` are not fully recognized by PhpStorm.

https://github.com/Haehnchen/idea-php-symfony2-plugin/issues/864 will add more smarter completion
`{{ p<caret> }} -> {{ path('<caret>') }}`, but string parameter is not detected. This will add the minimal docs

Commits
-------

93ab0179f0 add docblocks for Twig url and path function to improve ide completion
2017-02-16 03:30:17 -08:00
Abdellatif Ait boudad
17e459e688 [Console][Table] fixed render when using multiple rowspans. 2017-02-14 19:10:22 +00:00
Fabien Potencier
be691d5e70 minor #21028 [Console] Updated phpdoc on return types (mlpo)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Updated phpdoc on return types

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

The return type of “ask” is not necessarily a string (notice that “doAsk” may return mixed type).
Same for “validateAttempts” (validator may return something else than a string).

Commits
-------

442a304292 [Console] Updated phpdoc on return types
2017-02-14 19:34:00 +01:00
Fabien Potencier
ff75e32e45 bug #21057 [DI] Auto register extension configuration classes as a resource (ro0NL)
This PR was merged into the 2.7 branch.

Discussion
----------

[DI] Auto register extension configuration classes as a resource

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

Auto-register an extension configuration class as a resource from a compiler pass; not implicitly by the base extension class.

Causing some extensions to register its configuration, whereas others dont (e.g. framework bundle).

Fixes consistent cache invalidation whenever a configuration definition changes.

Commits
-------

142416b7d4 [DI] Auto register extension configuration classes as a resource
2017-02-14 19:31:46 +01:00
Nicolas Grekas
298060d0a0 minor #21529 [FrameworkBundle] Simplify createPackageDefinition (dunglas)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] Simplify createPackageDefinition

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | n/a

Minor simplification.

Commits
-------

4b81393 [FrameworkBundle] Simplify createPackageDefinition
2017-02-14 13:45:10 +01:00
Fabien Potencier
5c07ffada7 bug #21592 [Validator] property constraints can be added in child classes (angelk, xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Validator] property constraints can be added in child classes

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #21538, #21567
| License       | MIT
| Doc PR        |

This reverts the changes done in #21053 (and applies the test written by @angelk in #21538). I think trying to "fix" #15950 with the changes from #21053 was a mistake. Child classes should be able to refine validation constraints (I basically agree with @ro0NL's reasoning in https://github.com/symfony/symfony/issues/21567#issuecomment-278729990.

Commits
-------

9513a8aa52 property constraints can be added in child classes
a266ff799c added test for staticClassLoader in LazyLoadingMetadatafactory
2017-02-13 19:48:02 +01:00
Christian Flothmann
9513a8aa52 property constraints can be added in child classes 2017-02-13 18:37:45 +01:00
po_taka
a266ff799c added test for staticClassLoader in LazyLoadingMetadatafactory 2017-02-13 18:37:45 +01:00
Fabien Potencier
2c302cee19 bug #21458 [Config] Early return for DirectoryResource (robfrawley)
This PR was squashed before being merged into the 2.7 branch (closes #21458).

Discussion
----------

[Config] Early return for DirectoryResource

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | sure?
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | no
| Fixed tickets |
| Related PRs | #21440
| License       | MIT
| Doc PR        | n/a

Alternate PR  that implements an early return for `DirectoryResource` to increase the speed on large file sets. We can never return early with `true` without checking all assets within the resource, as the aforementioned referenced PR did; hence this PR takes the counter approach and returns `false` early where appropriate.

_Conversation about possible bug at https://github.com/symfony/symfony/pull/21458#discussion_r98366339._

Commits
-------

d5746ecfd2 fix directory resource considers same timestamp not fresh
96107e21f1 return false early from directory resource
2017-02-12 20:12:54 +01:00
Fabien Potencier
e7541d9552 bug #21562 [DoctrineBridge] make sure that null can be the invalid value (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[DoctrineBridge] make sure that null can be the invalid value

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

Commits
-------

c3702c2d8f make sure that null can be the invalid value
2017-02-12 20:07:00 +01:00
Daniel Espendiller
93ab0179f0 add docblocks for Twig url and path function to improve ide completion 2017-02-12 09:39:31 +01:00
klemens
6ccc479d72 spelling fixes 2017-02-11 12:34:45 +01:00
Christian Flothmann
c3702c2d8f make sure that null can be the invalid value 2017-02-09 08:12:50 +01:00
Fabien Potencier
d3673a83ae bumped Symfony version to 2.7.25 2017-02-06 13:22:53 +01:00
Fabien Potencier
6fce88bde3 updated VERSION for 2.7.24 2017-02-06 13:06:02 +01:00
Fabien Potencier
ad8f18963e fixed test name 2017-02-04 08:36:32 -08:00
Fabien Potencier
1d1f1666e7 bug #21063 [Form] Fixed DateType format option for single text widget (HeahDude)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Fixed DateType format option for single text widget

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

It's currently not possible to use a custom format with `DateType` when not using one of the three values day, month or year (i.e in my case "MM/yyyy").

The formatter handles it, it looks like this option check is wrong, this PR fixes it.

Commits
-------

9e0d531d36 [Form] Fixed DateType format option
2017-02-04 08:34:51 -08:00
Kévin Dunglas
4b81393387
[FrameworkBundle] Simplify createPackageDefinition 2017-02-04 11:29:24 +01:00
Fabien Potencier
f0d13f4708 bug #21430 Casting TableCell value to string. (jaydiablo)
This PR was squashed before being merged into the 2.7 branch (closes #21430).

Discussion
----------

Casting TableCell value to string.

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

PHP throws a catchable fatal error when the value from this method is
used in strstr in the Table class. This fixes the error by casting to a string before returning the value.

Commits
-------

1e5707fed3 Casting TableCell value to string.
2017-02-03 13:25:39 -08:00
Jay Klehr
1e5707fed3 Casting TableCell value to string. 2017-02-03 13:25:34 -08:00
Robin Lehrmann
78c0ec5c13 [FrameworkBundle] fixed custom domain for translations in php templates 2017-02-03 15:56:44 +01:00
GuillaumeVerdon
3779f3fbb9 [Process] Non ASCII characters disappearing during the escapeshellarg 2017-02-02 14:55:53 +01:00
Nicolas Grekas
3ee1aa0160 minor #21501 [FrameworkBundle][Console] JsonDescriptor: Respect original output (ogizanagi)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle][Console] JsonDescriptor: Respect original output

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

I'm suggesting this one, because I recently pushed some changes to the descriptors, and of course, I'm not editing expected output fixtures by hand, but by dumping the real output to fixture files. But it's tiring to get false positive diffs when reviewing it. Descriptor tests already are painful enough 😅

This PR respects the way elements are actually output. If it's ok to you, I'll submit some other PRs to upper branches, because there are more issues regarding this (items order for instance).

If it causes too much troubles getting this in sync with upper branches, let's close this and never talk about it anymore 😄

Commits
-------

08dd70b [FrameworkBundle][Console] JsonDescriptor: Respect original output
2017-02-02 14:32:11 +01:00
Pascal Hofmann
b46276e9b2 Add HEADER_FORWARDED to setTrustedHeaderName docs 2017-02-02 14:27:35 +01:00
Pavel Batanov
8e6cfa0cef Fix phpDoc typo 2017-02-02 08:03:53 +03:00
Maxime Steinhausser
08dd70b507 [FrameworkBundle][Console] JsonDescriptor: Respect original output 2017-02-01 19:43:31 +01:00
Nicolas Grekas
ee4b3e2712 [Console] Fix too strict test 2017-01-31 16:58:35 +01:00
Rob Frawley 2nd
d5746ecfd2
fix directory resource considers same timestamp not fresh 2017-01-30 13:31:59 -05:00
Josip Kruslin
5cd7931c24 [validator] Updated croatian translation 2017-01-30 08:21:29 -08:00
Christian Flothmann
f19788dd2e ignore invalid cookies expires date format 2017-01-30 15:00:07 +01:00
Rob Frawley 2nd
96107e21f1
return false early from directory resource 2017-01-29 19:05:04 -05:00
Nicolas Grekas
f7ba71db7c bug #21438 [Console] Fix TableCell issues with decoration (ogizanagi)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Fix TableCell issues with decoration

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes (failure unrelated)
| Fixed tickets | #21434
| License       | MIT
| Doc PR        | N/A

Commits
-------

50373f3 [Console] Fix TableCell issues with decoration
2017-01-29 20:56:41 +01:00
Kévin Dunglas
2bc4d3b2c1
[TwigBundle] Fix the name of the cache warming test class 2017-01-28 17:26:00 +01:00
Christian Flothmann
fe4f7eccf7 check for circular refs caused by method calls 2017-01-28 09:01:30 +01:00
Maxime Steinhausser
50373f3530 [Console] Fix TableCell issues with decoration 2017-01-27 20:08:51 +01:00
Fabien Potencier
bc391c130e bug #21431 [DoctrineBridge] always check for all fields to be mapped (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[DoctrineBridge] always check for all fields to be mapped

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

Commits
-------

1e3421d6f0 always check for all fields to be mapped
2017-01-27 07:29:46 -08:00
Christian Flothmann
1e3421d6f0 always check for all fields to be mapped 2017-01-27 10:14:45 +01:00
Christian Flothmann
428814b25d clarify exception when no args are configured 2017-01-26 11:48:39 +01:00
Fabien Potencier
a6d2420f00 bug #21360 [PropertyAccess] Handle interfaces in the invalid argument exception (fancyweb)
This PR was squashed before being merged into the 2.7 branch (closes #21360).

Discussion
----------

[PropertyAccess] Handle interfaces in the invalid argument exception

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

Before :
`Expected argument of type "dule\MenuBundle\Entity\AbstractMenu::setMenuElements() must implement interface Doctrine\Common\Collections\Collection", "array" given`

After :
`Expected argument of type "Doctrine\Common\Collections\Collection", "array" given`

Commits
-------

be52b39031 [PropertyAccess] Handle interfaces in the invalid argument exception
2017-01-25 07:13:56 -08:00
Thomas Calvet
be52b39031 [PropertyAccess] Handle interfaces in the invalid argument exception 2017-01-25 07:13:54 -08:00
Nicolas Grekas
2555f3151d [Debug] Workaround "null" $context 2017-01-25 13:11:45 +01:00
markusu49
81e771ca1a [Serializer] fix upper camel case conversion (see #21399) 2017-01-25 09:09:50 +01:00
Fabien Potencier
dd4e78c96d minor #21379 [Routing] Fix BC break in AnnotationClassLoader defaults attributes handling (chalasr)
This PR was merged into the 2.7 branch.

Discussion
----------

[Routing] Fix BC break in AnnotationClassLoader defaults attributes handling

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | 77289b9023 (commitcomment-20572462)
| License       | MIT
| Doc PR        | n/a

This fixes a BC break introduced in #21333. Instead of removing the automatic request attributes creation, we keep it but only for attributes that are mandatory (i.e. present in the route path).

Thanks to @iltar for the idea.

Commits
-------

1d298f0417 [Routing] Fix BC break in AnnotationClassLoader defaults attributes handling
2017-01-24 08:26:17 -08:00
Fabien Potencier
388be9dc3a minor #21320 Fix ICU dependant tests (jakzal)
This PR was squashed before being merged into the 2.7 branch (closes #21320).

Discussion
----------

Fix ICU dependant tests

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

#20551 changed the condition checking if the ICU version matches the stubbed data. The change intended to enable tests on more ICU versions, but it actually has limited them. I'm still not convinced it should've been done but let's at least fix the condition. Ideal solution would be to have the latest ICU data available on travis (still not there https://github.com/travis-ci/travis-ci/issues/3616).

I also needed to fix several tests.

Currently skipped tests in components depending on ICU data:

|            | 4.8.1.1 | 54.1 | 55.1 | 57.1 |
|---|---|--|--|--|
| Intl       | 488     | 488  | 7    | 6    |
| Locale     | 0       | 0    | 0    | 0    |
| Translation| 0       | 0    | 0    | 0    |
| Validator  | 69      | 69   | 69   | 0    |
| Form       | 75      | 75   | 75   | 1    |

Commits
-------

d3b5d8efdf Fix tests with ICU 57.1
677d820874 Fix the condition checking the minimum ICU version
2017-01-24 07:57:42 -08:00
Nicolas Grekas
83cad14612 [Debug] Remove $context arg from handleError(), preparing for PHP 7.2 2017-01-24 16:28:42 +01:00
Robin Chalas
1d298f0417
[Routing] Fix BC break in AnnotationClassLoader defaults attributes handling 2017-01-23 21:38:04 +01:00
Christian Flothmann
f920e61d35 update German translation 2017-01-22 08:38:04 +01:00
Fabien Potencier
41c72ab909 minor #21335 [Validator] Improved error message for missing upload_tmp_dir (Breuls)
This PR was merged into the 2.7 branch.

Discussion
----------

[Validator] Improved error message for missing upload_tmp_dir

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

I ran into a problem in which the value for upload_tmp_dir was set in php.ini, but PHP was unable to write to the specified location. PHP returns an UPLOAD_ERR_NO_TMP_DIR in $_FILES when it can't find or use the tmp dir, and my application displayed the error for $uploadNoTmpDirErrorMessage, from which I drew the conclusion that the ini setting was missing or emtpy.

This conclusion was based on the wording in the error message, which explicitly states that 'no temporary folder was configured', which is not actually correct. According to the [PHP documentation](http://php.net/manual/en/features.file-upload.errors.php):

> UPLOAD_ERR_NO_TMP_DIR
> Value: 6; Missing a temporary folder. Introduced in PHP 5.0.3.

'Missing' might be interpreted as 'the value for the ini setting is missing', but also as 'the configured folder is missing'.

I thought it might save someone some time if the error message from the Symfony Validator makes this explicit, which is what this PR aims to do.

I also updated the Dutch and Polish translations, because those, in addition to English, are the languages spoken in my team.

Commits
-------

afbf22746a [Validator] Improved error message for missing upload_tmp_dir
2017-01-21 10:14:52 -08:00