Commit Graph

23492 Commits

Author SHA1 Message Date
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
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
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
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
Filip Procházka
103526b40f Catch \Throwable 2016-05-19 15:58:47 +02:00
Fabien Potencier
2731787e8b bug #18799 Use levenshtein level for better Bundle matching (j0k3r)
This PR was merged into the 2.7 branch.

Discussion
----------

Use levenshtein level for better Bundle matching

| 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've targetted 2.7 branch since this was introduced in the 2.6 version but the 2.6 isn't maintain anymore._

**TL;DR:** I found unused code in bad bundle exception when Symfony try to find the best bundle to fix the typo. Should we remove that code (and got a potential lower matching bundle name) or keep it and make it work?

-----

I've noticed that a part of the code wasn't used when determining which bundle typo was written on _bad bundle exception_, from https://github.com/symfony/symfony/pull/11210.

```php
$alternative = null;
$shortest = null;
foreach ($bundleNames as $bundleName) {
    // if there's a partial match, return it immediately
    if (false !== strpos($bundleName, $nonExistentBundleName)) {
        return $bundleName;
    }

    $lev = levenshtein($nonExistentBundleName, $bundleName);
    if ($lev <= strlen($nonExistentBundleName) / 3 && ($alternative === null || $lev < $shortest)) {
        $alternative = $bundleName;
    }
}
```

In this snippet, the `$shortest` wasn't update in the `foreach`. Reading the code, I guess it was supposed to add an even better accuracy when multiple bundle matche the typo'd bundle name.

Which mean when an alternative is found, we have to assign the level `$lev` from that match to `$shortest`.

```php
if ($lev <= strlen($nonExistentBundleName) / 3 && ($alternative === null || $lev < $shortest)) {
    $alternative = $bundleName;
    $shortest = $lev;
}
```

Let say you have these bundles: `FoooooBundle` and `FooBundle` and you request the bundle `FoodBundle`.

- Without `$shortest` updated, you'll got a suggestion with `FoooooBundle` (first matching bundle found)
- With `$shortest` upadted, you'll got a suggestion with `FooBundle` (because it has a better level than `FoooooBundle`)

This isn't a _bug fix_ since this is only supposed to help developper but not the final user.

**Question is**: should we keep that level comparison or just remove it?

Commits
-------

ac7f74e Use levenshtein level for better Bundle matching
2016-05-17 20:42:59 +02:00
Jeremy Benoist
ac7f74ecca Use levenshtein level for better Bundle matching 2016-05-17 15:13:00 +02:00
Fabien Potencier
20d694e6ec bug #18413 [2.7][WebProfilerBundle] Fix CORS ajax security issues (romainneutron)
This PR was merged into the 2.7 branch.

Discussion
----------

[2.7][WebProfilerBundle] Fix CORS ajax security issues

| 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

The WebProfiler toolbar monitors ajax requests. However, when using cross domain ajax requests, it triggers a security issues `Refused to get unsafe header "X-Debug-Token"` `Refused to get unsafe header "X-Debug-Token-Link"` because if the other app is not a Symfony App configured to expose these headers in CORS.

