Commit Graph

27863 Commits

Author SHA1 Message Date
Iltar van der Berg
fbd73f08dc Fixed a missing legacy groups 2016-10-05 14:10:52 +02:00
Nicolas Grekas
ac3cb6f034 Fix merge 2016-10-05 11:03:40 +02:00
Nicolas Grekas
9a2bc59205 Merge branch '3.1'
* 3.1:
  Fix event annotation for arguments resolving event
  [HttpKernel] Fix nullable types handling
  [FrameworkBundle] Alter container class instead of kernel name in cache:clear command
  [VarDumper] Fix ReflectionNamedType->getName() detection
  [Console] Fix validation of null values using SymfonyStyle::ask()
  [Validator] Add Czech and Slovak translations for BIC
  [Console] Escape default value and question in SymfonyStyle::ask()
2016-10-05 10:12:34 +02:00
Nicolas Grekas
f89789f49b Merge branch '2.8' into 3.1
* 2.8:
  [FrameworkBundle] Alter container class instead of kernel name in cache:clear command
  [VarDumper] Fix ReflectionNamedType->getName() detection
  [Console] Fix validation of null values using SymfonyStyle::ask()
  [Validator] Add Czech and Slovak translations for BIC
  [Console] Escape default value and question in SymfonyStyle::ask()
2016-10-05 10:09:31 +02:00
Nicolas Grekas
ed8ccd1689 Merge branch '2.7' into 2.8
* 2.7:
  [FrameworkBundle] Alter container class instead of kernel name in cache:clear command
  [Console] Fix validation of null values using SymfonyStyle::ask()
  [Console] Escape default value and question in SymfonyStyle::ask()
2016-10-05 10:09:05 +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
cbda41dae9 feature #19991 [TwigBridge] Added access to token from twig AppVariable (HeahDude)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[TwigBridge] Added access to token from twig AppVariable

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

In Symfony 2.x we could access the token from `app.security` but now we can only get the user even if it comes from the token storage.

This makes mandatory to create a custom twig extension to access it and thus harder to update to symfony 3.x when you need this simple getter in a template where custom tokens are involved (e.g using a ConnectToken from SensioLabs Connect API).

I hope this little feature will be part of 3.2 :)

Commits
-------

efd3e2d Added access to token from twig AppVariable
2016-10-04 19:57:15 -07:00
Fabien Potencier
043ccd5efe feature #20029 Hide commands from ApplicationDescriptor, but allow invoking (jwdeitch, Jordan Deitch)
This PR was merged into the 3.2-dev branch.

Discussion
----------

Hide commands from ApplicationDescriptor, but allow invoking

I would like to hide commands from cluttering the descriptors, but still allow their invocation from code or cron.

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | comma-separated list of tickets fixed by the PR, if any
| License       | MIT
| Doc PR        | reference to the documentation PR, if any

Commits
-------

746dab3 casting setPublic() arg to bool
0a3c290 update docblocks and added test
6d87837 Update ApplicationDescription.php
e969581 update hidden to public
3efa874 Update Command.php
dfc1ac8 Update Command.php
cd77139 Update Command.php
56a8b93 Update Command.php
fb1f30c Update Command.php
1993196 Update Command.php
1add2ad Update Command.php
b73f494 Update ApplicationDescription.php
8d0262f Update Command.php
b423ab4 Add hidden field
2016-10-04 19:53:13 -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
5e63ad0f28 feature #20121 Class existence resource (fabpot)
This PR was merged into the 3.2-dev branch.

Discussion
----------

Class existence resource

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

Commits
-------

222b56d [TwigBundle] added support for ClassExistenceResource when relevant
d98eb7b [Config] added ClassExistenceResource
2016-10-04 19:45:44 -07:00
Fabien Potencier
d93a6da703 minor #20131 [Validator] Add Czech and Slovak translations for BIC (hason)
This PR was merged into the 2.8 branch.

Discussion
----------

[Validator] Add Czech and Slovak translations for BIC

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

Commits
-------

af84d23 [Validator] Add Czech and Slovak translations for BIC
2016-10-04 19:37:58 -07:00
Fabien Potencier
63308cd492 minor #20101 Simplified link-to-source mapping definitions in debug.file_link_format (nicolas-grekas)
This PR was merged into the 3.2-dev branch.

Discussion
----------

Simplified link-to-source mapping definitions in debug.file_link_format

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

Having to json_encode here (or any other kind of encoding) is really tedious to deal with: it makes it hard to have things working quickly. `%f` and `%l` aren't encoded anyway, so let's use very unlikely chars as separators here also instead.

Commits
-------

