Commit Graph

44892 Commits

Author SHA1 Message Date
Nicolas Grekas
6f58438f7c bug #33922 [Cache] remove implicit dependency on symfony/filesystem (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[Cache] remove implicit dependency on symfony/filesystem

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

/cc @andrerom for review

Commits
-------

85f27f270e [Cache] remove implicit dependency on symfony/filesystem
2019-10-09 15:16:32 +02:00
Nicolas Grekas
ac422dbd07 bug #33927 Allow to set SameSite config to 'none' (ihmels)
This PR was merged into the 4.3 branch.

Discussion
----------

Allow to set SameSite config to 'none'

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

Commits
-------

eec7e8cc61 Allow to set cookie_samesite to 'none'
2019-10-09 15:16:03 +02:00
Nicolas Grekas
49dfa8ac85 bug #33930 [Cache] clean tags folder on invalidation (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[Cache] clean tags folder on invalidation

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

/cc @andrerom for review :)

Commits
-------

b377e41a2c [Cache] clean tags folder on invalidation
2019-10-09 15:15:31 +02:00
Nicolas Grekas
b377e41a2c [Cache] clean tags folder on invalidation 2019-10-09 14:56:36 +02:00
Nicolas Grekas
85f27f270e [Cache] remove implicit dependency on symfony/filesystem 2019-10-09 12:18:12 +02:00
Yannick Ihmels
eec7e8cc61 Allow to set cookie_samesite to 'none' 2019-10-09 11:59:43 +02:00
Nicolas Grekas
02c571d9d3 bug #32980 [Dotenv] support setting default env var values (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Dotenv] support setting default env var values

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

Commits
-------

2dd41e7f24 [Dotenv] support setting default env var values
2019-10-09 09:20:53 +02:00
Christian Flothmann
2dd41e7f24 [Dotenv] support setting default env var values 2019-10-09 09:19:40 +02:00
Nicolas Grekas
0094884b17 feature #33851 [EventDispatcher] Allow to omit the event name when registering listeners (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

[EventDispatcher] Allow to omit the event name when registering listeners

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | #33453 (kind of)
| License       | MIT
| Doc PR        | TODO

After #30801 and #33485, this is another attempt at taking advantage of FQCN events for simplifying the registration of event listeners by inferring the event name from the parameter type declaration of the listener. This is my last attempt, I promise. 🙈

This time, I'd like to make the `event` attribute of the `kernel.event_listener` tag optional. This would allow us to build listeners like the following one without adding any attributes to the `kernel.event_listener` tag.

```php
namespace App\EventListener;

final class MyRequestListener
{
    public function __invoke(RequestEvent $event): void
    {
        // do something
    }
}
```

This in turn allows us to register a whole namespace of such listeners without having to configure each listener individually:

```YAML
services:
    App\EventListener\:
        resource: ../src/EventListener/*
        tags: [kernel.event_listener]
```

Commits
-------

