Commit Graph

7034 Commits

Author SHA1 Message Date
Kris Wallsmith
1b4aaa2c8e [HttpFoundation] fixed ApacheRequest
Pathinfo was incorrect when using mod_rewrite.
Added better test coverage.
2011-12-21 13:57:56 -08:00
Fabien Potencier
2af5cb5602 merged branch marekkalnik/upload-flash (PR #2938)
Commits
-------

8235848 [HttpFoundation][File] Add flv file default extension

Discussion
----------

[HttpFoundation][File] Add flv file default extension

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes (doesn't affect tests)
Fixes the following tickets: -
Todo: -

This commit adds default extension for video/x-flv mime-type, which is a Flash Video file. Lack of this definition causes File::guessExtension() return null for this type of file, which breaks uploaded file in some user cases.
2011-12-21 17:08:06 +01:00
Fabien Potencier
74ef9b963e merged branch mdemirci/2.0 (PR #2937)
Commits
-------

5a6c989 FrameworkBundle: Adding test-attribute in xsd-schema to write functional-tests if using xml-configurations

Discussion
----------

[FrameworkBundle] Adding test-attribute in xsd-schema

 to write functional-tests if using xml-configurations
2011-12-21 17:07:45 +01:00
Marek Kalnik
8235848b5b [HttpFoundation][File] Add flv file default extension 2011-12-21 16:18:42 +01:00
Muharrem Demirci
5a6c989abc FrameworkBundle: Adding test-attribute in xsd-schema to write functional-tests if using xml-configurations 2011-12-21 15:50:59 +01:00
Fabien Potencier
3dd1072edc [HttpKernel] fixed unit tests that can fail randomly 2011-12-20 20:21:56 +01:00
Fabien Potencier
ebc9979a57 [Process] fixed unit tests on PHP 5.4 2011-12-20 20:16:11 +01:00
Fabien Potencier
89bd0d7874 merged branch Tobion/patch-3 (PR #2931)
Commits
-------

1eb5583 fixes #2906

Discussion
----------

Fix for #2906

closes #2906
2011-12-20 19:20:41 +01:00
Tobias Schultze
1eb5583168 fixes #2906 2011-12-20 18:12:37 +01:00
Fabien Potencier
34f1b5893c merged branch aerialls/webprofiler (PR #2925)
Commits
-------

b0987a3 [WebProfilerBundle] fixed toolbar height

Discussion
----------

[WebProfilerBundle] fixed toolbar height

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: none
Todo: none
2011-12-19 19:53:40 +01:00
Fabien Potencier
f58cfc0dcb merged branch stof/entity_provider_proxy (PR #2922)
Commits
-------

649fa52 [DoctrineBridge] Fixed the entity provider to support proxies
29f4111 [DoctrineBridge] Added a failing test showing the issue for proxy users

Discussion
----------

Fixed the entity provider to support proxies

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

If a proxy object was used, the ``supportsClass`` method would fail becasue it does a string comparison for the class name.

This issue has not been reported by users yet because it is an edge case:

- ``supportsClass`` is used only in the RememberMe system
- getting a proxy in the entity provider is possible only if a listener running before the firewall loaded an object which has a relation to the user, which is far from being a standard use case.

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

by schmittjoh at 2011/12/19 10:07:46 -0800

How about using the new proxy tools that Doctrine has?

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

by stof at 2011/12/19 10:20:37 -0800

the new tool will only be available in 2.2 so only for Symfony 2.1. Once merged into master, we could eventually refactor it in the master branch to use ``Doctrine\Common\Util\ClassUtils``
2011-12-19 19:50:04 +01:00
Julien Brochet
b0987a3c9c [WebProfilerBundle] fixed toolbar height 2011-12-19 19:44:57 +01:00
Christophe Coevoet
649fa5219f [DoctrineBridge] Fixed the entity provider to support proxies 2011-12-19 18:32:21 +01:00
Christophe Coevoet
29f4111f3e [DoctrineBridge] Added a failing test showing the issue for proxy users 2011-12-19 18:31:29 +01:00
Fabien Potencier
4316595dbb fixed CS 2011-12-18 14:42:59 +01:00
Fabien Potencier
8d7a6e598d added a rule to check_cs 2011-12-18 14:42:56 +01:00
Fabien Potencier
3ba767703a merged branch stloyd/profiler_design_fix (PR #2907)
Commits
-------

d1fa8cc [WebProfiler] Fix some design glitches (closes #2867)

Discussion
----------

[WebProfiler] Fix some design glitches

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #2867

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

by jalliot at 2011/12/17 04:54:11 -0800

Thanks @stloyd.
However it only fixes the second and third issues related in #2867. The filesystem provider bug is much more annoying!

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

by stloyd at 2011/12/17 05:38:13 -0800

@jalliot Did you cleaned profiler dir after update to latest master commit ? This is mentioned and kinda known BC break... I'm asking because I cannot reproduce this issue.

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

by jalliot at 2011/12/17 08:17:21 -0800

@stloyd It has nothing to do with your recent PR adding HTTP method as I had the bug even before that.
I've tested on a fresh Symfony (master) install (before and after the merge) and have the bug each time.
I thought maybe it was related to some of the bundles I installed but the bug occurs even in a freshly installed SE.
2011-12-18 14:39:41 +01:00
Fabien Potencier
bbec4bb32b merged branch canni/fix_type_hint (PR #2912)
Commits
-------

e417153 [BugFix][Console] Fix type hint for output formatter

Discussion
----------

[BugFix][Console] Fix type hint for OutputFormatter in OutputStream constructors

I consider this as a bug, cause it disables ability to change formatter implementation

BugFix: yes
Feature addition: no
Sysmfony2 test pass: yes

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

by fabpot at 2011/12/18 00:23:05 -0800

It's not a bug fix as existing code that extend these classes will now fail.

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

by stof at 2011/12/18 03:51:38 -0800

@fabpot does the constructor enforces its signature for child classes ? I don't think so.
2011-12-18 14:37:49 +01:00
Fabien Potencier
997f354d53 tweaked the README files 2011-12-18 14:22:28 +01:00
Fabien Potencier
0f2caf1106 merged branch lsmith77/component_readmes (PR #2561)
Commits
-------

1e370d7 typo fix
93d8d44 added some more infos about Config
27efd59 added READMEs for the bridges
34fc866 cosmetic tweaks
d6af3f1 fixed README for Console
6a72b8c added basic README files for all components

Discussion
----------

added basic README files for all components and bridges

heavily based on http://fabien.potencier.org/article/49/what-is-symfony2 and the official Symfony2 documentation

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

by jmikola at 2011/11/03 13:36:07 -0700

Great work. For syntax highlighting on the PHP snippets, you could add "php" after the three backticks.

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

by lsmith77 at 2011/11/03 13:41:29 -0700

done

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

by stealth35 at 2011/11/03 13:49:31 -0700

Nice job, but you also need to add `<?php`

ex :

``` php
<?php
use Symfony\Component\DomCrawler\Crawler;

$crawler = new Crawler();
$crawler->addContent('<html><body><p>Hello World!</p></body></html>');

print $crawler->filter('body > p')->text();
```

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

by lsmith77 at 2011/11/03 13:56:57 -0700

done

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

by ericclemmons at 2011/11/03 19:57:57 -0700

@lsmith77 Well done!  This makes consumption of individual components that much easier, *especially* now that `composer.json` files have been added.

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

by lsmith77 at 2011/11/04 01:18:23 -0700

ok .. fixed the issues you mentioned @fabpot

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

by lsmith77 at 2011/11/11 15:00:27 -0800

@fabpot anything else left? seems like an easy merge .. and imho there is considerable benefit for our efforts to spread the word about the components with this PR merged.

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

by drak at 2011/11/11 18:54:13 -0800

You know, it might be a nice idea to put a link to the documentation for each component if there is some at symfony.com

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

by lsmith77 at 2011/11/12 00:59:14 -0800

i did that in some. but i might have missed a few places.
On 12.11.2011, at 03:54, Drak <reply@reply.github.com> wrote:

> You know, it might be a nice idea to put a link to the documentation for each component if there is some at symfony.com
>
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/symfony/symfony/pull/2561#issuecomment-2715762

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

by breerly at 2011/11/21 10:28:36 -0800

Pretty excited with this.

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

by dbu at 2011/11/24 00:02:50 -0800

is there anything we can help with to make this ready to be merged?

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

by lsmith77 at 2011/12/18 02:39:23 -0800

@fabpot: seriously .. if you are not going to deliver something "better" and don't provide a reason what is wrong with this .. then its beyond frustrating. i obviously do not claim that these README's are perfect (and certainly still no replacement for proper documentation), but I do claim that in their current form they are a radical step forward to potential users of the Symfony2 components.
2011-12-18 12:42:02 +01:00
Dariusz Górecki
e417153e49 [BugFix][Console] Fix type hint for output formatter 2011-12-17 22:55:00 +01:00
Joseph Bielawski
d1fa8cc1cc [WebProfiler] Fix some design glitches (closes #2867) 2011-12-17 11:44:50 +01:00
Fabien Potencier
108cd50ac9 merged branch stloyd/set-cookie-fix (PR #2889)
Commits
-------

5c41ec9 [HttpKernel][Client] Only simple (name=value without any other params) cookies can be stored in same line, so lets add every as standalone to be compliant with rfc6265

Discussion
----------

[HttpKernel][Client] Set cookie fix

Bug fix: yes
Feature addition: no
Backwards compatibility break: no(?)
Symfony2 tests pass: yes
Fixes the following tickets: #2881

Only simple cookies can be stored in same line:

* Used by now (__wrong__): `Set-Cookie: name1=value, name2=value`
* Proper according to RFCs: `Set-Cookie: name1=value; name2=value`

So lets add every as standalone ([next header](http://tools.ietf.org/html/rfc6265#section-3.1)) to be compliant with [RFC6265](http://tools.ietf.org/html/rfc6265). This fixes #2881.
2011-12-17 11:09:03 +01:00
Fabien Potencier
62e37dd807 merged branch stloyd/local_stub_cs (PR #2890)
Commits
-------

ed353da [Locale][Stub] Fixed CS

Discussion
----------

[Locale][Stub] Fixed CS

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

Just fixed code according to Symfony2 CS.
2011-12-17 11:06:15 +01:00
Fabien Potencier
f03692a507 fixed functional tests so that the cache/logs are specific to one version of Symfony (to avoid weird side effects) 2011-12-17 11:02:17 +01:00
Fabien Potencier
8579c6314b merged branch drak/frameworkbundle_moretests (PR #2904)
Commits
-------

9b8cdab [FrameworkBundle] Prove client insulation and non-insulation works in session tests.
ce66548 [FrameworkBundle] Add tests to prove functional testing works with simultaneous clients.
ff0412a [FrameworkBundle] Small changes to test setup.

Discussion
----------

[FrameworkBundle] Added functional tests to prove multiple clients and client insulation.

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
References: #2898
Todo: -

@fabpot: I don't know what happened with the previous PR #2989 - seemed like some weird corruption as the tests passed locally and on travis except until after I fetched from the repo.  I suspect something was corrupted.  I asked @Seldaek to confirm the tests pass on his local setup before I submitted this PR.  I only got rid of the errors locally after recloning the repo!

http://travis-ci.org/#!/drak/symfony/builds/413515

[![Build Status](https://secure.travis-ci.org/drak/symfony.png)](http://travis-ci.org/drak/symfony?branch=frameworkbundle_moretests)
2011-12-16 18:27:38 +01:00
Drak
9b8cdabf16 [FrameworkBundle] Prove client insulation and non-insulation works in session tests. 2011-12-16 14:30:02 +00:00
Drak
ce66548782 [FrameworkBundle] Add tests to prove functional testing works with simultaneous clients. 2011-12-16 14:29:52 +00:00
Drak
ff0412a2bd [FrameworkBundle] Small changes to test setup. 2011-12-16 20:45:29 +05:45
Fabien Potencier
af9ddc0f10 merged branch aboks/doctrine-profiler-view (PR #2897)
Commits
-------

662fdc3 [DoctrineBundle] Fixed incorrectly shown params

Discussion
----------

Doctrine profiler view

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -

After the changes in #2733, the parameters to Doctrine queries were
always shown as 'Array' in the profiler. This commit puts back the
yaml_encode that is still needed after all.
2011-12-16 11:14:41 +01:00
Arnout Boks
662fdc3a0e [DoctrineBundle] Fixed incorrectly shown params
After the changes in #2733, the parameters to Doctrine queries were
always shown as 'Array' in the profiler. This commit puts back the
yaml_encode that is still needed after all.
2011-12-16 08:08:01 +01:00
Fabien Potencier
9e38d6a18f [SwiftmailerBundle] fixed the send email command when the queue does not extends Swift_ConfigurableSpool 2011-12-15 19:10:17 +01:00
Joseph Bielawski
ed353da164 [Locale][Stub] Fixed CS 2011-12-15 13:03:21 +01:00
Joseph Bielawski
5c41ec9e4f [HttpKernel][Client] Only simple (name=value without any other params) cookies can be stored in same line, so lets add every as standalone to be compliant with rfc6265 2011-12-15 11:35:58 +01:00
Fabien Potencier
75dfc7945a merged branch drak/securitybundle_test (PR #2888)
Commits
-------

62f3dc4 [SecurityBundle] Changed environment to something unique.

Discussion
----------

[SecurityBundle] Fix name clash with functional tests

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -

Functional tests need a unique environment or it will produce class redeclare errors when multiple bundles are functional tested at the same time.
2011-12-15 11:31:09 +01:00
Fabien Potencier
202cefdb0b merged branch drak/frameworkbundle_sessiontest (PR #2887)
Commits
-------

ba7d810 [FrameworkBundle] Added functional tests.

Discussion
----------

[FrameworkBundle] Added functional tests

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -

Tests session attributes and flash messages APIs in functional practice. These tests increase coverage of this important area and make any future work on sessions much more reliable.
2011-12-15 11:30:50 +01:00
Drak
ba7d8104f8 [FrameworkBundle] Added functional tests.
Added functional tests to prove session attributes and flashes in practice.
2011-12-15 15:49:20 +05:45
Fabien Potencier
dc03371009 merged branch stloyd/missing_use_statement (PR #2886)
Commits
-------

8069ea6 [Form] Added missing use statements (closes #2880)

Discussion
----------

[Form] Missing use statements

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #2880
2011-12-15 10:07:03 +01:00
Joseph Bielawski
8069ea69dd [Form] Added missing use statements (closes #2880) 2011-12-15 10:01:35 +01:00
Fabien Potencier
f5f99a75c8 merged branch jmikola/2.0-inputDefinition (PR #2885)
Commits
-------

d5a1343 [Console] Improve input definition output for Boolean defaults

Discussion
----------

[Console] Improve input definition output for Boolean defaults

This addresses an annoyance I had with command help printing `(default: )` for arguments and options that default to `false`.

```
Bug fix: no
Feature addition: yes
Backwards compatibility break: no (documentation text/XML output is slightly changed)
Symfony2 tests pass: yes
```
2011-12-15 07:18:57 +01:00
Jeremy Mikola
d5a1343c29 [Console] Improve input definition output for Boolean defaults
Previously, Boolean defaults were printed as strings, which lead to true and false being printed as "1" and "", respectively. With this change, they are now printed as "true" and "false".
2011-12-15 01:07:36 -05:00
Drak
62f3dc4c49 [SecurityBundle] Changed environment to something unique.
If you run functional tests from different bundles you it will cause a redeclare error
because the DIC appKernel name is not unique.
2011-12-15 05:36:58 +00:00
Fabien Potencier
2312f93b77 merged branch alexandresalome/fix-exception-new-line (PR #2870)
Commits
-------

f3e92c4 [TwigBundle] Fix the exception message escaping

Discussion
----------

[2.0][TwigBundle] Fix exception new line

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
2011-12-14 19:17:17 +01:00
Fabien Potencier
dbce8d9cf9 merged branch arnogeurts/PR-2688 (PR #2879)
Commits
-------

7ac43fc 2879: missing space between catch and the brace
0900ecc #2688: Entities are generated in wrong folder (doctrine:generate:entities Namespace)

Discussion
----------

[Console] [Doctrine] Fixed: Entities are generated in wrong folder (doctrine:generate:entities Namespace)

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: no
Fixes the following tickets: 2688
Todo: -

See PR 2746 for the description of the bug.

Bug-description:
Running the command "$php app/console doctrine:generate:entities [bundle name]" from the commandline throws an exception when the entities do not exist yet. Because metadata of the entity class could not be retrieved.

Bugfix:-description:
Fall back to bundle metadata when no entity metadata could not be retrieved.
2011-12-14 19:15:41 +01:00
Arno Geurts
7ac43fc91c 2879: missing space between catch and the brace 2011-12-14 12:20:07 +01:00
Arno Geurts
0900ecc895 #2688: Entities are generated in wrong folder (doctrine:generate:entities Namespace) 2011-12-14 11:19:02 +01:00
alexandresalome
f3e92c4cc1 [TwigBundle] Fix the exception message escaping 2011-12-14 00:31:21 +01:00
Fabien Potencier
9641c55d16 merged branch RapotOR/2.0-PR2504-squashed (PR #2868)
Commits
-------

4d64d90 Allow empty result; change default *choices* value to **null** instead of **array()**. - added *testEmptyChoicesAreManaged* test - `null` as default value for choices. - is_array() used to test if choices are user-defined. - `null` as default value in __construct too. - `null` as default value for choices in EntityType.

Discussion
----------

[Doctrine][Bridge] EntityType: Allow empty result; default `choices` value changed to null

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
References the following tickets: #2504

- added *testEmptyChoicesAreManaged* test
- `null` as default value for choices.
-  is_array() used to test if choices are user-defined.
- `null` as default value in __construct too.
- `null` as default value for choices in EntityType.

I squashed commits from PR #2504 as requested.
2011-12-13 22:28:46 +01:00
Cédric Lahouste
4d64d90f13 Allow empty result; change default *choices* value to **null** instead of **array()**.
- added *testEmptyChoicesAreManaged* test
- `null` as default value for choices.
- is_array() used to test if choices are user-defined.
- `null` as default value in __construct too.
- `null` as default value for choices in EntityType.
2011-12-13 18:12:20 +01:00
Fabien Potencier
12ea7568a0 merged branch pulzarraider/explode_optimalisation (PR #2782)
Commits
-------

cd24fb8 change explode's limit parameter based on known variable content
b3cc270 minor optimalisations for explode

Discussion
----------

[FrameworkBundle][CssSelector][HttpFoundation][HttpKernel] [Security][Validator] Minor optimizations for "explode" function

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -

I added limit parameter in some places, where it may be usefull. I did not check the context of what values may have been exploded. So to not break anything, I added +1 to limit parameter.

If you find out that in some places limit (or limit+1) is not important or meaningless, write a comment please and I will fix it.

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

by fabpot at 2011/12/07 06:56:49 -0800

Adding +1 just to be sure to not break anything is clearly something we won't do. What is the benefit of doing that anyway?

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

by pulzarraider at 2011/12/07 13:50:24 -0800

The main idea of making this PR was to notify about some places that may run faster with just adding one parameter to explode function.

If in code is someting like: ```list($a, $b) = explode(':', $s);```
Function ```explode``` will create n-items (depends on ```$s```), but we need in code only the first two items. There is no reason to let ```explode``` create more items in memory that are NEVER used in our code. The limit parameter is there for these situations, so let's use it.

I know that it is microoptimization and may look unimportant, but we are writing a framework - so people expect that code will be as fast as possible without this kind of mistakes.

As I've noticed above, I know that +1 is not ideal solution, but the fastest without debugging the code. I expect that someone (with good knowledge of that code) will look at it and write in comments if variable may contain 1 comma (dot or someting on what is doing the explode) or maybe 2 in some situations or more.

Anyway, +1 will not break anything, because same items are created as it is now, but no unnecessary item is created.

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

by fabpot at 2011/12/07 23:14:59 -0800

I'm +1 for adding the number to avoid problems but I'm -1 on the optimization side of things as it won't optimize anything.

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

by helmer at 2011/12/08 12:46:49 -0800

*.. The main idea of making this PR was to notify about some places that **may** run faster ..*

I am also unsure the optimization is really an optimization, care to benchmark (with meaningful inputs)? As for the limit+1 thing, why would you want to +1 it? The number of ``list`` arguments should always reflect the ``limit`` parameter, no?

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

by pulzarraider at 2011/12/08 23:11:34 -0800

@helmer please try this simple benchmark:

```
<?php

header('Content-Type: text/plain; charset=UTF-8');
define('COUNT', 10000);

$source_string = 'aaaaaaaaaaaaaaaaaaaa:bbbbbbbbbbbbbbbbbbbbb:cccccccccccccccccccccccc:dddddddddddddddddddddd:eeeeeeeeeeeeeeeeeeeeeeeee:fffffffffffffffffffffffffff';

$start = microtime(true);
for ($i = 0; $i < COUNT; $i++) {
    list($a, $b) = explode(':', $source_string);
}
$end = microtime(true)-$start;
echo 'without limit: '.$end."\n";

$start = microtime(true);
for ($i = 0; $i < COUNT; $i++) {
    list($a, $b) = explode(':', $source_string, 2);
}
$end = microtime(true)-$start;
echo 'with limit:    '.$end."\n";
```

My results are:

```
without limit: 0.057228803634644
with limit:    0.028676986694336
```
That is 50% difference (with APC enabled).  Of course the result depends on the length of source string and if it's too short, the difference may be none or very very small. That's why I said, that it **may** run faster and is just a micro optimization.

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

by pulzarraider at 2011/12/08 23:18:12 -0800

@helmer And why +1? It depends on a code:

```
$source_string = 'aaaaaaaaaaaaaaaaaaaa:bbbbbbbbbbbbbbbbbbbbb:cccccccccccccccccccccccc';
list($a, $b) = explode(':', $source_string, 2);
var_dump($a, $b);
```

and

```
$source_string = 'aaaaaaaaaaaaaaaaaaaa:bbbbbbbbbbbbbbbbbbbbb:cccccccccccccccccccccccc';
list($a, $b) = explode(':', $source_string, 3);
var_dump($a, $b);
```
gives different results. That's why the content of the variable must be known.

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

by helmer at 2011/12/09 00:08:28 -0800

@pulzarraider Thanks for the benchmark, seems like a gain enough. Although, we are more likely having a scenario of:
``explode(':', 'a🅱️c')`` vs ``explode(':', 'a🅱️c', 3)`` with a ``COUNT`` of 10, where the difference is not even in microseconds anymore :)

The limit addition alters the behaviour though, ie suddenly you can define a controller [logical name](http://symfony.com/doc/current/book/routing.html#controller-string-syntax) as ´´AcmeBlogBundle:Blog:show:something``, and things go downhill from there on.

All that aside, I'm +1 for setting the limit to the exact number of ``list`` parameters, but certainly not number+1, this is just too wtfy (as you said, this was a safety thing, but I reckon for this PR to be merged it needs to be +0).

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

by drak at 2011/12/09 08:28:58 -0800

Overall `list()` is ugly as it's not very explicit.  Even though it would mean extra lines, it's better to `explode()` then explicitly assign variables:

```
$parts = explode(':', $foo);
$name = $parts[0];
$tel = $parts[1];
```

`list()` is one of those bad relics from the PHP past...

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

by fabpot at 2011/12/11 10:07:47 -0800

@drak: why is `list` not explicit? It is in fact as explicit as the more verbose syntax you propose.

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

by pulzarraider at 2011/12/11 13:08:50 -0800

@drak: I agree with @fabpot. In speech of benchmarks ```list``` is faster then using a helper variable.

@fabpot, @helmer I've changed explode's limit to be correct (without +1) and removed some changes from this PR, where I can't find out what the content of variable may be. Unit tests pass, so I think it's ready for merge.
2011-12-13 17:39:32 +01:00