Commit Graph

43789 Commits

Author SHA1 Message Date
Fabien Potencier
d863fc2b4b bumped Symfony version to 4.3.9 2019-11-13 10:11:31 +01:00
Fabien Potencier
87fb08703e
Merge pull request #34352 from fabpot/release-4.3.8
released v4.3.8
2019-11-13 10:07:48 +01:00
Fabien Potencier
3a50fa397d updated VERSION for 4.3.8 2019-11-13 10:07:28 +01:00
Fabien Potencier
443a83bed4 updated CHANGELOG for 4.3.8 2019-11-13 10:06:52 +01:00
Nicolas Grekas
983b5d1d5f Merge branch '3.4' into 4.3
* 3.4:
  [Console] Constant STDOUT might be undefined.
  Allow returning null from NormalizerInterface::normalize
2019-11-13 08:29:07 +01:00
Nicolas Grekas
32bde39f63 bug #34344 [Console] Constant STDOUT might be undefined (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console] Constant STDOUT might be undefined

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #34341
| License       | MIT
| Doc PR        | N/A

Commits
-------

bb8c82c0b5 [Console] Constant STDOUT might be undefined.
2019-11-13 08:27:07 +01:00
Nicolas Grekas
53dc781814 minor #34340 Allow returning null from NormalizerInterface::normalize (teohhanhui)
This PR was merged into the 3.4 branch.

Discussion
----------

Allow returning null from NormalizerInterface::normalize

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes?
| New feature?  | no
| Deprecations? | no
| Tickets       | N/A
| License       | MIT
| Doc PR        | N/A

Looking at the code, it seems that a normalizer might be called with a `null` value for `$data`, and thus it's only sensible that it be allowed to return `null` too:

7064ff35f2/src/Symfony/Component/Serializer/Serializer.php (L141-L148)

Updating the phpdoc to match.

Commits
-------

1c8edc55ad Allow returning null from NormalizerInterface::normalize
2019-11-13 08:26:33 +01:00
Nicolas Grekas
bb8c82c0b5 [Console] Constant STDOUT might be undefined. 2019-11-13 08:12:39 +01:00
Teoh Han Hui
1c8edc55ad
Allow returning null from NormalizerInterface::normalize 2019-11-12 18:51:12 +01:00
Nicolas Grekas
3ae3094a18 security #cve-2019-18886 [Security\Core] throw AccessDeniedException when switch user fails (nicolas-grekas)
This PR was merged into the 4.3 branch.
2019-11-12 14:13:43 +01:00
Nicolas Grekas
bcfc282d42 [Security\Core] throw AccessDeniedException when switch user fails 2019-11-12 14:12:56 +01:00
Nicolas Grekas
0b2c3a43bc security #cve-2019-18888 [Mime] fix guessing mime-types of files with leading dash (nicolas-grekas)
This PR was merged into the 4.3 branch.
2019-11-12 14:10:56 +01:00
Nicolas Grekas
77ddabf2e7 [Mime] fix guessing mime-types of files with leading dash 2019-11-12 14:10:02 +01:00
Nicolas Grekas
227e73d164 security #cve-2019-11325 [VarExporter] fix exporting some strings (nicolas-grekas)
This PR was merged into the 4.3 branch.
2019-11-12 14:08:52 +01:00
Nicolas Grekas
2baf53aa7a Merge branch '3.4' into 4.3
* 3.4:
  [HttpFoundation] fix guessing mime-types of files with leading dash
  [Cache] forbid serializing AbstractAdapter and TagAwareAdapter instances
  Use constant time comparison in UriSigner
2019-11-12 14:07:20 +01:00
Nicolas Grekas
4cc37df2fb security #cve-2019-18889 [Cache] forbid serializing AbstractAdapter and TagAwareAdapter instances (nicolas-grekas)
This PR was merged into the 3.4 branch.
2019-11-12 13:50:33 +01:00
Nicolas Grekas
b21025b139 security #cve-2019-18888 [HttpFoundation] fix guessing mime-types of files with leading dash (nicolas-grekas)
This PR was merged into the 3.4 branch.
2019-11-12 13:49:04 +01:00
Nicolas Grekas
010213408e security #cve-2019-18887 [HttpKernel] Use constant time comparison in UriSigner (stof)
This PR was merged into the 3.4 branch.
2019-11-12 13:47:53 +01:00
Nicolas Grekas
4bc7e9c614 Merge branch '3.4' into 4.3
* 3.4:
  [Workflow] fix lowest dep
2019-11-12 11:07:11 +01:00
Nicolas Grekas
7064ff35f2 [Workflow] fix lowest dep 2019-11-12 11:06:38 +01:00
Nicolas Grekas
3461d0eba8 Merge branch '3.4' into 4.3
* 3.4:
  bumped Symfony version to 3.4.35
  updated VERSION for 3.4.34
  update CONTRIBUTORS for 3.4.34
  updated CHANGELOG for 3.4.34
