Commit Graph

20319 Commits

Author SHA1 Message Date
Tobias Schultze
d1c8c5d22f [PropertyAccess] unify and fix doc 2015-02-21 16:36:02 +01:00
Nicolas Grekas
c71e2d529d [FrameworkBundle] move Routing dep up to make tests pass 2015-02-21 15:54:50 +01:00
Tobias Schultze
bbd4a1e2ce Merge branch '2.6' into 2.7
Conflicts:
	src/Symfony/Component/PropertyAccess/PropertyAccessor.php
	src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php
2015-02-21 14:05:27 +01:00
Tobias Schultze
f9ddaebe09 [PropertyAccess] use data provider for isReadable/isWritable tests 2015-02-21 13:54:33 +01:00
Tobias Schultze
eabad39dd5 Merge branch '2.3' into 2.6
Conflicts:
	src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig
	src/Symfony/Component/PropertyAccess/PropertyAccessor.php
	src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php
	src/Symfony/Component/Validator/Tests/Mapping/Loader/XmlFileLoaderTest.php
2015-02-21 13:49:08 +01:00
Fabien Potencier
9a4f3e134b feature #13398 [PhpUnit] new PhpUnit bridge (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[PhpUnit] new PhpUnit bridge

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

From the proposed README:

PHPUnit Bridge
==============

Provides utilities for PHPUnit, especially user deprecation notices management.

It comes with the following features:

 * disable the garbage collector;
 * auto-register `class_exists` to load Doctrine annotations;
 * print a user deprecation notices summary at the end of the test suite.

Handling user deprecation notices is sensitive to the SYMFONY_DEPRECATIONS_HELPER
environment variable. This env var configures 3 behaviors depending on its value:

 * when set to `strict`, all but legacy-tagged deprecation notices will make tests
   fail. This is the recommended mode for best forward compatibility.
 * `weak` on the contrary will make tests ignore all deprecation notices.
   This is the recommended mode for legacy projects that must use deprecated
   interfaces for backward compatibility reasons.
 * any other value will respect the current error reporting level.

All three modes will display a summary of deprecation notices at the end of the
test suite, split in two groups:

 * **Legacy** deprecation notices denote tests that explicitly test some legacy
   interfaces. In all 3 modes, deprecation notices triggered in a legacy-tagged
   test do never make a test fail. There are four ways to mark a test as legacy:
    - make its class start with the `Legacy` prefix;
    - make its method start with `testLegacy`;
    - make its data provider start with `provideLegacy` or `getLegacy`;
    - add the `@group legacy` annotation to its class or method.
 * **Remaining/Other** deprecation notices are all other (non-legacy)
   notices, grouped by message, test class and method.

Usage
-----

Add this bridge to the `require-dev` section of your composer.json file
(not in `require`) with e.g.
`composer require --dev "symfony/phpunit-bridge"`.

When running `phpunit`, you will see a summary of deprecation notices at the end
of the test suite.

Deprecation notices in the **Remaining/Other** section need some thought.
You have to decide either to:

 * update your code to not use deprecated interfaces anymore, thus gaining better
   forward compatibility;
 * or move them to the **Legacy** section (by using one of the above way).

After reviewing them, you should silence deprecations in the **Legacy** section
if you think they are triggered by tests dedicated to testing deprecated
interfaces. To do so, add the following line at the beginning of your legacy
test case or in the `setUp()` method of your legacy test class:
`$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);`

Last but not least, you should then configure your C.I. to the reporting mode
that is appropriated to your project by setting SYMFONY_DEPRECATIONS_HELPER to
`strict`, `weak` or empty. It is recommended to start with `weak` mode, upgrade
your code as described above, then when the *Remaining/Other* sections are empty,
move to `strict` to keep forward compatibility on the long run.

Commits
-------

acac734 [PhpUnitBridge] new bridge for testing with PHPUnit
2015-02-21 09:37:54 +01:00
Fabien Potencier
2d6fbc5984 minor #13738 [Security] Fix expectation in a test. (jakzal)
This PR was merged into the 2.6 branch.

Discussion
----------

[Security] Fix expectation in a test.

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

This is related to #13466, which worked perfectly fine in 2.3. It breaks in 2.6 since we've changed the way we check for master request.

Commits
-------

8299a44 [Security] Fix expectation in a test.
2015-02-21 09:14:03 +01:00
Guilherme Blanco
a10844587b Optimize EntityType by only loading choices for values in the same way that EntityLoader customization does (if you provide a query_builder). 2015-02-21 09:10:28 +01:00
Fabien Potencier
7b9bc804e7 minor #13742 [PropertyAccess] refactor type checks (Tobion)
This PR was merged into the 2.3 branch.