27df38e Simplified link-to-source mapping definitions in debug.file_link_format
2016-10-04 19:32:40 -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
Fabien Potencier
e019f2cba0 bug #20156 Fix event annotation for arguments resolving event (Koc)
This PR was submitted for the master branch but it was merged into the 3.1 branch instead (closes #20156).

Discussion
----------

Fix event annotation for arguments resolving event

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

Commits
-------

384d0ee Fix event annotation for arguments resolving event
2016-10-04 15:51:31 -07:00
Konstantin.Myakshin
384d0eeaf8 Fix event annotation for arguments resolving event 2016-10-04 15:51:31 -07:00
Fabien Potencier
6f8e5b081a bug #20152 [HttpKernel] Fix nullable types handling (nicolas-grekas)
This PR was merged into the 3.1 branch.

Discussion
----------

[HttpKernel] Fix nullable types handling

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

Commits
-------

0884518 [HttpKernel] Fix nullable types handling
2016-10-04 14:38:20 -07:00
Nicolas Grekas
0884518107 [HttpKernel] Fix nullable types handling 2016-10-04 17:41:48 +02: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
4cc51bfb48 Merge branch '2.7' into 2.8
* 2.7:
  [VarDumper] Fix ReflectionNamedType->getName() detection
2016-10-04 14:40:49 +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
3ad5b2918d Merge branch '3.1'
* 3.1:
  [travis] Use hhvm-stable instead of discontinued hhvm-3.12
  bumped Symfony version to 3.1.6
  updated VERSION for 3.1.5
  updated CHANGELOG for 3.1.5
  bumped Symfony version to 2.8.13
  updated VERSION for 2.8.12
  updated CHANGELOG for 2.8.12
  bumped Symfony version to 2.7.20
  updated VERSION for 2.7.19
  update CONTRIBUTORS for 2.7.19
  updated CHANGELOG for 2.7.19
  [Validator] Url validator not validating hosts ending in a number
2016-10-04 11:33:03 +02:00
Nicolas Grekas
810c1e9e4f Merge branch '2.8' into 3.1
* 2.8:
  [travis] Use hhvm-stable instead of discontinued hhvm-3.12
  bumped Symfony version to 2.8.13
  updated VERSION for 2.8.12
  updated CHANGELOG for 2.8.12
  bumped Symfony version to 2.7.20
  updated VERSION for 2.7.19
  update CONTRIBUTORS for 2.7.19
  updated CHANGELOG for 2.7.19
2016-10-04 11:31:46 +02:00
Nicolas Grekas
c7baabf3a6 Merge branch '2.7' into 2.8
* 2.7:
  [travis] Use hhvm-stable instead of discontinued hhvm-3.12
  bumped Symfony version to 2.7.20
  updated VERSION for 2.7.19
  update CONTRIBUTORS for 2.7.19
  updated CHANGELOG for 2.7.19
2016-10-04 11:30:19 +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
Fabien Potencier
222b56d426 [TwigBundle] added support for ClassExistenceResource when relevant 2016-10-03 16:53:52 -07:00
Robin Chalas
a8b910bec2
[Console] Fix validation of null values using SymfonyStyle::ask() 2016-10-04 00:20:32 +02:00
Fabien Potencier
70a620dfca bumped Symfony version to 3.1.6 2016-10-03 12:15:50 -07:00
Fabien Potencier
e7e1d01fe1 Merge pull request #20144 from fabpot/release-3.1.5
released v3.1.5
2016-10-03 12:01:14 -07:00
Fabien Potencier
c0b98bbd3c updated VERSION for 3.1.5 2016-10-03 12:01:06 -07:00
Fabien Potencier
b3c9e50e17 updated CHANGELOG for 3.1.5 2016-10-03 12:00:58 -07:00
Fabien Potencier
7f0ae27521 bumped Symfony version to 2.8.13 2016-10-03 11:59:23 -07:00
Fabien Potencier
6a5bc3257b Merge pull request #20143 from fabpot/release-2.8.12
released v2.8.12
2016-10-03 11:44:12 -07:00
Fabien Potencier
5cd057a938 updated VERSION for 2.8.12 2016-10-03 11:44:05 -07:00
Fabien Potencier
f433c13f3f updated CHANGELOG for 2.8.12 2016-10-03 11:43:58 -07: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
d147e4294c Merge branch '2.8' into 3.1
* 2.8:
  [Validator] Url validator not validating hosts ending in a number
2016-10-03 10:30:23 -07:00
Fabien Potencier
1b943660e1 Merge branch '2.7' into 28
* 2.7:
  [Validator] Url validator not validating hosts ending in a number
2016-10-03 10:30:13 -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
8794617371 Merge branch '3.1'
* 3.1:
  Use "more entropy" option for uniqid()
  reset constraint options
2016-10-03 08:50:21 -07:00
Fabien Potencier
53d2bdee76 Merge branch '2.8' into 3.1
* 2.8:
  Use "more entropy" option for uniqid()
  reset constraint options
  added checks for public services on compiler passes that use service id and not references
2016-10-03 08:50:10 -07:00
Fabien Potencier
fcd401fc9c Merge branch '2.7' into 2.8
* 2.7:
  Use "more entropy" option for uniqid()
  reset constraint options
2016-10-03 08:49:46 -07:00
Fabien Potencier
98bd062b0c feature #20119 [TwigBundle] changed the runtime loader to return null if there is no match (fabpot)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[TwigBundle] changed the runtime loader to return null if there is no match

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

ping @stof

Commits
-------

c03fd80 [TwigBundle] changed the runtime loader to return null if there is no match
2016-10-03 08:47:41 -07:00
Fabien Potencier
8c4ed1b8cf bug #20137 Add "more entropy" to every uniqid() call (javiereguiluz)
This PR was merged into the 3.2-dev branch.

Discussion
----------

Add "more entropy" to every uniqid() call

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

Same as #20132 but for the master branch

Commits
-------

50a8c1f Add "more entropy" to every uniqid() call
2016-10-03 08:26:23 -07:00