Commit Graph

54148 Commits

Author SHA1 Message Date
Oskar Stark
0ce156c484 [Notifier] [FakeChat] Added the bridge 2021-04-06 12:38:02 +02:00
Oskar Stark
71a407da29 feature #40607 [Notifier] Add LightSms notifier bridge (Vasilij Dusko, StaffNowa)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[Notifier] Add LightSms notifier bridge

| 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 -->
| License       | MIT
| Doc PR        | symfony/symfony-docs/pull/15178
| Recipe PR | https://github.com/symfony/recipes/pull/921

LightSms notifier https://github.com/D4DLab/lightsms-notifier

Commits
-------

37c665eb5c * LightSmsTransport.php - make fabbot happy
68a12fa4f4 * fix tests
f1f83b9e5c * LightSmsTransport.php - use query string parameters
026dcd97a9 * LightSmsTransport.php - isset
2a9ac2d92a * LightSmsTransport.php - fix
4213564be1 * composer.json - fix Fabien comment from another pull request #40646
21e972a69e * coding standard
bea5256cc2 * type cast. On success lightsms return error code like string. On error return integer.
9b2e2d0b4a * type cast. On success lightsms return error code like string. On error return integer.
0d7488b10a * type cast. On success lightsms return error code like string. On error return integer.
9a832ef595 * LightSmsTransport.php - via mistake removed www which return (Closing direction to the user). Removed additional isset which in reality not needed. Added new method which allow to return "unknown error" and throw exception if not successfully
178d9c2a5a * pull request #40696
95e82f6ef1 Update LightSmsTransport.php
a197deeed1 * LightSmsTransport.php - better to remove if we do not have it?
83d259832b * Coding Standard patch
1ff97e410a * LightSmsTransport.php - build signature and use http_build_query, timestamp int
1c993b7224 * ERROR_CODES -> int * www. - bug * isset validate ['error']
1b59a7d47e * LightSmsTransport.php - string param
58ac708d0f * LightSmsTransport.php - return back www (without will not work). Now fail tests
b9f9ff8c94 * LightSmsTransport.php - tests fail
265f776394 * LightSmsTransport.php - issue with Symfony\Component\Notifier\Bridge\LightSms\Tests\LightSmsTransportTest
23a446a2e1 * LightSmsTransport.php - issue with Symfony\Component\Notifier\Bridge\LightSms\Tests\LightSmsTransportTest
08235e5a3c * LightSmsTransport.php - bug fix
80ef5ba565 * LightSmsTransport.php - Unable to send the SMS: Closing direction to the user
08b0729751 Update LightSmsTransport.php
7180c1f400 Update LightSmsTransport.php
f16b4d2aa2 * phone changed to from
7f13dbf711 * sender changed to from
e20ef1ed35 * LightSmsTransport.php - change + to 00
b0e64b9250 * LightSmsTransport.php - not ok throw exception
fc13bb27e2 * LightSmsTransport.php - changed login for validation (the same like we have all places)
5d2e6928f3 * LightSmsTransport.php - escape phone number
8620e828a7 * LightSmsTransport.php - move timestamp
66c34baf03 Update README.md
2e0e1d733d Update README.md
7b51e0dd7f Update src/Symfony/Component/Notifier/Bridge/LightSms/LightSmsTransport.php
079406ed3d Update src/Symfony/Component/Notifier/Bridge/LightSms/LightSmsTransport.php
0e41bc9186 Update src/Symfony/Component/Notifier/Bridge/LightSms/Tests/LightSmsTransportFactoryTest.php
3d0d79cfe2 Update src/Symfony/Component/Notifier/Bridge/LightSms/Tests/LightSmsTransportFactoryTest.php
e0a68bd0ac Update src/Symfony/Component/Notifier/Bridge/LightSms/LightSmsTransport.php
1b073c2366 Update src/Symfony/Component/Notifier/Bridge/LightSms/LightSmsTransport.php
b0891be0b2 Update src/Symfony/Component/Notifier/Bridge/LightSms/LightSmsTransport.php
49b4780f40 Update src/Symfony/Component/Notifier/Bridge/LightSms/LightSmsTransport.php
b2e46387b7 Update src/Symfony/Component/Notifier/Bridge/LightSms/LightSmsTransport.php
c02dbbd963 Update src/Symfony/Component/Notifier/Bridge/LightSms/README.md
9f89014d94 Update src/Symfony/Component/Notifier/Bridge/LightSms/README.md
5e54dfe475 * LightSmsTransport.php - quick fix for private constant.
3cbbc85e43 * HOST split into two parts
9e1809e6ae * small changes
febff4613d Update src/Symfony/Component/Notifier/Bridge/LightSms/LICENSE
4a11b945a3 * github account author
728a3e2450 * Transport.php - missing use
ce41756a6c * notifier_transports.php - Coding Standard
d1ccd46e75 * Attached file changes which are required to run the lightsms notifier
a0fae7dc4a * tests
15686c0851 * LightSmsTransport.php - Coding Standard
2f65b92cba * LightSmsTransport.php - Coding Standard
6792535a52 * composer.json - requirements bug fix
167f325f40 * LightSmsTransport.php - logic error
be8f994fca * LightSmsTransport.php - return type
f2ba226b46 * LightSmsTransport.php - bug fix
b075c0eae2 * LightSms notifier
2021-04-06 12:32:50 +02:00
Robin Chalas
de143497ff minor #40671 [Notifier] Mercure bridge: bump mercure dependency to 0.5 (azjezz, mtarld)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[Notifier] Mercure bridge: bump mercure dependency to 0.5

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/15179

