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
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
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
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
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
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
* 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
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
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
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
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
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
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
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
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
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.
This PR was merged into the 2.7 branch.
Discussion
----------
[WebProfilerBundle] Normalize whitespace in exceptions passed in headers
| Q | A
| ------------- | ---
| Branch? | 2.7 upwards
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #22072
| License | MIT
If an exception was thrown with line separators in its message the WebProfiler would cause an exception by passing it through unsanitized into the X-Debug-Error HTTP header. This commit fixes that by replacing all whitespace sequences with a single space in the header.
Commits
-------
d64679014b [WebProfilerBundle] Normalize whitespace in exceptions passed in headers
If an exception was thrown with line separators in its message the
WebProfiler would cause an exception by passing it through unsanitized
into the X-Debug-Error HTTP header. This commit fixes that by replacing
all whitespace sequences with a single space in the header.
This PR was merged into the 2.7 branch.
Discussion
----------
[HttpKernel] Fix test
| 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 | -
Should make 2.7 green again on Travis.
Commits
-------
ba8f46ad23 [HttpKernel] Fix test
This PR was merged into the 2.7 branch.
Discussion
----------
[Console] Escape exception messages in renderException
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #22021
| License | MIT
| Doc PR | n/a
Adding style on exception messages should be prevented, it leads to weird results.
> Allowing formatting in them would be a nightmare, given that Symfony itself applies some formatting when rendering the exception.
Commits
-------
cb1348231a [Console] Escape exception messages
This PR was merged into the 2.7 branch.
Discussion
----------
Fix port usage in server:status command
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
This fixes a bug where running `console server:status -p 8001` won't work because the port is already contained in the default value for `address`.
Commits
-------
dbcfa5c659 Remove port from default host in server:status command
* 2.7:
[Bridge\Doctrine] Fix change breaking doctrine-bundle test suite
[HttpFoundation][bugfix] should always be initialized
MockArraySessionStorage: updated phpdoc for $bags so that IDE autocompletion would work
normalize paths before making them relative
This PR was merged into the 2.7 branch.
Discussion
----------
[Bridge\Doctrine] Fix change breaking doctrine-bundle test suite
| 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 | -
Doctrine Bundle's test suite [is currently broken](https://travis-ci.org/doctrine/DoctrineBundle/jobs/215222182) with `2.8@dev` because the tests expect `addEventListener` to be called with an array as first arg, but #22001 optimized them away as string. Since internally strings are turned back into arrays, let's tweak that change and make Doctrine Bundle green again.
Commits
-------
0577c7b089 [Bridge\Doctrine] Fix change breaking doctrine-bundle test suite
This PR was merged into the 2.7 branch.
Discussion
----------
[Filesystem] normalize paths before making them relative
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #22083
| License | MIT
| Doc PR |
Commits
-------
d50ffa1de7 normalize paths before making them relative
This PR was merged into the 2.7 branch.
Discussion
----------
[HttpFoundation][DX] MockArraySessionStorage: phpdocs update
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Commits
-------
967f7a7add MockArraySessionStorage: updated phpdoc for $bags so that IDE autocompletion would work
This PR was squashed before being merged into the 2.7 branch (closes#22138).
Discussion
----------
[HttpFoundation][bugfix] $bags should always be initialized
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #21990
| License | MIT
Commits
-------
d984c73e66 [HttpFoundation][bugfix] should always be initialized