Commit Graph

15319 Commits

Author SHA1 Message Date
Fabien Potencier 51c6d7696c Merge branch '2.3'
* 2.3:
  fixed phpdoc
  Fix some annotates
  [FrameworkBundle] made sure that the debug event dispatcher is used everywhere
  [HttpKernel] remove unneeded strtoupper
  updated the composer install command to reflect changes in Composer

Conflicts:
	src/Symfony/Component/Serializer/Encoder/XmlEncoder.php
2013-09-19 11:47:34 +02:00
Fabien Potencier a1cfdb421a fixed phpdoc 2013-09-19 11:47:13 +02:00
Fabien Potencier 88cef41560 Merge branch '2.2' into 2.3
* 2.2:
  Fix some annotates
  [FrameworkBundle] made sure that the debug event dispatcher is used everywhere
  [HttpKernel] remove unneeded strtoupper
  updated the composer install command to reflect changes in Composer

Conflicts:
	src/Symfony/Component/Console/Application.php
	src/Symfony/Component/Console/Command/Command.php
	src/Symfony/Component/Console/Input/InputDefinition.php
	src/Symfony/Component/CssSelector/Node/CombinedSelectorNode.php
	src/Symfony/Component/Form/Form.php
	src/Symfony/Component/HttpKernel/Debug/ErrorHandler.php
	src/Symfony/Component/HttpKernel/DependencyInjection/RegisterListenersPass.php
	src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterListenersPassTest.php
	src/Symfony/Component/Locale/Locale.php
	src/Symfony/Component/Locale/README.md
	src/Symfony/Component/Locale/Stub/DateFormat/FullTransformer.php
