Commit Graph

38612 Commits

Author SHA1 Message Date
Fabien Potencier
3d2124e128 feature #28572 Make it clear that the profiler is for dev only (fabpot)
This PR was merged into the 4.2-dev branch.

Discussion
----------

Make it clear that the profiler is for dev only

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | kinda yes
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes (permanent one)
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | symfony/symfony-docs#10386

Commits
-------

54fda55fd9 made it clear that the profiler is for dev only
2018-09-24 13:27:51 +02:00
Fabien Potencier
310870a497 [WebProfilerBundle] added a note in the README 2018-09-24 10:42:32 +02:00
Christian Flothmann
5dadd95dea fix upgrade files 2018-09-24 10:22:53 +02:00
Nicolas Grekas
eb607ae4dc feature #28536 Favor LogicException for missing classes & functions (ro0NL)
This PR was merged into the 4.2-dev branch.

Discussion
----------

Favor LogicException for missing classes & functions

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes-ish
| BC breaks?    | no-ish     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | https://github.com/symfony/symfony/pull/28513#issuecomment-423500822
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - Bug fixes must be submitted against the lowest branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against the master branch.
-->

Commits
-------

c762735075 Favor LogicException for missing classes & functions
2018-09-24 10:16:33 +02:00
Nicolas Grekas
3ad232835d minor #28529 [Yaml] Skip parser test with root user (lbassin)
This PR was squashed before being merged into the 3.4 branch (closes #28529).

Discussion
----------

[Yaml] Skip parser test with root user

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

This PR fix a test failure in YAML 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)

Commits
-------

34429797b3 [Yaml] Skip parser test with root user
2018-09-24 10:15:51 +02:00
Laurent Bassin
34429797b3 [Yaml] Skip parser test with root user 2018-09-24 10:15:45 +02:00
Nicolas Grekas
7c87dc9720 minor #28573 [Filesystem] Skip tests on readable file when run with root user (lbassin)
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
2018-09-24 10:14:14 +02:00
Laurent Bassin
ad500e74ec
[Filesystem] Skip tests on readable file when run with root user 2018-09-24 10:04:37 +02:00
Fabien Potencier
54fda55fd9 made it clear that the profiler is for dev only 2018-09-24 10:00:32 +02:00
Roland Franssen
c762735075 Favor LogicException for missing classes & functions 2018-09-24 09:37:12 +02:00
Fabien Potencier
31f8cb9706 feature #28569 [Form] deprecate precision in IntegerToLocalizedStringTransformer (xabbuh)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Form] deprecate precision in IntegerToLocalizedStringTransformer

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

Commits
-------

65362e0ace deprecate precision in IntegerToLocalizedStringTransformer
2018-09-24 07:57:37 +02:00
Fabien Potencier
792ec82c1a feature #28570 [Form] deprecate the unused scale option (xabbuh)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Form] deprecate the unused scale option

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

Commits
-------

