Commit Graph

73 Commits

Author SHA1 Message Date
Nicolas Grekas d6381617ac Merge branch '3.4' into 4.3
* 3.4:
  [Debug] fix ClassNotFoundFatalErrorHandler
  [Dotenv] Fixed infinite loop with missing quote followed by quoted value
  [TwigBridge] button_widget now has its title attr translated even if its label = null or false
  [PhpUnitBridge] When using phpenv + phpenv-composer plugin, composer executable is wrapped into a bash script
  [Security] Prevent canceled remember-me cookie from being accepted
  [FrameworkBundle][TranslationUpdateCommand] Do not output positive feedback on stderr
2020-01-08 18:19:22 +01:00
Saša Stamenković 89f7d77ea0 Add BC break note to UPGRADE-4.2.md 2019-09-06 11:27:22 +02:00
Nicolas Grekas 154ce81519 [Validator] fix deprecation layer of ValidatorBuilder 2019-06-06 19:07:55 +02:00
Nicolas Grekas 73e4a1a5ff [Contracts] extract LocaleAwareInterface out of TranslatorInterface 2018-12-05 08:06:11 +00:00
Alexander Schranz d4edb1b966 Added upgrade to HandlersLocator 2018-12-01 09:18:19 +01:00
Maxime Steinhausser 3cd4477563 [Messenger] Mention HandleTrait in UPGRADE-4.2.md file 2018-11-28 16:09:38 +01:00
Robin Chalas 443f8ad374 [FrameworkBundle][WebServerBundle] Revert deprecation of --env and --no-debug console options
This reverts commit 9f60ff8a4d.
This reverts commit 31b5615b51.
2018-11-13 20:11:56 +01:00
Nicolas Grekas f3c5fda379 Revert "bug #29154 [FrameworkBundle] Define APP_ENV/APP_DEBUG from argv via Application::bootstrapEnv() (chalasr)"
This reverts commit 9253199de1, reversing
changes made to 664a032940.
2018-11-12 22:28:21 +01:00
Florent Mata 4e92e6ec2e [FrameworkBundle] Application::bootstrapEnv() upgrade doc fix 2018-11-10 13:33:44 +01:00
Robin Chalas bbd5682c2b [FrameworkBundle] Define APP_ENV/APP_DEBUG from argv via Application::bootstrapEnv() 2018-11-10 04:07:36 +01:00
Maxime Steinhausser fee81f84d3 Complete UPGRADE-4.2.md 2018-11-07 16:48:32 +01:00
Remon van de Kamp f77970b950
Clarify deprecation of Email constraint without egulias/email-validator 2018-11-05 21:30:49 +01:00
Maxime Steinhausser c9786c2af4 [Messenger] Add some UPGRADE entries regarding 4.2 BC breaks 2018-10-30 21:06:05 +01:00
Robin Chalas a7a8aad46f [FrameworkBundle] Deprecate support for legacy translations and views directories 2018-10-27 16:37:38 +02:00
Yonel Ceruto acdece7005 Deprecating support for legacy translations directory 2018-10-26 17:45:01 -04:00
Fabien Potencier 39d081ec96 minor #28982 Fix typo in Messenger examples (gitomato)
This PR was merged into the 4.2-dev branch.

Discussion
----------

Fix typo in Messenger examples

| Q             | A
| ------------- | ---
| Branch?       | master for features / 2.8 up to 4.1 for bug fixes <!-- see below -->
| Bug fix?      | no
| New feature?  | yes/no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | yes/no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Fixed a typo in UPGRADE-4.2.md.

Commits
-------

7da59432cd Fix typo in Messenger examples
2018-10-25 15:16:58 +02:00
gitomato 7da59432cd
Fix typo in Messenger examples 2018-10-25 13:19:04 +02:00
Roland Franssen 5cb532d2de [Form] Deprecate TimezoneType regions option 2018-10-25 10:54:23 +02:00
Roland Franssen f5c355e1ba [WebProfilerBundle] Remove application name 2018-10-23 14:46:28 +02:00
Yonel Ceruto 8b390f346f Deprecating support for legacy templates directories 2018-10-17 10:07:16 -04:00
Christian Flothmann f642355859 use constraint options instead of properties 2018-10-15 11:01:19 +02:00
Fabien Potencier c6009a0144 [Validator] deprecate checkMX and checkHost on Email validator 2018-10-12 12:10:09 -07:00
Christian Flothmann 6a1d4c5db4 simplify the form type extension registration 2018-10-08 23:29:09 +02:00
Fabien Potencier 23b0787a88 feature #28375 [Translator] Deprecated transChoice and moved it away from contracts (Nyholm, nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Translator] Deprecated transChoice and moved it away from contracts

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

This will address comment made here: https://github.com/symfony/symfony/pull/27399#pullrequestreview-151929117

This PR moves the `transChoice()` method away from Contracts and back to the component. I also reverted changes in the `IdentityTranslator`. I will still use the deprecated `MessageSelector` but this is not fine since `transChoice()` is also deprecated.

Commits
-------

dc5f3bfff7 Make trans + %count% parameter resolve plurals
d870a850bd [Translator] Deprecated transChoice and moved it away from contracts
2018-10-06 18:26:49 +02:00
Nicolas Grekas dc5f3bfff7 Make trans + %count% parameter resolve plurals 2018-10-06 18:22:22 +02:00
Nyholm d870a850bd [Translator] Deprecated transChoice and moved it away from contracts 2018-10-06 09:58:31 +02:00
Robin Chalas 31b5615b51 [WebServerBundle] Deprecate relying on --env in server:start and server:run 2018-10-05 20:36:54 +02:00
Fabien Potencier 64727c1822 feature #28653 [FrameworkBundle] Deprecate the "--env" and "--no-debug" console options (chalasr)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[FrameworkBundle] Deprecate the "--env" and "--no-debug" console options

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

Commits
-------

9f60ff8a4d [FrameworkBundle] Deprecate the "--env" and "--no-debug" options
2018-10-03 10:45:51 +02:00
Fabien Potencier 7cc7c716ac feature #28693 [Security] Deprecate simple_preauth and simple_form in favor of Guard (chalasr)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Security] Deprecate simple_preauth and simple_form in favor of Guard

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

Commits
-------

5093b9fb47 [Security] Deprecate simple_preauth and simple_form in favor of Guard
2018-10-03 10:08:33 +02:00
Fabien Potencier 679f8d9c9b feature #28626 [Translation] marked getFallbackLocales() as internal (boscho87)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Translation] marked getFallbackLocales() as internal

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

Added the deprication trigger error function to getFallbackLocales in the Translation component.

(Its my first PR, please tell me if i need to change something)

Commits
-------

9d67a68816 [Translation] marked getFallbackLocales() as internal
2018-10-03 09:51:39 +02:00
Robin Chalas 5093b9fb47 [Security] Deprecate simple_preauth and simple_form in favor of Guard 2018-10-03 09:02:12 +02:00
Simon D. Müller 9d67a68816 [Translation] marked getFallbackLocales() as internal 2018-10-03 08:26:12 +02:00
Robin Chalas 9f60ff8a4d [FrameworkBundle] Deprecate the "--env" and "--no-debug" options 2018-10-02 11:07:15 +02:00
Roland Franssen 0544985934 [Validator] Pre-check constraint validator dependencies 2018-09-30 11:22:12 +02:00
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