Commit Graph

100 Commits

Author SHA1 Message Date
Nicolas Grekas
7582b1a09e Merge branch '3.3' into 3.4
* 3.3:
  [VarDumper] Dont use empty(), it chokes on eg GMP objects
  [Dotenv] Changed preg_match flags from null to 0
  remove upgrade instructions for kernel.root_dir
  [HttpKernel] Arrays with scalar values passed to ESI fragment renderer throw deprecation notice
  [HttpKernel] add a test for FilterControllerEvents
2017-11-30 15:59:23 +01:00
Christian Flothmann
9897da4c02 remove upgrade instructions for kernel.root_dir 2017-11-29 14:05:31 +01:00
Fabien Potencier
1376b4becd Merge branch '3.3' into 3.4
* 3.3: (22 commits)
  [Routing] Fix resource miss
  [Security] Fixed auth provider authenticate() cannot return void
  declare argument type
  [FrameworkBundle][Serializer] Move normalizer/encoders definitions to xml file & remove unnecessary checks
  streamed response should return $this
  $isClientIpsVali is not used
  content can be a resource
  Adding the Form default theme files to be warmed up in Twig's cache
  Remove BC Break label from `NullDumper` class
  Username and password in basic auth are allowed to contain '.'
  Remove obsolete PHPDoc from UriSigner
  [Serializer] YamlEncoder: throw if the Yaml component isn't installed
  [Serializer] ObjectNormalizer: throw if PropertyAccess isn't installed
  [PropertyInfo] Add support for the iterable type
  pdo session fix
  Fixed pathinfo calculation for requests starting with a question mark.  - fix bad conflict resolving issue  - port symfony/symfony#21968 to 3.3+
  Fixed unsetting from loosely equal keys OrderedHashMap
  add DOMElement as return type in Crawler::getIterator to support foreach support in ide
  Fixed mistake in exception expectation
  [Debug] Fix same vendor detection in class loader
  ...
2017-10-20 11:48:32 -07:00
Theo Tzaferis
fcc2146bef Remove BC Break label from NullDumper class
7f34aa2643

This is the commit where the class has been made "final", but it has only been made final via php doc, not via code, so this shouldn't be a BC break in my opinion.
2017-10-18 08:29:15 -07:00
Nicolas Grekas
f751ac9ac1 Merge branch '3.3' into 3.4
* 3.3:
  Revert "feature #21038 [FrameworkBundle] deprecated cache:clear with warmup (fabpot)"
2017-08-18 10:17:34 +02:00
Nicolas Grekas
90099706c6 Revert "feature #21038 [FrameworkBundle] deprecated cache:clear with warmup (fabpot)"
This reverts commit 3495b35e4f, reversing
changes made to 7f7b897ee2.
2017-08-08 08:44:34 +02:00
Nicolas Grekas
4a3b3bef03 Merge branch '3.3' into 3.4
* 3.3:
  [DI] use assertStringEqualsFile when possible
  [VarDumper] Adapt to php 7.2 changes
  [DI] Fix using private services in expressions
  [Form][TwigBridge] Don't render _method in form_rest() for a child form
  [Form] Static call TimezoneType::getTimezones
  Removed references for non existent validator constraints
  Suggest using quotes instead of Yaml::PARSE_KEYS_AS_STRINGS
  [DI] Fix test
  [Cache] Handle unserialization failures for Memcached
  Remove unused prop + added @deprecated
  Remove unused mocks/vars
  [DoctrineBridge][PropertyInfo] Added support for Doctrine Embeddables
  [Validator] Fix IbanValidator for ukrainian IBANs
  Router: allow HEAD method to be defined first
  [WebProfilerBundle] Display trace and context in the logger profiler
  Fixing a bug where if a core class was autowired, autowiring tried to autowire optional args as if they were required
