Commit Graph

32342 Commits

Author SHA1 Message Date
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
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
DQNEO
ab8f5be40c declare argument type 2017-10-20 13:13:59 +09: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
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
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
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
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
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
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
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
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
Fabien Potencier
7ac01bc723 minor #24564 add DOMElement as return type in Crawler::getIterator to support foreach support in ide (Haehnchen)
This PR was merged into the 3.3 branch.

Discussion
----------

add DOMElement as return type in Crawler::getIterator to support foreach support in ide

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

In `Crawler::getIterator` return type is missing so ide (PhpStorm) is not able to provide completion inside foreach statements. This PR adds `DOMElement[]` to it

```php
$crawler = new Crawler('foobar');
foreach($crawler->filter('a') as $link) {
   # support completion
   $link->...
}
```

Commits
-------

2350597288 add DOMElement as return type in Crawler::getIterator to support foreach support in ide
2017-10-16 16:26:23 -07:00
Fabien Potencier
ff459928c9 bug #24570 [Debug] Fix same vendor detection in class loader (Jean-Beru)
This PR was merged into the 2.7 branch.

Discussion
----------

[Debug] Fix same vendor detection in class loader

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

Fix about same vendor detection in ClassLoader. Actually, detected namespace for `Doctrine\ORM\Configuration` is `Doctrine\ORM` instead of `Doctrine\`. So deprecations are triggered for classes in same namespace.

Commits
-------

d2ab0d8019 [Debug] Fix same vendor detection in class loader
2017-10-16 16:22:53 -07:00
Fabien Potencier
d32ecff202 bug #24573 [3.3] Fixed pathinfo calculation for requests starting with a question mark. (syzygymsu)
This PR was merged into the 3.3 branch.

Discussion
----------

[3.3] Fixed pathinfo calculation for requests starting with a question mark.

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

Fix of bad merge conflict resolving as mentioned in #24487. Port #21968 to 3.3+

Commits
-------

c17a92259a Fixed pathinfo calculation for requests starting with a question mark.  - fix bad conflict resolving issue  - port symfony/symfony#21968 to 3.3+
2017-10-16 15:36:09 -07:00
Fabien Potencier
ff4f4ca1a5 bug #24565 [Serializer] YamlEncoder: throw if the Yaml component isn't installed (dunglas)
This PR was squashed before being merged into the 3.3 branch (closes #24565).

Discussion
----------

[Serializer] YamlEncoder: throw if the Yaml component isn't installed

| Q             | A
| ------------- | ---
| Branch?       | 3.3 <!-- see comment 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?   | no
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | n/a

Similar to #24563 but for the Yaml encoder (not the same branch).

Commits
-------

7d21caf8dd [Serializer] YamlEncoder: throw if the Yaml component isn't installed
2017-10-16 15:20:12 -07:00
Kévin Dunglas
7d21caf8dd [Serializer] YamlEncoder: throw if the Yaml component isn't installed 2017-10-16 15:20:00 -07:00
Fabien Potencier
7dac168800 bug #24563 [Serializer] ObjectNormalizer: throw if PropertyAccess isn't installed (dunglas)
This PR was squashed before being merged into the 2.7 branch (closes #24563).

Discussion
----------

[Serializer] ObjectNormalizer: throw if PropertyAccess isn't installed

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

Commits
-------

b5246a72ca [Serializer] ObjectNormalizer: throw if PropertyAccess isn't installed
2017-10-16 15:17:03 -07:00
Kévin Dunglas
b5246a72ca [Serializer] ObjectNormalizer: throw if PropertyAccess isn't installed 2017-10-16 15:16:57 -07:00
Fabien Potencier
6b9850a4bb bug #24571 [PropertyInfo] Add support for the iterable type (dunglas)
This PR was squashed before being merged into the 2.8 branch (closes #24571).

Discussion
----------

[PropertyInfo] Add support for the iterable type

| 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 | reported on Slack
| License       | MIT
| Doc PR        | n/a

Add support for the `iterable` pseudo-type introduced in PHP 7.1.

Commits
-------

a73249db31 [PropertyInfo] Add support for the iterable type
2017-10-16 14:49:22 -07:00
Kévin Dunglas
a73249db31 [PropertyInfo] Add support for the iterable type 2017-10-16 14:49:07 -07:00
Fabien Potencier
60adbdd059 bug #24579 pdo session fix (mxp100)
This PR was merged into the 2.7 branch.

Discussion
----------

pdo session fix

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

Fix PDO session timestamp out of range for postgres. (branch from 2.7)
P.S. please delete this pull https://github.com/symfony/symfony/pull/24457

Commits
-------

56b29a754c pdo session fix
2017-10-16 13:29:26 -07:00
Yuriy Potemkin
56b29a754c pdo session fix 2017-10-16 20:34:10 +03:00
Anton A. Sumin
c17a92259a Fixed pathinfo calculation for requests starting with a question mark.
- fix bad conflict resolving issue
 - port symfony/symfony#21968 to 3.3+
2017-10-16 13:20:56 +03:00
maryo
ba37cba6c2 Fixed unsetting from loosely equal keys OrderedHashMap 2017-10-15 22:33:56 +02:00
Daniel Espendiller
2350597288 add DOMElement as return type in Crawler::getIterator to support foreach support in ide 2017-10-15 19:29:08 +02:00
Nicolas Grekas
4650592242 minor #24557 Fixed mistake in exception expectation (uuf6429)
This PR was merged into the 3.3 branch.

Discussion
----------

Fixed mistake in exception expectation

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

In some cases, (5 to be exact), the `expectException` is misused while attempting to provide compatibility with the older `setExpectedException` by making use of a non-existent parameter.
Firstly, this makes the tests inconsistent (old PHPUnit version test exception message, while newer one doesn't). Secondly, if PHPUnit interface suddenly starts making use of a 2nd parameter in `expectException`, the existing code might break or cause unexpected side-effects.

Original report: 87bb726712 (commitcomment-24848315)

Commits
-------

03be003 Fixed mistake in exception expectation
2017-10-14 22:45:08 +02:00
Christian Sciberras
03be003018 Fixed mistake in exception expectation 2017-10-14 03:33:35 +02:00
hubert.lenoir
d2ab0d8019 [Debug] Fix same vendor detection in class loader 2017-10-13 19:28:12 +02:00
Fabien Potencier
e98033576a minor #24542 [Form] Updated the source text and translation (Nyholm)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Updated the source text and translation

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

I noticed that the source text had changed. See the [English version](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Resources/translations/validators.en.xlf)

Ping @magnusnordlander or @vinkla, Is this translation okey?

Commits
-------

7da052f18f Updated the source text and translation
2017-10-13 10:24:38 -07:00
Nicolas Grekas
a522f5e855 Fix phpunit bridge (ter) 2017-10-13 18:55:35 +02:00
Nicolas Grekas
9de153b330 Fix phpunit bridge (bis) 2017-10-13 18:49:40 +02:00
Nicolas Grekas
7ba7550dfb Fix phpunit bridge 2017-10-13 18:39:56 +02:00
Tobias Nyholm
7da052f18f
Updated the source text and translation 2017-10-13 09:35:47 -07:00
Nicolas Grekas
be9382a772 minor #24551 [PhpUnitBridge] fix serialized deprecations handling (xabbuh)
This PR was merged into the 3.3 branch.

Discussion
----------

[PhpUnitBridge] fix serialized deprecations handling

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

Commits
-------

2f5a0bd fix serialized deprecations handling
2017-10-13 16:14:51 +02:00