Commit Graph

25703 Commits

Author SHA1 Message Date
Fabien Potencier
7b7c9b86a1 Merge branch '2.8' into 3.0
* 2.8:
  [Console] SymfonyStyle: Fix alignment/prefixing of multi-line comments
  [Routing] Finish annotation loader taking a class constant as a beginning of a class name
  [Routing] Fix the annotation loader taking a class constant as a beginning of a class name
2016-05-30 08:58:27 +02:00
Fabien Potencier
e617502ba2 Merge branch '2.7' into 2.8
* 2.7:
  [Routing] Finish annotation loader taking a class constant as a beginning of a class name
  [Routing] Fix the annotation loader taking a class constant as a beginning of a class name
2016-05-30 08:57:11 +02:00
Fabien Potencier
00763f6e41 Merge branch '2.3' into 2.7
* 2.3:
  [Routing] Finish annotation loader taking a class constant as a beginning of a class name
  [Routing] Fix the annotation loader taking a class constant as a beginning of a class name
2016-05-30 08:56:59 +02:00
Fabien Potencier
dfc0c815e8 bug #18889 [Console] SymfonyStyle: Fix alignment/prefixing of multi-line comments (chalasr)
This PR was merged into the 2.8 branch.

Discussion
----------

[Console] SymfonyStyle: Fix alignment/prefixing of multi-line comments

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

Pointed in https://github.com/symfony/symfony/issues/18564#issuecomment-210861051.

Very-long-line comment:
```php
SymfonyStyle::comment('Lorem ipsum ...');
```

