Commit Graph

7570 Commits

Author SHA1 Message Date
excelwebzone
672635021e Formatted xml string in CHANGELOG 2011-12-01 06:59:21 -08:00
Fabien Potencier
8a4f9ea512 merged 2.0 2011-12-01 15:45:30 +01:00
Fabien Potencier
d6f01df790 merged branch excelwebzone/dev (PR #2706)
Commits
-------

8710a13  Added example to the change log file
c9a2b49  Fixed xml encoder test script, and group `item` tags into an array
a0561e5  Replaced `item` with `*item` when parsing XML string

Discussion
----------

Replaced `item` with `*item` when parsing XML string

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

by fabpot at 2011/11/23 22:14:12 -0800

Tests do not pass:

1) Symfony\Tests\Component\Serializer\Encoder\XmlEncoderTest::testDecode
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
         'key2' => 'val'
-        'A B' => 'bar'
         'Barry' => Array (...)
+        'item' => Array (...)
     )
     'qux' => '1'
 )

.../tests/Symfony/Tests/Component/Serializer/Encoder/XmlEncoderTest.php:173

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

by fabpot at 2011/11/24 22:57:37 -0800

I don't understand the patch anymore. I don't see any use of `*item` in the code.

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

by excelwebzone at 2011/11/24 23:04:07 -0800

I run some testing and you can't use '*item' XML parser reject it. So I modified it to convert it to an array.. Look at the test script change

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

by fabpot at 2011/11/24 23:13:30 -0800

So, you probably need to change the CHANGELOG as well? You should add an example which shows a before/after example.

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

by excelwebzone at 2011/11/24 23:15:51 -0800

Yes, forgot to change that..

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

by fabpot at 2011/11/25 01:27:42 -0800

ping @Seldaek, @lsmith77

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

by Seldaek at 2011/11/25 04:16:43 -0800

There are other meta-names available in the XmlEncoder, @-something for attributes, then there is something happening with a # but I'm not quite sure what. I'm just saying, maybe *item isn't the best name, if it introduces a third metacharacter. Apart from that I'm fine with it.

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

by excelwebzone at 2011/11/25 08:45:31 -0800

Maybe we can rename it to `wildcard` instead

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

by excelwebzone at 2011/11/25 15:12:09 -0800

Any chance we can push this throw?

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

by lsmith77 at 2011/11/27 04:06:25 -0800

here is the old PR #2682
@Seldaek: i think your comment was made for an older version of the patch.

overall I am fine with the change, the Serializer component takes a fairly simple approach. it is also not designed to really produce XML or JSON cleanly from the same data. it will really only be able to output a clean API for one or the other with the same data structure.

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

by excelwebzone at 2011/12/01 06:25:24 -0800

