Commit Graph

38458 Commits

Author SHA1 Message Date
Nicolas Grekas
cea05311fc [HttpClient] with "bindto" with NativeHttpClient 2020-09-07 09:41:14 +02:00
Fabien Potencier
d441d867cd bug #38063 [FrameworkBundle] generate preload.php in src/ to make opcache.preload predictable (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] generate preload.php in src/ to make opcache.preload predictable

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

As seen in https://github.com/symfonycorp/cloud-templates/pull/15, having the path of the preload file vary by env+debug makes configuring PHP.ini settings impossible.

This PR dump a new `preload.php` file in `src/` when `cache:clear` is called.
This makes the path predictable.

This is submitted as a bugfix because the current behavior is barely usable without this change.

Commits
-------

54c965c7d0 [FrameworkBundle] generate preload.php in src/ to make opcache.preload predictable
2020-09-07 09:18:11 +02:00
Nicolas Grekas
54c965c7d0 [FrameworkBundle] generate preload.php in src/ to make opcache.preload predictable 2020-09-07 09:07:11 +02:00
Fabien Potencier
043e7c34de minor #38078 [FrameworkBundle] Fix Tests on PHPUnit 9.3 (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] Fix Tests on PHPUnit 9.3

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

When joining two constraints with a `LogicalAnd`, PHPUnit will generate a failure message where the message omitted by the first constraint will be wrapped in parenthesis. I'm using a regular expression now, so we can support both variants.

Commits
-------

8bc36d7420 [FrameworkBundle] Fix Tests on PHPUnit 9.3.
2020-09-07 07:09:25 +02:00
Fabien Potencier
d25ea073da minor #38077 [WebProfilerBundle] Fix Tests for PHPUnit 9.3 (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

[WebProfilerBundle] Fix Tests for PHPUnit 9.3

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

PHPUnit's `logicalXor()` creates an XOR operation for one or multiple constraints. It expects the operands for that operation to be passed as variadic arguments, but this particullar test passes them in a single array.

This somewhat works on PHPUnit 8, but fails on PHPUnit 9. This PR fixes the failing test.

Commits
-------

f290b97d4f [WebProfilerBundle] Fix Tests on PHPUnit 9.3.
2020-09-07 07:04:20 +02:00
Fabien Potencier
beb6fd85a8 minor #38079 Don't call createMock with an array of interfaces (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

Don't call createMock with an array of interfaces

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

