Commit Graph

18508 Commits

Author SHA1 Message Date
Nicolas Grekas
7bb768dd2a [HttpKernel] fix composer.json 2014-09-30 09:22:58 +02:00
Fabien Potencier
a8888be8b2 minor #12076 [FrameworkBundle] remove invalid tests (xabbuh)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[FrameworkBundle] remove invalid tests

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

With #12046, the `getLocale()` method isn't overriden anymore by the `Translator` from the FrameworkBundle, but the locale is set by the new `TranslatorListener`. Therefore, the tests ensuring the old behavior are removed.

Commits
-------

80d52c7 remove invalid tests
2014-09-29 22:00:57 +02:00
Fabien Potencier
d0244833e9 minor #12077 [DebugBundle] fix dev dependencies (xabbuh)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[DebugBundle] fix dev dependencies

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

Commits
-------

3454e59 [DebugBundle] fix dev dependencies
2014-09-29 21:59:32 +02:00
Fabien Potencier
4b6776e801 feature #12045 [Debug] add some file link format handling (nicolas-grekas)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[Debug] add some file link format handling

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

Commits
-------

c6923af [Debug] add some file link format handling
2014-09-29 16:48:41 +02:00
Christian Flothmann
3454e59ca2 [DebugBundle] fix dev dependencies 2014-09-29 16:05:32 +02:00
Christian Flothmann
80d52c73dc remove invalid tests
With #12046, the `getLocale()` method isn't overriden anymore by the
`Translator` from the FrameworkBundle, but the locale is set by the
new `TranslatorListener`. Therefore, the tests ensuring the old
behavior are removed.
2014-09-29 15:13:53 +02:00
Fabien Potencier
f3ef9d2009 minor #12072 [DependencyInjection] Removed unreachable code (unkind)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[DependencyInjection] Removed unreachable code

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

According to undefined $e, this is an unreachable code. As I can see, circular references are handled by parent method.

Commits
-------

ecedea2 [DependencyInjection] Removed unreachable code
2014-09-29 13:38:42 +02:00
Fabien Potencier
2a8fed6033 minor #12074 [DX] Moved Security constants to a final class instead of a long named interface (iltar)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[DX] Moved Security constants to a final class instead of a long named interface

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

This PR is based on feedback from the documentation repository. The DX suggestion was to rename the new `SecuritySessionStorageInterface` to `Security`. This would make it easier to use the constants before 2.6 is released. In this PR I have also update all usages of this constant because an open PR is now merged which used those constants.

List of changes:
 - SecurityBundle, usage of constants
 - Security Component (core & http), usage of constants
 - Tests, usage of constants
 - Added a test to verify the sync from `Security` to `SecurityContextInterface` for BC purposes

Commits
-------

b23084a [DX] Moved constants to a final class
2014-09-29 12:44:23 +02:00
Iltar van der Berg
b23084abb9 [DX] Moved constants to a final class 2014-09-29 09:38:25 +02:00
Nikita Konstantinov
ecedea2262 [DependencyInjection] Removed unreachable code 2014-09-28 22:12:33 +04:00
Fabien Potencier
1c240067f4 fixed deps 2014-09-28 18:15:31 +02:00
Fabien Potencier
e4b2576610 Merge branch '2.5'
* 2.5:
  fixed deps
  [Debug] fixed class lookup when using PSR-0 with a target dir
  fixed standalone tests
  fixed standalone tests
  [Validator] fixed component standalone tests
  fixed standalone component tests depending on Validator and Form
  fixed some composer.json to make standalone component tests pass
  [SecurityBundle] fixed tests when used in standalone
2014-09-28 18:08:29 +02:00
Fabien Potencier
a4217c3ee0 fixed deps 2014-09-28 17:56:11 +02:00
Fabien Potencier
8d75b4b56f Merge branch '2.4' into 2.5
* 2.4:
  [Debug] fixed class lookup when using PSR-0 with a target dir
  fixed standalone tests
  fixed standalone tests
  [Validator] fixed component standalone tests
  fixed standalone component tests depending on Validator and Form
  fixed some composer.json to make standalone component tests pass
  [SecurityBundle] fixed tests when used in standalone

Conflicts:
	src/Symfony/Component/HttpKernel/Tests/Bundle/BundleTest.php
	src/Symfony/Component/Validator/composer.json
2014-09-28 17:22:14 +02:00
Fabien Potencier
cff4bbbf5d minor #12071 [Debug] fixed class lookup when using PSR-0 with a target dir (fabpot)
This PR was merged into the 2.4 branch.

Discussion
----------

[Debug] fixed class lookup when using PSR-0 with a target dir

| 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

Commits
-------

