Commit Graph

1677 Commits

Author SHA1 Message Date
Adrian Rudnik
08bbb1938b UnitTest 2011-06-29 18:22:32 +02:00
Jordi Boggiano
418d6a0ead [Routing] Fix syntax error when dumping routes with single quotes in the requirements or pattern 2011-06-29 03:40:17 +02:00
Jordi Boggiano
2b5e22d961 [Routing] Fix ApacheDumper when a space appears in a default value 2011-06-29 03:40:13 +02:00
Jordi Boggiano
761724ae57 [Routing] Adjust urlescaping rules, fixes #752
Only + and % are now encoded in generated routes, since they are the only characters that, if not encoded, could cause problems/conflicts when decoded. Namely + turns into a space, and % followed by numbers could do funky things.

The matcher decodes everything which works since nothing will have %NN without being escaped, and + are escaped as well.
2011-06-29 03:39:54 +02:00
Fabien Potencier
c3bb214e94 [DependencyInjection] removed injection for protected and private properties 2011-06-27 08:28:54 +02:00
Antoine Hérault
164aea448a [Security] Add tests for the channel listener 2011-06-26 11:56:08 +02:00
Antoine Hérault
d51cbc09b4 [Security] Remove useless attribute in basic authentication listener & test it 2011-06-26 11:29:43 +02:00
Antoine Hérault
91e6dc9fef [Security] Add tests for the anonymous authentication listener 2011-06-26 11:28:17 +02:00
Antoine Hérault
3c2affb7e7 [Security] Update access listener constructor's prototype and add tests 2011-06-26 10:28:10 +02:00
Antoine Hérault
81afd77ed9 [Security] Add tests for the firewall map 2011-06-26 00:26:42 +02:00
Fabien Potencier
fc1808643f merged branch Herzult/fixHttpBasicAuthEntryPoint (PR #1439)
Commits
-------

e43cd20 [Security] Fix http retry authentication entry point
cb3ad8b [Security] Fix http form authentication entry point
1dfb637 [Security] Fix http digest authentication entry point
920a209 [Security] Fix http basic authentication entry point

Discussion
----------

[Security] Fix the http authentication entry points and test them
2011-06-25 19:41:21 +02:00
Antoine Hérault
aa6ae33765 [Security] Remove useless attribute & var in firewall 2011-06-25 19:04:35 +02:00
Antoine Hérault
e43cd206b0 [Security] Fix http retry authentication entry point 2011-06-25 18:19:13 +02:00
Antoine Hérault
cb3ad8bb79 [Security] Fix http form authentication entry point 2011-06-25 18:01:08 +02:00
Antoine Hérault
1dfb637858 [Security] Fix http digest authentication entry point 2011-06-25 17:43:23 +02:00
Antoine Hérault
920a209bbc [Security] Fix http basic authentication entry point 2011-06-25 17:15:23 +02:00
Fabien Potencier
1dcd48486d merged branch stloyd/datetime_fix (PR #1426)
Commits
-------

f4c7333 Fix populating seconds when option "with_seconds" is set to false

Discussion
----------

[Form][DateTimeType] Fix invalid data when "with_seconds" = false

Fix populating seconds when option `with_seconds` is set to `false`.
2011-06-25 13:28:57 +02:00
stloyd
f4c7333bca Fix populating seconds when option "with_seconds" is set to false 2011-06-24 16:35:45 +02:00
stloyd
0d3fb6f26c Missing quote in IniFileLoader exception 2011-06-24 16:28:15 +02:00
Fabien Potencier
46680d4565 [FrameworkBundle] switched back to Doctrine Common 2.1 2011-06-24 14:11:31 +02:00
stloyd
3c2539fccb Throw exception when "date_widget" option is not equal to "time_widget" 2011-06-23 17:19:41 +02:00
stloyd
7bc19f9675 Added to DateTimeType extension possibility to render form as single_text (similar to DateType option) (issue #1323 it requires fix for #1205) 2011-06-23 17:02:55 +02:00
Fabien Potencier
59f85b4a6e merged branch stloyd/timetype (PR #1354)
Commits
-------

4e3406d Sync with master and clean up
ad5d2c1 Added to `TimeType` extension possibility to render form as `single_text` (similar to DateType option) (issue #1205) Adjusted `DateTimeType` to allow usage of this new feature

Discussion
----------

[Form][TimeType] Added possibility to render form as "single_text"

Added to `TimeType` extension possibility to render form as `single_text` (similar to `DateType` option) (issue #1205)
Adjusted `DateTimeType` to allow usage of this new feature

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

by ouardisoft at 2011/06/17 03:41:18 -0700

+1

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

by stloyd at 2011/06/21 01:05:51 -0700

@fabpot Any decision about this one ? I'm asking because I also have similar fix for #1323 but it requires this one ;-)

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

by fabpot at 2011/06/22 23:32:08 -0700

@stloyd: Can you rebase to master?

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

by stloyd at 2011/06/23 05:03:44 -0700

@fabpot Done.
2011-06-23 14:19:20 +02:00
stloyd
4e3406d633 Sync with master and clean up 2011-06-23 14:01:11 +02:00
Fabien Potencier
f322a4a99d fixed CS 2011-06-23 13:39:36 +02:00
Fabien Potencier
f406e3d6a3 merged branch Seldaek/http (PR #1414)
Commits
-------

7db0b95 [HttpKernel] Removed unnecessary strtoupper
0891c57 [HttpKernel] Added test
1350645 [HttpKernel] Uppercased a few http methods
05c9906 [HttpKernel] Suppress response content for 304 responses out of the cache

Discussion
----------

HttpCache changes for 304 responses

Fixes #1413
2011-06-23 12:32:09 +02:00
Jordi Boggiano
0891c578b2 [HttpKernel] Added test 2011-06-23 11:55:37 +02:00
stloyd
ad5d2c13e1 Added to TimeType extension possibility to render form as single_text (similar to DateType option) (issue #1205)
Adjusted `DateTimeType` to allow usage of this new feature
2011-06-23 11:40:24 +02:00
Fabien Potencier
0938f7ed54 merged branch lenar/non-blocking-process (PR #1403)
Commits
-------

2d29a82 New test for Process, testing stdout and stderr at different stream sizes

Discussion
----------

Make run() fully non-blocking and fix potential other problems

Multiple changes:

1) make writing to process non-blocking too - otherwise there might be increased possibility for buffer deadlock
given big enough input data. Also now it's guaranteed that all stdin data will be written.

2) get rid of fgets() - fgets() isn't really good function to use in case of non-blocking sockets. Data loss possible.

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

by fabpot at 2011/06/22 07:11:55 -0700

Does it make https://github.com/symfony/symfony/pull/1365 obsolete?

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

by lenar at 2011/06/22 14:08:14 -0700

@fabpot: After reading, I really don't know. Let's hope. But ...

I now improved Process tests a bit to test stdout, stderr with different stream sizes and different
behaviours of child processes. Added it to non-blocking-process branch, commit 2d29a82412.
In my case, nothing fails, but maybe this helps other people. Or Windows people - I myself cannot test on Windows.

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

by fabpot at 2011/06/22 22:59:55 -0700

These tests pass on my Linux box but fail on my Mac.

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

by fabpot at 2011/06/22 23:05:14 -0700

Actually, on the Mac, the tests behave correctly but the exit code is `-1` instead of `0`.

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

by lenar at 2011/06/23 01:23:51 -0700

Could you check if the $this->status['running'] (after call to proc_get_status()) is true in the case you get -1.

On my linux I got it -1 couple of times. 99% of time it doesn't happen. I theorized it's because sometimes the child
process isn't finished enough and finally I got confirmation too that in case of -1 the process is still running (stats['running'] === true).

But it's really almost unreproducible on my Linux. So if you have this value every time it might be easier for you to find solution.

What comes into my mind:

1) maybe we should poll, let's say if process is still running we usleep(1000) and the try proc_get_status() again until not running. Maybe up to a 1 sec.

2) maybe, if the process is still running we can trust the return value subsequently given by proc_close()?

Or maybe there's some other problem on Mac.
2011-06-23 11:33:28 +02:00
Fabien Potencier
8ccebc4631 [DomCrawler] fixed Link::getUri() method for anchors 2011-06-23 08:20:13 +02:00
Fabien Potencier
88c8119152 merged branch asm89/domcrawler_link (PR #1410)
Commits
-------

d49e306 [DomCrawler] Fixed handling of relative query strings as links
a4451b4 [DomCrawler] Added tests for links starting with ?foo

Discussion
----------

[DomCrawler] Fixed handling of relative query strings as links

The link object concatenates links containing only a query string to the current URI. This shouldn't happen if the current URI already contains a query string.

This PR fixes the incorrect behavior (tests included).
2011-06-23 08:09:00 +02:00
Fabien Potencier
6de97c56e1 [Form] made required part of the algorithm to determine if an empty value should be added to a choice 2011-06-23 07:56:13 +02:00
Fabien Potencier
a395582605 merged branch stloyd/choicetype (PR #1371)
Commits
-------

7783a05 Removed unused code from DateType Additional tests for ChoiceType and DateType based code
cdd39ac Added ability to set "empty_value" for `DateTimeType`, `DateType` and `TimeType` Additional tests covering added code
af4a7d7 More tests and more compatible code, with some suggestions from @helmer
527b738 Test covered version of fix for issue #1336

Discussion
----------

[Form] Added ability to set "empty_value" for choice list

Hey,

This PR is similar to #1336, but this one is fully test covered and have few change in behavior:

- if choice field is not set as non-required, `empty_value` is not added automaticly,
- also `empty_value` is not set if field have option `multiple` or `expanded`,
- `empty_value` for `DateType` and `TimeType` can be set "global" or per field, i.e.:

```
$builder->add('date', 'choice', array('required' => false, 'empty_value' => array('day' => 'Choose day')));
```

- `DateType` and `TimeType` code was cleaned a bit,
- added missing option to set up choice list as required when using PHP templates

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

by stloyd at 2011/06/20 04:55:45 -0700

@fabpot I'm just not sure is that change with removing "auto-adding" of `empty_value` is good (probably BC)

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

by lenar at 2011/06/20 05:24:02 -0700

Now this is a really nice way to hijack work done by others. Really encourages newcomers. Gratz!

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

by fabpot at 2011/06/20 05:57:40 -0700

@lenar: if the code in this PR is yours (at least partly), I'm not going to merge it. @stloyd, can you clarify this issue with @lenar? Thanks.

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

by lenar at 2011/06/20 06:21:11 -0700

It's @helmer's mostly, not mine, but the issue stays.

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

by fabpot at 2011/06/20 06:26:15 -0700

No matter who the code belongs to, Git allows us to keep track of all contributors. So, we need to do our best to not loose any code ownership.

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

by helmer at 2011/06/20 06:58:03 -0700

I do not care much for ownership, just that this kind of cooperation (or lack thereof) is kind of exhausting. Closed #1336.

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

by stloyd at 2011/06/20 07:47:53 -0700

@fabpot, @lenar: This PR is inspired by #1336, made by @helmer, but after looking at his code and talking with him, we cant (IMO) get an consensus. So I wrote this PR as an another way to fix issue described in #1336.

__Summary__: I don't think this one is better than fix at #1336, it's more like another approach to fix that issue.

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

by helmer at 2011/06/20 08:15:59 -0700

@stloyd: I actually think your variant is better, so good job there, thanks.

It just ain't nice to:
1) Comment on my changes being useless due to lack of tests
2) Writing brand new testsuite from your perspective that "proves" my approach is "wrong" (while ignoring my answers, why I did something precisely like I did, which I did in sync with @fabpot comments on his first attempt to improve the issue)
3) Saying my PR is broken because your new tests against it fail
4) Changing functionality to "fix" something that was not really broken

Other than that, I wanted to contribute a few lines to improve something relatively simple, and it ended up in a huge mess with more lost hours than I planned to spend on it.

On the bright side, we ended up with something good (:

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

by stloyd at 2011/06/20 08:32:30 -0700

@helmer: 1) & 2) Sorry for that "bad language", but you get me wrong a bit. Tests was written for code in master (there was no problem to change them to work with your POV). 3) Same as before, you can adopt tests easily, but never mind. Maybe later we could cooperate better ;-)
About 4) I mentioned it in description of this PR and that was point I was disagreeing with you (also about how "default" options are adopted in fields) :-)
2011-06-22 22:22:54 +02:00
Fabien Potencier
74d539db25 merged branch vicb/form/php-theme (PR #1397)
Commits
-------

5d46e63 [Form] Add the FormHelper configuration
a43fad4 [Form] Improve unit tests for rendering
1cb2129 [FrameworkBundle][Form] Adding a cache to FormHelper::lookupTemplate()
f39ce67 [Form][FrameworkBundle] PHP theming

Discussion
----------

[2.1] RFC [Form] Php theming

This PR implements theming support for the php engine.

It works similarly as the twig theming with themes being folders and blocks being individual files.

There are probably a few things to tune before this can get merged:

### Theme naming

The current format is "\<Bundle\>:\<Controller\>" i.e. "FrameworkBundle:Form".

Is this ok or could you imagine something better ?

### Div and Table theme folders

Currently "FrameworkBundle\\Resources\\views\\Form" and "FrameworkBundle\\Resources\\views\\FormTable"

Is this ok or anything better ?

### Form helper configuration

I am not sure if the configuration is at the best possible location:

```
framework:
    templating:
        form:
            resources: [themeA, themeB]
```

Any better idea ?

There is a [thread on the ml](http://groups.google.com/group/symfony-devs/browse_thread/thread/9b3f131fe116b511)
2011-06-22 22:03:25 +02:00
Alexander
a4451b48cb [DomCrawler] Added tests for links starting with ?foo 2011-06-22 21:49:21 +02:00
lenar
2d29a82412 New test for Process, testing stdout and stderr at different stream sizes 2011-06-22 22:47:44 +03:00
Fabien Potencier
37521b6fd7 [HttpFoundation] forced Response content to be string 2011-06-22 15:22:06 +02:00
Fabien Potencier
b2b0c4a98f merged branch Seldaek/response (PR #1387)
Commits
-------

7af003b [HttpFoundation] Allow stringable objects and numbers in response body + added tests
8126fb7 [HttpFoundation] Ensure response body is string, fixes #1378

Discussion
----------

[HttpFoundation] Ensure response body is string, fixes #1378

The issue in #1378 is clearly just a misuse of the class due but the error it triggers is confusing. This hopes to fix that.

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

by Seldaek at 2011/06/21 04:08:40 -0700

Added tests and support for __toString + numbers (kinda pointless but well..)
2011-06-22 15:20:49 +02:00
Fabien Potencier
1436d8dab7 [Security] added an HttpUtils class to manage logic related to Requests and Responses
This change removes the need for the {_locale} hack.
Now, all paths in the Security component can be:

* An absolute path (/login)
* An absolute URL (http://symfony.com/login)
* A route name (login)

So, if you want to use a path that includes a global parameter (like _locale),
use a route instead of a path.
2011-06-22 14:47:19 +02:00
Victor Berchet
a43fad409b [Form] Improve unit tests for rendering 2011-06-22 10:27:21 +02:00
Fabien Potencier
e717c99f3b merged branch vicb/form/theming (PR #1369)
Commits
-------

2c1108c [Form] Revert the ability to override anything else than the text of the label while rendering a row
da467a6 [Form] Fix the exception message when no block is found while rendering
8670995 [Form] Optimize rendering when the block to render is known
41e07c9 [Form] Optimize rendering
ee5d975 [Form] Remove a test which is no more relevant (after recent FileType refactoring)
f729c6b [Form] Add the ability to override label & widget options when rendering a row
e09ae3f [Form][FrameworkBundle] Make FormHelper::renderSection() recursively callable, introduce FormHelper::renderBlock()
e43fb98 [Form][TwigBridge] Make FormExtension::render() recursively callable to ease theming

Discussion
----------

[Form] Some refactoring of the rendering

# First two commits

## FormExtension::render() can now be called recursively.

The main use case is theming support in for collections. Let's consider that you have a collection of `CustomType`, the type hierarchy while rendering the proto would be `field < form < custom < prototype`. Before this change any theme applied to your custom type (i.e. a `custom_row` block) would not have been taken into account while rendering the prototype because of the structure of the `prototype_row` block:

```html
{% block prototype_row %}
{% spaceless %}
    <script type="text/html" id="{{ proto_id }}">{{ block('field_row') }}</script>
{% endspaceless %}
{% endblock prototype_row %}
```
which skip the `custom_row` block rendering to fallback to the `field_row` block rendering.

With this PR `prototype_row` recursively calls `FormExtension::render()`

```html
{% block prototype_row %}
{% spaceless %}
    <script type="text/html" id="{{ proto_id }}">{{ form_row(form) }}</script>
{% endspaceless %}
{% endblock prototype_row %}
```

this has for effect to render the block for the parent type (i.e. `custom_row`)

## FormHelper

The `FormHelper` has been updated to more closely match the `FormExtension` architecture and the templates have been modified accordingly. `echo $view['form']->renderBlock(<block name>)` is the php equivalent of `{{ block(<block name>) }}`.

The attributes are now rendered using a template rather than by the `FormHelper::attributes()` method.

Several templates have been fixed.

# Third commit

The `$varStack` property was used to forward options to the label and the widget when rendering a row. The implementation was not working as expected. The proposed way to override label and widget options is to pass these options in the `label` and `widget` keys while callinf `render_row`.

That would be:
`{{ form_row(form.field, {"attr": {<row attributes>}, "label" : {"label": <text>, "attr": {<label attr>}}, "widget" : { "attr" : {<widget attributes}} } }}`

So there is now the ability to set attributes for the row (`<div>` or `<tr>`).

This has been discussed on [the mailing list](http://groups.google.com/group/symfony-devs/browse_thread/thread/17754128ba480545). **I would like to find a compromise with @Seldaek before this gets merged**

The `$varStack` property is now only used when recursively calling `FormExtension::render()`

# Notes

I have preferred to submit several commits in order to ease review and to keep some history.

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

by stof at 2011/06/20 05:20:56 -0700

@vicb On a side note, do you think it would be possible to support form theming in PHP templates too ? Currently, the only way to customize the rendering of forms when using PHP templates is to overwrite the FrameworkBundle's templates, and this impacts all forms. This makes the PHP rendering far less powerful than the Twig one.
I don't know the Form rendering and the PHPEngine well enough to know if it is feasible for 2.1 or not.

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

by vicb at 2011/06/20 05:35:11 -0700

@stof I hope to make it possible but I need a little bit more thinking to find the best possible solution which should not look like a hack.

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

by vicb at 2011/06/21 01:13:10 -0700

This should not be merged yet, it might have some issue with the variable stack. I am working on it.

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

by vicb at 2011/06/21 01:41:11 -0700

Sorted out the issue, it was linked to some local _optimization_, the code of this PR is ok.

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

by vicb at 2011/06/21 02:01:24 -0700

I have pushed a [POC of php theming based on this PR](https://github.com/vicb/symfony/commits/form%2Fphp-theme) to my repo - it is lacking a configuration and cache layer.

I have open [a thread on the ml](http://groups.google.com/group/symfony-devs/browse_thread/thread/9b3f131fe116b511) to discuss this.

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

by vicb at 2011/06/21 23:40:21 -0700

@fabpot fixed in the last commit.
2011-06-22 09:12:24 +02:00
Victor Berchet
2c1108ce6b [Form] Revert the ability to override anything else than the text of the label while rendering a row 2011-06-22 08:36:45 +02:00
Fabien Potencier
318ae129ad merged branch Seldaek/url_validator (PR #1370)
Commits
-------

159fc0e [Validator] Added symbols to IDNs validation
c827faf [Validator] Add support for IDNs and custom TLDs

Discussion
----------

[Validator] Add support for IDNs and custom TLDs

Minor changes to allow for IDNs and [custom TLDs](http://news.softpedia.com/news/ICANN-Approves-New-Custom-Generic-Top-Level-Domains-Like-google-bank-206977.shtml). This is the only sane way to support everything in a timeless manner.

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

by stealth35 at 2011/06/20 04:32:09 -0700

maybe it should be check the host with idn_to_ascii (if function exists, maybe it's should recreate un punycode en/decoder in the stub)

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

by mvrhov at 2011/06/20 04:40:10 -0700

/me :faceslap.
Haven't seen the link in PR

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

by Seldaek at 2011/06/20 04:40:40 -0700

@mvrhov: Yup, that's what pushed me to reconsider adding this.

@stealth35: I'm not sure if this is needed. I don't want this to be too strict, with another validator or with an extra option I think we can make a check that the domain actually exists, or do a GET / on it or something, but this just checks validity of the syntax.

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

by stealth35 at 2011/06/20 04:48:05 -0700

I understand :)
what about funny IDN like : [☎.com] (http://xn--y3h.com/) ?

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

by Seldaek at 2011/06/20 04:53:19 -0700

@stealth35: Fixed

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

by stealth35 at 2011/06/20 04:56:18 -0700

it's seem great,for acceptable chars [RFC] (http://www.faqs.org/rfcs/rfc3490.html) said (with UseSTD3ASCIIRules option) :

	(a) Verify the absence of non-LDH ASCII code points; that is, the
         absence of 0..2C, 2E..2F, 3A..40, 5B..60, and 7B..7F.
2011-06-21 18:10:17 +02:00
Jordi Boggiano
7350109f6e Renamed core.* events to kernel.* and CoreEvents to KernelEvents 2011-06-21 16:35:14 +02:00
Jordi Boggiano
7af003b753 [HttpFoundation] Allow stringable objects and numbers in response body + added tests 2011-06-21 13:06:36 +02:00
Fabien Potencier
5744b520f7 [Console] added unit tests for DialogHelper 2011-06-20 19:05:56 +02:00
stloyd
7783a050c2 Removed unused code from DateType
Additional tests for ChoiceType and DateType based code
2011-06-20 18:45:30 +02:00
Jordi Boggiano
159fc0edf0 [Validator] Added symbols to IDNs validation 2011-06-20 13:52:36 +02:00
Jordi Boggiano
c827faf694 [Validator] Add support for IDNs and custom TLDs 2011-06-20 12:57:46 +02:00
stloyd
cdd39ac3e2 Added ability to set "empty_value" for DateTimeType, DateType and TimeType
Additional tests covering added code
2011-06-20 12:56:16 +02:00
Victor Berchet
ee5d975783 [Form] Remove a test which is no more relevant (after recent FileType refactoring) 2011-06-20 12:29:04 +02:00
Victor Berchet
f729c6ba93 [Form] Add the ability to override label & widget options when rendering a row 2011-06-20 12:29:04 +02:00
Victor Berchet
e43fb989e3 [Form][TwigBridge] Make FormExtension::render() recursively callable to ease theming 2011-06-20 11:39:23 +02:00
Fabien Potencier
2e1747bf76 added more information about a resource in error and debug messages 2011-06-20 10:16:09 +02:00
Fabien Potencier
01ecaa4503 [Config] renamed FileLoaderImportException to FileLoaderLoadException and replaced some \InvalidArgumentException with this new exception class 2011-06-20 10:16:05 +02:00
stloyd
af4a7d77d9 More tests and more compatible code, with some suggestions from @helmer 2011-06-20 09:54:47 +02:00
stloyd
527b7383b9 Test covered version of fix for issue #1336 2011-06-20 09:54:47 +02:00
Fabien Potencier
38fa4e65dc fixed tests 2011-06-20 08:06:32 +02:00
Fabien Potencier
a1afb9961b [HttpKernel] sanitized log context in the log data collector 2011-06-19 13:20:00 +02:00
Fabien Potencier
1c14010ebf merged branch stof/loggerinterface (PR #1356)
Commits
-------

72d0ebe9 [WebProfilerBundle] Added the support of the the logging context in the template
410b3e0 [HttpKernel] Added the context in the LoggerInterface

Discussion
----------

context in the LoggerInterface

This adds the context in the LoggerInterface. The change is totally BC for people using the logger. However this affects people implementing the interface.

Note that this require Seldaek/monolog#33 for the implementation

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

by Seldaek at 2011/06/17 04:24:18 -0700

@fabpot: just ping me when you are merging this one, so I can merge in monolog and we avoid out-of-sync issues.

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

by stof at 2011/06/17 04:49:05 -0700

@Seldaek you can merge in Monolog when you want. Monolog is BC so merging it before the PR in Symfony2 does not break things.

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

by Seldaek at 2011/06/17 05:08:34 -0700

Ah right, I thought the interfaces wouldn't match, but PHP allows extra args it seems so I'll merge right now.

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

by stof at 2011/06/17 05:32:58 -0700

PHP allows extra *optionnal* args and it is the case here :)

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

by Seldaek at 2011/06/17 05:35:00 -0700

Well yes otherwise you break the interface. Anyway it's merged so @fabpot, anytime :)
2011-06-19 12:11:00 +02:00
Gábor Egyed
3cfff4bfbe [Console] fixed output formatter if content has line breaks 2011-06-18 02:07:44 +02:00
Fabien Potencier
610c1cc987 [Routing] removed AnnotationGlobLoader 2011-06-17 18:18:03 +02:00
Fabien Potencier
c536797cc9 [Routing] removed an optimization as it does not always work as expected 2011-06-17 14:28:23 +02:00
Christophe Coevoet
410b3e06d6 [HttpKernel] Added the context in the LoggerInterface 2011-06-17 12:26:12 +02:00
Fabien Potencier
fa9b920051 [Security] renamed UserProviderInterface::loadUser() to refreshUser() 2011-06-16 18:00:36 +02:00
Fabien Potencier
0805c6f963 [Validator] removed MX test (tests should work with Internet down) 2011-06-16 15:22:16 +02:00
Fabien Potencier
e24dce2ae7 merged branch stloyd/tests (PR #1318)
Commits
-------

edf4b87 Add missing "tearDown" functions, and some missing variable declaration (this saves for me almost 20MB when run all tests) Force AsseticBundle tests to use TestCase Fix test for DoctrineBundle to use TestCase
2b0c352 Increase code coverage for: YamlParser, Validators, PhpEngine + Helpers, HttpFoundation
b88a0a0 Remove tabs
99f9337 Additional tests for PhpEngine + Helpers More tests for UrlValidator
450ed85 Additional tests for DateTimeValidator, EmailValidator and UrlValidator

Discussion
----------

[Tests] Cleanup + make code coverage more happy

Hey,

this PR is a bit bigger than usually ;-) few infos what's inside:

- Fix `DoctrineBundle` test to use `TestCase`
- Mark tests as "incomplete" instead of commenting them out
- Increase code coverage for: `Validators`, `PhpEngine` + `Helpers`, `HttpFoundation` (`Session`, `Response` etc.)
- And my favourite ;-) added missing variables definition (also removed non-used) and `tearDown()` function (if needed) to tests which allowed me saved __~15MB__ when running all tests

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

by stloyd at 2011/06/16 05:58:21 -0700

@fabpot & @marcw It was rebased and cleanup up (I split up `AsseticBundle` symfony/AsseticBundle#1 change to new repo), and added few new tests.
2011-06-16 15:21:15 +02:00
Fabien Potencier
a7974ff43c renamed Form Twig templates to be more explicit 2011-06-16 15:20:12 +02:00
Fabien Potencier
1e992c299e merged branch vicb/di/typo (PR #1345)
Commits
-------

d89298d [DependencyInjection] Fix a typo

Discussion
----------

[DependencyInjection] Fix a typo
2011-06-16 15:08:37 +02:00
Fabien Potencier
42709c0ed8 merged branch stealth35/master (PR #1346)
Commits
-------

6436da2 added quote
7dc4e24 [Tests][Locale] locale supported INTL_ICU_VERSION, use ReflectionExtension to find ICU version

Discussion
----------

[Tests][Locale] locale supported INTL_ICU_VERSION, use ReflectionExtension to find ICU version

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

by igorw at 2011/06/16 03:44:25 -0700

Nice.

`INTL_ICU_VERSION` is PHP 5.4 only, right?

Also, it may be possible to use:

    $output = \ReflectionExtension::export('intl', true);

That way we can get rid of the output buffering.

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

by stloyd at 2011/06/16 03:49:22 -0700

@igorw It will be added in PHP 5.3.7 to.

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

by stealth35 at 2011/06/16 04:04:09 -0700

@igorw no export don't return the info table
2011-06-16 15:07:27 +02:00
stloyd
edf4b87dcb Add missing "tearDown" functions, and some missing variable declaration (this saves for me almost 20MB when run all tests)
Force AsseticBundle tests to use TestCase
Fix test for DoctrineBundle to use TestCase
2011-06-16 15:06:36 +02:00
stloyd
2b0c3526d8 Increase code coverage for: YamlParser, Validators, PhpEngine + Helpers, HttpFoundation
Revert failing asserts for UrlValidator

Mark as incomplete instead of commenting them out
2011-06-16 11:43:27 +02:00
stloyd
99f9337517 Additional tests for PhpEngine + Helpers
More tests for UrlValidator
2011-06-16 11:42:29 +02:00
stloyd
450ed85aa4 Additional tests for DateTimeValidator, EmailValidator and UrlValidator 2011-06-16 11:42:28 +02:00
stealth35
6436da25bc added quote 2011-06-16 02:31:09 -07:00
stealth35
7dc4e2430f [Tests][Locale] locale supported INTL_ICU_VERSION, use ReflectionExtension to find ICU version 2011-06-16 02:20:05 -07:00
Victor Berchet
d89298de7c [DependencyInjection] Fix a typo 2011-06-16 10:37:09 +02:00
Fabien Potencier
9d54633d2f fixed test 2011-06-15 16:03:10 +02:00
Fabien Potencier
1467a9bd9d [HttpFoundation] refactored Session 2011-06-15 16:01:57 +02:00
Fabien Potencier
570db760ae merged branch francisbesset/session_locale (PR #686)
Commits
-------

72c074a [Session] Used \Locale::setDefault() when the locale is setted

Discussion
----------

[Session] Used \Locale::setDefault() when the locale is setted

For `DateType` in form component (by example), `\Locale::getDefault()` is used to displayed the name of months.

If `\Locale` class is not used when the locale is setted in the session, the name of months is not in a good language.
This PR solves this problem.

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

by pborreli at 2011/05/29 09:13:44 -0700

what if user doesn't have intl extension ?

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

by stof at 2011/05/29 09:24:04 -0700

You should wrap the calls to ``\Locale::setDefault`` in a ``class_exist`` check to avoid issue when using the stub implementation (for which calling ``setDefault`` is forbidden).

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

by francisbesset at 2011/05/29 09:26:40 -0700

@pborreli: Symfony have a fake Locale class and this class is used only if the server haven't intl enabled.

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

by stof at 2011/05/29 09:33:16 -0700

@francisbesset Yeah, but ``setDefault`` throw a ``BadMethodCall`` exception.

and so the check has to use ``extension_loaded`` instead of ``class_exists``.

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

by fabpot at 2011/06/13 10:12:15 -0700

Ticket #1121 is related to this PR.

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

by fabpot at 2011/06/15 06:18:28 -0700

I have just tried another implementation where the locale is passed as an argument to the built-in types and some data transformers (via a `LocaleAwareInterface` interface). That works fine as forms are immutable now, but the solution is obviously more "complex" as we need to pass the locale to many different classes. Also, using `Locale::setDefault()` has an advantage over my method: you can change the locale whenever you want within a PHP process (which can be useful even if this is an edge case). Last, but not the least, if make sense to update the PHP Locale to the user locale.

So, to sum up, this patch is probably the best solution (easy and flexible enough).
2011-06-15 15:22:23 +02:00
Fabien Potencier
c7d5fd16e0 fixed CS 2011-06-15 13:46:46 +02:00
Fabien Potencier
aad2f5868a merged branch mvrhov/form_attributes_option (PR #1032)
Commits
-------

e8326aa Renamed attributes to attr to be consistent with templating.
c707467 Added support for additional attributes in Form types that list field as their parent.

Discussion
----------

[Form] Added support for additional attributes

Added support for additional attributes in Form types that list field as their parent.

This is needed particularity for html5 data and data- attributes support, unfortunately $options['data'] is already taken, so adding a general $options['attributes'] is the easiest solution without breaking BC.

Now I know that this will be tempting for some to stuck style and class attributes here also, but I'd rather not restrict the keys that are passed in.

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

by Seldaek at 2011/05/22 14:51:02 -0700

Maybe it should be called attr for consistency with the template stuff, or the other should be renamed attributes. Other than that, I'm +1, data-* attributes are awesome, and abusers will find ways to abuse things either way.

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

by mvrhov at 2011/05/22 21:48:01 -0700

Naming it attr also crossed my mind when I was signing off yesterday.
Along with the possibility to go the way xml attributes are handled when node is converted to/from array.
So every option with @ prefix would automatically become html attribute. However going the latter path, it'd be harder to implement.

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

by fabpot at 2011/06/13 07:43:52 -0700

Can you give an example of a real-world use case? Thanks.

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

by Seldaek at 2011/06/13 07:54:51 -0700

You can use `array('attr' => array('data-foo' => 'bar'))`, which will output `data-foo="bar"`, which can be read easily by jQuery for example as `$('el').data('foo')`. It's a standard compliant and elegant way to pass extra data needed by the JS code along with DOM nodes, without polluting everything with script tags and all.

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

by fabpot at 2011/06/13 08:01:08 -0700

@Seldaek: I understand that. But why not doing this in the template?

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

by Seldaek at 2011/06/13 08:04:10 -0700

Well, I agree it most likely belongs in the template, but it's kind of data stuff that is not directly impacting the display rules of the element, so in some cases having the possibility to set that from the php code might be useful. Anyway I'll let @mvrhov answer maybe he had a more concrete use case. I just think it's nice to leave the door open, but I don't really need it.

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

by mvrhov at 2011/06/13 10:27:03 -0700

A bit late to the party. Ok, here is my use-case.
I have a pretty large form where part of the data is of tabular form. The number of rows is almost every time a lot larger than the number of columns
So I can either output a lot of text inputs filled with data and make already a large form intimidating. Or I can use a grid that supports editing. So I serialize that tabular data as json and put it as a value into one hidden field. Somehow I also have to get the column definitions to that grid. I decided to I serialize it and put it inside data-* attribute. Putting it into another hidden field doesn't make sense as when data is submitted back I don't need the column definitions as only the number of rows changes.

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

by fabpot at 2011/06/13 10:44:58 -0700

@mvrhov: ok, but what prevents you from doing this in the template directly?

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

by mvrhov at 2011/06/13 11:22:53 -0700

I have to get it into the view somehow. What I'd really not like to do is, iterate through that data in a controller and then pass it as another template variable.

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

by fabpot at 2011/06/14 00:10:22 -0700

But the controller is where you prepare the data that you want to send to the view. Without any concrete example, I'm going to close this PR.

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

by mvrhov at 2011/06/14 01:21:10 -0700

IMHO this has to go out through form as this is the part of the form also I do have a very slim controllers in this case 10 LOC, where half of them is just setting up an view data..
Nonetheless I went looking again very closely at the AbstractType and I do have buildView function available which I can override and set the column data I need there, and then provide custom view for that, so at least from this part this is an non issue.

With this PR all default form attributes can be set from outside and when searching for a good use-case I have found out that @henrikbjorn has implemented this via extensions [1], maybe he has a good use-case for this.

[1] - https://github.com/Comways/ComwaysFormExtraBundle/blob/master/Form/Extension/FieldTypeExtension.php

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

by henrikbjorn at 2011/06/14 01:48:53 -0700

Convenience is the only use case

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

by stof at 2011/06/14 02:08:09 -0700

@fabpot The issue is that passing it from the controller as another template variable makes it really hard when you use the type twice with different values. Passing them from the form would be the easiest way

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

by shuogawa at 2011/06/14 19:37:50 -0700

hello. thanks for great form library.
I want to support two ways to display additional attributes for form elements.
1) control in template like
{{ form_row(form.name, { 'width': '30' }) }}
2) control from php
$builder->add('name', 'text', array('attr'=>array('width'=>'30')));

If form elements configure by end user like cms,
and form elements dynamically change.
The second method is useful.

template designer can write {{form_row(form)}}
but
template designer can not write {{form_row(form.name), { 'width': '30' }}}

Thank you

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

by fabpot at 2011/06/14 23:01:18 -0700

@shuogawa: That's what I fear. Setting the `width` or any other attribute in PHP is wrong. This belongs to the templates.

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

by stloyd at 2011/06/15 00:09:05 -0700

@fabpot Then maybe just restrict allowed tags to `data-*` and don't use `attr` but some other not confusing name ? Just like we do with i.e. `maxlength`.

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

by fabpot at 2011/06/15 04:44:25 -0700

I'm going to merge it as a "convenience" tool, but the documentation should clearly state that the only usage should be for `data-*` attributes.
2011-06-15 13:44:37 +02:00
Fabien Potencier
fb24b95bd5 made some tweaks to error levels 2011-06-15 13:04:19 +02:00
Fabien Potencier
8027eca3de fixed tests 2011-06-15 12:58:17 +02:00
Fabien Potencier
73dc8c96af merged branch vicb/form-proto (PR #1315)
Commits
-------

07fa82d [Form] Revert changes impacting perfomance and readability
b709551 [Order] Make Form::types and FormView::types use the same order (Parent > Child)
e56dad6 [Form] simplify the code
bdd755e [Form] Fix the exception message when no block is found
c68c511 [Form] Make theming form prototypes consistent (start by looking for a '_<id>_<section>' block)
9ec9960 [Form] Simplify the code
4e3e276 [Form] Make the prototype view child of the collection view

Discussion
----------

[Form] Make the prototype view child of the collection view

This PR should be a base for discussion.

The [current implementation](https://github.com/symfony/symfony/pull/1188) has some drawbacks because the prototype view is not a child of the collection view:

  * The 'multipart' attribute is not propagated from the prototype to the collection,
  * The prototype view do not use the theme from the collection.

Those 2 points are fixed by the proposed implementation and one more benefit is that the template markup might be easier to work with:

before:

```html
<div id="form_emails">
  <div>
    <label for="form_emails_0">0</label>
    <input type="email" id="form_emails_0" name="form[emails][0]" value="a@b.com">
  </div>
  <script type="text/html" id="form_emails_prototype">
    <div>
      <label for="$$name$$">$$name$$</label>
      <input type="email" id="$$name$$" name="$$name$$" value="" />
    </div>
  </script>
</div>
```
after:

```html
<div id="form_emails">
  <div>
    <label for="form_emails_0">0</label>
    <input type="email" id="form_emails_0" name="form[emails][0]" value="a@b.com">
  </div>
  <script type="text/html" id="form_emails_prototype">
    <div>
      <label for="form_emails_$$name$$">$$name$$</label>
      <input type="email" id="form_emails_$$name$$" name="form[emails][$$name$$]" value="" />
    </div>
  </script>
</div>
```

@kriswallsmith I'd like to get your feedback on this PR. thanks.

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

by stof at 2011/06/14 07:01:01 -0700

@fabpot any ETA about merging it ? Using the prototype currently is a pain to build the name. The change makes it far easier

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

by fabpot at 2011/06/14 07:09:46 -0700

The templates are much better but I'm a bit concerned that we need to add the logic into the Form class directly. That looks quite ugly. If there is no other way, I will merge it.

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

by vicb at 2011/06/14 07:14:32 -0700

I have found no better way... I am testing some minor tweaks I want to submit.

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

by kriswallsmith at 2011/06/14 07:34:25 -0700

I'm not happy with the code in Form.php either... would creating a PrototypeType accomplish the same thing?

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

by vicb at 2011/06/14 07:42:07 -0700

@kriswallsmith tried and dismissed, the id and name are bad & you have to go for `render_widget(form.get('proto'))` in the template. That should be fixeable but not any better.

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

by kriswallsmith at 2011/06/14 07:45:21 -0700

What do you mean the id and name are bad? If we have a distinct type for the prototype, can't we do whatever we want using buildView() and the template?

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

by vicb at 2011/06/14 07:53:31 -0700

@kriswallsmith the id would be smthg like `form_emails_$$name$$_prototype` but yes we should be able to do whatever we want but the code might end up being more complex.

I am done with the tweaks but still open to feedback on this PR.

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

by kriswallsmith at 2011/06/14 08:08:21 -0700

Yes, that is the type of name I would expect.

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

by kriswallsmith at 2011/06/14 08:08:33 -0700

Oops -- I mean id.

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

by kriswallsmith at 2011/06/14 08:09:42 -0700

Maybe I'm confused what id you're referring to. I'll try to spend some time on this today.

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

by vicb at 2011/06/14 08:23:56 -0700

That should be the id of the `<input>`, the id of the script would be `form_emails_$$name$$_prototype_prototype` (if prototype is the name of the nested node).

I am trying to setup a branch with my code (playing with git & netbeans local history)

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

by vicb at 2011/06/14 08:46:25 -0700

@kriswallsmith https://github.com/vicb/symfony/tree/kris/proto if that can help (there are still changes in Form.php)

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

by kriswallsmith at 2011/06/14 08:47:08 -0700

Thanks, I'll take a look.

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

by vicb at 2011/06/15 00:48:38 -0700

I would have expected it to be faster however `array_map` is about twice slower... reverted !
2011-06-15 11:27:12 +02:00
Fabien Potencier
46a93c376c [Routing] optimized PHP dumper when the parent prefix is the same for several adjacent collections (avoids the same test to be made) 2011-06-15 09:36:36 +02:00
Fabien Potencier
1438f6be04 [Routing] added some unit tests for latest merge (and fixed a bug ;)) 2011-06-15 09:22:10 +02:00
Fabien Potencier
c5223bbcd1 merged branch vicb/file (PR #1317)
Commits
-------

9d6357c [HttpFoundation] Document the changes to the File classes
136b80a [HttFoundation] Add File::getExtension() as \SplFileInfo::getExtension() was introduced in PHP 5.3.6
38b3b74 [HttpKernel] Fix and test previous commit
ac0c00c [HttpFoundation] Make File extends \SplFileInfo

Discussion
----------

[HttpFoundation] Make File extends \SplFileInfo

This is a rebased version of [PR 674](https://github.com/symfony/symfony/pull/674).

  * File: The API has changed (now extends \SplFileInfo),
  * File: move() creates the target directory when it does not exist
  * UploadedFile: introduction of getClientXXX() methods (for Size, OriginalName, MimeType)

If this PR does not get merged UploadedFile should at least be fixed: [Client.php](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/Client.php#L124) relies on a last parameter which is no more defined and which is used to bypass [move_uploaded_file()](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpFoundation/File/UploadedFile.php#L155) in test mode.

If this could be merged, I'll detail the changes in UPDATE.md

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

by fabpot at 2011/06/14 08:20:59 -0700

I'll merge it. Can you update the UPDATE file?

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

by vicb at 2011/06/14 09:24:01 -0700

done
2011-06-15 08:57:16 +02:00
Fabien Potencier
398c86d063 merged branch vicb/httpkernel/fix-test (PR #1330)
Commits
-------

5069fe2 [HttpKernel] Fix randomly failing tests

Discussion
----------

[HttpKernel] Fix randomly failing tests

Response time comparison causes tests to fail randomly.

```

1) Symfony\Tests\Component\HttpKernel\HttpKernelTest::testHandleWhenNoControllerIsAStaticArray
Failed asserting that two objects are equal.
--- Expected
+++ Actual
@@ @@
                         (
-                            [0] => Tue, 14 Jun 2011 19:56:20 GMT
+                            [0] => Tue, 14 Jun 2011 19:56:21 GMT
                         )
```

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

by stloyd at 2011/06/14 15:37:11 -0700

+1 this sometimes occurs when running all tests.
2011-06-15 07:57:02 +02:00
Fabien Potencier
af97610ee6 [CssSelector] renamed Parser::cssToXPath() to CssSelector::toXPath() 2011-06-15 07:55:23 +02:00
Victor Berchet
5069fe2cf2 [HttpKernel] Fix randomly failing tests 2011-06-14 22:30:49 +02:00
Victor Berchet
136b80ae63 [HttFoundation] Add File::getExtension() as \SplFileInfo::getExtension() was introduced in PHP 5.3.6 2011-06-14 18:18:43 +02:00
Fabien Potencier
06614cd6ca [Yaml] moved exceptions to their own sub-namespace (added a specific exception for the dump) 2011-06-14 16:25:26 +02:00
Fabien Potencier
a9dab719df [Yaml] removed support for YAML 1.1 spec 2011-06-14 16:25:25 +02:00
Fabien Potencier
3859589daa [Yaml] renamed load() to parse() 2011-06-14 16:25:25 +02:00
Fabien Potencier
c6cc427e4b [EventDispatcher] added a way to set the priority for event subscribers 2011-06-14 14:40:27 +02:00
Fabien Potencier
b76a1c3077 [Finder] added a convenience method Finder::create() 2011-06-14 14:18:24 +02:00
Fabien Potencier
1ad5bfd723 [CssSelector] renamed SyntaxError 2011-06-14 14:12:03 +02:00
Fabien Potencier
a7c1ff8558 merged branch ajessu/time_validator (PR #1254)
# Commits

ca52a04 [Validator] Allow DateTime objects as valid Times

# Discussion

## [Validator] Allow DateTime objects as valid Times

Also added tests for `DateTime` objects as valid on `Date` and `Time` constraints.

I didn't include the test for the `DateTime` constraint, as it's already included in this PR:

https://github.com/symfony/symfony/pull/1085

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

## fabpot @ 2011/06/09 09:07:21 -0700

I don't think it makes sense to use a \DateTime instance to represent a Time.

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

## ajessu @ 2011/06/09 09:33:20 -0700

If I have an entity with a doctrine type `Time`:

    Time (DateTime instance where only H:i:s get persisted)

```php
<?php
    /**
     * @ORM\Column(type="time")
     * @Assert\Time()
     */
    protected $startTime;
```

and I create a form out of this Entity, a `DateTime` object is passed when the form is submitted.

This generates an `UnexpectedTypeException`.

I just made this change to match the `Date` validator with the doctrine type `Date`, which also shares this behavior:
https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Validator/Constraints/DateValidator.php#L28

    Date (DateTime instance where only Y-m-d get persisted)
2011-06-14 12:08:41 +02:00
Victor Berchet
38b3b7474f [HttpKernel] Fix and test previous commit 2011-06-14 11:54:55 +02:00
Victor Berchet
ac0c00c6e8 [HttpFoundation] Make File extends \SplFileInfo 2011-06-14 10:47:04 +02:00
Victor Berchet
4e3e2768fb [Form] Make the prototype view child of the collection view 2011-06-14 09:33:19 +02:00
Fabien Potencier
2ce3cfad18 [Form] made it possible to translate the empty value of Choice fields 2011-06-14 08:33:48 +02:00
Fabien Potencier
c364008a3b [Form] allowed an empty value to be displayed for choices even when required is true
Rules are as follows:

* If multiple is true, then the empty_value is ignored
* If not, and if the field is not required, the empty_value is set to the empty string by default and displayed
* If the field is required, and if the user explicitely set the empty_value, then it is displayed
2011-06-14 08:27:19 +02:00
Fabien Potencier
a12ea12fc1 fixed CS 2011-06-13 18:54:20 +02:00
Fabien Potencier
d16a708cc8 [Form] simplified file type class
File uploads documentation is here:

https://github.com/symfony/symfony-docs/pull/400
2011-06-13 18:11:18 +02:00
Fabien Potencier
0c29a25d89 Merge remote branch 'kriswallsmith/form/collection-proto'
* kriswallsmith/form/collection-proto:
  added script[type="text/html"] collection prototype to form themes
  [Form] removed collection prototype from form tree
2011-06-13 11:51:18 +02:00
Fabien Potencier
973b323b12 Merge remote branch 'vicb/form-render-fix'
* vicb/form-render-fix:
  [Form][TwigBridge] Improve the cache layer by caching blocks instead of templates
  [Form][TwigBridge] Make the template cache more efficient
  [Form][TwigBridge] Fix rendering
2011-06-13 11:48:44 +02:00
Fabien Potencier
41b7190efc Revert "[Form] changed the way default type names are created to avoid collisions"
This reverts commit d044498cde.

The reason for reverting is that the name is actually used to customize
the template on a per field basis:

{% block _post_excerpt_widget %}
    ***{{ block('text_widget') }}***
{% endblock %}

Here, post is the name of the Type.
2011-06-13 11:47:21 +02:00
Fabien Potencier
5526757e13 Merge remote branch 'asm89/default_charset'
* asm89/default_charset:
  [HttpKernel] Added tests for non UTF-8 content types.
2011-06-13 11:24:02 +02:00
Pascal Borreli
f5eaa404c7 [Tests] Fixed typos 2011-06-12 20:52:53 +00:00
Victor Berchet
8677aa3dce [Form][TwigBridge] Fix rendering 2011-06-12 11:33:17 +02:00
Alexander
07d823caa8 [HttpKernel] Added tests for non UTF-8 content types.
Tests to check that #1281 is fixed and to prevent regression in the
future.
2011-06-11 13:57:43 +02:00
Fabien Potencier
c79e51c9aa Merge remote branch 'kriswallsmith/form/lazier-csrf-token'
* kriswallsmith/form/lazier-csrf-token:
  [Form] fixed xpath
  [Form] moved csrf listener to its own class
  fix issue with csrf token not present on collection fields because of resize listener
2011-06-11 07:36:51 +02:00
Fabien Potencier
8d58826085 [Routing] fixed unit tests for previous commit 2011-06-11 07:33:55 +02:00
Kris Wallsmith
d26c590021 [Form] fixed xpath 2011-06-10 13:18:09 -07:00
Kris Wallsmith
fe4382eb73 [Form] moved csrf listener to its own class 2011-06-10 13:00:44 -07:00
Fabien Potencier
4da7909f9a Merge remote branch 'kriswallsmith/form/is-valid-read-only'
* kriswallsmith/form/is-valid-read-only:
  [Form] fixed isValid() on readOnly forms that have children
2011-06-10 16:32:50 +02:00
Kris Wallsmith
8d55df42de [Form] fixed isValid() on readOnly forms that have children 2011-06-10 07:11:50 -07:00
Fabien Potencier
37cd020040 Merge remote branch 'lsmith77/serializer_tweaks'
* lsmith77/serializer_tweaks: (22 commits)
  clarified that BC is broken in the Serializer component
  added UPDATE notes for Serializer component changes
  fix tests
  marked public api
  more encoder lazy loading tweaks
  always use getEncoder() to enable lazy loading
  cosmetic tweak
  removed setEncoder/removeEncoder/addNormalizer/removeNormalizer
  SerializerAwareInterface and DecoderInterface do not implement EncoderInterface anymore
  handle non objects
  moved the methods that can later be moved to a Builder to the bottom
  use getEncoder inside encode/decode
  made serialize/deserialize/encode/decode final
  added Constructor
  added Exception's from SerializerBundle
  made (de)normalizeObject() private
  renamed hasEncoder/hasDecoder to supportsSerialization/supportsDeserialization
  notice fixes
  typo fixes
  all encoders implement EncoderInterface
  ...
2011-06-10 15:56:35 +02:00
Fabien Potencier
03a05661f9 [Form] fixed more cases where the delegating validator did not match the validator paths 2011-06-10 15:35:49 +02:00
Fabien Potencier
7de4d28a05 Merge remote branch 'yethee/delegating_validator'
* yethee/delegating_validator:
  [Form] Fixed path mapping for DelegatingValidator
2011-06-10 13:54:44 +02:00
Lukas Kahwe Smith
2b4a25a0a7 fix tests 2011-06-10 01:11:51 +02:00
Fabien Potencier
d044498cde [Form] changed the way default type names are created to avoid collisions 2011-06-09 16:43:02 +02:00
Albert Jessurum
ca52a04f5e [Validator] Allow DateTime objects as valid Times 2011-06-09 15:47:51 +02:00
Fabien Potencier
f3cafcb355 merged symfony/form-simplification 2011-06-09 13:29:31 +02:00
Fabien Potencier
852a4c9c6a [Form] removed the file upload temporary storage feature
The current implementation is not ready for inclusion in 2.0. It has several
known problems (security, not possible to disable it, not "cloud-compatible",
...) and it's not a must have feature anyway.

Some references:

 * Security issue in FileType: https://github.com/symfony/symfony/issues/1001
 * Validation fails on file, still stored in TemporaryStorage: https://github.com/symfony/symfony/issues/908
 * Add a size argument & ability to configure TemporaryStorage: https://github.com/symfony/symfony/pull/748

This feature should be reworked and discussed for inclusion in 2.1.
2011-06-09 12:44:36 +02:00
Fabien Potencier
1e8cd6d34d [HttpFoundation] removed the leading . for extensions 2011-06-09 12:42:42 +02:00
Fabien Potencier
07be5bf484 [Form] fixed test 2011-06-09 12:05:27 +02:00
Fabien Potencier
6448912109 [Form] fixed unit test 2011-06-09 11:47:14 +02:00
Fabien Potencier
0a7ce63d8f Merge remote branch 'vicb/twig-theme-inheritance'
* vicb/twig-theme-inheritance:
  [Form] Further tweaks of the twig theme inheritance
  [Form] Fix twig theme inheritance
2011-06-09 07:46:50 +02:00
Fabien Potencier
17cd08dc6c fixed CS 2011-06-08 19:56:59 +02:00
Kris Wallsmith
0df338fdb1 added script[type="text/html"] collection prototype to form themes 2011-06-08 09:41:12 -04:00
Kris Wallsmith
5ecb252ddf [Form] removed collection prototype from form tree 2011-06-08 08:34:20 -04:00
Victor Berchet
bee505a4bf [Form] Fix twig theme inheritance 2011-06-08 14:21:09 +02:00
Fabien Potencier
0af4743583 [HttpFoundation] fixed Request::getFormat() when the mime-type has some optional parameter (closes #1235) 2011-06-08 11:12:57 +02:00
Fabien Potencier
740b2ac833 [Console] added a --no-ansi option for disable ANSI output (closes #1238) 2011-06-08 10:26:48 +02:00
Fabien Potencier
879242cdf5 moved some Doctrine classes from the bundle to the bridge 2011-06-08 08:41:44 +02:00
Fabien Potencier
fbf36957e6 refactored Doctrine Bridge
* added a RegistryInterface

 * changed all classes to depend on the Registry instead of a specific EntityManager

This is more consistent as the validator already took the registry and this allows
to use any entity manager in Forms.
2011-06-08 08:35:48 +02:00
Fabien Potencier
65e937326d [Form] fixed unit tests for previous commit 2011-06-07 22:00:51 +02:00
Fabien Potencier
91aedf5995 Merge remote branch 'fivestar/single-choice-expanded'
* fivestar/single-choice-expanded:
  [Form] Fixed FixRadioInputListener to not ignore 0.
  [Form] Fixed single expanded choice type to set checked attribute when passed boolean value
2011-06-07 20:53:21 +02:00
Fabien Potencier
c6cfd3aeb1 Merge remote branch 'Herzult/fixArrayOption'
* Herzult/fixArrayOption:
  Simplify conditional block
  [Command] Fix array option parsing
2011-06-07 19:55:53 +02:00
Fabien Potencier
97a745e973 Merge remote branch 'vicb/form-rendering-fix'
* vicb/form-rendering-fix:
  [Form] Fix accessibility for file inputs
  [FrameworkBundle] Fix the FormHelper phpDoc
  [FrameworkBundle][Form] Add some phpDoc for the FormHelper class
  [FrameworkBundle][Form] Fix label rendering
  [FrameworkBundle][Form] Fix rendering search inputs in PHP
  [Form] FormType labels should never have a for attribute
  [Form] Never render a view again
2011-06-07 19:46:20 +02:00
Fabien Potencier
d84728e278 [Console] removed the ? alias for help and fix a few bugs from the previous commit 2011-06-07 18:26:00 +02:00
Fabien Potencier
facff73049 made the console tool more powerful
* The command names have now full support for nested namespaces. It means
   that abbreviations work for each sub-namespace:

        ./app/console doctrine:mapping:info

        # worked before
        ./app/console doctrine:map:in

        # works now
        ./app/console doc:map:in

 * Aliases are now first class citizen. They can have their own namespace,
   like the main name. So, now, there is no difference between an alias and a
   name.

 * As names and aliases can be namespaced, the Command::getFullName() and
   Command::getNamespace() method have been removed.
2011-06-07 17:51:43 +02:00
Fabien Potencier
89f544afb6 moved Twig form templates to the Twig bridge 2011-06-07 16:38:23 +02:00
Antoine Hérault
fb051b2f98 [Command] Fix array option parsing 2011-06-07 14:58:11 +02:00
Fabien Potencier
5be0bafe7f removed TemplateReferenceInterface::getSignature() (replaced by the existing getLogicalName() which already acts as a unique identifier) 2011-06-07 10:12:38 +02:00
Victor Berchet
8d2974ce90 [Form] Fix accessibility for file inputs 2011-06-06 21:00:07 +02:00
Victor Berchet
5044a7b56d [FrameworkBundle][Form] Fix label rendering
The label should not include the view 'id' attribute as it is used by the view widget.
2011-06-06 20:12:03 +02:00
Victor Berchet
61721e3fd4 [FrameworkBundle][Form] Fix rendering search inputs in PHP 2011-06-06 18:17:22 +02:00
Fabien Potencier
cb3390e9ae Merge remote branch 'gordonslondon/http-foundation/response'
* gordonslondon/http-foundation/response:
  [HttpFoundation] merge Response::isRedirected() with Response::isRedirect() - Response::isRedirected() has been removed
2011-06-06 18:06:51 +02:00
Victor Berchet
60c463d184 [Form] FormType labels should never have a for attribute 2011-06-06 18:04:07 +02:00
Victor Berchet
b12b11c131 [Form] Never render a view again
If some of the nested views are rendered individually they should not be rendered again when calling form_rest.
A typical would be when some nested file views are rendered, form_rest should not render them again.

It is still possible to render a label once the widget has been rendered. This is for checkboxes and radios
where the widget is typically rendered before the label.
2011-06-06 18:01:03 +02:00
Victor Berchet
ef8cb967f5 Merge branch 'master' into form-collection-rendering 2011-06-06 14:39:18 +02:00
Victor Berchet
bca17fe6a3 [Form] Fix collection rendering 2011-06-06 14:21:49 +02:00
Joseph Bielawski
c2b9061559 [Form] Added Tests 2011-06-06 12:30:28 +02:00
Fabien Potencier
c72537da6b [Routing] fixed route matching when the prefix contains variables 2011-06-04 19:45:54 +02:00
Fabien Potencier
544b6ca6aa Revert "fixed tests"
This reverts commit 7dc3af6036.
2011-06-04 19:24:45 +02:00
Fabien Potencier
7dc3af6036 fixed tests 2011-06-04 19:23:43 +02:00
Fabien Potencier
c561f4f0c0 [Routing] changed HTTP method to always be uppercased (to be consistent with HttpFoundation/Request) 2011-06-04 19:06:39 +02:00
Fabien Potencier
cb1f2c7e69 Merge remote branch 'kriswallsmith/templating/packages-rework'
* kriswallsmith/templating/packages-rework:
  [FrameworkBundle] updated for templating changes, added http/ssl logic
  [Templating] reworked asset helper and packages
2011-06-04 18:25:52 +02:00
Fabien Potencier
18c3049fad Merge remote branch 'brikou/console_formatter_helper'
* brikou/console_formatter_helper:
  added mb_detect_encoding when formatting block (usefull when mb_internal_encoding is not properly set)
2011-06-04 18:19:11 +02:00
Fabien Potencier
8e6166fd32 Merge remote branch 'stloyd/is_null'
* stloyd/is_null:
  Remove all `is_null` alias calls.
2011-06-04 13:54:33 +02:00
Fabien Potencier
f9ffdf5b33 [Routing] added proper support for the HEAD method 2011-06-04 12:47:38 +02:00
Fabien Potencier
9eae7e54ca [Routing] removed unneeded code in the dumper Apache rules 2011-06-04 12:46:19 +02:00
Fabien Potencier
7780c4deda [HttpKernel] removed Response content when Request method is HEAD as per RFC2616 2011-06-04 11:56:12 +02:00
Matthieu Vachon
d08a688d9b [Form] Fixed CS 2011-06-03 19:08:04 -04:00
Fabien Potencier
79a611f9ff Merge remote branch 'weaverryan/router_generator_failing_test'
* weaverryan/router_generator_failing_test:
  [Routing] Adding a failing test related to URL generation with optional parameters
2011-06-03 22:50:03 +02:00
Fabien Potencier
79c6dc7937 [Console] fixed nested styles 2011-06-03 22:48:04 +02:00
Matthieu Vachon
954bdb5813 [Form] Updated DateTimeType to accept a custom date pattern for the DateType child
* Added a test also about this change
2011-06-03 11:05:11 -04:00
Matthieu Vachon
e7e744f00a [Form] Synced changes in this branch with current Symfony master branch 2011-06-03 10:51:08 -04:00
Matthieu Vachon
436cb95223 [Form] Changed to a CreateException when the 'format' option is invalid
* Updated DateTypeTest also
2011-06-03 10:47:00 -04:00
Matthieu Vachon
0045ffeefc [Form] Added tests to check that the date format option is validated correctly
* Format option must be either a IntlDateFormatter constants (FULL, LONG, MEDIUM, SHORT) or a string
2011-06-03 10:46:59 -04:00
Matthieu Vachon
58f869a920 [Form] Synced custom pattern tests with master branch 2011-06-03 10:46:57 -04:00
Matthieu Vachon
c20eddeda9 [Form] Added some tests
* Tests to check if the pattern option is handled correctly by DateType
 * Tests to check if the pattern parameter is handled correctly by DateTimeToLocalizedStringTransformer
2011-06-03 10:46:56 -04:00
stloyd
4e03db63d7 Remove all is_null alias calls. 2011-06-03 11:16:32 +02:00
Ryan Weaver
c867dccbed [Routing] Adding a failing test related to URL generation with optional parameters 2011-06-02 20:22:33 -05:00
Brikou CARRE
597a646347 added mb_detect_encoding when formatting block (usefull when mb_internal_encoding is not properly set) 2011-06-02 13:20:51 +02:00
Katsuhiro OGAWA
790284f2a8 [Form] Fixed FixRadioInputListener to not ignore 0. 2011-06-02 19:19:43 +09:00
Katsuhiro OGAWA
5893874ed5 [Form] Fixed single expanded choice type to set checked attribute when passed boolean value 2011-06-02 19:19:42 +09:00
Fabien Potencier
2093a45aef merged stloyd/form_label 2011-06-01 11:11:25 +02:00
Fabien Potencier
c8034c04a8 Merge remote branch 'vicb/form-rendering'
* vicb/form-rendering:
  [Form] The variable stack should not persist between section rendering (fixes #1157)
  [Twig][Form] Tweak form extension phpDoc and code
  [Form] Tweak phpDoc
  [FormView] fix phpDoc
  [Form] Some tweaks
2011-06-01 10:32:40 +02:00
stloyd
7b6d921cde [Form] Added tests for previous commit 2011-06-01 10:08:18 +02:00
Kris Wallsmith
2642b0012f [Templating] reworked asset helper and packages
Added support for a configurable format string used to apply version to a path (defaults to '%s?%s').

Moved base url/base path logic to packages.
2011-05-31 06:46:30 -07:00
Fabien Potencier
65200aa86a added missing license headers 2011-05-31 10:57:06 +02:00
Fabien Potencier
839c332438 moved all listener classes under a common EventListener sub-namespace 2011-05-31 10:43:20 +02:00
Fabien Potencier
7d999acd0b fixed previous commit 2011-05-31 09:31:09 +02:00
Fabien Potencier
28527c7c91 renamed some UniversalClassLoader for better consistency 2011-05-31 09:28:32 +02:00
Fabien Potencier
02605f3481 merged origin/master 2011-05-31 08:34:05 +02:00
Fabien Potencier
d1ca577e3f removed Logger::getDebugLogger() as the method is not part of any interface 2011-05-31 08:02:14 +02:00
Fabien Potencier
79e709cdc9 removed the ON_ prefix for Form event names 2011-05-31 07:19:18 +02:00
Fabien Potencier
988355993a refactored Profiler class 2011-05-30 22:25:25 +02:00
Victor Berchet
b61929bf4a [Form] The variable stack should not persist between section rendering (fixes #1157) 2011-05-30 19:25:02 +02:00
Fabien Potencier
9181e5dd0c merged origin/master 2011-05-30 14:28:54 +02:00
Johannes M. Schmitt
bac3ee86f9 [Security] fixes a regression in the AclVoter 2011-05-30 10:04:46 +02:00
Johannes M. Schmitt
8837ce0e57 Merge branch 'master' of http://github.com/symfony/symfony into security 2011-05-30 10:00:07 +02:00
Fabien Potencier
9b7e14dd10 [Form] converted code to the new event dispatcher 2011-05-30 09:37:42 +02:00
Fabien Potencier
90ca8e0404 fixed more unit tests 2011-05-30 09:19:01 +02:00
Fabien Potencier
c171142c01 renamed constants to upper cased 2011-05-30 09:04:37 +02:00
Fabien Potencier
f6b481a9ee [EventDispatcher] simplified code and fixed unit tests 2011-05-30 08:59:28 +02:00
Fabien Potencier
5059559035 Merge remote branch 'Seldaek/events' into events1
* Seldaek/events:
  [EventDispatcher] Removed temporary code
  [FrameworkBundle] Improved code readability
  [FrameworkBundle] Clarified code and fixed regression
  Update Core and Security events to latest model
  [EventDispatcher] Allow registration of arbitrary callbacks
  [EventDispatcher] Remove useless code
  [EventDispatcher] Minor memory optimization to getListeners()
  [FrameworkBundle] Small optimization, remove some function calls
2011-05-30 08:58:49 +02:00
GordonsLondon
ef9dc7c623 [HttpFoundation] merge Response::isRedirected() with Response::isRedirect() - Response::isRedirected() has been removed 2011-05-29 15:34:02 +02:00
Johannes M. Schmitt
88becfe3f8 [HttpFoundation] allow locale in RequestMatcher path 2011-05-28 22:37:43 +02:00
Fabien Potencier
1548a049e1 Merge remote branch 'mvrhov/single_text_option_rename'
* mvrhov/single_text_option_rename:
  Added a note about BC break for DateType into UPDATE.md file
  DateType single-text should be single_text
2011-05-28 18:02:36 +02:00
Johannes Schmitt
f37386e336 Merge branch 'master' of git://github.com/symfony/symfony into security 2011-05-28 17:07:16 +02:00
Arnout Boks
a0397f99f5 [DependencyInjection] Fixed bug where anonymous services from two different xml-files (with the same basename) could collide 2011-05-28 10:29:32 +02:00
Miha Vrhovnik
b8144c62ad DateType single-text should be single_text 2011-05-27 16:23:59 +02:00
Fabien Potencier
610583899d Merge remote branch 'CodeMeme/889-EntityChoiceField-grouped-choices'
* CodeMeme/889-EntityChoiceField-grouped-choices:
  Whitespace cleanup
  Fixed EntityChoiceList to support grouped entities Refs #889
  Added test for grouped entity choice list Refs #889
2011-05-27 07:44:35 +02:00
Eric Clemmons
693d0cda15 Whitespace cleanup 2011-05-26 19:00:42 -07:00
Eric Clemmons
d380486756 Added test for grouped entity choice list
Refs #889
2011-05-26 18:58:50 -07:00
Fabien Potencier
6507eeff3c Merge remote branch 'CodeMeme/1058-fix-radio-input-listener'
* CodeMeme/1058-fix-radio-input-listener:
  Fix for RadioInputListener's empty value erroneously becoming extra data Refs #1058
  Added test for RadioInputListener bug treating no data as extra data
2011-05-26 17:31:09 +02:00
Fabien Potencier
eb90427e92 Merge remote branch 'danielholmes/cookie_fixes'
* danielholmes/cookie_fixes:
  [BrowserKit] fixed explicit cookie params being overriden by url
2011-05-26 17:07:13 +02:00
Fabien Potencier
1f369ed1ed Merge remote branch 'zerosanity/master'
* zerosanity/master:
  Added missing space.
  Fixed broken logic in Request::getHttpHost(). It was ignoring HTTP_HOST completely.
2011-05-26 15:01:53 +02:00
Fabien Potencier
699ecfcf90 Merge remote branch 'stloyd/validators_refactoring'
* stloyd/validators_refactoring:
  Refactor validators constraints: - remove need for defining "getTargets()" method as 95% of validators use same one - replace abstract "Constraint::getTargets()" with one that use 95% of validators - add additional tests for "Constraint::getTargets()" method - remove unused "use" statement in Constraint\Valid
2011-05-26 14:58:24 +02:00
Fabien Potencier
3bdb7c2b57 [DependencyInjection] fixed regression when a parameter contains an escaped %
Notice that this is still not perfect, but I don't see how to fix the remaining
potential problems.
2011-05-26 12:47:50 +02:00
Jordi Boggiano
af0bd8a136 Update Core and Security events to latest model
The main benefit is that in XML/YML files we have common syntax (i.e. core.controller, form.pre_bind) that properly namespaces event names (before: onCoreController was ok, preBind was not).
On the other hand in PHP land we also have namespaced events, CoreEvents::controller, FormEvents::preBind, before it was Events::onCoreController, Events::onPreBind, we now have more context.
2011-05-26 11:55:07 +02:00
Jordi Boggiano
1246503e55 [EventDispatcher] Allow registration of arbitrary callbacks
This in effect removes the direct link between event name and the method name on the handler.
Any callback can be given as a handler and the event name becomes an arbitrary string. Allowing for easier namespacing (see next commit)
2011-05-26 11:54:06 +02:00
Daniel Holmes
3c372d3773 [BrowserKit] fixed explicit cookie params being overriden by url 2011-05-26 15:28:51 +10:00
Eric Clemmons
a61e13303b Added test for RadioInputListener bug treating no data as extra data 2011-05-25 22:15:35 -07:00
Joshua Nye
f019541716 Fixed broken logic in Request::getHttpHost(). It was ignoring HTTP_HOST completely. 2011-05-25 16:02:16 -04:00
Fabien Potencier
ce19cc0698 Merge remote branch 'Seldaek/domcrawler'
* Seldaek/domcrawler:
  [DomCrawler] Uppercase http methods
2011-05-25 18:27:12 +02:00
Jordi Boggiano
08e7629fb4 [DomCrawler] Uppercase http methods 2011-05-25 15:45:23 +02:00
Fabien Potencier
dcd490e03f [Twig] added a way to use % in a trans string (closes #981) 2011-05-25 11:29:23 +02:00
stloyd
3ea2a32c53 Refactor validators constraints:
- remove need for defining "getTargets()" method as 95% of validators use same one
- replace abstract "Constraint::getTargets()" with one that use 95% of validators
- add additional tests for "Constraint::getTargets()" method
- remove unused "use" statement in Constraint\Valid
2011-05-25 10:51:35 +02:00
Fabien Potencier
462f222319 [DependencyInjection] changed \LogicException to RuntimeException to be more consistent 2011-05-25 09:59:38 +02:00
Fabien Potencier
2438a73c7b [DependencyInjection] added a check for circular references in parameter definitions 2011-05-25 09:57:38 +02:00
Fabien Potencier
456eb53eb8 [DependencyInjection] renamed CircularReferenceException to ServiceCircularReferenceException 2011-05-25 09:48:49 +02:00
Fabien Potencier
6c409cac84 [DependencyInjection] refactored parameter bag parameter replacements (removed duplicated code) 2011-05-25 09:35:51 +02:00
Joseph Bielawski
d65a56e13b [Locale] Prevent failing test when used with PHP 5.3.3+ 2011-05-24 16:08:09 -07:00
Fabien Potencier
8d7def4fae [BrowserKit] updated tests 2011-05-24 20:42:24 +02:00
Fabien Potencier
05778c719f [BrowserKit] fixed CS 2011-05-24 20:37:52 +02:00
Fabien Potencier
e0bf310b55 Merge remote branch 'hnw/cookie-raw-value'
* hnw/cookie-raw-value:
  added test for Cookie#getRawValue and CookieJar#AllRawValues
  fixed doc comment
  [BrowserKit] dealing with raw value for cookies
2011-05-24 20:20:57 +02:00
Fabien Potencier
aa356e7288 [BrowserKit] fixed cookie management (see RFC 2109) 2011-05-24 20:08:11 +02:00
everzet
98b0bdcb15 [DependencyInjection] added failing private service user test-case 2011-05-23 22:38:23 +03:00
Fabien Potencier
15bede5a63 [Console] refactored style management
The current code was broken when a style was defined inline:

  <bg=black>Foo</bg=black>

When creatin a new style formatter, it's better to let the formatter
apply the style to the text.
2011-05-23 16:54:36 +02:00
Yoshio HANAWA
6556f62e4f added test for Cookie#getRawValue and CookieJar#AllRawValues 2011-05-23 21:53:30 +09:00
Fabien Potencier
7ab3fdeb83 [Finder] added a way to ignore all 'hidden' files 2011-05-23 11:05:58 +02:00
Miha Vrhovnik
e8326aa650 Renamed attributes to attr to be consistent with templating. 2011-05-23 08:10:03 +02:00
Miha Vrhovnik
c7074672ba Added support for additional attributes in Form types that list field as their parent. 2011-05-22 22:59:00 +02:00
Pascal Borreli
7f089c0b05 [Process] Fixed namespace typo and windows test 2011-05-22 14:57:37 +00:00
Fabien Potencier
a2a1a88291 Merge remote branch 'schmittjoh/annotations'
* schmittjoh/annotations:
  removed obsolete compiler pass
  fixed some more tests
  fixed tests
  removed unused vendor
  some cleanups
  updated to latest changes
  [WebProfilerBundle] removed @ignorePhpDoc annotations
  [FrameworkBundle] fixed default
  [FrameworkBundle] updated configuration
  [Validator] updated fixtures
  updated UPDATE file
  updated Annotations integration
  [Routing] updated to changes
  [FrameworkBundle] added framework-wide annotation reader, updated validator tests
  [WebProfilerBundle] fixed controllers
  fixed unit tests
  added Annotations library
2011-05-22 08:45:24 +02:00
Victor Berchet
e117613550 [Form] Fix for nested forms getting erroneously set as rendered 2011-05-20 15:48:55 +02:00
Johannes Schmitt
ddc00fa0f6 removed obsolete compiler pass 2011-05-20 06:59:30 +02:00
Johannes Schmitt
98ed7dd030 fixed some more tests 2011-05-19 23:15:41 +02:00
Johannes Schmitt
6c0b0449a6 Merge remote branch 'origin/master' into annotations
Conflicts:
	UPDATE.md
	src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
	src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
2011-05-19 22:49:59 +02:00
Johannes Schmitt
42fb34b647 fixed tests 2011-05-19 22:46:34 +02:00
Kris Wallsmith
ed8ecab7ea [HttpFoundation] fixed locale accessor after session clear 2011-05-19 11:45:12 -07:00
Fabien Potencier
9714524b39 fixed a unit test and CS 2011-05-19 17:38:16 +02:00
jsor
fd6c254b47 [HttpFoundation] changed checking for deleted cookie to be conform with setcookie() 2011-05-19 17:14:03 +02:00