Commit Graph

32517 Commits

Author SHA1 Message Date
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
Nicolas Grekas
fdb0ea9fdd [DI] Enhance service locator error message 2017-10-17 00:51:02 +02: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
Christian Flothmann
2f5a0bd72f fix serialized deprecations handling 2017-10-13 16:13:33 +02:00
Fabien Potencier
4ebd60f7f9 bug #24536 [Security] Reject remember-me token if UserCheckerInterface::checkPostAuth() fails (kbond)
This PR was merged into the 2.7 branch.

Discussion
----------

[Security] Reject remember-me token if UserCheckerInterface::checkPostAuth() fails

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

I think this is a security hole - a user can remain logged in with a remember me cookie even though they can no longer pass `UserCheckInterface::checkPostAuth()` (could be disabled).

This is a small BC break but shouldn't be an issue as I think it is a bug. I don't think this requires a BC layer but if so, I can add.

Commits
-------

fe190b6ee9 reject remember-me token if user check fails
2017-10-13 06:42:43 -07:00
Nicolas Grekas
17b48edebc Merge branch '2.8' into 3.3
* 2.8:
  [Validator] added magic method __isset()  to File Constraint class
  [DI] Fix possible incorrect php-code when dumped strings contains newlines
  [Translation] minor: remove unused variable in test
  never match invalid IP addresses
2017-10-13 15:32:37 +02:00
Nicolas Grekas
d04c0ea45b Merge branch '2.7' into 2.8
* 2.7:
  [Validator] added magic method __isset()  to File Constraint class
  [DI] Fix possible incorrect php-code when dumped strings contains newlines
  [Translation] minor: remove unused variable in test
  never match invalid IP addresses
2017-10-13 15:30:20 +02:00
Fabien Potencier
4ae1f896d7 bug #24548 [Bridge\PhpUnit] Handle deprecations triggered in separate processes (paul-m)
This PR was merged into the 3.3 branch.

Discussion
----------

[Bridge\PhpUnit] Handle deprecations triggered in separate processes

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

As reported in #23003, deprecations triggered in process-isolated test cases are not gathered.
This caught us already: HttpFoundation is still using deprecated code paths, but we missed them because of that issue with the bridge.

