Commit Graph

7671 Commits

Author SHA1 Message Date
Fabien Potencier
93de0e07c3 merged branch Burgov/hint_about_mime_type_guesser_2_0 (PR #2843)
Commits
-------

45bba7b Added a hint about a possible cause for why no mime type guesser is be available

Discussion
----------

Added a hint about a possible cause for why no mime type guesser is be available

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
2011-12-12 08:23:08 +01:00
Andrej Hudec
cd24fb86a8 change explode's limit parameter based on known variable content 2011-12-11 21:58:35 +01:00
Andrej Hudec
b3cc270450 minor optimalisations for explode 2011-12-11 21:58:30 +01:00
lsmith77
72b9083ca1 SerializerAwareNormalizer now only implements SerializerAwareInterface 2011-12-11 21:18:03 +01:00
lsmith77
97389fa349 use Serializer specific RuntimeException 2011-12-11 21:01:02 +01:00
lsmith77
cb495fd7a3 added additional unit tests for deserialization 2011-12-11 20:54:18 +01:00
lsmith77
967531faa5 fixed various typos from the refactoring 2011-12-11 20:53:57 +01:00
lsmith77
067242d003 updated serializer tests to use the new interfaces 2011-12-11 20:41:17 +01:00
lsmith77
d811e2919c CS fix 2011-12-11 20:40:52 +01:00
Lukas Kahwe Smith
351eaa8506 require a (de)normalizer inside the (de)normalizable interfaces instead of a serializer 2011-12-11 20:03:01 +01:00
Lukas Kahwe Smith
c3d61232c9 re-added supports(de)normalization() 2011-12-11 20:03:01 +01:00
Lukas Kahwe Smith
078f7f3ecd more typo fixes 2011-12-11 20:03:01 +01:00
Lukas Kahwe Smith
c3a711d3f2 abstract class children should also implement dernormalization 2011-12-11 20:03:01 +01:00
Lukas Kahwe Smith
2a6741c288 typo fix 2011-12-11 20:03:01 +01:00
Lukas Kahwe Smith
d021dc82a7 refactored encoder handling to use the supports*() methods to determine which encoder handles what format 2011-12-11 20:03:00 +01:00
Lukas Kahwe Smith
f8e2787224 refactored Normalizer interfaces 2011-12-11 20:03:00 +01:00
Lukas Kahwe Smith
58bd0f5822 refactored the EncoderInterface 2011-12-11 20:03:00 +01:00
Lukas Kahwe Smith
b0daf3516f split off an EncoderInterface and NormalizerInterface from SerializerInterface 2011-12-11 20:03:00 +01:00
Bart van den Burg
45bba7b7be Added a hint about a possible cause for why no mime type guesser is be available 2011-12-11 19:59:22 +01:00
Bart van den Burg
171f2d5090 fixed failing test in windows because
1) PHP_BINDIR is not secure to rely on
2) the assertion doesn't actually check for the suffix as the test implies
2011-12-11 19:56:03 +01:00
Fabien Potencier
7ff6f6b3fd merged branch vicb/TemplateLocator/exception-message (PR #2804)
Commits
-------

db2d773 [FrameworkBundle] Improve the TemplateLocator exception message

Discussion
----------

Template locator/exception message

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

Improve the error message to include the error message from the File Locator which is more accurate : the File Locator might also look in some fallback folder(s) (i.e.  `%kernel.root_dir%/Resources`)
2011-12-11 18:52:47 +01:00
Fabien Potencier
fd12796673 merged 2.0 2011-12-11 18:50:50 +01:00
Fabien Potencier
e9ddd39b71 merged branch lsmith77/serializer_tests (PR #2838)
Commits
-------

b1ca0cd added several tests to the serializer (mainly for deserialization)

Discussion
----------

Serializer tests

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/lsmith77/symfony.png?branch=serializer_tests)](http://travis-ci.org/lsmith77/symfony)
Fixes the following tickets: -

The state of the serializer tests wasn't as bad as I thought.
Was mostly missing tests for some edge cases as well as deserialization.

Once this is merged to 2.0 and master, I will rebase #2530 and make sure the tests still pass.
2011-12-11 18:42:31 +01:00
Fabien Potencier
4bdef75618 merged branch dantleech/filesystem-sprintf-typo-1 (PR #2831)
Commits
-------

84bb6bc [Filesystem] Sprintf typo in exception

Discussion
----------

[Filesystem] Sprintf typo in exception

Bug fix: [yes]
Feature addition: [no]
Backwards compatibility break: [no]
2011-12-11 18:42:00 +01:00
Fabien Potencier
a85f3c8e70 merged branch pulse00/2.0 (PR #2832)
Commits
-------

40e5b60 [FrameworkBundle] added return type for getContainer()

Discussion
----------

added return type for getContainer()

IDE type inference support
2011-12-11 18:41:35 +01:00
Fabien Potencier
c74f5f245c merged branch stealth35/fix_2735 (PR #2760)
Commits
-------

3759ff0 [Locale] StubNumberFormatter allow to parse 64bit number in 64bit mode

Discussion
----------

[Locale] StubNumberFormatter allow to parse 64bit number in 64bit mode

Bug fix: yes
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/stealth35/symfony.png?branch=fix_2735)](http://travis-ci.org/stealth35/symfony)
Fixes the following tickets: #2735

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

by stealth35 at 2011/12/01 06:47:32 -0800

@Seldaek should be better now

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

by stealth35 at 2011/12/02 04:22:42 -0800

@fabpot done

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

by fabpot at 2011/12/02 04:28:24 -0800

Tests do not pas for me (on a Mac):

    1) Symfony\Tests\Component\Locale\Stub\StubNumberFormatterTest::testParseTypeInt64StubWith64BitIntegerInPhp64Bit
    ->parse() TYPE_INT64 does not use true 64 bit integers, using only the 32 bit range.
    Failed asserting that 2147483648 matches expected -2147483648.

    .../tests/Symfony/Tests/Component/Locale/Stub/StubNumberFormatterTest.php:819

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

by stealth35 at 2011/12/02 04:50:20 -0800

@fabpot, could you send me the return of this code

``` php
<?php
$formatter = new \NumberFormatter('en', \NumberFormatter::DECIMAL);

$value = $formatter->parse('2,147,483,648', \NumberFormatter::TYPE_INT64);
var_dump($value);

$value = $formatter->parse('-2,147,483,649', \NumberFormatter::TYPE_INT64);
var_dump($value);
```

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

by fabpot at 2011/12/02 06:06:21 -0800

    int(-2147483648)
    int(2147483647)

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

by stealth35 at 2011/12/02 06:10:28 -0800

It's nosens, but the Stub should follow Intl ... so I fix that

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

by stealth35 at 2011/12/11 08:48:25 -0800

It's OK now
2011-12-11 18:40:34 +01:00
stealth35
3759ff0777 [Locale] StubNumberFormatter allow to parse 64bit number in 64bit mode 2011-12-11 17:45:39 +01:00
lsmith77
b1ca0cdfe9 added several tests to the serializer (mainly for deserialization) 2011-12-11 12:09:53 +01:00
Robert Gruendler
40e5b609b2 [FrameworkBundle] added return type for getContainer() 2011-12-09 22:04:44 +01:00
DanSync
84bb6bce7f [Filesystem] Sprintf typo in exception
- Is "%" instead of "%s"
2011-12-09 17:49:17 +00:00
Fabien Potencier
ab0b4f3c2c bumped Symfony version to 2.0.8-DEV 2011-12-09 16:15:51 +01:00
Fabien Potencier
c22652f5d7 merged branch aboks/doctrine_data_collector (PR #2733)
Commits
-------

bb0d202 Switched sanitizeParameter() for existing varToString()-method; now always stores a string representation of each parameter
4fe4dfd Fixed vendor version mismatch in tests
28730e9 [DoctrineBridge] Added unit tests
4535abe [DoctrineBridge] Fixed attempt to serialize non-serializable values

Discussion
----------

[DoctrineBridge] Fixed attempt to serialize non-serializable values

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

The Doctrine DBAL type system does not pose any restrictions on the php-types of parameters in queries. Hence one could write a doctrine-type that uses a resource or an `\SplFileInfo` as its corresponding php-type. Parameters of these types are logged in the `DoctrineDataCollector` however, which is then serialized in the profiler. Since resources or `\SplFileInfo` variables cannot be serialized this throws an exception.

This PR fixes this problem (for known cases) by sanitizing the query parameters to only contain serializable types. The `isNotSerializable`-check surely is not complete yet, but more non-serializable classes can be added on a case-by-case basis.

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

by fabpot at 2011/12/07 07:04:43 -0800

Tests do not pass for me.

Furthermore, let's reuse what we already have in the framework (see https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/HttpKernel.php#L187 -- yes you can just copy/paster the existing code).

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

by aboks at 2011/12/09 01:41:14 -0800

@fabpot I fixed the tests (seems I had the wrong vendor versions in my copy) and reused the `varToString()`-code. This introduces a tiny BC break in the rare case that someone writes his own templates for the web profiler (the parameters returned by the data collector are now always a string; could be any type before).

After merging this PR, merging 2.0 into master would give a merge conflict and failing tests (because of the changes related to the introduction of the `ManagerRegistry` interface). To prevent this, please merge #2820 into master directly after merging this PR (so before merging 2.0 into master). After that 2.0 can be cleanly merged into master.

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

by stof at 2011/12/09 03:43:38 -0800

it is not a BC break. Using ``yaml_encode`` on a string will not break the template
2011-12-09 16:12:04 +01:00
Joseph Bielawski
5f2226807c [Profiler] Sync with master 2011-12-09 11:51:29 +01:00
stloyd
1aef4e806b Adds collecting info about request method and allowing searching by it 2011-12-09 10:53:33 +01:00
Victor Berchet
db2d773d93 [FrameworkBundle] Improve the TemplateLocator exception message 2011-12-09 10:35:15 +01:00
Arnout Boks
bb0d202250 Switched sanitizeParameter() for existing varToString()-method; now always stores a string representation of each parameter 2011-12-08 18:14:27 +01:00
Arnout Boks
4fe4dfd116 Fixed vendor version mismatch in tests 2011-12-08 18:09:06 +01:00
Fabien Potencier
76ba2bc7ac merged branch kriswallsmith/security/demeter-fix (PR #2816)
Commits
-------

41872cd [Security] added SecurityContextInterface::getUser()

Discussion
----------

[Security] added SecurityContextInterface::getUser()

This changes helps the common use case of fetching the current user and better complies with the [Law of Demeter][1].

Before (still works):

    $token = $context->getToken();
    $user = $token ? $token->getUser() : null;

After:

    $user = $context->getUser();

The fine print:

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

[1]: http://en.wikipedia.org/wiki/Law_of_Demeter
2011-12-08 17:58:34 +01:00
Fabien Potencier
c6db266d83 merged branch stof/reference_case_insensitive (PR #2815)
Commits
-------

2c3e9ad [DependencyInjection] Made the reference case insensitive

Discussion
----------

[DependencyInjection] Made the reference case insensitive

The container is case insensitive so using capital letters in a reference
made it fail in some cases when checking the dependencies.
Closes #2807

Replaces #2811 by targeting the good branch
2011-12-08 17:53:12 +01:00
Kris Wallsmith
41872cd40e [Security] added SecurityContextInterface::getUser()
This changes helps the common use case of fetching the current user and better complies with the Law of Demeter (http://en.wikipedia.org/wiki/Law_of_Demeter).

Before (still works):

    $token = $context->getToken();
    $user = $token ? $token->getUser() : null;

After:

    $user = $context->getUser();
2011-12-08 08:53:01 -08:00
Christophe Coevoet
2c3e9adcd1 [DependencyInjection] Made the reference case insensitive
The container is case insensitive so using capital letters in a reference
made it fail in some cases when checking the dependencies.
Closes #2807
2011-12-08 16:30:50 +01:00
Oscar Cubo Medina
600066eda4 [Templating] fixed 'scheme://' not detected as absolute path 2011-12-08 15:42:21 +01:00
Oscar Cubo Medina
e6f2687107 [HttpKernel] fixed 'scheme://' not detected as absolute path 2011-12-08 15:42:21 +01:00
Oscar Cubo Medina
b50ac5be36 [Config] fixed 'scheme://' not detected as absolute path
This also allows the use of configuration files stored in phar files.
2011-12-08 15:42:21 +01:00
Fabien Potencier
4730f4303b merged 2.0 2011-12-08 15:36:57 +01:00
Fabien Potencier
848f87504d updated VERSION for 2.0.7 2011-12-08 15:17:21 +01:00
Fabien Potencier
84d657959f update CONTRIBUTORS for 2.0.7 2011-12-08 15:17:21 +01:00
Fabien Potencier
9cb52ee2a7 updated CHANGELOG for 2.0.7 2011-12-08 15:17:21 +01:00
Fabien Potencier
2134909468 fixed doctrine/common requirements 2011-12-08 15:17:21 +01:00
Jordi Boggiano
18821612bf Adjust doctrine requirements 2011-12-08 15:17:20 +01:00