Commit Graph

26599 Commits

Author SHA1 Message Date
Ener-Getick
d17c1a9734 [DependencyInjection] Sort the CompilerPass by priority 2016-06-21 21:44:32 +02:00
Nicolas Grekas
fce02990f2 bug #19129 Avoid phpunit 5.4 warnings on getMock (master) (iltar)
This PR was merged into the 3.2-dev branch.

Discussion
----------

Avoid phpunit 5.4 warnings on getMock (master)

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

Avoids calling `getMock()` in phpunit 5.4 which will trigger a warning (and thus failing test suite) when used by developers as this TestCase is an extension point.

_in the other branches (opposed to #19128), this was not in the `Test` namespace yet but in `Tests`. Therefore I've only added this in the master as changed by @WouterJ in e938361cf71f78ae5affd454debfca24c31a3cd7._

Commits
-------

eb8c27e Avoid phpunit 5.4 warnings on getMock
2016-06-21 15:40:34 +02:00
Iltar van der Berg
eb8c27e882 Avoid phpunit 5.4 warnings on getMock 2016-06-21 10:07:44 +02:00
Fabien Potencier
26eca5d8c9 bug #19126 [PhpUnitBridge] use call_user_func() for PHP 5.3 compatibility (xabbuh)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[PhpUnitBridge] use call_user_func() for PHP 5.3 compatibility

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

Not all callables can be called directly on PHP 5.3 (for example, `array('className', 'methodName')` does not work).

Commits
-------

8549e05 use call_user_func() for PHP 5.3 compatibility
2016-06-21 09:23:35 +02:00
Christian Flothmann
8549e05755 use call_user_func() for PHP 5.3 compatibility
Not all callables can be called directly on PHP 5.3 (for example,
`array('className', 'methodName')` does not work).
2016-06-21 09:14:25 +02:00
Fabien Potencier
a41f359e51 fixed CS 2016-06-21 08:43:40 +02:00
Fabien Potencier
0691506b1b Merge branch '3.1'
* 3.1:
  fixed CS
  fixed CS
  fixed CS
  fixed CS
  tweaked default CS fixer config
  [HttpKernel] Dont close the output stream in debug
  move HttpKernel component to require section
  Fixed oci and sqlsrv merge queries when emulation is disabled - fixes #17284
  [Session] fix PDO transaction aborted under PostgreSQL
  [Console] Use InputInterface inherited doc as possible
  Mention generating absolute urls in UPGRADE files and CHANGELOG
  parse embedded mappings only if value is a string
  add docblock type elements to support newly added IteratorAggregate::getIterator PhpStorm support
  FormBuilderInterface: fix getForm() return type.
  [YAML] Fixed parsing problem with nested DateTime lists
  Fixed typo in PHPDoc
2016-06-21 08:41:01 +02:00
Fabien Potencier
04f265911e minor #19124 fixed CS (fabpot)
This PR was merged into the 3.1 branch.

Discussion
----------

fixed CS

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

I submit this one to check that everyone is ok to NOT mix short array notations with long array notations in Symfony even in 3.x. Consistency is better IMHO.

Commits
-------

a39afd0 fixed CS
2016-06-21 08:39:33 +02:00
Fabien Potencier
a4ce063029 Revert "feature #18977 [PropertyAccess] Add missing arguments to PropertyAccess::createPropertyAccessor() (chalasr)"
This reverts commit 86eb7a3339, reversing
changes made to 856c9f6024.
2016-06-21 08:31:10 +02:00
Fabien Potencier
f2ee67feae Revert "minor #19030 [PropertyAccess] add missing argument PHPdoc (xabbuh)"
This reverts commit 3844fb982f, reversing
changes made to e188cd75b5.
2016-06-21 08:31:05 +02:00
Fabien Potencier
a39afd001f fixed CS 2016-06-21 08:06:14 +02:00
Fabien Potencier
9cbec2c4fa Merge branch '3.0' into 3.1
* 3.0:
  fixed CS
  fixed CS
  fixed CS
  tweaked default CS fixer config
  [HttpKernel] Dont close the output stream in debug
  move HttpKernel component to require section
  Fixed oci and sqlsrv merge queries when emulation is disabled - fixes #17284
  [Session] fix PDO transaction aborted under PostgreSQL
  [Console] Use InputInterface inherited doc as possible
  Mention generating absolute urls in UPGRADE files and CHANGELOG
  add docblock type elements to support newly added IteratorAggregate::getIterator PhpStorm support
  FormBuilderInterface: fix getForm() return type.
  Fixed typo in PHPDoc
2016-06-21 07:59:09 +02:00
Fabien Potencier
be0b8f088f fixed CS 2016-06-21 07:58:59 +02:00
Fabien Potencier
9800cdd8f4 Merge branch '2.8' into 3.0
* 2.8:
  fixed CS
  fixed CS
  tweaked default CS fixer config
  [HttpKernel] Dont close the output stream in debug
  move HttpKernel component to require section
  Fixed oci and sqlsrv merge queries when emulation is disabled - fixes #17284
  [Session] fix PDO transaction aborted under PostgreSQL
  [Console] Use InputInterface inherited doc as possible
  Mention generating absolute urls in UPGRADE files and CHANGELOG
  add docblock type elements to support newly added IteratorAggregate::getIterator PhpStorm support
  FormBuilderInterface: fix getForm() return type.
  Fixed typo in PHPDoc
2016-06-21 07:48:46 +02:00
Fabien Potencier
90151ef5c5 fixed CS 2016-06-21 07:43:49 +02:00
Fabien Potencier
548f3d0339 Merge branch '2.7' into 2.8
* 2.7:
  fixed CS
  tweaked default CS fixer config
  [HttpKernel] Dont close the output stream in debug
  move HttpKernel component to require section
  Fixed oci and sqlsrv merge queries when emulation is disabled - fixes #17284
  [Session] fix PDO transaction aborted under PostgreSQL
  [Console] Use InputInterface inherited doc as possible
  add docblock type elements to support newly added IteratorAggregate::getIterator PhpStorm support
  FormBuilderInterface: fix getForm() return type.
  Fixed typo in PHPDoc
2016-06-21 07:36:02 +02:00
Fabien Potencier
0854c121c9 minor #19121 Php cs fixer (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

Php cs fixer

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

Commits
-------

7cc3ca5 fixed CS
fdef804 tweaked default CS fixer config
2016-06-21 07:29:01 +02:00
Fabien Potencier
7cc3ca59d0 fixed CS 2016-06-20 18:47:20 +02:00
Fabien Potencier
fdef8041f8 tweaked default CS fixer config 2016-06-20 18:47:15 +02:00
Fabien Potencier
8868e0e1df minor #19116 [Debug] fix resource type test on HHVM (xabbuh)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[Debug] fix resource type test on HHVM

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

Commits
-------

2d03ee8 [Debug] fix resource type test on HHVM
2016-06-20 18:09:00 +02:00
Christian Flothmann
2d03ee807f [Debug] fix resource type test on HHVM 2016-06-20 17:51:36 +02:00
Fabien Potencier
a0cdcb0ffb bug #19114 [HttpKernel] Dont close the reponse stream in debug (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpKernel] Dont close the reponse stream in debug

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

Because it's `terminate`'s job to clean the state, not the `Response`'s,
and because the current behavior prevents getting any output on trailing errors on FPM especially.

Commits
-------

2fbc200 [HttpKernel] Dont close the output stream in debug
2016-06-20 13:19:36 +02:00
Fabien Potencier
693a832892 feature #19090 [Console] Add ConsoleLogger::hasErrored() (nicolas-grekas)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[Console] Add ConsoleLogger::hasErrored()

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

So that it's easy to `exit(1)` whenever any messages have been logged at error levels.

Commits
-------

cfc578a [Console] Add ConsoleLogger::hasErrored()
2016-06-20 13:17:38 +02:00
Fabien Potencier
84d31fa50d minor #19115 [FrameworkBundle] fix argument type docblock (xabbuh)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[FrameworkBundle] fix argument type docblock

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/18502#discussion_r67659523
| License       | MIT
| Doc PR        |

Commits
-------

c4e440c [FrameworkBundle] fix argument type docblock
2016-06-20 13:05:28 +02:00
Christian Flothmann
c4e440c73e [FrameworkBundle] fix argument type docblock 2016-06-20 12:19:51 +02:00
Nicolas Grekas
2fbc2008e5 [HttpKernel] Dont close the output stream in debug 2016-06-20 10:21:56 +02:00
Fabien Potencier
9c8a3e9563 minor #19113 [MonologBridge] move HttpKernel component to require section (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[MonologBridge] move HttpKernel component to require section

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

Nearly every class from the bridge has (directly or indirectly) a dependency on a class from the HttpKernel component. Thus, it for me doesn't make sense to treat it as an optional dependency.

Commits
-------

138d0cb move HttpKernel component to require section
2016-06-20 10:17:43 +02:00
Christian Flothmann
138d0cb493 move HttpKernel component to require section 2016-06-20 09:57:16 +02:00
Fabien Potencier
92d80c93b3 minor #19111 [Console] simplified tests (fabpot)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[Console] simplified tests

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

Commits
-------

85e5060 [Console] simplified tests
2016-06-20 08:56:47 +02:00
Fabien Potencier
85e5060fa1 [Console] simplified tests 2016-06-20 08:34:10 +02:00
Fabien Potencier
88cf87ea64 minor #19097 [Console] Test SymfonyStyle::ask() output (chalasr)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[Console] Test SymfonyStyle::ask() output

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

Now that we can test an interactive command that uses SymfonyStyle (after #18999), we should test their output.

Commits
-------

e870758 [Console] Test SymfonyStyle::ask() output
2016-06-20 06:58:14 +02:00
Fabien Potencier
9df08fac89 bug #19101 [Session] fix PDO transaction aborted under PostgreSQL (Tobion)
This PR was merged into the 2.7 branch.

Discussion
----------

[Session] fix PDO transaction aborted under PostgreSQL

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

Fixes the transactional concurrency error handling for PostgreSQL which does not allow to execute further queries in a transaction with an error.
Because of the loop, look at the diff with whitespace ignored to see the difference: https://github.com/symfony/symfony/pull/19101/files?w=1

Commits
-------

f8eefa0 [Session] fix PDO transaction aborted under PostgreSQL
2016-06-19 14:22:58 +02:00
Fabien Potencier
414a4b4233 feature #19079 [Debug] Do not quote numbers in stack trace (c960657)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[Debug] Do not quote numbers in stack trace

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

In the debug output from the exception handler, integers and floats are quoted. This adds unnecessary noise to the error page and is just wrong.

Fixing this requires introduces two new type descriptions in the output from getTrace(), so the change is not fully backwards compatible.

Commits
-------

fb10b33 [Debug] Do not quote numbers in stack trace
2016-06-19 12:27:18 +02:00
Fabien Potencier
6a8a113fb9 bug #18501 [HttpFoundation] changed MERGE queries (hjkl)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] changed MERGE queries

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

Changed the MERGE queries for Oracle and SQL Server to use question mark parameter markers so they work with emulation disabled or enabled - fixes #17284

Commits
-------

ebf3a2f Fixed oci and sqlsrv merge queries when emulation is disabled - fixes #17284
2016-06-19 12:25:18 +02:00
Fabien Potencier
41fd5a1f7d minor #19094 [Console] Use InputInterface inherited doc as possible (chalasr)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Use InputInterface inherited doc as possible

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

In classes implementing `InputInterface`, the methods doc blocks are duplicated from the interface.
Sometimes descriptions are different from the interface's ones and, sometimes, the class doc is clearer. So I tried to keep always the most adapted one.

Commits
-------

b604be7 [Console] Use InputInterface inherited doc as possible
2016-06-19 12:24:22 +02:00
Christian Schmidt
fb10b33e8e [Debug] Do not quote numbers in stack trace 2016-06-18 22:40:40 +02:00
Tobias Schultze
7eab67fbb5 minor #19085 FormBuilderInterface: fix getForm() return type. (taueres)
This PR was merged into the 2.7 branch.

Discussion
----------

FormBuilderInterface: fix getForm() return type.

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

FormBuilderInterface->getForm() should depend on abstractions and
not implementations as a return type.

Commits
-------

3fa081c FormBuilderInterface: fix getForm() return type.
2016-06-18 22:20:36 +02:00
hjkl
ebf3a2ffc8 Fixed oci and sqlsrv merge queries when emulation is disabled - fixes #17284 2016-06-18 20:15:19 +01:00
Tobias Schultze
f8eefa0748 [Session] fix PDO transaction aborted under PostgreSQL 2016-06-18 19:15:36 +02:00
Robin Chalas
b604be7084
[Console] Use InputInterface inherited doc as possible 2016-06-18 12:04:12 +02:00
Robin Chalas
e870758dae
[Console] Test SymfonyStyle::ask() output 2016-06-18 11:47:37 +02:00
Fabien Potencier
afed2f888d feature #19012 [Console] progress bar fix (TomasVotruba, fabpot)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[Console] progress bar fix

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

This is #16490 where I've simplified the code as much as possible and added a test for the bug we're trying to fix.

The main change is the renaming of the `TerminalDimensionsProvider` to just `Terminal`. The new class can probably be useful to add more about the terminal.

Commits
-------

2f81247 switched to use COLUMNS and LINES env vars to change terminal dimensions
bf7a5c5 fixed logic
a589635 deprecated some Console Application methods
8f206c8 fixed CS, simplified code
b030c24 [Console] ProgressBar - adjust to the window width (static)
2016-06-17 19:52:18 +02:00
Fabien Potencier
40f4c57eb3 feature #19047 [Cache] Add tags based invalidation + TagAwareRedisAdapter (nicolas-grekas)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[Cache] Add tags based invalidation + TagAwareRedisAdapter

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

Commits
-------

19764af [Cache] Add tags based invalidation + TagAwareRedisAdapter
2016-06-17 19:46:12 +02:00
Fabien Potencier
2f81247005 switched to use COLUMNS and LINES env vars to change terminal dimensions 2016-06-17 19:36:07 +02:00
Fabien Potencier
bf7a5c58a9 fixed logic 2016-06-17 19:36:07 +02:00
Fabien Potencier
a589635643 deprecated some Console Application methods 2016-06-17 19:36:07 +02:00
Fabien Potencier
8f206c86d7 fixed CS, simplified code 2016-06-17 19:36:07 +02:00
Tomas Votruba
b030c24263 [Console] ProgressBar - adjust to the window width (static) 2016-06-17 19:36:07 +02:00
Fabien Potencier
7ccfdb4016 feature #17644 Deprecate using Form::isValid() with an unsubmitted form (Ener-Getick)
This PR was merged into the 3.2-dev branch.

Discussion
----------

Deprecate using Form::isValid() with an unsubmitted form

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #7737
| License       | MIT
| Doc PR        | not yet

> I'm calling out for you to decide how to resolve the inconsistency between the Form::isValid() method and the ``valid`` variable available in the template:
>
> - ``isValid()`` returns ``false`` if a form was not submitted. This way it is possible to write concise controller code:
>
> ```php
> $form = $this->createForm(...);
> $form->handleRequest($request);
> if ($form->isValid()) {
>     // only executed if the form is submitted AND valid
> }
> ```
>
> - ``valid`` contains ``true`` if a form was not submitted. This way it is possible to rely on this variable for error styling of a form.
>
> ```twig
> <div{% if not form.vars.valid %} class="error"{% endif %}>
> ```
>
> We have two alternatives for resolving this problem:
>
> 1. Leave the inconsistency as is.
> 2. Make ``isValid()`` return ``true`` if a form was not submitted (consistent with ``valid``)
> 3. Revert to the 2.2 behavior of throwing an exception if ``isValid()`` is called on a non-submitted form (not consistent with ``valid``).
>
> Both 2. and 3. will require additional code in the controller:
>
> ```php
> $form = $this->createForm(...);
> $form->handleRequest($request);
> if ($form->isSubmitted() && $form->isValid()) {
>     // only executed if the form is submitted AND valid
> }
> ```
>
> What do you think?

This PR implements the option 3 as it was the most chosen in #7737

Commits
-------

2c3a7cc Deprecate using Form::isValid() with an unsubmitted form
2016-06-17 19:33:12 +02:00
Nicolas Grekas
cfc578add1 [Console] Add ConsoleLogger::hasErrored() 2016-06-17 19:29:15 +02:00