Commit Graph

19940 Commits

Author SHA1 Message Date
Fabien Potencier
30935c7b8c Merge branch '2.7'
* 2.7:
  removed deprecation notice for internal constant
  removed deprecated notices when using the security service
  [Validator] fixed deprecation notice for ElementMetadata
  Revert "minor #13434 fixed some deprecated notices (fabpot)"
  removed usage of the deprecated EsiListener class in core
  [security] Fetching current stored context when not explicitly specified
  [FrameworkBundle] Container parameters in Route#condition
  Deprecated setDefaultOptions() in favor of configureOptions()

Conflicts:
	src/Symfony/Bridge/Doctrine/composer.json
	src/Symfony/Bridge/Propel1/composer.json
	src/Symfony/Bridge/Twig/AppVariable.php
	src/Symfony/Bundle/FrameworkBundle/composer.json
	src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Form/UserLoginFormType.php
	src/Symfony/Component/Form/Tests/ResolvedFormTypeTest.php
2015-01-20 02:26:34 +01:00
Fabien Potencier
a5e6b0dc50 minor #13462 removed deprecation notice for internal constant (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

removed deprecation notice for internal constant

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

This notice is being raised when using the legacy validator, but it shouldn't. Moreover, as this is purely an internal constant, there is no point in raising a notice anyway.

Commits
-------

19be8b0 removed deprecation notice for internal constant
2015-01-20 02:01:35 +01:00
Fabien Potencier
19be8b0e54 removed deprecation notice for internal constant 2015-01-20 01:47:52 +01:00
Fabien Potencier
7ab2a5634d minor #13460 Fix usage of app.security (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

Fix usage of app.security

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

Reverts the previous attempt to remove notices when using the `app.security` variable in Twig because it did not work (it prevents using `app.security` altogether).

So, instead, we inject the container and only get the security service (and thus triggering the deprecation notice) when the user is using `app.security`.

Commits
-------

09ed9b5 removed deprecated notices when using the security service
1067cc5 Revert "minor #13434 fixed some deprecated notices (fabpot)"
2015-01-20 01:44:37 +01:00
Fabien Potencier
09ed9b5495 removed deprecated notices when using the security service 2015-01-20 01:43:09 +01:00
Fabien Potencier
26323bc349 minor #13461 [Validator] fixed deprecation notice for ElementMetadata (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

[Validator] fixed deprecation notice for ElementMetadata

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

Commits
-------

2606a6d [Validator] fixed deprecation notice for ElementMetadata
2015-01-20 01:40:55 +01:00
Fabien Potencier
2606a6d80e [Validator] fixed deprecation notice for ElementMetadata 2015-01-20 01:30:34 +01:00
Fabien Potencier
1067cc5815 Revert "minor #13434 fixed some deprecated notices (fabpot)"
This reverts commit 564ae34dd7, reversing
changes made to df76faaa39.
2015-01-19 23:27:25 +01:00
Fabien Potencier
339afcac19 minor #13451 removed usage of the deprecated EsiListener class in core (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

removed usage of the deprecated EsiListener class in core

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

Commits
-------

55cc507 removed usage of the deprecated EsiListener class in core
2015-01-19 17:56:41 +01:00
Fabien Potencier
55cc507670 removed usage of the deprecated EsiListener class in core 2015-01-19 17:36:50 +01:00
Fabien Potencier
f7395c71b9 feature #13444 [Serializer] Remove deprecated JSON error methods (dunglas)
This PR was merged into the 3.0-dev branch.

Discussion
----------

[Serializer] Remove deprecated JSON error methods

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

Remove deprecated methods of the Serializer component.

Commits
-------

269aca6 [Serializer] Remove deprecated JSON error methods
2015-01-19 17:17:28 +01:00
Kévin Dunglas
269aca6728 [Serializer] Remove deprecated JSON error methods 2015-01-18 23:48:18 +01:00
Fabien Potencier
fef2bd4812 feature #12891 [Form] Deprecated setDefaultOptions() in favor of configureOptions() (peterrehm)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Deprecated setDefaultOptions() in favor of configureOptions()

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

This tries to provide a compatible API with the depreciation of the OptionResolverInterface. I would like to have this in 2.6.2 but I think that might not be possible? To me I think we should always provide an API where you do not need to use deprecated classes.

Also can you think of any way to trigger errors on the use of the deprecated setDefaultOptions() method? Since it is usually overwritten without calling the parent class this might be tricky. Maybe only in the resolver if we can check if actual options has been resolved in a call to setDefaultOptions.

Commits
-------

