Commit Graph

54332 Commits

Author SHA1 Message Date
Vasilij Dusko | CREATION
1b59a7d47e * LightSmsTransport.php - string param 2021-04-01 08:41:55 +03:00
Elan Ruusamäe
c4c79662db
Update UPGRADE-6.0.md
Fix unclosed backtick
2021-04-01 02:13:11 +03:00
Nyholm
990b51ba0a
bug #40629 [DependencyInjection] Fix "url" env var processor behavior when the url has no path (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[DependencyInjection] Fix "url" env var processor behavior when the url has no path

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

Before:
```yaml
MY_URL_ENV_VAR=http://symfony.com
%env(key:path:url:MY_URL_ENV_VAR)% --> false
```

After:
```yaml
MY_URL_ENV_VAR=http://symfony.com
%env(key:path:url:MY_URL_ENV_VAR)% --> null
```

Returning `false` for the path prevents me from using the `default` env var processor that is triggered only for `''` and `null`.
(`%env(default:my_fallback_param:key:path:url:MY_URL_ENV_VAR)%`)

BTW, with PHP 8, it actually works because `substr(null, 1)` behavior changed (see https://3v4l.org/oHf6l).

Commits
-------

2876cf9cc6 [DependencyInjection] Fix "url" env var processor behavior when the url has no path
2021-03-31 21:58:59 +02:00
Jérémy Derussé
cf66399399
Fix sleep value 2021-03-31 21:55:39 +02:00
Nyholm
f963ae476a
minor #40657 [Notifier] add missing LICENSE file for SpotHit (nicolas-grekas)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[Notifier] add missing LICENSE file for SpotHit

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

Commits
-------

f4c28cbfc5 [Notifier] add missing LICENSE file for SpotHit
2021-03-31 21:48:03 +02:00
Nyholm
2ceb35a805
bug #40655 [Cache] skip storing failure-to-save as misses in ArrayAdapter (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[Cache] skip storing failure-to-save as misses in ArrayAdapter

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

In addition to #40645

Commits
-------

ba6698795c [Cache] skip storing failure-to-save as misses in ArrayAdapter
2021-03-31 21:20:27 +02:00
Nicolas Grekas
f4c28cbfc5 [Notifier] add missing LICENSE file for SpotHit 2021-03-31 18:35:27 +02:00
Nicolas Grekas
ba6698795c [Cache] skip storing failure-to-save as misses in ArrayAdapter 2021-03-31 17:30:10 +02:00
Fabien Potencier
f6159038ed feature #40576 [Mime] Remove @internal from Headers methods (VincentLanglet)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[Mime] Remove @internal from Headers methods

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| 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.
 - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry
-->

I don't understand why the methods
- `Headers::getHeaderBody()`
- `Headers::setHeaderBody()`
- `Headers::getHeaderParameter()`
- `Headers::setHeaderParameter()`
are marked as internal.

They are already used by others libraries, like
a6c3fa9aea/Transport/MandrillApiTransport.php (L92)
a6c3fa9aea/Transport/MandrillApiTransport.php (L99)

The implementation shouldn't change so they could be under the BC promise.
Plus they are useful, and I don't see any other way that reimplementing the method if we want to do something like
```
->getHeaderParameter('Content-Disposition', 'name')
```

Commits
-------

592fb13456 Remove internal annotation
2021-03-31 13:46:29 +02:00
Guilliam Xavier
3bdf8d7238
[Validator] Delete obsolete statement in Regex::getHtmlPattern() phpDoc 2021-03-31 11:00:59 +02:00
Nyholm
f19d72aa07
[FrameworkBundle] Remove author comments for configuration and extension 2021-03-31 10:59:36 +02:00
Nyholm
2f20156021
minor #40648 [Notifier] [FakeSms] Change DSN to be more realistic (OskarStark)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[Notifier] [FakeSms] Change DSN to be more realistic

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Follows https://github.com/symfony/symfony/pull/39949
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Just a minor tests change

Commits
-------

0b13575df5 [Notifier] [FakeSms] Change DSN to be more realistic
2021-03-31 09:55:22 +02:00
Oskar Stark
0b13575df5 [Notifier] [FakeSms] Change DSN to be more realistic 2021-03-31 09:19:44 +02:00
Robin Chalas
3154509985 feature #40575 [FrameworkBundle][HttpKernel][TwigBridge] Add an helper to generate fragments URL (dunglas)
This PR was squashed before being merged into the 5.3-dev branch.

Discussion
----------

[FrameworkBundle][HttpKernel][TwigBridge] Add an helper to generate fragments URL

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

This PR adds a new helper to generate raw fragment URL. Fragments will be useful to generate lazy frames with Symfony UX Turbo (https://github.com/symfony/ux/pull/64). This will also be convenient when using hinclude, ESI etc in case you want full control over the generated HTML.
This is also more in sync with the new best practices we apply in the form component (generate the HTML by yourself instead of using Twig helpers hiding the HTML elements).

Example:

```html
<turbo-frame id="set_aside_tray" src="{{ fragment_uri(controller('Symfony\Bundle\FrameworkBundle\Controller', {template: "foo.html.twig"})) }}">
  <img src="/icons/spinner.gif">
</turbo-frame>
```

Commits
-------

5d29d76612 [FrameworkBundle][HttpKernel][TwigBridge] Add an helper to generate fragments URL
2021-03-30 16:47:58 +02:00
Kévin Dunglas
5d29d76612 [FrameworkBundle][HttpKernel][TwigBridge] Add an helper to generate fragments URL 2021-03-30 16:47:49 +02:00
Robin Chalas
7327919e9e feature #38468 Messenger multiple failed transports (monteiro)
This PR was squashed before being merged into the 5.3-dev branch.

Discussion
----------

Messenger multiple failed transports

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix #34911
| License       | MIT
| Doc PR        | symfony/symfony-docs#13489
<!--
https://github.com/symfony/symfony-docs/pull/13489 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/roadmap):
 - 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 master.
-->

## Strategy applied

- Pass a map of transports and failed transports to the `SendFailedMessageToFailureTransportListener`. This way we re-use the same listener.
- Local failed transport has more priority than a global failed transport defined.

## Configuration example

```yaml
# config/packages/messenger.yaml
framework:
    # no need to set failed transport globally if I want a specific behaviour per transport.
    failure_transport: failed # all transports have this failed transport
    messenger:
        transports:
            failed: 'doctrine://default?queue_name=failed'
            failed_important: 'doctrine://default?queue_name=failed_important'
            async:
                dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
                failure_transport: failed # takes precedence over the global defined "failed_transport"
                retry_strategy:
                    max_retries: 3
                    delay: 1000
                    multiplier: 2
            async_no_failure_transport: # it will use the global defined transport if no one is defined.
                dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
                retry_strategy:
                    max_retries: 3
                    delay: 1000
                    multiplier: 2
            async_send_specific_failure_queue:
                dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
                failed_transport: failed_important # takes precedence over the global defined "failed_transport"
                retry_strategy:
                    max_retries: 3
                    delay: 1000
                    multiplier: 2
```

You can test this feature easily on a [demo project](https://github.com/monteiro/messenger-multiple-failed-transports-pr34979). Just follow the [README](https://github.com/monteiro/messenger-multiple-failed-transports-pr34979).

**More information on issue #34911**

## What needs to be done so this can be merged:
- [x] validate strategy
- [ ] update src/**/CHANGELOG.md files
- [x] update tests to cover all cases
- [x] create doc PR

Commits
-------

5810b6c378 Messenger multiple failed transports
2021-03-30 16:29:57 +02:00
Hugo Monteiro
5810b6c378 Messenger multiple failed transports 2021-03-30 16:28:46 +02:00
Vasilij Dusko | CREATION
58ac708d0f * LightSmsTransport.php - return back www (without will not work). Now fail tests 2021-03-30 13:18:00 +03:00
Vasilij Dusko | CREATION
b9f9ff8c94 * LightSmsTransport.php - tests fail 2021-03-30 09:17:45 +03:00
Vasilij Dusko | CREATION
265f776394 * LightSmsTransport.php - issue with Symfony\Component\Notifier\Bridge\LightSms\Tests\LightSmsTransportTest 2021-03-30 09:15:57 +03:00
Vasilij Dusko | CREATION
23a446a2e1 * LightSmsTransport.php - issue with Symfony\Component\Notifier\Bridge\LightSms\Tests\LightSmsTransportTest 2021-03-30 09:14:59 +03:00
Vasilij Dusko | CREATION
08235e5a3c * LightSmsTransport.php - bug fix 2021-03-30 08:09:56 +03:00
Vasilij Dusko | CREATION
80ef5ba565 * LightSmsTransport.php - Unable to send the SMS: Closing direction to the user 2021-03-30 08:07:02 +03:00
Robin Chalas
e16be83f91 bug #40522 [Serializer] Allow AbstractNormalizer to use null for non-optional nullable constructor parameters without default value (Pierre Rineau)
This PR was merged into the 4.4 branch.

Discussion
----------

[Serializer] Allow AbstractNormalizer to use null for non-optional nullable constructor parameters without default value

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

Serializer component AbstractNormalizer attemps to guess constructor parameters, and falls back using default values when possible. Yet, it misses one use case: nullable non-optional parameter with value not being present in incoming input, case in which null is a valid value, not the default one, yet still valid.

This PR introduce a two-line fix that forcefully set null as value for missing from input non-optional nullable constructor parameters values.

Commits
-------

d29e433ae8 [Serializer] AbstractNormalizer force null for non-optional nullable constructor parameter denormalization when not present in input
2021-03-30 00:36:11 +02:00
Robin Chalas
5dad871833 bug #40595 add missing queue_name to find(id) in doctrine messenger transport (monteiro)
This PR was merged into the 4.4 branch.

Discussion
----------

add missing queue_name to find(id) in doctrine messenger transport

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

This bug was noticed by @weaverryan when reviewing the PR: https://github.com/symfony/symfony/pull/38468 related to multiple failure transports.

Commits
-------

bb26a92826 add missing queue_name to find(id) in doctrine messenger transport
2021-03-30 00:15:30 +02:00
Vasilij Duško
08b0729751
Update LightSmsTransport.php 2021-03-29 19:37:44 +03:00
Vasilij Duško
7180c1f400
Update LightSmsTransport.php 2021-03-29 19:26:20 +03:00
Robin Chalas
54209bb049 minor #40627 [Stopwatch] Document new "name" property of StopwatchEvent (simivar)
This PR was submitted for the 5.x branch but it was squashed and merged into the 5.2 branch instead.

Discussion
----------

[Stopwatch] Document new "name" property of StopwatchEvent

| Q             | A
| ------------- | ---
| Branch?       | 5.x <!-- see below -->
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | #37676 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| 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.
 - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry
-->

In Pull Request #37676 a new property was added to the `StopwatchEvent` which was not documented in `CHANGELOG.md` file

Commits
-------

de43e36a2c [Stopwatch] Document new "name" property of StopwatchEvent
2021-03-29 17:28:47 +02:00
Krystian Marcisz
de43e36a2c [Stopwatch] Document new "name" property of StopwatchEvent 2021-03-29 17:28:41 +02:00
Robin Chalas
481222f545 minor #40586 [Config][FrameworkBundle] Hint to use PHP 8+ or to install Annotations for using attributes/annots (dunglas)
This PR was merged into the 5.2 branch.

Discussion
----------

[Config][FrameworkBundle] Hint to use PHP 8+ or to install Annotations for using attributes/annots

…s to use attributes/annots

| Q             | A
| ------------- | ---
| Branch?       | 5.2
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | See https://github.com/symfony/recipes/pull/916
| License       | MIT
| Doc PR        | n/a

Improve the error message to hint that you can upgrade to PHP 8 instead of using `doctrine/annotations`.

Commits
-------

af6f3c2c08 [Config][FrameworkBundle] Hint to use PHP 8+ or to install Annotations to use attributes/annots
2021-03-29 17:18:19 +02:00
Vasilij Dusko | CREATION
f16b4d2aa2 * phone changed to from 2021-03-29 17:52:20 +03:00
Vasilij Dusko | CREATION
7f13dbf711 * sender changed to from 2021-03-29 17:49:52 +03:00
Robin Chalas
87a67be8b4 bug #40619 [FrameworkBundle] dont access the container to configure http_cache (nicolas-grekas)
This PR was merged into the 5.2 branch.

Discussion
----------

[FrameworkBundle] dont access the container to configure http_cache

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

Commits
-------

8aa6818322 [FrameworkBundle] dont access the container to configure http_cache
2021-03-29 16:42:07 +02:00
Thomas Calvet
2876cf9cc6 [DependencyInjection] Fix "url" env var processor behavior when the url has no path 2021-03-29 15:11:05 +02:00
Nyholm
d7b6805f83
minor #40626 [Notifier] [FakeSms] Use correct namespace (OskarStark)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[Notifier] [FakeSms] Use correct namespace

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Follow #39949
| License       | MIT
| Doc PR        |

This fixes the build

Needed after https://github.com/symfony/symfony/pull/40550

Commits
-------

5572bab94d [Notifier] [FakeSms] Use correct namespace
2021-03-29 14:31:11 +02:00
Alexander M. Turek
92dcdaa75b Merge branch '5.2' into 5.x
* 5.2:
  Bump Symfony version to 5.2.7
  Update VERSION for 5.2.6
  Update CHANGELOG for 5.2.6
  Bump Symfony version to 4.4.22
  Update VERSION for 4.4.21
  Update CONTRIBUTORS for 4.4.21
  Update CHANGELOG for 4.4.21
2021-03-29 14:19:02 +02:00
Alexander M. Turek
1993bb2fa5 Merge branch '4.4' into 5.2
* 4.4:
  Bump Symfony version to 4.4.22
  Update VERSION for 4.4.21
  Update CONTRIBUTORS for 4.4.21
  Update CHANGELOG for 4.4.21
2021-03-29 14:17:49 +02:00
Oskar Stark
5572bab94d [Notifier] [FakeSms] Use correct namespace 2021-03-29 14:17:30 +02:00
Oskar Stark
c14d189ba5 feature #39949 [Notifier] [FakeSms] Add the bridge (JamesHemery)
This PR was squashed before being merged into the 5.3-dev branch.

Discussion
----------

[Notifier] [FakeSms] Add the bridge

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      |no
| New feature?  | yes
| Deprecations? | no
| License       | MIT
| Doc PR        | symfony/symfony-docs#14870
| Recipe PR        | symfony/recipes#882

@OskarStark Bridge added :)

Commits
-------

351065e774 [Notifier] [FakeSms] Add the bridge
2021-03-29 14:05:03 +02:00
James Hemery
351065e774 [Notifier] [FakeSms] Add the bridge 2021-03-29 14:04:56 +02:00
Vasilij Dusko | CREATION
e20ef1ed35 * LightSmsTransport.php - change + to 00 2021-03-29 14:16:34 +03:00
Nyholm
68276562c3
Fixed support for nodes not extending BaseNode 2021-03-29 12:55:05 +02:00
Vasilij Dusko | CREATION
b0e64b9250 * LightSmsTransport.php - not ok throw exception 2021-03-29 13:51:17 +03:00
Vasilij Dusko | CREATION
fc13bb27e2 * LightSmsTransport.php - changed login for validation (the same like we have all places) 2021-03-29 13:34:15 +03:00
Vasilij Dusko | CREATION
5d2e6928f3 * LightSmsTransport.php - escape phone number 2021-03-29 13:29:53 +03:00
Vasilij Dusko | CREATION
8620e828a7 * LightSmsTransport.php - move timestamp 2021-03-29 13:14:06 +03:00
Nicolas Grekas
8aa6818322 [FrameworkBundle] dont access the container to configure http_cache 2021-03-29 10:37:12 +02:00
Vasilij Duško
66c34baf03 Update README.md 2021-03-29 08:45:01 +03:00
Vasilij Duško
2e0e1d733d Update README.md 2021-03-29 08:45:01 +03:00
Vasilij Duško
7b51e0dd7f Update src/Symfony/Component/Notifier/Bridge/LightSms/LightSmsTransport.php
Co-authored-by: Thibault RICHARD <thibault@widop.com>
2021-03-29 08:45:01 +03:00