Before:
![](http://image.prntscr.com/image/9190081d7fd740a89d17a7247dbbb244.png)

After:
![](http://image.prntscr.com/image/109c8c19c1574172bc22199ac90b6dd6.png)

Multi-line comment:
```php
SymfonyStyle::comment(['Lorem ipsum...', 'Lorem ipsum...']);
```

Before:
![](http://image.prntscr.com/image/24228f7e89e647b3a5d66fd83c7216cd.png)

After:
![](http://image.prntscr.com/image/fe9320369fad45acab92564f0e5de344.png)

Commits
-------

1c94fea [Console] SymfonyStyle: Fix alignment/prefixing of multi-line comments
2016-05-30 08:56:30 +02:00
Robin Chalas
1c94fea42f [Console] SymfonyStyle: Fix alignment/prefixing of multi-line comments
CS Fixes

Add tests

Add docblock

Fix side effect on FrameworkBundle tests

Remove useless '\n' from TextDescriptor since comments are block
2016-05-29 20:12:27 +02:00
Fabien Potencier
ab621ee574 bug #18907 [Routing] Fix the annotation loader taking a class constant as a beginning of a class name (jakzal, nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[Routing] Fix the annotation loader taking a class constant as a beginning of a class name

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

Code copy/pasted from ClassMapGenerator.php

Commits
-------

8d4f35d [Routing] Finish annotation loader taking a class constant as a beginning of a class name
43c7f9b [Routing] Fix the annotation loader taking a class constant as a beginning of a class name
2016-05-29 18:07:21 +02:00
Nicolas Grekas
8d4f35d12c [Routing] Finish annotation loader taking a class constant as a beginning of a class name 2016-05-29 12:13:06 +02:00
Nicolas Grekas
0929c7b91c Merge branch '2.8' into 3.0
* 2.8:
  [PropertyAccess] Fix for PHP 7.0.7
2016-05-29 11:50:11 +02:00
Nicolas Grekas
56b5f4196b Merge branch '2.7' into 2.8
* 2.7:
  [PropertyAccess] Fix for PHP 7.0.7
2016-05-29 11:49:47 +02:00
Nicolas Grekas
a350459d70 Merge branch '2.3' into 2.7
* 2.3:
  [PropertyAccess] Fix for PHP 7.0.7

Conflicts:
	src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorCollectionTest.php
	src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php
2016-05-29 11:49:32 +02:00
Nicolas Grekas
b576fe1b85 minor #18906 [PropertyAccess] Fix for PHP 7.0.7 (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[PropertyAccess] Fix for PHP 7.0.7

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

This is what break travis currently.
See https://3v4l.org/r37rY

Commits
-------

a125af7 [PropertyAccess] Fix for PHP 7.0.7
2016-05-29 11:47:26 +02:00
Nicolas Grekas
a125af74f8 [PropertyAccess] Fix for PHP 7.0.7 2016-05-29 11:41:46 +02:00
Fabien Potencier
ee4b4aeedc Merge branch '2.8' into 3.0
* 2.8:
  fixed PHP 5.3 compat in tests
2016-05-26 10:21:30 +02:00
Fabien Potencier
fc32e6a794 Merge branch '2.7' into 2.8
* 2.7:
  fixed PHP 5.3 compat in tests
2016-05-26 10:21:20 +02:00
Fabien Potencier
a842b97087 fixed PHP 5.3 compat in tests 2016-05-26 10:21:12 +02:00
Fabien Potencier
afece71f7c Merge branch '2.8' into 3.0
* 2.8:
  fixed PHP 5.3 compat in tests
2016-05-26 10:07:28 +02:00
Fabien Potencier
1567ce6d9e Merge branch '2.7' int pusto 2.8
* 2.7:
  fixed PHP 5.3 compat in tests
2016-05-26 10:07:20 +02:00
Fabien Potencier
557bc51c5b Merge branch '2.3' into 2.7
* 2.3:
  fixed PHP 5.3 compat in tests
2016-05-26 10:07:14 +02:00
Fabien Potencier
c59a3da606 fixed PHP 5.3 compat in tests 2016-05-26 10:04:58 +02:00
Fabien Potencier
26f2c8718e Merge branch '2.8' into 3.0
* 2.8:
  [Console] SymfonyStyle: Align multi-line/very-long-line blocks
  [Console][DX] Fixed ambiguous error message when using a duplicate option shortcut
  Fix js comment in profiler
2016-05-26 09:56:45 +02:00
Fabien Potencier
e89e1656b9 Merge branch '2.7' into 2.8
* 2.7:
  [Console] SymfonyStyle: Align multi-line/very-long-line blocks
  [Console][DX] Fixed ambiguous error message when using a duplicate option shortcut
  Fix js comment in profiler
2016-05-26 09:56:38 +02:00
Fabien Potencier
13394f81f7 Merge branch '2.3' into 2.7
* 2.3:
  [Console][DX] Fixed ambiguous error message when using a duplicate option shortcut
2016-05-26 09:56:29 +02:00
Fabien Potencier
71863eae1c bug #18879 [Console] SymfonyStyle: Align multi-line/very-long-line blocks (chalasr)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #18879).

Discussion
----------

[Console] SymfonyStyle: Align multi-line/very-long-line blocks

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

This PR makes all lines aligned in multi-line blocks.

Very-long-line block:
```php
SymfonyStyle::warning('Lorem ipsum...');
```

Before:
![before-1](http://image.prntscr.com/image/d8443d3a85924a0182a62bd6d3dc1086.png)
After:
![after-1](http://image.prntscr.com/image/dbbdd275bff140bdad06de336f032ec1.png)

Multi-line block:
```php
SymfonyStyle::success(['Lorem ipsum...', 'Lorem ipsum...', 'Lorem ipsum...']);
```

Before:
![before-2](http://image.prntscr.com/image/6d7c05b4ab3a42f0b0be652527aed7c8.png)
After:
![after-2](http://image.prntscr.com/image/bba017309f4a4dd09e0147d5917cb0ae.png)

Also @javiereguiluz pointed the case of `SymfonyStyle::comment()` in #18564, I needed to make it calling `SymfonyStyle::block()` with ` // ` as prefix to fit the first intention of this one.
So if this one is merged I'll propose the changes for comments in a second PR (out of this scope).

Commits
-------

963fe1d [Console] SymfonyStyle: Align multi-line/very-long-line blocks
2016-05-26 09:53:24 +02:00
Robin Chalas
963fe1d635 [Console] SymfonyStyle: Align multi-line/very-long-line blocks
Remove SymfonyStyle::comment() changes (out of scope)

CS Fixes

Add tests
2016-05-26 09:53:24 +02:00
Fabien Potencier
60e6ccd702 bug #18864 [Console][DX] Fixed ambiguous error message when using a duplicate option shortcut (peterrehm)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #18864).

Discussion
----------

[Console][DX] Fixed ambiguous error message when using a duplicate option shortcut

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

I assume this should be merged into 2.3 as per @stof's comment.

There is a race condition when you run a command which has a duplicate option shortcut. Simply changing the order so that Options are merged before the Arguments solves that race condition.

````php
$this->setName('my:super:command')
->setAliases(['my:super:commandalias'])
->setDescription('Performs some irrelevant work.')
->addOption('survey', 'e', InputOption::VALUE_REQUIRED, 'My option with a shortcut.')
````

Gives the error message:

```
  [Symfony\Component\Console\Exception\LogicException]
  An argument with name "command" already exists.
```

This happens as the first time the definition is merged happens here:

https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Console/Application.php#L820

As this throws an error here:

https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Console/Command/Command.php#L309

The commans are merged but not the options.

Merging it then again when the command is run

https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Console/Command/Command.php#L217

throws an error due to the duplicate argument as the arguments already have been merged. This time the error message is not surpressed and will confuse the user.

Changing the order should fix the issue for duplicate arguments as well as for duplicate options.

Commits
-------

7cb7655 [Console][DX] Fixed ambiguous error message when using a duplicate option shortcut
2016-05-26 09:43:26 +02:00
Peter Rehm
7cb76558ce [Console][DX] Fixed ambiguous error message when using a duplicate option shortcut 2016-05-26 09:43:25 +02:00
Fabien Potencier
5dcbbd0e9c bug #18883 Fix js comment in profiler (linnaea)
This PR was merged into the 2.7 branch.

Discussion
----------

Fix js comment in profiler

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

Single line comment introduced in #18413 causes the toolbar to fail to load with a syntax error.

Commits
-------

91a2f5d Fix js comment in profiler
2016-05-26 09:39:18 +02:00
Linnaea Von Lavia
91a2f5dea1 Fix js comment in profiler 2016-05-26 10:56:28 +08:00
Fabien Potencier
90dcd92691 Merge branch '2.8' into 3.0
* 2.8:
  [Yaml] fix exception contexts
  People - person singularization
  [Yaml] properly handle unindented collections
  [Serializer] Add test for ignored attributes during denormalization
  chomp newlines only at the end of YAML documents
  Fixed server status command when port has been omitted
  Update UPGRADE FROM 2.x to 3.0
  fix removed commands wording in upgrade file
  Catch \Throwable
  Catch \Throwable
  Use levenshtein level for better Bundle matching
  [WebProfilerBundle] Fix CORS ajax security issues
  [DX][DI] Make Autowiring exceptions more future friendly
2016-05-24 12:03:10 +02:00
Fabien Potencier
5cb0ad3f81 Merge branch '2.7' into 2.8
* 2.7:
  [Yaml] fix exception contexts
  People - person singularization
  [Yaml] properly handle unindented collections
  [Serializer] Add test for ignored attributes during denormalization
  chomp newlines only at the end of YAML documents
  Fixed server status command when port has been omitted
  Update UPGRADE FROM 2.x to 3.0
  Catch \Throwable
  Use levenshtein level for better Bundle matching
  [WebProfilerBundle] Fix CORS ajax security issues
2016-05-24 12:00:02 +02:00
Fabien Potencier
eac5868d20 Merge branch '2.3' into 2.7
* 2.3:
  [Yaml] fix exception contexts
  People - person singularization
  [Yaml] properly handle unindented collections
  chomp newlines only at the end of YAML documents
2016-05-24 11:57:18 +02:00
Fabien Potencier
53b7236fa8 bug #18844 [Yaml] fix exception contexts (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[Yaml] fix exception contexts

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

Commits
-------

9bdaba4 [Yaml] fix exception contexts
2016-05-23 14:56:22 +02:00
Christian Flothmann
9bdaba4801 [Yaml] fix exception contexts 2016-05-23 12:02:40 +02:00
Fabien Potencier
7830fa7dbd bug #18840 [Yaml] properly handle unindented collections (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[Yaml] properly handle unindented collections

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

Commits
-------

717e1a9 [Yaml] properly handle unindented collections
2016-05-23 11:02:43 +02:00
Fabien Potencier
eff863b434 bug #18765 Catch \Throwable (fprochazka)
This PR was merged into the 2.8 branch.

Discussion
----------

Catch \Throwable

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

The first commit is based on symfony/symfony#15949
Depends on symfony/symfony#18813, symfony/symfony#18812

----

I'm new to symfony, so I'm not sure where are all the places where it makes sense to actually catch the throwable and where not. I added most places that seemed logical and when I wasn't sure, I added it anyway. I'm hoping you guys (and girls?) can point out the places where the catch should not be added, I'll fix it and then I can create several PR's for the older branches. A lot of this IMHO should go also to 3.0.

Commits
-------

de671f4 Catch \Throwable
2016-05-23 11:00:59 +02:00
Fabien Potencier
f55680b3ab bug #18813 Catch \Throwable (fprochazka)
This PR was merged into the 2.7 branch.

Discussion
----------

Catch \Throwable

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

Related symfony/symfony#18765, symfony/symfony#15949
Depends on symfony/symfony#18812

Commits
-------

103526b Catch \Throwable
2016-05-23 10:58:41 +02:00
Fabien Potencier
fe98cec50e bug #18839 People - person singularization (Keeo)
This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes #18839).

Discussion
----------

People - person singularization

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

Bugfix for version 2.8 - more information [#18824]

Commits
-------

02070f9 People - person singularization
2016-05-23 10:52:54 +02:00
Martin Morávek (moravek.martin)
02070f9fd3 People - person singularization 2016-05-23 10:52:53 +02:00
Fabien Potencier
26b79228a6 bug #18828 [Yaml] chomp newlines only at the end of YAML documents (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[Yaml] chomp newlines only at the end of YAML documents

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

Commits
-------

a4b1fa6 chomp newlines only at the end of YAML documents
2016-05-23 10:48:11 +02:00
Fabien Potencier
d8341421af minor #18836 [Serializer] Add test for ignored attributes during denormalization (dunglas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Serializer] Add test for ignored attributes during denormalization

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

c2f7fed [Serializer] Add test for ignored attributes during denormalization
2016-05-23 10:44:03 +02:00
Christian Flothmann
717e1a9e47 [Yaml] properly handle unindented collections 2016-05-22 18:07:51 +02:00
Kévin Dunglas
c2f7fedfd6 [Serializer] Add test for ignored attributes during denormalization 2016-05-22 13:47:44 +02:00
Christian Flothmann
a4b1fa6694 chomp newlines only at the end of YAML documents 2016-05-21 09:04:04 +02:00
Nicolas Grekas
7d6e9b20ab minor #18818 fix removed commands wording in upgrade file (xabbuh)
This PR was merged into the 2.8 branch.

Discussion
----------

fix removed commands wording in upgrade file

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

Commits
-------

3234ca4 fix removed commands wording in upgrade file
2016-05-20 17:01:42 +02:00
Nicolas Grekas
95bb8bb6c8 bug #18814 Fixed server status command when port has been omitted (peterrehm)
This PR was submitted for the 2.8 branch but it was merged into the 2.7 branch instead (closes #18814).

Discussion
----------

Fixed server status command when port has been omitted

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

Modified the status command to behave exactly as the server:start command. When the port is omitted in the address argument the default port is added from the port option.

Commits
-------

94e4706 Fixed server status command when port has been omitted
2016-05-20 17:00:42 +02:00
Peter Rehm
94e4706609 Fixed server status command when port has been omitted 2016-05-20 17:00:42 +02:00
Nicolas Grekas
4f7c6ceb60 minor #18772 Update UPGRADE FROM 2.x to 3.0 (bradbyu)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #18772).

Discussion
----------

Update UPGRADE FROM 2.x to 3.0

| Q             | A
| ------------- | ---
| Branch?       | "master"
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | deprecated in 2.7 removed in 3.0
| Tests pass?   | yes
| Fixed tickets | none
| License       | MIT
| Doc PR        | http://symfony.com/doc/2.8/reference/forms/types/text.html for starters

You missed the Form max_length option deprecation in several field types (Text, Password, Email, etc...).

Commits
-------

cd66a45 Update UPGRADE FROM 2.x to 3.0
2016-05-20 16:53:18 +02:00
bradbyu
cd66a452c6 Update UPGRADE FROM 2.x to 3.0 2016-05-20 16:53:05 +02:00
Christian Flothmann
3234ca491c fix removed commands wording in upgrade file 2016-05-19 21:50:23 +02:00
Filip Procházka
de671f4cb2 Catch \Throwable 2016-05-19 16:01:30 +02:00