Commits
-------
1953280 [MonologBridge] updated the class name from Monolog
96da7c8 [MonologBridge] Added the user agent check for the ChromePhpHandler
f7aa6c0 [MonologBridge] Added the Response-aware ChromePhpHandler
Discussion
----------
[MonologBridge] Added the Response-aware ChromePhpHandler
This adds an extended ChromePhpHandler based on the Response class to set the headers, similar to the extended FirePHPHandler.
This PR depends on Seldaek/monolog#58
---------------------------------------------------------------------------
by stof at 2012-02-20T16:36:47Z
@fabpot The monolog PR is merged now so this one is ready
---------------------------------------------------------------------------
by stloyd at 2012-02-20T17:11:14Z
@stof You need to rename file and class name to: [`ChromePHPHandler`](8d4ac5c0f7)
---------------------------------------------------------------------------
by fabpot at 2012-02-22T09:16:46Z
@stloyd is right. As per Symfony standard, you should use `ChromePhpHandler` for the Symfony class and `SymfonyPHPHandler` for the Monolog one.
---------------------------------------------------------------------------
by stof at 2012-02-22T09:22:27Z
@fabpot updated
Commits
-------
2871ea0 Update composer for HttpFoundation's PHP 5.4 forward compatibility.
ff8d740 [Locale] Update documentation for autoloader.
dd2c4aa [HttpFoundation] Documentation.
e585ca7 [HttpFoundation] Added forward compatibility for \SessionHandlerInterface
d339e74 [ClassLoader] Add ability to incrementally register fallbacks.
Discussion
----------
[HttpFoundation] PHP 5.4 forward compatibility for \Sessionhandlerinterface
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
Utilising the same forward method as in Locale (as requested by @fabpot)
---------------------------------------------------------------------------
by stof at 2012-02-16T20:59:27Z
forward compatibility sent to the master branch, really ?
---------------------------------------------------------------------------
by stof at 2012-02-16T21:00:12Z
Ok, looking at the patch, it is not the same than places where we used the naming "forward compatibility". Sorry
---------------------------------------------------------------------------
by stof at 2012-02-16T21:01:56Z
As this fallback is mandatory to be able to use the component on 5.3, which is our target, please register the fallback in the composer.json file of the component and of the main repo so that it works out of the box when using Composer.
---------------------------------------------------------------------------
by drak at 2012-02-17T02:55:17Z
@stof as a native English speaker I find the terminology used in Symfony2 upside down. "Backward compatible" means compatible with past versions, i.e. legacy. "Forward compatibility" logically means compatible with future versions - which in this case we are making an interface available in PHP 5.4, available in PHP 5.3.
I will try to adapt my in the context of Sf2's terminology :-)
---------------------------------------------------------------------------
by drak at 2012-02-17T02:56:43Z
Ah I see what you are saying, you mean normally things are made forward compatible from Symfony 2.0 to 2.1, and in this case we're making a native PHP interface forward compatible: so actually we are on the same page :)
---------------------------------------------------------------------------
by drak at 2012-02-17T02:59:00Z
@stof - I took a look at the `composer.json` and I also don't see and handling for the `Locale` component fallback (as written in `autoloader.php.dist`. Is it even possible in Composer? /cc @Seldaek
---------------------------------------------------------------------------
by stof at 2012-02-17T07:03:44Z
@drak for the Locale, we don't register it through composer as we cannot do it fully: the stub functions are not autoloadable so it will always require some user work to do this. But for the HttpFoundation stub, it is possible as it is autoloadable:
```json
{
autoload: {
psr-0: {
'Symfony\\Component\\HttpFoundation': '',
'': 'Symfony/Component/HttpFoundation/Resources/stub'
}
}
}
```
---------------------------------------------------------------------------
by drak at 2012-02-17T08:11:56Z
Awesome @stof, thanks for the tip.
---------------------------------------------------------------------------
by drak at 2012-02-17T08:18:44Z
@stof do I also need to update the main repo's composer.json file too?
```
"autoload": {
"psr-0": {
"Symfony": "src/",
"": "src/Symfony/Component/HttpFoundation/Resources/stub"
}
}
```
---------------------------------------------------------------------------
by Seldaek at 2012-02-17T08:54:46Z
I would use that in the autoload just to avoid file_exists calls for nothing:
```json
"SessionHandlerInterface": "src/Symfony/Component/HttpFoundation/Resources/stub"
```
The class is part of the "prefix" too.
---------------------------------------------------------------------------
by drak at 2012-02-21T12:32:23Z
This is ready for merge @fabpot
---------------------------------------------------------------------------
by drak at 2012-02-21T16:20:43Z
@fabpot - done.
Commits
-------
fb2bb65 [HttpFoundation] Fix session.cache_limiter is not set correctly
Discussion
----------
[HttpFoundation] Fix session.cache_limiter is not set correctly
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
Fixes a regression after the session refactoring where extra cache control http headers are sent.
This was previously handled by [calling session_cache_limiter(false) in NativeSessionStorage](https://github.com/symfony/symfony/blob/2.0/src/Symfony/Component/HttpFoundation/SessionStorage/NativeSessionStorage.php#L81)
---------------------------------------------------------------------------
by drak at 2012-02-21T12:23:48Z
@fabpot - this code can be merged imo.
Commits
-------
6fbd290 Improved unit tests for MemcacheSessionStorage
b4c5323 Added comma to array initializer, reverted permissions back to 644
3dd851a Use correct parameters
0e01418 Fix default if no serverpool is provided
2a65121 Fix several issues in MemccheSessionStorage which prevented it from being used correctly
Discussion
----------
Fix several issues in MemcacheSessionStorage
Apperently this could never have worked unless someone passed wrong arguments to the options.
---------------------------------------------------------------------------
by mazen at 2012-02-19T07:58:52Z
```
[marcel@development symfony]$ phpunit tests/Symfony/Tests/Component/HttpFoundation/Session/Storage/MemcacheSessionStorageTest.php
PHPUnit 3.6.10 by Sebastian Bergmann.
Configuration read from /www/includes/vendor/symfony/phpunit.xml.dist
......
Time: 0 seconds, Memory: 3.75Mb
OK (6 tests, 11 assertions)
```
---------------------------------------------------------------------------
by lsmith77 at 2012-02-19T16:10:13Z
cc @drak
---------------------------------------------------------------------------
by drak at 2012-02-19T17:44:00Z
Looks like we could do with some tests for the constructor that also test the defaults and the internal properties. And also more extensively tests the mock to test the addServer behaviour.
---------------------------------------------------------------------------
by helmer at 2012-02-19T18:02:03Z
@mazen You've changed file permissions from 644->755 ..
---------------------------------------------------------------------------
by drak at 2012-02-21T12:25:11Z
@fabpot - with the extra tests added in 6fbd290 I believe this code is ready for merge.
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 :)
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.
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.
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
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
👍
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
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).