![image](https://cloud.githubusercontent.com/assets/137574/14225799/f462c09c-f8cf-11e5-925d-88be99945a92.png)

This fixes the issue. It adds a new configuration node to explicitly activate it on purpose.

Commits
-------

f8dd87d [WebProfilerBundle] Fix CORS ajax security issues
2016-05-17 14:55:53 +02:00
Romain Neutron
f8dd87d7cc [WebProfilerBundle] Fix CORS ajax security issues 2016-05-16 18:19:08 +02:00
Fabien Potencier
66da91d030 Merge branch '2.3' into 2.7
* 2.3:
  Fix computation of PR diffs for component matrix lines
2016-05-13 13:02:46 -05:00
Fabien Potencier
76223b2dd6 minor #18775 Fix computation of PR diffs for component matrix lines (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

Fix computation of PR diffs for component matrix lines

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

Validated on https://travis-ci.org/symfony/symfony/jobs/130061271 who fails otherwise.

Commits
-------

e7a3ae7 Fix computation of PR diffs for component matrix lines
2016-05-13 13:00:07 -05:00
Nicolas Grekas
e7a3ae7103 Fix computation of PR diffs for component matrix lines 2016-05-13 12:34:26 -05:00
Fabien Potencier
dd33721f05 bug #18507 [BUG] Delete class 'control-group' in bootstrap 3 (Philippe Degeeter)
This PR was submitted for the 3.0 branch but it was merged into the 2.7 branch instead (closes #18507).

Discussion
----------

[BUG] Delete class 'control-group' in bootstrap 3

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

Commits
-------

99f61d6 [BUG] Delete class 'control-group' in bootstrap 3
2016-05-13 10:45:44 -05:00
Philippe Degeeter
99f61d6df3 [BUG] Delete class 'control-group' in bootstrap 3 2016-05-13 10:45:43 -05:00
Fabien Potencier
0753bd70ae bug #18747 [2.8] [Form] Modified iterator_to_array's 2nd parameter to false in ViolationMapper (issei-m)
This PR was submitted for the 2.8 branch but it was merged into the 2.7 branch instead (closes #18747).

Discussion
----------

[2.8] [Form] Modified iterator_to_array's 2nd parameter to false in ViolationMapper

| 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

This bug was introduced in PR #17099. So does not represent in 2.8.2 or older.

If we have the following structure form:

```php
$builder = $formFactory->createBuilder();

$form = $builder
    ->add(
        $builder->create('person1_name', FormType::class, ['inherit_data' => true])
            ->add('first', TextType::class, ['property_path' => '[person1_first_name]'])
            ->add('last', TextType::class, ['property_path' => '[person1_last_name]'])
    )
    ->add(
        $builder->create('person2_name', FormType::class, ['inherit_data' => true])
            ->add('first', TextType::class, ['property_path' => '[person2_first_name]'])
            ->add('last', TextType::class, ['property_path' => '[person2_last_name]'])
    )
    ->getForm()
;
```

The following mapping for this form doesn't work correctly:

```php
$mapper = new ViolationMapper();
$mapper->mapViolation(new ConstraintViolation('', '', [], null, 'data[person1_first_name]', null), $form);

$form['person1_name']['first']->getErrors(); // empty
$form->getErrors(); // The violation is mapped to here instead.
```

## Cause

Because ViolationMapper uses `iterator_to_array` in [here](f29d46f29b/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationMapper.php (L165)) to collect the sub forms.

`person1_name` and `person2_name` enable `inherit_data` option. So ViolationMapper will attempt to collect the sub forms of root form like this:

```php
[
    'first' => Form object, // root.person1_name.first
    'last'  => Form object, // root.person1_name.last
    'first' => Form object, // root.person2_name.first
    'last'  => Form object, // root.person2_name.last
]
```

As you can see, The name `first` and `last` are used in two places, thus we cannot get result like that.
(first/last of person1_name are overwritten by person2_name's)

So the violation will finally lost the form where it should map to. It should pass `false` to `iterator_to_array`'s 2nd parameter.

Commits
-------

ae38660 [2.8] [Form] Modified iterator_to_array's 2nd parameter to false in ViolationMapper
2016-05-13 10:41:05 -05:00
Issei.M
ae38660fde [2.8] [Form] Modified iterator_to_array's 2nd parameter to false in ViolationMapper 2016-05-13 10:41:04 -05:00
Fabien Potencier
4a065b44dd added missing constant in Response 2016-05-13 10:31:27 -05:00
Fabien Potencier
58f8f5174f Merge branch '2.3' into 2.7
* 2.3:
  Update HTTP statuses list
  [Console][#18619] Prevent fatal error when calling Command#getHelper() without helperSet
  Add SplFileInfo array doc on Finder iterator methods so that IDE will know what it returns
  [2.3] [Form] Modified iterator_to_array's 2nd parameter to false in ViolationMapper
  Updated the link to the list of currency codes
2016-05-13 10:28:37 -05:00
Fabien Potencier
c02eee0664 minor #18650 Update HTTP statuses list (dasmfm)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #18650).

Discussion
----------

Update HTTP statuses list

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

Commits
-------

fa99fbd Update HTTP statuses list
2016-05-13 10:22:51 -05:00
dasmfm
fa99fbd7cf Update HTTP statuses list 2016-05-13 10:22:39 -05:00
Fabien Potencier
f999e77202 bug #18635 [Console] Prevent fatal error when calling Command::getHelper without helperSet (chalasr)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #18635).

Discussion
----------

[Console] Prevent fatal error when calling Command::getHelper without helperSet

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

Patch attached to #18619

Commits
-------

31285c2 [Console][#18619] Prevent fatal error when calling Command#getHelper() without helperSet
2016-05-13 10:18:57 -05:00
Robin Chalas
31285c22fa [Console][#18619] Prevent fatal error when calling Command#getHelper() without helperSet
Use Command::setHelperSet rather than Command#setHelperSet in exception msg

Simplify exception message

Add DidYouForget to exception msg
2016-05-13 10:18:46 -05:00
Fabien Potencier
8648fe2ed3 bug #18686 [console][table] adjust width of colspanned cell. (aitboudad)
This PR was merged into the 2.7 branch.

Discussion
----------

[console][table] adjust width of colspanned cell.

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

Commits
-------

9b35449 [console][table] adjust width of colspanned cell.
2016-05-13 10:09:02 -05:00
Fabien Potencier
921f615a43 minor #18708 [Asset] added a test for StaticVerionStrategy (danionut90)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #18708).

Discussion
----------

[Asset] added a test for StaticVerionStrategy

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

80300f5 added StaticVerionStrategyTest
2016-05-13 10:01:47 -05:00
danionut90
80300f52d4 added StaticVerionStrategyTest 2016-05-13 10:01:47 -05:00
Fabien Potencier
93938be691 minor #18719 Add SplFileInfo array doc on Finder iterator methods so that IDE will known it (Haehnchen)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #18719).

Discussion
----------

Add SplFileInfo array doc on Finder iterator methods so that IDE will known it

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

Add support for IDE completion of Finder iterator in userland

see #16965, http://stackoverflow.com/questions/37034643/autocomplete-doesnt-work-on-symfonys-splfileinfofinder-method-in-foreach/37055206

Examples:
```php
$finder->size()->in()[0]->getContents();
foreach ($finder->size()->in() as $file) {
    $file->getContents();
}
```

Commits
-------

94b9e44 Add SplFileInfo array doc on Finder iterator methods so that IDE will know what it returns
2016-05-13 09:58:35 -05:00
Daniel Espendiller
94b9e44993 Add SplFileInfo array doc on Finder iterator methods so that IDE will know what it returns 2016-05-13 09:58:35 -05:00
Fabien Potencier
f8f624b0d5 bug #18761 [2.3] [Form] Modified iterator_to_array's 2nd parameter to false in ViolationMapper (issei-m)
This PR was squashed before being merged into the 2.3 branch (closes #18761).

Discussion
----------

[2.3] [Form] Modified iterator_to_array's 2nd parameter to false in ViolationMapper

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

For https://github.com/symfony/symfony/pull/18747

Commits
-------

7101cab [2.3] [Form] Modified iterator_to_array's 2nd parameter to false in ViolationMapper
2016-05-13 09:43:54 -05:00
Issei.M
7101cab29f [2.3] [Form] Modified iterator_to_array's 2nd parameter to false in ViolationMapper 2016-05-13 09:43:53 -05:00
Christophe Coevoet
d9d8ea8910 minor #18770 Updated the link to the list of currency codes (javiereguiluz)
This PR was merged into the 2.3 branch.

Discussion
----------

Updated the link to the list of currency codes

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

Commits
-------

09b70a1 Updated the link to the list of currency codes
2016-05-13 10:26:22 +02:00
Javier Eguiluz
09b70a1df4 Updated the link to the list of currency codes 2016-05-13 09:29:13 +02:00
Nicolas Grekas
215c891310 Merge branch '2.3' into 2.7
* 2.3:
  Drop hirak/prestissimo
  bumped Symfony version to 2.3.42
  updated VERSION for 2.3.41
  update CONTRIBUTORS for 2.3.41
  updated CHANGELOG for 2.3.41

Conflicts:
	appveyor.yml
	src/Symfony/Component/HttpKernel/Kernel.php
2016-05-12 10:18:46 -05:00
Nicolas Grekas
b3da5df715 minor #18757 Drop hirak/prestissimo (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

Drop hirak/prestissimo

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

unstable (see #18743 on appveyor)

Commits
-------

8f136ab Drop hirak/prestissimo
2016-05-12 10:16:26 -05:00
Nicolas Grekas
8f136ab665 Drop hirak/prestissimo 2016-05-12 07:44:15 -05:00
Fabien Potencier
7e59c71d9a bug #18737 [Debug] Fix fatal error handlers on PHP 7 (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Debug] Fix fatal error handlers on PHP 7

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

Currently, fatal error handlers are broken on PHP 7.

Commits
-------

c7d3b45 [Debug] Fix fatal error handlers on PHP 7
2016-05-10 11:50:18 -05:00
Fabien Potencier
ebdff4686d bumped Symfony version to 2.7.14 2016-05-09 16:42:27 -05:00