Commit Graph

7164 Commits

Author SHA1 Message Date
Benjamin Eberlei
661421ff7c [Doctrine] Remove AbstractDoctrineBundle and move code into Doctrine Bridge 2011-10-26 20:40:48 +02:00
Fabien Potencier
ac5b8a4c37 merged 2.0 2011-10-26 14:29:19 +02:00
Fabien Potencier
5404a46c45 [HttpFoundation] marked some tests as skipped when intl is not available 2011-10-26 14:28:56 +02:00
Fabien Potencier
408414c252 [Form] marked some tests as skipped when intl is not available 2011-10-26 14:23:39 +02:00
Fabien Potencier
3043fa0878 [HttpFoundation] fixed PHP 5.4 regression 2011-10-26 14:13:44 +02:00
Fabien Potencier
e50ce47507 [WebProfilerBundle] adjusted the default canvas size for the timeline 2011-10-25 18:04:41 +02:00
Fabien Potencier
8dcde3c076 [DependencyInjection] fixed int casting for XML files (based on what is done in the YAML component) 2011-10-25 17:52:36 +02:00
Fabien Potencier
bc330d4487 merged branch lsmith77/fix_q_handling (PR #2365)
Commits
-------

d3f137b cosmetic tweak
2877883 anything in front of ;q= is part of the mime type, anything after may be ignored

Discussion
----------

[HttpFoundation] fix splitHttpAcceptHeader() parsing of parameters

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

anything in front of ;q= is part of the mime type, anything after may be ignored

see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1

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

by lsmith77 at 2011/10/09 04:00:12 -0700

i must admit .. i am not 100% that my implemention is correct either .. but i am sure the current one isn't.

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

by lsmith77 at 2011/10/09 07:57:33 -0700

@fabpot: I am also not sure if getFormat() should optionally not support matching parameters, aka anything before ``;q=..``
2011-10-25 17:26:31 +02:00
Fabien Potencier
a4d4d4c1f8 merged branch mvrhov/dbal_sessstorage_fix (PR #2384)
Commits
-------

0907111 session data needs to be encoded because it can contain non binary safe characters e.g null. Fixes #2067

Discussion
----------

session data needs to be encoded because it can contain non binary safe characters e.g null., part 2

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

I'm marking this as a compatibility break because session table should be cleared and even if not cleared all currently logged in users will be logged out.

This is the fix for a same issue in DBAL session storage made against master.

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

by schmittjoh at 2011/10/12 02:44:19 -0700

If I understand this correctly, only the PgSqlPlatform is affected by this. What do you think about adding an ``ìnstanceof PgSqlPlatform`` check?

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

by mvrhov at 2011/10/12 03:47:52 -0700

It's the same for sqlite, it just happens that mysql escapes \0, so we can say it's driver dependent.
The Drupal guys had the same issue http://drupal.org/node/690746 , they changed to column type to bytea for pgsql and for mysql to blob, also in Drupal report you can find that storing this into a session hash_file('md5', 'CHANGELOG.txt', TRUE) will trigger the similar problem in mysql.
The other thing to consider is what I mentioned in original bugreport, e.g igbinary as default serializer for session data.
2011-10-25 17:18:25 +02:00
Fabien Potencier
94e7e54777 merged branch mvrhov/pdo_sessstorage_fix (PR #2382)
Commits
-------

edfa29b session data needs to be encoded because it can contain non binary safe characters e.g null. Fixes #2067

Discussion
----------

session data needs to be encoded because it can contain non binary safe characters e.g null.

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

I'm marking this as a compatibility break because session table should be cleared and even if not cleared all currently logged in users will be logged out.

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

by mvrhov at 2011/10/11 12:52:25 -0700

P.S. I know there was a talk about doctrine based session storage but I cannot find this in core. It probably has the same problem.

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

by eventhorizonpl at 2011/10/11 14:34:08 -0700

Thanks for tracking down and fixing this issue!

Best regards,
Michal

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

by stof at 2011/10/11 16:24:18 -0700

@mvrhov The Doctrine based storage is only available in master, not in 2.0
2011-10-25 17:18:16 +02:00
Fabien Potencier
95ec41b075 [Console] made the defaults in Application more easily customizable 2011-10-25 17:12:17 +02:00
Fabien Potencier
6c2f093b33 [HttpFoundation] removed superfluous query call (closes #2469) 2011-10-25 15:45:14 +02:00
Fabien Potencier
68eb068fd8 merged branch jonathaningram/patch-1 (PR #2466)
Commits
-------

6343bef [HttpKernel] Updated mirror method to check for symlinks before dirs and files

Discussion
----------

[HttpKernel] Updated mirror method to check for symlinks before dirs and files

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #2436
2011-10-25 11:05:13 +02:00
Jonathan Ingram
6343bef55e [HttpKernel] Updated mirror method to check for symlinks before dirs and files 2011-10-25 20:58:39 +12:00
Fabien Potencier
b112ef5fdc merged branch bmatzner/patch-1 (PR #2459)
Commits
-------

c46fe16 Adding "sf-toolbar" class to toolbar wrapper to make it possible to check for its existance prior to js instantiation (in order to change page layout when profiler toolbar is enabled)

Discussion
----------

[WebProfilerBundle] Adding "sf-toolbar" class to toolbar wrapper to make it possible to check

Adding "sf-toolbar" class to toolbar wrapper to make it possible to check for its existance prior to js instantiation (in order to change page layout when profiler toolbar is enabled)
2011-10-24 22:47:47 +02:00
Fabien Potencier
876ef554e5 merged branch vatson/bugfix-phpdumper-optimize-string (PR #2457)
Commits
-------

808088a added the ability to use dot and single quotes in the keys and values

Discussion
----------

[2.0][Bugfix][DependencyInjection] added the ability to use dot and single quotes in the keys and values

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

We can not set a specific combination of dots and single quotes in the values ​​and keys of the arguments. I.E.

```xml
<?xml version="1.0" ?>
<container xmlns="http://symfony.com/schema/dic/services"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
  <services>
    <service id="key_escaper" class="MyNamespace\MyClass">
        <call method="setCollection">
          <argument type="collection">
            <argument key="only dot">.</argument>
            <argument key="concatenation as value">.''.</argument>
            <argument key="concatenation from the start line">''.</argument>
            <argument key=".">is the same problem for the keys?</argument>
          </argument>
        </call>
      </service>
  </services>
</container>
```

As a result we have such a dump:

```php
<?php

class appDevDev_formapro1DebugProjectContainer extends Container
{
  protected function getKeyEscaperService()
  {
      $this->services['key_escaper'] = $instance = new \MyNamespace\MyClass();

      $instance->setCollection(array('only dot' => , 'concatenation as value' => '.\'\, 'concatenation from the start line' => '\'\,  => 'is the same problem for the keys?'));

      return $instance;
  }
}
```
2011-10-24 22:45:29 +02:00
Fabien Potencier
cbdeb104aa merged branch jmikola/2.0-FrameworkExtensionTest (PR #2462)
Commits
-------

64e7833 [FrameworkBundle] Fix typo in FrameworkExtensionTest

Discussion
----------

[FrameworkBundle] Fix typo in FrameworkExtensionTest

Spotted this typo in the test messages from my previous asset helper scope PR.
2011-10-24 22:00:03 +02:00
Jeremy Mikola
64e783367f [FrameworkBundle] Fix typo in FrameworkExtensionTest 2011-10-24 14:17:43 -04:00
Fabien Potencier
9077f6a971 [SwiftmailerBundle] replaced MessageLogger class with the one from Swiftmailer 4.1.3 2011-10-24 17:13:15 +02:00
Fabien Potencier
70e0dba77c moved the Swiftmailer data collector to the Swifmailer bridge 2011-10-24 17:10:29 +02:00
Bernd Matzner
c46fe1690f Adding "sf-toolbar" class to toolbar wrapper to make it possible to check for its existance prior to js instantiation (in order to change page layout when profiler toolbar is enabled) 2011-10-24 15:29:00 +03:00
Fabien Potencier
e790842ea6 merged branch Seldaek/firephp (PR #2458)
Commits
-------

27d0809 [MonologBridge] Adjust for Monolog 1.0.2

Discussion
----------

[MonologBridge] Adjust for Monolog 1.0.2

This is BC, it just turns off headers in browsers that don't have Firebug, I have had problems in IE with more than 150 log entries just crashing the page.
2011-10-24 12:34:15 +02:00
Fabien Potencier
09692e2f16 [Routing] removed unused variable 2011-10-24 12:31:00 +02:00
Jordi Boggiano
27d080984c [MonologBridge] Adjust for Monolog 1.0.2 2011-10-24 12:01:46 +02:00
Vadim Tyukov
808088a3ca added the ability to use dot and single quotes in the keys and values 2011-10-24 12:45:36 +03:00
Fabien Potencier
714d0326d6 Merge branch '2.0'
* 2.0:
  [Routing] fixed side-effect in the PHP matcher dumper
2011-10-24 11:44:09 +02:00
Fabien Potencier
cbb4bbae97 [Routing] fixed side-effect in the PHP matcher dumper 2011-10-24 11:41:08 +02:00
Fabien Potencier
167a96fcf3 [Routing] fixed side-effect in the PHP matcher dumper 2011-10-24 11:39:31 +02:00
Fabien Potencier
08b5d73c37 updated CHANGELOG for 2.1 2011-10-24 09:11:18 +02:00
Fabien Potencier
8fa061cc6e [WebProfilerBundle] added a profiler panel for the router 2011-10-24 09:08:38 +02:00
Fabien Potencier
8cc3158d89 [FrameworkBundle] added a command to help debugging route matching problems 2011-10-24 09:08:38 +02:00
Fabien Potencier
24b93928bf [Routing] added a matcher that helps debugging matching problems 2011-10-24 09:08:36 +02:00
Fabien Potencier
14055c2504 [Routing] added a unit test to document an intended behavior (defaults and requirements are overriden when defined in the addPrefix method) 2011-10-23 14:45:47 +02:00
Fabien Potencier
6aee641a1e revert 89fd965 (refs #2339) 2011-10-23 14:09:54 +02:00
Fabien Potencier
b876412d3b updated CHANGELOG for 2.1 2011-10-23 12:00:47 +02:00
Fabien Potencier
2e1344eb7e [Routing] added the possibility to define default values and requirements for placeholders in prefix 2011-10-23 11:57:55 +02:00
Fabien Potencier
1bd6e4d427 merged 2.0 2011-10-23 09:53:10 +02:00
Fabien Potencier
76148d0da6 merged branch mvrhov/cache_warmup_exception (PR #2445)
Commits
-------

6b872cf Check if cache_warmer service is available before doing the actual cache warmup

Discussion
----------

fix cache warump exception when service is not available

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

fixes [Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException]
  You have requested a non-existent service "cache_warmer". in console when FrameworkBundle is removed from kernel.
2011-10-23 09:52:48 +02:00
Fabien Potencier
1a43505a3e [FrameworkBundle] fixed priority to be consistent with 2.1 2011-10-23 09:50:45 +02:00
Fabien Potencier
5a549f2be7 merged branch stof/profiler_priority (PR #2439)
Commits
-------

e81c710 Increased the priority of the profiler request listener

Discussion
----------

Increased the priority of the profiler request listener

If a request listener returns a response before calling the profiler
listener, the request will not be added in the stack leading to an error
during the handling of the kernel.response event. The profiler listener
should ideally be run first.

The same issue will occur if a previous listener throws an exception btw.

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

by schmittjoh at 2011/10/20 08:21:15 -0700

Can you add a test?

These interdependencies between listeners are really easy to mess up, and no-one will remember why listener X has to be run before listener Y, but after listener Z.

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

by stof at 2011/10/20 08:27:51 -0700

Well, in fact, the only rule is that the listener **must** run for the request event to avoid failing during the response event of an eventual subrequest. So if another listener triggers a subrequest before the profiler is called, it will fail because the parent request is not in the stack.

A better fix would probably make the listener work even when the propagation of the request event has been stopped (or has not reached this listener yet) to avoid issues (someone doing a subrequest in its own listener will still be able to use a higher priority for instance) but I don't have time to refactor @fabpot's refactoring now.

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

by schmittjoh at 2011/10/20 08:36:40 -0700

Another idea would be to add a ProfilerHttpKernel as it basically needs to wrap the request/response cycle, and people might have priorities beyond 1000 (see @Seldaek's SecurityBundle).

Using an extra kernel would be the only way to really guarantee that it is working. Note that I'm not implying you should do it, but as a "real" fix this would probably be better.

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

by stof at 2011/10/20 08:43:07 -0700

The issue by wrapping the HttpKernel is that the kernel passed in the event is the one dispatching the event. So we would have to implement it by using inheritance, not composition (otherwise the listener would create subrequests using the inner kernel and they would not be profiled).
But FrameworkBundle already extend the HttpKernel to handle the creation of the request scope (which must be done using inheritance for the same reason).
So it would require having a ContainerAwareHttpKernel (handling the scope), a ProfilerHttpKernel (handling the profiler) both extending the base HttpKernel (the Profiler one should be usable when using only the component, and the ContainerAware one is needed in prod when disabling the profiler) but also a ContainerAwareProfilerHttpKernel extending one of them and duplicating the logic of the other.

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

by schmittjoh at 2011/10/20 08:52:13 -0700

So maybe, we need to revisit which kernel is passed in the event as well.

But doing things more explicitly is better than making assumptions about priorities that no-one can remember in a few weeks.

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

by stof at 2011/10/20 09:53:45 -0700

@schmittjoh Issue is, using composition would require to let the inner kernel know about the wrapper to be able to pass it in the event. This looks ugly.

But I agree it would be better to do things explicitly

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

by Seldaek at 2011/10/21 07:39:23 -0700

Didn't read everything, busy, but regarding the mention of our security bundle, it is highlighting a big issue with priorities imo, in that we're missing a one-stop page that lists all the existing priorities, and possibly some more details like "if you do this, don't go above this priority or it'll blow up". Otherwise it'll just be a game of escalation :)
2011-10-23 09:50:26 +02:00
Fabien Potencier
d5bec5a57c merged branch mvrhov/cache_warmup_exception (PR #2445)
Commits
-------

6b872cf Check if cache_warmer service is available before doing the actual cache warmup
40fb76d [Framework] removed wrong listener

Discussion
----------

fix cache warump exception when service is not available

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

fixes [Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException]
  You have requested a non-existent service "cache_warmer". in console when FrameworkBundle is removed from kernel.
2011-10-23 09:48:57 +02:00
Fabien Potencier
559d676b39 merged branch snc/upgrade-session-locale (PR #2446)
Commits
-------

c915f48 Added another "before" possibility to retrieve the locale from a Twig template.

Discussion
----------

Added {{ app.session.locale }} to UPGRADE-2.1.md

Added another "before" possibility to retrieve the locale from a Twig template.
2011-10-23 09:47:55 +02:00
Fabien Potencier
ad7fcf5206 moved WarmableInterface to the HttpKernel component 2011-10-23 09:47:17 +02:00
Fabien Potencier
cb9ac138d5 merged branch dbu/router-cache-warmup-interface (PR #2451)
Commits
-------

96235a6 cs fix
46a69f1 define a WarmableInterface and only warm the cache if it implements warmable to allow replacing the core router. this fixes #2422. combining routers will only really work when #2450 is merged too.

Discussion
----------

define a WarmableInterface and only warm the cache if it implements warmable

define a WarmableInterface and only warm the cache if it implements warmable to allow replacing the core router. this fixes #2422. combining routers will only really work when #2450 is merged too.

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

(*) tests:
success for
phpunit src/Symfony/Bundle/FrameworkBundle/Tests/
and
phpunit tests/Symfony/Tests/Component/Routing/

but when running all tests, i have to put gc_disable() into autoload to avoid segmentation fault and then get (after 3000 successful tests):

PHP Fatal error:  Call to undefined method Symfony\Tests\Component\HttpKernel\Debug\StopwatchTest::assertCount() in /home/david/liip/symfony-cmf/cmf-sandbox/vendor/symfony/tests/Symfony/Tests/Component/HttpKernel/Debug/StopwatchTest.php on line 84

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

by stof at 2011/10/22 08:46:31 -0700

@dbu assertCount is new in PHP 3.6. It seems like the test of the new 2.1 feature has been written using 3.6-RC.

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

by dbu at 2011/10/22 09:40:07 -0700

@stof: ah, thanks for the hint. i hope you mean php 3.4 and not 3.6? but i assume symfony 2.1 should be able to run on 3.3, right?

anyways, the tests run through if i disable the StopWatch, so i guess we can consider the tests succeeding.

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

by stof at 2011/10/22 09:41:28 -0700

this is a method of PHPUnit TestCase class. I was talking about the PHPUnit version
2011-10-23 09:43:17 +02:00
Fabien Potencier
3134ef132a [HttpKernel] removed usage of assertCount which has been introduced in PHPUnit 3.6 2011-10-23 09:41:19 +02:00
Fabien Potencier
b995023bd2 merged branch Seldaek/composerjson (PR #2447)
Commits
-------

c89bccb Replace 2.1.* and not any version above 2.1

Discussion
----------

Replace 2.1.* and not any version above 2.1
2011-10-23 09:38:58 +02:00
Fabien Potencier
6cacc63ba9 merged branch dbu/fix-router-dependency-injection (PR #2450)
Commits
-------

6b02ffb fix a typo in the routing dependency injection configuration. the request_context service is named router, not routing

Discussion
----------

fix a typo in the routing dependency injection configuration

fix a typo in the routing dependency injection configuration. the request_context service is named router.request_context , not routing.request_context

Bug fix: yes
Feature addition: no
Backwards compatibility break: ? - should not unless somebody relied on the bug
Symfony2 tests pass: yes
Fixes the following tickets: no ticket

i ran
phpunit src/Symfony/Bundle/FrameworkBundle/Tests/
and
phpunit tests/Symfony/Tests/Component/Routing/
2011-10-23 09:37:26 +02:00
dbu
96235a6847 cs fix 2011-10-22 16:27:21 +02:00
dbu
46a69f1ca0 define a WarmableInterface and only warm the cache if it implements warmable to allow replacing the core router. this fixes #2422. combining routers will only really work when #2450 is merged too. 2011-10-22 16:12:46 +02:00
dbu
6b02ffba0f fix a typo in the routing dependency injection configuration. the request_context service is named router, not routing 2011-10-22 16:07:33 +02:00