6f32584c76 [EventDispatcher] Allow to omit the event name when registering listeners.
2019-10-09 09:04:55 +02:00
Nicolas Grekas
332d9e9067 bug #33919 [VarDumper] fix array key error for class SymfonyCaster (zcodes)
This PR was squashed before being merged into the 4.3 branch (closes #33919).

Discussion
----------

[VarDumper] fix array key error for class SymfonyCaster

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

Commits
-------

1f20f35f74 [VarDumper] fix array key error for class SymfonyCaster
2019-10-09 08:54:10 +02:00
zcodes
1f20f35f74 [VarDumper] fix array key error for class SymfonyCaster 2019-10-09 08:53:52 +02:00
Bálint Szekeres
015eb6625c added image/svg MIME support 2019-10-08 14:15:27 +02:00
Nicolas Grekas
0d4914149d bug #33885 [Form][DateTimeImmutableToDateTimeTransformer] Preserve microseconds and use \DateTime::createFromImmutable() when available (fancyweb)
This PR was merged into the 4.3 branch.

Discussion
----------

[Form][DateTimeImmutableToDateTimeTransformer] Preserve microseconds and use \DateTime::createFromImmutable() when available

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

For PHP >= 7.3, we should use [\DateTime::createFromImmutable()](https://www.php.net/manual/en/datetime.createfromimmutable.php) directly.

This patch also preserves the `\DateTime` microseconds when the conversion is done with `\DateTime::createFromFormat()`.

Commits
-------

dfa23034c3 [Form][DateTimeImmutableToDateTimeTransformer] Preserve microseconds and use \DateTime::createFromImmutable() when available
2019-10-08 13:04:26 +02:00
Nicolas Grekas
4223a5b361 bug #33900 [HttpKernel] Fix to populate $dotenvVars in data collector when not using putenv() (mynameisbogdan)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpKernel] Fix to populate $dotenvVars in data collector when not using putenv()

| Q             | A
| ------------- | ---
| Branch?       | 4.3 for bug fixes
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT

Fix to populate $dotenvVars in data collector when not using putenv()

Before:
<img width="618" alt="Screen Shot 2019-10-08 at 03 53 49" src="https://user-images.githubusercontent.com/707714/66360303-49397280-e983-11e9-98b9-5272b9762dda.png">
After:
<img width="614" alt="Screen Shot 2019-10-08 at 03 55 43" src="https://user-images.githubusercontent.com/707714/66360304-4b9bcc80-e983-11e9-82de-46d484daa585.png">

Commits
-------

ca3fb258bf [HttpKernel] fix $dotenvVars in data collector
2019-10-08 13:02:48 +02:00
Nicolas Grekas
fbf55c2057 feature #33461 [Cache] Improve RedisTagAwareAdapter invalidation logic & requirements (andrerom)
This PR was merged into the 4.4 branch.

Discussion
----------

[Cache] Improve RedisTagAwareAdapter invalidation logic & requirements

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes, _and improvment_
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT
| Doc PR        |

Changes logic of invalidation in RedisTagAwareAdapter in order to:
- Delete the  tag key on invalidation => _avoiding possible left behind empty tag keys that Redis is not allowed to evict, gradually consuming more and more memory_

Positive side effects of no longer using sPOP:
- Lowered requirements to Redis 2.8, and no specific version constraint for phpredis
- Lift limitation of 2 billion keys per tag _(Now only limited by Redis Set datatype: 4 billion)_

Commits
-------

3d38c58b42 [Cache] Improve RedisTagAwareAdapter invalidation logic & requirements
2019-10-08 12:16:35 +02:00
André R
3d38c58b42 [Cache] Improve RedisTagAwareAdapter invalidation logic & requirements 2019-10-08 12:08:50 +02:00
Fabien Potencier
c281b3b248 minor #33907 [Validator] Adds missing translations for the Norwegian Bokmål ("nb") locale (Harald Tollefsen)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Adds missing translations for the Norwegian Bokmål ("nb") locale

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? |no
| Tickets       | Fix #30176
| License       | MIT

Commits
-------

5baa3ea8d4 Adds missing translations for no nb
2019-10-08 11:22:35 +02:00
Harald Tollefsen
5baa3ea8d4 Adds missing translations for no nb 2019-10-08 11:13:14 +02:00
Fabien Potencier
986975469e minor #33893 [Validator] Add the missing translations for the Swedish ("sv") locale (terdia)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Add the missing translations for the Swedish ("sv") locale

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

This PR adds missing Swedish ("sv") locale translations
 to [src/Symfony/Component/Validator/Resources/translations/validators.sv.xlf](src/Symfony/Component/Validator/Resources/translations/validators.sv.xlf) file.

Ref: https://github.com/symfony/symfony/issues/33629

Commits
-------

0db883888c Add the missing translations for the Swedish ("sv") locale
2019-10-08 07:50:00 +02:00
bogdan
ca3fb258bf [HttpKernel] fix $dotenvVars in data collector 2019-10-08 04:19:00 +03:00
Ogbemudia Terry Osayawe
0db883888c Add the missing translations for the Swedish ("sv") locale 2019-10-07 21:31:56 +02:00
Robin Chalas
e3b513b5a1 minor #33884 Prevent ProgressBar redraw when message is same (fmasa)
This PR was squashed before being merged into the 4.4 branch (closes #33884).

Discussion
----------

Prevent ProgressBar redraw when message is same

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

This PR prevents ProgressBar from performing unnecessary redrawes if new output is same as current one. This is mostly useful when working with multiple progress bars. Same behavior can enforced by carefully setting redraw frequency, but I don't see any downsides for smarter redrawing by default.

This can be moved to `if ($this->overwrite)` if necessary, so it's applied only in case overwriting is enabled.

Commits
-------

78b515f049 Prevent ProgressBar redraw when message is same
2019-10-07 18:46:30 +02:00
František Maša
78b515f049 Prevent ProgressBar redraw when message is same 2019-10-07 18:46:23 +02:00
Robin Chalas
7db5be6150 feature #33779 [DI] enable improved syntax for defining method calls in Yaml (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[DI] enable improved syntax for defining method calls in Yaml

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

I've always found the syntax to write method calls in Yaml cumbersome. This PR allows a new syntax that is way easier to type and get (to me at least):

```yaml
services:
  App\MyService:
    calls:
      - addStuff: ['@App\Stuff']
```

for the case where a wither is to be declared, using the same wording as in XML:
```yaml
services:
  App\MyService:
    calls:
      - withStuff: !returns_clone ['@App\Stuff']
```

That's what this PR provides (+ additional syntax checks to guard against typos).

Note that deprecating the current syntax wouldn't be nice for the ecosystem in 4.4, but could be considered starting with 5.1.

Commits
-------

cdc7446051 [DI] enable improved syntax for defining method calls in Yaml
2019-10-07 18:43:27 +02:00
Nicolas Grekas
cdc7446051 [DI] enable improved syntax for defining method calls in Yaml 2019-10-07 18:41:11 +02:00
Fabien Potencier
a4f90e8258 bumped Symfony version to 4.3.6 2019-10-07 17:19:44 +02:00
Fabien Potencier
931fecb088
Merge pull request #33891 from fabpot/release-4.3.5
released v4.3.5
2019-10-07 17:14:38 +02:00
Fabien Potencier
a87f8f983a updated VERSION for 4.3.5 2019-10-07 17:06:41 +02:00
Fabien Potencier
9371e9c72c updated CHANGELOG for 4.3.5 2019-10-07 17:06:24 +02:00
Fabien Potencier
dce0c183b4 bug #33742 [Crawler] document $default as string|null (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[Crawler] document $default as string|null

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

This has been introduced in 4.3

Commits
-------

e96add4787 [Crawler] document $default as string|null
2019-10-07 16:56:32 +02:00
Fabien Potencier
e3624e7086 bumped Symfony version to 3.4.33 2019-10-07 16:51:28 +02:00
Fabien Potencier
2815d1fa34
Merge pull request #33889 from fabpot/release-3.4.32
released v3.4.32
2019-10-07 16:42:16 +02:00
Fabien Potencier
83b90c2e00 updated VERSION for 3.4.32 2019-10-07 16:41:56 +02:00
Fabien Potencier
fd683f05ea update CONTRIBUTORS for 3.4.32 2019-10-07 16:41:46 +02:00
Fabien Potencier
ed01f3c511 updated CHANGELOG for 3.4.32 2019-10-07 16:41:35 +02:00
Fabien Potencier
38b3dc898e bug #32308 [Messenger] DoctrineTransport: ensure auto setup is only done once (bendavies)
This PR was squashed before being merged into the 4.3 branch (closes #32308).

Discussion
----------

[Messenger] DoctrineTransport: ensure auto setup is only done once

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? |no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Setup is done for every invocation of `get`, `find`, and `findAll`.

For `get`, this causes message consumption to be very slow, as slow as 1 message per second on my moderately sized schema, because a schema diff is done in `setup` every `get`.

I'm not sure what the desired behaviour is here, but it seems like we should try performing a query, fail once, `setup`, and retry. This will the same approach taken by the PDO Cache.

However, we still need auto setup in `get`, as `get` starts a transaction, so the auto setup in `executeQuery` won't be called.

Further more, the same problem seems to exist for the AMPQ Transport, but the performance impact should be less there, but i have not tried.

Commits
-------

02414027e1 [Messenger] DoctrineTransport: ensure auto setup is only done once
2019-10-07 16:35:38 +02:00
Ben Davies
02414027e1 [Messenger] DoctrineTransport: ensure auto setup is only done once 2019-10-07 16:35:32 +02:00
Alexander M. Turek
6f32584c76 [EventDispatcher] Allow to omit the event name when registering listeners. 2019-10-07 15:29:43 +02:00
Thomas Calvet
dfa23034c3 [Form][DateTimeImmutableToDateTimeTransformer] Preserve microseconds and use \DateTime::createFromImmutable() when available 2019-10-07 15:06:40 +02:00
Nicolas Grekas
bf406da78f Merge branch '4.3' into 4.4
* 4.3:
  [travis] Fix build-packages script
  [HttpClient] bugfix exploding values of headers
  Remove useless testCanCheckIfTerminalIsInteractive test case
  [Validator] Add the missing translations for the Thai (\"th\") locale
  [Routing] gracefully handle docref_root ini setting
  [Validator] Fix ValidValidator group cascading usage
2019-10-07 14:37:47 +02:00
Nicolas Grekas
05ab86378c Merge branch '3.4' into 4.3
* 3.4:
  [travis] Fix build-packages script
  Remove useless testCanCheckIfTerminalIsInteractive test case
  [Validator] Add the missing translations for the Thai (\"th\") locale
  [Validator] Fix ValidValidator group cascading usage
2019-10-07 14:36:49 +02:00
Nicolas Grekas
0272b8d341 [travis] Fix build-packages script 2019-10-07 14:36:18 +02:00
Nicolas Grekas
62216ea677 minor #33770 Add types to constructors and private/final/internal methods (Batch III) (derrabus)
This PR was squashed before being merged into the 4.4 branch (closes #33770).

Discussion
----------

Add types to constructors and private/final/internal methods (Batch III)

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

Followup to #33709, this time with:
* Validator
* VarDumper
* Workflow
* Yaml
* all bridges
* all bundles

That should be the final batch. 😃

Commits
-------

6493902287 Add types to constructors and private/final/internal methods (Batch III)
2019-10-07 13:33:36 +02:00
Alexander M. Turek
6493902287 Add types to constructors and private/final/internal methods (Batch III) 2019-10-07 13:33:25 +02:00
Nicolas Grekas
199881477e feature #33743 [HttpClient] Async HTTPlug client (Nyholm)
This PR was squashed before being merged into the 4.4 branch (closes #33743).

Discussion
----------

[HttpClient] Async HTTPlug client

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | Fix #33710, Fix #32142
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/12389

This PR removes `HttplugClient`'s dependency on `Psr18Client`. It will also add an `HttplugPromise` to make sure we sure we respect the Httplug's `HttpAsyncClient` interface.

It implements `HttpAsyncClient::sendAsyncRequest()` and provides two extensions:
- `HttplugPromise::cancel()` allows cancelling a promise (and the underlying response)
- `HttplugClient::wait()` allows to tick the promise pool, with configurable timeouts.

Commits
-------

4fd593f869 [HttpClient] Async HTTPlug client
2019-10-07 13:22:04 +02:00
Nyholm
4fd593f869 [HttpClient] Async HTTPlug client 2019-10-07 13:21:57 +02:00
Nicolas Grekas
ce7c0b4590 feature #33856 [Messenger] Allow to configure the db index on Redis transport (chalasr)
This PR was merged into the 4.4 branch.

Discussion
----------

[Messenger] Allow to configure the db index on Redis transport

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

Quite useful for testing.

Commits
-------

115a9bbeda [Messenger] Allow to configure the db index on Redis transport
2019-10-07 13:15:42 +02:00
Robin Chalas
115a9bbeda [Messenger] Allow to configure the db index on Redis transport 2019-10-07 13:15:32 +02:00
Pierre Gasté
d49a7387de [Mailer] added ReplyTo option for PostmarkApiTransport 2019-10-07 13:09:42 +02:00
Nicolas Grekas
38ec2f3398 minor #33882 [VarDumper] Made all casters final (lyrixx)
This PR was merged into the 4.4 branch.

Discussion
----------

[VarDumper] Made all casters final

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

Commits
-------

3044a91838 [VarDumper] Made all casters final
2019-10-07 13:08:27 +02:00