2019-11-12 09:56:22 +01:00
Fabien Potencier
7ddb19c702 bumped Symfony version to 4.3.8 2019-11-11 17:42:32 +01:00
Fabien Potencier
fb4065ac95
Merge pull request #34323 from fabpot/release-4.3.7
released v4.3.7
2019-11-11 17:39:14 +01:00
Fabien Potencier
a2fd583db3 updated VERSION for 4.3.7 2019-11-11 17:38:54 +01:00
Fabien Potencier
e60288d791 updated CHANGELOG for 4.3.7 2019-11-11 17:38:48 +01:00
Fabien Potencier
a4c4f00e17 bumped Symfony version to 3.4.35 2019-11-11 17:24:44 +01:00
Fabien Potencier
c461582064
Merge pull request #34322 from fabpot/release-3.4.34
released v3.4.34
2019-11-11 17:11:40 +01:00
Fabien Potencier
d7601fa827 updated VERSION for 3.4.34 2019-11-11 17:11:23 +01:00
Fabien Potencier
f888b06f7b update CONTRIBUTORS for 3.4.34 2019-11-11 17:11:18 +01:00
Fabien Potencier
d0f736139e updated CHANGELOG for 3.4.34 2019-11-11 17:11:06 +01:00
Nicolas Grekas
6be5cc75a4 [HttpFoundation] fix guessing mime-types of files with leading dash 2019-11-11 13:53:10 +01:00
Nicolas Grekas
d446d7733a [VarExporter] fix exporting some strings 2019-11-11 13:48:54 +01:00
Fabien Potencier
b2b688ca25 minor #34311 [Messenger] Removed strict types in DispatchAfterCurrentBusStamp (vudaltsov)
This PR was merged into the 4.3 branch.

Discussion
----------

[Messenger] Removed strict types in DispatchAfterCurrentBusStamp

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | n/a
| License       | MIT
| Doc PR        | n/a

Commits
-------

7b9f752b47 Removed declare(strict_types=1) in DispatchAfterCurrentBusStamp
2019-11-10 13:59:42 +01:00
Valentin Udaltsov
7b9f752b47 Removed declare(strict_types=1) in DispatchAfterCurrentBusStamp 2019-11-10 12:50:21 +03:00
Nicolas Grekas
72166c439d Merge branch '3.4' into 4.3
* 3.4:
  [Routing] revert the return type for UrlGeneratorInterface::generate to remove null
2019-11-09 09:05:42 +01:00
Fabien Potencier
4463791d0e minor #34299 [Routing] revert the return type for UrlGeneratorInterface::generate to remove null (shieldo)
This PR was merged into the 3.4 branch.

Discussion
----------

[Routing] revert the return type for UrlGeneratorInterface::generate to remove null

…to remove null

| Q             | A
| ------------- | ---
| Branch?       | 3.4 (only)
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| License       | MIT

Bit of a casualty of commit tennis this:

A change to add `null` here as an option for how `UrlGeneratorInterface::generate()` (rather than the concrete `UrlGenerator`) was merged in https://github.com/symfony/symfony/pull/28321, but then [reverted](90494c20cc) for the reason [that this could be seen as a BC break](https://github.com/symfony/symfony/pull/28321#issuecomment-418540080), as the `null` return had not previously been documented (and is still not as part of the interface method docs).

