Commit Graph

11580 Commits

Author SHA1 Message Date
Grégoire Paris
6fb4a1bbdc Remove § about prototype_name customization in 2.0
I don't think this was even possible in 2.0
2012-10-25 10:33:18 +02:00
Grégoire Paris
8a347fdba6 fix option name 2012-10-25 10:33:03 +02:00
Xavier REN
20898e53a6 Add to DateFormats 'D M d H:i:s Y T' (closes #5830)
DateFormat seen on the web
2012-10-25 09:07:48 +02:00
Fabien Potencier
67d9253127 Merge branch '2.1'
* 2.1:
  added missing use statment (closes #5825)
  Code cleanup
  [WebProfilerBundle] Fixed the use of nested macros
  Removed unused use statements.
  Nsdocblocks
  [ConfigDumpReference] avoid notice for variable nodes
  fixed fallback locale
  UniqueValidatorTest, Change message on assertions
  Documented removed _form_is_choice_group function

Conflicts:
	src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php
	src/Symfony/Bundle/WebProfilerBundle/Profiler/TemplateManager.php
2012-10-24 17:41:27 +02:00
Fabien Potencier
94f5f49894 merged branch bamarni/patch-10 (PR #5783)
This PR was merged into the 2.1 branch.

Commits
-------

3553276 [ConfigDumpReference] avoid notice for variable nodes

Discussion
----------

[ConfigDumpReference] avoid notice for variable nodes

When a variable node has an array as default value, a notice occurs later on because of an "array to string conversion", which is turned to an exception in debug mode (mandatory in order to run this command).
2012-10-24 17:35:37 +02:00
Fabien Potencier
20bb205f53 merged branch umpirsky/patch-1 (PR #5798)
This PR was merged into the master branch.

Commits
-------

40341bb Changed MoneyType::$patterns visibility.
c88fe94 Changed getPattern visibility

Discussion
----------

Changed getPattern visibility

It should be possible to override this method.

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

by Inori at 2012-10-22T19:25:37Z

Probably makes sense to also change visibility of [MoneyType::$patterns](c88fe94707/src/Symfony/Component/Form/Extension/Core/Type/MoneyType.php (L23))

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

by umpirsky at 2012-10-22T20:49:09Z

@Inori Fixed, thanks.
2012-10-24 17:32:38 +02:00
Fabien Potencier
562d3516fd merged branch nomack84/code_cleanup (PR #5818)
This PR was merged into the 2.1 branch.

Commits
-------

f06432b Code cleanup

Discussion
----------

Code cleanup

Not sure at the end if this good or not. If it is useless, just close it.
2012-10-24 17:12:48 +02:00
Stano Turza
11ba41bb17 added missing use statment (closes #5825) 2012-10-24 17:10:37 +02:00
Albert Casademont
3e58893d0f [Security] Tweak UsernamePasswordFormAuthenticationListener
- Do not check twice for the only_post condition
- If the expected request is only_post, check only the post variables for the username and password parameters
2012-10-23 11:27:38 +02:00
Sasa Stamenkovic
40341bbb2f Changed MoneyType::$patterns visibility. 2012-10-22 22:46:47 +02:00
Fabien Potencier
28482f8216 merged branch stof/timeline_panel (PR #5801)
This PR was merged into the 2.1 branch.

Commits
-------

039bdfd [WebProfilerBundle] Fixed the use of nested macros

Discussion
----------

[WebProfilerBundle] Fixed the use of nested macros

Closes #5800

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

by stof at 2012-10-22T20:03:10Z

@fabpot ping. this regression is quite annoying as I like the profiler
2012-10-22 22:20:01 +02:00
Mario A. Alvarez Garcia
f06432bc73 Code cleanup 2012-10-22 10:37:12 -04:00
Christophe Coevoet
039bdfd7e7 [WebProfilerBundle] Fixed the use of nested macros
Closes #5800
2012-10-21 20:33:40 +02:00
Fabien Potencier
188589cf5d merged branch Seldaek/read-raw (PR #5799)
This PR was merged into the master branch.

Commits
-------

94f3ba5 [Console] Read input in raw mode to avoid processing escape sequences

Discussion
----------

[Console] Read input in raw mode to avoid processing escape sequences

As outlined in composer/composer#1238:

> Use read -r rather than the current read shell builtin to take a password from the user on the CLI, the -r is the raw option which means backslashes (\) aren't interpreted as escape characters, so \ is a literal \, otherwise they are nommed or double slashes become single ones etc.
2012-10-21 18:11:21 +02:00
Jordi Boggiano
94f3ba5236 [Console] Read input in raw mode to avoid processing escape sequences 2012-10-21 17:09:07 +02:00
Саша Стаменковић
c88fe94707 Changed getPattern visibility
It should be possible to override this method.
2012-10-21 15:41:00 +03:00
Bart van den Burg
5d2525b082 [Form] Created test for DoctrineOrmTypeGuesser
see #5790
2012-10-20 12:37:21 +02:00
Fabien Potencier
cc10715815 merged branch umpirsky/minor-use-fixes (PR #5786)
This PR was submitted for the master branch but it was merged into the 2.1 branch instead (closes #5786).

Commits
-------

199a593 Removed unused use statements.

Discussion
----------

Removed unused use statements.
2012-10-20 09:11:36 +02:00
umpirsky
82dfd30f4e Removed unused use statements. 2012-10-20 09:11:36 +02:00
Fabien Potencier
bb636c857a merged branch drak/nsdocblocks (PR #5789)
This PR was squashed before being merged into the 2.1 branch (closes #5789).

Commits
-------

788cc2c Nsdocblocks

Discussion
----------

Nsdocblocks

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -
2012-10-20 09:10:30 +02:00
Drak
788cc2c7ef Nsdocblocks 2012-10-20 09:10:30 +02:00
Bernhard Schussek
b844d6be09 [Form] Fixed DoctrineOrmTypeGuesser to guess the "required" option for to-one associations 2012-10-19 19:36:52 +02:00
Bilal Amarni
3553276af2 [ConfigDumpReference] avoid notice for variable nodes 2012-10-19 15:53:01 +03:00
Fabien Potencier
dba9bc3595 merged branch astina/fallback-locale-fix (PR #5746)
This PR was submitted for the master branch but it was merged into the 2.1 branch instead (closes #5746).

Commits
-------

96d87ad [Locale] fixed fallback locale

Discussion
----------

[Locale] fixed fallback locale

The `getFallbackLocale()` method in `Symfony\Component\Locale\Locale` did not return a fallback locale if the current locale (`Locale::getDefault()`) was a 5-char locale like de_CH.

`LocaleTest` failed when the locale was set to de_CH before running (see changes in LocaleTest).

(second attempt after messing up PR#5641)

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

by eriksencosta at 2012-10-15T05:08:25Z

Original PR: #5641.
2012-10-19 13:24:34 +02:00
Philipp Kräutli
965734e857 fixed fallback locale 2012-10-19 13:24:34 +02:00
Fabien Potencier
390f36a86b merged branch acasademont/locale_request_collector (PR #5769)
This PR was merged into the master branch.

Commits
-------

20f19bf Add the Request locale to the RequestDataCollector

Discussion
----------

[HttpKernel] Add the Request locale to the RequestDataCollector

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/acasademont/symfony.png)](http://travis-ci.org/acasademont/symfony)
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -

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

by acasademont at 2012-10-17T09:01:32Z

Seems like some Twig tests are failing in the master branch
2012-10-19 13:22:50 +02:00
Fabien Potencier
ab1a434eba merged branch eventhorizonpl/100ptc_component_httpfundation_p12 (PR #5773)
This PR was merged into the master branch.

Commits
-------

5b3ed82 MetadataBag test

Discussion
----------

MetadataBag test

Hi,

This patch adds MetadataBag test.

Best regards,
Michal
2012-10-19 13:22:05 +02:00
Fabien Potencier
bb0d402b70 merged branch pkruithof/patch-5 (PR #5781)
This PR was merged into the 2.1 branch.

Commits
-------

3e15d44 Documented removed _form_is_choice_group function

Discussion
----------

Documented removed `_form_is_choice_group` function

Also changed for-loop variables to match the current `form_div_layout.html.twig` code.
2012-10-19 13:21:27 +02:00
Fabien Potencier
22201dca3c merged branch spike31/patch-1 (PR #5782)
This PR was submitted for the master branch but it was merged into the 2.1 branch instead (closes #5782).

Commits
-------

d662e22 [DoctrineBridge] UniqueValidatorTest, Change message on assertions

Discussion
----------

[DoctrineBridge] UniqueValidatorTest, Change message on assertions
2012-10-19 13:20:42 +02:00
Gilles Gauthier
602a5eb3f4 UniqueValidatorTest, Change message on assertions 2012-10-19 13:20:42 +02:00
Peter Kruithof
3e15d448af Documented removed _form_is_choice_group function
Also changed for-loop variables to match the current `form_div_layout.html.twig` code.
2012-10-19 11:53:49 +03:00
Fabien Potencier
388cbff022 merged branch arnaud-lb/routing-php-dumper-simplification (PR #5734)
This PR was merged into the master branch.

Commits
-------

e54d749 [Routing] Simplified php matcher dumper (and optimized generated matcher)

Discussion
----------

[Routing] Simplified php matcher dumper (and optimized generated matcher)

Bug fix: no
Feature addition: no
Related: #3378
Backwards compatibility break: no
Symfony2 tests pass: yes

This simplifies the php matcher dumper by allowing the dumper to re-organize routes in the dumper's own structure.

As a result, dumping is made a little simpler. This is also helps much for my hostname-based routes PR #3378.

Reorganizing routes also allows to find more optimization opportunities:

Currently the dumper wraps some collections of routes in a `if (0 === strpos($pathinfo, '/someprefix')` if the collection has user-defined prefix, and if it contains more than one direct child Route. This can miss many optimization opportunities.

The PR changes this by building a prefix tree of routes based on the static prefix extracted from routes' patterns. Then every leave having a prefix and more than one child (route or collection) will be wrapped in a `if` statement.

Example:

```
// No explicit prefix is specified
@Route("/cafe")
@Route("/cacao")
@Route("/coca")
```

is compiled like this:

```
if (url starts with /c) {
    if (url starts with /ca) {
        // test route "/cafe"
        // test route "/cacao"
    }
    // test route "/coca"
}
```

Some tests have many white space changes, much more easier to review [here](https://github.com/symfony/symfony/pull/5734/files?w=1)

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

by Tobion at 2012-10-13T02:27:54Z

I'm not sure if adding these specific classes just for dumping is the best implementation because they duplicate some logic and this optimization should also work out-of-the-box with the standard RouteCollection etc.
What I have in mind is a new method in RouteCollection like `RouteCollection::optimizeTree` that returns a new RouteCollection with the Routes that includes these optimization you do here. So there would probably be no need for the new classes.

It think it requires some changes in RouteCollection like the handling of prefix that must start with a slash currently, which is too restrictive. But it should be possible.

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

by arnaud-lb at 2012-10-13T12:52:32Z

@Tobion

> I'm not sure if adding these specific classes just for dumping is the best implementation because they duplicate some logic and this optimization should also work out-of-the-box with the standard RouteCollection etc.

I think RouteCollection and DumperCollection do not share the same concerns; and RouteCollection does things that don't allow to reorganize routes freely. For instance when adding a collection to a RouteCollection this changes all the child routes' prefix, requirements, options, etc. When setting a collection's prefix, this prepends the prefix to every child route's pattern, etc.

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

by arnaud-lb at 2012-10-15T08:50:23Z

squashed the CS commits

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

by arnaud-lb at 2012-10-15T13:50:16Z

@fabpot @Tobion this PR is ready to be merged if everyone agrees

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

by Tobion at 2012-10-16T18:10:36Z

When the above is fixed, I think it's good to be merged.

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

by arnaud-lb at 2012-10-17T08:40:20Z

Fixed; thanks @Tobion @stof for your reviews

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

by Tobion at 2012-10-19T03:30:10Z

@arnaud-lb could you please test whether your PR fixes #5780 as a side-effect?
I can image that it's fixed because you use `$route->compile()->getStaticPrefix();` for prefix optimization.
If it's fixed please add a test case. If not, that's fine, and we need to fix it in another PR.
2012-10-19 07:56:40 +02:00
Fabien Potencier
88ea842c5e Merge branch '2.1'
* 2.1: (28 commits)
  Delete use of CreationExeption
  [Form] Fixed error message in PropertyPath to not advice to use a non-existing feature
  [Form] Fixed creation of multiple money fields with different currencies
  [Form] Fixed setting the "data" option to an object in "choice" and "entity" type
  Fixed Serbian plural translations.
  Fixed IPv6 Check in RequestMatcher
  Fix typo
  change what I think is a typo
  [Console] Fix error when mode is not in PATH
  [WebProfilerBundle] fixed macro usage (to be forward compatible with Twig 2.x)
  Change monolog require-dev to use the branch alias instead of dev-master
  [FrameworkBundle] partially reverted previous merge
  [2.1] Added missing error return codes in commands
  Made the router lazy when setting the context
  [WebProfilerBundle] fixed typos
  Fix incorrect variable in FileProfilerStorage
  UnitTest fix
  UnitTest fix
  added a unit test
  fixed #5384
  ...
2012-10-18 23:16:19 +02:00
Fabien Potencier
82a6694c85 Merge branch '2.0' into 2.1
* 2.0:
  [Form] Fixed creation of multiple money fields with different currencies
  Fixed IPv6 Check in RequestMatcher
  fixed DomCrwaler/Form to handle <button> when submitted

Conflicts:
	tests/Symfony/Tests/Component/DomCrawler/FormTest.php
	tests/Symfony/Tests/Component/Form/Extension/Core/Type/MoneyTypeTest.php
2012-10-18 23:16:01 +02:00
Fabien Potencier
1c7f5d4920 merged branch ErikSaunier/patch-1 (PR #5779)
This PR was submitted for the master branch but it was merged into the 2.1 branch instead (closes #5779).

Commits
-------

73aafb4 Delete use of CreationExeption

Discussion
----------

Delete use of CreationExeption

CreationException not used
2012-10-18 21:44:44 +02:00
Erik Saunier
051327ea03 Delete use of CreationExeption
CreationException not used
2012-10-18 21:44:44 +02:00
Fabien Potencier
a01ede2f4d merged branch bschussek/issue5388 (PR #5778)
This PR was merged into the 2.1 branch.

Commits
-------

bda29b3 [Form] Fixed error message in PropertyPath to not advice to use a non-existing feature

Discussion
----------

[Form] Fixed error message in PropertyPath to not advice to use a non-existing feature

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #5388
Todo: -
License of the code: MIT
Documentation PR: -
2012-10-18 21:42:42 +02:00
Fabien Potencier
1fddce4b6e merged branch bschussek/issue5458 (PR #5777)
This PR was merged into the 2.0 branch.

Commits
-------

bf3e358 [Form] Fixed creation of multiple money fields with different currencies

Discussion
----------

[Form] Fixed creation of multiple money fields with different currencies

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #5458
Todo: -
License of the code: MIT
Documentation PR: -
2012-10-18 21:41:24 +02:00
Fabien Potencier
3b6082acdb merged branch bschussek/issue5582 (PR #5776)
This PR was merged into the 2.1 branch.

Commits
-------

8f81f07 [Form] Fixed setting the "data" option to an object in "choice" and "entity" type

Discussion
----------

[Form] Fixed setting the "data" option to an object in "choice" and "entity" type

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #5582
Todo: -
License of the code: MIT
Documentation PR: -
2012-10-18 21:39:30 +02:00
Bernhard Schussek
bda29b335e [Form] Fixed error message in PropertyPath to not advice to use a non-existing feature 2012-10-18 19:52:59 +02:00
Bernhard Schussek
bf3e358697 [Form] Fixed creation of multiple money fields with different currencies 2012-10-18 19:17:20 +02:00
Bernhard Schussek
8f81f078e0 [Form] Fixed setting the "data" option to an object in "choice" and "entity" type 2012-10-18 18:50:25 +02:00
Michal Piotrowski
5b3ed826a8 MetadataBag test 2012-10-17 22:23:03 +02:00
Fabien Potencier
6b12fc0330 [TwigBundle] fixed unit tests 2012-10-17 15:58:03 +02:00
Fabien Potencier
3c65f6dee2 [TwigBundle] fixed unit tests 2012-10-17 15:22:39 +02:00
Albert Casademont
20f19bfd84 Add the Request locale to the RequestDataCollector 2012-10-17 10:50:16 +02:00
Arnaud Le Blanc
e54d749d05 [Routing] Simplified php matcher dumper (and optimized generated matcher) 2012-10-16 20:50:15 +02:00
Fabien Potencier
defccb3516 merged branch umpirsky/validators-serbian-plural (PR #5764)
This PR was submitted for the master branch but it was merged into the 2.1 branch instead (closes #5764).

Commits
-------

cacf5d7 Fixed Serbian plural translations.

Discussion
----------

Fixed Serbian plural translations.

Translations break productions apps again. We should come up with some solution for this.
2012-10-16 16:15:39 +02:00
umpirsky
53c43bf647 Fixed Serbian plural translations. 2012-10-16 16:15:39 +02:00
Fabien Potencier
12ad992ae5 merged branch yohang/patch-1 (PR #5763)
This PR was submitted for the master branch but it was merged into the 2.0 branch instead (closes #5763).

Commits
-------

333ebeb Fixed IPv6 Check in RequestMatcher

Discussion
----------

[HttpFoundation] Fixed IPv6 Check in RequestMatcher

RequestMatcher checks IPv6 support with

```php
if (!defined('AF_INET6')) {
    throw new \RuntimeException('Unable to check Ipv6. Check that PHP was not compiled with option "disable-ipv6".');
}
```
wich depends on sockets extension.

This PR adds a fallback by checking return value of silented call to `inet_pton` if extension is not available (code from https://github.com/dsp/v6tools/blob/master/src/v6tools/Runtime.php).
2012-10-16 13:28:16 +02:00