Discussion
----------

[PropertyAccess] refactor type checks

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

#13735 for 2.3

Commits
-------

9cacecb [PropertyAccess] the property path constructor already implements the type check
4e11c07 [PropertyAccess] refactor type checks to remove duplicate logic
2015-02-21 09:06:16 +01:00
WouterJ
3032014fd9 Enforce UTF-8 charset for core controllers 2015-02-20 11:18:53 +01:00
Nikita Starshinov
87800ae47e minor #13377 [Console] Change greater by greater or equal for isFresh in FileResource 2015-02-19 17:18:47 +03:00
Tobias Schultze
9cacecbf79 [PropertyAccess] the property path constructor already implements the type check 2015-02-19 13:40:39 +01:00
Tobias Schultze
4e11c0710b [PropertyAccess] refactor type checks to remove duplicate logic
and thus improve performance
2015-02-19 13:30:42 +01:00
Jakub Zalas
8299a44c27 [Security] Fix expectation in a test. 2015-02-19 09:39:13 +00:00
Fabien Potencier
19aa6dcf65 minor #13737 [HttpFoundation] Fix getHost and getPort functions in docblock (jwpage)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #13737).

Discussion
----------

[HttpFoundation] Fix getHost and getPort functions in docblock

This fixes the incorrect  references to the functions `getClientHost` and `getClientPort` in the docblock for Request::setTrustedHeaderName.

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

Commits
-------

1ae9f9c [HttpFoundation] Fix getHost and getPort functions in docblock
2015-02-19 09:08:04 +01:00
Johnson Page
1ae9f9ca0f [HttpFoundation] Fix getHost and getPort functions in docblock 2015-02-19 09:08:04 +01:00
Christophe Coevoet
b7aa171d58 Fix the toolbar JS for IE
- fix the binding of listeners on XMLHttpRequest to always use the
  addEventListener method. It does not make sense to change it to
  attachEvent as it is about binding listeners on DOM elements.
- fix the feature detection for the event binding on DOM elements:
    - the attachEvent and addEventListener methods are on DOM elements,
      not on the document object
    - the standard method should be preferred in IE versions supporting
      both methods
- avoid JS errors when XMLHttpRequest is not defined by avoiding to
  override its open method when the object is not there (old IE versions
  will still not intercept ajax calls though)