f5b38ec [Debug] fixed class lookup when using PSR-0 with a target dir
2014-09-28 17:18:49 +02:00
Fabien Potencier
f5b38ec995 [Debug] fixed class lookup when using PSR-0 with a target dir 2014-09-28 17:03:21 +02:00
Fabien Potencier
3a1661bb38 fixed standalone tests 2014-09-28 17:02:53 +02:00
Fabien Potencier
b6bbe8bc25 fixed standalone tests 2014-09-28 15:40:52 +02:00
Fabien Potencier
23cdf568ac feature #12006 Expression language extensibility (fabpot)
This PR was merged into the 2.6-dev branch.

Discussion
----------

Expression language extensibility

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

The way we can add functions to an ExpressionLanguage instance is by using inheritance. #10512 tries to make the expression language in the routing flexible but using inheritance won't work when several bundles want to add functions.

So, this PR takes another approach to solve the problem globally.

Todo:

 * [x] add some more tests
 * [ ] add some docs

Commits
-------

7c24188 [FrameworkBundle] added a compiler pass for expression language providers
4195a91 [Routing] added support for custom expression language functions
1a39046 [Security] added support for custom expression language functions
79bcd52b [DependencyInjection] added support for custom expression language functions
184742c [ExpressionLanguage] added ExpressionFunction and ExpressionFunctionProviderInterface
2014-09-28 13:22:15 +02:00
Fabien Potencier
158939e8fe [Validator] fixed component standalone tests 2014-09-27 23:11:35 +02:00
Fabien Potencier
09a3c4c956 fixed standalone component tests depending on Validator and Form 2014-09-27 22:43:02 +02:00
Fabien Potencier
5c3cea59ba fixed some composer.json to make standalone component tests pass 2014-09-27 22:16:29 +02:00
Fabien Potencier
de780e88fd Merge branch '2.3' into 2.4
* 2.3:
  [SecurityBundle] fixed tests when used in standalone
2014-09-27 21:38:45 +02:00
Fabien Potencier
98b2db5a1d [SecurityBundle] fixed tests when used in standalone 2014-09-27 21:29:57 +02:00
Fabien Potencier
4e0021b533 [Security] fixed fatal error 2014-09-27 12:02:32 +02:00
Fabien Potencier
2763227a47 fixed tests 2014-09-27 11:38:21 +02:00
Fabien Potencier
d02addba30 minor #12049 [Security] Fix BC break introduced in #10694 (romainneutron)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[Security] Fix BC break introduced in #10694

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

Not sure about this fix, @stof 'ing welcome

Commits
-------

b2183aa [Security] Fix BC break introduces in #10694
2014-09-27 11:36:45 +02:00
Fabien Potencier
db3e451d83 Merge branch '2.5'
* 2.5:
  Make Doctrine's dependency injection test less fragile.
  [Finder] [Iterator] Make the tests less fragile
  [Form][DateTime] Propagate invalid_message & invalid_message parameters to date & time sub widgets
  Fix expression language in the container when using the "container" variable

Conflicts:
	src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php
2014-09-27 10:36:04 +02:00
Fabien Potencier
aa5179b8c8 Merge branch '2.4' into 2.5
* 2.4:
  Make Doctrine's dependency injection test less fragile.
  [Finder] [Iterator] Make the tests less fragile
  [Form][DateTime] Propagate invalid_message & invalid_message parameters to date & time sub widgets
  Fix expression language in the container when using the "container" variable
2014-09-27 10:35:39 +02:00
Fabien Potencier
e768f37685 Merge branch '2.3' into 2.4
* 2.3:
  Make Doctrine's dependency injection test less fragile.
  [Finder] [Iterator] Make the tests less fragile
  [Form][DateTime] Propagate invalid_message & invalid_message parameters to date & time sub widgets
2014-09-27 10:35:25 +02:00
Fabien Potencier
2ecbf87aa3 minor #12058 [Doctrine][DependencyInjection] Make a test less fragile. (AlphaStream)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #12058).

Discussion
----------

[Doctrine][DependencyInjection] Make a test less fragile.

The test checks that a few items are ordered according to the value of their 'priority' attribute. However, a few of the items have the same value of this attribute. RegisterEventListenersAndSubscribersPass doesn't use a stable sorting, yet the test asserts that items that are 'equal' shall go in the original order. Modified so that the order of the original items is not checked.

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

Commits
-------

f1ae970 Make Doctrine's dependency injection test less fragile.
2014-09-27 09:50:52 +02:00
Alex Bakhturin
f1ae970a4e Make Doctrine's dependency injection test less fragile.
[Doctrine][DependencyInjection] The test checks that a few items are ordered according to the value of their 'priority' attribute. However, a few of the items have the same value of this attribute. RegisterEventListenersAndSubscribersPass doesn't use a stable sorting, yet the test asserts that items that are 'equal' shall go in the original order. Modified so that the order of the original items is not checked.
2014-09-27 09:50:52 +02:00
Fabien Potencier
b5572885ef feature #12046 fixed translator locale when dealing with sub-requests (fabpot)
This PR was merged into the 2.6-dev branch.

Discussion
----------

fixed translator locale when dealing with sub-requests

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