2017-07-26 08:46:38 +02:00
Guilhem Niot
9fd425ea14 Suggest using quotes instead of Yaml::PARSE_KEYS_AS_STRINGS 2017-07-23 14:43:26 +02:00
Fabien Potencier
7695112601 feature #22317 [Console] Make SymfonyQuestionHelper::ask optional by default (ro0NL)
This PR was merged into the 4.0-dev branch.

Discussion
----------

[Console] Make SymfonyQuestionHelper::ask optional by default

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes (nothing in core depends on it)
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

i noticed when writing commands i always keep doing

```php
$io = new SymfonyStyle($input, $output);
$answer = $io->ask('...', null, function ($value) { return $value; });

// instead of just
$answer = $io->ask('...');
```

only to bypass a built-in validation, of which im not sure why it's there. Note the base question helper doesnt make this assumption...

Commits
-------

2da429cd0a [Console] Make SymfonyQuestionHelper::ask optional by default
2017-07-22 20:13:43 +02:00
Nicolas Grekas
57daadbf67 [Di] Remove closure-proxy arguments 2017-06-01 22:59:07 +02:00
Maxime Steinhausser
68c1917af9 [FrameworkBundle][Validator] Move the PSR-11 factory to the component 2017-05-26 10:48:50 +02:00
Nicolas Grekas
4aeb6d8749 [ProxyManager] Add FC layer 2017-05-24 18:13:59 +02:00
Nicolas Grekas
95fb929c58 [DI] Add missing deprecation on Extension::getClassesToCompile 2017-05-24 10:46:17 +02:00
Maxime Steinhausser
df747ce43f [FrameworkBundle][Validator] Deprecate passing validator instances/aliases over using the service locator 2017-05-21 19:05:02 +02:00
Maxime Steinhausser
b973b3072a [Security][Serializer][DI] Add new arguments typehints in preparation for 4.0 2017-05-20 12:13:18 +02:00
Fabien Potencier
0257013308 minor #22475 [SecurityBundle] Enhance FirewallContext::getListeners() (ro0NL)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[SecurityBundle] Enhance FirewallContext::getListeners()

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/20417#discussion_r91704023, https://github.com/symfony/symfony/pull/20417#discussion_r91704145
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

I think @stof is right.. and the fact we can do this on master currently without the hassle.

cc @chalasr

Commits
-------

ba650783f5 [SecurityBundle] Enhance FirewallContext::getListeners()
2017-04-26 13:18:04 -04:00
Sebastiaan Stok
ae94d019c1 Fix Framework UPGRADE notice about trusted proxies 2017-04-25 09:36:16 -04:00
Christian Flothmann
a90e46188f sync upgrade files 2017-04-20 15:57:24 +02:00
Roland Franssen
ba650783f5 [SecurityBundle] Enhance FirewallContext::getListeners() 2017-04-19 20:32:53 +02:00
Fabien Potencier
610a2385f6 feature #22459 [HttpKernel] Fix deprecation of Extension::addClassesToCompile() / AddClassesToCachePass (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[HttpKernel] Fix deprecation of Extension::addClassesToCompile() / AddClassesToCachePass

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

As done in https://github.com/symfony/symfony/pull/20735

Commits
-------

f4b5784dd9 [HttpKernel] Fix deprecation of Extension::addClassesToCompile() / AddClassesToCachePass
2017-04-19 10:18:46 -06:00
Nicolas Grekas
f4b5784dd9 [HttpKernel] Fix deprecation of Extension::addClassesToCompile() / AddClassesToCachePass 2017-04-18 17:56:38 +02:00
Nicolas Grekas
86dbbde66f feature #22416 [FrameworkBundle][Workflow] Deprecate the default type of a workflow (lyrixx)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle][Workflow] Deprecate the default type of a workflow

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

---

Before this patch, the default type is "workflow". Most of the time a
"state_machine" is better because it's simpler and it involves less
knowledge to be able to use it.

So this patch deprecate a missing type in Symfony 3.3. And In Symfony
4.0 the default value will become "state_machine".

Commits
-------