2015-02-18 12:11:00 +01:00
Nicolas Grekas
acac734d08 [PhpUnitBridge] new bridge for testing with PHPUnit 2015-02-18 11:38:04 +01:00
Fabien Potencier
e759bc3836 minor #13725 Add phpdoc for SecurityFactoryInterface::getPosition (adrienbrault)
This PR was submitted for the 2.7 branch but it was merged into the 2.3 branch instead (closes #13725).

Discussion
----------

Add phpdoc for SecurityFactoryInterface::getPosition

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

Commits
-------

bcb2e09 Add phpdoc for SecurityFactoryInterface::getPosition
2015-02-18 11:13:53 +01:00
Adrien Brault
bcb2e09dc1 Add phpdoc for SecurityFactoryInterface::getPosition 2015-02-18 11:13:53 +01:00
Fabien Potencier
5843745258 minor #13726 FilesLoader - fix git conflict (keradus)
This PR was merged into the 2.3 branch.

Discussion
----------

FilesLoader - fix git conflict

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

Commits
-------

5c9835f FilesLoader - fix git conflict
2015-02-18 11:12:30 +01:00
Dariusz Ruminski
5c9835f230 FilesLoader - fix git conflict 2015-02-18 08:07:05 +01:00
Nicolas Grekas
9e7b10915b minor #13722 [VarDumper] Ignore /vendor/ directory in git (lyrixx)
This PR was merged into the 2.6 branch.

Discussion
----------

[VarDumper] Ignore /vendor/ directory in git

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

Commits
-------

cbec76c [VarDumper] Ignore /vendor/ directory in git
2015-02-17 21:47:41 +01:00
Grégoire Pineau
cbec76c099 [VarDumper] Ignore /vendor/ directory in git 2015-02-17 17:54:47 +01:00
Fabien Potencier
1cc1d8d12e minor #13716 [Console] make an assertion more precise in testGetOptionDefaults (nanocom)
This PR was merged into the 2.3 branch.

Discussion
----------

[Console] make an assertion more precise in testGetOptionDefaults

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

Minor fix, the default values expected in the test were not exactly the same as what is actually returned.

Commits
-------

06a42e1 [Console] fix assertion in testGetOptionDefaults
2015-02-17 17:18:55 +01:00
Fabien Potencier
69f901fd89 minor #13718 Small syntax fix in CHANGELOG (WouterJ)
This PR was merged into the 2.6 branch.

Discussion
----------

Small syntax fix in CHANGELOG

Markdown list items have to start with a space (both render correctly, but this is the standard and consistent with the rest of the file).

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

Commits
-------

e45d514 Small syntax fix
2015-02-17 17:18:28 +01:00
Wouter J
e45d514bfc Small syntax fix 2015-02-17 14:25:32 +01:00
Arnaud Kleinpeter
06a42e12e2 [Console] fix assertion in testGetOptionDefaults
The default values expected n the test were not exactly the same as what is actually returned.
2015-02-17 14:04:06 +01:00
Fabien Potencier
a630d87d57 bug #13711 [FrameworkBundle] Check if templating is enabled. (jakzal)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] Check if templating is enabled.

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

templating can be disabled.

Commits
-------

c75b276 [FrameworkBundle] Check if templating is enabled.
2015-02-17 12:55:01 +01:00
Jakub Zalas
c75b276a17 [FrameworkBundle] Check if templating is enabled. 2015-02-17 11:00:18 +00:00
Fabien Potencier
42e6540224 bug #13693 [HttpKernel] Fixed DumpDataCollector: dump.name for Windows file paths (King2500)
This PR was merged into the 2.6 branch.

Discussion
----------

[HttpKernel] Fixed DumpDataCollector: dump.name for Windows file paths

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

When using VarDumper on Windows files, the automatic "dump.name" generated wrong names.
`dump()` call in:

```
F:\HtDocs\demo\src\Acme\Controller\DemoController.php
```

Displayed:
```
dump()
in :\HtDocs\demo\src\Acme\Controller\DemoController.php line 35
```
Expected result is:
```
dump()
in DemoController.php line 35
```

The existing code in line 118 didn't use the variable from the previous line.

Commits
-------

a025dea Fix dump.name for Windows file paths
2015-02-17 09:22:34 +01:00
Javier Spagnoletti
9f9f2300d7 [2.3] [HttpFoundation] fixed param order for Nginx's x-accel-redirect
| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | kinda
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #13502
| License       | MIT
| Doc PR        | n/a

fixes #13502

Inverted path and location directives for x-accel-redirect header

Before:
```proxy_set_header X-Accel-Mapping /internal/=/var/www/example.com/```

After:
```proxy_set_header X-Accel-Mapping /var/www/example.com/=/internal/```
2015-02-16 14:04:09 -03:00
Fabien Potencier
31bfc9508b minor #13586 [DX][Config] Changed return type definition for some methods of NodeDefinition (Strate)
This PR was submitted for the 2.7 branch but it was merged into the 2.3 branch instead (closes #13586).

Discussion
----------

[DX][Config] Changed return type definition for some methods of NodeDefinition

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

Discussed in #12280

Commits
-------

89ca585 Changed return type definition for some methods of NodeDefinition
2015-02-16 10:51:32 +01:00
Artur Eshenbrener
89ca585185 Changed return type definition for some methods of NodeDefinition 2015-02-16 10:51:32 +01:00
Fabien Potencier
e18d2ad80d minor #13645 fixed possible race condition when creating a directory (fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

fixed possible race condition when creating a directory

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

Commits
-------

8542866 fixed possible race condition when creating a directory
2015-02-16 10:48:41 +01:00
Fabien Potencier
ee47901456 bug #13618 [PropertyAccess] Fixed invalid feedback -> foodback singularization (WouterJ)
This PR was merged into the 2.3 branch.

Discussion
----------

[PropertyAccess] Fixed invalid feedback -> foodback singularization

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

Commits
-------

bc50125 Fixed invalid feedback -> foodback singularization
2015-02-16 10:25:34 +01:00
Fabien Potencier
ce009624aa minor #13684 Fixes event listener attaching error (bartru)
This PR was merged into the 2.6 branch.

Discussion
----------

Fixes event listener attaching error

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

Commits
-------

34b489d Fixes event listener attaching error
2015-02-16 10:22:28 +01:00
Fabien Potencier
f44eef4525 minor #13672 [FrameworkBundle] Enable assets by default (jakzal)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] Enable assets by default

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

This should make the tests pass again.

There are two templates from TwigBundle that are used with functional tests, and require the asset() helper:
* src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception_full.html.twig
* src/Symfony/Bundle/TwigBundle/Resources/views/layout.html.twig

Commits
-------

f5c0a69 [FrameworkBundle] Enable assets by default.
2015-02-16 10:20:28 +01:00
Fabien Potencier
fd0fd31ac3 minor #13688 [WebProfilerBundle] fix html lint on (other) empty onclick (jrobeson)
This PR was merged into the 2.6 branch.

Discussion
----------

[WebProfilerBundle] fix html lint on (other) empty onclick

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

*This is for the empty onclick that appeared in 2.6*

The request collector has an empty onclick="" attribute
when {{ link }} isn't available. This tends to happen when
rendering the debug toolbar.

Commits
-------

58bd16c [WebProfilerBundle] fix html lint on (other) empty onclick
2015-02-16 10:15:54 +01:00
Fabien Potencier
def4fd55e7 minor #13687 [WebProfilerBundle] fix html lint on empty onclick (jrobeson)
This PR was merged into the 2.3 branch.

Discussion
----------

[WebProfilerBundle] fix html lint on empty onclick

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

The request collector has an empty onclick="" attribute
when {{ link }} isn't available. This tends to happen when
rendering the debug toolbar.

Commits
-------

a3a2f15 [WebProfilerBundle] fix html linting on empty onclick
2015-02-16 10:14:57 +01:00
Fabien Potencier
3bbca21630 minor #13692 [Filesystem] Improve exception message for copy method (King2500)
This PR was submitted for the 2.6 branch but it was merged into the 2.7 branch instead (closes #13692).

Discussion
----------

[Filesystem] Improve exception message for copy method

see diff

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

Commits
-------

021206c [Filesystem] Improve exception message for copy method
2015-02-16 10:13:40 +01:00
Thomas Schulz
021206c0ac [Filesystem] Improve exception message for copy method 2015-02-16 10:13:25 +01:00
Fabien Potencier
e09c3cd52c bug #13685 [WebProfilerBundle] Fix for broken profiler layout (kbond)
This PR was merged into the 2.6 branch.

Discussion
----------

[WebProfilerBundle] Fix for broken profiler layout

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

With the latest 2.6 the profiler layout is broken:

![screen](https://cloud.githubusercontent.com/assets/127811/6192633/17f7f192-b382-11e4-90c9-2595fd6079af.png)

I am not sure what broke it...

Commits
-------

af0ea97 Fix for broken profiler layout
2015-02-16 10:11:35 +01:00
Fabien Potencier
90b028bea7 minor #13691 [Console] Added a little explaination about Command#interact() (WouterJ)
This PR was squashed before being merged into the 2.3 branch (closes #13691).

Discussion
----------

[Console] Added a little explaination about Command#interact()

This has confused some long time Symfony users recently: https://twitter.com/jmolivas/status/566283453264850945

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

Commits
-------

38e7b72 [Console] Added a little explaination about Command#interact()
2015-02-16 10:09:41 +01:00
Wouter J
38e7b72371 [Console] Added a little explaination about Command#interact() 2015-02-16 10:09:39 +01:00
Fabien Potencier
f18280923b minor #13700 [Finder] Fixed typo in phpdoc comment (date range) (King2500)
This PR was merged into the 2.3 branch.

Discussion
----------

[Finder] Fixed typo in phpdoc comment (date range)

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

See changes

Commits
-------

9aece5a [Finder] Fixed typo in phpdoc comment
2015-02-16 10:07:56 +01:00
Fabien Potencier
4c767e64b2 feature #13615 [FrameworkBundle] Made ServerParams a service (rpg600)
This PR was submitted for the 2.5 branch but it was merged into the 2.7 branch instead (closes #13615).

Discussion
----------

[FrameworkBundle] Made ServerParams a service

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

Since 2.5 we can inject the request stack in ServerParams (see #10912).
Now when a request is handled by HttpFoundationRequestHandler, the content length will be fetched via the current request and not the super global anymore.

Commits
-------

455b714 [FrameworkBundle] Made ServerParams a service
2015-02-16 10:06:55 +01:00
rpg600
455b71419d [FrameworkBundle] Made ServerParams a service 2015-02-16 10:06:54 +01:00
Fabien Potencier
baf13c1e32 minor #13701 [2.7] [FrameworkBundle] bugfix in configuration for assets (phansys)
This PR was merged into the 2.7 branch.

Discussion
----------

[2.7] [FrameworkBundle] bugfix in configuration for assets

| 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

If both of configurations are defined, the exception breaks because it isn't
defined properly (missing backslash in FQCN for ```\LogicException```).
Also, the message was wrong (it's referred to "templating.templating" instead of
"framework.templating").

Commits
-------

3b4c23f [2.7] [FrameworkBundle] bugfix in configuration for assets
2015-02-16 10:04:36 +01:00
Javier Spagnoletti
3b4c23fa16 [2.7] [FrameworkBundle] bugfix in configuration for assets
| 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

If both of configurations are defined, the exception is break because it isn't
defined properly (missing backslash in FQCN for ```\LogicException```).
Also, the message was wrong (it's referred to "templating.templating" instead of
"framework.templating").
2015-02-15 18:48:32 -03:00