Commit Graph

92 Commits

Author SHA1 Message Date
Nyholm
3c24aa9d47 [Console] Deprecate Helper::strlen() for width() and length() 2021-04-09 11:54:15 +02:00
Alexander M. Turek
c11666264d [Serializer] Construct annotations using named arguments 2021-04-05 19:03:11 +02:00
Elan Ruusamäe
c4c79662db
Update UPGRADE-6.0.md
Fix unclosed backtick
2021-04-01 02:13:11 +03:00
Wouter de Jong
8afd7a3765 [Security] Rename UserInterface::getUsername() to getUserIdentifier() 2021-03-28 22:24:55 +02:00
Alexander M. Turek
1fc2a04e00 Rename master request to main request 2021-03-22 14:14:48 +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
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
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
Jérémy Derussé
54acc00769
Deprecat service "session" 2021-01-28 16:56:06 +01:00
Christian Flothmann
da9de69de0 deprecate the NamespacedAttributeBag class 2021-01-16 11:11:08 +01:00
Christian Flothmann
d1664d71bf add missing upgrade entry 2021-01-05 15:21:37 +01:00
Nicolas Grekas
17eaad20d1 Merge branch '5.2' into 5.x
* 5.2:
  Cleanup CI scripts
  use the clock mock to make test more resilient
  fix code style
  fix code style
  take query and request parameters into account when matching routes
  mistake
  throw type error when incompatible types are passed
  fix tests to run assertions on returned Crawler instances
  [FrameworkBundle] Fix UidNormalizer priority
  propagate groups to nested constraints
2021-01-04 19:20:06 +01:00
Christian Flothmann
4c5cff6558 throw type error when incompatible types are passed 2021-01-04 13:51:17 +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
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
Jérémy Derussé
61d9514297
Merge branch '5.2' into 5.x
* 5.2:
  Fix CS in Changelogs in 5.2
2020-12-10 22:04:12 +01:00
Jérémy Derussé
25a8a0a81b
Fix CS in Changelogs in 5.2 2020-12-10 21:03:43 +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
Alexander M. Turek
9ce2e86207 [HttpFoundation] Deprecate BinaryFileResponse::create(). 2020-11-20 16:47:02 +01:00
Alexander M. Turek
441c80603e [Validator] Allow load mappings from attributes without doctrine/annotations. 2020-11-07 22:48:53 +01:00
Jérémy Derussé
7cf4dd6917
Deprecate HEADER_X_FORWARDED_ALL constant 2020-11-02 17:16:33 +01:00
Nicolas Grekas
d6aea288e7 [HttpFoundation] Deprecate not passing a Closure together with FILTER_CALLBACK to ParameterBag::filter() 2020-10-30 17:07:47 +01:00
Jérémy Derussé
91fa3e311d
Deprecate lock.store aliases 2020-10-15 22:19:33 +02:00
Jérémy Derussé
f9ddc5c147
Missing Changelog for deprecating services 2020-10-15 11:48:15 +02:00
Alexander M. Turek
b5bdf8288f [Validator] Use comparison constraints as attributes. 2020-10-02 15:13:55 +02:00
Jérémy Derussé
575b391b9b [lock] Provides default implementation when store does not supports the behavior 2020-09-27 05:25:36 +02:00
pvgnd
0fb14394ca Use composition instead of inheritance in HttpCodeActivationStrategy 2020-09-18 10:50:00 +02:00
Yonel Ceruto
878effaf47 add new way of mapping data using callback functions 2020-09-15 10:00:10 -04:00
Wouter de Jong
91b276326d Renamed $providerKey to $firewallName 2020-08-26 17:34:05 +02:00
Maxime Steinhausser
11b7bf316e [PropertyAccess] Allow to disable magic __get & __set 2020-08-19 15:25:50 +02:00
Thomas Calvet
87868baacb [FrameworkBundle] Deprecate some public services to private 2020-07-03 10:46:50 +02:00
Thomas Calvet
f64cbada89 [TwigBundle] Deprecate the public "twig" service to private 2020-06-24 16:45:15 +02:00
Nicolas Grekas
1bea690f4d [DI] deprecate Definition/Alias::setPrivate() 2020-06-22 10:12:56 +02:00
Fabien Potencier
6e28fdaa57 [Mime] Deprecate Address::fromString() 2020-06-09 17:54:11 +02:00
Christian Flothmann
ee169d5a0c deprecate the "allowEmptyString" option 2020-05-22 15:23:49 +02:00
Wouter de Jong
c49d00f984 Added deprecation for RememberMe services without logout() method 2020-05-16 13:05:23 +02:00