004751c [FrameworkBundle][Workflow] Deprecate the default type of a workflow
2017-04-18 17:41:42 +02:00
Robin Chalas
8fe122fc79 Move ValidateWorkflowsPass to the Workflow component 2017-04-14 12:36:38 +02:00
Grégoire Pineau
004751c5e8 [FrameworkBundle][Workflow] Deprecate the default type of a workflow
Before this patch, the default type is "workflow". Most of the time a
"state_machine" is better because it's simpler and it involves less
knowledge to be able to use it.

So this patch deprecate a missing type in Symfony 3.3. And In Symfony
4.0 the default value will become "state_machine".
2017-04-13 16:36:11 +02:00
Nicolas Grekas
0ed087d972 [DI] Replace autowiring BC break by regular deprecation 2017-04-11 23:14:08 +02:00
Nicolas Grekas
a8b83340bb [HttpKernel][FrameworkBundle] Dump container logs in Kernel, to have them also on errors 2017-04-06 19:59:10 +02:00
Nicolas Grekas
cc5e582dcf [BC BREAK][DI] Always autowire "by id" instead of using reflection against all existing services 2017-04-05 23:48:42 +02:00
Fabien Potencier
457174dad9 feature #21919 [Form] Deprecated usage of "choices" option in sub types (HeahDude)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Form] Deprecated usage of "choices" option in sub types

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | ~

Follows #21880 and the discussion in #20771.

Commits
-------

b5b56fcbac [Form] Deprecated usage of "choices" option in sub types
2017-04-05 11:14:26 -07:00
Fabien Potencier
24b1b0d908 fixed wording 2017-04-04 12:45:53 -07:00
Jérôme Vasseur
4ec80b1ae8 Use IteratorArgument for voters 2017-04-04 19:58:27 +02:00
Nicolas Grekas
72e28957e2 [BC BREAK][HttpFoundation] Request::setTrustedProxies() takes a new required $trustedHeaderSet argument 2017-04-03 11:58:17 +02:00
Nicolas Grekas
b07da3dc1e [DI] Enhance DX by throwing instead of triggering a deprecation notice 2017-03-28 08:18:44 +02:00
HeahDude
b5b56fcbac [Form] Deprecated usage of "choices" option in sub types 2017-03-27 18:52:54 +02:00
HeahDude
8b850e6074 Fixed duplicated Console subtitle in UPGRADE file 2017-03-26 23:24:36 +02:00
Fabien Potencier
ba4d6bce29 feature #18140 [Console] Add console.ERROR event and deprecate console.EXCEPTION (wouterj)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Console] Add console.ERROR event and deprecate console.EXCEPTION

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

The current `console.EXCEPTION` event is only dispatched for exceptions during the execution of `Command#execute()`. All other exceptions (e.g. the ones thrown by listeners to events) are catched by the `try ... catch` loop in `Application#doRunCommand()`. This means that there is _no way to override exception handling_.
## The Solution

This PR adds a `console.ERROR` event which has the same scope as the default `try ... catch` loop. This allows to customize all exception handling.

In order to keep BC, a new event was created and `console.EXCEPTION` was deprecated.

Commits
-------

c02a4c9857 Added a console.ERROR event
2017-03-22 16:10:45 -07:00
Fabien Potencier
1635a6a4e7 feature #20516 [Security][SecurityBundle] Enhance automatic logout url generation (ogizanagi)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Security][SecurityBundle] Enhance automatic logout url generation

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

This should help whenever:

