Commit Graph

8509 Commits

Author SHA1 Message Date
Fabien Potencier 3236fc5af3 fixed tests for the latest Twig 2012-02-18 10:54:20 +01:00
Fabien Potencier 3e326ff903 fixed typo 2012-02-18 10:47:38 +01:00
Fabien Potencier 6299ee8247 merged branch havvg/hotfix/Propel1/stopwatch (PR #3392)
Commits
-------

13f0e4a fix PropelLogger stopwatch events

Discussion
----------

fix PropelLogger stopwatch events

* add queries like "SET NAMES 'UTF8';"
* track only prepared statements
* add named labels to the StopwatchEvents corresponding to the query counter

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

by willdurand at 2012-02-17T13:47:19Z

I'm ok with this PR, we discussed with @havvg last night :)
2012-02-18 09:43:49 +01:00
Fabien Potencier ac19b206c4 merged branch adrienbrault/2.0 (PR #3386)
Commits
-------

ae8704c [Console] Fix wrong ref in phpdoc

Discussion
----------

[Console] Fix wrong ref in phpdoc

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

Hey guys, found that typo.
2012-02-17 08:19:13 +01:00
Toni Uebernickel 13f0e4a01a fix PropelLogger stopwatch events
* add queries like "SET NAMES 'UTF8';"
* track only prepared statements
* add named labels to the StopwatchEvents corresponding to the query counter
2012-02-16 23:41:53 +01:00
Adrien BRAULT ae8704cdce [Console] Fix wrong ref in phpdoc 2012-02-16 22:26:30 +01:00
Fabien Potencier 7b8acbccf4 removed usage of a deprecated function in previous merge 2012-02-16 07:27:52 +01:00
Fabien Potencier 883637d43d merged branch vicb/config/master/fix (PR #3365)
Commits
-------

0a176eb [FrameworkBundle] Fix configuration errors
6745b28 [Config] Throw exceptions on invalid definition
fb27de0 [Config] cleanup

Discussion
----------

[Config] Cleanup, error detection, fixes

see #3357

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

by stloyd at 2012-02-15T10:56:00Z

@vicb As you added new exceptions, IMO you should add some tests to cover it.

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

by vicb at 2012-02-15T10:56:50Z

good point, I'll do.

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

by vicb at 2012-02-15T13:49:44Z

@stloyd that was a great idea, I realized I had miss a case. It has been added and should be covered by UT + fixes made.

I am done with the fixes, should be ready to merge.

And time to give the `PrototypedArrayNode` some more usability now.
2012-02-16 07:24:06 +01:00
Fabien Potencier 54e6516d46 merged branch kriswallsmith/monolog/missing-class (PR #3368)
Commits
-------

1cec4f5 [MonologBundle] added missing class to compile

Discussion
----------

[MonologBundle] added missing class to compile

`Symfony\Bridge\Monolog\Handler\DebugHandler` extends a class which was not being included in the compiled class file.

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

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

by stof at 2012-02-15T14:27:29Z

@kriswallsmith Can you send the same PR to the standalone repo for 2.1 ?

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

by kriswallsmith at 2012-02-15T14:30:05Z

Can I just commit to that repository directly? /ping @Seldaek

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

by stof at 2012-02-15T14:33:51Z

yeah indeed, you have the needed permissions, and the change is OK
2012-02-16 07:22:19 +01:00
Fabien Potencier df91627031 merged branch kriswallsmith/security/access-map-interface (PR #3374)
Commits
-------

eb7aa1b [SecurityBundle] added interface to compiler
1e8236c [Security] added AccessMapInterface

Discussion
----------

[Security] added AccessMapInterface

I am optimizing the security layer at OpenSky and need to make this class smarter instead of running through all of the many access rules for each request. I would like to do this by creating a delegating access map composed of many inner maps and would rather implement an interface than extending a core class without using any of its functionality.

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

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

by kriswallsmith at 2012-02-15T22:31:36Z

For conversation: https://gist.github.com/1839490

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

by jwage at 2012-02-16T03:57:09Z

👍
2012-02-16 07:20:40 +01:00
Victor Berchet 651f4c5d2d [Routing] Added a missing property declaration 2012-02-16 07:03:32 +01:00
Kris Wallsmith eb7aa1bf78 [SecurityBundle] added interface to compiler 2012-02-15 14:14:40 -08:00
Kris Wallsmith 1e8236cfb3 [Security] added AccessMapInterface 2012-02-15 14:14:40 -08:00
Kris Wallsmith 1cec4f5b22 [MonologBundle] added missing class to compile 2012-02-15 06:19:20 -08:00
Victor Berchet 0a176ebc98 [FrameworkBundle] Fix configuration errors 2012-02-15 14:38:38 +01:00
Victor Berchet 6745b28b3d [Config] Throw exceptions on invalid definition 2012-02-15 14:38:31 +01:00
Fabien Potencier a5013bc3ef merged branch vicb/profiler/ajax (PR #3340)
Commits
-------

ed028d5 [WebProfilerBundle] Made is_ajax available to the view when rendering panels

Discussion
----------

[Profiler] Ajax

The first commit should be merged as `app` is not always accessible in the twig template due to the ways the templating system is used. Then there is currently no way to check if we are dealing with an ajax request in the view.

The second commit use ajax to load the panels. This should make the interface more responsive as you don't have to load the layout each time + the panels are cached. Loading via AJAX would also work if your panel does not extend the ajax layout (legacy support) - this would be less efficient though as you would load the layout and filter it out afterwards.

I am not sure if the second commit is worth merging, maybe it is useless ?

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

by stof at 2012-02-12T20:40:16Z

@vicb please rebase

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

by stof at 2012-02-13T17:48:48Z

@vicb just FYI, this conflicts with master so you will need to rebased it before it can be merged.

Otherwise, what are the remaining points ?

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

by vicb at 2012-02-13T17:57:27Z

I am still wondering if the second commit is a good idea or not ?

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

by vicb at 2012-02-13T18:28:17Z

@stof isn't the branch based on the latest master ?

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

by stof at 2012-02-13T19:32:52Z

Well, github tells me it cannot be merged automatically. so either there is a conflict, either their conflict detection failed last time you pushed.

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

by vicb at 2012-02-13T22:20:06Z

I did fail.
Should be ok now.

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

by fabpot at 2012-02-14T23:27:08Z

I'm -1 on the second commit.

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

by vicb at 2012-02-15T07:44:25Z

Thanks all for the feedback.

@fabpot ready !

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

by stof at 2012-02-15T07:46:53Z

@vicb not ready: you reverted all use of ``is_ajax`` in the templates (and you did not renamed it to the underscored name preferred by @fabpot)

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

by vicb at 2012-02-15T07:54:30Z

Well I did revert the use of "`isajax`" (prefer not to mix CS here, the scope of this PR is not to fix CS) because it is not used (this should be applied to the Doctrine profiler).

_What I mean is that `isajax` in all the Sf templates w/o the associated js is useless, basically all or nothing_

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

by vicb at 2012-02-15T08:26:41Z

btw @fabpot it makes me wonder if underscored variable names is a good idea, this will force us to mix (i.e. `is_ajax` vs `request.isxmlhttprequest`). What do you think ?

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

by fabpot at 2012-02-15T10:09:20Z

I still prefer `is_ajax` as it makes things more readable.

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

by vicb at 2012-02-15T10:16:13Z

At a larger scale how do fix the inconsistency described in my previous message ?
Options are:

* fix twig cs
* create twig cs specific to sf2
* don't fix (= keep & live with some inconsistency)

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

by stof at 2012-02-15T10:22:13Z

@vicb we also use underscores for variables used in the form themes. the official Twig CS are basically the one used by Sf2 in the form theme

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

by fabpot at 2012-02-15T10:24:46Z

I don't see any inconsistencies here. One a variable name and the other is a method call/property name. So, my vote is a don't fix.

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

by vicb at 2012-02-15T10:28:53Z

I agree but then we loose one advertised benefit a twig: _"Easy to learn: The syntax is easy to learn and has been optimized to allow web designers to get their job done fast without getting in their way"_.

The designers should now be aware of the underlying implementation (i.e. Am I dealing with a variable or a function ?)

Edit: race condition here... I agree with @stof

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

by stof at 2012-02-15T10:45:49Z

@vicb they see that ``isXmlHttpRequest`` is not a variable. They are accessing it on the ``request`` variable (well, recurse here to reach the variable)

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

by fabpot at 2012-02-15T10:46:57Z

variables and functions are underscored.

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

by vicb at 2012-02-15T10:51:28Z

I think that the beauty of Twig comes from the fact that designers do not have to wonder if "something" is an array / an object / a variable / a method / a property.
But never mind, I'll update the PR.

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

by vicb at 2012-02-15T10:55:06Z

@fabpot would you mind if I open a PR against twig to check for existence of `collector::getNotCalledListeners()` when a designer writes `collector.not_called_listeners`, then we are all happy ?

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

by vicb at 2012-02-15T11:21:55Z

ready !

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

by fabpot at 2012-02-15T11:31:50Z

The problem is that the `Twig_Template::getAttribute()` is already the bottleneck
2012-02-15 12:32:06 +01:00
Victor Berchet ed028d57d5 [WebProfilerBundle] Made is_ajax available to the view when rendering panels 2012-02-15 12:23:04 +01:00
Victor Berchet fb27de0f8a [Config] cleanup 2012-02-15 11:43:27 +01:00
Fabien Potencier 3f76d0f60f merged branch vicb/memcache/fix (PR #3363)
Commits
-------

b95284e [Profiler] Fix memcache(d)

Discussion
----------

[Profiler] Fix memcache(d) storages

This fixes an ambiguity...

The memcache(d) storages have a `$lifetime` option. The name indicates that we are talking about a ttl (in seconds). This is wrong is `$lifetime` > 2592000 (=30 days), see http://fr.php.net/manual/en/memcache.set.php.

Doctrine is also [affected](e9ab2d2cca).

The ambiguity also exists in the session storage but to a lesser extend as those storage directly use memcache(d) options rather than a `$lifetime`. @drak could you confirm ?

Hopefully the Cache Component will get it right (#3211).
2012-02-15 11:11:34 +01:00
Fabien Potencier 60846105c3 merged branch drak/session_tests (PR #3360)
Commits
-------

d077ede [HttpFoundation] Increase test coverage.
cbb3e69 [HttpFoundation] Increase test coverage.

Discussion
----------

[HttpFoundation] Increase session test coverage.

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
2012-02-15 11:02:16 +01:00
Fabien Potencier e7adf546ef merged branch jmikola/doctrine-data-fixtures (PR #3328)
Commits
-------

c754f28 [DoctrineBridge] Rename data fixtures loader class
af84805 [DoctrineBridge] Suggest doctrine/data-fixtures dependency
e4243a1 [DoctrineBridge] Add common data fixtures loader

Discussion
----------

[DoctrineBridge] Add common data fixtures loader

Symfony does not depend on doctrine/data-fixtures, but having this class in the bridge would enable DoctrineMongoDBBundle (and possibly others) to load fixtures without requiring DoctrineFixturesBundle to be installed.

Additionally, DoctrineFixturesBundle seems to only consist of this class and a command for loading ORM fixtures. With this in the bridge, we can possibly eliminate DoctrineFixturesBundle altogether by merging its command into DoctrineBundle.

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

by stof at 2012-02-11T19:40:17Z

The reason to have a separate bundle for the ORM fixtures was that the ORM is released whereas the DataFixtures library is still in alpha versions. So we wanted to avoid having it in Symfony itself for the 2.0 release. It could maybe change now that we have the bundle in a separate repo.
The other solution could be to put all commands related to fixtures in DoctrineFixturesBundle but IIRC @beberlei rejected a PR trying to make the same command work for ORM and PHPCR.

@beberlei what do you think about these suggestions ? And what is missing in DataFixtures to release it ? It has not changed recently except for the addition of the typehint and an update of the PHPCR purger

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

by fabpot at 2012-02-14T23:30:23Z

The Symfony bridges provide integration between a third-party library and Symfony components. IIUC, this PR is only about Doctrine and as such it is not in the scope of the bridge. It should be done "somewhere" in the Doctrine namespace (what about common for instance?).

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

by stof at 2012-02-14T23:34:19Z

@fabpot no it is not a Doctrine-only code. This extended loader is about integrating the Doctrine DataFixtures library with the DI component to allow fixtures to be container-aware (it does absolutely nothing else fancy btw). So this *is* in the scope of the bridge.

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

by jmikola at 2012-02-15T00:40:12Z

I second @stof's point here. This class is specifically for loading fixtures into application with a service container. Likewise, that is why the base class it inherits is in the common data-fixtures library.

Since this is common to both ORM and ODM, the most logical home for it would be DoctrineCommonBundle, and I believe that's what the bridge is :)

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

by stof at 2012-02-15T01:53:17Z

@jmikola not even a DoctrimeCommonBundle IMO. This is not about integrating things with the fullstack framework but with one component
2012-02-15 11:00:50 +01:00
Fabien Potencier 2b384bb461 merged branch jmikola/memcached-profiler (PR #3358)
Commits
-------

57968f8 [HttpKernel] Fix call to Memcached::set() in MemcachedProfilerStorage

Discussion
----------

[HttpKernel] Fix call to Memcached::set() in MemcachedProfilerStorage

The existing code seems to have been copied from MemcacheProfilerStorage. Memcache::set() includes a $flag argument, but Memcached::set() omits that. See:

 * http://php.net/manual/en/memcached.set.php
 * http://php.net/manual/en/memcache.set.php

----

I assume Travis-CI didn't catch the MemcachedProfilerStorageTest failures because those tests are skipped: http://travis-ci.org/#!/symfony/symfony/jobs/678889/L104
2012-02-15 10:59:57 +01:00
Victor Berchet b95284e198 [Profiler] Fix memcache(d) 2012-02-15 10:50:58 +01:00
Jeremy Mikola 57968f8fb1 [HttpKernel] Fix call to Memcached::set() in MemcachedProfilerStorage
The existing code seems to have been copied from MemcacheProfilerStorage. Memcache::set() includes a $flag argument, but Memcached::set() omits that. See:

 * http://php.net/manual/en/memcached.set.php
 * http://php.net/manual/en/memcache.set.php
2012-02-14 19:23:01 -05:00
Fabien Potencier 4a0057fd56 merged branch kbond/hinclude (PR #3259)
Commits
-------

cea2c7e removed unneeded local variable
924f378 updated changelog
72d5805 changed route name
41cc0d6 [FrameworkBundle] added support for HInclude

Discussion
----------

[FrameworkBundle] added support for HInclude

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: discuss
Example: https://github.com/kbond/symfony-standard/tree/hinclude

**Reopened this as I broke #2903**

References:

 - http://groups.google.com/group/symfony-devs/browse_thread/thread/b74e587d6f2f87b0
 - http://groups.google.com/group/symfony-devs/browse_thread/thread/8776a9833d4a5f79
 - #2903
 - #2865

[![Build Status](https://secure.travis-ci.org/kbond/symfony.png?branch=hinclude)](http://travis-ci.org/kbond/symfony)

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

by kbond at 2012-02-11T20:27:22Z

unless there is anything else I think this is ready, want me to squash again?

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

by fabpot at 2012-02-11T21:07:33Z

@kbond: Can you add some information about the changes in the CHANGELOG?

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

by Tobion at 2012-02-11T21:33:32Z

Do I see it correctly that we cannot set a default template on a per hinclude tag basis? But only global?
That's not really usefull when javascript is disabled because it should resemble the content to be included as an alternative.

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

by stof at 2012-02-11T21:42:15Z

@Tobion currently it is not possible. But changing the content on a tag basis may require changing the way the render tag look like (as there is no content in the tag currently) so this needs further discussion and @fabpot said he wants to merge a first implementation without it. See the discussion above.
2012-02-15 00:06:30 +01:00
Eugene Babushkin 2434552aa9 [Translation] Fixed fallback location if location is longer than three characters (possibly by mistake). 2012-02-15 00:04:44 +01:00
Fabien Potencier 803fba887a merged branch vicb/routing-ok (PR #3313)
Commits
-------

9d6eb82 [Routing] Fix a bug in the TraceableUrlMatcher
9fc8d28 [FrameworkBundle] Fix a bug in the RedirectableUrlMatcher
4fcf9ef [Routing] Small optimization in the UrlMatcher
abc2141 [Routing] Added a missing property declaration
d86e1eb [Routing] Remove a weird dependency

Discussion
----------

[Routing] Remove a dependency on a derived class, fixes, optim

Subset of #3296 which should be acceptable.

Travis is happy.

The side effect of removing the dependency is that the `UrlMatcher` does not throw an exception any more when the scheme does not match the required scheme. I think it is better because:

* it removes a dependency on a derived class,
* it was an undocumented "feature",
* other thrown excs are component specific while this one was raw SPL.

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

by vicb at 2012-02-09T14:43:02Z

let me know what should go in 2.0 as well.
2012-02-15 00:01:15 +01:00
Fabien Potencier b8322b306a merged branch willdurand/propel-stopwatch (PR #3352)
Commits
-------

b3fd2fa [Propel] Added Propel to Stopwatch

Discussion
----------

[Propel] Added Propel to Stopwatch

I've added the Stopwatch feature, everything is ready on the PropelBundle.
The trick is to log `prepare` queries in Propel, that way we got first the prepared statement, and then the executed query. That's why there is a `$isPrepare` boolean.

I kept BC if people don't update the PropelBundle too.

William

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

by stof at 2012-02-14T12:16:51Z

@willdurand toggling a flag for each call seems a bit hackish to me. Is there no better way to do it ?

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

by willdurand at 2012-02-14T12:21:38Z

Unfortunately no... But it's quite safe as we cannot change logged methods.
There is neighter start/stop methods, nor typed messages.

Le 14 févr. 2012 à 13:16, Christophe Coevoet<reply@reply.github.com> a écrit :

> @willdurand toggling a flag for each call seems a bit hackish to me. Is there no better way to do it ?
>
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/symfony/symfony/pull/3352#issuecomment-3959592

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

by stof at 2012-02-14T12:26:04Z

@willdurand then let's use this for propel 1. But please improve the logging interface for Propel 2 :)

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

by willdurand at 2012-02-14T12:34:28Z

Sure! I've added that on my todolist…

2012/2/14 Christophe Coevoet <
reply@reply.github.com
>

> @willdurand then let's use this for propel 1. But please improve the
> logging interface for Propel 2 :)
>
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/symfony/symfony/pull/3352#issuecomment-3959729
>
2012-02-14 23:50:27 +01:00
Fabien Potencier 9f05d4a103 merged branch lyrixx/feat-auto-suggest (PR #3325)
Commits
-------

e5edf5a [Console] Fixed CS
8abf506 [Console] Added abbreviation into search for bad command / namespace
c6203bc [Console] Added namespace suggest on bad namespace name
117359a [Console] fixed CS according to PR comment
dd0d97e [Console] Added suggest on bad command name

Discussion
----------

[Console] Added suggest on bad command name

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

Added something like in `git` :  if user type a wrong command and if a close alternative exists, Command compenent will display a list of similar command(s).

Note : It does not work with namespace. If this PR will be merged, I could work on namespace.

see : https://github.com/fabpot/Twig/blob/master/lib/Twig/Environment.php#L1003

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

by fabpot at 2012-02-11T18:54:49Z

I think we need it to also work on namespace before merging. Is it possible?

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

by henrikbjorn at 2012-02-11T19:01:06Z

could maybe use similar_text ?

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

by lyrixx at 2012-02-11T19:01:55Z

Yes.
I will work on it asap

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

by lyrixx at 2012-02-11T20:06:43Z

I added code for namespace

@henrikbjorn I did the same logic as in twig.

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

by lyrixx at 2012-02-11T20:27:48Z

Note : Travis tests failed : http://travis-ci.org/#!/lyrixx/symfony/builds/663216
```before_script: Execution of 'php vendors.php' took longer than 600 seconds and was terminated.
Consider rewriting your stuff in AssemblyScript, we've heard it handles Web Scale™```

But tests are OK on my laptop

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

by stof at 2012-02-11T20:41:15Z

Well, it may be due to github issues during the setup of the vendors. There is some issues regularly because of the DDoS attack.

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

by lyrixx at 2012-02-11T20:58:07Z

Yes, i guessed it :-) that's why i notice it work on my laptop

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

by fabpot at 2012-02-11T23:11:08Z

This code won't work if you use abbreviations instead of the full namespace or command name.

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

by lyrixx at 2012-02-12T23:30:04Z

I added code to manage abbreviations. But I'm not sure what you are expecting. Can you try it and give me some feedback ?

P.S. : Travis failed again, but tests pass on my laptop.
2012-02-14 23:47:26 +01:00
Fabien Potencier afc2b1f416 merged branch craigmarvelley/svg-mime-type-support (PR #3351)
Commits
-------

8935dec Added support for SVG mime type

Discussion
----------

Added support for SVG mime type

Hi, MimeTypeExtensionGuesser doesn't have a default type for SVG files, I've added this in.

Craig
2012-02-14 23:45:59 +01:00
Fabien Potencier efc13391fb merged branch jmikola/patch-1 (PR #3349)
Commits
-------

cfddbba Grammar and formatting in upgrade doc

Discussion
----------

Grammar and formatting in upgrade doc

Added logical component headings to changes. Grouped changes by bullets, with indented text and code blocks. Applied consistent formatting to method names and code references. Re-flowed paragraph text to abide an 80-character column.
2012-02-14 23:41:40 +01:00
Fabien Potencier 20cacdd878 merged branch yethee/session_auto_start (PR #3345)
Commits
-------

a395873 [FrameworkBundle][Session] Add auto_start pass to the storage options

Discussion
----------

[FrameworkBundle][Session] Add auto_start pass to the storage options

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

I think that is bugfix.
In currently value of auto_start in config has no effect, at least when using the session in WebTestCase context.

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

by stof at 2012-02-13T14:59:17Z

The ``auto_start`` setting is not an option passed to the session storage. It is about configuring the SessionListener. So this seems wrong

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

by drak at 2012-02-13T15:02:26Z

That said, the storage does need to know if it should respect autostart - that might be quite independent of anything else.  The moment something is output a session will start if `ini_set('auto_start', 1)`.

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

by drak at 2012-02-13T15:05:52Z

I guess in the context of FrameworkBundle you probably want the storage driver auto_start off (php's autostart that is) so that sessions are only explicitly started by the session listener.

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

by dr-fozzy at 2012-02-13T15:22:02Z

Just tested out master branch. With session.auto_start = 0 in php.ini and auto_start: false at framework -> session section of config.yml
Session is <b>started</b>(cookie's are set) anyway...
(PHP 5.3.9, simple blank page)
This bug indirectly affect Varnish caching-proxy, as it's default behaviour to not cache anything if "Cookie" or "Set-Cookie" header is set.

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

by yethee at 2012-02-13T17:55:14Z

@drak, `ini_set('session.auto_start', 1)` will not work because it will be overriden [here](137b0026b7/src/Symfony/Component/HttpFoundation/Session/Storage/AbstractSessionStorage.php (L222)), if the `auto_start` option is not passed in the `$options`. Or have I missed something?

I have trouble with session in functional tests (based on WebTestCase). I put some data, authentication token, into session before send request but lost them when session is [starting](7e4f4dcdf9/src/Symfony/Bundle/FrameworkBundle/EventListener/SessionListener.php (L58))

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

by stof at 2012-02-13T18:04:19Z

@drak seems like your refactored storage now need to be aware of the auto_start setting :)

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

by drak at 2012-02-14T06:40:26Z

> @drak, ini_set('session.auto_start', 1) will not work because it will be overriden here, if the auto_start option is not passed in the $options. Or have I missed something?

This code simply sets a default value of off if there was no explicit setting.  I believe this is correct: if not set, then set to off, otherwise, leave as defined.  The issue in question is if FrameworkBundle passes the cofiguration on - it should and should have been since 2.0.

@stof The storage drivers do indeed need to be aware of the autostart settings and afaik they are already - whether FrameworkBundle passes this on to the storage driver is a different matter though.

@yethee - are you sure you are using the latest master from symfony/symfony (and not the split trees)?  I ask because your second link points to something that's either in the 2.0 branch or well before the new code was merged.

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

by yethee at 2012-02-14T06:56:40Z

Yep, I use latest version of master branch. [Here](https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/EventListener/SessionListener.php) current version of SessionListener, there is no difference of code to the previous link, now. I specifically has specified the link to the commit, and not a branch.

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

by drak at 2012-02-14T06:58:48Z

Does your PR solve the problem for you?  I'm going to write some tests for this also.

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

by yethee at 2012-02-14T07:09:49Z

> This code simply sets a default value of off if there was no explicit setting. I believe this is correct: if not set, then set to off, otherwise, leave as defined. The issue in question is if FrameworkBundle passes the cofiguration on - it should and should have been since 2.0.

How can I pass `auto_start` option in the `setOptions` method? Now this option is not pass, and is always set the default value.
Difference between current implementation and 2.0 that in the previous version of sessions is automatically started when put any data into session. https://github.com/symfony/symfony/blob/2.0/src/Symfony/Component/HttpFoundation/Session.php#L120

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

by yethee at 2012-02-14T07:17:18Z

@drak, yes, it makes the behavior of the session as in 2.0 branch

https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpFoundation/Session/Storage/AbstractSessionStorage.php#L186

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

by drak at 2012-02-14T14:41:29Z

That means it was as I suspected, that the auto_start value in the config was not communicated to the session storage driver in `FrameworkBundle`, which your patch now fixes.  @fabpot I guess this is ok for merge now.
2012-02-14 23:39:18 +01:00
Fabien Potencier 2901aebec9 merged branch snc/patch-5 (PR #3355)
Commits
-------

1bb0ea5 Fixed interface name in UPGRADE-2.1.md

Discussion
----------

Fixed interface name in UPGRADE-2.1.md
2012-02-14 23:38:16 +01:00
Fabien Potencier 4b9535c26f [Propel1] fixed unit tests when Propel is not available 2012-02-14 23:36:40 +01:00
Fabien Potencier 4ed094c965 merged branch willdurand/propel-tests (PR #3348)
Commits
-------

97cbf90 [Propel] Added tests for the PropelDataCollector
d9ce982 [Propel] Added tests for CollectionToArrayTransformer
4878af4 [Propel] Fixed CS
dd5d72a Added Propel to the vendors.php script

Discussion
----------

Propel tests

This PR adds more unit tests on the Propel Bridge. More to come later :)
2012-02-14 23:35:18 +01:00
Fabien Potencier b86e6db035 merged branch eriksencosta/ticket_2781 (PR #3350)
Commits
-------

beb4fc0 [WIP][Locale] StubIntlDateFormatter::parse was throwing exception instead of returning Boolean false like intl implementation
b61dff7 fixed CS

Discussion
----------

[WIP][Locale] StubIntlDateFormatter::parse was throwing exception instead of returning Boolean false like intl implementation

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: ![travis.ci](https://secure.travis-ci.org/eriksencosta/symfony.png?branch=ticket_2781)
Fixes the following tickets: #2781
Todo: A test fail in 32 bit environment, executed tests only with PHP 5.3.2 and ext-intl ICU 4.2 based

Failed test:

    1) Symfony\Tests\Component\Locale\Stub\StubIntlDateFormatterTest::testFormatWithDefaultTimezoneIntl
    Failed asserting that two strings are equal.
    --- Expected
    +++ Actual
    @@ @@
    -'1969-12-31 21:00:00'
    +'1969-12-31 16:00:00'
2012-02-14 23:34:14 +01:00
Henrik Westphal 1bb0ea542b Fixed interface name in UPGRADE-2.1.md 2012-02-14 22:47:35 +01:00
Drak d077edebb4 [HttpFoundation] Increase test coverage. 2012-02-14 21:41:27 +05:45
Drak cbb3e69b36 [HttpFoundation] Increase test coverage. 2012-02-14 21:10:15 +05:45
William DURAND b3fd2fad9f [Propel] Added Propel to Stopwatch 2012-02-14 12:14:06 +01:00
craigmarvelley 8935decd2c Added support for SVG mime type 2012-02-14 11:06:36 +00:00
Fabien Potencier ec7fb0bdd6 [Routing] added a proper exception when a route pattern references the same variable more than once (closes #3344) 2012-02-14 11:41:45 +01:00
Eriksen Costa beb4fc0899 [WIP][Locale] StubIntlDateFormatter::parse was throwing exception instead of returning Boolean false like intl implementation 2012-02-14 01:35:14 -02:00
Jeremy Mikola cfddbba4af Grammar and formatting in upgrade doc
Added logical component headings to changes. Grouped changes by bullets, with indented text and code blocks. Applied consistent formatting to method names and code references. Re-flowed paragraph text to abide an 80-character column.
2012-02-13 22:11:40 -05:00
Eriksen Costa b61dff7e4e fixed CS 2012-02-14 00:49:04 -02:00
William DURAND 97cbf900cc [Propel] Added tests for the PropelDataCollector 2012-02-14 00:59:48 +01:00
William DURAND d9ce9825b6 [Propel] Added tests for CollectionToArrayTransformer 2012-02-14 00:40:32 +01:00
William DURAND 4878af44cc [Propel] Fixed CS 2012-02-14 00:29:43 +01:00
William DURAND dd5d72a994 Added Propel to the vendors.php script 2012-02-14 00:28:58 +01:00