Commit Graph

34782 Commits

Author SHA1 Message Date
Nicolas Grekas
dde7381c03 Merge branch '3.4' into 4.0
* 3.4:
  PHP CS Fixer: clean up repo and adjust config
  use interface_exists instead of class_exists
  [DX] [DI] Improve exception for invalid setter injection arguments
  Dumper shouldn't use html format for phpdbg
  [Validator] Fix access to root object when using composite constraint
2018-01-03 18:15:19 +01:00
Nicolas Grekas
682bf5b2ae Merge branch '3.3' into 3.4
* 3.3:
  PHP CS Fixer: clean up repo and adjust config
  use interface_exists instead of class_exists
  Dumper shouldn't use html format for phpdbg
  [Validator] Fix access to root object when using composite constraint
2018-01-03 18:14:19 +01:00
Nicolas Grekas
00e8908375 Merge branch '2.8' into 3.3
* 2.8:
  PHP CS Fixer: clean up repo and adjust config
  Dumper shouldn't use html format for phpdbg
  [Validator] Fix access to root object when using composite constraint
2018-01-03 18:13:53 +01:00
Nicolas Grekas
5150086d08 Merge branch '2.7' into 2.8
* 2.7:
  PHP CS Fixer: clean up repo and adjust config
  Dumper shouldn't use html format for phpdbg
  [Validator] Fix access to root object when using composite constraint