Bump Mercure bridge's `symfony/mercure` dependency to 0.5 to deal with hubs instead of publishers.

---
To be able to use `HandlerRegistry::all` method, this PR needs https://github.com/symfony/mercure/pull/50 to be merged and released.

Commits
-------

498f96f1a8 Drop support of mercure:^0.4
d3306fdc92 add support for symfony/mercure:^0.5
2021-04-06 12:24:06 +02:00
Vasilij Dusko | CREATION
37c665eb5c * LightSmsTransport.php - make fabbot happy 2021-04-06 13:22:50 +03:00
Vasilij Dusko | CREATION
68a12fa4f4 * fix tests 2021-04-06 13:18:17 +03:00
Vasilij Dusko | CREATION
f1f83b9e5c * LightSmsTransport.php - use query string parameters 2021-04-06 13:12:05 +03:00
Vasilij Dusko | CREATION
026dcd97a9 * LightSmsTransport.php - isset 2021-04-06 13:09:30 +03:00
Vasilij Dusko | CREATION
2a9ac2d92a * LightSmsTransport.php - fix 2021-04-06 13:06:59 +03:00
Mathias Arlaud
498f96f1a8 Drop support of mercure:^0.4 2021-04-06 11:32:33 +02:00
Alexander M. Turek
3ca3de50c3 Merge branch '5.2' into 5.x
* 5.2:
  improve dx and document auth exception
2021-04-05 17:16:47 +02:00
Wouter de Jong
2ad08d5a02 minor #40672 [Security] [Passport] improve dx and document AuthenticationException (jrushlow)
This PR was merged into the 5.2 branch.

Discussion
----------

[Security] [Passport] improve dx and document AuthenticationException

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

`Passport::getUser()` (Instance of `UserPassportInterface::class`) throws an `AuthenticationException::class`
 if a user does not exist. Let's document that for better DX and visibility.

Use case:

- User login w/ a `username` that does not exist (custom json authenticator)
- Attempt Authentication...
- Auth failed `LoginFailureEvent` dispatched
- snippet below:
```php
// Userland\LoginFailureEventSubscriber::class

public function dispatchFailure(LoginFailureEvent $event): void
{
   $user = $event->getPassport()->getUser();

   $message = new UserlandMessage($user);

  $this->messageBus->dispatch($message);
}
```
- `401` status is returned.

