Commit Graph

6167 Commits

Author SHA1 Message Date
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
Fabien Potencier
6d375f74ba merged branch stloyd/exception_typo (PR #1427)
Commits
-------

0d3fb6f Missing quote in IniFileLoader exception

Discussion
----------

Missing quote in IniFileLoader exception
2011-06-25 13:26:48 +02:00
Fabien Potencier
6c95f8cb13 merged branch stloyd/patch-2 (PR #1428)
Commits
-------

4510256 Removed "use" on non-existing file.

Discussion
----------

[WebTestCase] Removed "use" on non-existing file.
2011-06-25 13:26:26 +02:00
Fabien Potencier
ea0f327122 merged branch Seldaek/req_time (PR #1432)
Commits
-------

e80ce57 [HttpFoundation] Add REQUEST_TIME by default

Discussion
----------

[HttpFoundation] Add REQUEST_TIME by default

Without this the getting the REQUEST_TIME from the Request in tests is breaking.
2011-06-25 13:26:06 +02:00
Jordi Boggiano
e80ce57935 [HttpFoundation] Add REQUEST_TIME by default 2011-06-25 12:44:24 +02:00
Joseph Bielawski
45102562bf Removed "use" on non-existing file. 2011-06-24 07:43:36 -07: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
9bf6ef7999 updated VERSION 2011-06-24 15:21:22 +02:00
Fabien Potencier
92c28844ce updated VERSION 2011-06-24 15:19:30 +02:00
Fabien Potencier
5f6a4a6d21 tweaked UPDATE file 2011-06-24 14:29:45 +02:00
Fabien Potencier
5a8c9f3a0b removed unneeded info in UPDATE file 2011-06-24 14:28:05 +02:00
Fabien Potencier
5370c15e52 merged branch stloyd/patch-1 (PR #1425)
Commits
-------

e993c87 Added info about Form and Validator component changes.

Discussion
----------

Adjusted UPDATE file

Added info about Form and Validator component changes.
2011-06-24 14:27:28 +02:00
Fabien Potencier
46680d4565 [FrameworkBundle] switched back to Doctrine Common 2.1 2011-06-24 14:11:31 +02:00
Joseph Bielawski
e993c87b08 Added info about Form and Validator component changes. 2011-06-24 02:29:28 -07:00
Fabien Potencier
cca21a84e3 merged branch stloyd/datetimetype (PR #1419)
Commits
-------

aeaf44a Removed unused code from DateTimeType
3c2539f Throw exception when "date_widget" option is not equal to "time_widget"
305c476 Overwrite child options ("widget", "empty_value") if any given
7bc19f9 Added to `DateTimeType` extension possibility to render form as `single_text` (similar to `DateType` option) (issue #1323 it requires fix for #1205)
17b41b2 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][DateTimeType] Added "widget" and "empty_value" options

Hey,

I have just added "widget" and "empty_value" options to `DateTimeType`:

* `widget` option will overwrite existing `date_widget` and `time_widget`,
* `empty_value` behave exacly same way as it does for `ChoiceType`, `DateType` and `TimeType`

Also added and `FormException` when `date_widget` is not equal to `time_widget`, now is throwed non intuitive one (this will be changed in next days to allow different values for this options).

Closes #1323
2011-06-24 07:48:05 +02:00
Fabien Potencier
87b121510b merged branch laszlokorte/console_formatter (PR #1420)
Commits
-------

6b72cda removed whitespace
282a493 moved the constant from the interface back into the class
7ec7fbe fixed inteface name
9a82924 [Console] Extract the OutputFormatter's regular expression into the inteface.

Discussion
----------

[Console] Expose the OutputFormatter's regular expression

In my ConsoleBundle(https://github.com/CoreSphere/ConsoleBundle) I needed to decorate the OutputFormatter to enable html escaping while allow to apply styles.

For that I need to reuse the regular expression used in the original OutputFormatter. I think it would be cleaner exposing it than duplicating it.
(https://github.com/CoreSphere/ConsoleBundle/blob/master/Formatter/HtmlOutputFormatterDecorator.php#L64)

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

by fabpot at 2011/06/23 12:24:43 -0700

OutputFormatter is just one implementation of the interface, so the constant cannot be defined in the interface.

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

by laszlokorte at 2011/06/23 13:01:46 -0700

I made the false assumption all Formatters would use the same syntax for defining style. I moved it back into the class.
2011-06-24 07:43:58 +02:00
Fabien Potencier
83ac600974 merged branch aerialls/fixed_cs (PR #1422)
Commits
-------

272e07f [Locale] fixed CS

Discussion
----------

[Locale] fixed CS
2011-06-24 07:42:46 +02:00
Julien Brochet
272e07fb6d [Locale] fixed CS 2011-06-24 01:49:48 +02:00
Laszlo Korte
6b72cda1a7 removed whitespace 2011-06-23 22:03:13 +02:00
Laszlo Korte
282a493af2 moved the constant from the interface back into the class 2011-06-23 21:57:47 +02:00
Laszlo Korte
7ec7fbefaa fixed inteface name 2011-06-23 18:31:46 +02:00
stloyd
aeaf44ab4f Removed unused code from DateTimeType 2011-06-23 18:15:21 +02:00
Laszlo Korte
9a829242fb [Console] Extract the OutputFormatter's regular expression into the inteface. 2011-06-23 18:14:54 +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
305c47695f Overwrite child options ("widget", "empty_value") if any given 2011-06-23 17:16:38 +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
bc2f9479e3 merged branch vicb/form/php-choices (PR #1415)
Commits
-------

2cf7136 [FrameworkBundle][Form] tweak the choice widget PHP template

Discussion
----------

[FrameworkBundle][Form] tweak the choice widget PHP template

* make theming easier,
* factorize code,
* make PHP similar to Twig (easier to maintain)
2011-06-23 15:17:18 +02:00
Victor Berchet
2cf7136e53 [FrameworkBundle][Form] tweak the choice widget PHP template 2011-06-23 15:07:20 +02:00
stloyd
17b41b2c51 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 14:36:04 +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
Fabien Potencier
f57e1d3e10 fixed CS 2011-06-23 14:07:53 +02:00
Fabien Potencier
86347a94c1 merged branch everzet/translation-phar-support (PR #1366)
Commits
-------

a664a60 [Translation] support phar archives by XLIFF loader

Discussion
----------

[Translation] support phar archives by XLIFF loader

Support XLIFF translation files usage from phar package.

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

by fabpot at 2011/06/19 03:06:50 -0700

phar support is complex as not everything in PHP supports it. This patch only solves one area where phar is not supported. So, we need a solution that makes the entire framework phar-compatible, which is far from easy (realpath for instance cannot be used anywhere). So, I'm closing this PR and let's revisit the global phar support for 2.1.

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

by everzet at 2011/06/19 04:47:49 -0700

I'm not trying to package Symfony2 into phar :-) As it's indeed, very complex task even for 2.1. What i'm trying to do - i'm trying to package Behat in *.phar. And the only thing that blocks it - this PR. So, i'm not interested in full-stack phar support for entire Symfony2 framework right now, but as Symfony2 Components were created as stand-alone libs, this PR is enough to make Translation component itself supporting phar packaging. I use Translation component and XLIFF translations in Behat heavily and this PR gives me ability to create fully-working behat.phar package (tested).

Also, this PR doesn't breaks anything and even more - it's exactly the same piece of code, that we have in DependencyInjection component now: https://github.com/symfony/DependencyInjection/blob/master/Loader/XmlFileLoader.php#L327.

I'll be happy to work on phar support for 2.1. But for now, i can't see real reasons why Translation component can't already support it ;-)
2011-06-23 14:03:14 +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
7db0b952b6 [HttpKernel] Removed unnecessary strtoupper 2011-06-23 12:04:15 +02:00
Jordi Boggiano
0891c578b2 [HttpKernel] Added test 2011-06-23 11:55:37 +02:00
Jordi Boggiano
135064524a [HttpKernel] Uppercased a few http methods 2011-06-23 11:54:07 +02:00
Fabien Potencier
100a8dc105 [Console] fixed Process exit code
To get the proper status for the Process, it needs to be terminated.
Sometimes, this is not the case when we call proc_get_status, so this
patch waits up to 1 sec to get the right information.
2011-06-23 11:47:31 +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
Jordi Boggiano
05c990628b [HttpKernel] Suppress response content for 304 responses out of the cache
Fixes #1413
2011-06-23 11:23:48 +02:00
Fabien Potencier
482492625d [Validator] restricted the True and False validator accepted values (the notion of True/False in PHP alone is too large) 2011-06-23 08:49:04 +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