Commit Graph

33652 Commits

Author SHA1 Message Date
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
Fabien Potencier
1a8459a8f1 minor #24591 adding AdapterInterface alias for cache.app (weaverryan)
This PR was merged into the 3.4 branch.

Discussion
----------

adding AdapterInterface alias for cache.app

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

I'd like to add this alias for autowiring. If only `CacheItemPoolInterface` is available, then it's a bit weird to use the extra Symfony cache features (e.g. tagging), as I'm calling methods on the `CacheItemPoolInterface` that don't exist. I'd rather type-hint `AdapterInterface` and confidently call those (+ get auto-complete).

Commits
-------

454f65a77d adding AdapterInterface alias for cache.app
2017-10-17 08:47:21 -07:00
Fabien Potencier
84f19c0537 minor #24592 Add extra autowiring aliases (stof)
This PR was merged into the 3.4 branch.

Discussion
----------

Add extra autowiring aliases

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

This adds autowiring for RequestContextAwareInterface for the routing layer and for AuthenticationManagerInterface in the security layer.

Commits
-------

921a8794c6 Add extra autowiring aliases
2017-10-17 08:44:52 -07:00
Christophe Coevoet
921a8794c6 Add extra autowiring aliases
This adds autowiring for RequestContextAwareInterface for the routing layer
and for AuthenticationManagerInterface in the security layer.
2017-10-17 16:03:36 +02:00
Christophe Coevoet
bb8f1534d2 minor #24586 [HttpKernel] Remove obsolete PHPDoc from UriSigner (emodric)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpKernel] Remove obsolete PHPDoc from UriSigner

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

`_hash` query param does not have to be at the end of the URL ever since https://github.com/symfony/symfony/pull/12574 so this PHPDoc is confusing. I've actually lost couple of hours of work rewriting my URLs to place it at the end before I realized that `UriSigner` doesn't really care.

Commits
-------

45ac192200 Remove obsolete PHPDoc from UriSigner
2017-10-17 14:57:01 +02:00
Richard Quadling
e5d57dd050 Username and password in basic auth are allowed to contain '.'
Initially reported by Fede Isas in https://github.com/beberlei/assert/pull/234
2017-10-17 13:03:20 +01:00
Edi Modrić
45ac192200 Remove obsolete PHPDoc from UriSigner 2017-10-17 12:11:27 +02:00
Ryan Weaver
454f65a77d adding AdapterInterface alias for cache.app 2017-10-17 00:33:38 -04:00
Ryan Weaver
41df512349 Adding a new debug:autowiring command 2017-10-16 20:35:11 -04:00
Fabien Potencier
45e677e562 bug #24566 Fixed unsetting from loosely equal keys OrderedHashMap (maryo)
This PR was merged into the 2.7 branch.

Discussion
----------

Fixed unsetting from loosely equal keys OrderedHashMap

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

Commits
-------

ba37cba6c2 Fixed unsetting from loosely equal keys OrderedHashMap
2017-10-16 16:28:28 -07:00