Commit Graph

48 Commits

Author SHA1 Message Date
Karoly Gossler
e596f4da1e
added missing ` 2021-05-06 23:33:47 +02:00
Mathieu Santostefano
6e55fa84b7
Added Translation Providers
Co-authored-by: Olivier Dolbeau <github@a.bbnt.me>
2021-04-21 11:10:56 +02:00
Thomas Calvet
79cbf005da [FrameworkBundle] Deprecate creating public workflow services 2021-04-20 13:17:41 +02:00
Thomas Calvet
56be86aa7d [SecurityBundle] Deprecate public services to private 2021-04-18 07:46:12 +02:00
Wouter de Jong
7452476156 [Security] Fix UsageTrackingTokenStorage outside the request cycle 2021-04-13 08:27:14 +02:00
Fabien Potencier
0f96ac7484 feature #40695 [Console] Deprecate Helper::strlen() for width() and length() (Nyholm)
This PR was squashed before being merged into the 5.3-dev branch.

Discussion
----------

[Console] Deprecate Helper::strlen() for width() and length()

| Q             | A
| ------------- | ---
| Branch?       | 5.2
| Bug fix?      | yes
| New feature?  | yes
| Deprecations? | yes
| Tickets       | Follow up form #40698
| License       | MIT
| Doc PR        |

This PR will deprecated `Helper::strlen()` since it is actually calculating the width. I remove the `@internal` on `Helper::width()` and a `Helper::length()`. I will also deprecate `Helper::strlenWithoutDecoration()` because you should use `Helper::removeDecoration()` instead.

Commits
-------

3c24aa9d47 [Console] Deprecate Helper::strlen() for width() and length()
2021-04-09 11:54:19 +02:00
Nyholm
3c24aa9d47 [Console] Deprecate Helper::strlen() for width() and length() 2021-04-09 11:54:15 +02:00
Alexandre Daubois
7888f8930d [Security] Fixed missing badges argument for method authenticateUser 2021-04-08 12:34:40 +02:00
Alexander M. Turek
c11666264d [Serializer] Construct annotations using named arguments 2021-04-05 19:03:11 +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
Wouter de Jong
8afd7a3765 [Security] Rename UserInterface::getUsername() to getUserIdentifier() 2021-03-28 22:24:55 +02:00
Vincent Langlet
592fb13456 Remove internal annotation 2021-03-28 19:13:50 +02:00
Robin Chalas
532f4aaa8e [Security] Move the badges resolution check to AuthenticatorManager 2021-03-24 13:36:59 +01:00
Alexander M. Turek
1fc2a04e00 Rename master request to main request 2021-03-22 14:14:48 +01:00
Wouter de Jong
99cf2a3a71 [Security] Disallow passing a UserInterface to Passport
This was deprecated in 5.2, with a warning that support would be dropped in 5.3
(due to the experimental state).
2021-03-17 07:03:24 +01:00
Robin Chalas
55b51d3f90 [Security] Rename User to InMemoryUser 2021-03-16 00:01:28 +01:00
Fabien Potencier
183b91c6ec feature #40366 [FrameworkBundle] Add KernelTestCase::getContainer() (Nyholm)
This PR was squashed before being merged into the 5.3-dev branch.

Discussion
----------

[FrameworkBundle] Add KernelTestCase::getContainer()

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

There are at least 3 ways to get the container in a test class:

```php
class FooTest extends WebTestCase
{
    public function testGetContainerA()
    {
        $kernel = self::bootKernel();
        $container = $kernel->getContainer();
    }

    public function testGetContainerB()
    {
        self::bootKernel();
        $container = self::$container;
    }