2018-01-03 18:12:09 +01:00
Nicolas Grekas
0f884e0ae4 minor #25653 PHP CS Fixer: clean up repo and adjust config (keradus)
This PR was squashed before being merged into the 2.7 branch (closes #25653).

Discussion
----------

PHP CS Fixer: clean up repo and adjust config

| 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

Reason for this PR is that one want to have `php-cs-fixer fix -v` command executed without changes that shall not be applied for this repo. To achieve that, we need to groom config to exclude files that violate CS willingly, fix files that are violating CS unwillingly, and deliver missing case handling at PHP CS Fixer itself (https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/3359) (already merged!).

Commits
-------

b14cbc1 PHP CS Fixer: clean up repo and adjust config
2018-01-03 18:10:39 +01:00
Dariusz
b14cbc1845 PHP CS Fixer: clean up repo and adjust config 2018-01-03 18:10:15 +01:00
Nicolas Grekas
22b7d127b7 bug #25672 [WebServerBundle] use interface_exists instead of class_exists (kbond)
This PR was merged into the 3.3 branch.

Discussion
----------

[WebServerBundle] use interface_exists instead of class_exists

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

This bug was introduced in #25026

Commits
-------

dc3a94e use interface_exists instead of class_exists
2018-01-03 17:24:35 +01:00
Kevin Bond
dc3a94e83a
use interface_exists instead of class_exists 2018-01-03 11:18:08 -05:00
Fabien Potencier
1b36d03246 minor #25663 [DX] [DI] Improve exception for invalid setter injection arguments (curry684)
This PR was merged into the 3.4 branch.

Discussion
----------

[DX] [DI] Improve exception for invalid setter injection arguments

| Q             | A
| ------------- | ---
| Branch?       | 4.0
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes
| License       | MIT

Improve the exception message for when you accidentally write setter injection wrong as I did too many times:
```yaml
My\Logging\Service:
  calls: [ [ setLogger, "@logger" ] ]
```
Used to throw:

> Type error: Argument 2 passed to Symfony\Component\DependencyInjection\Definition::addMethodCall() must be of the type array, object given, called in /var/www/project/vendor/symfony/dependency-injection/Loader/YamlFileLoader.php on line 457

Now throws:

> The second parameter for function call "setLogger" must be an array of its arguments for service "My\Namespace\Service" in /var/www/project/config/services.yaml. Check your YAML syntax in /var/www/project/config/services.yaml (which is loaded in resource "/var/www/project/config/services.yaml").

(semi-offtopic: why isn't `LoggerAwareInterface` in the default autoconfigure for FrameworkExtension?)

Commits
-------

6850a228a7 [DX] [DI] Improve exception for invalid setter injection arguments
2018-01-03 13:35:38 +01:00
Niels Keurentjes
6850a228a7 [DX] [DI] Improve exception for invalid setter injection arguments 2018-01-03 12:24:16 +01:00
Nicolas Grekas
8e54591f24 bug #25662 Dumper shouldn't use html format for phpdbg / cli-server (jhoff)
This PR was submitted for the 3.3 branch but it was merged into the 2.7 branch instead (closes #25662).

Discussion
----------

Dumper shouldn't use html format for phpdbg / cli-server

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

This may not be the lowest branch that this fix applies to.

Prevents the dumper from outputting in html format when using phpdbg.

Commits
-------

e2b6091 Dumper shouldn't use html format for phpdbg
2018-01-03 11:33:07 +01:00
Jordan Hoff
e2b609162d Dumper shouldn't use html format for phpdbg 2018-01-03 11:33:04 +01:00
Fabien Potencier
d975ad63a0 bug #25529 [Validator] Fix access to root object when using composite constraint (ostrolucky)
This PR was merged into the 2.7 branch.

Discussion
----------

[Validator] Fix access to root object when using composite constraint

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

Commits
-------

b18cdcf417 [Validator] Fix access to root object when using composite constraint
2018-01-03 09:00:37 +01:00
Fabien Potencier
bccb8b6524 Merge branch '3.4' into 4.0
* 3.4:
  fixed years in copyright
  fix typo
2018-01-03 08:38:00 +01:00
Fabien Potencier
a483d37eaf Merge branch '3.3' into 3.4
* 3.3:
  fixed years in copyright
2018-01-03 08:37:34 +01:00
Fabien Potencier
9918a66309 Merge branch '2.8' into 3.3
* 2.8:
  fixed years in copyright
2018-01-03 08:37:11 +01:00
Fabien Potencier
967066569a Merge branch '2.7' into 2.8
* 2.7:
  fixed years in copyright
2018-01-03 08:36:31 +01:00
Fabien Potencier
07a7f560cd fixed years in copyright 2018-01-03 08:23:28 +01:00
Nicolas Grekas
2ace731491 fix typo 2018-01-02 17:39:41 +01:00
Nicolas Grekas
f9fdb228ce Merge branch '3.4' into 4.0
* 3.4:
  Clean up
  Update return type in docblock.
  PHP CS Fixer: no need to exclude xml and yml files
  PHP CS Fixer: no need to exclude json file
  Update LICENSE year... forever
  fixed some deprecation messages
  fixed CS
  Fixes for Oracle in PdoSessionHandler
  fixed some deprecation messages
  fixed some deprecation messages
  fixed some deprecation messages
  fixed some deprecation messages
  [TwigBundle/Brige] catch missing requirements to throw meaningful exceptions
  [HttpKernel] Call Response->setPrivate() instead of sending raw header() when session is started
  [FrameworkBundle] Make cache:clear "atomic" and consistent with cache:warmup
  Suggest to write an implementation if the interface cannot be autowired
  [Debug] Skip DebugClassLoader checks for already parsed files
  [2.7][DX] Use constant message contextualisation for deprecations
  Remove group options without data and fix normalization
  Remove redundant translation path
2018-01-02 17:33:53 +01:00
Nicolas Grekas
dd66512734 Merge branch '3.3' into 3.4
* 3.3:
  Clean up
  Update return type in docblock.
  PHP CS Fixer: no need to exclude xml and yml files
  PHP CS Fixer: no need to exclude json file
  Update LICENSE year... forever
2018-01-02 16:47:46 +01:00
Nicolas Grekas
096cbbd3cd Merge branch '2.8' into 3.3
* 2.8:
  Clean up
  Update return type in docblock.
  PHP CS Fixer: no need to exclude xml and yml files
  Update LICENSE year... forever
2018-01-02 16:47:19 +01:00
Nicolas Grekas
ae985d851a Merge branch '2.7' into 2.8
* 2.7:
  Clean up
  Update return type in docblock.
  PHP CS Fixer: no need to exclude xml and yml files
  Update LICENSE year... forever
2018-01-02 16:45:49 +01:00
Nicolas Grekas
28478374f7 minor #25646 Update LICENSE year... forever (dunglas)
This PR was merged into the 2.7 branch.

Discussion
----------

Update LICENSE year... forever

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | n/a

By using the same trick than Facebook: https://github.com/facebook/react/blob/master/LICENSE

Commits
-------

8ce8bd5 Update LICENSE year... forever
2018-01-02 16:40:42 +01:00
Nicolas Grekas
c0cfa9e0ef minor #25648 PHP CS Fixer: no need to exclude json file (keradus)
This PR was merged into the 3.3 branch.

Discussion
----------

PHP CS Fixer: no need to exclude json file

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| 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

Commits
-------

ef498ac PHP CS Fixer: no need to exclude json file
2018-01-02 16:40:02 +01:00
Nicolas Grekas
cb49099b1b minor #25649 PHP CS Fixer: no need to exclude xml and yml files (keradus)
This PR was merged into the 2.7 branch.

Discussion
----------

PHP CS Fixer: no need to exclude xml and yml files

| 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

Commits
-------

f51549c PHP CS Fixer: no need to exclude xml and yml files
2018-01-02 16:38:55 +01:00
Nicolas Grekas
e5772881b8 minor #25652 Clean up (carusogabriel)
This PR was squashed before being merged into the 2.7 branch (closes #25652).

Discussion
----------

Clean up

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

I've removed all white spaces and extra lines from our `markdown` files. Recently [I did it in our documentation](https://github.com/symfony/symfony-docs/pull/8944), and thought would be interesting to replicate here 😄

Commits
-------

acd0d7c Clean up
2018-01-02 16:37:25 +01:00
Gabriel Caruso
acd0d7c93f Clean up 2018-01-02 16:37:23 +01:00
Nicolas Grekas
cff97c7154 minor #25656 Update return type in docblock. (ADmad)
This PR was submitted for the 3.4 branch but it was merged into the 2.7 branch instead (closes #25656).

Discussion
----------

Update return type in docblock.

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| 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
-------

c5f0f4c Update return type in docblock.
2018-01-02 16:34:25 +01:00
ADmad
c5f0f4ce3e Update return type in docblock. 2018-01-02 16:34:25 +01:00
Dariusz
f51549c6ee PHP CS Fixer: no need to exclude xml and yml files 2018-01-01 22:13:00 +01:00
Dariusz
ef498acef2 PHP CS Fixer: no need to exclude json file 2018-01-01 22:07:50 +01:00
Christian Flothmann
546ca41926 [#22749] fix version in changelog 2018-01-01 13:55:57 +01:00
Christian Flothmann
5725e2ff7e Merge branch '3.3' into 3.4
* 3.3:
  fixed CS
  Fixes for Oracle in PdoSessionHandler
2017-12-31 15:10:23 +01:00
Christian Flothmann
b090d3deda Merge branch '2.8' into 3.3
* 2.8:
  fixed CS
  Fixes for Oracle in PdoSessionHandler
2017-12-31 14:45:46 +01:00
Christian Flothmann
2250ab1228 Merge branch '2.7' into 2.8
* 2.7:
  fixed CS
  Fixes for Oracle in PdoSessionHandler
2017-12-31 14:45:07 +01:00
Kévin Dunglas
8ce8bd5901
Update LICENSE year... forever 2017-12-31 13:13:41 +01:00
Fabien Potencier
4556996db2 bug #25404 [Form] Remove group options without data on debug:form command (yceruto)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] Remove group options without data on debug:form command

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

This also fix the normalization of the options column for text descriptor, regardless of changes in `collectOptions()` method (which is enough to fix the related bug).

@maidmaid could you confirm if these changes solve the problem?

Commits
-------

083c8af706 Remove group options without data and fix normalization
2017-12-31 08:08:29 +01:00
Fabien Potencier
f4461c9a1d minor #25642 Fix some deprecation messages (fabpot)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix some deprecation messages

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

<!--
- 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.
- Replace this comment by a description of what your PR is solving.
-->

Commits
-------

3a5c8a424e fixed some deprecation messages
2017-12-31 08:06:48 +01:00
Fabien Potencier
3a5c8a424e fixed some deprecation messages 2017-12-31 07:59:27 +01:00
Fabien Potencier
22c0e81d79 Merge branch '3.3' into 3.4
* 3.3:
  fixed some deprecation messages
  fixed some deprecation messages
  fixed some deprecation messages
  fixed some deprecation messages
  [2.7][DX] Use constant message contextualisation for deprecations
2017-12-31 07:07:31 +01:00
Fabien Potencier
28485afd45 fixed CS 2017-12-31 07:02:56 +01:00
Fabien Potencier
d6a6b28a99 minor #25641 Fix some deprecation messages (fabpot)
This PR was merged into the 3.3 branch.

Discussion
----------

Fix some deprecation messages

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

<!--
- 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.
- Replace this comment by a description of what your PR is solving.
-->

Commits
-------

74383b6e59 fixed some deprecation messages
2017-12-31 07:01:45 +01:00
Fabien Potencier
891d354d19 bug #25430 Fixes for Oracle in PdoSessionHandler (elislenio)
This PR was squashed before being merged into the 2.7 branch (closes #25430).

Discussion
----------

Fixes for Oracle in PdoSessionHandler

| Q             | A
| ------------- | ---
| Branch?       | 2.7 <!-- see below -->
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | #18305 <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        |  <!--highly recommended for new features-->

<!--
Fixes missing session data for Oracle in PdoSessionHandler
-->

Commits
-------

e7a4002b4f Fixes for Oracle in PdoSessionHandler
2017-12-31 06:59:51 +01:00
Guido Donnari
e7a4002b4f Fixes for Oracle in PdoSessionHandler 2017-12-31 06:59:49 +01:00
Fabien Potencier
8ce9569d8a minor #25476 [FrameworkBundle] Remove redundant translation path (yceruto)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Remove redundant translation path

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

This is only dead code, nothing change because all files are loaded from the `translations/` directory recursively and they override the ones from the bundle.

> http://symfony.com/doc/3.4/bundles/override.html#translations
> Translations are not related to bundles, but to domains. That means that you can override the translations from any translation file, as long as it is in the correct domain.

Commits
-------

16af89045a Remove redundant translation path
2017-12-31 06:54:09 +01:00
Fabien Potencier
74383b6e59 fixed some deprecation messages 2017-12-31 06:50:45 +01:00
Fabien Potencier
315180cd3b bug #25117 [FrameworkBundle] Make cache:clear "atomic" and consistent with cache:warmup (hkdobrev)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Make cache:clear "atomic" and consistent with cache:warmup

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

Here's what happens before/after this PR on `cache:clear` and `cache:clear --no-warmup`.

### Before PR

**`cache:clear`**

1. `rm var/cache_old`
1. Clearing cache in `var/cache`    &nbsp;<i>&lt;--- This is not in line and not atomic</i>
1. `rm var/cache_warmup`
1. Warming up cache in `var/cache_warmup`
1. `mv var/cache var/cache_old`
1. `mv var/cache_warmup var/cache`
1. `rm var/cache_old`

**`cache:clear --no-warmup`**

1. `rm var/cache_old`
1. Clearing cache in `var/cache`    &nbsp;<i>&lt;--- This is not in line and not atomic</i>
1. `mv var/cache var/cache_old`    <i>&lt;--- The old cache dir is completely obsolete in this workflow</i>
1. `rm var/cache_old`

---

### After PR

**`cache:clear`**

1. `rm var/cache_old`
1. `rm var/cache_new`
1. Clearing cache in `var/cache_new`
1. Warming up cache in `var/cache_new`
1. `mv var/cache var/cache_old`
1. `mv var/cache_new var/cache`
1. `rm var/cache_old`

**`cache:clear --no-warmup`**

1. `rm var/cache_old`
1. `rm var/cache_new`
1. Clearing cache in `var/cache_new`
1. `mv var/cache var/cache_old`
1. `mv var/cache_new var/cache`
1. `rm var/cache_old`

---

The main differences:
- Unify the flows and have each distinct operation only once in the code
- Clear the cache in the new cache directory and then switch to it atomically instead of clearing in the current one.
- Always have the cache directory present in the end. It was missing after `cache:clear --no-warmup` before.

I think this brings more consistency and is aligned with the present goals of the command as well.

However, I'm not really familiar with the Symfony framework and I might have wrong assumptions.

Commits
-------

8b88d9fc36 [FrameworkBundle] Make cache:clear "atomic" and consistent with cache:warmup
2017-12-31 06:48:57 +01:00
Fabien Potencier
2a9c881147 Merge branch '2.8' into 3.3
* 2.8:
  fixed some deprecation messages
  fixed some deprecation messages
  fixed some deprecation messages
  [2.7][DX] Use constant message contextualisation for deprecations
2017-12-31 06:31:34 +01:00
Fabien Potencier
b61daeb1d9 minor #25640 Fix some deprecation messages (fabpot)
This PR was merged into the 2.8 branch.

Discussion
----------

Fix some deprecation messages

| 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

<!--
- 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.
- Replace this comment by a description of what your PR is solving.
-->

Commits
-------

351b234f07 fixed some deprecation messages
2017-12-31 06:21:33 +01:00