However, in a subsequent change (https://github.com/symfony/symfony/pull/33252) with a wider scope, this doc change was added _back_ in order to reflect the underlying implementation as a result of a PHPStorm plugin complaining. There's no indication though of what a `null` return here though would mean, and for the same reason as the first revert (that this should be seen as a BC break), I'd like to submit this to be reverted for the 3.4 branch. (In 4.4 the `null` has already been removed.)

Having the interface indicating that this method can return `null` necessitates introducing a lot of actually redundant null checks in code that is covered by static analysis tools such as PHPStan.

Commits
-------

9f853f324f [Routing] revert the return type for UrlGeneratorInterface::generate to remove null
2019-11-09 07:39:26 +01:00
Fabien Potencier
e4ddc75549 minor #34302 [Workflow] Simplified EventDispatcherMock (derrabus)
This PR was merged into the 4.3 branch.

Discussion
----------

[Workflow] Simplified EventDispatcherMock

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | N/A
| License       | MIT
| Doc PR        | N/A

This PR simplifies the Workflow component's mock implementation of the event dispatcher by implementing the much simpler contracts interface instead of the full-blown component interface.

Commits
-------

5aee181c83 [Workflow] Simplified EventDispatcherMock.
2019-11-09 07:38:43 +01:00
Alexander M. Turek
5aee181c83 [Workflow] Simplified EventDispatcherMock. 2019-11-08 23:25:20 +01:00
Nicolas Grekas
b148114116 [FrameworkBundle] fix lower dep 2019-11-08 23:04:53 +01:00
Douglas Greenshields
9f853f324f
[Routing] revert the return type for UrlGeneratorInterface::generate to remove null 2019-11-08 17:25:00 +00:00
Nicolas Grekas
bc726f7d50 bug #34294 [Workflow] Fix error when we use ValueObject for the marking property (FabienSalles)
This PR was merged into the 4.3 branch.

Discussion
----------

[Workflow] Fix error when we use ValueObject for the marking property

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #28203 #22031
| License       | MIT

Fix Illegal offset type in `MethodMarkingStore` class when we use Value Object for
the marking property.

Now, we can avoid to use only a string an we can have a Subject class with a Value Object like this :
```php
final class State
{
    public const DRAFT = 'draft';
    public const REVIEWED = 'reviewed';
    public const REJECTED = 'rejected';
    public const PUBLISHED = 'published';

     /** @var string */
    private $state;

    public function __construct(string $state)
    {
        // some validation
        $this->state = $state;
    }

    public function __toString()
     {
         return $this->state;
    }

    public static function Draft()
     {
         return new self(self::DRAFT);
     }
    ...
}

final class Subject
{
    private $marking;

    public function __construct(State $marking = null)
    {
        $this->marking = $marking;
    }

    public function getMarking()
    {
        return $this->marking;
    }

    public function setMarking($marking)
    {
        $this->marking = $marking instanceof State ? $marking : new State($marking);
    }

```

Commits
-------

6570d5cbe2 Fix error when we use VO for the marking property
2019-11-08 17:23:33 +01:00
Nicolas Grekas
618aec6abe Merge branch '3.4' into 4.3
* 3.4:
  [DI] fix locators with numeric keys
2019-11-08 17:22:27 +01:00
Nicolas Grekas
98e9fc8aee bug #34297 [DI] fix locators with numeric keys (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] fix locators with numeric keys

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #34296
| License       | MIT
| Doc PR        | -

Commits
-------

dad4344793 [DI] fix locators with numeric keys
2019-11-08 17:22:08 +01:00
Nicolas Grekas
dad4344793 [DI] fix locators with numeric keys 2019-11-08 17:18:30 +01:00
FabienSalles
6570d5cbe2 Fix error when we use VO for the marking property
Fix Illegal offset type when we use ValueObject instead of string for
the marking property #28203 #22031
2019-11-08 12:45:38 +01:00
Nicolas Grekas
a1fc280bf2 Merge branch '3.4' into 4.3
* 3.4:
  [DI] Dont cache classes with missing parents
  [Validator] Add the missing translations for the Hebrew (\"he\") locale and fix 2 typos
2019-11-08 09:31:27 +01:00
Nicolas Grekas
b8cdc6e6bb bug #34282 [DI] Dont cache classes with missing parents (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Dont cache classes with missing parents

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Closes #34239
| License       | MIT
| Doc PR        | -

Commits
-------

1606430cfd [DI] Dont cache classes with missing parents
2019-11-08 09:30:13 +01:00
Nicolas Grekas
1606430cfd [DI] Dont cache classes with missing parents 2019-11-08 09:28:59 +01:00
Nicolas Grekas
201d17181a bug #34287 [HttpClient] Fix a crash when calling CurlHttpClient::__destruct() (dunglas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] Fix a crash when calling CurlHttpClient::__destruct()

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | n/a
| License       | MIT
| Doc PR        | n/a

I've not identified the exact issue, but when the profiler is enabled, an HttpClient instance is created and not used, then a crash occurs when `__destruct()` is called because `$this->mutli->handle` value is `0` has this point, while `curl_multi_setopt` expect a `resource`.

This PR fixes the issue, but it's maybe not the good approach.

Reproducer: symfony/mercure-bundle#14

curl version: 7.67.0

```
php -v
PHP 7.3.11 (cli) (built: Oct 24 2019 11:29:52) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.11, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.11, Copyright (c) 1999-2018, by Zend Technologies
    with blackfire v1.27.1~mac-x64-non_zts73, https://blackfire.io, by Blackfire
```

Commits
-------

d2c5ffda52 [HttpClient] Fix a crash when calling CurlHttpClient::__destruct()
2019-11-08 09:24:00 +01:00
Kévin Dunglas
d2c5ffda52 [HttpClient] Fix a crash when calling CurlHttpClient::__destruct() 2019-11-08 09:23:45 +01:00