2013-09-19 11:45:20 +02:00
Fabien Potencier 7597f7ea55 merged branch bronze1man/pr-2.2-annotate (PR #9067)
This PR was squashed before being merged into the 2.2 branch (closes #9067).

Discussion
----------

Fix some annotates

| 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

send those fixes in branch 2.2
This pr includes #9065

Commits
-------

de39bd5 Fix some annotates
2013-09-19 11:36:06 +02:00
bronze1man de39bd5433 Fix some annotates 2013-09-19 11:36:05 +02:00
Fabien Potencier 1843b82015 merged branch fabpot/event-dispatcher-debug (PR #9068)
This PR was merged into the 2.2 branch.

Discussion
----------

[FrameworkBundle] made sure that the debug event dispatcher is used everywhere

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

Commits
-------

f65a526 [FrameworkBundle] made sure that the debug event dispatcher is used everywhere
2013-09-19 11:03:30 +02:00
Nicolas Bastien 6981669e08 Remove unused use statement 2013-09-19 10:36:42 +02:00
Tobias Schultze a33cc51648 [Security] remove unused logger 2013-09-18 18:54:35 +02:00
Fabien Potencier 510960ed31 merged branch Tobion/routerlistener-strtoupper (PR #9070)
This PR was merged into the 2.2 branch.

Discussion
----------

[HttpKernel] remove unneeded strtoupper

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

It is already uppercased by the exception itself: https://github.com/symfony/symfony/blob/2.2/src/Symfony/Component/Routing/Exception/MethodNotAllowedException.php#L32

Commits
-------

0b6519f [HttpKernel] remove unneeded strtoupper
2013-09-18 18:04:45 +02:00
Fabien Potencier f65a526e7d [FrameworkBundle] made sure that the debug event dispatcher is used everywhere 2013-09-18 17:45:40 +02:00
Tobias Schultze 62de9c1f19 [Security] fix typo 2013-09-18 17:42:47 +02:00
Tobias Schultze 0b6519fc0e [HttpKernel] remove unneeded strtoupper 2013-09-18 17:29:46 +02:00
Fabien Potencier 9783decb13 merged branch alexpods/patch-4 (PR #9066)
This PR was merged into the master branch.

Discussion
----------

[Security] Delete unnecessary "use" statements

 Delete unnecessary "use" statements in SimpleAuthenticationProvider

Commits
-------

82de3ba [Security] [SimpleAuthenticationProvider] Delete unnecessary "use" statements
2013-09-18 16:35:01 +02:00
Fabien Potencier b44bc0e2c2 merged branch fabpot/security-split (PR #9064)
This PR was merged into the master branch.

Discussion
----------

[Security] Split the component into 3 sub-components Core, ACL, HTTP

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

The rationale behind this PR is to be able to use any of the sub components without requiring all the dependencies of the other sub components. Specifically, I'd like to use the core utils for an improved CSRF protection mechanism (#6554).

Commits
-------

14e9f46 [Security] removed unneeded hard dependencies in Core
5dbec8a [Security] fixed README files
62bda79 [Security] copied the Resources/ directory to Core/Resources/
7826781 [Security] Split the component into 3 sub-components Core, ACL, HTTP
2013-09-18 15:11:39 +02:00
Fabien Potencier 14e9f46085 [Security] removed unneeded hard dependencies in Core 2013-09-18 14:24:03 +02:00
Fabien Potencier 4705e6f7cc fixed previous merge (refs #8635) 2013-09-18 14:22:34 +02:00
Fabien Potencier 7005cf5e71 merged branch WouterJ/dump_xml (PR #8635)
This PR was squashed before being merged into the master branch (closes #8635).

Discussion
----------

[Config] Create XML Reference Dumper

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

Only Yaml was supported. This PR adds support for XML. This makes it easier to test XML schema's (see symfony-cmf/MenuBundle#114 ), helps us at the docs with our configuration reference and helps others using XML with symfony.

## Todo

 - [x] Prototyped arrays don't work properly
 - [x] Add comments (see Yaml dumper)
 - [x] Add namespaces support

## Side effects

I've moved the reference dumpers to their own namespace and renamed the original reference dumper to `YamlReferenceDumper`. The old one is kept for BC, but deprecated.

/cc @dantleech

Commits
-------

05e9ca7 [Config] Create XML Reference Dumper
2013-09-18 13:36:39 +02:00
WouterJ 05e9ca7509 [Config] Create XML Reference Dumper 2013-09-18 13:36:38 +02:00
Fabien Potencier 5dbec8a060 [Security] fixed README files 2013-09-18 13:11:09 +02:00
Fabien Potencier 62bda7906b [Security] copied the Resources/ directory to Core/Resources/ 2013-09-18 13:11:09 +02:00
Fabien Potencier 4bb14419a3 merged branch fabpot/composer-install-fix (PR #9063)
This PR was merged into the 2.2 branch.

Discussion
----------

updated the composer install command to reflect changes in Composer

Commits
-------

c2144df updated the composer install command to reflect changes in Composer
2013-09-18 13:09:22 +02:00
Aleksey Podskrebyshev 82de3ba420 [Security] [SimpleAuthenticationProvider] Delete unnecessary "use" statements 2013-09-18 12:27:27 +04:00
Fabien Potencier c2144df888 updated the composer install command to reflect changes in Composer 2013-09-18 09:27:26 +02:00
Bernhard Schussek 7826781235 [Security] Split the component into 3 sub-components Core, ACL, HTTP 2013-09-18 09:16:41 +02:00
Fabien Potencier c3728d21cd Merge branch '2.3'
* 2.3:
  fixes RequestDataCollector bug, visible when used on Drupal8
  [Console] fixed exception rendering when nested styles
  [Console] added some more information about OutputFormatter::replaceStyle()
  [Console] fixed the formatter for single-char tags
  [Console] Escape exception message during the rendering of an exception
  [DomCrawler] fixed HTML5 form attribute handling
  Making tests pass on mac os x without this change tests would fail under mac os x at least in 10.8.2
  [BrowserKit] Fixed the handling of parameters when redirecting
  [Process] Properly close pipes after a Process::stop call
  fixed bytes conversion when used on 32-bits systems
  Typo fix
  HttpFoundation RequestTest - Fixed indentation and removed comments
  HttpFoundation Request test for #8619
  LICENSE files moved to meta folders
  added missing method in the UPGRADE file for 2.2 (closes #8941)
  [Form] Fixed: "required" attribute is not added to <select> tag if no empty value
  [Translation] Removed an unneeded return annotation.
  [DomCrawler] Added missing docblocks and removed unneeded return annotation.

Conflicts:
	src/Symfony/Component/Process/Tests/AbstractProcessTest.php
2013-09-18 09:05:46 +02:00
Fabien Potencier d1825030b4 Merge branch '2.2' into 2.3
* 2.2:
  fixes RequestDataCollector bug, visible when used on Drupal8
  [Console] fixed exception rendering when nested styles
  [Console] added some more information about OutputFormatter::replaceStyle()
  [Console] fixed the formatter for single-char tags
  [Console] Escape exception message during the rendering of an exception
  [BrowserKit] Fixed the handling of parameters when redirecting
  Typo fix
  HttpFoundation RequestTest - Fixed indentation and removed comments
  HttpFoundation Request test for #8619
  LICENSE files moved to meta folders
  added missing method in the UPGRADE file for 2.2 (closes #8941)
  [Translation] Removed an unneeded return annotation.
  [DomCrawler] Added missing docblocks and removed unneeded return annotation.

Conflicts:
	src/Symfony/Component/BrowserKit/Client.php
	src/Symfony/Component/DomCrawler/Crawler.php
2013-09-18 09:03:56 +02:00
Fabien Potencier 77d79066d3 merged branch Tobion/request-stack-bc (PR #9059)
This PR was merged into the master branch.

Discussion
----------

[HttpKernel] made request stack feature BC

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

Commits
-------

08a42e7 [HttpKernel] made request stack feature BC
2013-09-18 09:00:03 +02:00
Fabien Potencier 5ffe1bc0e0 merged branch fabriceb/master (PR #9060)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #9060).

Discussion
----------

[HttpKernel] fixes RequestDataCollector bug, visible on Drupal8

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

In Drupal8 ```$request->attributes->all()``` returns an array with a 0 key whose value is the ```Drupal\user\Entity\User```

```php
array(
 0 => Drupal\user\Entity\User,
 ...
)
```

```('_route' == $key && is_object($value))``` is therefore true which provokes an exception:

```php
FatalErrorException: Error: Call to undefined method Drupal\user\Entity\User::getPath() in [...]/RequestDataCollector.php line 54
```

This patch corrects this with a simple replacement of == by ===

Commits
-------

ba85279 [HttpKernel] fixes RequestDataCollector bug, visible when used on Drupal8
2013-09-17 21:54:49 +02:00
Fabrice Bernhard 0e80d88015 fixes RequestDataCollector bug, visible when used on Drupal8
In Drupal8 ```$request->attributes->all()``` returns an array with a 0 key whose value is the ```Drupal\user\Entity\User```

```php
array(
 0 => Drupal\user\Entity\User,
 ...
)
```

```('_route' == $key && is_object($value))``` is therefore true which provokes an exception:

```php
FatalErrorException: Error: Call to undefined method Drupal\user\Entity\User::getPath() in [...]/RequestDataCollector.php line 54
```

This patch corrects this with a simple replacement of == by ===
2013-09-17 21:54:49 +02:00
Fabien Potencier f5e4c07ce0 merged branch Tobion/twig-bridge-testcase (PR #9057)
This PR was merged into the master branch.

Discussion
----------

[TwigBridge] remove empty testcase class

since de50621e8a this class is useless

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

Commits
-------

f6a1606 [TwigBridge] remove empty testcase class
2013-09-17 21:45:38 +02:00
Tobias Schultze 08a42e7e79 [HttpKernel] made request stack feature BC 2013-09-17 18:23:22 +02:00
Tobias Schultze f6a16064ef [TwigBridge] remove empty testcase class 2013-09-17 16:25:42 +02:00
Fabien Potencier 6f5de6315b merged branch fabpot/console-render-exception (PR #9055)
This PR was merged into the 2.2 branch.

Discussion
----------

[Console] Fixed exception rendering

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

When an exception message contains styles, the output is not the expected one. This PR addresses this issue.

Commits
-------

c8d0342 [Console] fixed exception rendering when nested styles
1f88a28 [Console] added some more information about OutputFormatter::replaceStyle()
a47d663 [Console] fixed the formatter for single-char tags
c6c35b3 [Console] Escape exception message during the rendering of an exception
2013-09-17 15:57:05 +02:00
Fabien Potencier c8d0342887 [Console] fixed exception rendering when nested styles 2013-09-17 14:55:19 +02:00
Fabien Potencier 1f88a28d54 [Console] added some more information about OutputFormatter::replaceStyle() 2013-09-17 14:55:19 +02:00
Fabien Potencier a47d663f25 [Console] fixed the formatter for single-char tags 2013-09-17 14:55:19 +02:00
Grégoire Pineau c6c35b3db9 [Console] Escape exception message during the rendering of an exception 2013-09-17 14:55:19 +02:00
Fabien Potencier 42045e941e merged branch stof/fix_redirect_url (PR #9052)
This PR was merged into the 2.2 branch.

Discussion
----------

[BrowserKit] Fixed the handling of parameters when redirecting

| 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

This fixes the handling of request parameters after 2d34e78aaf to avoid sending POST parameters as GET parameters in the next request.

In case of a 307 redirect on a GET request, I'm not sure of the expected behavior. Should we re-add the GET parameters in the URI ? I would make things inconsistent between ``$client->request('GET', 'http://www.example.com/?foo=bar')`` and ``$client->request('GET', 'http://www.example.com/', array('foo' => 'bar')``

Commits
-------

0e437c5 [BrowserKit] Fixed the handling of parameters when redirecting
2013-09-17 13:18:22 +02:00
Fabien Potencier 0ebb8bc8a2 merged branch kepten/ticket_6239 (PR #8197)
This PR was squashed before being merged into the 2.3 branch (closes #8197).

Discussion
----------

[DomCrawler] fixed HTML5 form attribute handling

Fixed HTML5 form attribute handling and improved a test case to test more thoroughly

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

Commits
-------

04e730e [DomCrawler] fixed HTML5 form attribute handling
2013-09-17 11:47:59 +02:00
Robert Kiss 04e730ec2e [DomCrawler] fixed HTML5 form attribute handling 2013-09-17 11:47:58 +02:00
Fabien Potencier 5e4b24aa8b merged branch ChristianGaertner/patch-2 (PR #9054)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #9054).

Discussion
----------

[Config] Making tests pass on mac os x

without this change tests would fail under mac os x (at least in 10.8.2).

I think this change also removes inconstancy in the test (the `realpath()` is added in the other tests as well!).

| Q             | A
| ------------- | ---
| Bug fix?      | yes (fixes the test)
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | ~
| License       | MIT
| Doc PR        | ~

Cheers,

Christian

Commits
-------

61a00a8 Making tests pass on mac os x without this change tests would fail under mac os x at least in 10.8.2
2013-09-16 21:56:35 +02:00
Christian Gärtner f568e9919b Making tests pass on mac os x without this change tests would fail under mac os x at least in 10.8.2 2013-09-16 21:56:34 +02:00
Christophe Coevoet 0e437c5978 [BrowserKit] Fixed the handling of parameters when redirecting
POST parameters should not be transmitted as GET parameters after the
redirection when changing the method.
2013-09-16 19:28:51 +02:00
Fabien Potencier 8efd5cadc8 merged branch romainneutron/timeout-restart (PR #9050)
This PR was merged into the 2.3 branch.

Discussion
----------

[Process][2.3] Properly close pipes after a Process::stop call

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

When calling `Process::stop`, if the process does not stop before the end of the method, pipes are not close, `proc_close` is not called.
I added a test that randomly fails without the patch :

```
phpunit --filter=testStartAfterATimeout --repeat 100 Tests/SimpleProcessTest.php
PHPUnit 3.8-g55a6dd0 by Sebastian Bergmann.

Configuration read from /Users/romain/Documents/workspace/symfony/src/Symfony/Component/Process/phpunit.xml.dist

....E.E......E.....E..........EE..............EEE..EE.......E..  63 / 100 ( 63%)
E.E................E....EE.......E...

Time: 29.55 seconds, Memory: 6.75Mb

There were 18 errors:

1) Symfony\Component\Process\Tests\SimpleProcessTest::testStartAfterATimeout
fclose(): 89 is not a valid stream resource

/Users/romain/Documents/workspace/symfony/src/Symfony/Component/Process/ProcessPipes.php:95
/Users/romain/Documents/workspace/symfony/src/Symfony/Component/Process/ProcessPipes.php:80
/Users/romain/Documents/workspace/symfony/src/Symfony/Component/Process/ProcessPipes.php:62
/Users/romain/Documents/workspace/symfony/src/Symfony/Component/Process/Process.php:938
/Users/romain/Documents/workspace/symfony/src/Symfony/Component/Process/Process.php:229
/Users/romain/Documents/workspace/symfony/src/Symfony/Component/Process/Tests/AbstractProcessTest.php:490
```

And of course, I solved the issue, tests are now OK.

Commits
-------

d84df4c [Process] Properly close pipes after a Process::stop call
2013-09-16 13:54:08 +02:00
Romain Neutron d84df4c2c5 [Process] Properly close pipes after a Process::stop call 2013-09-16 13:47:05 +02:00
Fabien Potencier bb97f64cd1 merged branch fabpot/bytes-conversion-epic-fail (PR #9048)
This PR was merged into the 2.3 branch.

Discussion
----------

fixed bytes conversion when used on 32-bits systems

| Q             | A
| ------------- | ---
| Bug fix?      | yes (on 32-bits systems)
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #8977
| License       | MIT
| Doc PR        | n/a

This PR reverts #7413 and #742, which does not work well when a number is big (3Go for instance) and the machine is 32bits.

Commits
-------

b3ae29d fixed bytes conversion when used on 32-bits systems
2013-09-16 13:23:31 +02:00
Fabien Potencier b3ae29d4f8 fixed bytes conversion when used on 32-bits systems 2013-09-16 12:23:00 +02:00
Fabien Potencier d3ca145342 merged branch bes89/validator_object_to_string (PR #9036)
This PR was submitted for the 2.3 branch but it was merged into the master branch instead (closes #9036).

Discussion
----------

[Validator] convert object to string if possible instead of using var_export directly

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

Commits
-------

2149146 [Validator] convert object to string if possible instead of using var_export directly
2013-09-16 10:05:19 +02:00
Besnik Br 6cf5e0812e convert object to string if possible instead of using var_export directly 2013-09-16 10:05:18 +02:00
Fabien Potencier 1fd8652d8a merged branch sarcasme/patch-1 (PR #9037)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #9037).

Discussion
----------

Typo fix

Small typo/grammar fix in class' comment

Commits
-------

16f455e Typo fix
2013-09-16 10:02:49 +02:00