@fabpot can we merge this change
2011-12-01 15:44:03 +01:00
Fabien Potencier
220d3d23d8 merged branch hhamon/xdebug_file_link_fix (PR #2758)
Commits
-------

5e5050d [FrameworkBundle] fixed unescaped file_link_format parameter in CodeHelper that made the functional tests fail when checking a 4xx page. The generated file link format used in an HTML stack trace didn't contain an escaped ampersand (&) character. The resulting HTML code was not validable against its DTD and so the Crawler made the tests fail when checking a 4xx page.

Discussion
----------

Xdebug file link fix

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: tests suite was broken on my laptop before I changed the code...
Fixes the following tickets: none
Todo: none
2011-12-01 12:33:43 +01:00
Hugo Hamon
5e5050db53 [FrameworkBundle] fixed unescaped file_link_format parameter in CodeHelper that made the functional tests fail when checking a 4xx page. The generated file link format used in an HTML stack trace didn't contain an escaped ampersand (&) character. The resulting HTML code was not validable against its DTD and so the Crawler made the tests fail when checking a 4xx page. 2011-12-01 10:53:50 +01:00
Fabien Potencier
83894be6c8 merged branch pcampr/cs_translation_fix (PR #2737)
Commits
-------

0be8820 [FrameworkBundle] fixed small typo in Czech translation

Discussion
----------

[FrameworkBundle] fixed small typo in Czech translation

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

fixed small typo in Czech translation in validators.cs.xliff
2011-12-01 08:53:13 +01:00
Fabien Potencier
cc66739f3d merged branch DavidChristmann/fix_gen_entities_namespace (PR #2746)
Commits
-------

4a8f101b Fixed problem with multiple occurences of a given namespace. fix #2688

Discussion
----------

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

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

Bug-description:
In our project we have some bundles from the same root-namespace "ABC" stored under "vendors/bundles/ABC" and some bundles under "src/ABC".

Running the command "$php app/console doctrine:generate:entities ABC" from the commandline generates the entities from "src/ABC/" under "vendors/bundles/ABC/" or vice versa depending on their order in the bundle array in the Appkernel.php.

The error does not occur when the entities are generated by bundlename or by classname.

Bugfix:-description:
Bugfix was to get the path for each entity class once more before generating the entities. Before the bugfix the path was taken form the first entity class of the namespace without checking if the following entities have a different path.
2011-12-01 08:48:29 +01:00
Fabien Potencier
654352f8d1 merged branch pscheit/master (PR #2742)
Commits
-------

63e2a99 [CssSelector] Fixed Issue for XPathExprOr: missing prefix in string conversion

Discussion
----------

[CssSelector] Issue for XPathExprOr: missing prefix in string conversion

Hi there,

I created a small and dumb test for the issue. I looked at the original implementation and i think the problem is, that private properties are used in the parent class for xPathExprOr. so that the prefix cannot be accessd with $this->prefix in XPathExprOr
However I think the distribution for the prefix should be put in the parts of the or-sub-expressions the way it is shown in the test.

Hope this helps.

Best regards
Philipp
2011-12-01 08:46:19 +01:00
Fabien Potencier
342def5bfe [FrameworkBundle] make the code more generic 2011-12-01 08:44:53 +01:00
Fabien Potencier
308ac83945 merged branch ericclemmons/2743-traceableeventdispatcher-closure (PR #2744)
Commits
-------

c4303f3 TraceableEventDispatcher uses 'Closure' as the StopWatch name for Closures
0b5499e TraceableEventDispatcher test for Closures

Discussion
----------

[FrameworkBundle] (PR) TraceableEventDispatcher creates NOTICE on Closures

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

Currently a `\Closure` will cause the error:

> Notice: Undefined index: class in ...\TraceableEventDispatcher`

The test will fail in the event this Notice occurs & passes when the Closure fires correctly.

**Note**: If you use error suppression (`@$dispatcher->dispatch('onFooEvent')`), then the notice does not occur (as expected) and the listener fires correctly.  This, in my opinion, is expected behavior.

If you'd like this change rebased against another branch, let me know...
2011-12-01 08:43:16 +01:00
Fabien Potencier
c35c321e54 merged branch francisbesset/form_error_message (PR #2748)
Commits
-------

9e6a10a [Form] Added FormError::getMessage() and use it in Form class

Discussion
----------

[Form] Added FormError::getMessage()

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

by ericclemmons at 2011/11/29 18:38:40 -0800

Should this go through the translator, similar to how `field_errors` renders error messages?

> https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig#L253

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

by stof at 2011/11/29 23:11:24 -0800

``getErrorsAsString`` is there for a debugging purpose so injecting the translator in the Form class just for it seems wrong. And the logic used here is exactly what the identity translator does.
2011-12-01 08:39:32 +01:00
Fabien Potencier
416b70d5b2 merged branch conf/test-fixes-for-ci.qa.php.net-2.0 (PR #2750)
Commits
-------

c1a798e Another style fix.
eba9de1 Code style fix.
0b1abb3 1. Separated testing diacritic letters with additional check for mbstring in Symfony\Tests\Component\Console\Helper\FormatterHelperTest.php. 2. Added check if French locale was correctly set, skip the test otherwise in  Symfony\Tests\Component\Yaml\InlineTest.php. 3. Inverted check for Windows platform since testing finding php with suffixes has meaning only in Windows in Symfony\Tests\Component\Process\PhpExecutableFinderTest.php.

Discussion
----------

Test fixes for ci.qa.php.net 2.0

This is remake of https://github.com/symfony/symfony/pull/2749 against 2.0 as requested by stof. Code style fix also applied.

Original message below:
My name is Shein Alexey and I'm writing on behalf of php-qa team. As you probably know we've set up build server for testing major php versions (5.3, 5.4 and trunk for now) on the url http://ci.qa.php.net. There's also an initiative also check these versions against major php projects with good test coverage like symfony.
In our symfony builds some tests constantly fail (see http://ci.qa.php.net/view/php-userland/job/php-symfony2/420/testReport/ for example) so here are the fixes I come up with:

Separated testing diacritic letters with additional check for mbstring in Symfony\Tests\Component\Console\Helper\FormatterHelperT
Added check if French locale was correctly set, skip the test otherwise in Symfony\Tests\Component\Yaml\InlineTest.php.
Inverted check for Windows platform since testing finding php with suffixes has meaning only in Windows in Symfony\Tests\Component\Process\PhpExecutableFinderTest.php.
There is also erratic test Symfony\Tests\Component\HttpKernel\HttpCache\HttpCacheTest:testFetchesFullResponseWhenCacheStaleAndNoValidatorsPresent which randomly fails when Age header is non-zero, I'm not sure what to do here, maybe this check should be deleted since page can have age greater than zero.

Let me know what you think.
Thank you.
2011-12-01 08:33:56 +01:00
Fabien Potencier
420a09aa51 merged branch helmer/date_translation_domain (PR #2752)
Commits
-------

0b5c4b2 [Form] Date, Time, DateTimeType forget translation domain

Discussion
----------

[Form] Date, Time, DateTimeType forget translation domain

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

Recently, ``translation_domain`` option was added to form options. In case of complex types like ``DateType``, ``TimeType`` and ``DateTimeType``, this option should be carried along to sub-types.
2011-12-01 08:31:34 +01:00
Fabien Potencier
857d868414 merged branch canni/fix_call (PR #2755)
Commits
-------

769c17b Throw exceptions in case someone forgot to set method name in call.

Discussion
----------

[BugFix][DIC] Throw exception to avoid PHP fatal error in generated container class

Bug fix: yes
Feature add: no
Symfony2 tests pass: yes
Symfony2 tests added: yes

In general without this exception generated by php dumper container class, will cause PHP fatal error, bacause method call will look like this: `$instance->(/* arguments*/);`.

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

by canni at 2011/11/30 06:51:49 -0800

@stof done.
2011-12-01 08:30:01 +01:00
Dariusz Górecki
769c17bb95 Throw exceptions in case someone forgot to set method name in call.
Bug fix: yes
Feature add: no
Symfony2 tests pass: yes
Symfony2 tests added: yes

In general without this exception generated by php dumper container class, will cause PHP fatal error, bacause method call will look like this: `$instance->(/* arguments*/);`.
2011-11-30 15:59:17 +01:00
Helmer Aaviksoo
0b5c4b29c2 [Form] Date, Time, DateTimeType forget translation domain 2011-11-30 10:55:10 +02:00
Shein Alexey
c1a798e2d7 Another style fix. 2011-11-30 02:46:26 +05:00
Shein Alexey
eba9de1593 Code style fix. 2011-11-30 02:22:43 +05:00
Shein Alexey
0b1abb3a57 1. Separated testing diacritic letters with additional check for mbstring in Symfony\Tests\Component\Console\Helper\FormatterHelperTest.php.
2. Added check if French locale was correctly set, skip the test otherwise in  Symfony\Tests\Component\Yaml\InlineTest.php.
3. Inverted check for Windows platform since testing finding php with suffixes has meaning only in Windows in Symfony\Tests\Component\Process\PhpExecutableFinderTest.php.
2011-11-30 02:22:13 +05:00
Francis Besset
9e6a10a60e [Form] Added FormError::getMessage() and use it in Form class 2011-11-29 18:26:32 +01:00
David Christmann
4a8f101b9d Fixed problem with multiple occurences of a given namespace. fix #2688 2011-11-29 10:03:39 +01:00
Eric Clemmons
c4303f3a30 TraceableEventDispatcher uses 'Closure' as the StopWatch name for Closures 2011-11-28 21:07:35 -08:00
Eric Clemmons
0b5499ed1a TraceableEventDispatcher test for Closures 2011-11-28 21:07:11 -08:00
pscheit
63e2a993eb [CssSelector] Fixed Issue for XPathExprOr: missing prefix in string conversion 2011-11-28 22:00:26 +01:00
Pavel Campr
0be8820d9d [FrameworkBundle] fixed small typo in Czech translation 2011-11-27 20:15:26 +01:00
Fabien Potencier
f7fb34ad35 merged branch drak/stopwatch (PR #2734)
Commits
-------

97dd2cc [HttpKernel] Removed unused property.

Discussion
----------

[HttpKernel] Removed unused property.

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

Cleaned up unused property.
2011-11-27 15:03:55 +01:00
Fabien Potencier
9824c3aadf merged branch Seldaek/composerjson (PR #2719)
Commits
-------

6d5b296 Adjust doctrine requirements
628cce1 Adjust composer files to strictly require known to work packages

Discussion
----------

Adjust composer files to strictly require known to work packages

I also bumped doctrine common to 2.2, because it seems 2.1 doesn't have the AbstractManagerRegistry stuff that is used by symfony 2.1. Please someone correct me if this is wrong.

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

by fabpot at 2011/11/25 07:59:53 -0800

It should be done on the 2.0 branch too, no?

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

by Seldaek at 2011/11/26 16:11:25 -0800

Well as we discussed the 2.0 branch is not a priority right now, but yes if someone wants to port the changes to 2.0 it'd be good.
2011-11-27 14:51:38 +01:00
Fabien Potencier
2e8fe92fa5 merged branch francisbesset/fixed_refresh_template (PR #2725)
Commits
-------

17dc605 [FrameworkBundle] Checks that the template is readable before checking its modification time

Discussion
----------

Fixed bug to refresh templates deleted

Checks that the template is readable before checking its modification time.
2011-11-27 14:49:34 +01:00
Fabien Potencier
1f9cf94a1d merged branch ericclemmons/2545-expanded-grouped-choices (PR #2731)
Commits
-------

7a8e1b3 ChoiceType flattens nested Choices when expanded
82b0b37 Added ChoiceType test for flattening grouped Choices when expanded

Discussion
----------

Fixed #2545 - ChoiceType flattens grouped Choices when expanded

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

**Problem**: With PR #2464, a bug was discovered when nested choices threw a exception during rendering.

**Solution**: Nested choices are flattened prior to creating checkbox/radio fields.
2011-11-27 14:43:50 +01:00
Drak
97dd2cc860 [HttpKernel] Removed unused property. 2011-11-27 19:28:03 +05:45
Fabien Potencier
44ff807411 merged branch aboks/stopwatch_tests_win (PR #2732)
Commits
-------

a4e0697 [HttpKernel] Fixed failing Stopwatch tests due to usleep() accuracy on Windows

Discussion
----------

[HttpKernel] Fixed failing Stopwatch tests on Windows

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

Due to the system clock resolution on Windows platforms calls to `usleep()` might take less time than expected/requested, causing the Stopwatch tests to fail. Lowering the lower bounds in these tests by 10% makes the tests pass consistently on my platform.

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

by Seldaek at 2011/11/27 05:02:13 -0800

Thanks, I've had similar issues running tests here.
2011-11-27 14:42:54 +01:00
Arnout Boks
a4e0697f39 [HttpKernel] Fixed failing Stopwatch tests due to usleep() accuracy on Windows 2011-11-27 13:18:15 +01:00
Eric Clemmons
7a8e1b3b48 ChoiceType flattens nested Choices when expanded 2011-11-26 17:37:27 -08:00
Eric Clemmons
82b0b3715c Added ChoiceType test for flattening grouped Choices when expanded 2011-11-26 17:37:07 -08:00
Sebastian Marek
36c7d03040 Fixed GH-2720 - Fix disabled atrribute handling for radio form elements 2011-11-26 14:07:00 +00:00
Francis Besset
17dc605ca0 [FrameworkBundle] Checks that the template is readable before checking its modification time 2011-11-26 13:28:35 +01:00
Benjamin Eberlei
59397cf42b [DoctrineBridge] Generalize EntityValidator to work with any validation service and against any Common ClassMetadata provider 2011-11-26 11:36:09 +01:00
Jordi Boggiano
6d5b296787 Adjust doctrine requirements 2011-11-25 16:11:08 +01:00
Jordi Boggiano
628cce17e4 Adjust composer files to strictly require known to work packages 2011-11-25 15:15:14 +01:00
excelwebzone
8710a132ea Added example to the change log file 2011-11-25 00:46:40 -08:00
excelwebzone
c9a2b49eb7 Fixed xml encoder test script, and group item tags into an array 2011-11-24 09:09:38 -08:00
Fabien Potencier
1a5e0acd02 [WebProfilerBundle] added missing image for the routing in the web profiler 2011-11-24 15:58:57 +01:00
Fabien Potencier
7b1dda84b9 [HttpKernel] added unit tests for previous merge 2011-11-24 08:39:49 +01:00
Juan M Martínez
61e0bdebf8 [HttpKernel] ControllerResolver arguments reflection for Closure object.
When controller is a Closure ControllerResolver::getArguments tries to
make a ReflectionMethod of the __invoke method. But because it's an
internal function, the parameters method isDefaultValueAvailable will
return always false, even if isOptional return true.
2011-11-24 08:39:37 +01:00
Fabien Potencier
2363748ba2 merged branch canni/failed_login_event (PR #2678)
Commits
-------

09562df Update CHANGELOG for 2.1, describe new auth events
cf09c2d added authentication success/failure events

Discussion
----------

[Security] Implementation of a "failed login" event, replaces: PR #1307

As I have to use this feature I have completed its implementation.

Bugfix: no
Feature addition: yes
Symfopny2 tests pass: yes
Replaces/closes PR: #1307

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

by schmittjoh at 2011/11/18 23:57:56 -0800

Usually, this event is used for the wrong reasons (to customize what happens on authentication failure). Can you move your implementation to the AuthenticationProviderManager instead?

see https://github.com/schmittjoh/symfony/blob/master/src/Symfony/Component/Security/Core/Authentication/AuthenticationProviderManager.php#L103

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

by canni at 2011/11/19 06:00:36 -0800

Good point :) I'll not rewrite yours work, I've cherry-picked yours commits. (BTW you added call to `setEventDispatcher` on `security.authentication.manager` to commit related to some different work ;)

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

by fabpot at 2011/11/22 00:12:19 -0800

The new files are missing the LICENSE header. As far as I can see, @schmittjoh fork has a different license from the Symfony one. This needs to be clarified before I can merge this PR.

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

by schmittjoh at 2011/11/22 01:53:09 -0800

No biggy, MIT is fine here.

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

by canni at 2011/11/22 01:57:51 -0800

@fabpot done

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

by fabpot at 2011/11/22 02:22:47 -0800

@canni: Can you update the CHANGELOG file (to reference the changes and the BC breaks -- like the move of KernelEvents for instance).

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

by canni at 2011/11/22 02:40:33 -0800

@fabpot: no problem & done

PS I haven't realized that namespace change of `SecurityEvents` is actually a BC Break, thx for pointing this.

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

by fabpot at 2011/11/22 03:06:17 -0800

@canni: What about keeping a `SecurityEvents` class in the `Http` namespace that just extends the new one. That way, we don't break BC.

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

by canni at 2011/11/22 03:53:01 -0800

@fabpot: that will force us to remove `final` keyword form one of classes.

Maybe we can add new, not extending class e.g.: `GeneralSecurityEvents` or `AuthenticationEvents`, that way we dont break BC and dont introduce confusion in naming?

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

by canni at 2011/11/22 05:53:15 -0800

@fabpot: I've removed the BC break, and squashed schmittjoh commits, to keep things nice and clear.
2011-11-24 08:31:18 +01:00
Fabien Potencier
94416129a2 removed unused use statements 2011-11-24 07:17:02 +01:00
Fabien Potencier
2b5d4b90d8 merged 2.0 2011-11-24 07:16:52 +01:00
Fabien Potencier
5878490b16 removed unused use statements 2011-11-24 07:16:14 +01:00
excelwebzone
a0561e5dde Replaced item with *item when parsing XML string 2011-11-23 17:40:26 -08:00
Fabien Potencier
a7f7be2309 merged 2.0 2011-11-23 23:28:22 +01:00