Commit Graph

25401 Commits

Author SHA1 Message Date
Fabien Potencier
1330662705 bug #18006 [HttpFoundation] Fix BC break introduced by #17642 (dunglas)
This PR was squashed before being merged into the 3.1-dev branch (closes #18006).

Discussion
----------

[HttpFoundation] Fix BC break introduced by #17642

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

@taylorotwell can you confirm it fixes the issue with Laravel?

Commits
-------

73ef995 [HttpFoundation] Fix BC break introduced by #17642
2016-03-04 10:04:18 +01:00
Kévin Dunglas
73ef9957b3 [HttpFoundation] Fix BC break introduced by #17642 2016-03-04 10:04:16 +01:00
Fabien Potencier
f5cf886500 Merge branch '3.0'
* 3.0:
  Updated all the README files
  [TwigBundle] Fix failing test on appveyor
  Improved the error message when using "@" in a decorated service
  Improve error reporting in router panel of web profiler
  [DoctrineBridge][Form] Fix performance regression in EntityType
  [FrameworkBundle] Fix a regression in handling absolute and namespaced template paths
  Allow to normalize \Traversable
  minor [Form] fix tests added by #16886
  Remove _path from query parameters when fragment is a subrequest and request attributes are already set Added tests for _path removal in FragmentListener
  Simplified everything
  Added a test
  Fixed the problem in an easier way
  Fixed a syntax issue
  Improved the error message when a template is not found
  [CodingStandards] Conformed to coding standards
  [TwigBundle] fixed Include file locations in "Template could not be found" exception
2016-03-04 08:56:56 +01:00
Fabien Potencier
4a08c88755 Merge branch '2.8' into 3.0
* 2.8:
  Updated all the README files
  [TwigBundle] Fix failing test on appveyor
  Improved the error message when using "@" in a decorated service
  Improve error reporting in router panel of web profiler
  [DoctrineBridge][Form] Fix performance regression in EntityType
  [FrameworkBundle] Fix a regression in handling absolute and namespaced template paths
  Allow to normalize \Traversable
  minor [Form] fix tests added by #16886
  Remove _path from query parameters when fragment is a subrequest and request attributes are already set Added tests for _path removal in FragmentListener
  Simplified everything
  Added a test
  Fixed the problem in an easier way
  Fixed a syntax issue
  Improved the error message when a template is not found
  [CodingStandards] Conformed to coding standards
  [TwigBundle] fixed Include file locations in "Template could not be found" exception
2016-03-04 08:55:57 +01:00
Fabien Potencier
0f3e1a3c34 Merge branch '2.7' into 2.8
* 2.7:
  Updated all the README files
  [TwigBundle] Fix failing test on appveyor
  Improved the error message when using "@" in a decorated service
  Improve error reporting in router panel of web profiler
  [DoctrineBridge][Form] Fix performance regression in EntityType
  [FrameworkBundle] Fix a regression in handling absolute and namespaced template paths
  Allow to normalize \Traversable
  minor [Form] fix tests added by #16886
  Remove _path from query parameters when fragment is a subrequest and request attributes are already set Added tests for _path removal in FragmentListener
  Simplified everything
  Added a test
  Fixed the problem in an easier way
  Fixed a syntax issue
  Improved the error message when a template is not found
  [CodingStandards] Conformed to coding standards
  [TwigBundle] fixed Include file locations in "Template could not be found" exception
2016-03-04 08:54:35 +01:00
Fabien Potencier
d66f0ebe35 Merge branch '2.3' into 2.7
* 2.3:
  Updated all the README files
  [TwigBundle] Fix failing test on appveyor
  [FrameworkBundle] Fix a regression in handling absolute and namespaced template paths
  Allow to normalize \Traversable
  Remove _path from query parameters when fragment is a subrequest and request attributes are already set Added tests for _path removal in FragmentListener
  Simplified everything
  Added a test
  Fixed the problem in an easier way
  Fixed a syntax issue
  Improved the error message when a template is not found
  [CodingStandards] Conformed to coding standards
  [TwigBundle] fixed Include file locations in "Template could not be found" exception
2016-03-04 08:52:28 +01:00
Fabien Potencier
5ebeccafa5 feature #17887 Show more information in the security profiler (javiereguiluz)
This PR was squashed before being merged into the 3.1-dev branch (closes #17887).

Discussion
----------

Show more information in the security profiler

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

This is an early prototype to explore the feature of displaying more information in the security panel. Example:

![profiler_security](https://cloud.githubusercontent.com/assets/73419/13221929/0235fc46-d97e-11e5-981a-249b7148f3a6.png)

Commits
-------

b12152d Show more information in the security profiler
2016-03-04 08:25:19 +01:00
Javier Eguiluz
b12152d1eb Show more information in the security profiler 2016-03-04 08:25:17 +01:00
Fabien Potencier
9a5ea71c22 bug #17984 Allow to normalize \Traversable when serializing xml (Ener-Getick)
This PR was merged into the 2.3 branch.

Discussion
----------

Allow to normalize \Traversable when serializing xml

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

It's impossible to normalize an object implementing ``\Traversable`` when using the ``XMLEncoder``. For example we can't customize the serializer output when serializing a ``FormInterface`` instance.

So my proposition is to fix this by using the default XML encoder output only when the serializer can't normalize the data.

Commits
-------

97c5d27 Allow to normalize \Traversable
2016-03-04 08:19:22 +01:00
Fabien Potencier
8713c7efaf minor #17997 Updated all the README files (javiereguiluz)
This PR was squashed before being merged into the 2.3 branch (closes #17997).

Discussion
----------

Updated all the README files

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

Related to #17995.

Commits
-------

2e81248 Updated all the README files
2016-03-04 08:12:08 +01:00
Javier Eguiluz
2e812481c9 Updated all the README files 2016-03-04 08:12:06 +01:00
Nicolas Grekas
d791d78d34 minor #18002 [TwigBundle] Fix failing test on appveyor (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[TwigBundle] Fix failing test on appveyor

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

Commits
-------

d5bbc3c [TwigBundle] Fix failing test on appveyor
2016-03-03 18:39:39 +01:00
Nicolas Grekas
d5bbc3c6cb [TwigBundle] Fix failing test on appveyor 2016-03-03 18:24:01 +01:00
Fabien Potencier
37569be45f bug #17434 Improved the error message when a template is not found (rvanginneken, javiereguiluz)
This PR was merged into the 2.3 branch.

Discussion
----------

Improved the error message when a template is not found

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

### Before

![template_error_before](https://cloud.githubusercontent.com/assets/73419/12414237/7db29212-be94-11e5-85b4-c6444aa853f8.png)

### After

![template_error_after](https://cloud.githubusercontent.com/assets/73419/12414242/80ed1eca-be94-11e5-992e-a0596a1e95ca.png)

This seems to work in the browser ... but I can't make tests pass. Could anybody please help me? Thanks!

Commits
-------

0134d76 Simplified everything
19bfa2e Added a test
88b913b Fixed the problem in an easier way
35f082f Fixed a syntax issue
968476b Improved the error message when a template is not found
e9d951a [CodingStandards] Conformed to coding standards
d3fe07b [TwigBundle] fixed Include file locations in "Template could not be found" exception
2016-03-03 15:31:15 +01:00
Fabien Potencier
0e5ac97ee2 feature #17642 [FrameworkBundle] [DX] Add Controller::json method to make it easy to send json (mcfedr)
This PR was merged into the 3.1-dev branch.

Discussion
----------

[FrameworkBundle] [DX] Add `Controller::json` method to make it easy to send json

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

Its currently a awkward to use Serializer component to send a `JsonResponse`.

I have tried two approaches

1. use `Serializer::normalize` and `JsonResponse`
1. use `Serializer::serialize` and a plain `Response`, and set the `content-type`

In either cases there is need for a custom `json` function so as not to repeat yourself and there are disadvantages.

1. In the first case you are only partly using `Serializer` and any custom `Encoder` would be skipped
1. In the second you are not making use of `JsonResponse`, particular disadvantage if you want to support JSONP.

This new `json` method uses the serializer component is enabled it is used to generate the json data, and falls back to normal `JsonResponse` when its not.

Commits
-------

f904a2b Add a Controller function to make it easy to return json
2016-03-03 14:18:37 +01:00
Fabien Potencier
aab27839f9 bug #17687 Improved the error message when using "@" in a decorated service (javiereguiluz)
This PR was squashed before being merged into the 2.7 branch (closes #17687).

Discussion
----------

Improved the error message when using "@" in a decorated service

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

Commits
-------

e7690ba Improved the error message when using "@" in a decorated service
2016-03-03 14:15:14 +01:00
Javier Eguiluz
e7690ba5c4 Improved the error message when using "@" in a decorated service 2016-03-03 14:15:12 +01:00
Fabien Potencier
9d58ad92fe bug #17744 Improve error reporting in router panel of web profiler (javiereguiluz)
This PR was squashed before being merged into the 2.7 branch (closes #17744).

Discussion
----------

Improve error reporting in router panel of web profiler

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

### Problem

If you define a route condition like this:

```yaml
app:
    resource: '@AppBundle/Controller/'
    type:     annotation
    condition: "request.server.get('HTTP_HOST') matches '/.*\.dev/'"
```

When browsing the Routing panel in the web profiler, you see an exception:

![problem](https://cloud.githubusercontent.com/assets/73419/12930027/553eeb08-cf76-11e5-90b1-ab0de6175d4e.png)

#### Why?

Because the route condition uses the `request` object, but the special `TraceableUrlMatcher` class doesn't get access to the real `request` object but to the special object obtained via:

```php
$request = $profile->getCollector('request');
```

These are the contents of this pseudo-request:

![cause](https://cloud.githubusercontent.com/assets/73419/12930052/804ea248-cf76-11e5-9c38-2e43e1654065.png)

`request.server.get(...)` condition fails because `request.server` is `null`. The full exception message shows this:

![exception](https://cloud.githubusercontent.com/assets/73419/12930079/9c7d6058-cf76-11e5-8eeb-45f5059c824c.png)

### Solution

I propose to catch all exceptions in `TraceableUrlMatcher` and display an error message with some details of the exception:

![error_message](https://cloud.githubusercontent.com/assets/73419/12930106/b29e31d2-cf76-11e5-868c-98d8b0cc4e5b.png)

Commits
-------

1001554 Improve error reporting in router panel of web profiler
2016-03-03 14:12:45 +01:00
Javier Eguiluz
10015546b0 Improve error reporting in router panel of web profiler 2016-03-03 14:12:44 +01:00
Fabien Potencier
eee9bfbef6 bug #17894 [FrameworkBundle] Fix a regression in handling absolute template paths (jakzal)
This PR was merged into the 2.3 branch.

Discussion
----------

[FrameworkBundle] Fix a regression in handling absolute template paths

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

Regression introduced by #15272.

Commits
-------

d8c493f [FrameworkBundle] Fix a regression in handling absolute and namespaced template paths
2016-03-03 13:59:03 +01:00
Fabien Potencier
46d1d2407a bug #17990 [DoctrineBridge][Form] Fix performance regression in EntityType (kimlai)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #17990).

Discussion
----------

[DoctrineBridge][Form] Fix performance regression in EntityType

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

A performance regression was introduced in 2336d5c466

Before, the default behaviour of the `DoctrineLoader` was to only fetch the entities selected in the submitted form.

After, the optimization was only performed when the `choice_value` option was set to `null`.
However, the `DoctrineType` sets a non-null default value to `choice_value`, which means that the default behaviour was not using the optimization anymore.

This commit restores the default behaviour (while keeping the previous commit intent).

References:
- https://github.com/symfony/symfony/blob/v2.7.10/src/Symfony/Bridge/Doctrine/Form/ChoiceList/DoctrineChoiceLoader.php#L149
- https://github.com/symfony/symfony/blob/v2.7.10/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php#L216

Commits
-------

64c80a6 [DoctrineBridge][Form] Fix performance regression in EntityType
2016-03-03 13:52:48 +01:00
Kim Laï Trinh
64c80a6791 [DoctrineBridge][Form] Fix performance regression in EntityType 2016-03-03 13:52:47 +01:00
Fabien Potencier
5b79649980 minor #17988 [Form] fix tests added by #16886 (HeahDude)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] fix tests added by #16886

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

Commits
-------

bd22c86 minor [Form] fix tests added by #16886
2016-03-03 13:49:43 +01:00
Fabien Potencier
154eac7733 bug #17595 [HttpKernel] Remove _path from query parameters when fragment is a subrequest (cmenning)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpKernel] Remove _path from query parameters when fragment is a subrequest

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

Prior to 2.3.29, all requests to the ESI fragment path ("/_fragment" by default) would have the "_path" query parameter removed. This held true whether an external proxy (such as Varnish) handled the request as true ESI, or whether the Symfony kernel was mocking ESI behavior and inlining the subrequest.

Once the "_controller" check was added in 2.3.29, the "_path" query parameter was only removed on master requests (such as those coming from an external proxy) and not subrequests, leading to differing behavior in production and development settings.

Commits
-------

c374420 Remove _path from query parameters when fragment is a subrequest and request attributes are already set Added tests for _path removal in FragmentListener
2016-03-03 13:35:04 +01:00
Jakub Zalas
d8c493f076 [FrameworkBundle] Fix a regression in handling absolute and namespaced template paths 2016-03-03 08:16:18 +00:00
Ener-Getick
97c5d27c59 Allow to normalize \Traversable 2016-03-02 21:42:54 +01:00
Jules Pietri
bd22c8618a minor [Form] fix tests added by #16886 2016-03-02 18:06:04 +01:00
Fabien Potencier
38c36c2f67 Merge branch '3.0'
* 3.0:
  fixed CS
  [DomCrawler] Dont use LIBXML_PARSEHUGE by default
  [Filesystem] Reduce complexity of ->remove()
  added tests for non-trusted proxies
  add 'guid' to list of exception to filter out
  Ensure backend slashes for symlinks on Windows systems
  [Filesystem] Try to delete broken symlinks
  fixed tests
  [FrameworkBundle] Test that ObjectNormalizer is registered
2016-03-02 16:26:30 +01:00
Fabien Potencier
897d813f99 Merge branch '2.8' into 3.0
* 2.8:
  fixed CS
  [DomCrawler] Dont use LIBXML_PARSEHUGE by default
  [Filesystem] Reduce complexity of ->remove()
  added tests for non-trusted proxies
  add 'guid' to list of exception to filter out
  Ensure backend slashes for symlinks on Windows systems
  [Filesystem] Try to delete broken symlinks
  fixed tests
  [FrameworkBundle] Test that ObjectNormalizer is registered
2016-03-02 16:25:36 +01:00
Fabien Potencier
ef08c07329 Merge branch '2.7' into 2.8
* 2.7:
  fixed CS
  [DomCrawler] Dont use LIBXML_PARSEHUGE by default
  [Filesystem] Reduce complexity of ->remove()
  added tests for non-trusted proxies
  add 'guid' to list of exception to filter out
  Ensure backend slashes for symlinks on Windows systems
  [Filesystem] Try to delete broken symlinks
  fixed tests
  [FrameworkBundle] Test that ObjectNormalizer is registered
2016-03-02 16:25:29 +01:00
Fabien Potencier
29c616274c fixed CS 2016-03-02 16:25:21 +01:00
Fabien Potencier
0544b1f594 Merge branch '2.3' into 2.7
* 2.3:
  [DomCrawler] Dont use LIBXML_PARSEHUGE by default
  [Filesystem] Reduce complexity of ->remove()
  added tests for non-trusted proxies
  add 'guid' to list of exception to filter out
  Ensure backend slashes for symlinks on Windows systems
  [Filesystem] Try to delete broken symlinks
2016-03-02 16:25:10 +01:00
Fabien Potencier
5b577ddd19 bug #17986 [DomCrawler] Dont use LIBXML_PARSEHUGE by default (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[DomCrawler] Dont use LIBXML_PARSEHUGE by default

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

Because of http://symfony.com/blog/security-release-symfony-2-0-17-released

Commits
-------

fda32f8 [DomCrawler] Dont use LIBXML_PARSEHUGE by default
2016-03-02 16:22:15 +01:00
Craig Menning
c3744202f6 Remove _path from query parameters when fragment is a subrequest and request attributes are already set
Added tests for _path removal in FragmentListener
2016-03-02 08:58:36 -06:00
Nicolas Grekas
fda32f8c43 [DomCrawler] Dont use LIBXML_PARSEHUGE by default 2016-03-02 15:53:47 +01:00
Fabien Potencier
9a4bf1e099 minor #17985 [Filesystem] Reduce complexity of ->remove() (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[Filesystem] Reduce complexity of ->remove()

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

Commits
-------

065acb7 [Filesystem] Reduce complexity of ->remove()
2016-03-02 15:50:41 +01:00
Nicolas Grekas
065acb7fa8 [Filesystem] Reduce complexity of ->remove() 2016-03-02 15:47:46 +01:00
Fabien Potencier
822330580d minor #11655 Failing test for non-trusted proxies (ged15)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #11655).

Discussion
----------

Failing test for non-trusted proxies

Discussion in #11583
@fabpot, should this test fail?

Commits
-------

e0e82bb added tests for non-trusted proxies
2016-03-02 15:42:41 +01:00
ged15
e0e82bb318 added tests for non-trusted proxies 2016-03-02 15:42:41 +01:00
Fabien Potencier
59362a95c2 bug #17668 add 'guid' to list of exception to filter out (garak)
This PR was squashed before being merged into the 2.3 branch (closes #17668).

Discussion
----------

add 'guid' to list of exception to filter out

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

See https://github.com/symfony/symfony/issues/14583#issuecomment-179262543

Commits
-------

0de86ff add 'guid' to list of exception to filter out
2016-03-02 15:32:49 +01:00
Massimiliano Arione
0de86ff282 add 'guid' to list of exception to filter out 2016-03-02 15:32:30 +01:00
Fred Cox
f904a2ba99 Add a Controller function to make it easy to return json
If the serializer component is enabled it is used to generate the json
data, if not the standard `json_encode`  function is used
2016-03-02 16:31:41 +02:00
Fabien Potencier
5c34ae4678 feature #17484 [FrameworkBundle][DX] Add Levenshtein suggesters to AbstractConfigCommand (kix)
This PR was merged into the 3.1-dev branch.

Discussion
----------

[FrameworkBundle][DX] Add Levenshtein suggesters to AbstractConfigCommand

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

It could be helpful to output the best guesses for bundle names and container extension aliases when one could not be found by the exact query.

Perhaps, I could regroup the logic so that it only looks through bundle names if the `Bundle` suffix is present, but I guess this might narrow the use case scope here.

Commits
-------

3c0b0ae Add Levenshtein suggesters to AbstractConfigCommand
2016-03-02 15:18:11 +01:00
Nicolas Grekas
2e9e83e635 bug #17615 Ensure backend slashes for symlinks on Windows systems (cpsitgmbh)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #17615).

Discussion
----------

Ensure backend slashes for symlinks on Windows systems

Resolves: #17614

Commits
-------

d897956 Ensure backend slashes for symlinks on Windows systems
2016-03-02 14:41:11 +01:00
Nicole Cordes
d897956362 Ensure backend slashes for symlinks on Windows systems
Resolves: #17614
2016-03-02 14:40:59 +01:00
Fabien Potencier
bcf0e91a68 feature #17690 [FrameworkBundle] Use canBeEnabled() instead of canBeUnset() for consistency (Ener-Getick)
This PR was squashed before being merged into the 3.1-dev branch (closes #17690).

Discussion
----------

[FrameworkBundle] Use canBeEnabled() instead of canBeUnset() for consistency

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/13703
| License       | MIT

I'm not sure if we should consider this as a bug fix or as a new feature.

Commits
-------

39723c5 [FrameworkBundle] Use canBeEnabled() instead of canBeUnset() for consistency
2016-03-02 14:24:23 +01:00
Ener-Getick
39723c5126 [FrameworkBundle] Use canBeEnabled() instead of canBeUnset() for consistency 2016-03-02 14:24:22 +01:00
Nicolas Grekas
36cb46a71a bug #17626 Try to delete broken symlinks (IchHabRecht)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #17626).

Discussion
----------

Try to delete broken symlinks

If you delete the target of a symlink (at least on Windows systems) you
don't get the kind of the target anymore (obviously). Therefore it might
happen that a broken symlink to a directory should be removed with
unlink() which fails. This patch adds another check for a broken symlink
and tries to remove with rmdir() before throwing an exception. It helps
to clean up test folders on Windows systems (so already proofed by the
existing tests).

Commits
-------

8442ab1 [Filesystem] Try to delete broken symlinks
2016-03-02 14:09:42 +01:00
Nicole Cordes
8442ab1b99 [Filesystem] Try to delete broken symlinks
If you delete the target of a symlink (at least on Windows systems) you
don't get the kind of the target anymore (obviously). Therefore it might
happen that a broken symlink to a directory should be removed with
unlink() which fails. This patch adds another check for a broken symlink
and tries to remove with rmdir() before throwing an exception. It helps
to clean up test folders on Windows systems (so already proofed by the
existing tests).
2016-03-02 14:09:33 +01:00
Fabien Potencier
9851928f9b fixed tests 2016-03-02 13:43:59 +01:00