The above subscriber fails silently because a `UsernameNotFoundException` was ultimately thrown from `UserBadge::getUser()`.

Commits
-------

97ceba0f5d improve dx and document auth exception
2021-04-05 14:32:26 +02:00
Vasilij Dusko
4213564be1 * composer.json - fix Fabien comment from another pull request #40646 2021-04-05 15:00:41 +03:00
Oskar Stark
712100924d minor #40696 [Mailer][Notifier] added missing gitattributes and gitignore (iamvar)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[Mailer][Notifier] added missing gitattributes and gitignore

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

just added missing .gitattributes and .gitignore to be consistent with other components

Commits
-------

00ac6d4b45 added missing gitattributes and gitignore
2021-04-04 17:37:30 +02:00
Alexander M. Turek
51c0c5a1bf Merge branch '5.2' into 5.x
* 5.2:
  added missing gitattributes and gitignore
  allow CurlHttpClient on Windows
  [Security] Mark ExpiredLoginLinkStorage as experimental
  remove references to "Silex"
2021-04-04 14:44:25 +02:00
Alexander M. Turek
58fa56f359 Merge branch '4.4' into 5.2
* 4.4:
  allow CurlHttpClient on Windows
  remove references to "Silex"
2021-04-04 14:43:53 +02:00
Alexander M. Turek
09866a3b76 minor #40693 [Security] Mark ExpiredLoginLinkStorage as experimental (Nyholm)
This PR was merged into the 5.2 branch.

Discussion
----------

[Security] Mark ExpiredLoginLinkStorage as experimental

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

We missed marking this as experimental together with the other "LoginLink" features.

This PR follows the discussion in https://github.com/symfony/symfony/pull/40145/files#r589072524

Commits
-------

76a88f2211 [Security] Mark ExpiredLoginLinkStorage as experimental
2021-04-04 14:42:57 +02:00
Alexander M. Turek
3b1948fe72 bug #40702 [HttpClient] allow CurlHttpClient on Windows (n0rbyt3)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] allow CurlHttpClient on Windows

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

Even if you don't set curl options or openssl cert options on Windows in ```php.ini```, you should be able to use ```CurlHttpClient``` if ```cafile``` or ```capath``` options are set as default options as they will override the options in ```php.ini```.

Commits
-------

6609a175f2 allow CurlHttpClient on Windows
2021-04-04 14:33:28 +02:00
Vasilij Dusko
21e972a69e * coding standard 2021-04-04 10:54:22 +03:00
Vasilij Dusko
bea5256cc2 * type cast. On success lightsms return error code like string. On error return integer. 2021-04-04 10:53:00 +03:00
Vasilij Dusko
9b2e2d0b4a * type cast. On success lightsms return error code like string. On error return integer. 2021-04-04 10:52:47 +03:00
Vasilij Dusko
0d7488b10a * type cast. On success lightsms return error code like string. On error return integer. 2021-04-04 10:51:01 +03:00
Vasilij Dusko
9a832ef595 * LightSmsTransport.php - via mistake removed www which return (Closing direction to the user). Removed additional isset which in reality not needed. Added new method which allow to return "unknown error" and throw exception if not successfully 2021-04-04 10:48:58 +03:00
Vasilij Dusko
178d9c2a5a * pull request #40696 2021-04-04 10:26:24 +03:00
Nyholm
fa038388ae
minor #40703 [Mailer][Notifier] Added missing gitattributes and gitignore files (iamvar)
This PR was merged into the 5.2 branch.

Discussion
----------

[Mailer][Notifier] Added missing gitattributes and gitignore files

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

just added missing .gitattributes and .gitignore to be consistent with other components

Commits
-------

