Commit Graph

21427 Commits

Author SHA1 Message Date
WouterJ 24e0eb6453 [DX] [Security] Renamed Token#getKey() to getSecret() 2015-07-02 01:04:13 +02:00
Fabien Potencier 03e96d24f3 minor #15113 [2.8][DependencyInjection] improve deprecation messages (xabbuh)
This PR was merged into the 2.8 branch.

Discussion
----------

[2.8][DependencyInjection] improve deprecation messages

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

Also include the service id in the deprecation message.

Commits
-------

d144dbb [DependencyInjection] improve deprecation messages
2015-06-27 16:06:09 +02:00
Christian Flothmann d144dbb733 [DependencyInjection] improve deprecation messages
Also include the service id in the deprecation message.
2015-06-26 16:42:48 +02:00
Nicolas Grekas 93e69e4735 feature #15076 [Debug] Allow throwing from __toString() with `return trigger_error($e, E_USER_ERROR);` (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[Debug] Allow throwing from __toString() with `return trigger_error($e, E_USER_ERROR);`

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

Commits
-------

f360758 [Debug] Allow throwing from __toString() with `return trigger_error($e, E_USER_ERROR);`
2015-06-25 11:02:54 +02:00
Tobias Schultze bd66434e2b minor #15091 [2.8] Make service not shared when prototype scope is set (WouterJ)
This PR was merged into the 2.8 branch.

Discussion
----------

[2.8] Make service not shared when prototype scope is set

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

Deprecating the scopes was introducing a BC break in Symfony 2.8 when using the prototype scope. As `$shared` wasn't updated if the scope was set to `prototype`, people will always get an error because of [the `CheckDefinitionValidityPass`](04d5d925a9/Compiler/CheckDefinitionValidityPass.php (L54-L57)).

Commits
-------

b7030cc Make service not shared when prototype scope is set
2015-06-25 00:35:20 +02:00
Wouter J b7030cc19e Make service not shared when prototype scope is set 2015-06-24 22:39:48 +02:00
Fabien Potencier 50e752b862 feature #14984 [DependencyInjection] Deprecate scope concept (dosten)
This PR was merged into the 2.8 branch.

Discussion
----------

[DependencyInjection] Deprecate scope concept

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| License       | MIT

This PR mark as deprecated the concept of scopes in the DI container. See https://github.com/symfony/symfony/issues/10557#issuecomment-38811755.
Also adds a new `shared` flag to the service definitions in replacement of the `prototype` scope.

Commits
-------

6c4a676 Add "shared" flag and deprecate scopes concept
2015-06-24 18:13:46 +02:00
Diego Saint Esteben 6c4a676d09 Add "shared" flag and deprecate scopes concept 2015-06-24 12:32:32 -03:00
Nicolas Grekas f36075817b [Debug] Allow throwing from __toString() with `return trigger_error($e, E_USER_ERROR);` 2015-06-23 20:37:12 +02:00
Fabien Potencier dd7583d485 feature #14429 [FrameworkBundle] Add a doctrine cache service definition for validator mapping (jakzal)
This PR was merged into the 2.8 branch.

Discussion
----------

[FrameworkBundle] Add a doctrine cache service definition for validator mapping

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

Following #12975, this PR only registers a new service so it's possible to use the new doctrine based cache implementation instead of the deprecated one. To use it, the end user would need to configure it in his `config.yml`:

```yaml
framework:
    validation:
        cache: validator.mapping.cache.doctrine.apc
```

In 3.0 we'll be able to replace the deprecated definition by aliasing `validator.mapping.cache.apc` to `validator.mapping.cache.doctrine.apc`.

I thought of automatic wrapping of services which implement doctrine interface, but decided it would be too magic.

I'm not convinced if APC is a good default anymore and hope for some discussion. I've used it as it's also used in serializer, and probably translation (see #13986). Since there's a built in opcache in more recent PHP versions, and apcu doesn't seem to be stable, there are better choices. Perhaps a better default would be a filesystem cache (not better performing, but it works anywhere).

Commits
-------

