Commit Graph

10442 Commits

Author SHA1 Message Date
Bilal Amarni 26a1e0be5e [ClassLoader] ordered ClassCollectionLoader writing to avoid redeclaration at runtime 2012-07-03 14:40:59 +02:00
Fabien Potencier 2f66ae3a0c merged branch Tobion/encode-rel-path (PR #4722)
Commits
-------

5c6f848 [Routing] use faster approach for encoding rel segments
25d326b [Routing] fix encoding of path segments '.' and '..'

Discussion
----------

[Routing] fix encoding of path segments '.' and '..'

#4559 for master
2012-07-03 12:59:10 +02:00
Tobias Schultze 5c6f848a7d [Routing] use faster approach for encoding rel segments
replaced the preg_replace code that was 1.4 times slower than the new code (verified with benchmark
2012-07-03 12:52:06 +02:00
Tobias Schultze 25d326b55e [Routing] fix encoding of path segments '.' and '..' 2012-07-03 12:52:05 +02:00
Fabien Potencier e9477820f2 merged branch vicb/framework/config (PR #4721)
Commits
-------

816539b [FrameworkBundle] Display an error message when 'session.auto_start' is used (deprecated)

Discussion
----------

[FrameworkBundle] Display an error message when 'session.auto_start' is ...

...used (deprecated)
2012-07-03 12:24:04 +02:00
Tobias Schultze 51b610f8ba [Profiler] fix typehint 2012-07-03 13:04:37 +03:00
Victor Berchet 816539b110 [FrameworkBundle] Display an error message when 'session.auto_start' is used (deprecated) 2012-07-03 11:35:02 +02:00
Fabien Potencier 11e8a33c7c merged branch Tobion/4166 (PR #4530)
Commits
-------

3466896 [Routing] fix encoding of static static, so UrlGenerator produces valid URLs

Discussion
----------

[Routing] fix encoding of static text

Fixes #4166

As requested by Fabien, I split #4205 into multiple PRs.

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

by stof at 2012-06-09T12:49:32Z

github tells me this PR cannot be merged automatically. Could you rebase it ?

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

by Tobion at 2012-06-09T13:12:55Z

Done

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

by travisbot at 2012-06-09T13:18:18Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1576266) (merged 3466896a into 15b5aa4f).
2012-07-03 11:09:19 +02:00
Fabien Potencier bf59b8677c merged branch fabpot/charset-fix (PR #4716)
Commits
-------

d9439ab made the charset overridable (closes #2072)

Discussion
----------

made the charset overridable (closes #2072)

The charset was configurable in a configuration file but it never worked:

    framework:
        charset: ISO-8859-1

Now, like for the cache and log dirs, you can configure the charset by
overriding the getCharset() method in the app kernel:

    public function getCharset()
    {
        return 'ISO-8859-1';
    }

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

by fabpot at 2012-07-03T07:26:04Z

See #2072 for the previous attempts to fix this issue.
2012-07-03 10:43:15 +02:00
Fabien Potencier d9439aba71 made the charset overridable (closes #2072)
The charset was configurable in a configuration file but it never worked:

    framework:
        charset: ISO-8859-1

Now, like for the cache and log dirs, you can configure the charset by
overriding the getCharset() method in the app kernel:

    public function getCharset()
    {
        return 'ISO-8859-1';
    }
2012-07-03 10:28:30 +02:00
Fabien Potencier f47b9a6625 [WebProfilerBundle] inlined a service (closes #4717) 2012-07-03 10:02:51 +02:00
Fabien Potencier 736aa210a2 merged branch simensen/normalize-querystring (PR #4711)
Commits
-------

6296a24 Standalone query string normalization

Discussion
----------

[HttpFoundation] Standalone query string normalization

I wanted to leverage query string normalization in a test. I considered copying this code to my own library but I noticed that the only instance data `getQueryString` needed to know from the `Request` was `QUERY_STRING` so I broke the rest out into a standalone static function.

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

by simensen at 2012-07-02T20:05:59Z

I made the requested changes.

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

by fabpot at 2012-07-02T20:10:27Z

Can you squash your commits? Thanks.

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

by simensen at 2012-07-02T20:16:52Z

Sure, no problem. Hopefully I did it correctly.
2012-07-02 22:18:33 +02:00
Beau Simensen 6296a241a8 Standalone query string normalization 2012-07-02 13:11:17 -07:00
Fabien Potencier 67a69ea357 [Security] updated CHANGELOG 2012-07-02 19:29:27 +02:00
Fabien Potencier 637aaacccb merged branch uwej711/security_target_path_master (PR #4409)
Commits
-------

8ffaafa Make the session entry for the target url firewall dependent.

Discussion
----------

[Security] Make the session entry for the target url firewall dependent.

Bug fix: yes
Feature addition: no
Backwards compatibility break: yes
Symfony2 tests pass: yes
Fixes the following tickets:
License of the code: MIT

If there are two firewalls (eg. main and admin), calling an protected admin url
will direct you to the login form of the admin. If I ignore this and go to the login
form of the main firewall directly I will end up being redirected to the stored
admin target url, which will lead me to the admin login form again.

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

by travisbot at 2012-05-25T09:33:44Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1431566) (merged 8ffaafa8 into 45849ce3).

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

by uwej711 at 2012-06-09T08:05:54Z

Doesn't this make sense or did this slip through? Or is there something missing?
2012-07-02 19:27:21 +02:00
Fabien Potencier b26cd4c080 merged branch avorobiev/fix1 (PR #4708)
Commits
-------

036c15e [DependencyInjection] Unescape class arguments part 2
19bdae1 [DependencyInjection] Fixed unescaping of class arguments

Discussion
----------

[DependencyInjection] Fixed unescaping of class arguments

https://github.com/symfony/symfony/pull/4707
2012-07-02 18:58:19 +02:00
avorobiev 036c15ecfa [DependencyInjection] Unescape class arguments part 2 2012-07-02 18:17:30 +04:00
avorobiev 19bdae1b90 [DependencyInjection] Fixed unescaping of class arguments 2012-07-02 18:10:38 +04:00
Fabien Potencier 81fe2ff8e2 merged branch fabpot/locale-listener (PR #4692)
Commits
-------

88caf3a [HttpKernel] removed the storage of the current locale in the session

Discussion
----------

[HttpKernel] removed the storage of the current locale in the session

Before this commit, the current locale was stored in the session (if one
was already started). That way, for the next requests, even if the
request locale attribute was not set, the locale was "restored".

But this is a really bad practice as it means that the same URL can have
a different content depending on the previous requests. It would have
been better if the Vary header was set but the locale can be different
from the value coming from the Accept-Language anyway.

This is a BC break but fortunately, you can restore the 2.0 behavior by
creating a simple event listener that contains the logic removed by this
commit.

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

by travisbot at 2012-07-01T06:56:48Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1748659) (merged 009e30f0 into 2e356c1a).

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

by schmittjoh at 2012-07-01T08:15:46Z

How about using a cookie instead? It would remove the BC break, and also be possible to use a vary header?

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

by fabpot at 2012-07-01T09:13:44Z

The goal is to make Symfony as stateless as possible; introducing a cookie would defeat this goal.

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

by drak at 2012-07-01T09:19:37Z

@fabpot - thank you for bringing this to attention. I was meaning to do it a long time ago. The requested language is entirely a per request issue and must always be so. URLs must only ever return one content, and not multiple (e.g. different languages). The correct way to behave is to detect the language based on URL and failing that where a language is not requested, to look at the preferred language from the browser request and if available it can be redirected to that resource (e.g. /fr). This is what we do in Zikula. We have a further session based setting for "preferred language" which if set will override the browser default.

In summary:

1. If the language is specified in the GET request, return that language always. E.g. domain.com/fr/foo should return a French version of foo

2. If no language is specified in the GET request: first check the session for a preferred language, otherwise check the browser string for the preferred language and then if necessary, redirect to that resource. We have a setting which additionally say "always have language in URL, and don't put language code in URL for default language"

This means what in Zikula we only ever have one URL per language version of a page, but it still allows for users to set their preferred language which is taken in to account mainly when they visit the homepage (but in fact any page without a specific language in the request).

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

by drak at 2012-07-01T09:38:06Z

+1 on this PR. Basically the request locale should be in the Request object and calculated according to the applications preferences.

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

by schmittjoh at 2012-07-01T12:38:25Z

I agree that content must be detected based on the request, but I strongly disagree with relying entirely on the URL.

@fabpot, if you think about it using a cookie would still be stateless. There would be no state whatsoever, the detection would be entirely based on the request. Whether the language information is transmitted in the URL or as part of request headers is for the developer to decide eventually, at least IMO. My suggestion would just provide a default which is more BC.

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

by drak at 2012-07-01T20:08:50Z

@schmittjoh it's not entirely from the URL, there are browser preferences and also user defaults ca nalso available but the latter is slightly higher level. IMO it's not really Symfony's job here, it's application level specific. We have a pretty good working example of that in Zikula. Anyone can easily implement your own requirements with a listener.

What is absolutely clear however is it is wrong for one URL to deliver more than one version of any content.

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

by schmittjoh at 2012-07-01T21:16:52Z

I'm 100% for this change. My suggestion would just be more BC while still keeping Symfony2 stateless. Of course, it can be easily implemented in userland if we do not care about BC here.

Regarding different URLs per content, I do not think that this is our decision to make. Generally, developers should be able to make whatever content negotation they see fit. Whether they rely solely on the URL, or also take other request headers into account should not be limited by Symfony2.

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

by fabpot at 2012-07-02T10:37:26Z

I've added a paragraph in the UPGRADE file with a listener example that can be used to keep BC.
2012-07-02 12:37:57 +02:00
Fabien Potencier 88caf3a370 [HttpKernel] removed the storage of the current locale in the session
Before this commit, the current locale was stored in the session (if one
was already started). That way, for the next requests, even if the
request locale attribute was not set, the locale was "restored".

But this is a really bad practice as it means that the same URL can have
a different content depending on the previous requests. It would have
been better if the Vary header was set but the locale can be different
from the value coming from the Accept-Language anyway.

This is a BC break but fortunately, you can restore the 2.0 behavior by
creating a simple event listener that contains the logic removed by this
commit.
2012-07-02 12:36:25 +02:00
Fabien Potencier 7407773234 [WebProfilerBundle] tweaked previous merge 2012-07-02 11:12:51 +02:00
Fabien Potencier 155320ae83 merged branch wodor/profiler_rely_on_profile_3372 (PR #3373)
Commits
-------

1472283 fixed CS
bc73487 renamed template to TemplateManager , moved profiler to the deps of manager
5fd6ed6 properties protected
abd0eb7 generating template names moved out from controller  to another class
6138e80 [Profiler] relying on config of displayed profile  instead of current config.

Discussion
----------

[2.2][Profiler] relying on config of displayed profile  instead of current config

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: code of ProfilerController is not covered by any test
Fixes the following tickets: #3372
Todo: ~

This fixes the exception which is raised when viewed profile has other  data collectors than in config of currently run profiler.
explained here
https://github.com/symfony/symfony/issues/3372

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

by fabpot at 2012-02-16T06:11:00Z

This should probably be done on the 2.0 branch. Also, I think we need to check if the panel is actually available in the current profiler (if not, we won't be able to display it anyway). So, both checks are important.

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

by wodor at 2012-02-18T10:15:40Z

defects mentioned by Stof are fixed
2012-07-02 11:05:28 +02:00
Fabien Potencier 36192a922c merged branch SamsonIT/fix_dutch_translations (PR #4702)
Commits
-------

6e168cd fixed dutch translations

Discussion
----------

fixed dutch translations

mostly reverts a859f7

e-mailadres: http://www.onzetaal.nl/taaladvies/advies/e-mailadres-emailadres
"waarde" is not a neutral word, so it cannot be referred to as "het"
"verwachte" here is an adjective, not a verb - http://www.leestrainer.nl/Leerlijn%20werkwoorden/als%20bijvnm%20schrijven.htm
2012-07-02 11:02:49 +02:00
Bart van den Burg 6e168cdbb9 fixed dutch translations
mostly reverts a859f7

e-mailadres: http://www.onzetaal.nl/taaladvies/advies/e-mailadres-emailadres
"waarde" is not a neutral word, so it cannot be referred to as "het"
"verwachte" here is an adjective, not a verb - http://www.leestrainer.nl/Leerlijn%20werkwoorden/als%20bijvnm%20schrijven.htm
2012-07-02 10:54:18 +02:00
Fabien Potencier 28b6ff0f48 merged branch nomack84/wdt_documentation_link_color_fix (PR #4260)
Commits
-------

b804b94 Fixed style for the abbr tag
147cab7 [WDT] Fix the color of Documentation link to keep concistence.

Discussion
----------

[WDT] Fix the color of Documentation link to keep concistence.

This pull request is to make the Documentation link black as the other links of the WDT

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

by travisbot at 2012-05-11T13:33:24Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1304777) (merged 5a87a098 into 554e0738).

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

by Tobion at 2012-05-11T16:36:39Z

should be done via selector in the css file that is used for the WDT (also refactor the profiler token link like this)

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

by nomack84 at 2012-05-11T17:46:15Z

Done.

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

by travisbot at 2012-05-11T17:48:24Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1307502) (merged eee437c9 into 554e0738).

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

by travisbot at 2012-05-11T18:27:55Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1307838) (merged 3604f131 into dd0da03c).

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

by mvrhov at 2012-05-11T18:40:05Z

While you are at it, the controller text color is also wrong.

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

by travisbot at 2012-05-11T18:43:00Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1308018) (merged 147cab74 into dd0da03c).

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

by nomack84 at 2012-05-11T18:49:47Z

@mvrhov I don't see the difference.

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

by mvrhov at 2012-05-11T19:45:45Z

Set the color for abbr tag on your website to red or something like that. By default abbr color is set to black. My website has is set to #55555 so the controller name its barely visible.

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

by nomack84 at 2012-05-14T12:42:30Z

@mvrhov Done!

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

by travisbot at 2012-05-14T12:43:48Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1326494) (merged b804b942 into dd0da03c).

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

by nomack84 at 2012-05-15T13:09:59Z

Hi @fabpot,
Can you merge this? The only thing it does is add a missed style to the Documentation link and also to the abbr tag, as suggested by @mvrhov.
Greetings!
2012-07-02 10:42:21 +02:00
Fabien Potencier 168b89507c merged branch hvt/patch-1 (PR #4700)
Commits
-------

a859f72 Better Dutch translation of some validator messages

Discussion
----------

[Validator] Better Dutch translation of some validator messages
2012-07-02 10:34:22 +02:00
Harm van Tilborg a859f729e3 Better Dutch translation of some validator messages 2012-07-02 11:20:06 +03:00
Fabien Potencier dd1115a286 merged branch vicb/finder/regex (PR #4699)
Commits
-------

4d09fe6 [Finder] '*' and '?' are considered are glob pattern rather than delimiters (fix #4664)

Discussion
----------

[Finder] '*' and '?' are considered are glob pattern rather than delimit...

...ers (fix #4664)
2012-07-02 09:47:07 +02:00
Victor Berchet 4d09fe6e04 [Finder] '*' and '?' are considered are glob pattern rather than delimiters (fix #4664) 2012-07-02 09:05:19 +02:00
Fabien Potencier b6e4fd0393 [HttpKernel] fixed a test 2012-07-01 23:28:11 +02:00
Fabien Potencier 6dd342c351 fixed previous merge 2012-07-01 23:25:00 +02:00
Fabien Potencier d2b5208a77 merged branch dlsniper/session-start-fix (PR #4541)
Commits
-------

f72ba0a Fixed detection of an active session

Discussion
----------

[WIP][HttpFoundation][Session] Fixed detection of an active session

Bug fix: yes
Feature addition: no
Backwards compatibility break: not sure
Symfony2 tests pass: no
Fixes the following tickets: #4529
Todo: Fix failing tests
License of the code: MIT
Documentation PR: ~

This fixes the problem when the session variable inside $request now has always data in it as it's now more powerful but this introduces the problem that the old way of detecting if a session is started or not doesn't work anymore.

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

by travisbot at 2012-06-09T21:53:17Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1578839) (merged 9ae13e12 into 6266b72d).

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

by drak at 2012-06-10T01:57:59Z

Sessions should be started implicitly. The SF auto_start config parameter controls the session listener to start the session.

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

by dlsniper at 2012-06-11T06:46:02Z

So this patch is correct then and I should continue the work on it?

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

by drak at 2012-06-11T07:51:39Z

@dlsniper - no it's not correct.  The session should not be auto-started like this, @fabpot and I recently discussed it.

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

by dlsniper at 2012-06-11T07:52:55Z

@Drak, ok I'll remove the patch for auto_start then but the fix for start would still stand, right?

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

by drak at 2012-06-12T18:40:35Z

@dlsniper - I have no objection to the rest of the PR except for the autostart stuff.  I've annotated for clarity :)

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

by travisbot at 2012-06-12T19:51:12Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1604158) (merged 3499980e into 37550d23).

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

by travisbot at 2012-06-12T19:52:00Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1604166) (merged dcc73071 into 37550d23).

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

by dlsniper at 2012-06-12T19:56:51Z

Seems Travis doesn't like the squashing of commits that I've did but the PR does pass the normal tests.
@drak is this good for merging now?

Thanks :)

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

by dlsniper at 2012-06-13T09:05:09Z

@fabpot this can be merged safely, I've just applied the patch on my production application and the patch is ok, it's just travis failing.

Thanks

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

by travisbot at 2012-06-13T09:23:46Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1608735) (merged 1a6eabd2 into 37550d23).

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

by travisbot at 2012-06-13T09:28:26Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1608758) (merged 4e3a93c8 into 37550d23).

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

by dlsniper at 2012-06-13T09:29:28Z

I've noticed that this is failing, I'll fix it later on today.

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

by travisbot at 2012-06-13T15:14:01Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1611541) (merged 5504c4b7 into 37550d23).

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

by drak at 2012-06-13T15:23:47Z

It's possible that other tests are failing not related to this PR. Run the tests on the current master, and try rebasing your branch to the current master also.

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

by dlsniper at 2012-06-13T15:44:22Z

I've just reminded why this is failing on builds, I can't do them locally because of this:
```
Installing dev dependencies
Your requirements could not be solved to an installable set of packages.

        Problems:
                - Problem caused by:
                        - Installation request for doctrine/orm [>= 2.2.0.0, < 2.4.0.0-dev]: Satisfiable by [doctrine/orm-2.2.2, doctrine/orm-2.2.1, doctrine/orm-2.2.0, doctrine/orm-2.2.x-dev, doctrine/orm-2.3.x-dev].
```

I'll try and install this somehow and see what's wrong with it.

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

by mvrhov at 2012-06-13T18:08:58Z

@dlsniper: as @stof said to me this should be resolved in latest versions of composer, but it seems that is not. The problem is that composer cannot figure out that you are on dev-master if you try to instal dev. dependencies on feature branch. Take a look at the .travis.yml file on how to do a proper dev vendors install.
cc @Seldaek

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

by dlsniper at 2012-06-13T23:08:53Z

@mvrhov Thanks for pointing this out.

@drak I still got two tests not passing but I'm not sure how to fix them as adding $session->start() will either fail with the message that the session has already been started, the headers_sent() call which returns true. Any help with them will be greatly appreciated. Thanks!

Here is what the HttpKernel tests are returning:
```
There were 2 failures:

1) Symfony\Component\HttpKernel\Tests\EventListener\LocaleListenerTest::testDefaultLocaleWithSession
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'es'
+'fr'

/var/www/symfony-orig/src/Symfony/Component/HttpKernel/Tests/EventListener/LocaleListenerTest.php:51

2) Symfony\Component\HttpKernel\Tests\EventListener\LocaleListenerTest::testLocaleFromRequestAttribute
Expectation failed for method name is equal to <string:set> when invoked 1 time(s).
Method was expected to be called 1 times, actually called 0 times.

FAILURES!
Tests: 263, Assertions: 1025, Failures: 2, Skipped: 10.
```

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

by travisbot at 2012-06-13T23:42:59Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1614883) (merged 1004b7c0 into c07e9163).

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

by travisbot at 2012-06-13T23:53:06Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1614897) (merged f72ba0a2 into c07e9163).

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

by dlsniper at 2012-06-16T20:14:41Z

@stof / @vicb Hi, do either of you think that you can either point me out to the right direction for fixing this either ping someone else for home help as @drak doesn't seem available for this and at the moment I'm pretty much clueless in what direction I should take this fix.

Thanks!

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

by dlsniper at 2012-06-19T14:16:29Z

ping @fabpot Can you please provide some input on this one as I'm a bit stuck and seems noone else is available.

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

by drak at 2012-06-20T10:24:43Z

fyi - I'll be able to look again in a few days

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

by fabpot at 2012-07-01T07:53:28Z

I'm +1 to add the `isStarted()` method, but -1 for the change of `Request::hasSession`.

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

by drak at 2012-07-01T09:06:15Z

@fabpot, I agree. `hasSession()` should not be changed, it's semantically incorrect to make it return effectively "hasActiveSession".
2012-07-01 23:20:45 +02:00
Fabien Potencier 7ac10fefa0 merged branch jalliot/load-class-cache (PR #4542)
Commits
-------

f09789b [FrameworkBundle] Generate the class cache when warming up the cache

Discussion
----------

[FrameworkBundle] Generate the class cache when warming up the cache

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

With this PR, the commands `cache:clear` (if `--no-warmup` hasn't been specified) and `cache:warmup` generate the class cache. Now the first page load after clearing the cache does not take over one second anymore :)
Of course, if someone does not want to use the class cache for whatever reason, he can always remove the `$kernel->loadClassCache()` in his front controller and the cache will just be ignored...

On a side note, can someone explain why [SensioDistributionBundle does not warmup the cache in the Composer post-install script](https://github.com/sensio/SensioDistributionBundle/blob/master/Composer/ScriptHandler.php#L48)?

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

by travisbot at 2012-06-10T05:18:30Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1579114) (merged baecbaee into 6266b72d).

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

by travisbot at 2012-06-10T05:24:48Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1579154) (merged f09789b1 into 6266b72d).

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

by jalliot at 2012-06-28T23:18:54Z

@fabpot ping
2012-07-01 23:19:22 +02:00
Fabien Potencier 8a3f5bd323 merged branch Tobion/requestmatcher (PR #4582)
Commits
-------

7464dcd added phpdoc
c413e7b [Routing] remove RequestContextAwareInterface from RequestMatcherInterface
921be34 [Routing] fix phpdoc

Discussion
----------

[Routing] RequestMatcherInterface doesn't need context

Matchers that implement RequestMatcherInterface should match a Request, thus they don't need the request context.

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

by travisbot at 2012-06-14T21:39:48Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1624496) (merged f5ff1fe0 into 7c91ee57).

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

by schmittjoh at 2012-06-15T13:32:59Z

I think it makes sense to remove the RequestContext from the RequestMatcher.

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

by travisbot at 2012-06-15T15:54:28Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1628931) (merged 7464dcd2 into f881d282).

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

by Tobion at 2012-06-26T12:32:06Z

Anything missing?
2012-07-01 23:09:16 +02:00
Fabien Potencier 4f4c679eef [FrameworkBundle] fixed client insulation (closes #1726, closes #4608) 2012-07-01 23:01:26 +02:00
Fabien Potencier c0e4760b38 merged branch kriswallsmith/form/mv-humanize (PR #4645)
Commits
-------

c1e4166 moved create of default form label to view layer

Discussion
----------

move create of default form label to view layer

A small optimization if you provide custom labels in the view layer (i.e. `{{ form_label(form.name, 'Your name') }}`

```
Bug fix: no
Feature addition: no
Backwards compatibility break: yes
Symfony2 tests pass: yes
Fixes the following tickets: ~
Todo: ~
License of the code: MIT
Documentation PR: ~
```

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

by travisbot at 2012-06-24T14:45:17Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1694310) (merged 37f0b774 into 0d4b02e4).

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

by travisbot at 2012-06-24T15:03:44Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1694418) (merged c1e4166e into 0d4b02e4).
2012-07-01 22:38:07 +02:00
Fabien Potencier 85d77c2ec9 merged branch flojon/patch-1 (PR #4638)
Commits
-------

eb26e89 [FrameworkBundle] Fix built-in server when using query params in paths

Discussion
----------

[FrameworkBundle] Fix built-in server when using query params in paths

$_SERVER['REQUEST_URI'] will contain the query params so is_file will fail.
I propose to use $_SERVER['SCRIPT_FILENAME'] instead which contains the full path and no query params.

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

by ajessu at 2012-06-23T10:17:34Z

I was going to make this comment on your approach in #4484, but I'll make it here, since that issue is already closed.

Your solution won't work on PHP 5.4.0, as `$_SERVER['SCRIPT_FILENAME']` will not be set [see PHP bug #60850](https://bugs.php.net/bug.php?id=60850).

Also PHP 5.4.1 and up, if you don't request a file explicitely, Ex:

     http://localhost:8000/app_dev.php

but a location, Ex:

    http://localhost:8000/

The value of the `$_SERVER['SCRIPT_FILENAME']` will be the router file, not the script name, which makes relying on `$_SERVER['SCRIPT_FILENAME']` inconsistent. [See this comment on the php bug](https://bugs.php.net/bug.php?id=60850#1331261652)

I'm not sure if (nor how?) the issue of the params should be addressed on this "default" router, to not make it overly complex.

For your use case, and this is just my own early opinion without much thought, in case we can't come up with a general solution, there is always the option of defining your own router and passing it to the `server:run` command with `--router` like so:

    php app/console server:run --router=app/config/my_own_router.php

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

by flojon at 2012-06-23T10:31:47Z

So would `$_SERVER['SCRIPT_NAME']` be more reliable? Like this:

    if (is_file($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . $_SERVER['SCRIPT_NAME'])) {
        return false;
    }

I did a simple test and `$_SERVER['SCRIPT_NAME']` is set to `/` when accessing the root (using PHP 5.4.3).

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

by flojon at 2012-06-23T10:51:22Z

Browse around the code a bit and `$_SERVER['SCRIPT_NAME']` has been there since PHP 5.4.0:
https://github.com/php/php-src/blob/php-5.4.0/sapi/cli/php_cli_server.c#L598

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

by travisbot at 2012-06-23T11:16:59Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1688361) (merged eb26e896 into 0d4b02e4).

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

by travisbot at 2012-06-24T10:23:52Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1688043) (merged 71855665 into 0d4b02e4).

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

by CHH at 2012-06-29T07:17:32Z

This works fine for me!

👍

Could someone please merge this? This issue makes the `server:run` command currently quite unusable, because it can't load CSS for example which has a `?v=` parameter.

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

by ajessu at 2012-06-29T08:25:14Z

👍 from me also. Works just like `$_SERVER['REQUEST_URI']`, but doesn't include the params.

Tested working on PHP 5.4.0 and 5.4.3.
2012-07-01 22:34:54 +02:00
Fabien Potencier ed49e3be35 [Routing] removed trailing slash behavior on non-safe requests (refs #2626) 2012-07-01 19:02:05 +02:00
Fabien Potencier 16976be8ce [Routing] fixed indentation 2012-07-01 18:56:00 +02:00
Marc Abramowitz c1fea1d8c8 fixed incorrect reference to set*Service() method 2012-07-01 12:35:01 +02:00
Fabien Potencier a1b73887f7 [Yaml] fixed parsing when a mapping is mixed within a sequence and vice-versa (closes #4634) 2012-07-01 11:19:53 +02:00
Fabien Potencier 2e356c1ab9 [FrameworkBundle] removed the auto-starting of the session when a previous session exists (it is not needed anymore as the session is now always started on demand) 2012-06-30 20:44:16 +02:00
Fabien Potencier efb44640d1 removed unneeded code 2012-06-30 16:47:41 +02:00
Fabien Potencier a8f91d417f merged branch Partugal/patch-1 (PR #4690)
Commits
-------

0b02e3c [FrameworkBundle] Removed unneeded parameter

Discussion
----------

Remove autortart parameter

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

by travisbot at 2012-06-30T09:25:37Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1742561) (merged 0b02e3ce into 741927ba).
2012-06-30 12:04:56 +02:00
Sergey Linnik 0b02e3ce79 [FrameworkBundle] Removed unneeded parameter 2012-06-30 13:11:07 +04:00
Fabien Potencier 741927baf3 [FrameworkBundle] removed unneeded start call 2012-06-30 09:42:40 +02:00
Fabien Potencier fe527d00c1 merged branch drak/session_on_demand (PR #4264)
Commits
-------

911db69 [FrameworkBundle] Typo fix
19eeac8 [HttpFoundation] Removed erroneous reliance on session.auto_start
dcac5d7 [HttpFoundation] Corrected docblocks and properties.
1fd66f3 [FrameworkBundle] Remove 'auto_start' configuration parameter.

Discussion
----------

[HttpFoundation] Remove session start on demand

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

This removes false reliance on ini directive `session.auto_start` to allow a session to start when session bags are accessed before the `SessionStorageInterface` is started.

Sessions must be explicitly started in all circumstances.

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

by stloyd at 2012-06-13T07:22:24Z

@drak Shouldn't you add note about this change in upgrade file ?

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

by drak at 2012-06-13T15:13:37Z

It's a development version change, so not really. But saying that, I have a bunch of documentation to amend when this gets merged and at that time I'll make sure the changelogs and upgrading are up to date as part of that.

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

by dlsniper at 2012-06-13T21:57:28Z

@drak If this change will kick in what does one user of Symfony 2 Standard must do in order to keep compat with this merge? I see that you said you'll update the docs but until that happens some might upgrade their app directly to master :)

Thanks.

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

by drak at 2012-06-14T01:36:04Z

@dlsniper - nothing. This corrects a bug and inconsistency.

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

by travisbot at 2012-06-29T17:48:42Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1739033) (merged 19eeac88 into 62100f1a).

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

by drak at 2012-06-29T17:55:13Z

@fabpot ping. The failing Travis is nothing to do with this PR (see the travis logs).

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

by travisbot at 2012-06-29T20:39:43Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1739805) (merged 911db69b into 62100f1a).
2012-06-30 09:39:50 +02:00
Drak 911db69bfe [FrameworkBundle] Typo fix 2012-06-29 20:13:19 +01:00
Drak 19eeac88ca [HttpFoundation] Removed erroneous reliance on session.auto_start 2012-06-29 18:05:14 +01:00
Drak dcac5d7fd6 [HttpFoundation] Corrected docblocks and properties. 2012-06-29 18:04:40 +01:00