Commit Graph

6796 Commits

Author SHA1 Message Date
Christophe Coevoet
58c227681e Skipped tests when PDO is not available 2011-11-14 18:39:47 +01:00
Fabien Potencier
f7c5bf1db2 [HttpKernel] fixed Content-Length header when using ESI tags (closes #2623) 2011-11-14 13:46:20 +01:00
Fabien Potencier
d67fbe9e48 [HttpFoundation] added an exception to MimeTypeGuesser::guess() when no guesser are available (closes #2636) 2011-11-14 13:21:49 +01:00
Fabien Potencier
0462a89562 [Security] fixed HttpUtils::checkRequestPath() to not catch all exceptions (closes #2637) 2011-11-14 13:10:32 +01:00
Fabien Potencier
769a1e3e0a Merge pull request #2632 from drak/9eb0ef5f106992a5a6300c47e5e03576df578bd2
Grammar fix
2011-11-13 23:10:46 -08:00
Fabien Potencier
c91d90f61e merged branch everzet/dbal-fix (PR #2635)
Commits
-------

24dcd0f [DoctrineBundle] added missing default parameters, needed to setup and use DBAL without ORM

Discussion
----------

[DoctrineBundle] added missing default parameters for DBAL

Without this change, user can't use DBAL without ORM. When user configures only DBAL - he'll get:

    [Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException]
    The service "doctrine" has a dependency on a non-existent parameter "doctrine.entity_managers".
2011-11-14 08:03:41 +01:00
Konstantin Kudryashov
24dcd0faf9 [DoctrineBundle] added missing default parameters, needed to setup and use DBAL without ORM 2011-11-14 01:43:18 +02:00
Drak
9eb0ef5f10 [Transation] Fix grammar.
In English, zero is plural so need to use 'are' - "there are no apples".
English's pluralisation rule is: nplurals=2; plural=n != 1;
2011-11-12 14:30:17 +05:45
Fabien Potencier
b6a98bfc98 merged branch dpb587/patch-trace (PR #2593)
Commits
-------

4858fbe [TwigBundle] Fix trace to not show 'in at line' when file/line are empty.

Discussion
----------

[TwigBundle] Fix trace to not show 'in at line' when file/line are empty.

Occasionally I saw call stacks where file/line are empty in the raw exception object, but the trace.html.twig file was still showing 'in at line' with empty values. I believe this fixes that.

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

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

by fabpot at 2011/11/09 22:49:35 -0800

The current code looks correct to me. Can you try with the latest version of Twig to be sure that you don't have this issue because of a bug in Twig that has been fixed since then?

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

by dpb587 at 2011/11/10 07:20:34 -0800

Thanks for the feedback. Should I change my patch to check that both are defined and non-empty, such as `trace.file is defined and trace.file and trace.line is defined and trace.line`?

I think the issue is that I'm seeing the file and line keys are defined but empty. I created another branch with a pseudo-test case that shows a little more information. Using symfony-standard with symfony in deps as follows and symfony/twig removed from deps.lock.

    [symfony]
        git=git://github.com/dpb587/symfony.git
        version=origin/patch-trace-debug

Then running the following:

    phpunit -c app/ vendor/symfony/tests/Symfony/Tests/Bundle/TwigBundle/Controller/ExceptionController.php

The test (is backwards) and passes, dumping the following (this call happens right after a call_user_func):

    Array
    (
        [namespace] => Symfony\Bundle\FrameworkBundle\EventListener
        [short_class] => RouterListener
        [class] => Symfony\Bundle\FrameworkBundle\EventListener\RouterListener
        [type] => ->
        [function] => onKernelRequest
        [file] =>
        [line] =>
        [args] => Array
            (
                [0] => Array
                    (
                        [0] => object
                        [1] => Symfony\Component\HttpKernel\Event\GetResponseEvent
                    )

            )

    )

I saw the same results with two php versions:

    PHP 5.3.3-7+squeeze3 with Suhosin-Patch (cli) (built: Jun 28 2011 08:24:40)
    Copyright (c) 1997-2009 The PHP Group
    Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
        with Xdebug v2.1.1, Copyright (c) 2002-2011, by Derick Rethans
        with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH

    PHP 5.3.8 (cli) (built: Nov  4 2011 05:43:22)
    Copyright (c) 1997-2011 The PHP Group
    Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
        with the ionCube PHP Loader v4.0.10, Copyright (c) 2002-2011, by ionCube Ltd., and
        with Zend Guard Loader v3.3, Copyright (c) 1998-2010, by Zend Technologies

Sorry if I'm simply missing something or doing something silly.

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

by fabpot at 2011/11/11 13:12:21 -0800

`trace.file is defined and trace.file and trace.line is defined and trace.line` looks good to me.
2011-11-12 09:19:12 +01:00
Fabien Potencier
564b4b91ae [FrameworkBundle] fixed a unit test 2011-11-12 09:17:56 +01:00
Fabien Potencier
ff764090b9 merged branch ManuelAC/2.0 (PR #2629)
Commits
-------

462580c [Form] Check for normal integers. refs 0427b126c1
970e2a2 [Form] Replace `an` with `is`

Discussion
----------

[Form] DateTimeToArrayTransformer fix

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

0427b126c1 throws an `TransformationFailedException` if you're using integers. In other words:

`` array('year' => '2011', 'month' => '11', 'day' => '12') = valid ``
`` array('year' => 2011, 'month' => 11, 'day' => 12) = invalid ``
2011-11-12 08:53:33 +01:00
Danny Berger
4858fbe7e0 [TwigBundle] Fix trace to not show 'in at line' when file/line are empty. 2011-11-11 18:20:32 -06:00
Manuel de Ruiter
462580c06f [Form] Check for normal integers. refs 0427b126c1 2011-11-12 00:58:46 +01:00
Manuel de Ruiter
970e2a2608 [Form] Replace an with is 2011-11-12 00:57:14 +01:00
Fabien Potencier
bb5fb79c3d changed the way we store the current ob level (refs #2617) 2011-11-11 23:35:49 +01:00
Fabien Potencier
fb0fffe6db [Validator] fixed a unit test for PHP 5.4 (closes #2585) 2011-11-11 23:22:12 +01:00
Fabien Potencier
1940bec31b merged branch igorw/phpunit-ob-level (PR #2617)
Commits
-------

29e12af [TwigBundle] Extract output buffer cleaning to method
ed1a6c2 [TwigBundle] Do not clean output buffering below initial level

Discussion
----------

[TwigBundle] Do not clean output buffering below initial level

This resulted in issues with PHPUnit 3.6, which will buffer all output and clean them in the end. Since
we cleaned their buffer, the subsequent clean would raise a warning. This is documented in [issue 390](https://github.com/sebastianbergmann/phpunit/issues/390) of
the PHPUnit tracker.

Closes #2531.

This also affects FOSRestBundle's ExceptionController /cc @lsmith.

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

by fabpot at 2011/11/11 07:33:24 -0800

I have a similar fix locally but I have not merged it yet as it looks a bit dirty (but I've not a better idea yet). Anyway, your PR is better than mine as you've added some unit tests already.
2011-11-11 22:17:55 +01:00
Fabien Potencier
7f32043f19 merged branch jalliot/file_widget (PR #2608)
Commits
-------

e83e00a Fixed rendering of FileType (value is not a valid attribute for input[type=file])

Discussion
----------

Fixed rendering of FileType

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

According to the W3C validator, `value` is not a valid attribute for `input[type=file]`.

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

by fabpot at 2011/11/10 23:01:24 -0800

Instead of creating yet another block, what about modifying the `field_widget` to not render the `value` attribute if the value is empty? Also, the PHP template must be fixed too.

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

by jalliot at 2011/11/11 02:02:52 -0800

@fabpot Changed ;)
2011-11-11 22:01:59 +01:00
Fabien Potencier
0427b126c1 [Form] fixed previous merge 2011-11-11 22:01:46 +01:00
Fabien Potencier
3922fb839a [Form] simplified previous merge 2011-11-11 21:49:47 +01:00
Fabien Potencier
7475a3924c merged branch ondrowan/2.0 (PR #2614)
Commits
-------

2582fcb Added tests for string fix in DateTimeToArrayTransformer (8351a11286).
8351a11 Added check for array fields to be integers in reverseTransform method. This prevents checkdate from getting strings as arguments and throwing incorrect ErrorException when submitting form with malformed (string) data in, for example, Date field. #2609

Discussion
----------

Fix for #2609

Second take for fix for #2609, hope it's ok now. Tests are failing without my fix and passing with it.
2011-11-11 21:48:12 +01:00
Fabien Potencier
1a2b3cffd8 merged branch schniper/patch-2 (PR #2622)
Commits
-------

7cba0a0 Also identify FirePHP by the X-FirePHP-Version header

Discussion
----------

Also identify FirePHP by the X-FirePHP-Version header
2011-11-11 21:17:03 +01:00
Costin Bereveanu
7cba0a07b6 Also identify FirePHP by the X-FirePHP-Version header 2011-11-11 17:04:36 +02:00
Igor Wiedler
29e12affb0 [TwigBundle] Extract output buffer cleaning to method 2011-11-11 14:54:44 +01:00
Igor Wiedler
ed1a6c2e45 [TwigBundle] Do not clean output buffering below initial level
This resulted in issues with PHPUnit 3.6, which will buffer all output and clean them in the end. Since
we cleaned their buffer, the subsequent clean would raise a warning. This is documented in issue 390 of
the PHPUnit tracker.

Closes #2531.
2011-11-11 12:09:57 +01:00
Jordan Alliot
e83e00a7b8 Fixed rendering of FileType (value is not a valid attribute for input[type=file]) 2011-11-11 11:01:38 +01:00
ondrowan
2582fcb1e1 Added tests for string fix in DateTimeToArrayTransformer (8351a11286). 2011-11-11 10:00:41 +01:00
ondrowan
8351a11286 Added check for array fields to be integers in reverseTransform method. This prevents checkdate from getting strings as arguments and throwing incorrect ErrorException when submitting form with malformed (string) data in, for example, Date field. #2609 2011-11-11 09:58:40 +01:00
Fabien Potencier
6b0e7c8c41 [Translation] removed unneeded methods 2011-11-11 09:02:31 +01:00
Fabien Potencier
45b218e7c4 [Translation] added detection for circular references when adding a fallback catalogue 2011-11-11 08:29:16 +01:00
Fabien Potencier
632a99fd7c merged branch stealth35/fix_2599 (PR #2601)
Commits
-------

a245e15 [DomCrawler] trim URI in getURI

Discussion
----------

[DomCrawler] trim URI in getURI

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #2599
2011-11-11 08:09:10 +01:00
stealth35
a245e15434 [DomCrawler] trim URI in getURI 2011-11-10 15:38:28 +01:00
Fabien Potencier
f8164ec380 merged branch aboks/yaml_inlinetest (PR #2602)
Commits
-------

e7acb23 [Yaml][Tests] Fixed missing locale string for Windows platforms which caused test to fail

Discussion
----------

[Yaml][Tests] Fixed missing locale string for Windows platforms

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

On Windows all the locale formats supplied in the test do not work, causing the test to fail. The added locale string works correctly on (at least) Windows 7.
2011-11-10 13:05:03 +01:00
Arnout Boks
e7acb23636 [Yaml][Tests] Fixed missing locale string for Windows platforms which caused test to fail 2011-11-10 12:50:53 +01:00
Fabien Potencier
3c584f5683 merged branch snc/issue-1798 (PR #2528)
Commits
-------

f9befb6 Remove only the security token instead of the session cookie.
348bccb Clear session cookie if user was deleted, is disabled or locked to prevent infinite redirect loops to the login path (fixes #1798).

Discussion
----------

Fix for issue 1798

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

Clear session cookie if user was deleted, is disabled or locked to prevent infinite redirect loops to the login path (fixes #1798).

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

by snc at 2011/11/01 04:01:49 -0700

@stof I have changed the code so that it only removes the token... do we still need any hook support?

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

by stof at 2011/11/01 04:07:17 -0700

well, the hook is for your own use case but it would be for 2.1 only anyway, not for 2.0

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

by snc at 2011/11/07 15:11:52 -0800

Now that #2414 is merged to 2.1, this could be simplified for the master branch...
2011-11-10 10:54:32 +01:00
Fabien Potencier
877e484529 merged branch snc/issue-2589 (PR #2596)
Commits
-------

932c144 Added a class to the logs ol element to prevent hiding it when toggling an exception (fixes #2589).

Discussion
----------

Fix for issue 2589

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

Added a class to the logs ol element to prevent hiding it when toggling an exception.
2011-11-10 10:52:13 +01:00
H. Westphal
932c144534 Added a class to the logs ol element to prevent hiding it when toggling an exception (fixes #2589). 2011-11-10 10:20:28 +01:00
Fabien Potencier
9d2ab9ca9c [Doctrine] fixed security user reloading when the user has been changed via a form with validation errors (closes #2033) 2011-11-08 08:33:49 +01:00
Fabien Potencier
414d4be7e8 [Doctrine] refactored unit tests 2011-11-08 08:23:31 +01:00
Fabien Potencier
318576b3ac merged branch ericclemmons/2295-serializer-normalizable-traversable (PR #2578)
Commits
-------

7346896 Changed Serialized#supportsNormalization to PRIVATE
e851efc Updated SerializerTest with "normalizeTraversable" & "testNormalizeGivesPriorityToInterfaceOverTraversable"
d789f94 Serializer#normalize gives precedence to objects that support normalization
9e6ba9a Added protected Serializer#supportsNormalization

Discussion
----------

[Serializer] `normalize` should use supported normalizer before Traversable

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

**Same as PR #2539, except rebased onto `2.0`**

Should I abstract out a `supportsDenormalization` function just for symmetry?
2011-11-08 07:46:27 +01:00
Fabien Potencier
023a10ca3b merged branch jmikola/2.0-HttpUtils (PR #2576)
Commits
-------

57b7daf [Security] Fix checkRequestPath doc; closes #2323

Discussion
----------

[Security] Fix checkRequestPath doc; closes #2323
2011-11-08 07:41:05 +01:00
Eric Clemmons
7346896129 Changed Serialized#supportsNormalization to PRIVATE 2011-11-07 19:25:58 -08:00
Eric Clemmons
e851efc8d6 Updated SerializerTest with "normalizeTraversable" & "testNormalizeGivesPriorityToInterfaceOverTraversable" 2011-11-07 19:25:58 -08:00
Eric Clemmons
d789f9424e Serializer#normalize gives precedence to objects that support normalization 2011-11-07 19:25:58 -08:00
Eric Clemmons
9e6ba9ae89 Added protected Serializer#supportsNormalization
This is very useful for cleaning up the logic in Serializer#normalize
and allow easy checking of both the cache & stored normalizers
2011-11-07 19:25:58 -08:00
Jeremy Mikola
57b7daf252 [Security] Fix checkRequestPath doc; closes #2323 2011-11-07 17:36:10 -05:00
Fabien Potencier
b33198f842 fixed CodeHelper::formatFileFromText() method to allow " as a file wrapper (it occurs for the main exception message) 2011-11-07 20:49:42 +01:00
Fabien Potencier
c31c512466 [FrameworkBundle] fixed output buffering when an error occurs in a sub-request 2011-11-07 18:25:31 +01:00
Fabien Potencier
380c67efc8 [FrameworkBundle] fixed HttpKernel when the app is stateless 2011-11-07 18:25:10 +01:00
Fabien Potencier
0875527fb8 [FrameworkBundle] added a missing translation for pt_PT (backported from master) 2011-11-07 08:42:30 +01:00