Commit Graph

53181 Commits

Author SHA1 Message Date
Nicolas Grekas
6fc9e51722 [Messenger] Fix transporting non-UTF8 payloads by encoding them using base 64 2021-01-25 18:37:49 +01:00
Robin Chalas
11290f9c8d minor #39968 [FrameworkBundle] add doctrine/persistence as a dev requirement (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] add doctrine/persistence as a dev requirement

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix https://github.com/symfony/symfony/pull/39941#discussion_r563736775
| License       | MIT
| Doc PR        |

Otherwise, we are testing something that will never be possible in a real application.

Commits
-------

6ea9e4d7ca add doctrine/persistence as a dev requirement
2021-01-25 18:08:47 +01:00
Christian Flothmann
6ea9e4d7ca add doctrine/persistence as a dev requirement 2021-01-25 17:45:18 +01:00
Oskar Stark
fe57893025 Merge branch '5.1' into 5.2
* 5.1:
  Fix typo in test
2021-01-25 17:23:41 +01:00
Oskar Stark
5532e0ac60 minor #39966 Fix typo in test (OskarStark)
This PR was merged into the 5.1 branch.

Discussion
----------

Fix typo in test

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

Commits
-------

79c9a1a6b2 Fix typo in test
2021-01-25 17:23:26 +01:00
Oskar Stark
79c9a1a6b2 Fix typo in test 2021-01-25 17:14:18 +01:00
Nicolas Grekas
470d3e7866 Fix merge 2021-01-25 16:14:59 +01:00
Nicolas Grekas
17560729d1 minor #39965 Changed private static array-properties to const (5.2) (simonberger)
This PR was merged into the 5.2 branch.

Discussion
----------

Changed private static array-properties to const (5.2)

| Q             | A
| ------------- | ---
| Branch?       | 5.2
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| License       | MIT

This continues #39959 for 5.2
Just two array-properties and a string property in one class newly added.

/cc @nicolas-grekas

Commits
-------

a5fd0c48eb Changed private static array-properties to const static properties newly introduced in 5.2
2021-01-25 16:00:15 +01:00
Simon Berger
a5fd0c48eb Changed private static array-properties to const
static properties newly introduced in 5.2
2021-01-25 15:52:07 +01:00
Nicolas Grekas
e23aae35c1 Merge branch '5.1' into 5.2
* 5.1:
  Changed private static array-properties to const static properties newly introduced in 5.1
2021-01-25 15:44:52 +01:00
Nicolas Grekas
ac61623ef8 minor #39962 Changed private static array-properties to const (5.1) (simonberger)
This PR was merged into the 5.1 branch.

Discussion
----------

Changed private static array-properties to const (5.1)

| Q             | A
| ------------- | ---
| Branch?       | 5.1
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| License       | MIT

This continues #39959 for 5.1
Just a few newly introduced readonly static array-properties.

/cc @nicolas-grekas

Commits
-------

f891fb2e5e Changed private static array-properties to const static properties newly introduced in 5.1
2021-01-25 15:44:36 +01:00
Simon Berger
f891fb2e5e Changed private static array-properties to const
static properties newly introduced in 5.1
2021-01-25 15:41:58 +01:00
Nicolas Grekas
00f99bd517 Merge branch '5.1' into 5.2
* 5.1:
  Fix merge
2021-01-25 15:24:26 +01:00
Nicolas Grekas
a2ded28a8d Fix merge 2021-01-25 15:22:12 +01:00
Nicolas Grekas
a5ef152ee2 Merge branch '5.1' into 5.2
* 5.1:
  Changed private static array-properties to const
2021-01-25 15:08:25 +01:00
Nicolas Grekas
6f732876c1 Merge branch '4.4' into 5.1
* 4.4:
  Changed private static array-properties to const
2021-01-25 14:59:38 +01:00
Nicolas Grekas
4181c431e9 minor #39959 Changed private static array-properties to const (simonberger)
This PR was merged into the 4.4 branch.

Discussion
----------

Changed private static array-properties to const

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| License       | MIT

This changes all private static properties (just screened arrays) to private const. I left out those which have write access obviously and also those with `static::` access.

It is a new implementation of #38213. Based on 4.4 this time.
If merging it up creates several conflicts, you could ignore all changes of 4.4 and I create a new branch for 5.1 or 5.2. I'll do this anyway if any new private static arrays are existing there.

Commits
-------

aa79381fe4 Changed private static array-properties to const
2021-01-25 14:56:02 +01:00
Nicolas Grekas
c11a6da08c Merge branch '5.1' into 5.2
* 5.1:
  [Uid] fix checking for valid UUIDs
  [HttpKernel] Configure the ErrorHandler even when it is overriden
  Allow relative path to composer cache
2021-01-25 14:54:05 +01:00
Nicolas Grekas
be896b5004 Merge branch '4.4' into 5.1
* 4.4:
  [HttpKernel] Configure the ErrorHandler even when it is overriden
  Allow relative path to composer cache
2021-01-25 14:53:56 +01:00
Nicolas Grekas
592f8f5728 bug #39956 [Uid] fix checking for valid UUIDs (nicolas-grekas)
This PR was merged into the 5.1 branch.