40413aad24 deprecate the unused scale option
2018-09-24 07:52:57 +02:00
Christian Flothmann
65362e0ace deprecate precision in IntegerToLocalizedStringTransformer 2018-09-23 21:23:49 +02:00
Nicolas Grekas
afe0812a53 minor #28567 [FWBundle] Fix an error in WebTestCase::createClient's PHPDoc (dunglas)
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
2018-09-23 21:23:40 +02:00
Christian Flothmann
40413aad24 deprecate the unused scale option 2018-09-23 21:21:47 +02:00
Kévin Dunglas
3033aaf6fb
[FWBundle] Fix an error in WebTestCase::createClient's PHPDoc 2018-09-23 18:44:35 +02:00
Nicolas Grekas
31836ed2ec feature #28566 [VarDumper] add casters for IntlDateFormatter and IntlCalendar (jschaedl)
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
2018-09-23 18:25:33 +02:00
Jan Schädlich
ae76c6824b [VarDumper] add casters for IntlDateFormatter and IntlCalendar 2018-09-23 18:25:21 +02:00
Nicolas Grekas
41eb1914f6 [HttpFoundation][Security] forward locale and format to subrequests 2018-09-23 17:27:53 +02:00
Nicolas Grekas
c53b687f21 feature #28559 [VarDumper] add caster for IntlTimeZone (jschaedl)
This PR was squashed before being merged into the 4.2-dev branch (closes #28559).

Discussion
----------

[VarDumper] add caster for IntlTimeZone

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

c94217c832 [VarDumper] add caster for IntlTimeZone
2018-09-23 16:56:12 +02:00
Jan Schädlich
c94217c832 [VarDumper] add caster for IntlTimeZone 2018-09-23 16:56:03 +02:00
Fabien Potencier
7c08e43b78 feature #28449 [DependencyInjection] improved message when alias service is not found (xabbuh)
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
2018-09-23 14:54:20 +02:00
Fabien Potencier
2fe425b339 bug #28562 [HttpFoundation] fix hidding warnings from session handlers (nicolas-grekas)
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
2018-09-23 14:49:48 +02:00
Robin Chalas
e95ea8132f feature #27434 [Console] Add support for error ouput in the CommandTester (cdekok)
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
2018-09-23 13:45:23 +02:00
Chris de Kok
cec531707f [Console] Add support for error ouput in the CommandTester 2018-09-23 13:34:50 +02:00
Nicolas Grekas
a43f307224 feature #28555 [VarDumper] add caster for NumberFormatter (jschaedl)
This PR was squashed before being merged into the 4.2-dev branch (closes #28555).

Discussion
----------

[VarDumper] add caster for NumberFormatter

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

0bd8a0b0bb [VarDumper] add caster for NumberFormatter
2018-09-23 12:41:31 +02:00
Jan Schädlich
0bd8a0b0bb [VarDumper] add caster for NumberFormatter 2018-09-23 12:41:24 +02:00
Robin Chalas
54bd905cb0 bug #28545 [Console] Send the right exit code to console.terminate listeners (mpdude)
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
2018-09-23 12:04:26 +02:00
Matthias Pigulla
b90a3f12a1 [Console] Send the right exit code to console.terminate listeners 2018-09-23 12:04:15 +02:00
Christian Flothmann
280ecbc2be improved message when alias service is not found
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'
```
2018-09-23 11:10:46 +02:00
Nicolas Grekas
f405b4d5a0 [HttpFoundation] fix hidding warnings from session handlers 2018-09-23 10:13:20 +02:00
Nicolas Grekas
a26bd3673f Merge branch '4.1'
* 4.1:
  [Debug] Fix false-positive "MicroKernelTrait::loadRoutes()" method is considered internal"
  [Console] Fixed boxed table style with colspan
  parse numbers terminated with decimal separator
  fail reverse transforming invalid RFC 3339 dates
2018-09-22 22:55:36 +02:00
Nicolas Grekas
0e47775d62 Merge branch '3.4' into 4.1
* 3.4:
  [Debug] Fix false-positive "MicroKernelTrait::loadRoutes()" method is considered internal"
  [Console] Fixed boxed table style with colspan
  parse numbers terminated with decimal separator
  fail reverse transforming invalid RFC 3339 dates
2018-09-22 21:04:12 +02:00
Nicolas Grekas
9bc774ccf2 bug #28553 [Debug] Fix false-positive "MicroKernelTrait::loadRoutes()" method is considered internal" (nicolas-grekas)
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"
2018-09-22 20:50:47 +02:00
Nicolas Grekas
3e47e9ca59 Merge branch '2.8' into 3.4
* 2.8:
  [Console] Fixed boxed table style with colspan
  parse numbers terminated with decimal separator
  fail reverse transforming invalid RFC 3339 dates
2018-09-22 20:49:52 +02:00
Nicolas Grekas
57a34131c6 bug #28466 [Form] fail reverse transforming invalid RFC 3339 dates (xabbuh)
This PR was merged into the 2.8 branch.

Discussion
----------

[Form] fail reverse transforming invalid RFC 3339 dates

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

Commits
-------

ee4ce43e91 fail reverse transforming invalid RFC 3339 dates
2018-09-22 20:44:32 +02:00
Nicolas Grekas
46c4f71bf0 [Debug] Fix false-positive "MicroKernelTrait::loadRoutes()" method is considered internal" 2018-09-22 20:25:03 +02:00
Fabien Potencier
7ae57225d1 feature #28538 [Lock] Wrap release exception (jderusse)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Lock] Wrap release exception

| 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/27920#discussion_r219112321
| License       | MIT
| Doc PR        | NA

Commits
-------

c37f9e9e32 Wrap release exception
2018-09-22 18:08:30 +02:00
Fabien Potencier
85d335a66a feature #28551 [VarDumper] add caster for MessageFormatter (nicolas-grekas)
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
2018-09-22 17:44:38 +02:00
Nicolas Grekas
aa24e4ce15 [VarDumper] add caster for MessageFormatter 2018-09-22 10:46:58 +02:00
Nicolas Grekas
40b547e122 bug #28540 [Intl] parse numbers terminated with decimal separator (xabbuh)
This PR was merged into the 2.8 branch.

Discussion
----------

[Intl] parse numbers terminated with decimal separator

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

Commits
-------

4225f36b86 parse numbers terminated with decimal separator
2018-09-22 09:42:26 +02:00
Nicolas Grekas
2c8c6f7736 bug #28548 [Console] Fixed boxed table style with colspan (ro0NL)
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
2018-09-22 09:36:09 +02:00
Roland Franssen
a67ff2a2d6 [Console] Fixed boxed table style with colspan 2018-09-21 21:58:02 +02:00
Nicolas Grekas
c51592c574 feature #28329 [Debug] Trigger a deprecation for new parameters not defined in sub classes (GuilhemN)
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
2018-09-21 18:04:38 +02:00
Guilhem Niot
1f5d8b62f7 [Debug] Trigger a deprecation for new parameters not defined in sub classes 2018-09-21 17:50:51 +02:00
Christian Flothmann
4225f36b86 parse numbers terminated with decimal separator 2018-09-21 16:33:46 +02:00
Jérémy Derussé
c37f9e9e32
Wrap release exception 2018-09-21 15:50:12 +02:00
Nicolas Grekas
1fc66ff080 Merge branch '4.1'
* 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
2018-09-21 14:51:02 +02:00
Nicolas Grekas
76cf0ca661 Merge branch '3.4' into 4.1
* 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
2018-09-21 14:49:42 +02:00
Nicolas Grekas
0218507b06 Merge branch '2.8' into 3.4
* 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
2018-09-21 14:47:54 +02:00