Commit Graph

33761 Commits

Author SHA1 Message Date
Christian Flothmann
da617e8624 fix deprecation triggering test detection 2017-10-20 11:26:45 +02:00
Maxime Steinhausser
11244d51ee [FrameworkBundle][Serializer] Move DateIntervalNormalizer definition to xml 2017-10-20 09:58:10 +02:00
DQNEO
ab8f5be40c declare argument type 2017-10-20 13:13:59 +09:00
Fabien Potencier
c3617bd0b9 minor #24638 Improving annotation loader message (weaverryan)
This PR was merged into the 3.4 branch.

Discussion
----------

Improving annotation loader message

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

This is the error that happens with Flex when you try to load annotation routes, but you don't have annotations installed/enabled yet. Fabien created this error message to help with this exact situation. For Flex users, the real solution is to run `composer require annotation`. This at least *somewhat* hints that even better.

Commits
-------

ce4cf471b9 Improving annotation loader message
2017-10-19 16:29:58 -07:00
Ryan Weaver
ce4cf471b9 Improving annotation loader message 2017-10-19 19:13:30 -04:00
Fabien Potencier
2f1af1b749 minor #24634 [FrameworkBundle][Serializer] Move normalizer/encoders definitions to xml file & remove unnecessary checks (ogizanagi)
This PR was squashed before being merged into the 3.3 branch (closes #24634).

Discussion
----------

[FrameworkBundle][Serializer] Move normalizer/encoders definitions to xml file & remove unnecessary checks

| Q             | A
| ------------- | ---
| Branch?       | 3.3 <!-- see comment below -->
| 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 | N/A <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

- `DataUriNormalizer` was added in 3.1 (cc7b5af170 (diff-b7fc65c7d852312152e353f395fc70a8))

- `DateTimeNormalizer` was added in 3.1 (6749a70326 (diff-17828084c07e429d87a1754420d312ef))

- `JsonSerializableNormalizer` was added in 3.1 (a6788813fa (diff-537ddf87a3d7ff914be4244a1e0c07f0))

- `YamlEncoder` was added in 3.2 (9366a7dc77 (diff-11720cb963c63bb0ad3fb23aba4ae294))
    `Yaml::DUMP_OBJECT` was added in 3.1 (286103b225 (diff-5199351a5995f15f224160f6969931c5R23))

- `CsvEncoder` was added in 3.2 (e71f5bea96 (diff-4de6bbbd40ea769ada711de28fb180c8))

while on 3.3, FrameworkBundle [conflicts](https://github.com/symfony/symfony/blob/3.3/src/Symfony/Bundle/FrameworkBundle/composer.json#L70) with `"symfony/serializer": "<3.3"` and both 3.1 and 3.2 are EOL anyway.

Moving these definitions to the `serializer.xml` file unclutters a bit the `FrameworkExtension`, make things clear about these service being always registered and allows the PhpStorm's Symfony plugin to properly detect and jump to them from classes.

Commits
-------

0d7657b306 [FrameworkBundle][Serializer] Move normalizer/encoders definitions to xml file & remove unnecessary checks
2017-10-19 13:37:59 -07:00
Maxime Steinhausser
0d7657b306 [FrameworkBundle][Serializer] Move normalizer/encoders definitions to xml file & remove unnecessary checks 2017-10-19 13:37:57 -07:00
Fabien Potencier
744021b930 minor #24636 Synchronizing Upgrade 4.0 notes in 3.4 (yceruto)
This PR was merged into the 3.4 branch.

Discussion
----------

Synchronizing Upgrade 4.0 notes in 3.4

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

Commits
-------

c4f64a6260 Update UPGRADE-4.0.md
2017-10-19 13:37:01 -07:00
Fabien Potencier
0cd875957b minor #24618 content can be a resource (DQNEO)
This PR was merged into the 2.7 branch.

Discussion
----------

content can be a resource

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes (bug in a comment)
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Commits
-------

c63742daef content can be a resource
2017-10-19 12:31:53 -07:00
Yonel Ceruto
c4f64a6260 Update UPGRADE-4.0.md 2017-10-19 15:31:27 -04:00
Fabien Potencier
67a488593c bug #24608 Adding the Form default theme files to be warmed up in Twig's cache (weaverryan)
This PR was merged into the 2.8 branch.

Discussion
----------

Adding the Form default theme files to be warmed up in Twig's cache

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

Hiya guys!

So..... during a Symfony Live workshop, we found out that the form theme Twig templates are *not* included in the Twig cache warmup process. This fixes that. I believe this is the only "weird" case where we use a Twig template that is not in a bundle and also not added to Twig as a proper namespaces.

I tested this on a 2.8 project. Before the patch, the form theme templates were not warmed up. After, they are warmed up. Booya.

Cheers!

Commits
-------

2ef619f9bb Adding the Form default theme files to be warmed up in Twig's cache
2017-10-19 12:25:37 -07:00
Nicolas Grekas
8ca490b490 bug #24626 streamed response should return $this (DQNEO)
This PR was squashed before being merged into the 2.7 branch (closes #24626).

Discussion
----------

streamed response should return $this

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | may be yes?
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

---

`sendHeaders()` and `sendContent()` should return $this,  as in the parent class.

related PRs:
https://github.com/symfony/symfony/pull/2935
https://github.com/symfony/symfony/pull/20289

Commits
-------

058fb84 streamed response should return $this
2017-10-19 12:17:56 -07:00
DQNEO
058fb84554 streamed response should return $this 2017-10-19 12:17:47 -07:00
Nicolas Grekas
3e2aadc10d minor #24617 $isClientIpsValid is not used (DQNEO)
This PR was submitted for the master branch but it was merged into the 3.3 branch instead (closes #24617).

Discussion
----------

$isClientIpsValid is not used

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

this variable appeared in v3.3 with no usage.

Commits
-------

df086fd $isClientIpsVali is not used
2017-10-19 12:13:33 -07:00
DQNEO
df086fd9b3 $isClientIpsVali is not used 2017-10-19 12:13:33 -07:00
Fabien Potencier
4c414d8136 feature #24631 [Form] Fix FormEvents::* constant and value matching (yceruto, javiereguiluz)
This PR was merged into the 4.0-dev branch.

Discussion
----------

[Form] Fix FormEvents::* constant and value matching

| Q             | A
| ------------- | ---
| Branch?       | 4.0
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | yes (ppl rely on const value directly, very weird)
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/24615
| License       | MIT
| Doc PR        | -

> https://github.com/symfony/symfony/issues/24615#issuecomment-337945875 by @stof:
Yeah, I think we could change this in 4.0 without a big impact (btw, I think our BC policy even allows it for this case).
There is one case where people will use the event name rather than the constant: the kernel.event_listener tag (and recent versions can even use the constant in YAML files). But this won't be the case for this event, as form events are not dispatched in the main dispatcher anyway.

Commits
-------

944931af63 Minor reword
0ee856add1 Update UPGRADE-4.0.md
0fc2282fc2 fix the constant value to be consistent with the name
2017-10-19 11:52:46 -07:00
Fabien Potencier
d43daa0295 bug #24630 [WebServerBundle] Prevent commands from being registered by convention (chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

[WebServerBundle] Prevent commands from being registered by convention

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

Commits
-------

57b7d832d9 [WebServerBundle] Prevent commands from being registered by convention
2017-10-19 11:47:54 -07:00
Javier Eguiluz
944931af63 Minor reword 2017-10-19 20:08:49 +02:00
Yonel Ceruto
0ee856add1 Update UPGRADE-4.0.md 2017-10-19 13:51:55 -04:00
Robin Chalas
57b7d832d9 [WebServerBundle] Prevent commands from being registered by convention 2017-10-19 19:45:43 +02:00
Fabien Potencier
10ab3a648c minor #24623 [Session] remove lazy_write polyfill for php < 7.0 (Tobion)
This PR was merged into the 4.0-dev branch.

Discussion
----------

[Session] remove lazy_write polyfill for php < 7.0

| Q             | A
| ------------- | ---
| Branch?       | master
| 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 |
| License       | MIT
| Doc PR        |

Remove the session.lazy_write fallback implementation for php < 7 introduced in #24523 as we don't need it in sf 4

Commits
-------

1f84b1fd81 [Session] remove lazy_write polyfill for php < 7.0
2017-10-19 10:25:13 -07:00
Fabien Potencier
b2a4acf9fa minor #24628 [Form] Add $useDefaultThemes flag to the interfaces (emodric)
This PR was merged into the 4.0-dev branch.

Discussion
----------

[Form] Add $useDefaultThemes flag to the interfaces

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

Followup to #22610 to add `$useDefaultThemes` to the interfaces as discussed in the issue.

Commits
-------

c22d783696 [Form] Add useDefaultThemes flag to the interfaces
2017-10-19 10:20:35 -07:00
Yonel Ceruto
0fc2282fc2 fix the constant value to be consistent with the name 2017-10-19 12:41:04 -04:00
Edi Modrić
c22d783696 [Form] Add useDefaultThemes flag to the interfaces 2017-10-19 17:17:33 +02:00
Robin Chalas
b6bb84b8f1 [Security] Fix BC layer for AbstractGuardAuthenticator subclasses 2017-10-19 15:33:28 +02:00
Tobias Schultze
1f84b1fd81 [Session] remove lazy_write polyfill for php < 7.0 2017-10-19 14:43:54 +02:00
DQNEO
c63742daef content can be a resource 2017-10-19 21:02:09 +09:00
Ryan Weaver
2ef619f9bb Adding the Form default theme files to be warmed up in Twig's cache 2017-10-18 22:19:40 -04:00
Fabien Potencier
b935b93c7a bumped Symfony version to 4.0.0 2017-10-18 18:43:06 -07:00
Fabien Potencier
88e66db9d8 Merge pull request #24612 from fabpot/release-4.0.0-BETA1
released v4.0.0-BETA1
2017-10-18 18:37:02 -07:00
Fabien Potencier
748338874c updated VERSION for 4.0.0-BETA1 2017-10-18 18:36:38 -07:00
Fabien Potencier
d2bd342949 updated CHANGELOG for 4.0.0-BETA1 2017-10-18 18:36:29 -07:00
Nicolas Grekas
14de848cc4 Merge branch '3.4'
* 3.4:
  bumped Symfony version to 3.4.0
  updated VERSION for 3.4.0-BETA1
  updated CHANGELOG for 3.4.0-BETA1
  Do not process bindings in AbstractRecursivePass
  don't bind scalar values to controller method arguments
  Add extra autowiring aliases
  adding AdapterInterface alias for cache.app
  Adding a new debug:autowiring command
  [HttpFoundation] Make sessions secure and lazy
  [Routing] Ensure uniqueness without repeated check
  [Console] Sync ConsoleLogger::interpolate with the one in HttpKernel
2017-10-18 17:12:27 -07:00
Fabien Potencier
d484f7282a bumped Symfony version to 3.4.0 2017-10-18 15:39:44 -07:00
Fabien Potencier
44e3c8bfcf Merge pull request #24609 from fabpot/release-3.4.0-BETA1
released v3.4.0-BETA1
2017-10-18 14:46:31 -07:00
Fabien Potencier
c000b454c8 updated VERSION for 3.4.0-BETA1 2017-10-18 14:45:50 -07:00
Fabien Potencier
a024e80f1c updated CHANGELOG for 3.4.0-BETA1 2017-10-18 14:45:28 -07:00
Fabien Potencier
f1468c48a5 minor #24587 Remove BC Break label from NullDumper class in upgrade instructions (tzfrs)
This PR was submitted for the master branch but it was merged into the 3.3 branch instead (closes #24587).

Discussion
----------

Remove BC Break label from `NullDumper` class in upgrade instructions

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

7f34aa2643

This is the commit where the class has been made "final", but it has only been made final via php doc, not via code, so this shouldn't be a BC break in my opinion.

Commits
-------

fcc2146bef Remove BC Break label from `NullDumper` class
2017-10-18 08:29:16 -07:00
Theo Tzaferis
fcc2146bef Remove BC Break label from NullDumper class
7f34aa2643

This is the commit where the class has been made "final", but it has only been made final via php doc, not via code, so this shouldn't be a BC break in my opinion.
2017-10-18 08:29:15 -07:00
Fabien Potencier
fa1887dfc0 feature #24583 Adding a new debug:autowiring command (weaverryan)
This PR was merged into the 3.4 branch.

Discussion
----------

Adding a new debug:autowiring command

| Q             | A
| ------------- | ---
| Branch?       | 3.4 (if I can make my case, otherwise 4.1)
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #21222 and #24562 partially
| License       | MIT
| Doc PR        | TODO

Very simply, this adds a proper `debug:autowiring`, which is much shorter / nicer than `debug:container --types` and much prettier.

Before (`debug:container --types`):

<img width="1280" alt="screen shot 2017-10-16 at 8 28 05 pm" src="https://user-images.githubusercontent.com/121003/31641112-931c84ca-b2b0-11e7-9432-136ecf47ed0f.png">
<img width="1280" alt="screen shot 2017-10-16 at 8 28 18 pm" src="https://user-images.githubusercontent.com/121003/31641113-932ac1fc-b2b0-11e7-8a65-34199c9933c1.png">

After (`debug:autowiring`)

<img width="1131" alt="screen shot 2017-10-16 at 7 58 06 pm" src="https://user-images.githubusercontent.com/121003/31641124-a3288a6c-b2b0-11e7-8255-a8e676a26aba.png">
<img width="1101" alt="screen shot 2017-10-16 at 7 58 16 pm" src="https://user-images.githubusercontent.com/121003/31641125-a334c354-b2b0-11e7-8ee3-3bbad5678a1a.png">

The command is purposely simple: no special powers, no magic (other than a `search` argument), just a clean list and nice output.

I would love to sneak this in for 3.4, but I understand either way.

Commits
-------

41df512349 Adding a new debug:autowiring command
2017-10-18 08:28:19 -07:00
Fabien Potencier
f51d4d4c8f Merge branch '2.8' into 3.3
* 2.8:
  Username and password in basic auth are allowed to contain '.'
  Remove obsolete PHPDoc from UriSigner
  [Serializer] ObjectNormalizer: throw if PropertyAccess isn't installed
  [PropertyInfo] Add support for the iterable type
  pdo session fix
  Fixed unsetting from loosely equal keys OrderedHashMap
  [Debug] Fix same vendor detection in class loader
  Updated the source text and translation
  reject remember-me token if user check fails
2017-10-18 08:00:09 -07:00
Fabien Potencier
5f0a7047ff Merge branch '2.7' into 2.8
* 2.7:
  Username and password in basic auth are allowed to contain '.'
  Remove obsolete PHPDoc from UriSigner
  [Serializer] ObjectNormalizer: throw if PropertyAccess isn't installed
  pdo session fix
  Fixed unsetting from loosely equal keys OrderedHashMap
  [Debug] Fix same vendor detection in class loader
  Updated the source text and translation
  reject remember-me token if user check fails
2017-10-18 07:57:21 -07:00
Fabien Potencier
0ff4480e28 bug #24600 [HttpKernel] Don't bind scalar values to controller method arguments (yceruto)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] Don't bind scalar values to controller method arguments

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/24555#issuecomment-337071029
| License       | MIT
| Doc PR        | -

See linked issue.

Let's suppose we have this configuration:
```yaml
services:
    _defaults:
        # ...
        bind:
            $foo: '%foobar%'
```
`$foo` was successfully bound to any controller constructor, but in another controller I have this edit action (nothing to do with the intention of bind such a parameter, but it has the same name):
```php
/**
 * @Route("/{foo}/edit")
 */
public function editAction(string $foo) {}
```
triggering:
> Type error: Argument 1 passed to Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument::__construct() must be an instance of Symfony\Component\DependencyInjection\Reference, string given, called in /home/yceruto/github/symfony/symfony-demo/vendor/symfony/dependency-injection/Compiler/ServiceLocatorTagPass.php on line 81

or after https://github.com/symfony/symfony/pull/24582:
> Invalid service locator definition: only services can be referenced, "string" found for key "foo". Inject parameter values using constructors instead.

Commits
-------

a1df9af20f don't bind scalar values to controller method arguments
2017-10-18 07:28:24 -07:00
Fabien Potencier
2fc9b57f65 bug #24589 Username and password in basic auth are allowed to contain '.' (Richard Quadling)
This PR was merged into the 2.7 branch.

Discussion
----------

Username and password in basic auth are allowed to contain '.'

Initially reported by Fede Isas in https://github.com/beberlei/assert/pull/234

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

Commits
-------

e5d57dd050 Username and password in basic auth are allowed to contain '.'
2017-10-18 07:25:02 -07:00
Fabien Potencier
79caee2e08 bug #24602 [DI] Do not process bindings in AbstractRecursivePass (chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Do not process bindings in AbstractRecursivePass

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

Commits
-------

6a6256c6a8 Do not process bindings in AbstractRecursivePass
2017-10-18 07:16:04 -07:00
Robin Chalas
1f574b0599 minor #24603 [TwigBridge] fix merge of 3.4 into master (dmaicher)
This PR was merged into the 4.0-dev branch.

Discussion
----------

[TwigBridge] fix merge of 3.4 into master

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

Within https://github.com/symfony/symfony/pull/24535 I added `FormExtensionTest` which is completely useless now on master 😊

So this PR just removes the test after it has been merged from 3.4 into master.

Commits
-------

5c36609 [TwigBridge] fix merge of 3.4 into master
2017-10-18 15:46:46 +02:00
Robin Chalas
6a6256c6a8 Do not process bindings in AbstractRecursivePass 2017-10-18 14:27:18 +02:00
David Maicher
5c366092f3 [TwigBridge] fix merge of 3.4 into master 2017-10-18 12:06:44 +02:00
Yonel Ceruto
a1df9af20f don't bind scalar values to controller method arguments 2017-10-18 01:50:07 -04:00
Grégoire Paris
574f9f5273
Prefer line formatter on missing cli dumper
The console formatter does a better job, unless the VarDumper component
is missing, in which case you will not see the "context" or "extra" keys
and the LineFormatter should be preferred.
2017-10-17 19:49:08 +02:00