b455de0cbf added missing gitattributes and gitignore
2021-04-04 08:45:33 +02:00
iamvar
b455de0cbf added missing gitattributes and gitignore 2021-04-03 22:22:42 +03:00
Enrico
6609a175f2
allow CurlHttpClient on Windows 2021-04-03 19:46:18 +02:00
iamvar
00ac6d4b45 added missing gitattributes and gitignore 2021-04-03 14:22:18 +03:00
Nyholm
76a88f2211
[Security] Mark ExpiredLoginLinkStorage as experimental 2021-04-03 11:49:32 +02:00
Nyholm
2a3f9125e1
minor #40685 remove references to "Silex" (a1812)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

remove references to "Silex"

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

Commits
-------

99e742991b remove references to "Silex"
2021-04-02 15:57:29 +02:00
Roman Martinuk
99e742991b
remove references to "Silex" 2021-04-02 15:57:07 +02:00
Fabien Potencier
bb1e1e58ae bug #40641 LoginLink create get Request Locale (roromix)
This PR was squashed before being merged into the 5.3-dev branch.

Discussion
----------

LoginLink create get Request Locale

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

While writing the documentation for PR#40153 I noticed that the RequestContext :: fromRequest method does not add the '_locale' parameter automaticaly. This new pull request to set _locale parameter to the RequestContext.

Commits
-------

433d76bfe1 LoginLink create get Request Locale
2021-04-02 08:14:28 +02:00
roromix
433d76bfe1 LoginLink create get Request Locale 2021-04-02 08:14:21 +02:00
Vasilij Duško
95e82f6ef1
Update LightSmsTransport.php
remove dump die
2021-04-02 06:31:20 +03:00
Nyholm
ad8cc120ca
minor #40675 Remove unused import (derrabus)
This PR was merged into the 5.3-dev branch.

Discussion
----------

Remove unused import

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

Commits
-------

28ac2c7f56 Remove unused import
2021-04-01 21:37:15 +02:00
Alexander M. Turek
28ac2c7f56 Remove unused import 2021-04-01 20:14:42 +02:00
Jesse Rushlow
97ceba0f5d
improve dx and document auth exception 2021-04-01 11:29:25 -04:00
Vasilij Dusko | CREATION
a197deeed1 * LightSmsTransport.php - better to remove if we do not have it? 2021-04-01 13:58:54 +03:00
Nicolas Grekas
3f0f21c361 Merge branch '5.2' into 5.x
* 5.2:
  fixed parser
  Fixed bugs found by psalm
  [FrameworkBundle] Dont store cache misses on warmup
  fix test
  Update references to the ContainerConfigurator
  [Translation] Remove file added back from a bad merge
  Fix sleep value
  [Cache] skip storing failure-to-save as misses in ArrayAdapter
  [Validator] Delete obsolete statement in Regex::getHtmlPattern() phpDoc
  [FrameworkBundle] Remove author comments for configuration and extension
  [Stopwatch] Document new "name" property of StopwatchEvent
  [DependencyInjection] Fix "url" env var processor behavior when the url has no path
  Fixed support for nodes not extending BaseNode
  [FrameworkBundle] dont access the container to configure http_cache
  add missing queue_name to find(id) in doctrine messenger transport
  [Config][FrameworkBundle] Hint to use PHP 8+ or to install Annotations to use attributes/annots
  [Serializer] AbstractNormalizer force null for non-optional nullable constructor parameter denormalization when not present in input
2021-04-01 12:43:52 +02:00
Nicolas Grekas
b5d1cbcd97 Merge branch '4.4' into 5.2
* 4.4:
  fixed parser
  Fixed bugs found by psalm
  [FrameworkBundle] Dont store cache misses on warmup
  [Cache] skip storing failure-to-save as misses in ArrayAdapter
  [Validator] Delete obsolete statement in Regex::getHtmlPattern() phpDoc
  [FrameworkBundle] Remove author comments for configuration and extension
  [DependencyInjection] Fix "url" env var processor behavior when the url has no path
  Fixed support for nodes not extending BaseNode
  add missing queue_name to find(id) in doctrine messenger transport
  [Serializer] AbstractNormalizer force null for non-optional nullable constructor parameter denormalization when not present in input
