Commit Graph

29527 Commits

Author SHA1 Message Date
Fabien Potencier
1c18f34230 updated CHANGELOG for 3.2.7 2017-04-05 05:51:48 -07:00
Grégoire Pineau
861222bdc0 minor #22287 [Workflow] update documentation URL in readme (xabbuh)
This PR was merged into the 3.2 branch.

Discussion
----------

[Workflow] update documentation URL in readme

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

Commits
-------

b878f7e62e [Workflow] update documentation URL in readme
2017-04-05 11:29:30 +02:00
Christian Flothmann
b878f7e62e [Workflow] update documentation URL in readme 2017-04-05 10:00:23 +02:00
Nicolas Grekas
db8231e6d0 bug #22285 [HttpKernel] Fix forward compat with Request::setTrustedProxies() (nicolas-grekas)
This PR was merged into the 3.2 branch.

Discussion
----------

[HttpKernel] Fix forward compat with Request::setTrustedProxies()

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

Should make travis green again.

Commits
-------

6ecec35 [HttpKernel] Fix forward compat with Request::setTrustedProxies()
2017-04-05 08:57:56 +02:00
Nicolas Grekas
6ecec3557e [HttpKernel] Fix forward compat with Request::setTrustedProxies() 2017-04-05 08:52:45 +02:00
Nicolas Grekas
761d452162 fix merge 2017-04-04 21:00:33 +02:00
Nicolas Grekas
aa46df1997 Merge branch '2.8' into 3.2
* 2.8:
  [FrameworkBundle] Update console fixtures after #22217