- [the token does not implement the `getProviderKey` method](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Security/Http/Logout/LogoutUrlGenerator.php#L89-L99)
- you've got multiple firewalls sharing a same context but a logout listener only define on one of them.

##### Behavior:

> When not providing the firewall key:
>
>- Try to find the key from the token (unless it's an anonymous token)
>- If found, try to get the listener from the key. If the listener is found, stop there.
>- Try from the injected firewall key. If the listener is found, stop there.
>- Try from the injected firewall context. If the listener is found, stop there.
>
>The behavior remains unchanged when providing explicitly the firewall key. No fallback.

Commits
-------

5b7fe852aa [Security][SecurityBundle] Enhance automatic logout url generation
2017-03-22 14:38:03 -07:00
Robin Chalas
0b741da343 Move AddValidatorInitializersrPass & AddConstraintValidatorsPass to the Validator 2017-03-22 21:51:09 +01:00
Nicolas Grekas
d3c960493c [HttpFoundation] Add $trustedHeaderSet arg to Request::setTrustedProxies() - deprecate not setting it 2017-03-22 21:29:40 +01:00
Robin Chalas
85177a649e [FrameworkBundle] Make Translator works with any PSR-11 container 2017-03-22 16:47:35 +01:00
Fabien Potencier
7ed3237645 [FrameworkBundle] deprecated cache:clear with warmup 2017-03-21 15:16:20 -07:00
Fabien Potencier
a96a99723a feature #21889 Deprecate the special SYMFONY__ environment variables (javiereguiluz)
This PR was squashed before being merged into the 3.3-dev branch (closes #21889).

Discussion
----------

Deprecate the special SYMFONY__ environment variables

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

Commits
-------

e3362e854c Deprecate the special SYMFONY__ environment variables
2017-03-21 08:27:08 -07:00
Javier Eguiluz
e3362e854c Deprecate the special SYMFONY__ environment variables 2017-03-21 08:27:06 -07:00
Robin Chalas
c99641a540 Document removal of server:* commands from the framework 2017-03-21 15:47:31 +01:00
Christian Flothmann
731a74e79c [Yaml] deprecate "? " starting unquoted strings 2017-03-20 10:21:06 +01:00
Fabien Potencier
c72a4f0a79 bug #21514 301 status code must drop request method to GET. (jlamur)
This PR was merged into the 3.3-dev branch.

Discussion
----------

301 status code must drop request method to GET.

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| BC breaks?    | yes
| Tests pass?   | yes
| Fixed tickets | #20924
| License       | MIT

[RFC 7231 §6.4.2](https://tools.ietf.org/html/rfc7231#section-6.4.2) states that 301 HTTP Code should forward POST requests to the Location URI.

But, it also states that:

> For historical reasons, a user agent MAY change the request method from POST to GET for the subsequent request.

This is the behavior implemented in almost all user agents.
However the `BrowserKit` did forward the method to the subsequent request.

This PR make the `BrowserKit` change the request method from POST to GET when the response status code is 301.

Commits
-------

abda966d75 301 status code must drop request method to GET.
2017-03-14 13:25:39 -07:00
Jules Lamur
abda966d75 301 status code must drop request method to GET.
[RFC 7231 §6.4.2](https://tools.ietf.org/html/rfc7231#section-6.4.2) states that 301 HTTP Code should forward POST requests to the Location URI.

But, it also states that:

> For historical reasons, a user agent MAY change the request method from POST to GET for the subsequent request.

This is the behavior implemented in almost all user agents.
However the `BrowserKit` did forward the method to the subsequent request.
2017-03-07 14:08:59 +01:00
Christian Flothmann
3c5d9155d4 deprecate implicit string casting of mapping keys 2017-03-06 20:18:14 +01:00
Robin Chalas
32be16b239 Move RoutingResolverPass to the Routing component 2017-03-05 16:12:05 +01:00
Christian Flothmann
903ee47957 fix upgrade file 2017-03-04 16:15:59 +01:00
Fabien Potencier
b118c650a3 feature #21815 [FrameworkBundle][HttpKernel] Move ControllerArgumentValueResolverPass to the HttpKernel component (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle][HttpKernel] Move ControllerArgumentValueResolverPass to the HttpKernel component

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

Commits
-------

8bad8a109c Move ControllerArgumentValueResolverPass to the HttpKernel component
2017-03-04 07:06:49 -08:00