[Form] Prevent trigger of E_USER_DEPRECATED for new API
Use KernelEvents constants in TraceableEventDispatcher
Revert "merged branch francisbesset/routing_constant_usage (PR #6449)"

This reverts commit c0e341c61829a9d270248fe8165409581bf6f5dd, reversing
changes made to 35f5bca5851289e265e15d362ae92f0b08826912.
[Form] Fix deprecated call method
Update src/Symfony/Component/Validator/Resources/translations/validators.it.xlf

Fix structure error in validators.it.xlf
Fix a tag name typo (</ësh> to </target>)

Replace </ësh> to </target> line 139.
merged branch fabpot/synthetic-services (PR #6500)

This PR was merged into the master branch.

Commits
-------

3cac604 [DependencyInjection] fixed setting a synthetic service on a frozen container

Discussion
----------

[DependencyInjection] fixed setting a synthetic service on a frozen container

By definition of a synthetic service, setting it on a frozen container should be possible.

---------------------------------------------------------------------------

by stof at 2012-12-28T08:44:44Z

This allows setting services which are not defined

---------------------------------------------------------------------------

by fabpot at 2012-12-28T08:49:29Z

@stof: right, thinking about it more, it is probably not a so good idea.

---------------------------------------------------------------------------

by fabpot at 2012-12-28T08:52:03Z

I've restricted the condition to only accept setting existing synthetic services. That should be ok.

---------------------------------------------------------------------------

by drak at 2012-12-28T19:10:23Z

This is a good enhancement but I would go further. It should still be possible to add parameters and definitions to the container after it's been compiled but not allow modification of existing services or parameters.
merged branch fabpot/resource-tracking (PR #6501)

This PR was merged into the master branch.

Commits
-------

6cd1fd4 [DependencyInjection] removed hard dependency on the Config component

Discussion
----------

[DependencyInjection] removed hard dependency on the Config component

The Config component is a hard dependency for the loaders (but loaders
themselves are optional); all other classes should not have a hard dep
on Config. The introduction of a new flag allows to remove this
dependency.

This commit also fixes skipped test dependencies.

---------------------------------------------------------------------------

by fabpot at 2012-12-28T09:47:13Z

As there is only one location where we are directly using a class from the Config component (`ContainerBuilder::addObjectResource()`), we can also just test this case and do nothing if the class does not exist instead of adding a flag, but that looks dirty.

```php
public function addObjectResource($object)
{
    if (!class_exists('Symfony\Component\Config\Resource\FileResource')) {
        return $this;
    }

    $parent = new \ReflectionObject($object);
    do {
        $this->addResource(new FileResource($parent->getFileName()));
    } while ($parent = $parent->getParentClass());

    return $this;
}
```

What do you think?
merged branch fabpot/exception-logging (PR #6503)

This PR was merged into the master branch.

Commits
-------

0a42501 [HttpKernel] tweaked logging in the exception listener
1a6c9b3 [HttpKernel] refactored logging in the exception listener

Discussion
----------

[HttpKernel] refactored logging in the exception listener

* avoid code duplication
* allow easier overloading of the default behavior
merged branch tgalopin/patch-1 (PR #6506)

This PR was merged into the master branch.

Commits
-------

d2a1e4e Update src/Symfony/Component/Validator/Resources/translations/validators.it.xlf

Discussion
----------

[Validator] Fix structure error in validators.it.xlf

Fix structure error in validators.it.xlf.

Probably a copy-cut that didn't work correctly.

---------------------------------------------------------------------------

by stof at 2012-12-28T17:04:17Z

I suspect a bad resolution of a merge conflict

---------------------------------------------------------------------------

by tgalopin at 2012-12-28T17:06:17Z

Indeed, probably.
merged branch tgalopin/patch-2 (PR #6507)

This PR was merged into the master branch.

Commits
-------

828eb90 Fix a tag name typo (</ësh> to </target>)

Discussion
----------

[Validator] Fix a tag name typo (</ësh> to </target>) in validators.sq.xlf

Replace </ësh> by </target> line 139.
merged branch francoispluchino/form-fix-deprecated-method (PR #6455)

This PR was merged into the master branch.

Commits
-------

16a196a [Form] Fix deprecated call method

Discussion
----------

[Form] Fix deprecated call method

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: -
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -

---------------------------------------------------------------------------

by stof at 2012-12-21T13:21:50Z

This is wrong as the typehint of the constructor is still typehinting the old interface, and so this method is not available.

But the typehint should be changed to use the new interface anyway

---------------------------------------------------------------------------

by francoispluchino at 2012-12-26T09:11:49Z

@fabpot It's OK for you?
(The failure of the Travis test is caused  by the DateTime Form test only in PHP 5.3.3)

---------------------------------------------------------------------------

by bschussek at 2012-12-28T15:00:51Z

Can you please squash the commits?

---------------------------------------------------------------------------

by francoispluchino at 2012-12-28T15:57:47Z

@bschussek OK, it's done.
merged branch drak/bc (PR #6422)

This PR was merged into the master branch.

Commits
-------

7533deb [Form] Prevent trigger of E_USER_DEPRECATED for new API

Discussion
----------

[Form] Prevent trigger of E_USER_DEPRECATED for new API

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets:
Todo: -
License of the code: MIT

---------------------------------------------------------------------------

by stof at 2012-12-19T13:54:33Z

This is wrong as FormEvent extends DataEvent and so is also an instance.

Thus, DataEvent should never be constructed anymore (Sf2 does not instantiate it asnd there is no reason to dispatch it elsewhere). The BC is for typehints, and so the useful E_USER_DEPRECATED would be when DataEvent is used as typehint (which is not possible to detect AFAIK)

---------------------------------------------------------------------------

by drak at 2012-12-19T14:07:33Z

So in that case I should check specifically for two class names. Remember the intention here is to NOT trigger an error when the NEW class `FormEvent` is used. I'll update the PR.

---------------------------------------------------------------------------

by Tobion at 2012-12-19T14:25:42Z

I like the solution with an overridden constructor more because using the new stuff will not have the performance penalty of calling `get_class` at all.

---------------------------------------------------------------------------

by stof at 2012-12-19T14:52:47Z

@drak and why not simply ``if (!$this instanceof FormEvent)`` ?

---------------------------------------------------------------------------

by drak at 2012-12-19T15:58:28Z

@stof - if that's ok - I was just assuming other classes might have inherited.
@Tobion - the problem is the private name property we have to call parent which will ultimately call the deprecated constructor.

---------------------------------------------------------------------------

by drak at 2012-12-19T15:59:25Z

How about this?

---------------------------------------------------------------------------

by stof at 2012-12-19T16:51:26Z

@drak if your class inherit from DataEvent instead of FormEvent, it is logical to get a deprecation warning

---------------------------------------------------------------------------

by stof at 2012-12-19T16:52:50Z

@drak I think this allows removing some special error catching in a few places in Form tests (and also in the Form class if it was added)

---------------------------------------------------------------------------

by drak at 2012-12-19T17:33:51Z

@stof - yes, the whole idea is, if you inherit from FormEvent, no warning. anything else, gives warning - that's what we want right?

PR squashed and ready from my side.

---------------------------------------------------------------------------

by drak at 2012-12-20T14:00:13Z

ping @fabpot

---------------------------------------------------------------------------

by bschussek at 2012-12-28T15:19:40Z

:+1:
merged branch lmcd/kernelevents-constants (PR #6499)

This PR was merged into the master branch.

Commits
-------

d5948f1 Use KernelEvents constants in TraceableEventDispatcher

Discussion
----------

[HttpKernel] Use KernelEvents constants in TraceableEventDispatcher

Can't see any reason why we're not using constants here.
Revert "merged branch ricardclau/rename_choice_to_oneof (PR #6360)"

This reverts commit 1de60c902c66c01c9c8c24935cd9efe90b6333e5, reversing
changes made to e3cc337b000dc4049e0e0ddb985d26ddb4abcd08.

Conflicts:
	UPGRADE-2.2.md
Improve timing safe comparison function

Improve the timing safe comparison function to better handle cases where input is of different length.

Note that it is now important to always pass any string that the user can directly control to the second parameter of the function. Otherwise, length information may be leaked.
Update src/Symfony/Component/HttpFoundation/Request.php

[HttpFoundation][Request] Align const
merged branch ircmaxell/master (PR #6510)

This PR was merged into the master branch.

Commits
-------

c543116 Improve timing safe comparison function

Discussion
----------

Improve timing safe comparison function in Security bundle to not leak length information.

Improve the timing safe comparison function to better handle cases where input is of different length.

Note that it is now important to always pass any string that the user can directly control to the second parameter of the function. Otherwise, length information may be leaked.

---------------------------------------------------------------------------

by ircmaxell at 2012-12-29T13:36:32Z

@apfelbox: No, for two reasons. First, you shouldn't be passing the password directly into this function (it should be hashed first).

Second, it depends only on the length of the user supplied input (the second parameter). So the execution time will vary, but 100% based on user input. No information about the stored string is leaked...

---------------------------------------------------------------------------

by apfelbox at 2012-12-29T14:09:54Z

@ircmaxell yes, I just thought about it for a while and you are right. The `strlen($knownString)` is a constant factor and therefore the  execution time of the function does not vary with it (especially if it is hashed).
fixed CS
merged branch jamogon/patch-3 (PR #6511)

This PR was merged into the master branch.

Commits
-------

5779262 Update src/Symfony/Component/HttpFoundation/Request.php

Discussion
----------

Update src/Symfony/Component/HttpFoundation/Request.php

[HttpFoundation][Request] Align const