0642911 [FrameworkBundle] Add a doctrine cache service definition for validator mapping
2015-06-23 13:43:04 +02:00
Fabien Potencier 9f86195158 feature #14991 [Console][Table] allow multiple render() calls. (jaytaph)
This PR was merged into the 2.8 branch.

Discussion
----------

[Console][Table] allow multiple render() calls.

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

This is a cherry-pick of #14983.

Commits
-------

b93bcc1 Fixed colspan issues with multiple render() calls
2015-06-22 18:34:55 +02:00
Bernhard Schussek 3151614b26 feature #14660 [Form] moved data trimming logic of TrimListener into StringUtil (issei-m)
This PR was squashed before being merged into the 2.8 branch (closes #14660).

Discussion
----------

[Form] moved data trimming logic of TrimListener into StringUtil

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

I introduced this PR at #14146, but I didn't make it on time for 2.7 feature freeze. So I'm opening the new PR for 2.8.

Following is my first introduction:

> In the small job which needs not to build a form (e.g. just process a value gotten from Request), I want to reuse the trim logic.

@dosten
@Tobion
@xabbuh
@stof
@webmozart
Thanks for all your feedback. I have fixed all issues mentioned on #14146. Please re-consider it.

Commits
-------

f42c777 [Form] moved data trimming logic of TrimListener into StringUtil
2015-06-22 13:02:43 +02:00
Issei.M f42c77710b [Form] moved data trimming logic of TrimListener into StringUtil 2015-06-22 13:02:33 +02:00
Joshua Thijssen b93bcc1153 Fixed colspan issues with multiple render() calls 2015-06-20 19:03:48 +00:00
Nicolas Grekas 351174be88 [2.8] Silence newest deprecations 2015-06-19 17:11:11 +02:00
Nicolas Grekas 7304ba185b Merge branch '2.7' into 2.8
* 2.7:
  [FrameworkBundle] Reuse PropertyAccessor service for ObjectNormalizer
  [VarDumper] Fix dump output for better readability
  [PhpUnitBridge] Enforce @-silencing of deprecation notices according to new policy
2015-06-19 17:09:14 +02:00
Nicolas Grekas cc13cc5584 Merge branch '2.6' into 2.7
* 2.6:
  [VarDumper] Fix dump output for better readability

Conflicts:
	src/Symfony/Component/VarDumper/Tests/CliDumperTest.php
	src/Symfony/Component/VarDumper/Tests/HtmlDumperTest.php
2015-06-19 17:09:03 +02:00
Fabien Potencier ad12251781 bug #14989 [FrameworkBundle] Reuse PropertyAccessor service for ObjectNormalizer (dunglas)
This PR was squashed before being merged into the 2.7 branch (closes #14989).

Discussion
----------

[FrameworkBundle] Reuse PropertyAccessor service for ObjectNormalizer

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

Inject the `property_accessor` service if available in the `ObjectNormalize` instead of creating a new instance.

Commits
-------

256d441 [FrameworkBundle] Reuse PropertyAccessor service for ObjectNormalizer
2015-06-19 17:02:37 +02:00
Kévin Dunglas 256d441b21 [FrameworkBundle] Reuse PropertyAccessor service for ObjectNormalizer 2015-06-19 17:02:31 +02:00
Fabien Potencier 85cb59f4a7 bug #15036 [VarDumper] Fix dump output for better readability (nicolas-grekas)
This PR was merged into the 2.6 branch.

Discussion
----------

[VarDumper] Fix dump output for better readability

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

This PR is a follow up of the feedback provided by @bobthecow while proposing var-dumper on bobthecow/psysh#184

It tweaks the output of dumps to (hopefully) make it more readable. The updated test cases in the attached patch should be enough to understand the differences, which are mainly:
- change the displaying of control chars (`\x00` instead of `@`)
- show the `\n` character at end of lines (and display `"foo\n"` on a single line)
- label resources as `foo resource` instead of `:foo` and remove their empty brackets (`{}`) when they have no meta-data
- add a missing hook when reaching end of values

Commits
-------

e448fad [VarDumper] Fix dump output for better readability
2015-06-19 17:00:36 +02:00
Fabien Potencier 381bf583a0 bug #15031 [PhpUnitBridge] Enforce @-silencing of deprecation notices according to new policy (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[PhpUnitBridge] Enforce @-silencing of deprecation notices according to new policy

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | symfony/symfony-docs#5413

Commits
-------

9eea9eb [PhpUnitBridge] Enforce @-silencing of deprecation notices according to new policy
2015-06-19 16:44:51 +02:00
Nicolas Grekas e448fadf98 [VarDumper] Fix dump output for better readability 2015-06-19 14:34:14 +02:00
Nicolas Grekas 9eea9eb848 [PhpUnitBridge] Enforce @-silencing of deprecation notices according to new policy 2015-06-18 21:21:56 +02:00
Nicolas Grekas 6a2d3a4aec Merge branch '2.7' into 2.8
* 2.7: (36 commits)
  [DoctrineBridge] Bypass the db when no valid identifier is provided in ORMQueryBuilderLoader
  [Serializer] Fixed typo in comment
  [Form] Fixed: Filter non-integers when selecting entities by int ID
  Fix merge
  Fix merge
  Add test for HHVM FatalErrors
  [2.6][Debug] Fix fatal-errors handling on HHVM
  [Debug] Fix log level of stacked errors
  [VarDumper] Fix uninitialized id in HtmlDumper
  Fixed fluent interface
  [Console] Fix tests on Windows
  [2.7] Fix unsilenced deprecation notices
  [2.3][Debug] Fix fatal-errors handling on HHVM
  [Debug] fix debug class loader case test on windows
  Standardize the name of the exception variables
  [Debug+VarDumper] Fix handling of PHP7 exception/error model
  Do not trigger deprecation error in ResolveParameterPlaceHoldersPass
  [2.3] Static Code Analysis for Components
  Added a small Upgrade note regarding security.context
  added missing deprecation in CHANGELOG
  ...

Conflicts:
	src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig
	src/Symfony/Component/HttpKernel/Kernel.php
2015-06-18 18:14:27 +02:00
Nicolas Grekas 338cd02ede Merge branch '2.6' into 2.7
* 2.6:
  [DoctrineBridge] Bypass the db when no valid identifier is provided in ORMQueryBuilderLoader
  [Form] Fixed: Filter non-integers when selecting entities by int ID
  Fix merge

Conflicts:
	src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/ORMQueryBuilderLoaderTest.php
2015-06-18 18:13:27 +02:00
Nicolas Grekas 287db73898 Merge branch '2.3' into 2.6
* 2.3:
  [DoctrineBridge] Bypass the db when no valid identifier is provided in ORMQueryBuilderLoader
  [Form] Fixed: Filter non-integers when selecting entities by int ID
2015-06-18 18:11:37 +02:00
Bernhard Schussek 3d16094e5b bug #15027 [Form] Fixed: Filter non-integers when selecting entities by int ID (webmozart, nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[Form] Fixed: Filter non-integers when selecting entities by int ID

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

This is #14950 cherry-picked on 2.3 with a fix embedded.

Commits
-------

086c58c [DoctrineBridge] Bypass the db when no valid identifier is provided in ORMQueryBuilderLoader
45579fd [Form] Fixed: Filter non-integers when selecting entities by int ID
2015-06-18 18:09:04 +02:00
Nicolas Grekas 086c58c716 [DoctrineBridge] Bypass the db when no valid identifier is provided in ORMQueryBuilderLoader 2015-06-18 17:54:01 +02:00
Fabien Potencier 4292848d1b minor #15026 [Serializer] Fixed typo in comment (trebi)
This PR was merged into the 2.7 branch.

Discussion
----------

[Serializer] Fixed typo in comment

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

Commits
-------

08a4b80 [Serializer] Fixed typo in comment
2015-06-18 17:16:36 +02:00
Richard Trebichavský 08a4b80760 [Serializer] Fixed typo in comment 2015-06-18 17:07:16 +02:00
Bernhard Schussek 45579fd7cd [Form] Fixed: Filter non-integers when selecting entities by int ID 2015-06-18 17:05:41 +02:00
Bernhard Schussek 63c8ce9453 bug #13851 [Form] [EventListener] fixed sending non array data on preSubmit to ResizeFormListener (BruceWouaigne)
This PR was submitted for the 2.7 branch but it was merged into the 2.8 branch instead (closes #13851).

Discussion
----------

[Form] [EventListener] fixed sending non array data on preSubmit to ResizeFormListener

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

Commits
-------

74d794b [Form] [EventListener] fixed sending non array data on submit to ResizeListener
2015-06-18 16:15:52 +02:00
BruceWouaigne 74d794b6e4 [Form] [EventListener] fixed sending non array data on submit to ResizeListener 2015-06-18 16:15:52 +02:00
Nicolas Grekas f3d6bbff59 Fix merge 2015-06-18 15:42:09 +02:00
Nicolas Grekas 2a1338ba19 Fix merge 2015-06-18 15:40:06 +02:00
Nicolas Grekas 2e7c2caaf2 Merge branch '2.6' into 2.7
* 2.6:
  Add test for HHVM FatalErrors
  [2.6][Debug] Fix fatal-errors handling on HHVM
  [2.3][Debug] Fix fatal-errors handling on HHVM
  Standardize the name of the exception variables
  [2.3] Static Code Analysis for Components
  Remove duplicated paths

Conflicts:
	src/Symfony/Component/Debug/ErrorHandler.php
	src/Symfony/Component/Security/Http/Firewall/BasicAuthenticationListener.php
	src/Symfony/Component/Security/Http/Firewall/ContextListener.php
	src/Symfony/Component/Security/Http/Firewall/RememberMeListener.php
	src/Symfony/Component/Security/Http/RememberMe/AbstractRememberMeServices.php
2015-06-18 15:03:50 +02:00
Nicolas Grekas 7617492914 Merge branch '2.3' into 2.6
* 2.3:
  [2.3][Debug] Fix fatal-errors handling on HHVM
  Standardize the name of the exception variables
  [2.3] Static Code Analysis for Components
  Remove duplicated paths

Conflicts:
	src/Symfony/Component/Debug/ErrorHandler.php
	src/Symfony/Component/HttpFoundation/Session/Storage/MockArraySessionStorage.php
	src/Symfony/Component/Security/Acl/Dbal/AclProvider.php
	src/Symfony/Component/Security/Core/Authentication/Provider/UserAuthenticationProvider.php
2015-06-18 14:58:06 +02:00
Nicolas Grekas 17ffb5a81a bug #15000 [2.3][Debug] Fix fatal-errors handling on HHVM (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3][Debug] Fix fatal-errors handling on HHVM

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

Commits
-------

d29bfdc [2.3][Debug] Fix fatal-errors handling on HHVM
2015-06-18 14:49:57 +02:00
Nicolas Grekas 427605a5be bug #14999 [2.6][Debug] Fix fatal-errors handling on HHVM (nicolas-grekas, digitalkaoz)
This PR was merged into the 2.6 branch.

Discussion
----------

[2.6][Debug] Fix fatal-errors handling on HHVM

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

Commits
-------

9f346a5 Add test for HHVM FatalErrors
445de5e [2.6][Debug] Fix fatal-errors handling on HHVM
2015-06-18 14:47:30 +02:00
Robert Schönthal 9f346a5a8d Add test for HHVM FatalErrors 2015-06-18 11:59:18 +02:00
Nicolas Grekas 445de5e828 [2.6][Debug] Fix fatal-errors handling on HHVM 2015-06-18 11:42:58 +02:00
Nicolas Grekas b1fabf5772 Merge branch '2.6' into 2.7
* 2.6:
  [Debug] Fix log level of stacked errors
  [VarDumper] Fix uninitialized id in HtmlDumper
  Fixed fluent interface
  [Debug] fix debug class loader case test on windows
  [Debug+VarDumper] Fix handling of PHP7 exception/error model
  [2.6][Security][Translation] #14920 update translations
  [VarDumper] Cherry-pick code style fixes from 2.7
  Bug #14836 [HttpFoundation] Moves default JSON encoding assignment from constructor to property

Conflicts:
	src/Symfony/Component/Debug/Tests/DebugClassLoaderTest.php
	src/Symfony/Component/VarDumper/Caster/DOMCaster.php
	src/Symfony/Component/VarDumper/Caster/ExceptionCaster.php
	src/Symfony/Component/VarDumper/Caster/PdoCaster.php
	src/Symfony/Component/VarDumper/Caster/SplCaster.php
2015-06-18 10:00:47 +02:00
Fabien Potencier 04ae391318 feature #15019 [Form] Deprecated "cascade_validation" (webmozart)
This PR was merged into the 2.8 branch.

Discussion
----------

[Form] Deprecated "cascade_validation"

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #11268 (requires explicit work though)
| License       | MIT
| Doc PR        | TODO

This is #12237 rebased on 2.8.

The "cascade_validation" option was designed for a 1% use case and comparatively used way too often when the `Valid` constraint should have been used instead. Also, there seem to be bugs with that option (#5204).

The option is now deprecated. When using the 2.5 Validator API, you can set the "constraints" option of the respective child to a `Valid` constraint instead. Alternatively, set the constraint in the model (as most people hopefully do).

Commits
-------

6c554c6 [Form] Deprecated "cascade_validation"
2015-06-17 23:27:07 +02:00
Fabien Potencier 13c5d7cd0d bug #14959 [Debug+VarDumper] Fix handling of PHP7 "Throwable" exceptions (nicolas-grekas)
This PR was merged into the 2.6 branch.

Discussion
----------

[Debug+VarDumper] Fix handling of PHP7 "Throwable" exceptions

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

PHP7 may introduce the Throwable interface if the corresponding RFC is accepted (see https://wiki.php.net/rfc/throwable-interface)
This PR adds support for it. We should wait for final approval of the RFC before merging it.

Commits
-------

4dc727f [Debug+VarDumper] Fix handling of PHP7 exception/error model
edf793e [VarDumper] Cherry-pick code style fixes from 2.7
2015-06-17 23:08:37 +02:00
Fabien Potencier 704dd503a4 bug #15010 [Debug] Fix log level of stacked errors (nicolas-grekas)
This PR was merged into the 2.6 branch.

Discussion
----------

[Debug] Fix log level of stacked errors

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

Commits
-------

d2ebd51 [Debug] Fix log level of stacked errors
2015-06-17 23:07:27 +02:00
Nicolas Grekas d2ebd51113 [Debug] Fix log level of stacked errors 2015-06-17 21:16:58 +02:00
Bernhard Schussek 6c554c6c1a [Form] Deprecated "cascade_validation" 2015-06-17 20:03:11 +02:00
Bernhard Schussek 54bd6f76f8 feature #12314 [Form] Add "prototype_data" option to collection type (kgilden)
This PR was submitted for the master branch but it was merged into the 2.8 branch instead (closes #12314).

Discussion
----------

[Form] Add "prototype_data" option to collection type

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #5095
| License       | MIT
| Doc PR        | symfony/symfony-docs#4367

Makes it possible to have default data for collection prototypes.

Commits
-------

80b0a80 [Form] Add "prototype_data" option to collection type
2015-06-17 17:18:53 +02:00
Kristen Gilden 80b0a80852 [Form] Add "prototype_data" option to collection type 2015-06-17 17:18:53 +02:00
Fabien Potencier bb21c7b0ab minor #14948 [Config] Add deprecation warning (dosten)
This PR was merged into the 2.7 branch.

Discussion
----------

[Config] Add deprecation warning

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| License       | MIT

If someone extends FileLoader and do not call the parent constructor a
deprecation warning should be triggered.

Commits
-------

dbfca37 [Config] Add deprecation warning
2015-06-17 16:55:26 +02:00