This fixes the (edge) case where the locale of a sub-requests is different from the locale of the master request. The listener synchronizes the translator locale with the one from the request.

Commits
-------

0e65af2 fixed translator locale when dealing with sub-requests
2014-09-26 17:59:47 +02:00
Nicolas Grekas
c6923afcd0 [Debug] add some file link format handling 2014-09-26 16:49:32 +02:00
Fabien Potencier
c71ee5f14c minor #12047 [VarDumper] edge case fixes (nicolas-grekas)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[VarDumper] edge case fixes

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

Commits
-------

10943d9 [VarDumper] edge case fixes
2014-09-26 16:09:01 +02:00
Nicolas Grekas
10943d9c6d [VarDumper] edge case fixes 2014-09-26 13:31:30 +02:00
Romain Neutron
b2183aa2b5 [Security] Fix BC break introduces in #10694 2014-09-26 11:21:57 +02:00
Fabien Potencier
0e65af286d fixed translator locale when dealing with sub-requests 2014-09-26 09:16:25 +02:00
Fabien Potencier
181e460984 minor #10241 [DependencyInjection] made some perf improvements (fabpot)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[DependencyInjection] made some perf improvements

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

This PR optimizes the creation of dumped containers drastically (thanks @jpauli for the hint).

The Container class generated by the PHP dumper does not include the `getDefaultParameters()` method anymore. It does not seem like a big deal to me as I fail to see a use case where someone would override this method.

Commits
-------

e1a3ef8 [DependencyInjection] made some perf improvements
2014-09-26 07:01:55 +02:00
Fabien Potencier
55b35a2a64 minor #12028 [Finder] [Iterator] Make the tests less fragile (AlphaStream)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #12028).

Discussion
----------

[Finder] [Iterator] Make the tests less fragile

Modified the Iterator tests so that they assert only on what's actually being tested. In particular, the tests were checking the order of the files [that were created virtually simultaneously] after sorting them by date. This change is a part of the effort to make Symfony successfully pass tests on HHVM

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

Commits
-------

10f9135 [Finder] [Iterator] Make the tests less fragile
2014-09-26 06:59:53 +02:00
Alex Bakhturin
10f9135f63 [Finder] [Iterator] Make the tests less fragile 2014-09-26 06:59:53 +02:00
Fabien Potencier
ff17493029 minor #12042 Update the Controller to be consistent (grifx)
This PR was merged into the 2.6-dev branch.

Discussion
----------

Update the Controller to be consistent

We are always using $this->container->get() and now we're using the short-cut sometimes to access to a service.
It could be nice to stay with $this->container->get() to stay consistent and for those who copy and paste the Controller to create a ControllerUtils, they wont have to change it (in fact neither ControllerUtils::get() nor ControllerUtils::has() exists).
See: http://www.whitewashing.de/2013/06/27/extending_symfony2__controller_utilities.html

Commits
-------

707623c Update the Controller to be consistent
2014-09-26 06:57:05 +02:00
grifx
707623cb16 Update the Controller to be consistent
We are always using $this->container->get() and now we're using the short-cut sometimes to access to a service.
It could be nice to stay with $this->container->get(), so for those who copy and paste the Controller to create a ControllerUtils, they wont have to change it (in fact neither ControllerUtils::get() nor ControllerUtils::has() exists).
See: http://www.whitewashing.de/2013/06/27/extending_symfony2__controller_utilities.html
2014-09-26 11:35:02 +10:00
Fabien Potencier
c06e7546ad feature #7142 [2.3] Update src/Symfony/Component/HttpFoundation/Request.php (datibbaw)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[2.3] Update src/Symfony/Component/HttpFoundation/Request.php

This makes `getContentType()` work when a regular form is submitted. It would return `"form"`

Commits
-------

c81ec4d Update src/Symfony/Component/HttpFoundation/Request.php
2014-09-25 21:49:28 +02:00
Fabien Potencier
c788b217eb minor #12041 [Security] fixed typo in method call (jdreesen)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[Security] fixed typo in method call

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

Commits
-------

1226dc1 [Security] fix typo
2014-09-25 21:47:46 +02:00
Jacob Dreesen
1226dc121f [Security] fix typo 2014-09-25 21:08:05 +02:00
Fabien Potencier
37711c74c1 feature #11453 [Config] Allow extra hint in exception message (WouterJ)
This PR was squashed before being merged into the 2.6-dev branch (closes #11453).

Discussion
----------

[Config] Allow extra hint in exception message

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

Commits
-------

3062b3e [Config] Allow extra hint in exception message
2014-09-25 20:11:49 +02:00
WouterJ
3062b3ef96 [Config] Allow extra hint in exception message 2014-09-25 20:11:47 +02:00
Fabien Potencier
7c24188f02 [FrameworkBundle] added a compiler pass for expression language providers 2014-09-25 19:08:39 +02:00
Fabien Potencier
4195a91d46 [Routing] added support for custom expression language functions 2014-09-25 19:08:39 +02:00