    public function testGetContainerC()
    {
        $client = self::createClient();
        $container = $client->getContainer();
    }
}
```

I suggest to add a fourth =)

Basically, in tests you should always use the `test.service_container`. It is hard to remove A and C, but I can deprecate C and add a helper function.

```php
class FooTest extends WebTestCase
{
    public function testGetContainerTheOnlyWayYouShouldUse()
    {
        $container = $this->getContainer();
    }
}
```

This new way will also boot your kernel if it is not already booted.

Commits
-------

f4c97240ff [FrameworkBundle] Add KernelTestCase::getContainer()
2021-03-12 07:17:39 +01:00
Nyholm
f4c97240ff [FrameworkBundle] Add KernelTestCase::getContainer() 2021-03-12 07:17:35 +01:00
Nicolas Grekas
4449b553a8 [HttpKernel] Deprecate returning a ContainerBuilder from KernelInterface::registerContainerConfiguration() 2021-03-10 09:24:39 +01:00
Christian Flothmann
a50cfcb49d use bitwise flags to configure when the property accessor should throw 2021-03-09 09:10:03 +01:00
Robin Chalas
2764225a38 [Security] Decouple passwords from UserInterface 2021-03-06 00:37:05 +01:00
Alexander M. Turek
f0e076a013 feature #40307 [HttpKernel] Handle multi-attribute controller arguments (chalasr)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[HttpKernel] Handle multi-attribute controller arguments

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

Currently, the `ArgumentMetadata` class used for controller argument value resolution can only hold one attribute per controller argument, while a method argument can take multiple attributes.

This allows accessing all attributes for a given argument, and deprecates the `ArgumentInterface` because it is not needed.
Spotted by @nicolas-grekas.

Commits
-------

d771e449ec [HttpKernel] Handle multi-attribute controller arguments
2021-02-26 19:19:30 +01:00
Fabien Potencier
79f6a5c692 feature #40284 [RateLimiter][Security] Allow to use no lock in the rate limiter/login throttling (wouterj)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[RateLimiter][Security] Allow to use no lock in the rate limiter/login throttling

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

This PR adds support for disabling lock in rate limiters. This was brought up by @Seldaek. In most cases (e.g. login throttling), it's not critical to strictly avoid even a single overflow of the window/token. At least, it's probably not always worth the extra load on the lock storage (e.g. redis).

It also directly disables locking by default for login throttling. I'm not sure about this, but I feel like this fits the 80% case where it's definitely not needed (and it's easier to use if you don't need to set-up locking first).

Commits
-------

45be875e84 [Security][RateLimiter] Allow to use no lock in the rate limiter/login throttling
2021-02-26 08:27:17 +01:00
Robin Chalas
d771e449ec [HttpKernel] Handle multi-attribute controller arguments 2021-02-26 01:25:47 +01:00
viktor
28e7b74b47 [Messenger] Add rediss:// DSN scheme support for TLS to Redis transport 2021-02-26 01:01:54 +01:00
Wouter de Jong
45be875e84 [Security][RateLimiter] Allow to use no lock in the rate limiter/login throttling 2021-02-25 17:33:05 +01:00
Fabien Potencier
d54a1223f7 feature #40266 [Routing] Construct Route annotations using named arguments (derrabus)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[Routing] Construct Route annotations using named arguments

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

This PR proposes to bump the `doctrine/annotations` library to 1.12 to gain access to its emulation layer for named arguments. Furthermore, constructing a `Route` annotation the old way by passing an array of parameters is deprecated.

### Reasons for this change

The constructors of our annotation classes have become unnecessarily complicated because we have to support two ways of calling them:
* An array of parameters, passed as first argument, because that's the default behavior `doctrine/annotations`.
* A set of named arguments because that's how PHP 8 attributes work.

Since we can now tell the Doctrine annotation reader to use named arguments as well, we can simplify the constructors of our annotations significantly.

### Drawback

After this change, there is no easy way anymore to construct instances of the `Route` annotation class directly on PHP 7. The PR has been built under the assumption that instances of this class are usually created using either Doctrine annotations or a PHP 8 attribute. Thus, most applications should be unaffected by this change.

Commits
-------

29b0f96046 [Routing] Construct Route annotations using named arguments
2021-02-25 08:31:04 +01:00
Nyholm
f90d3ec203 [Form] Remove hard dependency on symfony/intl 2021-02-25 08:25:40 +01:00
Alexander M. Turek
29b0f96046 [Routing] Construct Route annotations using named arguments 2021-02-24 14:30:32 +01:00
Robin Chalas
6ed759189d [Workflow] Deprecate InvalidTokenConfigurationException 2021-02-15 15:47:12 +01:00
Jérémy Derussé
37c591516a
Deprecate session.storage 2021-02-13 15:58:50 +01:00
Robin Chalas
c5c981c559 [Security] Extract password hashing from security-core - using the right naming 2021-02-12 16:42:42 +01:00
Nicolas Grekas
4537f85963 feature #40029 [DoctineBridge] Remove UuidV*Generator classes (nicolas-grekas)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[DoctineBridge] Remove UuidV*Generator classes

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

There is no benefit in using these classes over creating the UUIDs inline.
Let's keep things simple.

For `UlidGenerator`, I'm keeping it as it will provide something useful once #39507 and https://github.com/doctrine/DoctrineBundle/pull/1284 are finished.

Commits
-------

3c296bd2f5 [DoctineBridge] Remove UuidV*Generator
2021-01-29 16:33:03 +01:00
Nicolas Grekas
3c296bd2f5 [DoctineBridge] Remove UuidV*Generator 2021-01-29 16:31:18 +01:00
Jérémy Derussé
54acc00769
Deprecat service "session" 2021-01-28 16:56:06 +01:00
Thomas Calvet
360c900acf [Uid] Replace getTime() with getDateTime() 2021-01-27 22:02:29 +01:00
Christian Flothmann
da9de69de0 deprecate the NamespacedAttributeBag class 2021-01-16 11:11:08 +01:00
Fabien Potencier
d2e589c0ec feature #39684 [DomCrawler] deprecate parents() in favor of ancestors() (xabbuh)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[DomCrawler] deprecate parents() in favor of ancestors()

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

Commits
-------

8baafa2bc0 deprecate parents() in favor of ancestors()
2021-01-03 09:15:45 +01:00
Jérémy Derussé
5b55097500
Deprecate option prefetch_count 2021-01-02 21:28:54 +01:00
Christian Flothmann
8baafa2bc0 deprecate parents() in favor of ancestors() 2021-01-02 17:29:52 +01:00
Alexander M. Turek
90f6d30b06 [Serializer] Migrate ArrayDenormalizer to DenormalizerAwareInterface. 2021-01-01 12:17:22 +01:00
Baptiste Leduc
84dd1784cb
Support multiple types for collection keys & values 2020-12-31 10:27:19 +01:00
Oskar Stark
d4f001afec [Notifier] Change return type 2020-12-25 11:55:31 +01:00
Jérémy Derussé
4e4a81c346
Allow env variables in json_manifest_path 2020-12-14 16:38:41 +01:00
Jérémy Derussé
e2198a892f [PhpUnitBridge] Restore SetUpTearDownTraitForV5 2020-12-14 10:24:53 +01:00
Grégoire Pineau
1ee7e4c94c [HttpKernel] Marked the class Symfony\Component\HttpKernel\EventListener\DebugHandlersListener as internal 2020-12-08 14:18:11 +01:00
Jérémy Derussé
ffdfb4fb53
Assert voter returns valid decision 2020-12-06 23:36:13 +01:00
vudaltsov
ce77be2507 [Form] Changed DataMapperInterface $forms parameter type to \Traversable 2020-12-05 14:49:49 +01:00