Commit Graph

39 Commits

Author SHA1 Message Date
Fabien Potencier 91add60d47 minor #28606 [Validator] Add BC layer covering BicValidator without Intl (chalasr)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Validator] Add BC layer covering BicValidator without Intl

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/28473#pullrequestreview-158620738
| License       | MIT
| Doc PR        | n/a

Commits
-------

10b8a5f041 [Validator] Add BC layer covering BicValidator without Intl
2018-09-30 05:46:12 +02:00
Robin Chalas 10b8a5f041 [Validator] Add BC layer covering BicValidator without Intl 2018-09-30 00:23:16 +02:00
Fabien Potencier 60fac5cefa feature #28447 [HttpFoundation] make cookies auto-secure when passing them $secure=null + plan to make it and samesite=lax the defaults in 5.0 (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[HttpFoundation] make cookies auto-secure when passing them $secure=null + plan to make it and samesite=lax the defaults in 5.0

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #26731
| License       | MIT
| Doc PR        | -

By creating Cookie instances using `null` for the `$secure` argument, this PR allows making cookies inherit their "secure" attribute from the request.

This PR also adds a forward to make $secure=null and samesite=lax the defaults in Symfony 5.0:
- either define all constructor's arguments explicitly
- or use the new `Cookie::create()` factory

Commits
-------

9493cfd5f2 [HttpFoundation] make cookies auto-secure when passing them $secure=null + plan to make it and samesite=lax the defaults in 5.0
2018-09-26 07:44:22 +02:00
Christian Flothmann 5dadd95dea fix upgrade files 2018-09-24 10:22:53 +02:00
Fabien Potencier 31f8cb9706 feature #28569 [Form] deprecate precision in IntegerToLocalizedStringTransformer (xabbuh)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Form] deprecate precision in IntegerToLocalizedStringTransformer

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #8631
| License       | MIT
| Doc PR        |

Commits
-------

65362e0ace deprecate precision in IntegerToLocalizedStringTransformer
2018-09-24 07:57:37 +02:00
Christian Flothmann 65362e0ace deprecate precision in IntegerToLocalizedStringTransformer 2018-09-23 21:23:49 +02:00
Christian Flothmann 40413aad24 deprecate the unused scale option 2018-09-23 21:21:47 +02:00
Nicolas Grekas a26bd3673f Merge branch '4.1'
* 4.1:
  [Debug] Fix false-positive "MicroKernelTrait::loadRoutes()" method is considered internal"
  [Console] Fixed boxed table style with colspan
  parse numbers terminated with decimal separator
  fail reverse transforming invalid RFC 3339 dates
2018-09-22 22:55:36 +02:00
Nicolas Grekas 9493cfd5f2 [HttpFoundation] make cookies auto-secure when passing them $secure=null + plan to make it and samesite=lax the defaults in 5.0 2018-09-20 08:41:35 +02:00
Nicolas Grekas 440944f3c2 feature #28316 Trigger deprecation notices when inherited class calls parent method but misses adding new arguments (kevinjhappy)
This PR was merged into the 4.2-dev branch.

Discussion
----------

Trigger deprecation notices when inherited class calls parent method but misses adding new arguments

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

This Pull Request concern severals components, the purpose here is to notify in dev mode that in a case of inherit class, a function will have a new or severals arguments in Symfony 5.0, therefore not implement it is deprecated since Symfony 4.2

The function is made by these conditions :
1- ```(func_num_args() < $x)``` where [x] is the number of arguments we will have in Symfony 5.0
  this check allow to verify that the arguments are missing
2- ```(__CLASS__ !== \get_class($this))```
  this check allow to verify that the name of the class is different than the base class, therefore that we are in the child class
3- ```(__CLASS__ !== (new \ReflectionMethod($this, __FUNCTION__))->getDeclaringClass()->getName())```
  this check allow to verify that the class of the current function is different than the base class, therefore the function has been rewrote into the child class

