Commit Graph

54349 Commits

Author SHA1 Message Date
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
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