Here is the fixed output:
![capture du 2017-10-13 13-45-12](https://user-images.githubusercontent.com/243674/31544827-fe7ffee0-b01c-11e7-8020-4001735ce7a3.png)

Credits to @paul-m for working on the issue first.

Commits
-------

ca0fedd9e3 [BrowserKit] Handle deprecations triggered in insulated requests
ff379efb59 [Bridge\PhpUnit] Handle deprecations triggered in separate processes
2017-10-13 06:22:41 -07:00
Nicolas Grekas
ca0fedd9e3 [BrowserKit] Handle deprecations triggered in insulated requests 2017-10-13 15:21:24 +02:00
Paul Mitchum
ff379efb59 [Bridge\PhpUnit] Handle deprecations triggered in separate processes 2017-10-13 15:20:39 +02:00
Fabien Potencier
2059609ccb bug #24519 [Validator] [Twig] added magic method __isset() to File Constraint class (loru88)
This PR was submitted for the 3.4 branch but it was merged into the 2.7 branch instead (closes #24519).

Discussion
----------

[Validator] [Twig] added magic method __isset()  to File Constraint class

| Q             | A
| ------------- | ---
| Branch?       | 3.4 or master / 2.7, 2.8 or 3.3 <!-- see comment below -->
| Bug fix?      | no
| New feature?  | yes <!-- 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 | #24512  <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

In my project I get assert constraints from one of my entity and I use this value in my front end via Twig.
I faced a problem with the property $maxSize of the File Constraint.

As this property is protected I cannot access it via Twig because the magic method __isset is missing, as I read in twig documentation.
<!--
- 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.
-->

Commits
-------

9efb76572a [Validator] added magic method __isset()  to File Constraint class
2017-10-12 14:44:38 -07:00
loru88
9efb76572a [Validator] added magic method __isset() to File Constraint class 2017-10-12 14:44:30 -07:00
Nicolas Grekas
262b4f3b83 bug #24532 [DI] Fix possible incorrect php-code when dumped strings contains newlines (Strate)
This PR was squashed before being merged into the 2.7 branch (closes #24532).

Discussion
----------

[DI] Fix possible incorrect php-code when dumped strings contains newlines

| 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 | ?
| License       | MIT
| Doc PR        | no

See discussion #24517

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

Commits
-------

345f2fc [DI] Fix possible incorrect php-code when dumped strings contains newlines
2017-10-12 17:34:58 +02:00
Artur Eshenbrener
345f2fc60e [DI] Fix possible incorrect php-code when dumped strings contains newlines 2017-10-12 17:34:26 +02:00
Kevin Bond
fe190b6ee9
reject remember-me token if user check fails 2017-10-12 11:00:29 -04:00
Nicolas Grekas
5e0bb5f973 minor #24528 [Translation] minor: remove unused variable in test (dunglas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Translation] minor: remove unused variable in test

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| 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        | n/a

Commits
-------

c6ed0e4 [Translation] minor: remove unused variable in test
2017-10-12 10:59:24 +02:00
Kévin Dunglas
c6ed0e4f86
[Translation] minor: remove unused variable in test 2017-10-12 09:08:46 +02:00
Fabien Potencier
da25d444e9 bug #24502 [HttpFoundation] never match invalid IP addresses (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] never match invalid IP addresses

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

Commits
-------

8ad32f0ef5 never match invalid IP addresses
2017-10-10 10:31:42 -07:00
Christian Flothmann
788eb4f0bb minor #24509 fix PHP 7.2 compatibility (xabbuh)
This PR was merged into the 3.3 branch.

Discussion
----------

fix PHP 7.2 compatibility

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

* the `phpdocumentor/type-resolver` package was not PHP 7.2 compatible
  before release 0.2.1 (see see phpDocumentor/TypeResolver@e224fb2)
* the validator must not call `get_class()` if no object but a class
  name was passed to the `validatePropertyValue()` method

Commits
-------

2d2022c fix PHP 7.2 compatibility
2017-10-10 15:56:12 +02:00
Christian Flothmann
2d2022cc11 fix PHP 7.2 compatibility
* the `phpdocumentor/type-resolver` package was not PHP 7.2 compatible
  before release 0.2.1 (see see phpDocumentor/TypeResolver@e224fb2)
* the validator must not call `get_class()` if no object but a class
  name was passed to the `validatePropertyValue()` method
2017-10-10 15:45:28 +02:00
Nicolas Grekas
9719fba0ab fix merge 2017-10-10 12:34:18 +02:00
Nicolas Grekas
6595615255 fix merge 2017-10-10 12:32:49 +02:00
Nicolas Grekas
01c50eb070 Merge branch '2.8' into 3.3
* 2.8:
  fix merge
  Fix 7.2 compat layer
  Fix PHP 7.2 support
  [HttpFoundation] Add missing session.lazy_write config option
  [HttpFoundation] Combine Cache-Control headers
  [Form] fix parsing invalid floating point numbers
  Escape command usage when displaying it in the text descriptor
  Use for=ID on radio/checkbox label.
2017-10-10 12:12:32 +02:00
Nicolas Grekas
e71c4f71f5 fix merge 2017-10-10 12:05:53 +02:00
Christian Flothmann
8ad32f0ef5 never match invalid IP addresses 2017-10-10 10:04:23 +02:00
Nicolas Grekas
d7b3a6234a Merge branch '2.7' into 2.8
* 2.7:
  Fix 7.2 compat layer
  Fix PHP 7.2 support
  [HttpFoundation] Add missing session.lazy_write config option
  [HttpFoundation] Combine Cache-Control headers
  [Form] fix parsing invalid floating point numbers
  Escape command usage when displaying it in the text descriptor
  Use for=ID on radio/checkbox label.
2017-10-10 09:42:03 +02:00
Fabien Potencier
aaa5999131 bug #24460 [Form] fix parsing invalid floating point numbers (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] fix parsing invalid floating point numbers

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

Should make AppVeyor builds pass again. Code borrowed from `NumberToLocalizedStringTransformer`.

Commits
-------

042eac4624 [Form] fix parsing invalid floating point numbers
2017-10-09 21:27:06 -07:00
Fabien Potencier
2392798ed6 bug #24490 [HttpFoundation] Combine Cache-Control headers (c960657)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] Combine Cache-Control headers

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

If multiple `Cache-Control` headers are added to a `ResponseHeaderBag`, only the first is returned by `$bag->get('Cache-Control')`.

Commits
-------

1f76a70b6f [HttpFoundation] Combine Cache-Control headers
2017-10-09 21:24:00 -07:00