Add check to Store::unlock to ensure file exists

Fix indentation and shorten code
 fixed DomCrwaler/Form to handle <button> when submitted
merged branch li0n12/crawler_button (PR #5699)

This PR was merged into the 2.0 branch.

Commits
-------

b439d13  fixed DomCrwaler/Form to handle <button> when submitted

Discussion
----------

[DomCrawler] fixed Form to handle <button> when submitted

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT

Issue appears when submitting form with <button> form element.
Name-value of this button wasn`t passed to the request.
Fixed IPv6 Check in RequestMatcher

Added a fallback check for ipv6 support even if sockets extension is not available
merged branch yohang/patch-1 (PR #5763)

This PR was submitted for the master branch but it was merged into the 2.0 branch instead (closes #5763).

Commits
-------

333ebeb Fixed IPv6 Check in RequestMatcher

Discussion
----------

[HttpFoundation] Fixed IPv6 Check in RequestMatcher

RequestMatcher checks IPv6 support with

```php
if (!defined('AF_INET6')) {
    throw new \RuntimeException('Unable to check Ipv6. Check that PHP was not compiled with option "disable-ipv6".');
}
```
wich depends on sockets extension.

This PR adds a fallback by checking return value of silented call to `inet_pton` if extension is not available (code from https://github.com/dsp/v6tools/blob/master/src/v6tools/Runtime.php).
[Form] Fixed creation of multiple money fields with different currencies
merged branch bschussek/issue5458 (PR #5777)

This PR was merged into the 2.0 branch.

Commits
-------

bf3e358 [Form] Fixed creation of multiple money fields with different currencies

Discussion
----------

[Form] Fixed creation of multiple money fields with different currencies

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #5458
Todo: -
License of the code: MIT
Documentation PR: -
Add to DateFormats 'D M d H:i:s Y T' (closes #5830)

DateFormat seen on the web
updated vendors for 2.0.18
updated CHANGELOG for 2.0.18
update CONTRIBUTORS for 2.0.18
updated VERSION for 2.0.18
bumped Symfony version to 2.0.19-DEV
[ClassLoader] fixed unbracketed namespaces (closes #5747)
merged branch jonathaningram/issue_5375 (PR #5376)

This PR was merged into the 2.0 branch.

Commits
-------

a094f7e Add check to Store::unlock to ensure file exists

Discussion
----------

[2.0] [HttpKernel] Add check to Store::unlock to ensure file exists

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes

I was seeing this error in my logs when using an `AppCache`:

```
Error 2: /var/www/beta.example.com/shared/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/Store.php line 92: unlink(/var/www/beta.example.com/releases/20120827020525/app/cache/beta/http_cache/md/c2/88/66a911b5266a57bdd55131a47895b8861dfd.lck): No such file or directory
```

It was only occurring when the `http_cache` file was being primed (i.e. first load).

I've added a simple check to ensure that the file is a valid file before trying to unlink. I also added a missing `@return` docblock. Note: I've chosen to return `false` if the file does not exist as this seems to be the behaviour of the `purge` method.

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

by jonathaningram at 2012-08-29T06:46:52Z

@henrikbjorn done and rebased. Thanks.

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

by jonathaningram at 2012-09-17T22:38:47Z

@henrikbjorn any news on this one? It's currently not possible to use the HTTP Cache without the first request failing.

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

by jonathaningram at 2012-09-25T01:28:38Z

ping @fabpot sorry to keep pushing this, but any chance you could take a look at this?
[HttpFoundation] Fix name sanitization after perfoming move
merged branch helios-ag/patch (PR #5496)

This PR was squashed before being merged into the 2.0 branch (closes #5496).

Commits
-------

9872d26 [HttpFoundation] Fix name sanitization after perfoming move

Discussion
----------

[HttpFoundation] Fix name sanitization after perfoming move

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

Further work on #2577, fixes name sanitization, after moving file name with new name with non latin characters in the beginning.

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

by stloyd at 2012-09-12T09:52:05Z

You must revert chmod changes.

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

by helios-ag at 2012-09-12T14:30:36Z

@stloyd fixed

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

by stof at 2012-10-13T21:12:43Z

@fabpot what is the status of this PR ?
The exception message should say which field is not mapped
merged branch mvrhov/patch-2 (PR #5857)

This PR was merged into the 2.0 branch.

Commits
-------

6b42c8c The exception message should say which field is not mapped

Discussion
----------

The exception message should tell which field is not mapped
shows correct class name InputOption in error message