This PR was merged into the 2.8 branch.
Discussion
----------
[Filesystem] Skip tests on readable file when run with root user
| Q | A
| ------------- | ---
| Branch? | 2.8 <!-- see below -->
| Bug fix? | yes
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #28478 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | - <!-- required for new features -->
This PR fix tests failures in Filesystem Component when running from a php docker container.
By defaut, root user is used to run phpunit. It means permission checking will fail (Root user is always allowed to read files)
Linked to #28529
Commits
-------
ad500e74ec [Filesystem] Skip tests on readable file when run with root user
This PR was merged into the 2.8 branch.
Discussion
----------
[FWBundle] Fix an error in WebTestCase::createClient's PHPDoc
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | no
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Commits
-------
3033aaf6fb [FWBundle] Fix an error in WebTestCase::createClient's PHPDoc
This PR was squashed before being merged into the 4.2-dev branch (closes#28566).
Discussion
----------
[VarDumper] add casters for IntlDateFormatter and IntlCalendar
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28554
| License | MIT
| Doc PR | -
Commits
-------
ae76c6824b [VarDumper] add casters for IntlDateFormatter and IntlCalendar
This PR was merged into the 4.2-dev branch.
Discussion
----------
[DependencyInjection] improved message when alias service is not found
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28413
| License | MIT
| Doc PR |
When using the YAML config format, it can be confusing that you need to
prefix the aliased service id with an `@` character when passing it as
a string, but that you have to omit it when using the `alias` attribute:
```yaml
foo: '@App\Foo'
foo:
alias: 'App\Foo'
```
This commit will enhance the generated error message in cases where the
aliased service id is prefixed with the `@` character in the `alias`
option like this:
```yaml
foo:
alias: '@App\Foo'
```
Commits
-------
280ecbc2be improved message when alias service is not found
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpFoundation] fix hidding warnings from session handlers
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28467
| License | MIT
| Doc PR | -
The current logic is too greedy.
Commits
-------
f405b4d5a0 [HttpFoundation] fix hidding warnings from session handlers
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Console] Add support for error ouput in the CommandTester
Move initialization of the streams to the trait so the `capture_stderr_separately` also works in the CommandTester.
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27422
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Make it possible to test seperate stderr output.
```$tester = new CommandTester($command);
$tester->execute(
array('foo' => 'bar'),
array('capture_stderr_separately' => true)
);
$this->assertEquals('foo', $tester->getErrorOutput());
````
Commits
-------
cec5317 [Console] Add support for error ouput in the CommandTester
This PR was squashed before being merged into the 2.8 branch (closes#28545).
Discussion
----------
[Console] Send the right exit code to console.terminate listeners
| 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 |
When a Console command throws an exception without a status code, `Application::run()` takes care of setting the exit code to `1` when the exception does not provide a code itself.
This happens slightly too late, as `console.terminate` event listeners that are called from within `Application::doRunCommand()` are given the plain exeception code, before this conversion.
The result is that `console.*` event listeners that you might be using to log exit code e. g. for cron jobs will see a `0` code instead of the real value used to terminate the script.
***Todo:***
- [x] Make sure we've got tests covering this, i. e. do not mock out `doRunCommand()`.
Commits
-------
b90a3f1 [Console] Send the right exit code to console.terminate listeners
When using the YAML config format, it can be confusing that you need to
prefix the aliased service id with an `@` character when passing it as
a string, but that you have to omit it when using the `alias` attribute:
```yaml
foo: '@App\Foo'
foo:
alias: 'App\Foo'
```
This commit will enhance the generated error message in cases where the
aliased service id is prefixed with the `@` character in the `alias`
option like this:
```yaml
foo:
alias: '@App\Foo'
```
This PR was merged into the 3.4 branch.
Discussion
----------
[Debug] Fix false-positive "MicroKernelTrait::loadRoutes()" method is considered internal"
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes (fixing and unreleased issue)
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28549
| License | MIT
| Doc PR | -
Introduced in #28411
Just a failing test for now.
Commits
-------
46c4f71bf0 [Debug] Fix false-positive "MicroKernelTrait::loadRoutes()" method is considered internal"
This PR was merged into the 4.2-dev branch.
Discussion
----------
[VarDumper] add caster for MessageFormatter
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
There are more classes in intl that could benefit from having a caster, see
http://php.net/manual/en/book.intl.php
Let's start with MessageFormatter.
PRs welcome for adding more.
Commits
-------
aa24e4ce15 [VarDumper] add caster for MessageFormatter
This PR was merged into the 2.8 branch.
Discussion
----------
[Console] Fixed boxed table style with colspan
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #28532
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Commits
-------
a67ff2a2d6 [Console] Fixed boxed table style with colspan
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Debug] Trigger a deprecation for new parameters not defined in sub classes
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/28316
| License | MIT
| Doc PR | -
I'm not sure the way https://github.com/symfony/symfony/pull/28316 is implemented is the best so here is an alternative.
Instead of counting on a call from the child method, it uses the `DebugClassLoader` and `@param` annotations. If a `@param` annotation is used on a parent but is then not actually implemented in the child class, a deprecation will be thrown.
Example:
```php
class ClassWithAnnotatedParameters
{
/**
* @param string $foo This is a foo parameter.
*/
public function fooMethod(string $foo)
{
}
/**
* @param string $bar parameter not implemented yet
*/
public function barMethod(/** string $bar = null */)
{
}
/**
* @param Quz $quz parameter not implemented yet
*/
public function quzMethod(/** Quz $quz = null */)
{
}
}
```
```php
class SubClassWithAnnotatedParameters extends ClassWithAnnotatedParameters {
public function fooMethod(string $foo) { }
public function barMethod($bar = null) { }
public function quzMethod() { }
}
```
A deprecation will be triggered because ``SubClassWithAnnotatedParameters::quzMethod()`` which doesn't definee `$quz`.
Commits
-------
1f5d8b62f7 [Debug] Trigger a deprecation for new parameters not defined in sub classes
* 4.1:
Fix CS
Allow reuse of Session between requests
[MonologBridge] Re-add option option to ignore empty context and extra data
[Lock] remove useless code
[PhpUnitBridge] fix disabling DeprecationErrorHandler using phpunit.xml file
Provide debug_backtrace with proper args
[DI] fix infinite loop involving self-references in decorated services
forward false label option to nested types
[DI] fix dumping lazy services
forward the invalid_message option in date types
* 3.4:
Fix CS
Allow reuse of Session between requests
[MonologBridge] Re-add option option to ignore empty context and extra data
[Lock] remove useless code
[PhpUnitBridge] fix disabling DeprecationErrorHandler using phpunit.xml file
Provide debug_backtrace with proper args
[DI] fix infinite loop involving self-references in decorated services
forward false label option to nested types
forward the invalid_message option in date types
* 2.8:
Fix CS
Allow reuse of Session between requests
Provide debug_backtrace with proper args
forward false label option to nested types
forward the invalid_message option in date types
This PR was merged into the 4.2-dev branch.
Discussion
----------
Add Zookeeper data store for Lock Component
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | Not applicable
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/10043
This change adds a new feature to the Lock Component to give the capability to store locks in Zookeeper Data Store. The corresponding documentation PR should describe how this works.
The change here also adds a functional test to make sure all the basic functionality of the lock using this data store works.
Requirements for this to work are having a PHP-Zookeeper extension available to use this.
Commits
-------
c72c297dc3 Add new Zookeeper Data Store. Add functional test for Zookeeper Data Store. Modify Store Factory to support initialization of Zookeeper Data Store.
This PR was merged into the 2.8 branch.
Discussion
----------
[HttpFoundation] Allow reuse of Session between requests if ID did not change
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #13450
| License | MIT
| Doc PR | -
I stumbled upon the issue from https://github.com/symfony/symfony/issues/13450 in a more simple case than what was exposed in the issue. From my understanding, the problem arises when the session is used between an access to the session and a functional test request: because the session was accessed (usually using the container directly), the session has started and the following request fails.
This PR checks whether the ID was actually regenerated before throwing (if a setId is called with the same ID, it is the same request context, it shouldn't throw IMO).
Not sure I understood everything correctly though, feel free to fix it for me if needed.
Commits
-------
fd30f4a21d Allow reuse of Session between requests
This PR was squashed before being merged into the 4.2-dev branch (closes#28513).
Discussion
----------
[Validator] add exception when intl component not found
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
<!--
Add some exception when the Intl component is not found but required on some constraints
-->
Commits
-------
b6f29f4721 [Validator] add exception when intl component not found