Commit Graph

35807 Commits

Author SHA1 Message Date
Nicolas Grekas
c48eee86c3 Merge branch '3.4' into 4.0
* 3.4: (22 commits)
  [appveyor] use PHP 7.1 to run composer
  [HttpKernel] Don't clean legacy containers that are still loaded
  [VarDumper] Fix HtmlDumper classes match
  Make the simple auth provider the same as in Symfony 2.7.
  [PhpUnitBridge] silence wget
  fix merge
  [Security] guardAuthenticationProvider::authenticate cannot return null according to interface specification
  [PhpUnitBridge] Fix #26994
  [VarDumper] Remove decoration from actual output in tests
  [PropertyInfo] Minor cleanup and perf improvement
  [Bridge/Doctrine] fix count() notice on PHP 7.2
  [Security] Skip user checks if not implementing UserInterface
  [DI] Add check of internal type to ContainerBuilder::getReflectionClass
  [HttpFoundation] Add HTTP_EARLY_HINTS const
  [DoctrineBridge] Improve exception message at `IdReader::getIdValue()`
  Add type hints
  fixed CS
  Use new PHP7.2 functions in hasColorSupport
  [VarDumper] Fix dumping of SplObjectStorage
  [HttpFoundation] Add functional tests for Response::sendHeaders()
  ...
2018-04-26 18:12:06 +02:00
Nicolas Grekas
e1ca89b4bd minor #27068 [appveyor] use PHP 7.1 to run composer (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[appveyor] use PHP 7.1 to run composer

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

Should make appveyor back to green.

Commits
-------

43e733f [appveyor] use PHP 7.1 to run composer
2018-04-26 18:08:05 +02:00
Nicolas Grekas
43e733f8fe [appveyor] use PHP 7.1 to run composer 2018-04-26 17:59:35 +02:00
Nicolas Grekas
b8c15383cf bug #27061 [HttpKernel] Don't clean legacy containers that are still loaded (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] Don't clean legacy containers that are still loaded

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

Commits
-------

be8dbc3 [HttpKernel] Don't clean legacy containers that are still loaded
2018-04-26 17:06:18 +02:00
Nicolas Grekas
be8dbc3660 [HttpKernel] Don't clean legacy containers that are still loaded 2018-04-26 16:53:34 +02:00
Nicolas Grekas
df20e804a9 bug #27064 [VarDumper] Fix HtmlDumper classes match (ogizanagi)
This PR was merged into the 3.4 branch.

Discussion
----------

[VarDumper] Fix HtmlDumper classes match

| Q             | A
| ------------- | ---
| Branch?       | 3.4 <!-- see below -->
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #27045   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

Commits
-------

229430f [VarDumper] Fix HtmlDumper classes match
2018-04-26 16:36:49 +02:00
Maxime Steinhausser
229430fdbd [VarDumper] Fix HtmlDumper classes match 2018-04-26 14:42:15 +02:00
Nicolas Grekas
c2eeb2929a Merge branch '2.8' into 3.4
* 2.8:
  Make the simple auth provider the same as in Symfony 2.7.
2018-04-26 13:33:17 +02:00
Nicolas Grekas
306c627d49 minor #27059 Make the simple auth provider the same as in Symfony 2.7 (leofeyer)
This PR was merged into the 2.8 branch.

Discussion
----------

Make the simple auth provider the same as in Symfony 2.7

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

This PR adds the `SimpleAuthenticationProvider` changes made in Symfony 2.7 to Symfony 2.8. See https://github.com/symfony/symfony/pull/27044#issuecomment-384580979

Commits
-------

9afad9d Make the simple auth provider the same as in Symfony 2.7.
2018-04-26 13:02:23 +02:00
Leo Feyer
9afad9decd Make the simple auth provider the same as in Symfony 2.7. 2018-04-26 12:21:35 +02:00
Nicolas Grekas
a8e284f986 [PhpUnitBridge] silence wget 2018-04-26 11:45:48 +02:00
Nicolas Grekas
36f3849842 fix merge 2018-04-25 18:22:06 +02:00
Nicolas Grekas
2abb25e881 Merge branch '2.8' into 3.4
* 2.8:
  [Security] guardAuthenticationProvider::authenticate cannot return null according to interface specification
  [VarDumper] Remove decoration from actual output in tests
  [PropertyInfo] Minor cleanup and perf improvement
  [Bridge/Doctrine] fix count() notice on PHP 7.2
  [Security] Skip user checks if not implementing UserInterface
  [HttpFoundation] Add HTTP_EARLY_HINTS const
  [DoctrineBridge] Improve exception message at `IdReader::getIdValue()`
  fixed CS
  Use new PHP7.2 functions in hasColorSupport
  [VarDumper] Fix dumping of SplObjectStorage
  Fixed being logged out on failed attempt in guard
