Commit Graph

8538 Commits

Author SHA1 Message Date
Fabien Potencier
7474ad5075 merged branch stof/monolog_chromephp (PR #3401)
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
2012-02-22 10:29:29 +01:00
Christophe Coevoet
1953280da4 [MonologBridge] updated the class name from Monolog 2012-02-22 10:21:12 +01:00
Fabien Potencier
2f33b5d1f2 merged branch marcw/patch-license-copyright (PR #3411)
Commits
-------

89868f7 Updated LICENSE files copyright

Discussion
----------

Updated LICENSE files copyright
2012-02-22 10:13:19 +01:00
Fabien Potencier
96e9fddc6a merged branch drak/sessionhandlerinterface (PR #3384)
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.
2012-02-22 10:12:06 +01:00
marc.weistroff
89868f7901 Updated LICENSE files copyright 2012-02-22 10:10:37 +01:00
Drak
2871ea062e Update composer for HttpFoundation's PHP 5.4 forward compatibility. 2012-02-22 07:07:18 +05:45
Drak
ff8d740753 [Locale] Update documentation for autoloader. 2012-02-22 07:07:14 +05:45
Drak
dd2c4aa61f [HttpFoundation] Documentation. 2012-02-22 07:07:11 +05:45
Drak
e585ca783d [HttpFoundation] Added forward compatibility for \SessionHandlerInterface 2012-02-22 07:07:07 +05:45
Drak
d339e74bc5 [ClassLoader] Add ability to incrementally register fallbacks.
This is useful in the cases where you might be adding forward compat
classes to several components.
2012-02-22 07:07:03 +05:45
Fabien Potencier
74ebd057a1 merged branch tna/session-cache-limiter (PR #3400)
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.
2012-02-21 14:47:46 +01:00
Fabien Potencier
dc1ff89a94 merged branch mazen/fix-memcached-sessions (PR #3399)
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.
2012-02-21 14:47:18 +01:00
Fabien Potencier
c06fecf604 merged branch patrick-mcdougle/patch-1 (PR #3405)
Commits
-------

c1c0f6f Fixed a doc block

Discussion
----------

Fixed a doc block

The doc block had incorrect text.
2012-02-21 14:37:06 +01:00
Victor Berchet
b269e27191 [Config] Improve handling of PrototypedArrayNode defaults 2012-02-20 23:07:03 +01:00
Victor Berchet
4feba09aa9 [Config] implements feedback 2012-02-20 19:15:01 +01:00
patrick-mcdougle
c1c0f6f64b Fixed a doc block 2012-02-20 11:24:42 -06:00
Victor Berchet
bc122bdb2d [Config] Fix nested prototyped array nodes 2012-02-20 18:01:14 +01:00
Fabien Potencier
9356be3a1b Revert "fixed tests for the latest Twig"
This reverts commit 3236fc5af3.
2012-02-20 13:28:51 +01:00
Victor Berchet
675e5eb6e0 [Config] Take advantage of the new PrototypedArrayNode API in the core bundles 2012-02-20 11:20:39 +01:00
Victor Berchet
cba2c332ad [Config] Improve error messages & extensibility 2012-02-20 10:45:28 +01:00
Victor Berchet
bca2b0edf3 [Config] Improve PrototypedArrayNode default value management 2012-02-20 10:45:21 +01:00
Christophe Coevoet
96da7c8c44 [MonologBridge] Added the user agent check for the ChromePhpHandler 2012-02-20 02:34:53 +01:00
Christophe Coevoet
f7aa6c006e [MonologBridge] Added the Response-aware ChromePhpHandler 2012-02-20 01:10:53 +01:00
Tobias Naumann
fb2bb65b1e [HttpFoundation] Fix session.cache_limiter is not set correctly 2012-02-19 21:07:38 +01:00
Marcel Beerta
6fbd2902be Improved unit tests for MemcacheSessionStorage 2012-02-19 19:54:54 +01:00
Marcel Beerta
b4c53238b0 Added comma to array initializer, reverted permissions back to 644 2012-02-19 19:31:41 +01:00
Marcel Beerta
3dd851afed Use correct parameters 2012-02-19 13:22:38 +01:00
Marcel Beerta
0e0141805c Fix default if no serverpool is provided 2012-02-19 08:56:31 +01:00
Marcel Beerta
2a65121865 Fix several issues in MemccheSessionStorage which prevented it from being used correctly 2012-02-19 08:46:28 +01:00
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