Commit Graph

28144 Commits

Author SHA1 Message Date
Nicolas Grekas
2627c16d0b bug #27591 [VarDumper] Fix dumping ArrayObject and ArrayIterator instances (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[VarDumper] Fix dumping ArrayObject and ArrayIterator instances

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

Properties added on child classes of `ArrayObject` and `ArrayIterator`, or dynamic properties added on instances of them were now properly dumped. This fixes it.

![image](https://user-images.githubusercontent.com/243674/41349429-2660cbc6-6f10-11e8-8015-a3d6ad8b0c9c.png)

Commits
-------

3ecabfc36e [VarDumper] Fix dumping ArrayObject and ArrayIterator instances
2018-06-15 08:50:57 +02:00
Nicolas Grekas
3ecabfc36e [VarDumper] Fix dumping ArrayObject and ArrayIterator instances 2018-06-15 08:44:46 +02:00
Robin Chalas
2643ec87d5 bug #27581 Fix bad method call with guard authentication + session migration (weaverryan)
This PR was squashed before being merged into the 2.8 branch (closes #27581).

Discussion
----------

Fix bad method call with guard authentication + session migration

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no (but there needs to be on master)
| Tests pass?   | yes
| Fixed tickets | #27577
| License       | MIT
| Doc PR        | n/a

I messed up #27452 :/. Guard is the one class where the session migration is not on the listener, it's on the handler. The tricky part is that there is only ONE handler (unlike listeners where there is 1 listener per firewall). That means that implementing a session migration strategy that avoids stateless firewalls was a bit more tricky: I could only think to inject a map into `GuardAuthenticationHandler`. On the bright side, this also fixes session migration (not happening) when people call the `authenticateUserAndHandleSuccess()` method directly.

On master, we'll need to add a deprecation to make the 3rd argument of `authenticateWithToken()` required - it's optional now for BC. We may also need to re-order the constructor args.

I DID test this in a real 2.8 project, to make sure that things were properly wired up. Apologies for not doing that for the other PR.

Cheers!

Commits
-------

2c0ac93 Fix bad method call with guard authentication + session migration
2018-06-12 15:18:03 +02:00
Ryan Weaver
2c0ac93e25 Fix bad method call with guard authentication + session migration 2018-06-12 15:17:58 +02:00
Fabien Potencier
5c2b2bb2ce fixed CS 2018-06-10 12:30:11 +02:00
Fabien Potencier
d2757de3b9 bug #27452 Avoid migration on stateless firewalls (weaverryan)
This PR was squashed before being merged into the 2.8 branch (closes #27452).

Discussion
----------

Avoid migration on stateless firewalls

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | Related to #27395
| License       | MIT
| Doc PR        | symfony/symfony-docs#9860

This is a proof-of-concept. Once we agree / are happy, I need to add this to all of the other authentication mechanisms that recently got the session migration code & add tests.

Basically, this avoids migrating the session if the firewall is stateless. There were 2 options to do this:

A) Make the `SessionAuthenticationStrategy` aware of all stateless firewalls. **This is the current approach**
or
B) Make each individual authentication listener aware whether or not *its* firewall is stateless.

Commits
-------

cca73bb564 Avoid migration on stateless firewalls
2018-06-10 12:27:47 +02:00
Ryan Weaver
cca73bb564 Avoid migration on stateless firewalls 2018-06-10 12:27:33 +02:00
Nicolas Grekas
637963d224 minor #27553 [Finder] revert #27545 (xabbuh)
This PR was merged into the 2.8 branch.

Discussion
----------

[Finder] revert #27545

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

The SplFileInfo class indeed [does exist](https://github.com/symfony/symfony/blob/2.8/src/Symfony/Component/Finder/SplFileInfo.php) in the Symfony\Component\Finder namespace.

Commits
-------

8fd4b441c4 revert #27545
2018-06-08 10:34:53 +02:00
Christian Flothmann
8fd4b441c4 revert #27545
The SplFileInfo class indeed does exist in the Symfony\Component\Finder
namespace.
2018-06-08 09:55:24 +02:00
Fabien Potencier
e2effa3141 minor #27532 Fix security-core cross-dependencies, fixes #27507 (stephank)
This PR was merged into the 2.8 branch.

Discussion
----------

Fix security-core cross-dependencies, fixes #27507

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

Based on earlier changes in #27295

Commits
-------

725d774a16 Fix security-core cross-dependencies, fixes #27507
2018-06-08 08:37:32 +02:00
Nicolas Grekas
39bd755d29 minor #27545 Update Finder.php (tarlepp)
This PR was submitted for the master branch but it was merged into the 2.8 branch instead (closes #27545).

Discussion
----------

Update Finder.php

Corrected return type which causes following error with [psalm](https://getpsalm.org/)
```
ERROR: PossiblyInvalidArgument - src/Command/Utils/CheckVendorDependencies.php:170:62 - Argument 1 of iterator_to_array expects Traversable, possibly different type array<mixed, Symfony\Component\Finder\SplFileInfo>|Iterator provided $directories = array_map($closure, iterator_to_array($finder->getIterator()));
```

| Q             | A
| ------------- | ---
| Branch?       | 4.1 <!-- see below -->
| Bug fix?      | yes (just docblock bug - nothing serious)
| 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 | -  <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | - <!-- required for new features -->

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - 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.
-->

Commits
-------

a74ee8d594 Update Finder.php
2018-06-07 23:32:35 +02:00
Tarmo Leppänen
a74ee8d594 Update Finder.php
Corrected return type which causes following error with (psalm)[https://getpsalm.org/]
```
ERROR: PossiblyInvalidArgument - src/Command/Utils/CheckVendorDependencies.php:170:62 - Argument 1 of iterator_to_array expects Traversable, possibly different type array<mixed, Symfony\Component\Finder\SplFileInfo>|Iterator provided $directories = array_map($closure, iterator_to_array($finder->getIterator()));
```
2018-06-07 23:32:28 +02:00
Stéphan Kochen
725d774a16 Fix security-core cross-dependencies, fixes #27507 2018-06-07 10:54:04 +02:00
Fabien Potencier
ae30a80f77 bug #27514 [Debug] Pass previous exception to FatalErrorException (pmontoya)
This PR was merged into the 2.8 branch.

Discussion
----------

[Debug] Pass previous exception to FatalErrorException

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

Add a previous parameter to FatalErrorException.
Call \ErrorException with this parameter.
Update parent::__constructor for inherited classes with default parameters and the new one

Commits
-------

7f9780b5df Pass previous exception to FatalErrorException
2018-06-06 15:30:44 +02:00
Pascal Montoya
7f9780b5df
Pass previous exception to FatalErrorException 2018-06-06 10:34:52 +02:00
Fabien Potencier
7d2d60ffc3 minor #27502 Remove mentions of "beta" in composer.json files (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

Remove mentions of "beta" in composer.json files

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

There are more to clean up when merging up to master.

Commits
-------

6a0b75fb9b Remove mentions of "beta" in composer.json files
2018-06-06 10:12:31 +02:00
Nicolas Grekas
6a0b75fb9b Remove mentions of "beta" in composer.json files 2018-06-05 10:24:18 +02:00
Nicolas Grekas
efe9beb186 [HttpKernel] Fix restoring trusted proxies in tests 2018-05-31 12:02:37 +02:00
Fabien Potencier
b1f60216a4 minor #27414 CODEOWNERS: some more rules (dunglas)
This PR was merged into the 2.8 branch.

Discussion
----------

CODEOWNERS: some more rules

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

I missed #27079. It'll help me to deal with GitHub notifications...

Commits
-------

8c62ecfad2 CODEOWNERS: some more rules
2018-05-30 07:45:17 +02:00
Kévin Dunglas
8c62ecfad2
CODEOWNERS: some more rules 2018-05-30 07:26:26 +02:00
Fabien Potencier
fa7bec4816 minor #27418 Remove unneeded comments in tests (fabpot)
This PR was merged into the 2.8 branch.

Discussion
----------

Remove unneeded comments in tests

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

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - 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.
-->

Commits
-------

09c660d454 removed unneeded comments in tests
2018-05-30 06:20:36 +02:00
Fabien Potencier
09c660d454 removed unneeded comments in tests 2018-05-30 06:18:42 +02:00
Fabien Potencier
785b4319ad minor #27402 [HttpFoundation] Change PHPDoc in ResponseHeaderBag::getCookies() to help IDEs (dborsatto)
This PR was merged into the 2.8 branch.

Discussion
----------

[HttpFoundation] Change PHPDoc in ResponseHeaderBag::getCookies() to help IDEs

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

Hello,

I'm proposing a very small change to `ResponseHeaderBag` in the HttpFoundation component. The change involves changing the PHPDoc return type of `getCookies()` from a simple `array` to `Cookie[]`. This way, IDEs will play nicely and understand that the returned value is in fact an array of Cookie objects. This is the current behavior:

![Before PR](https://user-images.githubusercontent.com/94651/40648899-d6690f84-632f-11e8-8e43-e09d71b9ccec.png)

whereas with the proposed change, the IDE correctly understands the type:

![After PR](https://user-images.githubusercontent.com/94651/40648980-109621c4-6330-11e8-8ead-f176307e5bda.png)

Commits
-------

479aa9074b Change PHPDoc in ResponseHeaderBag::getCookies() to help IDEs
2018-05-29 13:31:42 +02:00
Davide Borsatto
479aa9074b Change PHPDoc in ResponseHeaderBag::getCookies() to help IDEs 2018-05-29 13:28:37 +02:00
Fabien Potencier
518ec864e9 bug #26973 [HttpKernel] Set first trusted proxy as REMOTE_ADDR in InlineFragmentRenderer. (kmadejski)
This PR was squashed before being merged into the 2.8 branch (closes #26973).

Discussion
----------

[HttpKernel] Set first trusted proxy as REMOTE_ADDR in InlineFragmentRenderer.

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

SubRequest used in `InlineFragmentRendered` explicitly sets `$server['REMOTE_ADDR']` to `127.0.0.1`. Therefore, it's required to configure `127.0.0.1` address in TRUSTED_PROXIES environment variable. Without that, `Request::isFromTrustedProxy()` will return false.
The current behavior might be a little bit problematic, for instance, in case where images are rendered through subrequests. These might end-up with an incorrect schema in URL (`http` instead of `https`).

Commits
-------

18f55feef8 [HttpKernel] Set first trusted proxy as REMOTE_ADDR in InlineFragmentRenderer.
2018-05-27 09:44:41 +02:00
Kamil Madejski
18f55feef8 [HttpKernel] Set first trusted proxy as REMOTE_ADDR in InlineFragmentRenderer. 2018-05-27 09:44:31 +02:00
Fabien Potencier
dc0ac87b89 bug #27303 [Process] Consider "executable" suffixes first on Windows (sanmai)
This PR was squashed before being merged into the 2.8 branch (closes #27303).

Discussion
----------

[Process] Consider "executable" suffixes first on Windows

| 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        | n/a

Executable finder should consider "executable" suffixes first on Windows because we basically ignore executability on Windows (on the lines below changed), which leads, for example, to finding usually-non-executable `phpunit` file first where both `phpunit` and `phpunit.bat` are present.

I may miss something here, so please tell me if this makes any sense.

Same change against master: #27301

Commits
-------

9372e7a813 [Process] Consider \"executable\" suffixes first on Windows
2018-05-27 09:40:52 +02:00
Alexey Kopytko
9372e7a813 [Process] Consider \"executable\" suffixes first on Windows 2018-05-27 09:40:41 +02:00
Fabien Potencier
148e7eff50 bug #27297 Triggering RememberMe's loginFail() when token cannot be created (weaverryan)
This PR was submitted for the 2.7 branch but it was merged into the 2.8 branch instead (closes #27297).

Discussion
----------

Triggering RememberMe's loginFail() when token cannot be created

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no (but minor behavior change)
| Deprecations? | no->
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | not needed

This is an edge-case bug fix. If, for example, someone tampers with the remember me cookie, and so it is invalid, this causes the `->autoLogin()` call to throw an `AuthenticationException`. But, this did not call the `loginFail()` method.

Honestly, I'm not sure if the old or new behavior is correct. But, we should discuss and merge or close.

Commits
-------

e3412e6a67 Triggering RememberMe's loginFail() when token cannot be created
2018-05-27 09:16:38 +02:00
Ryan Weaver
e3412e6a67 Triggering RememberMe's loginFail() when token cannot be created 2018-05-27 09:16:31 +02:00
Nicolas Grekas
4279f53e34 bug #27366 [DI] never inline lazy services (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[DI] never inline lazy services

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

Should apply also:
- to deprecated services since 2.8
- to errored services since 3.4

Commits
-------

3b4d7ab56c [DI] never inline lazy services
2018-05-25 16:36:25 +02:00
Nicolas Grekas
9c089b3f09 minor #27355 Add code of Conduct links in our README (javiereguiluz)
This PR was submitted for the 2.7 branch but it was merged into the 2.8 branch instead (closes #27355).

Discussion
----------

Add code of Conduct links in our README

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| 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 | -   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | - <!-- required for new features -->

Commits
-------

40e59a6415 Add code of Conduct links in our README
2018-05-25 16:34:13 +02:00
Javier Eguiluz
40e59a6415 Add code of Conduct links in our README 2018-05-25 16:34:01 +02:00
Nicolas Grekas
3b4d7ab56c [DI] never inline lazy services 2018-05-25 15:50:34 +02:00
Nicolas Grekas
586b1231f8 minor #27370 Default testsuite to latest PHPUnit 6.* (ostrolucky)
This PR was submitted for the 2.7 branch but it was merged into the 2.8 branch instead (closes #27370).

Discussion
----------

Default testsuite to latest PHPUnit 6.*

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

Necessary to fix each() function deprecation calls introduced in PHP 7.2

![obrazok](https://user-images.githubusercontent.com/496233/40514525-b6099d64-5fa9-11e8-906b-ccd8c358b5a5.png)

Commits
-------

37e543329a Default testsuite to latest PHPUnit 6.*
2018-05-25 15:04:14 +02:00
Gabriel Ostrolucký
37e543329a Default testsuite to latest PHPUnit 6.*
Necessary to fix each() function deprecation calls introduced in PHP 7.2
2018-05-25 15:04:04 +02:00
Nicolas Grekas
2fd6ab9b02 minor #27376 [Github] Update the pull-request template (sroze)
This PR was squashed before being merged into the 2.8 branch (closes #27376).

Discussion
----------

[Github] Update the pull-request template

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

2.7 is end of life.

Commits
-------

99327a6153 [Github] Update the pull-request template
2018-05-25 15:02:56 +02:00
Samuel ROZE
99327a6153 [Github] Update the pull-request template 2018-05-25 15:02:46 +02:00
Fabien Potencier
37846d453a bumped Symfony version to 2.8.42 2018-05-25 14:30:40 +02:00
Fabien Potencier
24fc640d54
Merge pull request #27375 from fabpot/release-2.8.41
released v2.8.41
2018-05-25 14:03:11 +02:00
Fabien Potencier
786970f17d updated VERSION for 2.8.41 2018-05-25 14:02:50 +02:00
Fabien Potencier
ef0b5004f8 updated CHANGELOG for 2.8.41 2018-05-25 14:02:41 +02:00
Fabien Potencier
ca6cc78c7e Merge branch '2.7' into 2.8
* 2.7:
  [HttpFoundation] Fix perf issue during MimeTypeGuesser intialization
2018-05-25 13:00:14 +02:00
Fabien Potencier
ab32125187 bug #27359 [HttpFoundation] Fix perf issue during MimeTypeGuesser intialization (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] Fix perf issue during MimeTypeGuesser intialization

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

introduced in #26886

![image](https://user-images.githubusercontent.com/243674/40451947-918f5358-5ee0-11e8-9f1a-cf707bf3cefa.png)

Commits
-------

f8e7a18d1b [HttpFoundation] Fix perf issue during MimeTypeGuesser intialization
2018-05-25 12:53:06 +02:00
Fabien Potencier
2ed0cedb19 fixed constraints 2018-05-25 09:32:23 +02:00
Fabien Potencier
43a0affb8f Merge branch '2.7' into 2.8
* 2.7:
  fixed constraints
  bumped dep
  bumped dep
2018-05-25 08:52:49 +02:00
Fabien Potencier
2f34263a1a fixed constraints 2018-05-25 08:35:17 +02:00
Fabien Potencier
1151ab28c0 bumped dep 2018-05-25 08:20:37 +02:00
Fabien Potencier
87153549f6 bumped dep 2018-05-25 07:45:02 +02:00
Christian Flothmann
32c73a71a7 fixtures config fix 2018-05-24 20:59:44 +02:00