Discussion
----------

[Uid] fix checking for valid UUIDs

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

Some versions of `uuid_type()` trigger a PHP warning. This handles it.

Commits
-------

7daef4ff6d [Uid] fix checking for valid UUIDs
2021-01-25 14:50:03 +01:00
Nicolas Grekas
7daef4ff6d [Uid] fix checking for valid UUIDs 2021-01-25 12:59:00 +01:00
BoShurik
da9100320e Exclude non-initialized properties accessed with getters 2021-01-25 13:41:50 +03:00
Simon Berger
aa79381fe4 Changed private static array-properties to const 2021-01-25 00:44:26 +01:00
Christian Flothmann
c38473a917 bug #39951 [Form] check parent types for label_format and translation_domain (xabbuh)
This PR was merged into the 5.2 branch.

Discussion
----------

[Form] check parent types for label_format and translation_domain

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

Commits
-------

a5505c4dfa check parent types for label_format and translation_domain
2021-01-24 21:08:29 +01:00
Nicolas Grekas
3fedac0f0a bug #39911 [RateLimiter] Fix infinite values with NoLimiter (YaFou)
This PR was merged into the 5.2 branch.

Discussion
----------

[RateLimiter] Fix infinite values with NoLimiter

| Q             | A
| ------------- | ---
| Branch?       | 5.2
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #39899
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/releases):
 - Always add tests and ensure they pass.
 - Never break backward compatibility (see https://symfony.com/bc).
 - Bug fixes must be submitted against the lowest maintained 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 branch 5.x.
-->

See #39899. I don't find any solution to convert `\INF` constant (which is a float value) to an integer.

Commits
-------

4f9eedfcf7 [RateLimiter] Fix infinite values with NoLimiter
2021-01-23 19:48:57 +01:00
Nicolas Grekas
b4c362cdc3 bug #39936 [Validator] Fix DebugCommand (loic425)
This PR was squashed before being merged into the 5.2 branch.

Discussion
----------

[Validator] Fix DebugCommand

| Q             | A
| ------------- | ---
| Branch?       | 5.2
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/releases):
 - Always add tests and ensure they pass.
 - Never break backward compatibility (see https://symfony.com/bc).
 - Bug fixes must be submitted against the lowest maintained 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 branch 5.x.
-->

Commits
-------

1eb13767fc [Validator] Fix DebugCommand
2021-01-23 19:47:03 +01:00
Loïc Frémont
1eb13767fc [Validator] Fix DebugCommand 2021-01-23 19:46:54 +01:00
Nicolas Grekas
0c7eb27c5e bug #39909 [PhpUnitBridge] Allow relative path to composer cache (jderusse)
This PR was merged into the 4.4 branch.

Discussion
----------

[PhpUnitBridge] Allow relative path to composer cache

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

When users defines a relative path in the `COMPOSER_CACHE_DIR` env variable,
The `simple-phpunit` code, by changing the directory (with `chdir`), give to composer a different context. At the end, composer stores its cache inside the `vendor/bin/.phpunit` folder, and inside the `vendor/bin/.phpunit/phpunit-X.Y.Z` folder.

This PR convert the relative path provided by the user into Absolute path.

Commits
-------

cde0ffdc83 Allow relative path to composer cache
2021-01-23 19:22:35 +01:00
Nicolas Grekas
799bc2a8e0 bug #39944 [HttpKernel] Configure the ErrorHandler even when it is overriden (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpKernel] Configure the ErrorHandler even when it is overriden

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

Fixes the part of https://github.com/getsentry/sentry-symfony/issues/421 that is about `DebugHandlersListener`.

Commits
-------

31817b48e2 [HttpKernel] Configure the ErrorHandler even when it is overriden
2021-01-23 19:11:27 +01:00
Christian Flothmann
a5505c4dfa check parent types for label_format and translation_domain 2021-01-23 14:28:52 +01:00
Christian Flothmann
6f8b4cbfe6 Merge branch '5.1' into 5.2
* 5.1:
  "export-ignore" contracts and phpunit-bridge
  [Console][Command] Fix Closure code binding when it is a static anonymous function
  Use class const in test
  [Security] [HttpFoundation] Use class const in test
  [PropertyInfo] Fix breaking change with has*(arguments...) methods
2021-01-23 10:47:32 +01:00
Christian Flothmann
a933c3e0a1 Merge branch '4.4' into 5.1
* 4.4:
  "export-ignore" contracts and phpunit-bridge
  [Console][Command] Fix Closure code binding when it is a static anonymous function
2021-01-23 10:39:08 +01:00
Christian Flothmann
de714b9bf3 minor #39940 [Notifier] fix test (xabbuh)
This PR was merged into the 5.2 branch.

Discussion
----------

[Notifier] fix test

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

Commits
-------

542dddca9a fix test
2021-01-23 10:38:28 +01:00
Nicolas Grekas
31817b48e2 [HttpKernel] Configure the ErrorHandler even when it is overriden 2021-01-22 18:13:09 +01:00
Christian Flothmann
de8ddfdfba bug #39896 [PropertyInfo] Fix breaking change with has*(arguments...) methods (YaFou)
This PR was merged into the 5.1 branch.

Discussion
----------

[PropertyInfo] Fix breaking change with has*(arguments...) methods

| Q             | A
| ------------- | ---
| Branch?       | 5.1
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #39885
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/releases):
 - Always add tests and ensure they pass.
 - Never break backward compatibility (see https://symfony.com/bc).
 - Bug fixes must be submitted against the lowest maintained 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 branch 5.x.
-->

Until 5.0:
```php
class Dummy
{
    private $elements;

    public function hasElement($element): bool
    {
        // ...
    }
}

$extractor = new ReflectionExtractor();
$extractor->isReadable('Dummy', 'element'); // false
```

After 5.0:
```php
class Dummy
{
    private $elements;

    public function hasElement($element): bool
    {
        // ...
    }
}

$extractor = new ReflectionExtractor();
$extractor->isReadable('Dummy', 'element'); // true => BREAKING CHANGE
```

Commits
-------

37cc16e3d8 [PropertyInfo] Fix breaking change with has*(arguments...) methods
2021-01-22 18:02:52 +01:00
Christian Flothmann
542dddca9a fix test 2021-01-22 17:15:52 +01:00
Robin Chalas
bf1752a550 minor #39938 "export-ignore" contracts and phpunit-bridge (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

"export-ignore" contracts and phpunit-bridge

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

Since these directories are not autoloaded.

Commits
-------

12e19a9a3d "export-ignore" contracts and phpunit-bridge
2021-01-22 13:41:57 +01:00
Robin Chalas
c6f5e2a3b8 bug #39932 [Console] [Command] Fix Closure code binding when it is a static anonymous function (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[Console] [Command] Fix Closure code binding when it is a static anonymous function

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

I'm building a single command application and I did:
```php
->setCode(static function (InputInterface $input, OutputInterface $output): void {
    // my code
})
```
and it results in a warning `Cannot bind an instance to a static closure` + an exception `You must override the execute() method in the concrete command class.` I guess we should silently fail here if the Closure is not bindable.

Commits
-------

18d426871e [Console][Command] Fix Closure code binding when it is a static anonymous function
2021-01-22 13:37:43 +01:00
Jérémy Derussé
26452260ed
minor #39931 Use class const in test (OskarStark)
This PR was merged into the 5.1 branch.

Discussion
----------

Use class const in test

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

super minor, same as #39930, but for `5.1`

I will finish this PR after #39930 is merged and upmerged

Commits
-------

4a98eeecdc [Security] [HttpFoundation] Use class const in test
2021-01-22 11:24:07 +01:00
Jérémy Derussé
ac362e369c
Merge branch '4.4' into 5.1
* 4.4:
  Use class const in test
2021-01-22 11:23:37 +01:00
Jérémy Derussé
10f3b10978
minor #39930 Use class const in test (OskarStark)
This PR was merged into the 4.4 branch.

Discussion
----------

Use class const in test

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

super minor

Commits
-------

39181f4fdf Use class const in test
2021-01-22 11:21:47 +01:00
Nicolas Grekas
12e19a9a3d "export-ignore" contracts and phpunit-bridge 2021-01-22 10:53:35 +01:00
Thomas Calvet
18d426871e [Console][Command] Fix Closure code binding when it is a static anonymous function 2021-01-22 09:23:15 +01:00
Oskar Stark
39181f4fdf Use class const in test 2021-01-22 08:46:09 +01:00
Oskar Stark
4a98eeecdc [Security] [HttpFoundation] Use class const in test 2021-01-22 08:08:23 +01:00
Oskar Stark
b5af0083de Merge branch '5.1' into 5.2
* 5.1:
  [Notifier] [OvhCloud] “Invalid signature” for message with slashes
2021-01-21 20:03:15 +01:00
Oskar Stark
1c9d2c8982 bug #39871 [Notifier] [OvhCloud] “Invalid signature” for message with slashes (OneT0uch)
This PR was squashed before being merged into the 5.1 branch.

Discussion
----------

[Notifier] [OvhCloud] “Invalid signature” for message with slashes

| Q             | A
| ------------- | ---
| Branch?       | 5.1
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix #39836 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT

Test to show issue of invalid signature when message contains slash.

Commits
-------

9f01fb84b7 [Notifier] [OvhCloud] “Invalid signature” for message with slashes
2021-01-21 20:02:32 +01:00
Théo DELCEY
9f01fb84b7 [Notifier] [OvhCloud] “Invalid signature” for message with slashes 2021-01-21 20:02:19 +01:00
Jérémy Derussé
c1769d1b48
Merge branch '5.1' into 5.2
* 5.1:
  Remove wrong test
  [Uid] Unable to extend Uuid/Ulid and use fromString()
  Fix typo in property name
2021-01-21 17:54:56 +01:00
Jérémy Derussé
7e2ac5ff33
Merge branch '4.4' into 5.1
* 4.4:
  Remove wrong test
  Fix typo in property name
2021-01-21 17:54:24 +01:00