Code exemple :
```
public function method(/* void $myNewArgument = null */)
{
	if ((func_num_args() < 1) && (__CLASS__ !== \get_class($this)) && (__CLASS__ !== (new \ReflectionMethod($this, __FUNCTION__))->getDeclaringClass()->getName())){
            @trigger_error(sprintf('The "%s()" method will have one `void $myNewArgument = null` argument in version 5.0 and higher.Not defining it is deprecated since Symfony 4.2.', __METHOD__ ), E_USER_DEPRECATED);
    }
    // do something
}
```

The unit test are made by creating a child Class using for the tested function ```return parent::function()``` and by calling this child class and catching the expected depreciation message

Commits
-------

f75fffa997 Trigger deprecation notices when inherited class calls parent method but misses adding new arguments
2018-09-17 20:15:16 +02:00
Robin Chalas 744bf0e7ac [FrameworkBundle] Deprecate ContainerAwareCommand 2018-09-10 10:14:57 +02:00
kevin.nadin f75fffa997 Trigger deprecation notices when inherited class calls parent method but misses adding new arguments 2018-09-09 20:06:02 +02:00
Samuel ROZE 5b93f5f45e Uses a messenger serializer, not an individual encoder/decoder 2018-09-09 11:28:13 +01:00
Robin Chalas cc23f5d5fd Add missing UPGRADE-4.2 entry for Controller deprecation 2018-09-08 15:15:53 +02:00
Roland Franssen 5454e6fc1d [Validator] Deprecate validating DateTimeInterface in Date|Time|DateTime constraints 2018-09-08 08:57:33 +02:00
Fabien Potencier 7be3bb2d8f feature #28168 Add SameSite cookies to FrameWorkBundle (rpkamp)
This PR was merged into the 4.2-dev branch.

Discussion
----------

Add SameSite cookies to FrameWorkBundle

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes, and added to changelog https://github.com/symfony/symfony/pull/28168/files#diff-276f5b13978c2ce3f555b9603f44801aR21
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #27631
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/10202

Uses `session.cookie_samesite` for PHP >= 7.3. For PHP < 7.3 it first
does a session_start(), find the emitted header, changes it, and emits
it again with the value for SameSite added.

I also tried it in a minimal Symfony 4.1 app, and works there too:

