Commit Graph

54518 Commits

Author SHA1 Message Date
Thomas Calvet
dd1481642b [PHPDoc] Fix some union type cases 2021-04-07 18:22:29 +02:00
Alexander M. Turek
855aab243d Merge branch '5.2' into 5.x
* 5.2:
  [CS] Replace easy occurences of ?: with ??
2021-04-07 18:09:00 +02:00
Alexander M. Turek
b64ae4d419 Merge branch '4.4' into 5.2
* 4.4:
  [CS] Replace easy occurences of ?: with ??
2021-04-07 18:07:52 +02:00
Alexander M. Turek
b946077529 minor #40727 [CS] Replace easy occurences of ?: with ?? (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[CS] Replace easy occurences of ?: with ??

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

Since we don't support PHP 5 anymore, we can easily replace `?:` with `??` when dealing with "nullable" objects. It seems more modern to me (make the code evolve with the new language features). Once we do not support < PHP 7.4, we can replace with `??=`.

Commits
-------

959d3d976c [CS] Replace easy occurences of ?: with ??
2021-04-07 18:03:50 +02:00
Alexander M. Turek
47f3c4e52d Merge branch '5.2' into 5.x
* 5.2:
  Avoid warning with Xdebug 3 with develop mode disabled
2021-04-07 17:57:56 +02:00
Alexander M. Turek
945942020c Merge branch '4.4' into 5.2
* 4.4:
  Avoid warning with Xdebug 3 with develop mode disabled
2021-04-07 17:57:33 +02:00
Thomas Calvet
959d3d976c [CS] Replace easy occurences of ?: with ?? 2021-04-07 17:47:03 +02:00
Oskar Stark
0cc982c251 minor #40712 [Notifier]  Simplify LightSms implementation (jderusse)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[Notifier]  Simplify LightSms implementation

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

/cc @OskarStark

Commits
-------

1240e9f551 [notifier] Simplify lightsms implementation
2021-04-07 08:36:17 +02:00
Alexander M. Turek
8925dc7d98 minor #40716 [FrameworkBundle] Fix fragment.uri_generator definition (dunglas)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[FrameworkBundle] Fix fragment.uri_generator definition

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

Fix for a bug I introduced in #40575 (missing service).

Commits
-------

eaae4500f4 [FrameworkBundle] Fix fragment.uri_generator definition
2021-04-06 17:50:31 +02:00
Kévin Dunglas
eaae4500f4
[FrameworkBundle] Fix fragment.uri_generator definition 2021-04-06 16:17:34 +02:00
Jérémy Derussé
1240e9f551
[notifier] Simplify lightsms implementation 2021-04-06 14:01:04 +02:00
Thomas Calvet
5f0fe3235f [DependencyInjection] Add env() and EnvConfigurator in the PHP-DSL 2021-04-06 13:54:30 +02:00
Oskar Stark
345eb75686 feature #40647 [Notifier] [FakeChat] Added the bridge (OskarStark)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[Notifier] [FakeChat] Added the bridge

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

This PR is based on https://github.com/symfony/symfony/pull/39949 but for chat messages instead of SMS.

Commits
-------

0ce156c484 [Notifier] [FakeChat] Added the bridge
2021-04-06 12:48:08 +02:00
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
Christian Flothmann
e357dbb173 bug #40679 [Debug][ErrorHandler] Avoid warning with Xdebug 3 with develop mode disabled (Jean85)
This PR was merged into the 4.4 branch.

Discussion
----------

[Debug][ErrorHandler] Avoid warning with Xdebug 3 with develop mode disabled

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

As reported in #40677, this fix is needed when Xdebug 3 is enabled but its `develop` mode is off.

Commits
-------

0e0639b129 Avoid warning with Xdebug 3 with develop mode disabled
2021-04-06 09:22:26 +02:00
Alexander M. Turek
c11666264d [Serializer] Construct annotations using named arguments 2021-04-05 19:03:11 +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
Alexandre Daubois
d5f8c887a2 [Yaml] Fixed infinite loop when parser goes through an additional and invalid closing tag
Instead of letting the parser goes in an infinite loop, throw an exception when the additional and invalid is found
2021-04-05 12:16:45 +02:00
Wouter de Jong
01c3bf9604 [Security] Add concept of required passport badges
A badge on a passport is a critical security element, it determines which
security checks are run during authentication. Using the `required_badges`
setting, applications can make sure the expected security checks are run.
2021-04-05 11:07:23 +02: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
Antoine Makdessi
fbd4cb2671
Update README.md 2021-04-04 16:42:37 +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
Alessandro Lai
0e0639b129
Avoid warning with Xdebug 3 with develop mode disabled 2021-04-02 09:50:12 +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