PHPUnit 8 allows us to pass an array of interfaces to `createMock()`. The result was a mock object that implemented all of the given interfaces. This feature has sadly been removed (see sebastianbergmann/phpunit#3955), which forces us to create dummy classes that can be mocked instead. I've done this already on the 3.4 branch with #37566.

This PR fixes all affected tests (that I could find) on the 4.4 branch.

Commits
-------

a8e762d8c3 Don't call createMock with an array of interfaces.
2020-09-07 07:02:32 +02:00
Fabien Potencier
93a82a296c minor #38083 [HttpKernel] Adjust tests to new "class not found" error message format (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpKernel] Adjust tests to new "class not found" error message format

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

Commits
-------

5b95bcd009 [HttpKernel] Adjust tests to new "class not found" error message format.
2020-09-07 06:59:00 +02:00
Alexander M. Turek
5b95bcd009 [HttpKernel] Adjust tests to new "class not found" error message format. 2020-09-06 23:28:28 +02:00
Alexander M. Turek
a8e762d8c3 Don't call createMock with an array of interfaces. 2020-09-06 21:21:37 +02:00
Alexander M. Turek
8bc36d7420 [FrameworkBundle] Fix Tests on PHPUnit 9.3. 2020-09-06 20:08:39 +02:00
Alexander M. Turek
f290b97d4f [WebProfilerBundle] Fix Tests on PHPUnit 9.3. 2020-09-06 19:41:24 +02:00
Anton Zagorskii
976eea3be0 esmtp error not being thrown properly 2020-09-06 19:12:23 +02:00
Fabien Potencier
f0bf853a86 bug #38040 [Yaml Parser] fixed Parser to skip comments when inlining sequences (korve)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[Yaml Parser] fixed Parser to skip comments when inlining sequences

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #37972
| License       | MIT

The parser didn't skip comments when parsing values in a sequence. This resulted in the YamlFileLoader trying to
parse a comment as a IteratorArgument which resulted in a InvalidArgumentException.

Consider the following valid yaml:

```yaml
- !foo [
    bar,
    #baz
  ]
```

The parser would generate the following array:
```php
['bar', '#baz']
```

After this fix the parser will generate the following array:
```php
['bar']
```

This  bug only appeared for me in 4.4

Commits
-------

b5316ebebb [Yaml Parser] fixed Parser to skip comments when inlining sequences
2020-09-06 19:03:15 +02:00
Andre Eckardt
b5316ebebb [Yaml Parser] fixed Parser to skip comments when inlining sequences 2020-09-06 19:03:09 +02:00
Fabien Potencier
4222a72ee8 bug #38062 [DI] fix generating preload file when cache_dir is outside project_dir (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[DI] fix generating preload file when cache_dir is outside project_dir

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

Commits
-------

02db8e1523 [DI] fix generating preload file when cache_dir is outside project_dir
2020-09-04 18:14:00 +02:00
Nicolas Grekas
02db8e1523 [DI] fix generating preload file when cache_dir is outside project_dir 2020-09-04 16:11:41 +02:00
Fabien Potencier
da73be818b bug #38059 [Cache] Fix CacheCollectorPass with decorated cache pools (shyim)
This PR was merged into the 4.4 branch.

Discussion
----------

[Cache] Fix CacheCollectorPass with decorated cache pools

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

The `getDefinition` call in `addToCollector` does not work when the service is decorated. Also instances will be added with the decoration name. This looks weird in the profiler. I have changed it to prefer the attribute name.

Before:
![image](https://user-images.githubusercontent.com/6224096/92225243-3be27c00-eea3-11ea-8bd5-2ae69212e658.png)

After: (`\Shopware\Storefront\Framework\Cache\CacheDecorator` did go into `cache.object`)
![image](https://user-images.githubusercontent.com/6224096/92225284-47ce3e00-eea3-11ea-885f-cdba95b89302.png)

Commits
-------

973442759c Fix CacheCollectorPass with decorated cache pools
2020-09-04 14:47:27 +02:00
Soner Sayakci
973442759c
Fix CacheCollectorPass with decorated cache pools 2020-09-04 14:31:16 +02:00
Fabien Potencier
a19f91ad69 bug #38054 [PhpUnitBridge] CoverageListenerTrait update for PHPUnit 8.5/9.x (sanmai)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[PhpUnitBridge] CoverageListenerTrait update for PHPUnit 8.5/9.x

Updated to use `PHPUnit\Util\Annotation\Registry` and related classes.

Fixes #37637

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

- [x] Fixes the issue under PHPUnit 8.5+
- [ ] Tests TBD

If this is a sensible approach, I will try to add a test for this addition.

Commits
-------

5f83811002 [PhpUnitBridge] CoverageListenerTrait update for PHPUnit 8.5/9.x
2020-09-04 13:30:09 +02:00
Alexey Kopytko
5f83811002 [PhpUnitBridge] CoverageListenerTrait update for PHPUnit 8.5/9.x 2020-09-04 13:30:02 +02:00
Fabien Potencier
4482fcf28d bug #38041 [PropertyInfo] Fix typed collections in PHP 7.4 (ndench)
This PR was merged into the 4.4 branch.

Discussion
----------

[PropertyInfo] Fix typed collections in PHP 7.4

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

#37971 introduced support for typed properties in PHP 7.4, however by short circuiting the `getTypes()` method, typed collections are returned as `Type::BUILTIN_TYPE_ARRAY` without a proper collection type. If running on PHP < 7.4, the `getMutator()` method would be called which would extract the collection type from the getter/setter or adder/remover.

I updated the typedPropertiesTest to cover this case.

Commits
-------

282ed2850c [PropertyInfo] Fix typed collections in PHP 7.4
2020-09-04 07:32:57 +02:00
siganushka
6e17099f7a Remove invalid instantiation declaration 2020-09-04 07:27:08 +02:00
Christian Flothmann
473e2933f0 relax some test assertions 2020-09-03 11:25:00 +02:00
Nathan Dench
282ed2850c [PropertyInfo] Fix typed collections in PHP 7.4 2020-09-03 10:26:19 +10:00
Nicolas Grekas
6c2a1c9a57 Merge branch '3.4' into 4.4
* 3.4:
  Enable "native_constant_invocation" CS rule
  Make AbstractPhpFileCacheWarmer public
2020-09-02 18:08:58 +02:00
Nicolas Grekas
4351a70637 Enable "native_constant_invocation" CS rule 2020-09-02 18:06:40 +02:00
Fabien Potencier
52719f2800 bug #37959 [PhpunitBridge] Fix deprecation type detection (when several autoload files are used) (l-vo)
This PR was merged into the 4.4 branch.

Discussion
----------

[PhpunitBridge] Fix deprecation type detection (when several autoload files are used)

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

Several autoload files are supported by the PHPUnit Bridge but when the internal paths are registered (for deprecation type detection), the paths (from prefixes) of the last autoload file override the paths previously registered. This PR fixes this bug.

Commits
-------

cc7b6c5e5a [PhpunitBridge] Fix deprecation type detection
2020-09-02 16:59:26 +02:00
Gocha Ossinkine
b82d9a2dc7 Make AbstractPhpFileCacheWarmer public 2020-09-02 19:04:26 +05:00
Fabien Potencier
ddede31d09 Fix CS 2020-09-02 14:17:05 +02:00
Jérémy Derussé
63a8570a42
Add a warning comment on ldap empty password 2020-09-02 10:52:12 +02:00
Fabien Potencier
27c131ca7a Bump Symfony version to 4.4.14 2020-09-02 10:14:21 +02:00
Fabien Potencier
7982e499d6 Update VERSION for 4.4.13 2020-09-02 10:09:29 +02:00
Nicolas Grekas
55f451e49c [HttpClient] Fix deps=low 2020-09-02 10:01:15 +02:00
Fabien Potencier
d9910e0b33 security #cve-2020-15094 Remove headers with internal meaning from HttpClient responses (mpdude)
This PR was merged into the 4.4 branch.
2020-09-02 09:40:48 +02:00
Matthias Pigulla
ba39753291 Remove headers with internal meaning from HttpClient responses 2020-09-02 09:40:10 +02:00
Fabien Potencier
bca14aa5f8 Merge branch '3.4' into 4.4
* 3.4:
  Fix undefined index for inconsistent command name definition
2020-09-02 09:07:21 +02:00
Robin Chalas
d59140e857 Fix undefined index for inconsistent command name definition 2020-09-01 20:06:56 +02:00
Nicolas Grekas
804f194d9d bug #38023 [DI] fix inlining of non-shared services (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[DI] fix inlining of non-shared services

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

Commits
-------

380cb10587 [DI] fix inlining of non-shared services
2020-09-01 20:02:38 +02:00
Nicolas Grekas
380cb10587 [DI] fix inlining of non-shared services 2020-09-01 19:42:15 +02:00
Christian Flothmann
f0067c106c swallow deprecations 2020-09-01 11:34:43 +02:00
Laurent VOULLEMIER
cc7b6c5e5a [PhpunitBridge] Fix deprecation type detection
When using several vendor directories
2020-08-31 21:10:44 +02:00
Nicolas Grekas
6bebe86d5a bug #38010 [Cache] Psr16Cache does not handle Proxy cache items (alex-dev)
This PR was merged into the 4.4 branch.

Discussion
----------

[Cache] Psr16Cache does not handle Proxy cache items

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #38006
| License       | MIT

Add test for Psr16Cache along with a ProxyAdapter

Commits
-------

e525fa1055 [Cache] Psr16Cache does not handle Proxy cache items
2020-08-31 18:53:24 +02:00
Alexandre Parent
e525fa1055 [Cache] Psr16Cache does not handle Proxy cache items 2020-08-31 18:52:20 +02:00
Nicolas Grekas
93459a93bd bug #37937 [Serializer] fixed fix encoding of cache keys with anonymous classes (michaelzangerle)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[Serializer] fixed fix encoding of cache keys with anonymous classes

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

Commits
-------

3a4675359d [Serializer] fixed fix encoding of cache keys with anonymous classes
2020-08-31 18:04:23 +02:00
Michael Zangerle
3a4675359d [Serializer] fixed fix encoding of cache keys with anonymous classes 2020-08-31 18:03:52 +02:00
Fabien Potencier
6e59396ff9 Bump Symfony version to 4.4.13 2020-08-31 08:14:12 +02:00
Fabien Potencier
529eac9795 Update VERSION for 4.4.12 2020-08-31 08:09:42 +02:00
Fabien Potencier
f4f7683861 Bump Symfony version to 3.4.45 2020-08-31 07:58:19 +02:00
Fabien Potencier
b1e65241ca Update VERSION for 3.4.44 2020-08-31 07:53:42 +02:00
Christian Flothmann
19015ec404 [FrameworkBundle] fix tests 2020-08-30 11:40:10 +02:00