Commit Graph

24004 Commits

Author SHA1 Message Date
Fabien Potencier f0849d8331 [TwigBridge] removed deprecations added in Twig 1.27 2016-10-17 18:02:36 -07:00
Fabien Potencier 287713fd6a bug #19478 fixed Filesystem:makePathRelative and added 2 more testcases (muhammedeminakbulut)
This PR was submitted for the 2.8 branch but it was merged into the 2.7 branch instead (closes #19478).

Discussion
----------

fixed Filesystem:makePathRelative and added 2 more testcases

| Q             | A
| ------------- | ---
| Branch?       |2.8
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT
The 2 new test cases where broken on the old code. The old testcases and the new one succeed with the given code.

Commits
-------

cd3206c fixed Filesystem:makePathRelative and added 2 more testcases
2016-10-14 07:26:34 -07:00
Muhammed Akbulut cd3206c5cb fixed Filesystem:makePathRelative and added 2 more testcases 2016-10-14 07:26:34 -07:00
Fabien Potencier 8d218e7f50 bug #20218 [HttpFoundation] no 304 response if method is not cacheable (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] no 304 response if method is not cacheable

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

Since #19321 OPTIONS and TRACE are considered safe methods. But both methods should not lead to "304 Not modified" responses.

Commits
-------

3d6b450 no 304 response if method is not cacheable
2016-10-14 07:10:20 -07:00
Fabien Potencier 7e2f24fc6f bug #20207 [DependencyInjection] move tags from decorated to decorating service (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[DependencyInjection] move tags from decorated to decorating service

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

Commits
-------

7def83c move tags from decorated to decorating service
2016-10-14 07:09:04 -07:00
Christian Flothmann 3d6b4502c8 no 304 response if method is not cacheable 2016-10-14 13:10:27 +02:00
Fabien Potencier f76e77f924 fixed typo 2016-10-13 18:29:00 -07:00
Fabien Potencier 55c3f89ef1 bug #20205 [HttpCache] fix: do not cache OPTIONS request (dmaicher)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpCache] fix: do not cache OPTIONS request

| 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/issues/20202
| License       | MIT
| Doc PR        | -

The HttpCache should not cache any OPTIONS request as they are by spec not cacheable (mentioned here https://github.com/symfony/symfony/issues/20202#issuecomment-253033144 by @xabbuh).

Commits
-------

c43de7f [HttpCache] fix: do not cache OPTIONS request
2016-10-13 18:28:24 -07:00
David Maicher c43de7f21a [HttpCache] fix: do not cache OPTIONS request 2016-10-13 22:14:35 +02:00
Fabien Potencier df138fb636 fixed CS 2016-10-13 07:02:27 -07:00
Fabien Potencier 705a4f7e91 bug #20146 [Validator] Prevent infinite loop in PropertyMetadata (wesleylancel)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #20146).

Discussion
----------

[Validator] Prevent infinite loop in PropertyMetadata

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

This commit fixes a possible infinite loop in PropertyMetadata when the PropertyMetadata class was constructed with an existing property of class and later used (after being serialized and cached) on that same class while that property no longer existing. `get_parent_class` will return false when there is no parent class and `property_existing` will then keeping return false causing the `while` loop to be infinite.

Commits
-------

c1ae7b6 Prevent infinite loop in PropertyMetadata
2016-10-13 07:00:51 -07:00
Wesley Lancel c1ae7b6ad7 Prevent infinite loop in PropertyMetadata 2016-10-13 07:00:50 -07:00
Nicolas Grekas ab6f181cb4 minor #19971 [travis] Test on PHP 7.1 (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[travis] Test on PHP 7.1

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Tests pass?   | let's see
| License       | MIT

PHP 7.1 RC2 has been released today.

Commits
-------

6602e21 [travis] Test on PHP 7.1
2016-10-13 08:03:00 +02:00
Nicolas Grekas 6602e21a9c [travis] Test on PHP 7.1 2016-10-13 07:51:16 +02:00
Christian Flothmann 7def83c0b1 move tags from decorated to decorating service 2016-10-11 23:07:33 +02:00
Fabien Potencier 3f650f864c bug #20184 [FrameworkBundle] Convert null prefix to an empty string in translation:update (chalasr)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] Convert null prefix to an empty string in translation:update

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

This command needs the ability to use an empty string as prefix, which is not possible using `bin/console translation:update --prefix=""` because `$argv` doesn't parse empty strings thus the value is converted to `null` by `ArgvInput` (only since #19946, before the option was not considered to be set, giving the default `'__'` thus this should be fine from a BC pov).

Here I propose to explicitly convert the `prefix` value to an empty string if set to `null`, as it is a very specific need and we can't guess that from `ArgvInput`.
An other way to fix it could be to add a `--no-prefix` option to the command but I don't think it is worth it, and it couldn't be treated as a bug fix thus not fixed before `3.2`.

Commits
-------

f02b687 [FrameworkBundle] Convert null prefix to an empty string in translation:update command
2016-10-09 04:27:22 -07:00
Robin Chalas f02b6876b4
[FrameworkBundle] Convert null prefix to an empty string in translation:update command 2016-10-09 13:14:32 +02:00
Nicolas Grekas 962248dbd9 minor #20169 Minor fixes & cleanups (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

Minor fixes & cleanups

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

dcf601f Minor fixes & cleanups
2016-10-06 10:55:03 +02:00
Nicolas Grekas dcf601f3fa Minor fixes & cleanups 2016-10-06 10:40:01 +02:00
Fabien Potencier a5a91a7fa1 bug #19725 [Security] $attributes can be anything, but RoleVoter assumes strings (Jonatan Männchen)
This PR was merged into the 2.7 branch.

Discussion
----------

[Security] $attributes can be anything, but RoleVoter assumes strings

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | yes
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #18042
| License       | MIT
| Doc PR        | reference to the documentation PR, if any

Commits
-------

ad3ac95 bug #18042 [Security] $attributes can be anything, but RoleVoter assumes strings
2016-10-05 18:42:44 -07:00
Fabien Potencier d040748e16 bug #20127 [HttpFoundation] JSONP callback validation (ro0NL)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #20127).

Discussion
----------

[HttpFoundation] JSONP callback validation

| Q             | A
| ------------- | ---
| Branch?       | "master"
| Bug fix?      | yes
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #17923
| License       | MIT
| Doc PR        | reference to the documentation PR, if any

Maybe this is too small for a new dep, but at least it's stable. Symfony itself will make no assumption on validation by default, ie. things should keep working as usual.

Commits
-------

1159f8b [HttpFoundation] JSONP callback validation
2016-10-05 12:15:52 -07:00
Roland Franssen 1159f8bba6 [HttpFoundation] JSONP callback validation 2016-10-05 12:15:52 -07:00
Fabien Potencier df46bb774a bug #20163 add missing use statement (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

add missing use statement

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

Commits
-------

32451b1 add missing use statement
2016-10-05 10:41:39 -07:00
Fabien Potencier 549bc59136 minor #20159 [Console] Improved the explanation of the hasOption() method (javiereguiluz)
This PR was squashed before being merged into the 2.7 branch (closes #20159).

Discussion
----------

[Console] Improved the explanation of the hasOption() method

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

Commits
-------

29226ef [Console] Improved the explanation of the hasOption() method
2016-10-05 10:26:58 -07:00
Javier Eguiluz 29226ef116 [Console] Improved the explanation of the hasOption() method 2016-10-05 10:26:56 -07:00
Christian Flothmann 32451b1a09 add missing use statement 2016-10-05 18:08:03 +02:00
Fabien Potencier f4fe36a4e1 bug #19961 [Console] Escape question text and default value in SymfonyStyle::ask() (chalasr)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Escape question text and default value in SymfonyStyle::ask()

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

Commits
-------

eed3cc5 [Console] Escape default value and question in SymfonyStyle::ask()
2016-10-04 20:05:49 -07:00
Fabien Potencier 4c854e7329 bug #20141 [Console] Fix validation of empty values using SymfonyQuestionHelper::ask() (chalasr)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Fix validation of empty values using SymfonyQuestionHelper::ask()

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

When using `QuestionHelper::ask()` it's allowed to return an empty value as answer, e.g:

```php
$helper = new QuestionHelper();
$question = new Question('foo', false);
$question->setValidator(function ($v) { return $v; });
$answer = $helper->ask($input, $output, $question);
```

Just typing `enter` for answering this question works, the value of `$answer` would be `false`.
But doing the same with `SymfonyQuestionHelper::ask()`:

```php
$helper = new SymfonyQuestionHelper();
$question = new Question('foo', false);
$question->setValidator(function ($v) { return $v; });
$answer = $helper->ask($input, $output, $question);
```

>  [ERROR] A value is required.

Same for `''` or `null`.
Here I kept the same check but used as default validator, if a validator is set and allows an empty value to be returned then it's ok.

Also I am not sure about if this default validator should be kept, imho we should be consistent with the default question helper, using the `SymfonyQuestionHelper` should only impact the output.

Diff best viewed [like this](https://github.com/symfony/symfony/pull/20141/files?w=1)
ping @kbond

Commits
-------

a8b910b [Console] Fix validation of null values using SymfonyStyle::ask()
2016-10-04 19:49:41 -07:00
Fabien Potencier 21af4f0c11 bug #20147 [FrameworkBundle] Alter container class instead of kernel name in cache:clear command (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] Alter container class instead of kernel name in cache:clear command

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

The decision to alter kernel's name instead of the container's class dates from cc3a40ed78
But this is causing issues such as #19912. Looking more carefully, the real intent is to change the container class and there is no need to alter also the kernel's name at this stage.

Commits
-------

73c9693 [FrameworkBundle] Alter container class instead of kernel name in cache:clear command
2016-10-04 19:28:53 -07:00
Nicolas Grekas 73c96939cd [FrameworkBundle] Alter container class instead of kernel name in cache:clear command 2016-10-04 16:32:03 +02:00
Nicolas Grekas 31a68b8bef minor #20153 [VarDumper] Fix ReflectionNamedType->getName() detection (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[VarDumper] Fix ReflectionNamedType->getName() 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        | -

There is no side effect to this patch, except that __toString were still used, whereas getName should have been (both methods return the same, but __toString is deprecated since 7.1).
I somehow missed that getName was on a new `ReflectionNamedType` class...

Commits
-------

dda18df [VarDumper] Fix ReflectionNamedType->getName() detection
2016-10-04 14:38:45 +02:00
Nicolas Grekas dda18df6de [VarDumper] Fix ReflectionNamedType->getName() detection 2016-10-04 14:01:35 +02:00
Nicolas Grekas f03c95c3c3 minor #20148 [travis] Use hhvm-stable instead of discontinued hhvm-3.12 (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[travis] Use hhvm-stable instead of discontinued hhvm-3.12

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

2ac1586 [travis] Use hhvm-stable instead of discontinued hhvm-3.12
2016-10-04 11:29:48 +02:00
Nicolas Grekas 2ac1586984 [travis] Use hhvm-stable instead of discontinued hhvm-3.12 2016-10-04 11:26:48 +02:00
Robin Chalas a8b910bec2
[Console] Fix validation of null values using SymfonyStyle::ask() 2016-10-04 00:20:32 +02:00
Fabien Potencier 3086fd38e5 bumped Symfony version to 2.7.20 2016-10-03 11:42:03 -07:00
Fabien Potencier 773e6fd660 Merge pull request #20140 from fabpot/release-2.7.19
released v2.7.19
2016-10-03 11:15:58 -07:00
Fabien Potencier 70afffbbff updated VERSION for 2.7.19 2016-10-03 11:15:49 -07:00
Fabien Potencier 2a8cff9d7a update CONTRIBUTORS for 2.7.19 2016-10-03 11:15:46 -07:00
Fabien Potencier 34acc351d3 updated CHANGELOG for 2.7.19 2016-10-03 11:06:05 -07:00
Fabien Potencier 9ed8d576e1 bug #20102 [Validator] Url validator not validating hosts ending in a number (gwkunze)
This PR was squashed before being merged into the 2.7 branch (closes #20102).

Discussion
----------

[Validator] Url validator not validating hosts ending in a number

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no (Should validate slightly more urls)
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | None that I could find
| License       | MIT
| Doc PR        |

We ran into an issue where the URL validator wasn't validating URL that we got from a legitimate (intranet) URL. Afaict from skimming RFCs the URL `http://myhost123/` is valid, however the current regular expression doesn't accept the last part of a hostname (in this case the entire hostname is the last part as there are no periods in the host).

I've fixed this by adding the numbers unicode character property to the regular expression, I'm not sure but symbol characters (`\pS`) might need to be added to the group as well.

Commits
-------

934c434 [Validator] Url validator not validating hosts ending in a number
2016-10-03 09:05:36 -07:00
Gijs Kunze 934c434d33 [Validator] Url validator not validating hosts ending in a number 2016-10-03 09:05:35 -07:00
Fabien Potencier 3902dc59e1 bug #20132 Use "more entropy" option for uniqid() (javiereguiluz)
This PR was squashed before being merged into the 2.7 branch (closes #20132).

Discussion
----------

Use "more entropy" option for uniqid()

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

As you can see in [the source code of the PHP uniqid() function](1c295d4a9a/ext/standard/uniqid.c (L68)) when you don't pass `true` as the second argument, PHP sleeps the application for 1 microsecond (`usleep(1)`)

Symfony uses `true` almost everywhere, but there are still some places (mostly in bundles) where this is not the case.

Commits
-------

4403e28 Use "more entropy" option for uniqid()
2016-10-03 08:22:08 -07:00
Javier Eguiluz 4403e28ab0 Use "more entropy" option for uniqid() 2016-10-03 08:22:03 -07:00
Fabien Potencier 80577f96bf bug #20122 [Validator] Reset constraint options (ro0NL)
This PR was merged into the 2.7 branch.

Discussion
----------

[Validator] Reset constraint options

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #20106
| License       | MIT
| Doc PR        | reference to the documentation PR, if any

I think it's good to reset the internal pointer of the options array if we depend on `key($options)`. I've added tests to clarify we intentionally check for the first key.

The current behavior actually differs for hhvm/php7 - https://3v4l.org/e6r6E

Commits
-------

4c6ddd4 reset constraint options
2016-10-02 08:50:33 -07:00
Roland Franssen 4c6ddd4737 reset constraint options 2016-10-01 21:36:38 +00:00
Fabien Potencier 8bfb8f2368 bug #20116 fixed AddConstraintValidatorsPass config (fabpot)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #20116).

Discussion
----------

fixed AddConstraintValidatorsPass config

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

Commits
-------

996c1ee added checks for public services on compiler passes that use service id and not references
2016-10-01 08:38:16 -07:00
Fabien Potencier 996c1ee3cb added checks for public services on compiler passes that use service id and not references 2016-10-01 08:38:16 -07:00
Fabien Potencier 470dc3e36f [TwigBundle] added missing dependencies for tests 2016-10-01 07:16:30 -07:00
Fabien Potencier e20cd8ae9f fixed CS 2016-09-30 12:35:09 -07:00