Commit Graph

12312 Commits

Author SHA1 Message Date
Fabien Potencier
5ff0cc4eed merged branch benja-M-1/patch-upgrade-2.2 (PR #6435)
This PR was merged into the master branch.

Commits
-------

4d40b11 Add notes about kernel.trusted_proxies parameter

Discussion
----------

[2.2][Upgrade] Add notes about kernel.trusted_proxies parameter

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

The UPGRADE-2.2.md does not mention that we have to replace ```trust_proxy_headers``` with ```trusted_proxies```.
2012-12-20 16:00:18 +01:00
Fabien Potencier
1f281db261 [TwigBundle] fixed PHP notice 2012-12-20 12:01:24 +01:00
Benjamin Grandfond
4d40b115e7 Add notes about kernel.trusted_proxies parameter 2012-12-20 11:05:55 +01:00
Fabien Potencier
6f28fc2414 merged branch stloyd/patch-1 (PR #6434)
This PR was merged into the master branch.

Commits
-------

2a2c468 Update src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToStringTransformer.php

Discussion
----------

[Form] BC change for `preg_match` and old PCRE versions.

Fix `preg_match` in `DateTimeToStringTransformer`  to work with older PCRE.
2012-12-20 10:48:41 +01:00
Fabien Potencier
9e75df561c merged branch stloyd/bugfix/tests (PR #6433)
This PR was merged into the master branch.

Commits
-------

5aed0d5 [FrameworkBundle] Remove test for class removed in commit 64d43c8

Discussion
----------

[FrameworkBundle] Remove test for class removed in commit 64d43c8
2012-12-20 10:47:26 +01:00
Joseph Bielawski
5aed0d5505 [FrameworkBundle] Remove test for class removed in commit 64d43c8 2012-12-20 10:34:05 +01:00
Joseph Bielawski
2a2c46892c Update src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToStringTransformer.php
Fix `preg_match` to work with older PCRE.
2012-12-20 10:02:06 +01:00
Fabien Potencier
d97829e8a8 fixed CS 2012-12-20 08:41:17 +01:00
Fabien Potencier
e1433924f7 merged branch mmenozzi/bsd-fixes (PR #6432)
This PR was merged into the master branch.

Commits
-------

ad6a6c8 [Finder] Re-enable BsdFindAdapter for Darwin shells and fix it

Discussion
----------

[Finder] Re-enable BsdFindAdapter for Darwin shell and fix it

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes (tested both Mac OS X and Debian)
Fixes the following tickets: #6412

----

BSD find command needs "-E" switch to evaluate POSIX regex.
Added the ability to Command to insert bits at a given index.

On some systems (Mac OS X for example) php's function
sys_get_temp_dir() returns a directory that is a symlink.
This causes tests failures because expected paths are different
from path returned by the adapter. So, has been added a realpath.

The building of sorting command has been totally moved on the adapter so
the sorting command for BsdFindAdapter has been fixed.

The building of content filtering command has been moved on the adapter.
In BsdFindAdapter version, -r switch has been replaced with initial grep
that srips out blank lines, this way is compatible with BSD shell.
2012-12-20 08:36:55 +01:00
Fabien Potencier
64d43c806b restricted to only URIs the first argument of the render tag 2012-12-20 08:31:14 +01:00
Fabien Potencier
2c9083a6e0 Merge branch '2.1'
* 2.1:
  [FrameworkBundle] added support for URIs as an argument to HttpKernel::render()
  [FrameworkBundle] restricted the type of controllers that can be executed by InternalController
  [Process] Allow non-blocking start with PhpProcess
  Making it easier to grab the PR template.
  [Locale] fixed a test
  Fixed failing test
  fix double-decoding in the routing system

Conflicts:
	src/Symfony/Component/Process/PhpProcess.php
2012-12-20 08:22:35 +01:00
Fabien Potencier
4bee2e9d3a Merge branch '2.0' into 2.1
* 2.0:
  [FrameworkBundle] added support for URIs as an argument to HttpKernel::render()
  [FrameworkBundle] restricted the type of controllers that can be executed by InternalController
  Making it easier to grab the PR template.
  fix double-decoding in the routing system

Conflicts:
	README.md
	src/Symfony/Bundle/FrameworkBundle/EventListener/RouterListener.php
	src/Symfony/Component/Security/Http/HttpUtils.php
2012-12-20 08:21:29 +01:00
Fabien Potencier
532cc9a0e6 [FrameworkBundle] added support for URIs as an argument to HttpKernel::render() 2012-12-20 08:14:51 +01:00
Fabien Potencier
1f8c501b99 [FrameworkBundle] restricted the type of controllers that can be executed by InternalController 2012-12-20 08:14:45 +01:00
Fabien Potencier
d90e55cbb3 merged branch Tobion/fix-double-encoding (PR #6363)
This PR was merged into the 2.0 branch.

Commits
-------

8b2c17f fix double-decoding in the routing system

Discussion
----------

fix double-decoding in the routing system

@fabpot @vicb This should fix it. You know what ;) Don't want to leak more information.
And the good thing, it's no hack nor does it break BC.
2012-12-20 08:11:40 +01:00
Fabien Potencier
eedafadb58 merged branch lmcd/wdt-token (PR #6431)
This PR was merged into the master branch.

Commits
-------

4663450 Use abbr_class
15c52f5 Show class name of security token in WDT

Discussion
----------

Show class name for security token in WDT

I found this to be really useful when creating custom authentication providers

Example:

![token](https://f.cloud.github.com/assets/363540/23829/2f28c1ac-4a70-11e2-91d4-e3ac27201b4f.png)
2012-12-20 08:05:25 +01:00
Manuele Menozzi
ad6a6c8651 [Finder] Re-enable BsdFindAdapter for Darwin shells and fix it
BSD find command needs "-E" switch to evaluate POSIX regex.
Added the ability to Command to insert bits at a given index.

On some systems (Mac OS X for example) php's function
sys_get_temp_dir() returns a directory that is a symlink.
This causes tests failures because expected paths are different
from path returned by the adapter. So, has been added a realpath.

The building of sorting command has been totally moved on the adapter so
the sorting command for BsdFindAdapter has been fixed.

The building of content filtering command has been moved on the adapter.
In BsdFindAdapter version, -r switch has been replaced with initial grep
that srips out blank lines, this way is compatible with BSD shell.
2012-12-20 07:51:44 +01:00
Lee McDermott
4663450a03 Use abbr_class 2012-12-20 06:35:43 +00:00
Lee McDermott
15c52f507e Show class name of security token in WDT 2012-12-20 06:23:44 +00:00
Fabien Potencier
055daa99ac merged branch cup-of-giraf/phpprocess_allow_non_blocking (PR #6411)
This PR was squashed before being merged into the 2.1 branch (closes #6411).

Commits
-------

2cd43da [Process] Allow non-blocking start with PhpProcess

Discussion
----------

[Process] Allow non-blocking start with PhpProcess

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #6410
Todo: -
License of the code: MIT
Documentation PR: -
2012-12-19 14:27:19 +01:00
Pierre Tachoire
2cd43da120 [Process] Allow non-blocking start with PhpProcess 2012-12-19 14:27:19 +01:00
Fabien Potencier
06c3222d44 merged branch include-x/patch-1 (PR #6416)
This PR was merged into the master branch.

Commits
-------

8654cd8 Fixed missing quote in FormHelper->widget() PHPDoc

Discussion
----------

Fixed missing quote in FormHelper->widget() PHPDoc
2012-12-19 12:31:02 +01:00
Sema
8654cd80fd Fixed missing quote in FormHelper->widget() PHPDoc 2012-12-19 15:09:11 +04:00
Fabien Potencier
6261779ef3 [Finder] disable the BSD find adapter on the Mac as it does not work yet (refs #6412) 2012-12-19 08:39:37 +01:00
Fabien Potencier
6c43e2e168 merged branch dlsniper/docblock-enhancements (PR #6383)
This PR was squashed before being merged into the master branch (closes #6383).

Commits
-------

c2acc6c Fixed most of the docblocks/unused namespaces

Discussion
----------

Fixed most of the docblocks/unused namespaces

This PR fixes most/all of the docblocks in the framework.
Also, this removes the unused namespaces from the sources.
I've inspected the sources with the latest EAP of PhpStorm 6.

Thanks!

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

by dlsniper at 2012-12-16T21:03:32Z

@stof let me know if I can squash the commits.
Also, I've did considered about using the short class name but sometime that is not available for certain classes/contexts and it's better for IDEs to have the FQNS.

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

by stof at 2012-12-16T22:32:32Z

Using the short class name is a matter of coding standards.

For the squashijng, I would suggest waiting the end of the work (or even letting @fabpot squash it when merging). Seeing the changes in a new commit makes it easier to review as we can see the diff between the previous review and the current state.

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

by dlsniper at 2012-12-16T22:51:46Z

I know about the review that's why I've asked you about squashing the commits ;) I'll commit the reminder of the needed changes asap.

But on the more important part, I'll remove the long declarations where the class is already imported via ```use``` but it some cases, like https://github.com/symfony/symfony/pull/6383/files#L41R145 , I don't think it's ok not to provide IDE auto-completion just because the coding standard says so as we are using namespaces and IDEs might not be able to get it right without some small hints.

What do you think?

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

by dlsniper at 2012-12-16T23:14:46Z

Also, look on this:
![snapshot6](https://f.cloud.github.com/assets/607868/15850/23ee18f6-47d6-11e2-8285-0c3c06a1e60d.png)
As you can see, the IDE is confused about the type of the expected parameter vs returned parameter because the class isn't properly namespaced.

Like I've said, humans might do ok when reading it but the tools we use to code might not so we should help them out a bit.

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

by stof at 2012-12-17T09:54:04Z

@dlsniper This is because the phpdoc of the ``TreeBuilder::buildTree`` is wrong. It uses the short class name but the use statement is missing

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

by dlsniper at 2012-12-17T21:45:50Z

That's true but I'm not sure what's the preferred fix for this. Add the missing use statement or do the FQNS which breaks the CS like you've pointed out. Any pointers?

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

by mvrhov at 2012-12-18T09:37:51Z

I'm adding the use statements. Beware PhpStorm will report the classes that are used only in annotations as unused!

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

by stof at 2012-12-18T09:41:08Z

@dlsniper there is already a bunch of places where we have use statements added for the phpdoc for return values

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

by dlsniper at 2012-12-18T09:41:53Z

Ok, I'll fix this issue tonight then and revert the changes. Thanks for feedback.

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

by dlsniper at 2012-12-18T22:03:25Z

I believe this is done. Anything that I might have missed?
2012-12-19 08:09:50 +01:00
Florin Patan
c2acc6c2cb Fixed most of the docblocks/unused namespaces 2012-12-19 08:09:49 +01:00
Fabien Potencier
7bc9caa979 merged branch tvlooy/form_test (PR #6375)
This PR was merged into the master branch.

Commits
-------

cda1621 Move FormInterface too
0544351 Move DeprecationErrorHandler to Test folder so it's not removed when building the zip file
f56a2b9 Fix #6374 move FormBuilderInterface from Tests to Test

Discussion
----------

Fix #6374 move FormBuilderInterface from Tests to Test

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

by fabpot at 2012-12-16T07:47:55Z

Are there any other classes in the tests that might be useful for testing userland forms? ping @bschussek

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

by colinfrei at 2012-12-16T08:24:51Z

The DeprecationErrorHandler will need to be in the Test directory as well, as its handleBC method is used for handling BC code that's not in tests.

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

by colinfrei at 2012-12-16T09:06:51Z

Wanted to make a pull request to tvlooy's branch with the DeprecationErrorHandler stuff, but can't figure out how to do that - the commit is here: ec56379042

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

by stof at 2012-12-16T19:53:59Z

@fabpot The other extending interfaces provided for mocking purpose (as mocking an interface extending ``Traversable`` directly does not work). So we have FormInterface too at least
2012-12-18 13:05:19 +01:00
Fabien Potencier
0b69f096d6 merged branch bschussek/issue5806 (PR #6355)
This PR was merged into the master branch.

Commits
-------

19d8510 [Form] Improved Form::add() and FormBuilder::add() to accept integers as field names
fb71964 [Form] Added an alternative signature Form::add($name, $type, $options)

Discussion
----------

[Form] Added an alternative signature Form::add($name, $type, $options)

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #5806
Todo: -
License of the code: MIT
Documentation PR: symfony/symfony-docs#2024

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

by bschussek at 2012-12-18T10:42:55Z

ping @fabpot
2012-12-18 12:04:33 +01:00
Bernhard Schussek
19d8510288 [Form] Improved Form::add() and FormBuilder::add() to accept integers as field names 2012-12-18 11:56:22 +01:00
Bernhard Schussek
fb71964adc [Form] Added an alternative signature Form::add($name, $type, $options) 2012-12-18 11:29:26 +01:00
Fabien Potencier
d9f7844d97 merged branch colinfrei/deprecatedValidator (PR #6401)
This PR was merged into the master branch.

Commits
-------

07316c9 [Validator] catch deprecated methods

Discussion
----------

[Validator] catch deprecated methods

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: no, but I didn't break them 😄
Fixes the following tickets: #6373
Todo: -
License of the code: MIT

See #6373 for more information
2012-12-17 22:14:48 +01:00
Colin Frei
07316c9aa0 [Validator] catch deprecated methods 2012-12-17 21:38:04 +01:00
Fabien Potencier
92ecff816b [TwigBridge] updated CHANGELOG 2012-12-17 15:01:24 +01:00
Fabien Potencier
2cc51b0823 merged branch fabpot/twig-render (PR #6386)
This PR was merged into the master branch.

Commits
-------

163564b [WebProfilerBundle] replaced yaml_dump by json_encode to make the Web Profiler independent from the YAML component
1c92307 [WebProfilerBundle] fixed exception panel when no exception is thrown
00e08be [WebProfilerBundle] replaced usage of the render tag by the render function (to decouple the bundle from TwigBundle)
0e2418c [TwigBundle] added the HttpKernel extension to the default Twig loaded extensions
f0d9be0 [TwigBridge] added an extension for the HttpKernel component

Discussion
----------

Added an HttpKernelExtension in Twig bridge and used it in the WebProfiler

The first commit introduces a new HttpKernelExtension in the Twig bridge that allows the rendering of a sub-request from a template (the code mostly comes from Silex, and will replace the code there at some point).

The name `render` is probably not the best one as it does not really tell you what it does (the same goes for the `render` tag we have in Symfony2 by the way).

Here is a list of possible names:

 * `render()`
 * `render_request()`
 * `request()`
 * `subrequest()`
 * `include_request()`

I don't really like the last one, but it is (perhaps) consistent with the `include` tag/function in Twig.

This new `render()` function is also a first step towards replacing the `render` tag (with support for ESI, SSI, ...). But it won't happen before we refactor the way it's managed now (a lot of the code is in the FrameworkBundle right now and that prevents Silex or Drupal to reuse it).

The other commits make use of this new extension to make the Web Profiler truly independent from TwigBundle and FrameworkBundle.
2012-12-17 14:59:17 +01:00
Fabien Potencier
73c0397a4a merged branch mweimerskirch/patch-8 (PR #6395)
This PR was merged into the master branch.

Commits
-------

ab9d033 [Validator] Added missing Luxembourgish messages

Discussion
----------

[Validator] Added missing Luxembourgish messages
2012-12-17 13:05:54 +01:00
Michel Weimerskirch
ab9d033edc [Validator] Added missing Luxembourgish messages 2012-12-17 12:46:04 +01:00
Tom Van Looy
cda162103f Move FormInterface too 2012-12-17 09:01:30 +01:00
Fabien Potencier
163564b009 [WebProfilerBundle] replaced yaml_dump by json_encode to make the Web Profiler independent from the YAML component 2012-12-16 21:43:35 +01:00
Fabien Potencier
1c92307e4c [WebProfilerBundle] fixed exception panel when no exception is thrown 2012-12-16 21:43:35 +01:00
Fabien Potencier
00e08be05b [WebProfilerBundle] replaced usage of the render tag by the render function (to decouple the bundle from TwigBundle) 2012-12-16 21:43:31 +01:00
Fabien Potencier
8df9b7a2de [Config] renamed keepKeys() to normalizeKeys() (refs #6367) 2012-12-16 17:56:50 +01:00
Fabien Potencier
0e2418c505 [TwigBundle] added the HttpKernel extension to the default Twig loaded extensions 2012-12-16 17:47:32 +01:00
Fabien Potencier
f0d9be02f5 [TwigBridge] added an extension for the HttpKernel component 2012-12-16 17:46:42 +01:00
Fabien Potencier
4f0cf08523 merged branch fabpot/config-key-normalization (PR #6367)
This PR was merged into the master branch.

Commits
-------

6efae29 [TwigBundle] fixed configuration to avoid key normalizations for paths and globals (closes #5998)
e31d4f1 [Config] allowed the disabling of key normalization on some array nodes

Discussion
----------

Config key normalization

This is a quick proof-of-concept for a better fix of #6086, where key normalizations can be disabled on specific nodes. The previous patch was not really useful as you were only able to disable key normalization globally for a configuration.

ping @lolautruche

The second commit fixes #5998.

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

by lolautruche at 2012-12-15T15:39:00Z

+1
The approach is neat and much better than my workaround. Gives better control and avoids magic 😃 (even if this *normalization* is still a bit obscure to me).
2012-12-16 16:12:15 +01:00
Fabien Potencier
6efae29f2a [TwigBundle] fixed configuration to avoid key normalizations for paths and globals (closes #5998) 2012-12-16 16:11:31 +01:00
Fabien Potencier
e31d4f19d9 [Config] allowed the disabling of key normalization on some array nodes
This reverts #6086
2012-12-16 16:11:28 +01:00
Fabien Potencier
608972417c merged branch nicam/biggerHitBoxWebProfiler (PR #6385)
This PR was merged into the master branch.

Commits
-------

a498261 [Webprofiler] increased hitboxSize of the close button the webprofiler toolbar. Otherwise it's very hard to close it on a tablet

Discussion
----------

[Webprofiler] increased hitboxSize of the close button the webprofiler

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

Increased the hitbox Size of the close button on webprofiler, otherwise it's very hard to close it on a tablet. Apple recommends 40x40 pixels for touch stuff

see issue https://github.com/symfony/symfony/issues/6264

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

by nicam at 2012-12-16T13:45:36Z

@stloyd done
2012-12-16 16:02:21 +01:00
Fabien Potencier
9dfa0dfac7 merged branch nicam/master (PR #6384)
This PR was merged into the master branch.

Commits
-------

a9c27fb [Form] empty_value should not be selectable in choice field if the field is required

Discussion
----------

[Form] empty_value should not be selectable in choice field if the field is required

When the Choice field is required one should not be able to select the empty_value. The empty_value field is supposed to be a placeholder and not a real value.

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: none
Todo: nothing
License of the code: MIT
Documentation PR: none

SEE https://github.com/symfony/symfony/pull/6116

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

by bschussek at 2012-12-16T13:51:17Z

👍
2012-12-16 15:07:40 +01:00
Pascal Helfenstein
a4982618fd [Webprofiler] increased hitboxSize of the close button the webprofiler toolbar. Otherwise it's very hard to close it on a tablet 2012-12-16 14:43:26 +01:00
Pascal Helfenstein
a9c27fbe7b [Form] empty_value should not be selectable in choice field if the field is required 2012-12-16 14:02:47 +01:00