2018-04-25 17:24:55 +02:00
Nicolas Grekas
fcebc33d39 Merge branch '2.7' into 2.8
* 2.7:
  [VarDumper] Remove decoration from actual output in tests
  [Bridge/Doctrine] fix count() notice on PHP 7.2
  [Security] Skip user checks if not implementing UserInterface
  [HttpFoundation] Add HTTP_EARLY_HINTS const
  [DoctrineBridge] Improve exception message at `IdReader::getIdValue()`
  fixed CS
  Use new PHP7.2 functions in hasColorSupport
  [VarDumper] Fix dumping of SplObjectStorage
2018-04-25 16:40:02 +02:00
Nicolas Grekas
ff962261ae bug #27016 [Security][Guard] GuardAuthenticationProvider::authenticate cannot return null (biomedia-thomas)
This PR was merged into the 2.8 branch.

Discussion
----------

[Security][Guard] GuardAuthenticationProvider::authenticate cannot return null

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

Authenticate method in GuardAuthenticationProvider returned null when the token does not originate from any of the guard authenticators. This check was not done in the supports method. According to the interface authenticate cannot return null. This patch copies theguard authenticator checks to the supports method.

Commits
-------

9dff22c [Security] guardAuthenticationProvider::authenticate cannot return null according to interface specification
2018-04-25 16:30:57 +02:00
Thomas
9dff22ca99 [Security] guardAuthenticationProvider::authenticate cannot return null according to interface specification 2018-04-25 16:28:23 +02:00
Nicolas Grekas
bf8ed0a3fc bug #26831 [Bridge/Doctrine] count(): Parameter must be an array or an object that implements Countable (gpenverne)
This PR was merged into the 2.7 branch.

Discussion
----------

[Bridge/Doctrine] count(): Parameter must be an array or an object that implements Countable

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

