Commit Graph

33761 Commits

Author SHA1 Message Date
Fabien Potencier
4910ac6fe9 bug #24686 Fix $_ENV/$_SERVER precedence in test framework (fabpot)
This PR was merged into the 3.3 branch.

Discussion
----------

Fix $_ENV/$_SERVER precedence in test framework

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

When defining env vars values in `phpunit.xml.dist`, we are using `<env ...>`. PHPUnit registers those env vars in `$_ENV`, but not in `$_SERVER`. This means that those values might not be used by Symfony if env vars defined in `.env` are automatically registered (which is my case).

In any case, I think it makes sense to make `$_ENV` take precedence as this is how we register them in `phpunit.xml.dist`.

Commits
-------

6ed9919d24 fixed $_ENV/$_SERVER precedence in test framework
2017-10-26 09:22:06 -07:00
Tobias Schultze
85551141a5 minor #24613 Remove redundant sprintf argument. (Aliance)
This PR was merged into the 2.7 branch.

Discussion
----------

Remove redundant sprintf argument.

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

cc @fabpot @ogizanagi

Commits
-------

c8012f0448 Remove redundant sprintf arguments.
2017-10-26 16:04:37 +02:00
Tobias Schultze
fdac9e3911 bug #24691 [HttpFoundation] Fix caching of session-enabled pages (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpFoundation] Fix caching of session-enabled pages

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

Commits
-------

572e02cec5 [HttpFoundation] Fix caching of session-enabled pages
2017-10-26 12:26:53 +02:00
Tobias Schultze
beee423bc8 feature #24677 [HttpFoundation] Allow DateTimeImmutable in Response setters (derrabus)
This PR was merged into the 4.0-dev branch.

Discussion
----------

[HttpFoundation] Allow DateTimeImmutable in Response setters

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

## Proposal

This PR adds the ability to use `DateTimeImmutable` objects instead of `DateTime` in the following setters of HttpFoundation's `Response` class.

* `setDate()`
* `setExpires()`
* `setLastModified()`

The corresponding getters are not touched, meaning they will still return good old `DateTime` instances.

## BC considerations

* Calling code using `DateTime` objects will still work as before.
* Classes derived from `Response` will break if they override one of the methods above. Since all of them are considered final in Symfony 4, none of them should be overridden, though.

Commits
-------

cc7cceef9b Allow DateTimeImmutable in Response setters.
2017-10-26 12:07:21 +02:00
Fabien Potencier
6ed9919d24 fixed $_ENV/$_SERVER precedence in test framework 2017-10-25 18:38:07 -07:00
Fabien Potencier
0686378f3f bug #24694 [Intl] Allow passing null as a locale fallback (jakzal)
This PR was merged into the 4.0-dev branch.

Discussion
----------

[Intl] Allow passing null as a locale fallback

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

[`Null` is passed in `update-data.php`](e2b4a35a72/src/Symfony/Component/Intl/Resources/bin/update-data.php (L209)) to prevent falling back to English locale during icu data import. It's been always possible, but since it hasn't been documented in the docblock it was missed while merging #23262.

Commits
-------