2017-04-04 20:55:04 +02:00
Nicolas Grekas
200b45eb43 minor #22278 [FrameworkBundle] Update console fixtures after #22217 (ro0NL)
This PR was squashed before being merged into the 2.8 branch (closes #22278).

Discussion
----------

[FrameworkBundle] Update console fixtures after #22217

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | yes (regression from #22217)
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/22217#issuecomment-291497513
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

cc @fabpot

Sorry for the inconvenience :)

Commits
-------

6e1cee6 [FrameworkBundle] Update console fixtures after #22217
2017-04-04 20:51:44 +02:00
Roland Franssen
6e1cee62b9 [FrameworkBundle] Update console fixtures after #22217 2017-04-04 20:50:26 +02:00
Fabien Potencier
ff286d6da9 Merge branch '2.8' into 3.2
* 2.8:
  Allow Upper Case property names
  fix some risky tests
  bumped Symfony version to 2.7.27
  updated VERSION for 2.7.26
  update CONTRIBUTORS for 2.7.26
  updated CHANGELOG for 2.7.26
2017-04-04 08:30:56 -07:00
Fabien Potencier
945fee14db Merge branch '2.7' into 2.8
* 2.7:
  fix some risky tests
  bumped Symfony version to 2.7.27
  updated VERSION for 2.7.26
  update CONTRIBUTORS for 2.7.26
  updated CHANGELOG for 2.7.26
2017-04-04 08:24:26 -07: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
Fabien Potencier
247e797550 bug #22265 Allow Upper Case property names (insekticid)
This PR was submitted for the master branch but it was merged into the 2.8 branch instead (closes #22265).

Discussion
----------

Allow Upper Case property names

ReflectionExtractor::getProperties() returns $id instead of $Id. It is bad naming convention, but is possible

```
class Entity {
    protected $Id;

    public function getId()
    {
        return $this->Id;
    }
}
```

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

https://github.com/api-platform/core/issues/1026

Commits
-------

2fe1631be8 Allow Upper Case property names
2017-04-04 08:07:48 -07:00
insekticid
2fe1631be8 Allow Upper Case property names
ReflectionExtractor::getProperties() returns $id instead of $Id. It is bad naming convention, but is possible

```
class Entity {
    protected $Id;

    public function getId()
    {
        return $this->Id;
    }
}
```

# Conflicts:
#	src/Symfony/Component/PropertyInfo/Tests/Extractors/ReflectionExtractorTest.php
#	src/Symfony/Component/PropertyInfo/Tests/Fixtures/Dummy.php
2017-04-04 08:07:48 -07:00
Christian Flothmann
fffcd247b2 fix some risky tests 2017-04-04 16:55:33 +02:00
Fabien Potencier
6c8bdb782d minor #22270 [Console] Fix render exception test (ro0NL)
This PR was squashed before being merged into the 3.2 branch (closes #22270).

Discussion
----------

[Console] Fix render exception test

| Q             | A
| ------------- | ---
| Branch?       | 3.2 and up
| Bug fix?      | yes (regression from #22188 in master)
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/22217#issuecomment-291437500
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

As pointed out by @chalasr tests are mysteriously broken.. not sure what i missed but this is apparently needed now..

cc @fabpot

Commits
-------

6b71722392 [Console] Fix render exception test
2017-04-04 07:33:43 -07:00
Roland Franssen
6b71722392 [Console] Fix render exception test 2017-04-04 07:33:42 -07:00
Grégoire Pineau
ada8a2948b minor #22271 [Workflow] fix risky tests (xabbuh)
This PR was merged into the 3.2 branch.

Discussion
----------

[Workflow] fix risky tests

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

Commits
-------

4e661e7a73 [Workflow] fix risky tests
2017-04-04 15:01:55 +02:00
Christian Flothmann
4e661e7a73 [Workflow] fix risky tests 2017-04-04 11:54:46 +02:00
Nicolas Grekas
ccbbff2328 Merge branch '2.8' into 3.2
* 2.8:
  [DI] Autowiring and factories are incompatible with each others
  [DI] Don't use auto-registered services to populate type-candidates
  Lighten tests output by removing composer suggestions
  support nullable array or collection
  Complete the injection of the expression in all syntax errors
  CS: Remove invisible chars
  Disable resource tracking if the config component is missing
  [EventDispatcher] Remove unneded count()
  Fix tests expecting a valid date
  Avoid forcing to define the choices_as_values option when using choice_loader
  add expression text to SyntaxError
  [Console] Fix table cell styling
  [Console] Revised exception rendering
  [WebProfilerBundle] Normalize whitespace in exceptions passed in headers
  Disable color support detection for tests
  [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-04-04 09:26:27 +02:00
Fabien Potencier
e580c68899 bumped Symfony version to 2.7.27 2017-04-03 21:47:45 -07:00
Fabien Potencier
103414623c Merge pull request #22263 from fabpot/release-2.7.26
released v2.7.26
2017-04-03 21:32:30 -07:00
Fabien Potencier
4cc567782e updated VERSION for 2.7.26 2017-04-03 21:31:58 -07:00
Fabien Potencier
c06f35e4eb update CONTRIBUTORS for 2.7.26 2017-04-03 21:31:39 -07:00
Fabien Potencier
8cf344b2af updated CHANGELOG for 2.7.26 2017-04-03 21:27:56 -07:00
Fabien Potencier
6b862e85c2 Merge branch '2.7' into 2.8
* 2.7:
  Complete the injection of the expression in all syntax errors
  add expression text to SyntaxError
2017-04-03 16:11:44 -07:00
Fabien Potencier
bad24d3935 bug #22258 [DI] Autowiring and factories are incompatible with each others (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[DI] Autowiring and factories are incompatible with each others

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

9b601633a7 [DI] Autowiring and factories are incompatible with each others
2017-04-03 15:14:48 -07:00
Fabien Potencier
ee10bf2daa bug #22254 [DI] Don't use auto-registered services to populate type-candidates (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[DI] Don't use auto-registered services to populate type-candidates

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no (every bug fix is a bc break, isn't it?)
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #22162, ~~#21658~~
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

Alternative to #22170 and ~~#21665~~.

The core issue fixed here is that auto-registered services should *not* be used as type-candidates.
The culprit is this line:
`$this->populateAvailableType($argumentId, $argumentDefinition);`

Doing so creates a series of wtf-issues (the linked ones), with no simple fixes (the linked PRs are just dealing with the simplest cases, but the real fix would require a reboot of autowiring for every newly discovered types.)

The other changes accommodate for the removal of the population of the `types` property, and fix a few other issues found along the way:
- variadic constructors
- empty strings injection
- tail args removal when they match the existing defaults

Commits
-------

992c677534 [DI] Don't use auto-registered services to populate type-candidates
2017-04-03 15:09:59 -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
Kévin Dunglas
80cea46ff1
bug #22251 [PropertyInfo] Support nullable array or collection (4rthem)
This PR was merged into the 2.8 branch.

Discussion
----------

[PropertyInfo] Support nullable array or collection

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

`@var array|null` was always considered as not nullable in the `PhpDocExtractor`.

Commits
-------

74ee588924 support nullable array or collection
2017-04-03 22:48:36 +02:00
Nicolas Grekas
d49005a651 Merge branch '2.7' into 2.8
* 2.7:
  Lighten tests output by removing composer suggestions
  CS: Remove invisible chars
  Disable resource tracking if the config component is missing
  [EventDispatcher] Remove unneded count()
  Fix tests expecting a valid date
  [Console] Fix table cell styling
  [Console] Revised exception rendering
  [WebProfilerBundle] Normalize whitespace in exceptions passed in headers
  Disable color support detection for tests
  [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-04-03 22:37:06 +02:00
Nicolas Grekas
9b601633a7 [DI] Autowiring and factories are incompatible with each others 2017-04-03 20:09:33 +02:00
Nicolas Grekas
992c677534 [DI] Don't use auto-registered services to populate type-candidates 2017-04-03 20:02:13 +02:00
Nicolas Grekas
85ae039cd0 minor #22249 Lighten tests output by removing composer suggestions (maidmaid)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #22249).

Discussion
----------

Lighten tests output by removing composer suggestions

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

Tests on PHP 7.1 has more that 4'000 output lines. I suggest to remove composer suggestions, to lighten a bit output.

Commits
-------

8c8b181 Lighten tests output by removing composer suggestions
2017-04-03 11:45:50 +02:00
Dany Maillard
8c8b181f06 Lighten tests output by removing composer suggestions 2017-04-03 11:45:38 +02:00
Arthur de Moulins
74ee588924 support nullable array or collection 2017-04-03 11:21:18 +02: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
Nicolas Grekas
c7163e2b89 bug #22240 [DI] Fix fatal error at ContainerBuilder::compile() if config is not installed (chalasr)
This PR was merged into the 2.7 branch.

Discussion
----------

[DI] Fix fatal error at ContainerBuilder::compile() if config is not installed

| 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

Using the DI component independently, running the following code:

```php
(new ContainerBuilder())->compile();
```

gives

> Fatal error: Uncaught Error: Class 'Symfony\Component\Config\Resource\FileResource' not found

Considering that using the container without ever compiling it doesn't really make sense, I think this currently makes the config component an hard requirement. I propose to make it softer as a bug fix, enabling resource tracking by default only if the config component is installed.

Commits
-------

75d5cb1 Disable resource tracking if the config component is missing
2017-04-03 09:46:08 +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
994e90c129 minor #22230 [Form] Avoid forcing to define the choices_as_values option when using choice_loader (stof)
This PR was merged into the 2.8 branch.

Discussion
----------

[Form] Avoid forcing to define the choices_as_values option when using choice_loader

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

When using the choice loader, choices are ignored entirely. Forcing the dev to add the choices_as_values just to avoid the deprecation warning (and then to remove the option again at some point in 3.x due to deprecation) is a bad developer experience.

Commits
-------

fb4d8de5e4 Avoid forcing to define the choices_as_values option when using choice_loader
2017-03-31 14:46:10 +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
Fabien Potencier
adf73aac03 minor #22235 Fix tests expecting a valid date (stof)
This PR was merged into the 2.7 branch.

Discussion
----------

Fix tests expecting a valid date

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

Tests are failing in 2.7 and 2.8 because the day 0 is not considered valid.

Commits
-------

071548090b Fix tests expecting a valid date
2017-03-31 14:41:44 +02:00
Christophe Coevoet
071548090b Fix tests expecting a valid date 2017-03-31 14:26:28 +02:00
Christophe Coevoet
fb4d8de5e4 Avoid forcing to define the choices_as_values option when using choice_loader
When using the choice loader, choices are ignored entirely. Forcing the dev
to add the choices_as_values just to avoid the deprecation warning (and then
to remove the option again at some point in 3.x due to deprecation) is a bad
developer experience.
2017-03-31 10:23:48 +02:00