Commit Graph

47378 Commits

Author SHA1 Message Date
Fabien Potencier c57378753c bug #35502 [Messenger] Fix bug when using single route with XML config (Nyholm)
This PR was squashed before being merged into the 4.4 branch (closes #35502).

Discussion
----------

[Messenger] Fix bug when using single route with XML config

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

When using just a single routing attribute with XML then the sky falls down.

This small change make sure everything works as expected.

Commits
-------

a2a606e897 [Messenger] Fix bug when using single route with XML config
2020-01-29 11:50:09 +01:00
Nyholm a2a606e897 [Messenger] Fix bug when using single route with XML config 2020-01-29 11:50:01 +01:00
Fabien Potencier 8769c7a356 feature #35503 [Messenger] Add TLS option to Redis transport's DSN (Nyholm)
This PR was squashed before being merged into the 5.1-dev branch (closes #35503).

Discussion
----------

[Messenger] Add TLS option to Redis transport's DSN

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

As suggested by @matas-valuzis, this will enable TLS support for Redis transport.

Configure it with the following DSN

```
redis://127.0.0.1?tls=1
```

The implementation just prefix the host with `tls://` as described here: https://github.com/phpredis/phpredis#connect-open

It is already possible to use TLS with the Redis transport, but there are not support in the DSN until now.

Commits
-------

09ec907a7e [Messenger] Add TLS option to Redis transport's DSN
2020-01-29 11:43:52 +01:00
Nyholm 09ec907a7e [Messenger] Add TLS option to Redis transport's DSN 2020-01-29 11:43:46 +01:00
Signor Pedro 9cbfad5853
[DependencyInjection] #35505 Fix typo in test name
Rename testThrowsExceptionWhenAddServiceOnACompiledContainer to testNoExceptionWhenAddServiceOnACompiledContainer.
2020-01-29 11:07:44 +01:00
Fabien Potencier f0748f8978 feature #35262 [Mailer] add ability to disable the TLS peer verification via DSN (Aurélien Fontaine)
This PR was squashed before being merged into the 5.1-dev branch (closes #35262).

Discussion
----------

[Mailer] add ability to disable the TLS peer verification via DSN

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | Fix
| License       | MIT
| Doc PR        | symfony/symfony-docs/pull/12997

Add the ability to disable the peer TLS verification with the DNS when using `EsmtpTransport` like this :

```
MAILER_DSN=smtp://foo@default?verify_peer=false
```

By default the verification is enabled

Commits
-------

4b854da73e [Mailer] add ability to disable the TLS peer verification via DSN
2020-01-29 08:52:41 +01:00
Aurélien Fontaine 4b854da73e [Mailer] add ability to disable the TLS peer verification via DSN 2020-01-29 08:52:36 +01:00
Fabien Potencier f0fbdee9c6 feature #35194 [Mailer] read default timeout from ini configurations (azjezz)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Mailer] read default timeout from ini configurations

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

```env
MAILER_DSN=mandrill+https://foo@default?timeout=30
```

Commits
-------

dafb057354 [Mailer] read default timeout from ini configurations
2020-01-28 14:02:44 +01:00
azjezz dafb057354 [Mailer] read default timeout from ini configurations 2020-01-28 13:53:45 +01:00
Nicolas Grekas 98c7d3027b [Dotenv] Add Dotenv::bootEnv() to check for .env.local.php before calling Dotenv::loadEnv() 2020-01-28 12:41:19 +01:00
Baptiste Leduc 0a92dab753
Rebase, fix tests, review & update CHANGELOG 2020-01-28 10:54:57 +01:00
Fabien Potencier 3945a5c80e feature #35422 [Messenger] Move Transports to separate packages (Nyholm)
This PR was squashed before being merged into the 5.1-dev branch (closes #35422).

Discussion
----------

[Messenger] Move Transports to separate packages

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

I think it is a good idea to have the transports in a separate package. The benefits a many:
- It allows us to have usage statistics
- The core messenger package is smaller
- Transports can have dependencies specified in composer.json instead of just suggests

This PR will not break BC but it requires to configure subtree split.

Commits
-------

2990c8f1e7 [Messenger] Move Transports to separate packages
2020-01-28 09:56:37 +01:00
Nyholm 2990c8f1e7 [Messenger] Move Transports to separate packages 2020-01-28 09:56:31 +01:00
Robin Chalas 5f87c7b434 minor #35487 [Messenger] Fix messenger argument (jderusse)
This PR was merged into the 4.3 branch.

Discussion
----------

[Messenger] Fix messenger argument

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

`Connection::DEFAULT_OPTIONS` is an key/value array. The exception `Unknown option found : [%s]. Allowed options are [%s]` should use allowed option's key instead of the value.

Commits
-------

ae0c6344b4 Fix exception message in Doctrine Messenger
2020-01-27 23:28:36 +01:00
Jérémy Derussé ae0c6344b4
Fix exception message in Doctrine Messenger 2020-01-27 19:01:48 +01:00
Fabien Potencier 1cfadb41dc feature #35425 [CssSelector] Added cache on top of CssSelectorConverter (lyrixx)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[CssSelector] Added cache on top of CssSelectorConverter

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

Commits
-------

ed11d526d9 [CssSelector] Added cache on top of CssSelectorConverter
2020-01-27 16:43:33 +01:00
Grégoire Pineau ed11d526d9 [CssSelector] Added cache on top of CssSelectorConverter 2020-01-27 15:56:28 +01:00
Nicolas Grekas b22a58449c feature #35362 [Cache] Add LRU + max-lifetime capabilities to ArrayCache (nicolas-grekas)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Cache] Add LRU + max-lifetime capabilities to ArrayCache

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | Fix https://github.com/orgs/symfony/projects/1#card-30686676
| License       | MIT
| Doc PR        | -

In https://github.com/symfony/symfony/pull/32294#issuecomment-508067745, @andrerom writes:

> if you plan to expose use of ArrayAdapter to a wider audience you should probably also add the following features to it:
> - max item limit to avoid reaching memory limits
> - own (very low, like default 100-500ms) TTL for in-memory caching, as it's in practice stale data when used in concurrent scenarios
>
> If you want to be advance you can also:
>
> - keep track of use, and evict cache items based on that using LFU when reaching limit
> - in-memory cache is domain & project specific in terms of how long it's somewhat "safe" to keep items in memory, so either describe when to use and not use on a per pool term, or allow use of pool to pass in flags to opt out of in-memory cache for cases developer knows it should be ignored

This PR implements these suggestions, via two new constructor arguments: `$maxLifetime` and `$maxItems`.

In Yaml:
```yaml
services:
    app.lru150_cache:
        parent: cache.adapter.array
        arguments:
            $maxItems: 150
            $maxLifetime: 0.150

framework:
    cache:
        pools:
            my_chained_pool:
                adapters:
                  - app.lru150_cache
                  - cache.adapter.filesystem
```

This configuration adds a local memory cache that keeps max 150 elements for 150ms on top of a filesystem cache.

/cc @lyrixx since you were also interested in it.

Commits
-------

48a5d5e8a9 [Cache] Add LRU + max-lifetime capabilities to ArrayCache
2020-01-27 11:48:06 +01:00
Nicolas Grekas c966016a37 minor #35375 [Lock] Don't allow mysqli to be used as it doesn't work (duncan3dc)
This PR was merged into the 4.3 branch.

Discussion
----------

[Lock] Don't allow mysqli to be used as it doesn't work

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

Mysqli doesn't support named parameters, so if you pass a doctrine connection using `mysqli` then you get the following error:
`You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':id, :token, UNIX_TIMESTAMP() + 300)'`
This PR ensures a clear error is provided and suggests to use `pdo_mysql` instead

Commits
-------

ef3bcda5e3 Mysqli doesn't support the named parameters used by PdoStore
2020-01-27 11:29:37 +01:00
Nicolas Grekas 51821353c0 feature #35402 [Console] Set Command::setHidden() final for adding default param in SF 6.0 (lyrixx)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Console] Set Command::setHidden() final for adding default param in SF 6.0

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

Commits
-------

e2ede070fa [Console] Add default parameter (true) for Command::setHidden()
2020-01-27 11:27:10 +01:00
Nicolas Grekas 592a31a5e6 bug #35438 [SecurityBundle] fix ldap_bind service arguments (Ioni14)
This PR was merged into the 4.4 branch.

Discussion
----------

[SecurityBundle] fix ldap_bind service arguments

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

The 6th argument of `LdapBindAuthenticationProvider` was not correctly set in the service declaration `security_listeners.xml`. Thus, instead `'Invalid credentials.'` we had `'User "foo" not found.'`.

Commits
-------

7ec6a090da [SecurityBundle] fix security.authentication.provider.ldap_bind arguments
2020-01-27 11:13:00 +01:00
Nicolas Grekas 8773ccff71 bug #35429 [DI] CheckTypeDeclarationsPass now checks if value is type of parameter type (pfazzi)
This PR was merged into the 4.4 branch.

Discussion
----------

[DI]  CheckTypeDeclarationsPass now checks if value is type of parameter type

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

Commits
-------

0d4c0a6492 [DI]  CheckTypeDeclarationsPass now checks if value is type of parameter type
2020-01-27 11:10:01 +01:00
Patrick Luca Fazzi 0d4c0a6492 [DI] CheckTypeDeclarationsPass now checks if value is type of parameter type 2020-01-27 11:09:51 +01:00
Thomas Talbot 7ec6a090da [SecurityBundle] fix security.authentication.provider.ldap_bind arguments 2020-01-27 11:02:23 +01:00
Nicolas Grekas af295b5b8d minor #35441 Improve displaying anonymous classes (nicolas-grekas)
This PR was merged into the 5.1-dev branch.

Discussion
----------

Improve displaying anonymous classes

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

When an anonymous class extends a base `Foo` class, we display them as `Foo@anonymous`.

When one doesn't extend any base class, we display `@anonymous`.

This PR improves the situation by displaying `FooInterface@anonymous` when an anonymous class doesn't extend any base class but implements `FooInterface`.

Commits
-------

487bcc6200 Improve displaying anonymous classes
2020-01-27 10:57:09 +01:00
Nicolas Grekas c956d62e5c bug #35464 [ErrorHandler] Add debug argument to decide whether debug page is shown or not (yceruto)
This PR was merged into the 4.4 branch.

Discussion
----------

[ErrorHandler] Add debug argument to decide whether debug page is shown or not

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

This ensures that the debug page (with stack trace) won't be (by default) displayed in non-CLI context when an early error occurs (after FB::boot()) in non-debug mode (prod). And `Debug::enable()` will enable it explicitly.

Commits
-------

cf80224589 Added debug argument to decide if debug page should be shown or not
2020-01-27 10:48:47 +01:00
Nicolas Grekas b90664ba18 minor #35472 [Security] Improved error message when no supported user provider is found (wouterj)
This PR was submitted for the 4.4 branch but it was merged into the 3.4 branch instead.

Discussion
----------

[Security] Improved error message when no supported user provider is found

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

Commits
-------

6b2db6dc30 Improved error message when no supported user provider is found
2020-01-27 10:47:05 +01:00
Wouter de Jong 6b2db6dc30 Improved error message when no supported user provider is found 2020-01-27 10:46:58 +01:00
Nicolas Grekas 86ccf322e8 minor #35473 [Cache] Don't allow mysqli to be used as it doesn't work (duncan3dc)
This PR was merged into the 4.3 branch.

Discussion
----------

[Cache] Don't allow mysqli to be used as it doesn't work

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

As discussed in #35375 Mysqli doesn't support named parameters, so if you pass a doctrine connection using `mysqli` then you get errors for any queries using named parameters.
This PR ensures a clear error is provided and suggests to use `pdo_mysql` instead

Commits
-------

a7864489b0 Mysqli doesn't support the named parameters used by PdoAdapter
2020-01-27 10:22:54 +01:00
Craig Duncan a7864489b0 Mysqli doesn't support the named parameters used by PdoAdapter 2020-01-27 09:15:09 +00:00
Yonel Ceruto cf80224589 Added debug argument to decide if debug page should be shown or not 2020-01-26 15:27:56 -05:00
Nicolas Grekas 487bcc6200 Improve displaying anonymous classes 2020-01-26 14:13:42 +01:00
Robin Chalas 524ee7acb6 Merge branch '5.0'
* 5.0:
  Fix displaying anonymous classes on PHP >= 7.4.2
2020-01-25 17:03:00 +01:00
Robin Chalas 806e8b159c Merge branch '4.4' into 5.0
* 4.4:
  Fix displaying anonymous classes on PHP >= 7.4.2
2020-01-25 16:56:29 +01:00
Nicolas Grekas ef8b34c75f Merge branch '4.3' into 4.4
* 4.3:
  Fix displaying anonymous classes on PHP >= 7.4.2
2020-01-25 13:44:29 +01:00
Nicolas Grekas d695b43b98 minor #35471 Fix displaying anonymous classes on PHP >= 7.4.2 (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

Fix displaying anonymous classes on PHP >= 7.4.2

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

Commits
-------

dd94b386a9 Fix displaying anonymous classes on PHP >= 7.4.2
2020-01-25 13:38:50 +01:00
Nicolas Grekas dd94b386a9 Fix displaying anonymous classes on PHP >= 7.4.2 2020-01-25 13:32:28 +01:00
Nicolas Grekas 48a5d5e8a9 [Cache] Add LRU + max-lifetime capabilities to ArrayCache 2020-01-24 18:00:05 +01:00
Nicolas Grekas 8f92c85689 [DI][Routing] add wither to configure the path of PHP-DSL configurators 2020-01-24 15:52:32 +01:00
Nicolas Grekas f4ff77cc08 Merge branch '5.0'
* 5.0: (21 commits)
  [DoctrineBridge] [DX] Improve condition for exception text in ManagerRegistry to avoid confusion
  Fix testing with mongodb
  suggest a non-deprecated function replacement
  Minor Travis cosmetic patch
  [Cache] fix checking for igbinary availability
  [HttpKernel] Check if lock can be released
  Fixes a runtime error (Impossible to access an attribute ("value") on a double variable...) when accessing the cache panel (@see #35419)
  bumped Symfony version to 5.0.4
  updated VERSION for 5.0.3
  updated CHANGELOG for 5.0.3
  bumped Symfony version to 4.4.4
  updated VERSION for 4.4.3
  updated CHANGELOG for 4.4.3
  bumped Symfony version to 4.3.11
  updated VERSION for 4.3.10
  updated CHANGELOG for 4.3.10
  bumped Symfony version to 3.4.38
  updated VERSION for 3.4.37
  update CONTRIBUTORS for 3.4.37
  updated CHANGELOG for 3.4.37
  ...
2020-01-23 12:07:40 +01:00
Nicolas Grekas bbda340099 Merge branch '4.4' into 5.0
* 4.4:
  [DoctrineBridge] [DX] Improve condition for exception text in ManagerRegistry to avoid confusion
  Fix testing with mongodb
  suggest a non-deprecated function replacement
  Minor Travis cosmetic patch
  [Cache] fix checking for igbinary availability
  [HttpKernel] Check if lock can be released
  Fixes a runtime error (Impossible to access an attribute ("value") on a double variable...) when accessing the cache panel (@see #35419)
  bumped Symfony version to 4.4.4
  updated VERSION for 4.4.3
  updated CHANGELOG for 4.4.3
  bumped Symfony version to 4.3.11
  updated VERSION for 4.3.10
  updated CHANGELOG for 4.3.10
  bumped Symfony version to 3.4.38
  updated VERSION for 3.4.37
  update CONTRIBUTORS for 3.4.37
  updated CHANGELOG for 3.4.37
  [FrameworkBundle] Add --show-arguments example to debug:container command help text
2020-01-23 12:07:12 +01:00
Nicolas Grekas 2fd34ce70e bug #35423 Fixes a runtime error when accessing the cache panel (DamienHarper)
This PR was merged into the 4.4 branch.

Discussion
----------

Fixes a runtime error when accessing the cache panel

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #35419
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Fixes a runtime error (_Impossible to access an attribute ("value") on a double variable..._) when accessing the cache panel on 4.4.3

Commits
-------

4740b10132 Fixes a runtime error (Impossible to access an attribute ("value") on a double variable...) when accessing the cache panel (@see #35419)
2020-01-23 12:00:13 +01:00
Nicolas Grekas c08fabebe7 minor #35447 [Security] suggest a non-deprecated function replacement (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Security] suggest a non-deprecated function replacement

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

Commits
-------

731730fe2f suggest a non-deprecated function replacement
2020-01-23 11:58:55 +01:00
Nicolas Grekas a3acdbdd19 Merge branch '4.3' into 4.4
* 4.3:
  [DoctrineBridge] [DX] Improve condition for exception text in ManagerRegistry to avoid confusion
  Fix testing with mongodb
  Minor Travis cosmetic patch
  [Cache] fix checking for igbinary availability
  bumped Symfony version to 4.3.11
  updated VERSION for 4.3.10
  updated CHANGELOG for 4.3.10
  bumped Symfony version to 3.4.38
  updated VERSION for 3.4.37
  update CONTRIBUTORS for 3.4.37
  updated CHANGELOG for 3.4.37
2020-01-23 11:56:47 +01:00
Nicolas Grekas a1e105ee6c minor #35396 [DoctrineBridge] [DX] Improve condition for exception text in ManagerRegistry to avoid confusion (guilliamxavier)
This PR was submitted for the 4.4 branch but it was merged into the 4.3 branch instead.

Discussion
----------

[DoctrineBridge] [DX] Improve condition for exception text in ManagerRegistry to avoid confusion

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

(Targetting 4.4 because 4.3 is already almost EOM)

Commits
-------

0d47fdfb49 [DoctrineBridge] [DX] Improve condition for exception text in ManagerRegistry to avoid confusion
2020-01-23 11:55:20 +01:00
Guilliam Xavier 0d47fdfb49 [DoctrineBridge] [DX] Improve condition for exception text in ManagerRegistry to avoid confusion 2020-01-23 11:55:13 +01:00
Nicolas Grekas c2e17645c2 Merge branch '3.4' into 4.3
* 3.4:
  Fix testing with mongodb
  bumped Symfony version to 3.4.38
  updated VERSION for 3.4.37
  update CONTRIBUTORS for 3.4.37
  updated CHANGELOG for 3.4.37
2020-01-23 11:52:31 +01:00
Thomas Calvet 347d8252fb [String] Made AbstractString::width() follow POSIX.1-2001
Co-authored-by: Nicolas Grekas <nicolas.grekas@gmail.com>
2020-01-23 11:37:52 +01:00
Nicolas Grekas d90a503160 minor #35450 Fix testing with mongodb (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix testing with mongodb

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

Commits
-------

28cd964ac9 Fix testing with mongodb
2020-01-23 11:33:58 +01:00
Nicolas Grekas 28cd964ac9 Fix testing with mongodb 2020-01-23 11:22:55 +01:00