Commit Graph

35962 Commits

Author SHA1 Message Date
Fabien Potencier
c5dc846806 updated CHANGELOG for 4.0.10 2018-05-21 16:02:26 +02:00
Fabien Potencier
dff61b82ff fixed bad merge 2018-05-21 13:07:53 +02:00
Fabien Potencier
2ce15f9179 removed obsolete tests 2018-05-21 12:58:57 +02:00
Fabien Potencier
f2419ddda6 fixed bad merge 2018-05-21 12:48:24 +02:00
Fabien Potencier
4d8a71d321 Merge branch '3.4' into 4.0
* 3.4:
  do not mock the session in token storage tests
  [DependencyInjection] resolve array env vars
  Add Occitan plural rule
  Fix security/* cross-dependencies
  [Lock] Skip test if posix extension is not installed
  [DI] Allow defining bindings on ChildDefinition
  use strict compare in url validator
  Disallow illegal characters like "." in session.name
  [HttpKernel] do file_exists() check instead of silent notice
  fix rounding from string
2018-05-21 12:09:47 +02:00
Fabien Potencier
793d1fe71a Merge branch '2.8' into 3.4
* 2.8:
  do not mock the session in token storage tests
  Add Occitan plural rule
  Fix security/* cross-dependencies
  Disallow illegal characters like "." in session.name
  fix rounding from string
2018-05-21 12:06:52 +02:00
Fabien Potencier
e336711cd9 Merge branch '2.7' into 2.8
* 2.7:
  do not mock the session in token storage tests
  Add Occitan plural rule
  Disallow illegal characters like "." in session.name
  fix rounding from string
2018-05-21 11:59:10 +02:00
Robin Chalas
1c520a920f minor #27310 [Security] do not mock the session in token storage tests (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Security] do not mock the session in token storage tests

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

Commits
-------

919f93d do not mock the session in token storage tests
2018-05-19 06:09:13 +02:00
Christian Flothmann
919f93d91c do not mock the session in token storage tests 2018-05-18 20:00:42 +02:00
Fabien Potencier
dd2c4c5a70 minor #27249 [HttpKernel] do file_exists() check instead of silent notice (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] do file_exists() check instead of silent notice

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

Commits
-------

f8cde70ba1 [HttpKernel] do file_exists() check instead of silent notice
2018-05-18 04:03:52 +02:00
Fabien Potencier
81cef4b774 bug #27264 [Validator] Use strict type in URL validator (mimol91)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Use strict type in URL validator

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

Using `checkDNS` option with value `true` generate error `Warning: checkdnsrr(): Type '1' not supported`.
In SF 3.4  it was mark as depreciation and silently converted to `ANY`  https://github.com/symfony/symfony/blob/v3.4.9/src/Symfony/Component/Validator/Constraints/UrlValidator.php#L79

~~Test are failing on `Symfony\Component\HttpKernel\Tests\ControllerMetadata\ArgumentMetadataFactoryTest::testSignature1` - I think its not related~~

Commits
-------

2400e71962 use strict compare in url validator
2018-05-18 04:00:55 +02:00
Fabien Potencier
4f9d907064 bug #27267 [DependencyInjection] resolve array env vars (jamesthomasonjr)
This PR was squashed before being merged into the 3.4 branch (closes #27267).

Discussion
----------

[DependencyInjection] resolve array env vars

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

## Why
This bugfix solves a problem where environment variables resolved as an array would cause an error while compiling the container if they aren't the last parameter in the ParameterBag: the next parameter to be resolved would fail at the `stripos()` check. More information about the bug is available at #27239

## Tests
- This PR modifies existing ContainerBuilder tests to make use of the EnvVarProcessor to resolve json strings into arrays, instead of relying upon a TestingEnvPlaceholderParameterBag class.
  - I would liked to have kept EnvVarProcessor logic out of the ContainerBuilder tests, but it was the interaction between the ContainerBuilder and EnvVarProcessor that caused the bug
- This PR adds a new ContainerBuilder test to verify that an environment variable resolved into an array doesn't cause an error when the next variable attempts to be resolved

## Code
- ~This PR adds an `\is_string()` sanity check before the `stripos()` method call so that only a string are passed into `stripos()`~
- This PR also adds a `$completed` flag so that completely resolved environment variables (currently only determined by `$placeholder === $value`) can break out of the loop early (handled via `break 2;`

Commits
-------

4c3b950dc2 [DependencyInjection] resolve array env vars
2018-05-18 03:58:36 +02:00
Thomason, James
4c3b950dc2 [DependencyInjection] resolve array env vars 2018-05-18 03:58:30 +02:00
Robin Chalas
c29f34ed73 minor #27278 [Lock] Skip test if posix extension is not installed (ostrolucky)
This PR was merged into the 3.4 branch.

Discussion
----------

[Lock] Skip test if posix extension is not installed

This isn't installed by default on Fedora

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

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

97cbea0 [Lock] Skip test if posix extension is not installed
2018-05-17 13:42:52 +02:00
Fabien Potencier
05d69bb739 bug #26781 [Form] Fix precision of MoneyToLocalizedStringTransformer's divisions on transform() (syastrebov)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Fix precision of MoneyToLocalizedStringTransformer's divisions on transform()

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

Related issue https://github.com/symfony/symfony/issues/21026.
Previous PR https://github.com/symfony/symfony/pull/24036.
Similar fix for `transform()` method.

Commits
-------

f94b7aadd3 fix rounding from string
2018-05-17 12:49:33 +02:00
Fabien Potencier
4c08893861 minor #27295 Fix security/* cross-dependencies (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

Fix security/* cross-dependencies

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

Let's allow installing security-fixed versions of the security/* components.

Commits
-------

44cef5a69d Fix security/* cross-dependencies
2018-05-17 12:46:26 +02:00
Fabien Potencier
e1f553d741 bug #27286 [Translation] Add Occitan plural rule (kylekatarnls)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #27286).

Discussion
----------

[Translation] Add Occitan plural rule

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

Enable correct plural on Occitan translations. Could be safely merged in versions branches.

Commits
-------

0de3a61cfc Add Occitan plural rule
2018-05-17 12:34:13 +02:00
Kyle
0de3a61cfc Add Occitan plural rule 2018-05-17 12:34:06 +02:00
Fabien Potencier
c280f8aa27 bug #27271 [DI] Allow defining bindings on ChildDefinition (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Allow defining bindings on ChildDefinition

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

Spotted by @stof while trying to put https://github.com/symfony/monolog-bundle/pull/254 into practice.
Binding log channels doesn't work because we put this artificial restriction in place.
Let's allow ChildDefinition to have bindings (but only at the DI extension level, loaders still forbid defining them at their level because of the parent vs _defaults ambiguity.)

Commits
-------

1c3b1055df [DI] Allow defining bindings on ChildDefinition
2018-05-17 12:22:44 +02:00
Fabien Potencier
e98ce72e26 bug #27246 Disallow invalid characters in session.name (ostrolucky)
This PR was merged into the 2.7 branch.

Discussion
----------

Disallow invalid characters in session.name

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

PHP saves cookie with correct name, but upon deserialization to
`$_COOKIE`, it replaces "." characters with "_".

This is probably also reason why \SessionHandler is not able to find
a session.

https://harrybailey.com/2009/04/dots-arent-allowed-in-php-cookie-names/
https://bugs.php.net/bug.php?id=75883

Commits
-------

16ebb43bd4 Disallow illegal characters like "." in session.name
2018-05-17 12:20:37 +02:00
Nicolas Grekas
44cef5a69d Fix security/* cross-dependencies 2018-05-17 12:20:34 +02:00
Nicolas Grekas
2f07052c25 Merge branch '3.4' into 4.0
* 3.4:
  Fix dep
2018-05-16 17:17:42 +02:00
Nicolas Grekas
c18813d13d Fix dep 2018-05-16 17:16:55 +02:00
Nicolas Grekas
544af2dd8b Merge branch '3.4' into 4.0
* 3.4:
  [PropertyInfo] fix resolving parent|self type hints
  fixed CS
2018-05-16 16:21:07 +02:00
Nicolas Grekas
5327957ff9 bug #27287 [PropertyInfo] fix resolving parent|self type hints (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[PropertyInfo] fix resolving parent|self type hints

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

Commits
-------

88a3b90860 [PropertyInfo] fix resolving parent|self type hints
2018-05-16 16:13:01 +02:00
Nicolas Grekas
2a10cc6047 bug #27281 [HttpKernel] Fix dealing with self/parent in ArgumentMetadataFactory (fabpot)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] Fix dealing with self/parent in ArgumentMetadataFactory

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

Applies CS fixes that where merged on 4.0 to 3.4, embeds a fix in ArgumentMetadataFactory, which couldn't deal with self/parent type hints.

Commits
-------

ba5cb1a245 fixed CS
2018-05-16 16:03:39 +02:00
Nicolas Grekas
88a3b90860 [PropertyInfo] fix resolving parent|self type hints 2018-05-16 15:47:24 +02:00
Fabien Potencier
ba5cb1a245 fixed CS 2018-05-16 14:49:49 +02:00
Nicolas Grekas
8c430fbeb2 Merge branch '3.4' into 4.0
* 3.4:
  fix merge
  [Security] Fix logout
  Cleanup 2 tests for the HttpException classes
  #27250 limiting GET_LOCK key up to 64 char due to changes in MySQL 5.7.5 and later
  [Config] Fix tests when path contains UTF chars
  [DI] Shared services should not be inlined in non-shared ones
  [Profiler] Remove propel & event_listener_loading category identifiers
  [Filesystem] Fix usages of error_get_last()
  [Cache][Lock] Fix usages of error_get_last()
  [Debug] Fix populating error_get_last() for handled silent errors
  [DI] Display previous error messages when throwing unused bindings
  Suppress warnings when open_basedir is non-empty
2018-05-16 11:05:32 +02:00
Nicolas Grekas
bf2943ecd1 Merge branch '2.8' into 3.4
* 2.8:
  fix merge
2018-05-16 10:49:53 +02:00
Nicolas Grekas
f49310b54c fix merge 2018-05-16 10:49:48 +02:00
Nicolas Grekas
86a9c73026 Merge branch '2.8' into 3.4
* 2.8:
  [Security] Fix logout
  #27250 limiting GET_LOCK key up to 64 char due to changes in MySQL 5.7.5 and later
  [Profiler] Remove propel & event_listener_loading category identifiers
  [Filesystem] Fix usages of error_get_last()
  [Debug] Fix populating error_get_last() for handled silent errors
  Suppress warnings when open_basedir is non-empty
2018-05-16 10:49:21 +02:00
Gabriel Ostrolucký
97cbea005e [Lock] Skip test if posix extension is not installed
This isn't installed by default on Fedora
2018-05-16 10:09:04 +02:00
Nicolas Grekas
a8122f8271 Merge branch '2.7' into 2.8
* 2.7:
  [Security] Fix logout
  #27250 limiting GET_LOCK key up to 64 char due to changes in MySQL 5.7.5 and later
  [Profiler] Remove propel & event_listener_loading category identifiers
  [Filesystem] Fix usages of error_get_last()
  [Debug] Fix populating error_get_last() for handled silent errors
  Suppress warnings when open_basedir is non-empty
2018-05-15 23:17:45 +02:00
Nicolas Grekas
15a7bbd92c bug #24805 [Security] Fix logout (MatTheCat)
This PR was squashed before being merged into the 2.7 branch (closes #24805).

Discussion
----------

[Security] Fix logout

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

Commits
-------

9e88eb5aa9 [Security] Fix logout
2018-05-15 17:39:51 +02:00
MatTheCat
9e88eb5aa9 [Security] Fix logout 2018-05-15 17:39:41 +02:00
Nicolas Grekas
10a2d39365 bug #27265 [DI] Shared services should not be inlined in non-shared ones (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Shared services should not be inlined in non-shared ones

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

[Already good on 2.7/2.8.](https://github.com/symfony/symfony/blob/2.7/src/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.php#L152)

Commits
-------

6f8b8625f4 [DI] Shared services should not be inlined in non-shared ones
2018-05-15 10:55:40 +02:00
Nicolas Grekas
932dbd232d minor #27243 [Config] Fix tests when path contains UTF chars (ostrolucky)
This PR was merged into the 3.4 branch.

Discussion
----------

[Config] Fix tests when path contains UTF chars

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

Commits
-------

b2a97ea00f [Config] Fix tests when path contains UTF chars
2018-05-15 10:54:45 +02:00
Nicolas Grekas
b7feafcf58 bug #27141 [Process] Suppress warnings when open_basedir is non-empty (cbj4074)
This PR was merged into the 2.7 branch.

Discussion
----------

[Process] Suppress warnings when open_basedir is non-empty

| 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 PHP is configured *with a non-empty open_basedir* value that does not permit access to the target location, these calls to is_executable() throw warnings.

While Symfony may not raise exceptions for warnings in production environments, other frameworks (such as Laravel) do, in which case any of these checks causes a show-stopping 500 error.

We fixed a similar issue in the ExecutableFinder class via symfony/symfony#16182 .

This has always been an issue, but 709e15e7a3 made it more likely that a warning is triggered.

Commits
-------

34f136e01b Suppress warnings when open_basedir is non-empty
2018-05-15 10:20:41 +02:00
Nicolas Grekas
1c3b1055df [DI] Allow defining bindings on ChildDefinition 2018-05-15 09:24:59 +02:00
Fabien Potencier
4c38b4dfa6 minor #27256 Cleanup 2 tests for the HttpException classes (ncou)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #27256).

Discussion
----------

Cleanup 2 tests for the HttpException classes

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

See discussion in linked issue.

Commits
-------

5516b329af Cleanup 2 tests for the HttpException classes
2018-05-15 07:00:07 +02:00
ncou
5516b329af Cleanup 2 tests for the HttpException classes 2018-05-15 06:59:59 +02:00
Fabien Potencier
974050feb8 bug #27250 [Session] limiting :key for GET_LOCK to 64 chars (oleg-andreyev)
This PR was merged into the 2.7 branch.

Discussion
----------

[Session] limiting :key for GET_LOCK to 64 chars

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

> MySQL 5.7.5 and later enforces a maximum length on lock names of 64 characters. Previously, no limit was enforced.

Cases:
- `session_id` is set by developers manually
- `session.sid_length` is configured

Ref.:
- https://dev.mysql.com/doc/refman/5.7/en/miscellaneous-functions.html#function_get-lock
- http://php.net/manual/en/session.configuration.php#ini.session.sid-length

Other issues:
- https://github.com/go-sql-driver/mysql/issues/385
- https://github.com/stefangabos/Zebra_Session/issues/16

Commits
-------

9cda96b8b5 #27250 limiting GET_LOCK key up to 64 char due to changes in MySQL 5.7.5 and later
2018-05-15 06:51:13 +02:00
Oleg Andreyev
9cda96b8b5 #27250 limiting GET_LOCK key up to 64 char due to changes in MySQL 5.7.5 and later 2018-05-14 20:29:47 +03:00
Adam Szaraniec
2400e71962 use strict compare in url validator 2018-05-14 21:15:07 +04:00
Gabriel Ostrolucký
b2a97ea00f [Config] Fix tests when path contains UTF chars 2018-05-14 18:49:53 +02:00
Fabien Potencier
d7d4e4169a minor #27263 [Profiler] Remove propel & event_listener_loading category identifiers (ogizanagi)
This PR was merged into the 2.7 branch.

Discussion
----------

[Profiler] Remove propel & event_listener_loading category identifiers

| Q             | A
| ------------- | ---
| Branch?       | 2.7 <!-- see below -->
| 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 | Part of https://github.com/symfony/symfony/issues/27262#issuecomment-388865265   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

Commits
-------

d52f491bfa [Profiler] Remove propel & event_listener_loading category identifiers
2018-05-14 18:36:29 +02:00
Nicolas Grekas
6f8b8625f4 [DI] Shared services should not be inlined in non-shared ones 2018-05-14 18:07:37 +02:00
Maxime Steinhausser
d52f491bfa [Profiler] Remove propel & event_listener_loading category identifiers 2018-05-14 18:07:30 +02:00
Fabien Potencier
30ffb61b1f bug #27237 [Debug] Fix populating error_get_last() for handled silent errors (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Debug] Fix populating error_get_last() for handled silent errors

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

When a userland error handler doesn't return `false`, `error_get_last()` is not updated, so we cannot see the real last error, but the previous one.

See https://3v4l.org/Smmt7

Commits
-------

d7e612d2ac [Debug] Fix populating error_get_last() for handled silent errors
2018-05-14 08:44:24 +02:00