Php7.2 will throw a warning on count(null) [http://php.net/manual/en/migration72.incompatible.php](http://php.net/manual/en/migration72.incompatible.php)

Error:
```
count(): Parameter must be an array or an object that implements Countable
```
when no result returned on validating unique constraint

For example, on an entity with annotation uniqueEntity:
```
 @UniqueEntity(
     fields={"email"},
     repositoryMethod="findMemberWithPasswordFromEmail",
 )
```

And in repository, a method ``findMemberWithPasswordFromEmail`` which return null if no entity found (``getOneOrNullResult``)

Commits
-------

715373f [Bridge/Doctrine] fix count() notice on PHP 7.2
2018-04-25 16:25:57 +02:00
Nicolas Grekas
778d47f0ac minor #27046 [HttpKernel] Remove decoration from actual output in tests (chalasr)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpKernel] Remove decoration from actual output in tests

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

AppVeyor has color support since #26910, that breaks the build.
Fixes it by removing decoration from tested DumpDataCollector CLI outputs, same as what's already done for HTML dumps

Commits
-------

c4daef9 [VarDumper] Remove decoration from actual output in tests
2018-04-25 16:23:57 +02:00
Nicolas Grekas
e9cc947aef [PhpUnitBridge] Fix #26994 2018-04-25 16:21:38 +02:00
Robin Chalas
c4daef9db6 [VarDumper] Remove decoration from actual output in tests 2018-04-25 16:05:38 +02:00
Fabien Potencier
9afb41e2b4 bug #27044 [Security] Skip user checks if not implementing UserInterface (chalasr)
This PR was merged into the 2.7 branch.

Discussion
----------

[Security] Skip user checks if not implementing UserInterface

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

Commits
-------

384acf9f7f [Security] Skip user checks if not implementing UserInterface
2018-04-25 14:59:38 +02:00
Nicolas Grekas
447ce8e416 minor #27003 [PropertyInfo] Minor cleanup and perf improvement (dunglas)
This PR was squashed before being merged into the 2.8 branch (closes #27003).

Discussion
----------

[PropertyInfo] Minor cleanup and perf improvement

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | n/a

Commits
-------

4a8306e [PropertyInfo] Minor cleanup and perf improvement
2018-04-25 14:21:53 +02:00
Kévin Dunglas
4a8306e7be [PropertyInfo] Minor cleanup and perf improvement 2018-04-25 14:21:47 +02:00
gpenverne
715373fea6 [Bridge/Doctrine] fix count() notice on PHP 7.2 2018-04-25 14:09:36 +02:00
Robin Chalas
384acf9f7f [Security] Skip user checks if not implementing UserInterface 2018-04-25 13:44:04 +02:00
Christophe Coevoet
aec5cd0c75 bug #27025 [DI] Add check of internal type to ContainerBuilder::getReflectionClass (upyx)
This PR was submitted for the 4.0 branch but it was merged into the 3.4 branch instead (closes #27025).

Discussion
----------

[DI] Add check of internal type to ContainerBuilder::getReflectionClass

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

This PR fixes bug described in #27018 issue.
I think that `getReflectionClass` should return `NULL` when internal type was used instead class name but not throws exception. As well as it does when class is empty. If someone have other opinion we can discuss it.

Commits
-------

314e8813b3 [DI] Add check of internal type to ContainerBuilder::getReflectionClass
2018-04-24 12:28:46 +02:00
Sergey Rabochiy
314e8813b3 [DI] Add check of internal type to ContainerBuilder::getReflectionClass 2018-04-24 12:28:38 +02:00
Fabien Potencier
e775871d82 minor #27013 [HttpFoundation] Add HTTP_EARLY_HINTS const (ahmadmayahi)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #27013).

Discussion
----------

[HttpFoundation] Add HTTP_EARLY_HINTS const

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

Commits
-------

c606d60c54 [HttpFoundation] Add HTTP_EARLY_HINTS const
2018-04-23 14:28:29 +02:00
Ahmad Mayahi
c606d60c54 [HttpFoundation] Add HTTP_EARLY_HINTS const 2018-04-23 14:28:22 +02:00
Fabien Potencier
45f26c416a minor #27012 [DoctrineBridge] Improve exception message at IdReader::getIdValue() (phansys)
This PR was merged into the 2.7 branch.

Discussion
----------

[DoctrineBridge] Improve exception message at `IdReader::getIdValue()`

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

Commits
-------

5e98478d94 [DoctrineBridge] Improve exception message at `IdReader::getIdValue()`
2018-04-23 11:30:02 +02:00
Javier Spagnoletti
5e98478d94 [DoctrineBridge] Improve exception message at IdReader::getIdValue() 2018-04-23 06:20:42 -03:00
Nicolas Grekas
ea25fec603 bug #26994 [PhpUnitBridge] Add type hints (greg0ire)
This PR was merged into the 3.4 branch.

Discussion
----------

[PhpUnitBridge] Add type hints

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no (only changed classes marked as internal)
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #26931
| License       | MIT
| Doc PR        | n/a

This makes classes inheriting from phpunit classes compatible with phpunit 7.

Commits
-------

6fbcc51 Add type hints
2018-04-22 11:29:49 +02:00
Grégoire Paris
6fbcc51566
Add type hints
This makes classes inheriting from phpunit classes compatible with phpunit 7.
Fixes #26931
2018-04-22 11:28:57 +02:00
Fabien Potencier
4057067b99 bug #26014 [Security] Fixed being logged out on failed attempt in guard (iltar)
This PR was merged into the 2.8 branch.

Discussion
----------

[Security] Fixed being logged out on failed attempt in guard

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

This fixes the issue described in the ticket. After this fix, guard will no longer "forget" your authentication when your next attempt fails.

Commits
-------

4fc0ecbf90 Fixed being logged out on failed attempt in guard
2018-04-22 08:05:13 +02:00
Fabien Potencier
82a95dfb22 bug #25348 [HttpFoundation] Send cookies using header() to fix "SameSite" ones (nicolas-grekas, cvilleger)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpFoundation] Send cookies using header() to fix "SameSite" ones

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

Commits
-------

73fec237da [HttpFoundation] Add functional tests for Response::sendHeaders()
e350ea000f [HttpFoundation] Send cookies using header() to fix "SameSite" ones
2018-04-22 08:00:43 +02:00
Fabien Potencier
923417122a fixed CS 2018-04-22 07:56:10 +02:00
Fabien Potencier
a6c22f5edc bug #26910 Use new PHP7.2 functions in hasColorSupport (johnstevenson)
This PR was squashed before being merged into the 2.7 branch (closes #26910).

Discussion
----------

Use new PHP7.2 functions in hasColorSupport

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

Fixes bc break in #26609
Reference: https://github.com/composer/xdebug-handler/blob/master/src/Process.php#L111

Commits
-------

b0c92254a0 Use new PHP7.2 functions in hasColorSupport
2018-04-22 07:55:13 +02:00
johnstevenson
b0c92254a0 Use new PHP7.2 functions in hasColorSupport 2018-04-22 07:55:01 +02:00
Fabien Potencier
3d44c7f982 bug #26999 [VarDumper] Fix dumping of SplObjectStorage (corphi)
This PR was squashed before being merged into the 2.7 branch (closes #26999).

Discussion
----------

[VarDumper] Fix dumping of SplObjectStorage

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

This is a bug fix for dumping instances of `SplObjectStorage`. The bug was introduced in #23176, by fixing that the internal pointer was changed upon dumping. I added tests for both issues.

Commits
-------

b2ac6b6fbf [VarDumper] Fix dumping of SplObjectStorage
2018-04-22 07:46:01 +02:00
Philipp Cordes
b2ac6b6fbf [VarDumper] Fix dumping of SplObjectStorage 2018-04-22 07:45:54 +02:00
cvilleger
73fec237da [HttpFoundation] Add functional tests for Response::sendHeaders() 2018-04-20 20:41:36 +02:00
Nicolas Grekas
6d9d329deb Merge branch '3.4' into 4.0
* 3.4:
  Fix tests
  PropertyInfo\DoctrineExtractor - There is bug when indexBy is meta key
  Fix PercentType error rendering.
  [minor] SCA
  [Cache] Inline some hot function calls
2018-04-20 12:04:09 +02:00
Nicolas Grekas
9a0422ce45 Merge branch '2.8' into 3.4
* 2.8:
  PropertyInfo\DoctrineExtractor - There is bug when indexBy is meta key
  [minor] SCA
2018-04-20 12:02:27 +02:00
Nicolas Grekas
8c5fe4461b Merge branch '2.7' into 2.8
* 2.7:
  [minor] SCA
2018-04-20 11:59:25 +02:00
Nicolas Grekas
939a42f623 Fix tests 2018-04-20 11:55:01 +02:00
Nicolas Grekas
733e81345b bug #25841 [DoctrineBridge] Fix bug when indexBy is meta key in PropertyInfo\DoctrineExtractor (insekticid)
This PR was submitted for the 3.4 branch but it was merged into the 2.8 branch instead (closes #25841).

Discussion
----------

[DoctrineBridge] Fix bug when indexBy is meta key in PropertyInfo\DoctrineExtractor

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

@dunglas could you check it?
<!--
- 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
-------

583759f PropertyInfo\DoctrineExtractor - There is bug when indexBy is meta key
2018-04-20 11:36:54 +02:00
insekticid
583759f0b6 PropertyInfo\DoctrineExtractor - There is bug when indexBy is meta key 2018-04-20 11:36:43 +02:00
Nicolas Grekas
09d1a2b099 bug #26983 [TwigBridge] [Bootstrap 4] Fix PercentType error rendering. (alexismarquis)
This PR was submitted for the 4.0 branch but it was merged into the 3.4 branch instead (closes #26983).

Discussion
----------

[TwigBridge] [Bootstrap 4] Fix PercentType error rendering.

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

Fixes displaying errors for Symfony\Component\Form\Extension\Core\Type\PercentType, as shown in the following screenshots :

**Before :**
![image](https://user-images.githubusercontent.com/4643674/38994012-83ea9598-43e5-11e8-94ac-0eaee1296982.png)

**After :**
![image](https://user-images.githubusercontent.com/4643674/38994047-9f26a50e-43e5-11e8-866d-0cbe0e30b114.png)

Commits
-------

4715397 Fix PercentType error rendering.
2018-04-20 11:32:48 +02:00
Alexis MARQUIS
4715397979 Fix PercentType error rendering. 2018-04-20 11:32:41 +02:00
Nicolas Grekas
b97a4ae031 minor #26938 [minor] SCA (kalessil)
This PR was squashed before being merged into the 2.7 branch (closes #26938).

Discussion
----------

[minor] SCA

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

- Control flow tweaks

Commits
-------

877e678 [minor] SCA
2018-04-20 10:39:24 +02:00