Commit Graph

33831 Commits

Author SHA1 Message Date
Shawn Iwinski
f3585335d9 [HttpKernel] Remove composer require-dev "symfony/class-loader" 2017-10-21 16:09:18 -04:00
Maxime Steinhausser
dd5a03a4a8 minor #24651 Fix an invalid printf format string in symfony 4 test case (TysonAndre)
This PR was merged into the 4.0-dev branch.

Discussion
----------

Fix an invalid printf format string in symfony 4 test case

`%1$::` should be `%1$s::`
(`1$` means the first parameter, `s` meaning string)

Detected by static analysis

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

Commits
-------

d0ce099b40 Fix an invalid printf format string in symfony 4 test case
2017-10-21 13:53:12 +02:00
Maxime Steinhausser
dde192a3af minor #24650 Fix phpdoc and unnecessary sprintf (TysonAndre)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix phpdoc and unnecessary sprintf

(detected by static analysis)

`%1$::`: is not a format string, it should be `%1$s::`
Simplify no-op sprintf.

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

Commits
-------

e64baf5d41 Fix phpdoc and unnecessary sprintf
2017-10-21 13:51:20 +02:00
Roland Franssen
3cee7a65de [DI] Register default env var provided types 2017-10-21 10:39:15 +02:00
Tyson Andre
d0ce099b40 Fix an invalid printf format string in symfony 4 test case
`%1$::` should be `%1$s::`
(`1$` means the first parameter, `s` meaning string)