3d43cae Deprecated setDefaultOptions() in favor of configureOptions()
2015-01-18 15:06:44 +01:00
Fabien Potencier
388ae55a4e feature #13342 [security] Fetching current stored context when not explicitly specified (jaytaph)
This PR was squashed before being merged into the 2.7 branch (closes #13342).

Discussion
----------

[security] Fetching current stored context when not explicitly specified

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

This patch will use the current stored context found in a token (provided, there is one), if none has been specified.

According to a quick scan of the code, this will be the only place where `getProviderKey()` is used outside a specific class (the authentication providers will check token type before calling `getProviderKey()`, but maybe it's be a good idea to implement a "providerKeyTokenInterface" or something. It's a nicer solution imho than the current `method_exists()`

Commits
-------

f6046ba [security] Fetching current stored context when not explicitly specified
2015-01-18 14:02:57 +01:00
Joshua Thijssen
f6046ba4f3 [security] Fetching current stored context when not explicitly specified 2015-01-18 14:02:55 +01:00
Fabien Potencier
e756135f64 feature #12960 [FrameworkBundle] Container parameters in Route#condition (nikita2206)
This PR was squashed before being merged into the 2.7 branch (closes #12960).

Discussion
----------

[FrameworkBundle] Container parameters in Route#condition

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

Adds ability to use parameters in route conditions like you can use them in container definitions:

```php
contact:
    path:     /contact
    defaults: { _controller: AcmeDemoBundle:Main:contact }
    condition: "request.headers.get('User-Agent') matches '%allowed_user_agents%'"
```

As you could see replacement of the placeholder happens before ExpressionLanguage will tokenize and compile the expression so it looks kinda ad-hoc and primitive. This means a BC break for us, because some of conditions out there that had percentage symbol might be invalid now, f.e.: `10%var_name%2`- without the patch this will be currently compiled to `10 % $var_name % 2`, with the patch it will try to replace `%var_name%` with a parameter. The same goes for percentage symbols inside string literals.

This PR is a different implementation of #12869 which is I think is too overcomplicated for this feature.

Commits
-------

505e474 [FrameworkBundle] Container parameters in Route#condition
2015-01-16 23:05:28 +01:00
nikita2206
505e474dee [FrameworkBundle] Container parameters in Route#condition 2015-01-16 23:03:48 +01:00
Fabien Potencier
56ad3e6668 Merge branch '2.7'
* 2.7:
  [2.7] Added deprecated in debug command
  [FrameworkBundle] remove usage of deprecated Definition::setFactoryClass(), Definition::setFactoryService() and Definition::setFactoryMethod() methods.
  fixed some deprecated notices
  [Validator] fixed some legacy tests
  [Validator] fixed remaining notice
  [DX] Attempt to improve logging messages with  parameters
2015-01-16 23:00:38 +01:00
Fabien Potencier
2e496e1b20 feature #13258 [HttpFoundation] remove deprecated : FlashBag don't implement anymore IteratorAggregate (FlorianLB)
This PR was squashed before being merged into the 3.0-dev branch (closes #13258).

Discussion
----------

[HttpFoundation] remove deprecated : FlashBag don't implement anymore IteratorAggregate

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

Commits
-------

69a556d [HttpFoundation] remove deprecated : FlashBag don't implement anymore IteratorAggregate
2015-01-16 22:31:47 +01:00
FlorianLB
69a556dc99 [HttpFoundation] remove deprecated : FlashBag don't implement anymore IteratorAggregate 2015-01-16 22:31:45 +01:00
Fabien Potencier
245c5147e0 minor #13397 [2.7] Added deprecated in debug command (saro0h)
This PR was squashed before being merged into the 2.7 branch (closes #13397).

Discussion
----------

[2.7] Added deprecated in debug command

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

Commits
-------

31aad0f [2.7] Added deprecated in debug command
2015-01-16 22:25:23 +01:00
sarah khalil
31aad0f117 [2.7] Added deprecated in debug command 2015-01-16 22:25:19 +01:00
Fabien Potencier
564ae34dd7 minor #13434 fixed some deprecated notices (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

fixed some deprecated notices

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

Commits
-------

84f3753 fixed some deprecated notices
2015-01-16 22:22:25 +01:00
Fabien Potencier
df76faaa39 minor #13435 [Validator] fixed remaining notice (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

[Validator] fixed remaining notice

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

Commits
-------

5fcfd1b [Validator] fixed some legacy tests
f187d9a [Validator] fixed remaining notice
2015-01-16 22:20:59 +01:00
Fabien Potencier
f0a185d6a6 minor #13406 [2.7] [FrameworkBundle] remove usage of deprecated Definition::setFactoryClass(), Definition::setFactoryService() and Definition::setFactoryMethod() methods. (hhamon)
This PR was merged into the 2.7 branch.

Discussion
----------

[2.7] [FrameworkBundle] remove usage of deprecated Definition::setFactoryClass(), Definition::setFactoryService() and Definition::setFactoryMethod() methods.

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

Commits
-------

fbcc574 [FrameworkBundle] remove usage of deprecated Definition::setFactoryClass(), Definition::setFactoryService() and Definition::setFactoryMethod() methods.
2015-01-16 22:19:27 +01:00
Hugo Hamon
fbcc574c8c [FrameworkBundle] remove usage of deprecated Definition::setFactoryClass(), Definition::setFactoryService() and Definition::setFactoryMethod() methods. 2015-01-16 19:49:13 +01:00
Fabien Potencier
84f3753b33 fixed some deprecated notices 2015-01-16 19:08:37 +01:00
Fabien Potencier
5fcfd1b9f6 [Validator] fixed some legacy tests 2015-01-16 18:23:24 +01:00
Fabien Potencier
f187d9aa1c [Validator] fixed remaining notice 2015-01-16 18:12:38 +01:00
Fabien Potencier
d169e8437c minor #13432 [EventDispatcher] update changelog entry wording (xabbuh)
This PR was merged into the 3.0-dev branch.

Discussion
----------

[EventDispatcher] update changelog entry wording

| Q             | A
| ------------- | ---
| Fixed tickets |
| License       | MIT

Updates the wording and adds missing `Event::getName()` method (the
`Event::setName()` method was actually listed twice instead).

Commits
-------

96c992c [EventDispatcher] update changelog entry wording
2015-01-16 17:12:33 +01:00
Christian Flothmann
96c992c916 [EventDispatcher] update changelog entry wording
Updates the wording and adds missing `Event::getName()` method (the
`Event::setName()` method was actually listed twice instead).
2015-01-16 16:51:00 +01:00
Fabien Potencier
9ff47b846c feature #13086 [Console] Define isVerbose(), etc. methods in OutputInterface (frne)
This PR was squashed before being merged into the 3.0-dev branch (closes #13086).

Discussion
----------

[Console] Define isVerbose(), etc. methods in OutputInterface

Could / should the ```Symfony\Component\Console\Output\OutputInterface``` define the methods ```isQuiet()```, ```isVerbose()```, ```isVeryVerbose()``` and ```isDebug()```?

Because the Interface already defines the verbosity constants and the ```getVerbosity()``` method, it will probalby be the right place to do so...

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

Commits
-------

1ac95b1 [Console] Define isVerbose(), etc. methods in OutputInterface
2015-01-16 16:47:11 +01:00
frne
1ac95b141e [Console] Define isVerbose(), etc. methods in OutputInterface 2015-01-16 16:46:29 +01:00
Fabien Potencier
da9d88d8c5 feature #13418 [DX] Attempt to improve logging messages with parameters (iltar)
This PR was squashed before being merged into the 2.7 branch (closes #13418).

Discussion
----------

[DX] Attempt to improve logging messages with  parameters

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

This PR is a follow-up of #12594 `[DX] [HttpKernel] Use "context" argument when logging route in RouterListener`.

I have attempted to improve the log messages, as well as updating the usage context. I wasn't sure if the log messages should end with a `.` or not, if so I can update all messages to confirm a standard.

Commits
-------

ea80c9b [DX] Attempt to improve logging messages with  parameters
2015-01-16 16:11:56 +01:00
Iltar van der Berg
ea80c9b4c2 [DX] Attempt to improve logging messages with parameters 2015-01-16 16:11:12 +01:00
Fabien Potencier
270818d62d feature #13348 [3.0][Monolog] Remove deprecated interface and deprecated methods (rosier)
This PR was squashed before being merged into the 3.0-dev branch (closes #13348).

Discussion
----------

[3.0][Monolog] Remove deprecated interface and deprecated methods

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

Commits
-------

0fa072c [3.0][Monolog] Remove deprecated interface and deprecated methods
2015-01-16 15:59:50 +01:00
Jan Rosier
0fa072c859 [3.0][Monolog] Remove deprecated interface and deprecated methods 2015-01-16 15:59:46 +01:00
Fabien Potencier
1a2636dd20 fixed wrong merge 2015-01-16 15:57:18 +01:00
Fabien Potencier
d5df960022 Merge branch '2.7'
* 2.7:
  fixed tests
  [EventDispatcher] Add missing checks to RegisterListenersPass
  Inline private 'is quoting required' methods in Escaper
  [HttpKernel] Add request uri to Logger context
  removed notices for some constants as it does not work well
  [Debug] fix loading order for legacy classes
  Add comment as requested
  Remove duplicate 'require'
  [Yaml] Improve YAML boolean escaping
2015-01-16 15:56:00 +01:00
Fabien Potencier
8936c33afd Merge branch '2.6' into 2.7
* 2.6:
  fixed tests
  [EventDispatcher] Add missing checks to RegisterListenersPass
  Inline private 'is quoting required' methods in Escaper
  [Debug] fix loading order for legacy classes
  Add comment as requested
  Remove duplicate 'require'
  [Yaml] Improve YAML boolean escaping
2015-01-16 15:55:54 +01:00
Fabien Potencier
39520c0cdd Merge branch '2.5' into 2.6
* 2.5:
  fixed tests
  [EventDispatcher] Add missing checks to RegisterListenersPass
  Inline private 'is quoting required' methods in Escaper
  [Debug] fix loading order for legacy classes
  Add comment as requested
  Remove duplicate 'require'
  [Yaml] Improve YAML boolean escaping

Conflicts:
	src/Symfony/Component/Yaml/Tests/InlineTest.php
2015-01-16 15:55:47 +01:00
Fabien Potencier
99a627a040 Merge branch '2.3' into 2.5
* 2.3:
  fixed tests
  [EventDispatcher] Add missing checks to RegisterListenersPass
  Inline private 'is quoting required' methods in Escaper
  [Debug] fix loading order for legacy classes
  Add comment as requested
  Remove duplicate 'require'
  [Yaml] Improve YAML boolean escaping

Conflicts:
	src/Symfony/Component/Debug/Exception/FatalErrorException.php
	src/Symfony/Component/HttpKernel/DependencyInjection/RegisterListenersPass.php
2015-01-16 15:51:58 +01:00
Fabien Potencier
b08115bd63 fixed tests 2015-01-16 15:49:28 +01:00
Fabien Potencier
8a870c24a6 bug #13293 [EventDispatcher] Add missing checks to RegisterListenersPass (znerol)
This PR was submitted for the 2.7 branch but it was merged into the 2.3 branch instead (closes #13293).

Discussion
----------

[EventDispatcher] Add missing checks to RegisterListenersPass

* Support services using a parameter for their class name.
* Prevent abstract services as event subscribers.

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

Commits
-------

0a50b63 [EventDispatcher] Add missing checks to RegisterListenersPass
2015-01-16 15:48:26 +01:00
Lorenz Schori
0a50b63da1 [EventDispatcher] Add missing checks to RegisterListenersPass
* Support services using a parameter for their class name.
* Prevent abstract services as event subscribers.

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |
2015-01-16 15:48:25 +01:00
Fabien Potencier
98b06f6a95 minor #13429 removed notices for some constants as it does not work well (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

removed notices for some constants as it does not work well

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

Commits
-------

ee42544 removed notices for some constants as it does not work well
2015-01-16 15:37:20 +01:00
Fabien Potencier
689cf99c4e bug #13262 [Yaml] Improve YAML boolean escaping (petert82, larowlan)
This PR was merged into the 2.3 branch.

Discussion
----------

[Yaml] Improve YAML boolean escaping

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

This PR ensures that PHP [values which would be interpreted as booleans][1] in older versions of the YAML spec are escaped with single quotes when dumped by the Dumper.

For example, dumping this:

```php
array(
    'country_code' => 'no',
    'speaks_norwegian' => 'y',
    'heating' => 'on',
)
```

Will produce this YAML:

```yaml
country_code: 'no'
speaks_norwegian: 'y'
heating: 'on'
```

[1]: http://yaml.org/type/bool.html

Commits
-------

8fa056b Inline private 'is quoting required' methods in Escaper
afe827a Merge pull request #2 from larowlan/patch-2
a0ec0fe Add comment as requested
1e0633e Merge pull request #1 from larowlan/patch-1
81a8090 Remove duplicate 'require'
3760e67 [Yaml] Improve YAML boolean escaping
2015-01-16 14:53:48 +01:00
pthompson
8fa056bc95 Inline private 'is quoting required' methods in Escaper 2015-01-16 14:15:13 +01:00
Fabien Potencier
9f195cd150 feature #13260 [3.0][EventDispatcher][Event] removed deprecated methods (aitboudad)
This PR was merged into the 3.0-dev branch.

Discussion
----------

[3.0][EventDispatcher][Event] removed deprecated methods

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

Commits
-------

4ab3e8b [3.0] [EventDispatcher][Event] removed deprecated name methods.
ba70a48 [3.0] [EventDispatcher][Event] removed deprecated setDispatcher and getDispatcher methods.
2015-01-16 13:42:29 +01:00
Fabien Potencier
e52daa3bd9 feature #13320 [HttpKernel][2.7] Add request uri to Logger context (Rvanlaak)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpKernel][2.7] Add request uri to Logger context

... so host info does not get lost in the logging. The current situation does not allow the user, that receives a `Monolog` email for instance, to determine at which host an error occurred.

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

Commits
-------

c8f1f19 [HttpKernel] Add request uri to Logger context
2015-01-16 13:41:12 +01:00