![screenshot from 2018-08-08 21-39-10](https://user-images.githubusercontent.com/1059790/43864708-b7437978-9b60-11e8-81dd-b41f1a5afb52.png)

Commits
-------

4091feb693 Add SameSite cookies to FrameWorkBundle
2018-09-04 10:27:39 +02:00
Nicolas Grekas 064e369e06 [Contracts] Add Translation\TranslatorInterface + decouple symfony/validator from symfony/translation 2018-09-03 15:19:33 +02:00
Remon van de Kamp 4091feb693
Add SameSite cookies to FrameWorkBundle
Uses `session.cookie_samesite` for PHP >= 7.3. For PHP < 7.3 it first
does a session_start(), find the emitted header, changes it, and emits
it again with the value for SameSite added.
2018-08-28 20:18:28 +02:00
Samuel ROZE cf2ad861f5 Remove the "obscure" message subscriber configuration 2018-08-28 13:58:44 +01:00
Nicolas Grekas 2beda894f2 [Messenger] Don't make EnvelopeItemInterface extend Serializable 2018-08-24 15:12:11 +02:00
ProgMiner 24471a2780 [Config] Rename FileLoaderLoadException to LoaderLoadException 2018-08-10 09:13:17 +02:00
Thomas Royer 9488e2a026 [Messenger] Envelope-aware middleware is never called with a message 2018-07-19 11:52:28 +02:00
Roland Franssen 8c410da7e7 [Security] Deprecate returning stringish objects from Security::getUser 2018-07-18 05:37:18 +02:00
Fabien Potencier 254f4c8f7f feature #27774 [FrameworkBundle] allow turning routes to utf8 mode by default (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[FrameworkBundle] allow turning routes to utf8 mode by default

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

This allows building optimized routers that match in a single regexp instead of an alternate of utf8/non-utf8 set of routes.

Commits
-------

8f359cc047 [FrameworkBundle] allow turning routes to utf8 mode by default
2018-07-09 16:14:24 +02:00
Nicolas Grekas 8895bc1b5b [Process][Console] deprecated defining commands as strings 2018-07-06 20:45:13 +02:00
Nicolas Grekas 8f359cc047 [FrameworkBundle] allow turning routes to utf8 mode by default 2018-07-06 10:08:17 +02:00
Maxime Steinhausser d5c1cc04c8 Respect alpha order in UPGRADE-4.2 file 2018-06-30 11:30:27 +02:00
Maxime Steinhausser bce59c8427 [Serializer] Deprecate CsvEncoder as_collection false default value 2018-06-30 10:39:07 +02:00
Fabien Potencier 83232f85ff feature #27675 [DoctrineBridge] always load event listeners lazy via ServiceLocator (dmaicher)
This PR was squashed before being merged into the 4.2-dev branch (closes #27675).

Discussion
----------

[DoctrineBridge] always load event listeners lazy via ServiceLocator

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes/no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/27661
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/9973

As described in https://github.com/symfony/symfony/issues/27661 this PR suggests to always load doctrine event listeners lazily from a service locator instead of the full service container.

If we agree to move forward I could tackle the remaining todos:

- [x] update UPGRADE.md
- [x] documentation PR
- [x] tested on real app

Commits
-------

130ec0525d [DoctrineBridge] always load event listeners lazy via ServiceLocator
2018-06-28 10:12:17 +02:00
David Maicher 130ec0525d [DoctrineBridge] always load event listeners lazy via ServiceLocator 2018-06-28 10:12:09 +02:00
Fabien Potencier 21a3439a29 feature #27476 [Config] deprecate tree builders without root nodes (xabbuh)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Config] deprecate tree builders without root nodes

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

While reviewing #27472 I wondered if we really need support config trees without a root node. If we did not support it, users wouldn't create pseudo configuration classes when they were actually not needed.

Commits
-------

c2ce15301c deprecate tree builders without root nodes
2018-06-25 19:06:32 +02:00
Gabriel Ostrolucký 02f2f0ed39 [Form] Deprecate `searchAndRenderBlock` returning empty string 2018-06-25 08:47:55 +02:00
Christian Flothmann c2ce15301c deprecate tree builders without root nodes 2018-06-19 14:34:32 +02:00
Nicolas Grekas 13523ad985 [Cache] Add stampede protection via probabilistic early expiration 2018-06-10 18:44:41 +02:00
Nicolas Grekas 3a2eb0d951 Minor clean up in UPGRADE files 2018-05-29 15:22:55 +02:00
Fabien Potencier f557f943ba feature #26981 No more support for custom anon/remember tokens based on FQCN (Iltar van der Berg)
This PR was squashed before being merged into the 4.2-dev branch (closes #26981).

Discussion
----------

No more support for custom anon/remember tokens based on FQCN

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #26940
| License       | MIT
| Doc PR        | ~

This PR deprecates the ability to configure a custom anonymous and remember me token class, via the AuthenticationTrustResolver. The only change required _if_ you have changed the token classes like this, is to extend the Anonymous/RememberMe token classes.

Commits
-------

860d4549c2 No more support for custom anon/remember tokens based on FQCN
2018-05-27 09:21:43 +02:00
Iltar van der Berg 860d4549c2 No more support for custom anon/remember tokens based on FQCN 2018-05-27 09:19:43 +02:00
Robin Chalas a71ba78478 [Security][SecurityBundle] FirewallMap/FirewallContext deprecations 2018-05-22 12:07:18 +02:00
Nicolas Grekas 9dbf399247 [Security/Core] Add "is_granted()" to security expressions, deprecate "has_role()" 2018-05-18 17:34:07 +02:00