Detected by static analysis
2017-10-20 22:50:49 -07:00
Tyson Andre
e64baf5d41 Fix phpdoc and unnecessary sprintf 2017-10-20 22:45:42 -07:00
Fabien Potencier
dc0116aa34 bug #24620 [FrameworkBundle][Workflow] Fix deprectation when checking workflow.registry service in dump command (Jean-Beru)
This PR was squashed before being merged into the 3.4 branch (closes #24620).

Discussion
----------

[FrameworkBundle][Workflow] Fix deprectation when checking workflow.registry service in dump command

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

This PR will declare `workflow.registry` as a public service to avoid deprecation when `WorkflowDumpCommand` checks its existence. It only concerns 3.4 since this `isEnabled` method will be removed in 4.0.

Commits
-------

9e75847090 [FrameworkBundle][Workflow] Fix deprectation when checking workflow.registry service in dump command
2017-10-20 13:32:57 -07:00
hubert.lenoir
9e75847090 [FrameworkBundle][Workflow] Fix deprectation when checking workflow.registry service in dump command 2017-10-20 13:32:50 -07:00
Nicolas Grekas
2b725ca200 Merge branch '3.4'
* 3.4: (26 commits)
  [Routing] Fix resource miss
  [Security] Fixed auth provider authenticate() cannot return void
  [FrameworkBundle][Serializer] Move DateIntervalNormalizer definition to xml
  declare argument type
  Improving annotation loader message
  [FrameworkBundle][Serializer] Move normalizer/encoders definitions to xml file & remove unnecessary checks
  Update UPGRADE-4.0.md
  streamed response should return $this
  $isClientIpsVali is not used
  [WebServerBundle] Prevent commands from being registered by convention
  content can be a resource
  Adding the Form default theme files to be warmed up in Twig's cache
  Remove BC Break label from `NullDumper` class
  Username and password in basic auth are allowed to contain '.'
  Remove obsolete PHPDoc from UriSigner
  [Serializer] YamlEncoder: throw if the Yaml component isn't installed
  [Serializer] ObjectNormalizer: throw if PropertyAccess isn't installed
  [PropertyInfo] Add support for the iterable type
  pdo session fix
  Fixed pathinfo calculation for requests starting with a question mark.  - fix bad conflict resolving issue  - port symfony/symfony#21968 to 3.3+
  ...
2017-10-20 12:28:39 -07:00
Nicolas Grekas
beed426e9a minor #24582 [DI] Enhance service locator error message (nicolas-grekas)
This PR was merged into the 3.3 branch.

Discussion
----------

[DI] Enhance service locator error message

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

See linked issue.

Commits
-------

fdb0ea9 [DI] Enhance service locator error message
2017-10-20 12:00:26 -07:00
Fabien Potencier
1376b4becd Merge branch '3.3' into 3.4
* 3.3: (22 commits)
  [Routing] Fix resource miss
  [Security] Fixed auth provider authenticate() cannot return void
  declare argument type
  [FrameworkBundle][Serializer] Move normalizer/encoders definitions to xml file & remove unnecessary checks
  streamed response should return $this
  $isClientIpsVali is not used
  content can be a resource
  Adding the Form default theme files to be warmed up in Twig's cache
  Remove BC Break label from `NullDumper` class
  Username and password in basic auth are allowed to contain '.'
  Remove obsolete PHPDoc from UriSigner
  [Serializer] YamlEncoder: throw if the Yaml component isn't installed
  [Serializer] ObjectNormalizer: throw if PropertyAccess isn't installed
  [PropertyInfo] Add support for the iterable type
  pdo session fix
  Fixed pathinfo calculation for requests starting with a question mark.  - fix bad conflict resolving issue  - port symfony/symfony#21968 to 3.3+
  Fixed unsetting from loosely equal keys OrderedHashMap
  add DOMElement as return type in Crawler::getIterator to support foreach support in ide
  Fixed mistake in exception expectation
  [Debug] Fix same vendor detection in class loader
  ...
2017-10-20 11:48:32 -07:00
Fabien Potencier
402246ebaa Merge branch '2.8' into 3.3
* 2.8:
  [Routing] Fix resource miss
  [Security] Fixed auth provider authenticate() cannot return void
  declare argument type
  streamed response should return $this
  content can be a resource
  Adding the Form default theme files to be warmed up in Twig's cache
2017-10-20 11:30:21 -07:00
Fabien Potencier
77a74df487 Merge branch '2.7' into 2.8
* 2.7:
  [Security] Fixed auth provider authenticate() cannot return void
  declare argument type
  streamed response should return $this
  content can be a resource
2017-10-20 11:30:07 -07:00
Fabien Potencier
2661da415e bug #24644 [Security] Fixed auth provider authenticate() cannot return void (glye)
This PR was merged into the 2.7 branch.

Discussion
----------

[Security] Fixed auth provider authenticate() cannot return void

| Q             | A
| ------------- | ---
| Branch?       | 2.7 and up
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no (arguably)
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

The `AuthenticationManagerInterface` [requires](https://github.com/symfony/symfony/blob/2.7/src/Symfony/Component/Security/Core/Authentication/AuthenticationManagerInterface.php#L30) that `authenticate()` must return a TokenInterface, never null. Several authentication providers are violating this. Changed to throw exception instead.

See discussion in earlier PR https://github.com/symfony/symfony/pull/24585 which was changing the docblock rather than the implementations.

Commits
-------

6e18b56b77 [Security] Fixed auth provider authenticate() cannot return void
2017-10-20 11:28:37 -07:00
Fabien Potencier
5e7a03b288 minor #24622 declare type AcceptHeaderItem for array_map (DQNEO)
This PR was merged into the 2.7 branch.

Discussion
----------

declare type AcceptHeaderItem  for array_map

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

In `array_filter` , argument type is declared.
https://github.com/symfony/symfony/blob/2.7/src/Symfony/Component/HttpFoundation/AcceptHeader.php#L133
So It's natural to do so in `array_map` too.

Commits
-------

ab8f5be40c declare argument type
2017-10-20 11:23:47 -07:00
Fabien Potencier
9d66c90934 bug #24642 [Routing] Fix resource miss (dunglas)
This PR was squashed before being merged into the 2.8 branch (closes #24642).

Discussion
----------

[Routing] Fix resource miss

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| 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 | n/a
| License       | MIT
| Doc PR        | n/a

Some routing resources are not watched. To reproduce:

1. Install Symfony 4
2. Change something in `config/routes.yaml`

The change is not taken into account.

This PR fixes this bug.

Commits
-------

6610c25cd6 [Routing] Fix resource miss
2017-10-20 11:22:07 -07:00
Kévin Dunglas
6610c25cd6 [Routing] Fix resource miss 2017-10-20 11:22:06 -07:00
Fabien Potencier
d5315f1a3d minor #24641 [FrameworkBundle][Serializer] Move DateIntervalNormalizer definition to xml (ogizanagi)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle][Serializer] Move DateIntervalNormalizer definition to xml

| Q             | A
| ------------- | ---
| Branch?       | 3.4 <!-- 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 | https://github.com/symfony/symfony/pull/24634#issuecomment-338013631 <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

Same as #24634 for the remaining normalizer introduced in 3.4.

Commits
-------

11244d51ee [FrameworkBundle][Serializer] Move DateIntervalNormalizer definition to xml
2017-10-20 11:18:13 -07:00
Gunnstein Lye
6e18b56b77 [Security] Fixed auth provider authenticate() cannot return void
The AuthenticationManagerInterface requires that authenticate() must return a TokenInterface, never null.
Several authentication providers are violating this. Changed to throw exception instead.
2017-10-20 16:23:30 +02:00
Lesnykh Ilia
c8012f0448
Remove redundant sprintf arguments. 2017-10-20 12:44:28 +03:00
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