2021-04-01 12:42:13 +02:00
Vasilij Dusko | CREATION
83d259832b * Coding Standard patch 2021-04-01 13:35:26 +03:00
Vasilij Dusko | CREATION
1ff97e410a * LightSmsTransport.php - build signature and use http_build_query, timestamp int 2021-04-01 13:33:34 +03:00
Nicolas Grekas
4e4cdf548c bug #40503 [Yaml] fix parsing some block sequences (a1812)
This PR was merged into the 4.4 branch.

Discussion
----------

[Yaml] fix parsing some block sequences

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

Commits
-------

31b0472331 fixed parser
2021-04-01 12:32:22 +02:00
Roman Martinuk
31b0472331 fixed parser 2021-04-01 12:32:13 +02:00
Nicolas Grekas
f651ce6f5a bug #40610 Fixed bugs found by psalm (Nyholm)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

Fixed bugs found by psalm

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

When running psalm for branch 4.4, we get around 1500 errors. I browsed though them all and here is a small PR with the actual bugs I think should be fixed.

I'll make review comments about them below.

Commits
-------

0a0cd7a274 Fixed bugs found by psalm
2021-04-01 12:24:18 +02:00
Nyholm
0a0cd7a274 Fixed bugs found by psalm 2021-04-01 12:24:12 +02:00
Nicolas Grekas
bd90627814 bug #40603 [Config] Fixed support for nodes not extending BaseNode (Nyholm)
This PR was merged into the 4.4 branch.

Discussion
----------

[Config] Fixed support for nodes not extending BaseNode

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

Too many times we assume that a `NodeInterface` extends `BaseNode`. This PR adds a small test with a new `CustomNodeDefinition` and `CustomNode` that implements `NodeInterface`.

Commits
-------

68276562c3 Fixed support for nodes not extending BaseNode
2021-04-01 12:23:12 +02:00
Nicolas Grekas
4d23fec021 bug #40658 [RateLimiter] Fix sleep value (jderusse)
This PR was merged into the 5.2 branch.

Discussion
----------

[RateLimiter] Fix sleep value

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

sleep vs usleep

Commits
-------

cf66399399 Fix sleep value
2021-04-01 12:20:53 +02:00
Nicolas Grekas
cc7d1264c8 bug #40645 [FrameworkBundle] Dont store cache misses on warmup (Nyholm)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] Dont store cache misses on warmup

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

When we are warming the annotation cache, we are reading all annotation into an `ArrayAdapter`. When we are done we move the values to a `PhpArrayAdapter` to store them in a file.

@Seldaek [found out](https://github.com/symfony/symfony/issues/38694#issuecomment-810501066) that when you are using a custom constraint with a `Symfony\Component\Validator\Constraints\Callback`, there is a strange error like:

> Can use "yield from" only with arrays and Traversables

That is because the `Closure` in the `Symfony\Component\Validator\Constraints\Callback` cannot be serialised and saved to cache. But since the `ArrayAdapter` is also [storing misses as null](https://github.com/symfony/symfony/pull/35362), the null values are understood as real values.

When all values are moved to the `PhpArrayAdapter` and we ask the cache for a value (via Doctrine's `CacheProvider`), it will return `null` as a value instead of `false` as a cache miss. And `null` is not something one could "yield from".

Commits
-------

27a22b34af [FrameworkBundle] Dont store cache misses on warmup
2021-04-01 12:17:55 +02:00
Nyholm
27a22b34af [FrameworkBundle] Dont store cache misses on warmup 2021-04-01 12:17:49 +02:00
Nicolas Grekas
f9e38df065 minor #40670 [FrameworkBundle] fix test (xabbuh)
This PR was merged into the 5.2 branch.

Discussion
----------

[FrameworkBundle] fix test

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

Commits
-------

3de5b38cea fix test
2021-04-01 12:16:51 +02:00