e2b4a35a72 [Intl] Allow passing null as a locale fallback
2017-10-25 18:35:58 -07:00
Fabien Potencier
d744027357 bug #24606 [HttpFoundation] Fix FileBag issue with associative arrays (enumag)
This PR was squashed before being merged into the 2.7 branch (closes #24606).

Discussion
----------

[HttpFoundation] Fix FileBag issue with associative arrays

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

Commits
-------

8ea2860996 [HttpFoundation] Fix FileBag issue with associative arrays
2017-10-25 18:19:06 -07:00
Jáchym Toušek
8ea2860996 [HttpFoundation] Fix FileBag issue with associative arrays 2017-10-25 18:19:04 -07:00
Fabien Potencier
6cf3d5681a bug #24673 [DI] Throw when a service name or an alias contains dynamic values (prevent an infinite loop) (dunglas)
This PR was squashed before being merged into the 3.3 branch (closes #24673).

Discussion
----------

[DI] Throw when a service name or an alias contains dynamic values (prevent an infinite loop)

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

If an environment variable is used to build a service name (like in [this snippet](4b3d1abfe5/src/Bridge/Symfony/Bundle/DependencyInjection/ApiPlatformExtension.php (L471))), an infinite loop occurs.

It's common to build dynamic service names (in a compiler pass), if the dynamic part comes from a parameter, this bug can occurs.

Commits
-------

14e30857ea [DI] Throw when a service name or an alias contains dynamic values (prevent an infinite loop)
2017-10-25 18:14:48 -07:00
Kévin Dunglas
14e30857ea [DI] Throw when a service name or an alias contains dynamic values (prevent an infinite loop) 2017-10-25 18:14:47 -07:00
Jakub Zalas
e2b4a35a72
[Intl] Allow passing null as a locale fallback
Null is passed in update-data.php to prevent falling back to English locale during icu data import.
2017-10-25 22:09:13 +01:00
Fabien Potencier
b0cf42b32b minor #24680 [HttpFoundation] Fix RedirectResponse factory method phpdoc (ronfroy)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] Fix RedirectResponse factory method phpdoc

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

Fix the phpdoc of the factory method on the RedirectResponse (signatures are different between Response and RedirectResponse).

Commits
-------

7cd3049454 fix the phpdoc that is not really inherited from response
2017-10-25 11:30:31 -07:00
Fabien Potencier
e1daff4a19 bug #24684 [Security] remove invalid deprecation notice on AbstractGuardAuthenticator::supports() (kbond)
This PR was merged into the 3.4 branch.

Discussion
----------

[Security] remove invalid deprecation notice on AbstractGuardAuthenticator::supports()

| 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/pull/16835#issuecomment-339097374
| License       | MIT
| Doc PR        | n/a

This deprecation flag causes a false positive.

Commits
-------

5fb44e767e [Guard] remove invalid deprecation notice
2017-10-25 11:28:42 -07:00
Nicolas Grekas
64bed1b77d Merge branch '3.4'
* 3.4:
  Revert "minor #24685 Make it easy for Drupal to use the PHPUnit bridge (alexpott)"
2017-10-25 18:54:58 +02:00
Nicolas Grekas
78426b79d2 Merge branch '3.3' into 3.4
* 3.3:
  Revert "minor #24685 Make it easy for Drupal to use the PHPUnit bridge (alexpott)"
2017-10-25 18:54:45 +02:00
Nicolas Grekas
ea3a9a9f96 Revert "minor #24685 Make it easy for Drupal to use the PHPUnit bridge (alexpott)"
This reverts commit 41509a2dcf, reversing
changes made to 3e3e74c3fa.
2017-10-25 18:54:16 +02:00
Nicolas Grekas
572e02cec5 [HttpFoundation] Fix caching of session-enabled pages 2017-10-25 18:42:56 +02:00
Nicolas Grekas
a3a8c2824d Merge branch '3.4'
* 3.4:
  Make it easy for Drupal to use the PHPUnit bridge
2017-10-25 16:41:58 +02:00
Nicolas Grekas
82032814b7 Merge branch '3.3' into 3.4
* 3.3:
  Make it easy for Drupal to use the PHPUnit bridge
2017-10-25 16:41:49 +02:00
Nicolas Grekas
41509a2dcf minor #24685 Make it easy for Drupal to use the PHPUnit bridge (alexpott)
This PR was squashed before being merged into the 3.3 branch (closes #24685).

Discussion
----------

Make it easy for Drupal to use the PHPUnit bridge

| 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 | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

<!--
- 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 3.4,
  legacy code removals go to the master branch.
- Please fill in this template according to the PR you're about to submit.
- Replace this comment by a description of what your PR is solving.
-->

Drupal doesn't use src/Symfony/Bridge/PhpUnit/bin/simple-phpunit but would like to use the deprecation collection features of src/Symfony/Bridge/PhpUnit. The checks in src/Symfony/Bridge/PhpUnit/bootstrap.php mean that this is difficult because they rely on simple-phpunit - but I'm not sure that that is necessary.

Commits
-------

1de6bf8 Make it easy for Drupal to use the PHPUnit bridge
2017-10-25 16:41:27 +02:00
Alex Pott
1de6bf87b9 Make it easy for Drupal to use the PHPUnit bridge 2017-10-25 16:41:18 +02:00
Nicolas Grekas
cb5908df22 Merge branch '3.4'
* 3.4:
  Fix phpunit bridge
2017-10-25 11:57:11 +02:00
Nicolas Grekas
ed8c731177 Merge branch '3.3' into 3.4
* 3.3:
  Fix phpunit bridge
2017-10-25 11:57:07 +02:00
Nicolas Grekas
3e3e74c3fa Fix phpunit bridge 2017-10-25 11:55:09 +02:00
Nicolas Grekas
e3d993807c Merge branch '3.4'
* 3.4:
  Fix simple-phpunit
2017-10-25 11:25:24 +02:00
Nicolas Grekas
8d179a3bdd Merge branch '3.3' into 3.4
* 3.3:
  Fix simple-phpunit
2017-10-25 11:25:19 +02:00
Nicolas Grekas
7e6e2f07e2 Fix simple-phpunit 2017-10-25 11:25:11 +02:00
Nicolas Grekas
d65a7f0329 Merge branch '3.4'
* 3.4:
  [VarDumper] Fix test
2017-10-25 10:49:37 +02:00
Nicolas Grekas
b6a0a38c4d [VarDumper] Fix test 2017-10-25 10:48:42 +02:00
Nicolas Grekas
7414ef9561 Merge branch '3.4'
* 3.4:
  Fix isolated error handling
2017-10-25 10:02:05 +02:00
Nicolas Grekas
c98db6ae2e Merge branch '3.3' into 3.4
* 3.3:
  Fix isolated error handling
2017-10-25 10:01:59 +02:00
Nicolas Grekas
107705abd3 bug #24681 Fix isolated error handling (alexpott)
This PR was squashed before being merged into the 3.3 branch (closes #24681).

Discussion
----------

Fix isolated error handling

| 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?   | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

<!--
- 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 3.4,
  legacy code removals go to the master branch.
- Please fill in this template according to the PR you're about to submit.
- Replace this comment by a description of what your PR is solving.
-->

Fixes \Symfony\Bridge\PhpUnit\Tests\ProcessIsolationTest on PHP5.5 and PHP5.6 and (probably) HHVM.

Commits
-------

b1a2205 Fix isolated error handling
2017-10-25 10:01:09 +02:00
Alex Pott
b1a22059e7 Fix isolated error handling 2017-10-25 10:00:59 +02:00
Kevin Bond
5fb44e767e
[Guard] remove invalid deprecation notice 2017-10-24 15:52:50 -04:00
Rudy Onfroy
7cd3049454 fix the phpdoc that is not really inherited from response 2017-10-24 20:42:41 +02:00
Nicolas Grekas
872c41a20b Merge branch '3.4'
* 3.4:
  Ensure that PHPUnit's error handler is still working in isolated tests
  Fix review points
2017-10-24 19:17:22 +02:00
Nicolas Grekas
03b01c36e4 Merge branch '3.3' into 3.4
* 3.3:
  Ensure that PHPUnit's error handler is still working in isolated tests
  Fix review points
2017-10-24 19:17:17 +02:00
Nicolas Grekas
e6d949b233 minor #24604 Fix deprecation triggering test deduction (alexpott)
This PR was merged into the 3.3 branch.

Discussion
----------

Fix deprecation triggering test deduction

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| 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 | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

<!--
- 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 3.4,
  legacy code removals go to the master branch.
- Please fill in this template according to the PR you're about to submit.
- Replace this comment by a description of what your PR is solving.
-->
This PR is just testing some additions https://github.com/symfony/symfony/pull/24597 - I want to see if the travis run is successful.

Commits
-------

5333680 Fix review points
2017-10-24 19:16:44 +02:00
Nicolas Grekas
8984260f38 bug #24575 Ensure that PHPUnit's error handler is still working in isolated tests (alexpott)
This PR was squashed before being merged into the 3.3 branch (closes #24575).

Discussion
----------

Ensure that PHPUnit's error handler is still working in isolated tests

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| 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 | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

<!--
- 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 3.4,
  legacy code removals go to the master branch.
- Please fill in this template according to the PR you're about to submit.
- Replace this comment by a description of what your PR is solving.
-->

This PR fixes the \Symfony\Bridge\PhpUnit\Tests\ProcessIsolationTest and adds new coverage to ensure PHPUnit error handling works as expected. Tested with both PHPUnit 4.8.35 and 6.2.4

Commits
-------

dc7e5a3 Ensure that PHPUnit's error handler is still working in isolated tests
2017-10-24 19:15:55 +02:00
Alex Pott
dc7e5a39fa Ensure that PHPUnit's error handler is still working in isolated tests 2017-10-24 19:15:51 +02:00
Alex Pott
5333680f7d Fix review points 2017-10-24 17:40:01 +01:00
Alexander M. Turek
cc7cceef9b Allow DateTimeImmutable in Response setters. 2017-10-24 18:23:15 +02:00
Nicolas Grekas
595b13a908 Merge branch '3.4'
* 3.4:
  fix deprecation triggering test detection
2017-10-24 18:03:51 +02:00
Nicolas Grekas
b7439238c9 Merge branch '3.3' into 3.4
* 3.3:
  fix deprecation triggering test detection
2017-10-24 18:03:34 +02:00
Nicolas Grekas
4365d23e38 bug #24597 [PhpUnitBridge] fix deprecation triggering test detection (xabbuh)
This PR was merged into the 3.3 branch.

Discussion
----------

[PhpUnitBridge] fix deprecation triggering test detection

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/24548#issuecomment-336438768, #24568
| License       | MIT
| Doc PR        |

Commits
-------

da617e8 fix deprecation triggering test detection
2017-10-24 17:58:59 +02:00
Nicolas Grekas
9233549861 minor #24611 Remove some visual debt by adding type hints on final methods/classes (nicolas-grekas)
This PR was merged into the 4.0-dev branch.

Discussion
----------

Remove some visual debt by adding type hints on final methods/classes

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

Commits
-------

5eab353 Remove some visual debt by adding type hints on final methods/classes
2017-10-24 16:46:42 +02:00
Robin Chalas
ec0867f59d Merge branch '3.4'
* 3.4:
  fix merge
2017-10-24 16:41:02 +02:00
Robin Chalas
7f9ef83020 Merge branch '3.3' into 3.4
* 3.3:
  fix merge
2017-10-24 16:40:29 +02:00
Robin Chalas
d9746d45b1 fix merge 2017-10-24 16:40:00 +02:00
Nicolas Grekas
5eab353117 Remove some visual debt by adding type hints on final methods/classes 2017-10-24 16:36:35 +02:00