Commit Graph

8890 Commits

Author SHA1 Message Date
Fabien Potencier
6f4d28181a [ClassLoader] added missing support for PHP 5.4 traits 2012-07-03 19:09:11 +02:00
Fabien Potencier
85977649a4 fixed unit tests 2012-07-03 19:06:57 +02:00
Jordi Boggiano
45219ef80f [Process] Add default xampp path to the list of possible paths to check 2012-07-03 18:58:37 +02:00
Jordi Boggiano
28e1313e5d [Process] Clean-up/simplify code 2012-07-03 18:58:27 +02:00
Fabien Potencier
3cfe916e65 [FrameworkBundle] fixed some unit tests 2012-07-03 18:55:00 +02:00
Jordi Boggiano
56f473a073 [Process] Add extra dirs argument to the executable finder to allow searching more dirs 2012-07-03 18:19:03 +02:00
Victor Berchet
eda439ffe5 [EventDataCollector] Display a better message when no events have been recorded 2012-07-03 18:15:27 +02:00
Victor Berchet
6b87981641 [TimeDataCollector] Do not throw an exception when no events are recorded 2012-07-03 18:15:20 +02:00
Fabien Potencier
23f41a21ca merged branch vicb/templates (PR #4723)
Commits
-------

aef7663 [FrameworkBundle] Create a dedicated template filename parser

Discussion
----------

[FrameworkBundle] Create a dedicated template filename parser

Bug fix: no
Feature addition: no
Backwards compatibility break: yes
Symfony2 tests pass: yes

related to #3116
2012-07-03 17:47:16 +02:00
Jeremy Mikola
0fe56e6012 [Config] Fix comment typo 2012-07-03 12:34:31 -03:00
Fabien Potencier
3ee1b383af merged branch vicb/auto_start (PR #4724)
Commits
-------

c5470b0 [Session] Removes references to the deprecated 'auto_start' setting

Discussion
----------

[Session] Removes references to the deprecated 'auto_start' setting

fix #4721
2012-07-03 16:13:04 +02:00
Victor Berchet
c5470b06bb [Session] Removes references to the deprecated 'auto_start' setting 2012-07-03 15:44:06 +02:00
Victor Berchet
aef7663676 [FrameworkBundle] Create a dedicated template filename parser 2012-07-03 14:58:30 +02:00
Fabien Potencier
2335dd0d60 merged branch bamarni/compile-classes (PR #4694)
Commits
-------

26a1e0b [ClassLoader] ordered ClassCollectionLoader writing to avoid redeclaration at runtime

Discussion
----------

[HttpKernel] allowed classes to compile to be prepended

I had an issue when registering JMSDIExtraBundle before the frameworkBundle, because the bundle is adding a class to compile wich extends a class to compile added by the frameworkbundle (https://github.com/schmittjoh/JMSDiExtraBundle/blob/master/HttpKernel/ControllerResolver.php#L39).

In my kernel, the bundle was registered before the frameworkbundle, if it's the case, the class is writed before the symfony core class in the cache file, so it will trigger the autoloader to load the symfony core class, then we'll have a fatal error because we're declaring 2 times the same class.

I'm suggesting to add a way to prepend the classes to compile added by an extension, this way we could force classes from the core bundle to pe prepended, and avoid this kind of error with other bundles adding classes extending core classes or implementing core interface. I've also added it to the frameworkbundle.

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

by travisbot at 2012-07-01T12:32:28Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1750090) (merged a989d35c into a1b73887).

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

by schmittjoh at 2012-07-01T12:45:46Z

This doesn't sound really failure proof, better would be to resolve the compiled classes in a way that handles the dependencies gracefully regardless of the order that they are registered in.

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

by bamarni at 2012-07-01T13:03:15Z

yes that would be much cleaner, even if it's not perfect, I don't have any other examples, but I think in most of situations this error happens because of the frameworkbundle late registration?

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

by bamarni at 2012-07-01T23:07:24Z

I've added an automatic reordering as suggested. Now I don't get the error whatever the order of FrameworkBundle and JMSDIExtraBundle is.

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

by vicb at 2012-07-02T10:02:33Z

Does the algo really works ?

Let's say I have the following hierarchy `A < B < C` and the classes added in the following order; `C, B, A`. I believe that the algo would return `B, A, C` instead of `A, B, C`.

An other question: should the dependency resolution be implemented in the `ClassCollectionLoader` rather than in the compiler pass ?

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

by vicb at 2012-07-02T10:23:11Z

 @bamarni could you confirm the issue with the algo ? If it is confirmed, do you have time to work on a fix ?

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

by bamarni at 2012-07-02T11:05:53Z

the algo looks correct, there is a loop checking dependencies and appending the parent classes at the begining so it should also work with A > B > C, but I'll check and add a unit test.

You're right about the location it could belong there if we want a general fix, should I put it in the ClassLoader component?

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

by vicb at 2012-07-02T11:28:14Z

Yep please move the code to the ClassLoader.

You could also add some cache mechanism:
- ReflectionClass could be cached (they might be use mulitple times when some dependencies exist and are also used by the class loader)
- May be you could also cache the hierarchy of the classes

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

by bamarni at 2012-07-02T17:25:08Z

@vicb : indeed there were something wrong with the algo when it needed to handle more than 1 level of dependency, it's fixed, I've added a few test case and it passes.

Caching the dependencies found with reflection would be useful if people are dumping several files with some similar classes in the same process, but I don't see why we would need to cache the hierarchy?

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

by vicb at 2012-07-02T18:29:06Z

@bamarni I was referring to a local cache (ie local variable).

- On the first iteration, the code instantiate a reflection class,
- On other iteration you would instantiate again a reflection class for a subset of the classes
- ...
- In the end the former code instantiate again a reflection class for each class in order to get the file name, ...

I was also thinking of an other algo: count the number of parent classes for each classes to include and order classes according to this number. This would be a single loop only, what do you think ?

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

by bamarni at 2012-07-02T19:32:34Z

hum good idea counting the parents is cleaner, even though it looks enough, would it also make sense to treat interfaces and classes separately? I'm thinking about a file with all the interfaces at the begining (ordered by number of parents desc), then the classes would be appended (ordered by number of parents desc too).

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

by vicb at 2012-07-03T07:05:07Z

There is no real benefit in making the interfaces appear first but you can do it if it doesn't make the code more complex.

Please also add the `@throws` annotation to the methods.

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

by bamarni at 2012-07-03T09:37:28Z

@vicb : I've changed it to use the parents count, looks good to me.

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

by bamarni at 2012-07-03T12:23:46Z

changed

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

by bamarni at 2012-07-03T12:42:29Z

fixed
2012-07-03 14:53:35 +02:00
Bilal Amarni
26a1e0be5e [ClassLoader] ordered ClassCollectionLoader writing to avoid redeclaration at runtime 2012-07-03 14:40:59 +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
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
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
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
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
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
Drak
1fd66f3cdf [FrameworkBundle] Remove 'auto_start' configuration parameter. 2012-06-29 17:34:28 +01:00
Fabien Potencier
62100f1a18 merged 2.0 2012-06-29 18:03:08 +02:00
Fabien Potencier
b89b00fa20 bumped minimal version of Swiftmailer to 4.2.0 2012-06-29 18:02:19 +02:00
Fabien Potencier
df1050fa32 merged 2.0 2012-06-29 18:01:01 +02:00
Fabien Potencier
997bcfc420 [SwiftmailerBridge] allowed versions 4.2.* 2012-06-29 18:00:35 +02:00
Fabien Potencier
8ebe624b82 [HttpKernel] added some unit tests 2012-06-29 08:38:15 +02:00
Fabien Potencier
fd0e589c2b fixed sub-requests with a different method than the main request 2012-06-29 08:31:02 +02:00
Fabien Potencier
a725f023c1 fixed typo 2012-06-29 00:35:09 +02:00
Fabien Potencier
e0351c93df merged branch fabpot/request-methods (PR #4679)
Commits
-------

df8d94e added Request::getSchemeAndHttpHost() and Request::getUserInfo() (closes #4312, refs #3416, refs #3056)

Discussion
----------

added Request::getSchemeAndHttpHost() and Request::getUserInfo()

see #4312

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

by travisbot at 2012-06-28T15:22:03Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1730172) (merged 598bd56f into 0d275701).

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

by Seldaek at 2012-06-28T15:22:35Z

Why not just `getSchemeAndHost`? That sounds long enough, and is fairly explicit given the context.

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

by fabpot at 2012-06-28T15:25:34Z

@Seldaek because (and that's probably unfortunate) we have both `getHost()` and `getHttpHost()`. The former does not include the port whereas the latter does.

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

by Seldaek at 2012-06-28T15:26:42Z

Ok makes sense.

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

by travisbot at 2012-06-28T16:11:16Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1730630) (merged df8d94e3 into 884a8264).
2012-06-28 19:05:50 +02:00
Xavier Lacot
e44e21c2e9 Reverted to Symfony 2.0's signature, which made it simple to display only a subset of the routes of the application.
This is particularly useful for FOSJsRoutingBundle's fos:js-routing:debug command, which allows to filter the list of javascript-exposed routes.
2012-06-28 18:29:35 +02:00
Fabien Potencier
df8d94e33c added Request::getSchemeAndHttpHost() and Request::getUserInfo() (closes #4312, refs #3416, refs #3056) 2012-06-28 17:56:04 +02:00
Fabien Potencier
884a8264b3 fixed CS 2012-06-28 17:48:35 +02:00
Fabien Potencier
9fb567dc43 merged branch stealth35/populate_files (PR #2892)
Commits
-------

b217897 [HttpFoundation] Complete Request::overrideGlobals

Discussion
----------

[2.2][HttpFoundation] complete Request::overrideGlobals

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

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

by stealth35 at 2011-12-15T14:20:36Z

Thank guys, should be better now

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

by stealth35 at 2011-12-15T16:14:40Z

@stloyd ✌️

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

by stloyd at 2011-12-15T16:22:48Z

@stealth35 You should update also [`RequestTest`](https://github.com/symfony/symfony/blob/master/tests/Symfony/Tests/Component/HttpFoundation/RequestTest.php#L623) which would show you typos you have few mins ago ;-)

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

by stealth35 at 2011-12-15T16:57:16Z

@stloyd done, thanks for your review

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

by canni at 2011-12-15T20:27:28Z

As this is bugfix, this shouldn't be re-based against 2.0?

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

by stealth35 at 2011-12-15T20:50:05Z

@canni It's more a forget feature, I tagged it to bug fix because of the `FIXME`, and it's add a method, IMO there is no rush

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

by canni at 2011-12-15T20:55:28Z

@stealth35 no rush at all, I was just curious :)

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

by vicb at 2012-01-06T16:24:31Z

I would say "Backwards compatibility break: yes" i.e.tests have been modified.

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

by stealth35 at 2012-01-06T16:36:15Z

@vicb the tests are not modified, just some addition

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

by vicb at 2012-01-06T16:40:30Z

@stealth35 https://github.com/symfony/symfony/pull/2892/files#L2R46

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

by stealth35 at 2012-01-06T17:13:07Z

@vicb it's not a compatibility break ...

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

by vicb at 2012-01-06T17:19:35Z

Well, same inputs, different outputs, this is a compatibility break to me.
But however it is named we should not change the behavior of this class; Client values are values as passed by the client you should no try to guess them.

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

by stealth35 at 2012-01-06T17:32:41Z

@vicb the behavior ? when you change the GET or POST values with `HttpFoundation\*Bag` (replace/set) it's the same thing

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

by vicb at 2012-01-06T17:35:39Z

I am referring to the difference in behavior between the current implementation and the version in this PR.
They do not behave the same and that's why the tests have been modified.

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

by fabpot at 2012-02-14T23:33:42Z

any progress on this PR?

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

by vicb at 2012-02-15T07:48:34Z

To make it clear I strongly disagree with the modifs in this PR. Available to help if needed.

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

by stealth35 at 2012-02-15T09:24:50Z

@fabpot Well, `move_uploaded_file` will not work so I have some doubt about this, @vicb just don't like the fact to add the mime type type and the size, it's not an important thing, I can remove it we can discuss later about that,

@vicb the last thing to do, it's to recreate the weird php $_FILES array

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

by vicb at 2012-02-23T17:11:29Z

@stealth35 I don't think we can bypass the `move_uploaded_file` security check - which is good. Is there any interest in this PR w/o this ?

If no we should just update phpDoc comment and remove the FIXME (meaning we can not override the `$_FILES`).

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

by stealth35 at 2012-03-10T16:13:14Z

@vicb updated

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

by vicb at 2012-03-11T09:38:20Z

@stealth35 what about adding some unit tests ?

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

by stealth35 at 2012-03-11T11:06:44Z

> what about adding some unit tests ?

@vicb `request_order` is PHP_INI_PERDIR, so I don't really how to handle this

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

by vicb at 2012-03-11T11:15:55Z

by creating a `protected getRequestOrder()` method or something like this ?

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

by stealth35 at 2012-03-11T11:36:11Z

it's too bad to create a method just for this, I can make cond in the test

``` php
<?php
$request->initialize(array('get' => 'foo'), array('post' => 'bar'));
$request->overrideGlobals();

$request_order = ini_get('request_order');

if ('gp' === $request_order) {
    $this->assertEquals(array('get' => 'foo', 'post' => 'bar'), $_REQUEST);
} else if ('pg' === $request_order) {
    $this->assertEquals(array('post' => 'bar', 'get' => 'foo'), $_REQUEST);
}
// ...
```

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

by vicb at 2012-03-11T12:02:17Z

This would only test one case.

Some thoughts about your snippet:

* The init should probably be `$request->initialize(array('foo' => 'get'), array('foo' => 'post'));`,
* `$request_order` does not take into account `variables_order.ini`,
* missing `strtolower`

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

by fabpot at 2012-03-23T21:21:59Z

What's the status of this PR? What needs to be done before merging?

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

by stealth35 at 2012-03-24T18:33:42Z

@fabpot missing some tests, it's not essay to tests an `ini`directive, @vicb recommand a `getRequestOrder` method, it's not a bad idea

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

by vicb at 2012-03-24T20:06:53Z

and change `$request_order` to `$requestOrder` as suggested by @henrikbjorn I can't find where

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

by stealth35 at 2012-06-14T12:42:25Z

I need help for testing

``` php
<?php
$request = $this->getMock('Request', array('overrideGlobals', 'initialize'));

$request->expects($this->any())
        ->method('getRequestOrder')
        ->will($this->returnValue('gp'));

$request->initialize(array('foo' => 'fooget'), array('foo' => 'foopost'));
$request->overrideGlobals();

$this->assertEquals(array_merge($_GET, $_POST), $_REQUEST);
```
2012-06-28 17:48:02 +02:00
Fabien Potencier
9572e9bd6e merged branch eriksencosta/issue-3841 (PR #4601)
Commits
-------

a609d55 [Locale] fixed StubIntlDateFormatter to behave like the ext/intl implementation

Discussion
----------

[2.0][WIP][Locale] StubIntlDateFormatter should use the TZ environment variable instead of the PHP's date.timezone setting

Bug fix: yes
Feature addition: no
Backwards compatibility break: yes
Symfony2 tests pass: yes
Fixes the following tickets: #3841
Todo: Check ext/intl changes for the next PHP 5.4 release
License of the code: MIT

![Build Status](https://secure.travis-ci.org/eriksencosta/symfony.png?branch=issue-3841)

There were changes that need to be investigated for the next PHP 5.4 release:

 - [php-src @ eb346ef](eb346ef0f4)
 - [php-src @ 888e77f](888e77ff73)

A strong evidence of bug in ext/intl was found while testing `StubIntlDateFormatter`. See the comment available at the docblock of `StubIntlDateFormatterTest`'s `testFormatWithDefaultTimezoneIntlShouldUseTheTzEnvironmentVariableWhenAvailable()` method and the following Gist for test scripts: https://gist.github.com/2946342

Maybe the upcoming PHP 5.4 release fix this bug since it will use the PHP's `date.timezone` when no time zone is provided. If confirmed the bug, it will need to be reported to the ext/intl maintainers.

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

by travisbot at 2012-06-18T05:02:05Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1644431) (merged a609d55c into cd0aa378).

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

by fabpot at 2012-06-28T14:09:08Z

@eriksencosta Now that PHP 5.4.4 is out, our tests for the Locale components are broken. Is this PR ready to be merged?

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

by eriksencosta at 2012-06-28T14:53:14Z

@fabpot the failed test case seems unrelated to this issue. I will debug it.

Failed test: `Locale\Tests\Stub\StubNumberFormatterTest::testParseTypeInt64IntlWith32BitIntegerInPhp32Bit`

Recent build job: http://travis-ci.org/#!/symfony/symfony/jobs/1729618

I just need to confirm mine todo note. If you want, merge it, I'll track this and make a new PR if needed (possibly only to remove the TODO note.)
2012-06-28 16:57:13 +02:00
Fabien Potencier
0d2757014e merged branch jeanmonod/config-unittest-on-exprbuilder (PR #4570)
Commits
-------

9d730be Method rename and phpdoc fixes
e01a95e Add a set of unit tests for the ExprBuilder class

Discussion
----------

Add a set of unit tests for the Config/ExprBuilder class

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

by travisbot at 2012-06-13T14:55:31Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1611400) (merged e01a95e1 into c07e9163).

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

by jeanmonod at 2012-06-13T22:04:52Z

Hi there,

I write all these tests because I'll come latter with an other PR that extend the ExprBuilder functionality. But I'm not sure I use the best way for testing this class. It's working, but some refactoring suggestions will be welcome...
@stof and @schmittjoh what do you think about that?
2012-06-28 16:11:59 +02:00
Fabien Potencier
cd08db8e2a merged branch shieldo/mockable_formbuilderinterface (PR #4572)
Commits
-------

6b5b625 [Form] added FormBuilderInterface in Tests namespace, so as to enable easy mocking

Discussion
----------

[Form] added FormBuilderInterface in Tests namespace, so as to enable ea...

...sy mocking

Adding a ``FormBuilderInterface`` in the ``Tests`` namespace, along same lines as ``FormInterface`` already there, for the purposes of being able to mock it straightforwardly (as ``FormBuilderInterface`` extends ``\Traversable``, and therefore creating a mock in PHPUnit causes a fatal error that the mock ``must implement interface Traversable as part of either Iterator or IteratorAggregate``).  Currently in the tests a ``FormBuilder`` object is used with a mock event dispatcher and form factory passed into the constructor, but this is long-winded to have to do in tests for code outside the framework.

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

by travisbot at 2012-06-13T22:03:12Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1613957) (merged 6b5b625a into c07e9163).

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

by bschussek at 2012-06-14T07:22:33Z

👍
2012-06-28 16:10:42 +02:00
Fabien Potencier
be27ccf961 [FrameworkBundle] removed duplicated line 2012-06-28 16:05:05 +02:00
Fabien Potencier
84e619c016 merged branch hason/translationrequest (PR #4650)
Commits
-------

8ae0fa2 [FrameworkBundle] Fixed locale detection from request

Discussion
----------

[FrameworkBundle] Fixed locale detection from request

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

by travisbot at 2012-06-25T10:09:24Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1699743) (merged 8ae0fa21 into 03c8d4d2).
2012-06-28 16:03:12 +02:00
Fabien Potencier
b5e6613ad0 merged branch everzet/config-interface-check (PR #4659)
Commits
-------

d4a0988 [FrameworkBundle] added configuration interface check

Discussion
----------

[FrameworkBundle] added configuration interface check

Added check for ConfigurationInterface to config ref dumping
command. To ensure that configuration implements needed
`getConfigTreeBuilder()` command

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

by travisbot at 2012-06-26T09:19:03Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1708744) (merged d4a09881 into d131f9d3).
2012-06-28 15:07:45 +02:00
Fabien Potencier
f7d2ad2175 merged branch acasademont/camelize_property_path_add_and_remove_methods (PR #4673)
Commits
-------

9fabb3d [Form] Camelize 'add' and 'remove' methods in the PropertyPath

Discussion
----------

[Form] Camelize 'add' and 'remove' methods in the PropertyPath

Bug fix: yes
Feature addition: no
Backwards compatibility break: yes
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/acasademont/symfony.png?branch=camelize_property_path_add_and_remove_methods)](http://travis-ci.org/acasademont/symfony)
Fixes the following tickets: -
License of the code: MIT
Documentation PR: -

This issue camelizes the 'add' and 'remove' methods, as it is already done with the 'set' method.
This fixes a problem with properties like 'custom_messages', where the 'add' and 'remove' methods are 'addCustom_message' and 'removeCustom_message' instead of 'addCustomMessage' and 'removeCustomMessage'.

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

by acasademont at 2012-06-27T18:16:36Z

Seems the tests are failing due to some unrelated test in PHP 5.3.14 and PHP 5.4. PHP 5.3.3 works fine

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

by travisbot at 2012-06-27T18:38:39Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1722847) (merged 9fabb3dc into d0e15472).
2012-06-28 15:05:21 +02:00
Kirill chEbba Chebunin
10e0b0b24b [Templating] Use LoaderInterface instead of abstract Loader in ChainLoader 2012-06-28 16:26:23 +04:00
Fabien Potencier
e8c0e07841 merged branch vlechemin/ticket_3472 (PR #3473)
Commits
-------

ab47a88 [FrameworkBundle][Translator] Fix test for request being available in order to get the locale.

Discussion
----------

[FrameworkBundle][Translator] Fix test for request being available.

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #3472
Todo: -
2012-06-27 20:31:58 +02:00
Albert Casademont
9fabb3dc2f [Form] Camelize 'add' and 'remove' methods in the PropertyPath
This issue camelizes the 'add' and 'remove' methods,
as it is already done with the 'set' method.
This fixes a problem with properties like 'custom_messages',
where the 'add' and 'remove' methods are 'addCustom_message'
and 'removeCustom_message' instead of 'addCustomMessage'
and 'removeCustomMessage'.
2012-06-27 19:26:17 +02:00
Fabien Potencier
d0e154725c merged branch Partugal/parameterBag (PR #4468)
Commits
-------

1227cc2 add escapeValue to ParameterBagInterface

Discussion
----------

add escapeValue to ParameterBagInterface

#4465

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

by travisbot at 2012-05-30T18:01:47Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1479725) (merged 1227cc2a into 49e213ce).

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

by drak at 2012-05-31T02:42:44Z

@bschussek - there are a few form tests failing that seem to have been merged into master and thus all other unrelated PRs are failing their travis build checks. @fabpot
2012-06-26 17:35:24 +02:00
Fabien Potencier
fb3f77174c merged branch albyrock87/master (PR #4662)
Commits
-------

4d0cfbb Fix Italian translations in Validator

Discussion
----------

Fix Italian translation in Validator

I hope this time it'll work!

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

by travisbot at 2012-06-26T11:08:19Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1709695) (merged 4d0cfbb6 into 42212394).

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

by fabpot at 2012-06-26T15:17:30Z

That's weird. It still does not appear on your account: https://github.com/albyrock87/symfony is a 404.

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

by henrikbjorn at 2012-06-26T15:20:51Z

he renamed the repository instead i think https://github.com/albyrock87/symfony-fix-form-validation-italian
2012-06-26 17:31:23 +02:00
Fabien Potencier
c4a8feb68b merged branch Wotre/master (PR #4640)
Commits
-------

81d0552 Adding the database to the DSN we are sending to the MongoDB server

Discussion
----------

Adding the database to the DSN we are sending to the MongoDB server

Adding the database to the DSN we are sending to the MongoDB server.

According to the [documentation from PHP](http://be2.php.net/manual/en/mongo.construct.php) the database will default to admin if it isn't specified in this DSN. Unfortunately the username we're trying to login with shouldn't have access to this database.

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

by travisbot at 2012-06-23T13:54:28Z

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

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

by travisbot at 2012-06-25T11:34:17Z

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

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

by Wotre at 2012-06-25T12:16:49Z

It looks to me like travisbot failed because of an error in the routing system that was fixed in c67cf8b56b, not because of the code I altered.

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

by travisbot at 2012-06-25T16:45:12Z

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

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

by fabpot at 2012-06-26T05:07:37Z

Can you squash your commits before I merge? Thanks.

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

by Wotre at 2012-06-26T12:02:02Z

I think I've managed to do that, but correct me if I've done something wrong :)

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

by travisbot at 2012-06-26T12:05:19Z

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

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

by fabpot at 2012-06-26T12:14:28Z

@Wotre Unfortunately, that's wrong. You can read how to do that in the contrib docs: http://symfony.com/doc/current/contributing/code/patches.html#rework-your-patch

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

by Wotre at 2012-06-26T12:37:59Z

Thanks for the help, looks like I forgot the -f when pushing. It should be okay now
2012-06-26 14:41:54 +02:00
Wotre
81d0552ba4 Adding the database to the DSN we are sending to the MongoDB server 2012-06-26 13:59:41 +02:00
Alberto Aldegheri
4d0cfbb619 Fix Italian translations in Validator 2012-06-26 12:43:34 +02:00
Fabien Potencier
42212394cb fixed phpdoc 2012-06-26 12:06:05 +02:00
Fabien Potencier
21e2f29eb1 [Security] simplified some code 2012-06-26 11:30:41 +02:00
Fabien Potencier
16a0af1262 [Security] changed the HttpUtils constructor to tak both a UrlGenerator and a UrlMatcher instead of a Router (to make it useable by Silex) 2012-06-26 11:18:35 +02:00
everzet
d4a09881f1 [FrameworkBundle] added configuration interface check
Added check for ConfigurationInterface to config ref dumping
command. To ensure that configuration implements needed
`getConfigTreeBuilder()` command
2012-06-26 10:46:00 +02:00
Eduardo Gulias
4bfb6fddf7 [FrameworkBundle][Command] ContainerDebugCommand - Changed visibility to allow re use in childs 2012-06-26 09:01:12 +02:00
Fabien Potencier
5a8e20643e merged branch adrienbrault/http-foundation-fixes (PR #4483)
Commits
-------

9a74b85 [HttpFoundation] CS and phpdoc fixes

Discussion
----------

[HttpFoundation] CS and phpdoc fixes

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

Hey

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

by travisbot at 2012-06-02T00:30:49Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1504379) (merged 2f0117f2 into 1541fe26).

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

by fabpot at 2012-06-25T14:53:18Z

@adrienbrault Can you have a look at my comments?

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

by adrienbrault at 2012-06-25T16:24:49Z

Done! Sorry for the delay

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

by travisbot at 2012-06-25T17:50:24Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1702850) (merged 9a74b851 into 58436de1).
2012-06-25 22:29:10 +02:00
David Zuelke
34ab4812b5 Fix severity, file and line in ErrorExceptions
Fix `ErrorHandler` only handing an error message to the constructor of
`ErrorException`, but not the severity, file name or line number.
2012-06-25 22:04:54 +02:00
Adrien BRAULT
9a74b851e6 [HttpFoundation] CS and phpdoc fixes 2012-06-25 18:21:41 +02:00
Fabien Potencier
c67cf8b56b [Routing] fixed previous merge 2012-06-25 13:50:03 +02:00
Fabien Potencier
db9a8c1e4e merged branch Crell/routecollection-count (PR #4642)
Commits
-------

c350944 Add the Countable interface to RouteCollection.

Discussion
----------

Add the Countable interface to RouteCollection.

Since RouteCollection is a fancy-pants array of Routes, and it already is iterable, it would be nice if it were also countable.

There may be optimizations to be had here, but I figure this is a decent start.  There should be no BC breaks here, just some DX convenience.

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

by Crell at 2012-06-23T17:01:43Z

You Symfony people and your gratuitous whitespace... :-P

Both fixed and rebased.

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

by travisbot at 2012-06-23T17:25:31Z

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

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

by travisbot at 2012-06-23T17:26:06Z

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

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

by travisbot at 2012-06-23T18:10:57Z

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

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

by mvrhov at 2012-06-24T07:11:12Z

@Crell running [php-cs-fixer](http://cs.sensiolabs.org/) on your changes will prevent you from being stoffed :P about CS

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

by stof at 2012-06-24T09:34:24Z

@mvrhov depends. The CS fixer will replace tabs with 4 spaces, but it will not fix it if using 2 spaces instead of 4. it cannot fix everything

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

by vicb at 2012-06-24T17:14:14Z

@Crell what is your use case ?

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

by fabpot at 2012-06-25T06:59:00Z

I'm not opposed to the change but what's the use case?

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

by lsmith77 at 2012-06-25T11:22:01Z

This is semi related to ideas we have for the dynamic router in the CMF. The 2 main reasons for the existence of the dynamic router are:
1) the fact that end users should be able to define new routes
2) the fact that there might just be too many routes to dump those efficiently to PHP

Now in some cases despite 1) the users might still want to dump key routes or even all routes as part of some deployment process to mod_rewrite or PHP when moving content from a staging database to a production database for better performance and reduced load on the database server.

Also even with the dynamic router it would be good to have tools available like ``app/console router:debug``.

But for both the use case of dumping some/all routes or when listing routes it might be necessary to implement some stop gap solutions to first check if this wouldn't lead to a too big collection. So it could be useful to be able to use whatever efficient solution the dynamic data store has for determining the count before starting to actually read the data from the data source.
2012-06-25 13:27:15 +02:00
Martin Hasoň
8ae0fa2178 [FrameworkBundle] Fixed locale detection from request 2012-06-25 11:49:17 +02:00
everzet
dbeff6979b [TwigBundle] added support for custom loader paths
Before this commit, there was no ability to specify custom
search paths for Twig loader. Lets say we have twig templates
outside bundles directories (parts of the domain logic, not
application) - we want to be able to load them.

This commit adds `loader_paths` parameter to twig config,
which is used to set custom paths to the loader.
2012-06-25 11:36:26 +02:00
Fabien Potencier
03c8d4d2b0 bumped Symfony version to 2.1.0-DEV 2012-06-25 09:25:26 +02:00
Kris Wallsmith
c1e4166ead moved create of default form label to view layer 2012-06-24 07:57:42 -07:00
Tobias Schultze
aeead1c7a7 fix #4643 2012-06-24 16:06:01 +03:00
Larry Garfield
c3509446c1 Add the Countable interface to RouteCollection. 2012-06-23 12:00:40 -05:00
Jonas Flodén
eb26e89625 [FrameworkBundle] Fix built-in server when using query params in paths
$_SERVER['REQUEST_URI'] will contain the query params so is_file will fail.
Change it to use $_SERVER['SCRIPT_NAME'] instead which only contains the
relative filename of the the script.
2012-06-23 13:09:46 +02:00
Fabien Potencier
0d4b02e452 Revert "merged branch everzet/config-additions-from-rw (PR #4619)"
This reverts commit 041286e601, reversing
changes made to 4c8ea3181d.
2012-06-21 19:42:20 +02:00
Fabien Potencier
0f9be2fac4 updated VERSION for 2.1.0 2012-06-21 15:32:16 +02:00
Fabien Potencier
55c6df995f merged 2.0 2012-06-20 21:33:33 +02:00
Fabien Potencier
041286e601 merged branch everzet/config-additions-from-rw (PR #4619)
Commits
-------

241aa92 [Config] added existence check to some resource methods
56b60c8 [Config] use is_file in FileResource::exists()
ff9c132 [Config] added type prefixes to resource ids
ece489f [Config] skip dots in getFilteredChilds() (fixes test suite on Linux)
c9eaa72 [Config] made ResourceInterface extends Serializable
d7c24eb [Config] added new methods and their tests to File and Directory resources
9fe0d00 [Config] update FileResourceTest
45a45ba [Config] updated DirectoryResource tests
1f9ba38 [Config] getFilteredChildResources() method added to DirectoryResource
6b39688 [Config] moved DirectoryResource childs retrieving to the special getFilteredChilds method
45df2e6 [Config] updated resources API to be more explicit

Discussion
----------

[Config] additions from ResourceWatcher

Extracted `Config` component changes from `ResourceWatcher` component.

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

by travisbot at 2012-06-20T08:27:30Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1662786) (merged 241aa92c into 092b5dde).
2012-06-20 21:17:10 +02:00
Fabien Potencier
15ae25b2e2 merged branch Maks3w/patch-4 (PR #4616)
Commits
-------

fa050b7 [Security] Change return value in DocBlock

Discussion
----------

[Security] Change return value in DocBlock

Change the return value for avoid confusions.

```php
if (!$user instanceof UserInterface) {
    throw new AuthenticationServiceException('retrieveUser() must return a UserInterface.');
}
```

[UserAuthenticationProvider.php#L67](https://github.com/symfony/symfony/tree/2.0/src/Symfony/Component/Security/Core/Authentication/Provider/UserAuthenticationProvider.php#L67)

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

by travisbot at 2012-06-19T21:03:07Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1659148) (merged fa050b77 into e78a7bae).
2012-06-20 21:15:34 +02:00
Fabien Potencier
4c8ea3181d merged branch ricbra/dutch_translations (PR #4618)
Commits
-------

8797b74 [Validator] added missing dutch translations

Discussion
----------

[Validator] added missing dutch translations

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

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

by travisbot at 2012-06-20T08:27:17Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1662776) (merged aa0a7e83 into 092b5dde).

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

by ricbra at 2012-06-20T09:55:45Z

@Burgov Thanks for the feedback. Fixed all typos & added PR description according to the documentation on Symfony site.

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

by travisbot at 2012-06-20T09:59:38Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1663352) (merged 8797b743 into 092b5dde).
2012-06-20 21:15:00 +02:00
Victor Berchet
680b83c6d3 [Security] Allow "0" as a password 2012-06-20 20:42:55 +02:00
Douglas Greenshields
d4b0a9caaa [Security] fixed exception message in EncoderFactory 2012-06-20 12:10:08 +01:00
Richard van den Brand
8797b74343 [Validator] added missing dutch translations 2012-06-20 11:43:04 +02:00
everzet
241aa92cc5 [Config] added existence check to some resource methods
* fixed DELETED event when starting to watch a file that does not exist yet
* fixed files that are deleted and then re-created

Conflicts:
	src/Symfony/Component/ResourceWatcher/StateChecker/ResourceStateChecker.php
	tests/Symfony/Tests/Component/ResourceWatcher/StateChecker/DirectoryStateCheckerTest.php
	tests/Symfony/Tests/Component/ResourceWatcher/StateChecker/FileStateCheckerTest.php
2012-06-20 10:19:09 +02:00
everzet
56b60c8d46 [Config] use is_file in FileResource::exists()
file resource existence check shouldn't return true if there's
directory with same name instead of file.
2012-06-20 10:11:30 +02:00
everzet
ff9c1321dc [Config] added type prefixes to resource ids
Makes sure that directory and the file resources
with the same name will have different ids
2012-06-20 10:11:24 +02:00
everzet
ece489f4b9 [Config] skip dots in getFilteredChilds() (fixes test suite on Linux) 2012-06-20 10:11:09 +02:00
Fabien Potencier
c9eaa72e2f [Config] made ResourceInterface extends Serializable 2012-06-20 10:10:34 +02:00
everzet
d7c24eb88a [Config] added new methods and their tests to File and Directory resources 2012-06-20 10:10:27 +02:00
everzet
9fe0d00735 [Config] update FileResourceTest 2012-06-20 10:10:17 +02:00
everzet
45a45baf2f [Config] updated DirectoryResource tests 2012-06-20 10:10:10 +02:00
everzet
1f9ba382ee [Config] getFilteredChildResources() method added to DirectoryResource 2012-06-20 10:10:02 +02:00
everzet
6b39688586 [Config] moved DirectoryResource childs retrieving to the special getFilteredChilds method 2012-06-20 10:09:55 +02:00
everzet
45df2e681e [Config] updated resources API to be more explicit 2012-06-20 10:09:47 +02:00
Maks
fa050b77af [Security] Change return value in DocBlock
Change the return value for avoid confusions.
2012-06-19 23:27:38 +03:00
Fabien Potencier
092b5dde62 merged branch gajdaw/finder_current_fix (PR #4335)
Commits
-------

3eb67fc [2.1][Component][Finder] $this->current() fix

Discussion
----------

[2.1][Component][Finder] $this->current() fix

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/gajdaw/symfony.png?branch=master)](http://travis-ci.org/gajdaw/symfony)
Fixes the following tickets: -
Todo: -
License of the code: MIT

One method to resolve `->in("ftp://...")` problem is to create `RecursiveDirectoryFtpIterator`.
(Details: [issue 3585](https://github.com/symfony/symfony/issues/3585))

I think that all filters should access the information about current item calling `current()` or `getInnerIterator()`. Otherwise it will not work if we replace `RecursiveDirectoryIterator` with ftp iterator inside `Finder`.

I'm not sure if that should go to 2.0 or 2.1 branch.

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

by travisbot at 2012-05-19T09:20:19Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1373361) (merged 9f247921 into 58b92453).

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

by gajdaw at 2012-05-19T10:51:10Z

Probably it should go to master branch, because it improves commit done to master:

f2fea97460

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

by travisbot at 2012-05-19T11:26:14Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1373982) (merged f9d1db8c into 58b92453).

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

by travisbot at 2012-05-19T11:51:25Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1374031) (merged f1b4b4f7 into 58b92453).

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

by travisbot at 2012-05-19T12:48:17Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1374303) (merged b6d073da into 58b92453).

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

by travisbot at 2012-05-19T13:28:18Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1374568) (merged fd144c96 into 58b92453).

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

by travisbot at 2012-05-19T13:35:38Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1374609) (merged 89a8d851 into 58b92453).

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

by travisbot at 2012-05-21T04:31:46Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1385764) (merged 0d5b8322 into 58b92453).

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

by travisbot at 2012-05-21T07:21:56Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1386545) (merged 3eb67fca into 1407f112).

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

by stof at 2012-06-09T13:24:14Z

seems good
2012-06-19 17:16:22 +02:00
Fabien Potencier
55f682c9be merged branch romainneutron/FilesystemExceptions (PR #4330)
Commits
-------

a20fc68 Merge pull request #1 from SamsonIT/FilesystemExceptions
8eca661 [FileSystem] explains possible failure of symlink creation in windows
b1f8744 Add Changelog BC Break note
24eb396 [Filesystem] Added few new behaviors:

Discussion
----------

[Filesystem] Consistence and enhancements for Filesystem

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

This PR adds features and introduce a backward compatibility break.

features :
- whenever an action fails, a \RuntimeException is thrown
- add access to the second and third arguments of ``touch`` function
- add a recursive option for chmod
- add a chown method
- add a chgrp method

The backward compatibility break happens in the mkdir method : Before this PR, a boolean is returned ; true if all directories were created, false otherwise.
It now returns nothing.

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

by travisbot at 2012-05-18T14:26:42Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1367000) (merged 83cdd622 into 1e15f210).

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

by fabpot at 2012-05-20T02:40:28Z

To be consistent, we should throw exception whenever some operation fails.

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

by romainneutron at 2012-05-20T21:10:23Z

I fix the consistency ; mkdir now throws an exception if a directory creation fails.
This introduce a BC break, see PR message which has been updated with all features and BC break.

Added chgrp and chown methods
Add options for touch
Add recursive option for chmod

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

by travisbot at 2012-05-20T21:11:47Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1383619) (merged a4d1eeb8 into 1407f112).

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

by travisbot at 2012-05-22T10:49:06Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1399027) (merged 7e14b6bd into 517ae43f).

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

by travisbot at 2012-05-22T10:58:10Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1399083) (merged 71852653 into 517ae43f).

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

by travisbot at 2012-05-22T11:18:44Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1399194) (merged 7645bad3 into 517ae43f).

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

by travisbot at 2012-05-23T18:21:47Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1414091) (merged b049d5b1 into 517ae43f).

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

by travisbot at 2012-05-23T18:26:19Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1414123) (merged 34903466 into 517ae43f).

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

by travisbot at 2012-05-29T16:07:26Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1467173) (merged b1d1eb2e into adf07f1e).

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

by travisbot at 2012-05-29T16:19:38Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1467261) (merged 42015ffa into adf07f1e).

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

by romainneutron at 2012-06-01T14:30:45Z

Any news about this PR ?

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

by stloyd at 2012-06-08T09:57:39Z

@romainneutron You need to [squash](http://www.silverwareconsulting.com/index.cfm/2010/6/6/Using-Git-Rebase-to-Squash-Commits) your commits, and add more proper message in squashed commit i.e.:

> [Filesystem]  Added few new behaviors:
* whenever an action fails, a `RuntimeException` is thrown
* add access to the second and third arguments of `touch()` function
* add a recursive option for `chmod()`
* add a `chown()` method
* add a `chgrp()` method

> BC break: `mkdir()` function throw exception in case of failture instead of returning Boolean value.

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

by romainneutron at 2012-06-08T10:59:55Z

@stloyd squash done !

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

by travisbot at 2012-06-08T11:26:20Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1565540) (merged 8f55ddb6 into f8e68e58).

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

by travisbot at 2012-06-08T11:41:45Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1566247) (merged 880312b6 into f8e68e58).

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

by romainneutron at 2012-06-09T11:42:24Z

I've added documentation to the Filesystem component : https://github.com/symfony/symfony-docs/pull/1439

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

by travisbot at 2012-06-09T16:47:20Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1577754) (merged 5647ad41 into f8a09db5).

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

by stloyd at 2012-06-13T14:47:31Z

@romainneutron You probably need to rebase your code as some changes were merge into master for `Filesystem`.

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

by romainneutron at 2012-06-13T15:17:31Z

@stloyd rebase OK !

by the way, do you have any idea when/if this PR will be merged ?

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

by travisbot at 2012-06-13T15:20:44Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1611591) (merged c8b86c68 into c07e9163).

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

by fabpot at 2012-06-16T16:40:50Z

You need to add a note about the BC breaks in the CHANGELOG file.

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

by fabpot at 2012-06-16T16:43:20Z

Also, instead of using `\RuntimeException`, I would create a custom exception like we have done in other components (an interface + a RuntimeException that implements the interface and extends \RuntimeException). The exception name can be something like `IOException`.

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

by travisbot at 2012-06-18T10:11:20Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1645757) (merged 925a8234 into 0b8b76bf).

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

by stloyd at 2012-06-18T10:14:52Z

@fabpot Anything blocking merge of this PR ? (tests are failing because of issue in master, not releted to this PR)

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

by romainneutron at 2012-06-18T10:29:20Z

@fabpot @stloyd the latest push was just a rebase push for PR 4577 (https://github.com/symfony/symfony/issues/4577)
I'm currently fixing the Exception and changelog things, I'll push very soon

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

by romainneutron at 2012-06-18T10:44:38Z

@fabpot I've added the exception and the exception interface, add the changelog info

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

by travisbot at 2012-06-18T10:53:34Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1645981) (merged 634d6fb9 into 0b8b76bf).

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

by romainneutron at 2012-06-18T11:08:43Z

As reported by @stloyd the PR is failing due to an issue in the master, I re-push and trig the PR build when this issue is solved

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

by travisbot at 2012-06-18T11:16:58Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1646006) (merged 2f65945a into 0b8b76bf).
2012-06-19 17:08:20 +02:00
Grummfy
fcf7afcab6 fixed phpdoc (closes symfony/ClassLoader#3) 2012-06-19 15:46:22 +02:00
Fabien Potencier
3f44bba01e merged branch ajessu/php54-server-fix (PR #4484)
Commits
-------

d982bac Fix built-in server for PHP > 5.4.1

Discussion
----------

[FrameworkBundle] Fix built-in server command for PHP > 5.4.1

Bug fix: yes
Feature addition: no
Backwards compatibility break: yes
Symfony2 tests pass: yes

License of the code: MIT

The router isn't routing with PHP > 5.4.1, unless you explicitly include the name of the controller.

For the default command: `app/console server:run`

localhost:8000/app_dev.php `Works`
localhost:8000/ `Doesn't work (it used to work on PHP 5.4.0`)

There was a change after PHP 5.4.1 which makes the router from the built-in server command not work, when no resource is specified, as the variable `$_SERVER['SCRIPT_FILENAME']` passes the `isset` check.

Changelog: http://php.net/ChangeLog-5.php#5.4.1
- Implemented #60850 (Built in web server does not set $_SERVER['SCRIPT_FILENAME'] when using router)

The `router` used to rely on the `$_SERVER['SCRIPT_FILENAME']` being set, to return any asset/file if it existed.

This behavior was changed, so that when using PHP's built-in server, the `$_SERVER['SCRIPT_FILENAME']` is now populated with a combination of the document root and the router filename
Patch: https://bugs.php.net/patch-display.php?bug_id=60850&patch=add_router_script_file_name_svr_var&revision=latest)

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

by travisbot at 2012-06-02T09:06:05Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1506479) (merged b85ff7dd into 1541fe26).

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

by ajessu at 2012-06-03T07:16:33Z

Thinking a bit more about this, as I find my solution a bit weird.

I'll do a bit more testing and report back.

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

by fabpot at 2012-06-13T14:30:28Z

Any news on this PR?

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

by travisbot at 2012-06-18T21:20:17Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1650548) (merged d982bac0 into 086ff482).

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

by ajessu at 2012-06-18T21:35:44Z

Updated the solution, and for me, it's ready to be merged now.

I talked about this on Symfony Live with @michal-pipa (the original contributor to this command) and we were trying to avoid touching the filesystem for the check of file existance to skip the server, but I don't think there is any other way (and it's dev mode, it really shouldn't matter much either).

PHP 5.4.1 and up has changed the behavior of `$_SERVER['SCRIPT_FILENAME']` for the built-in server and it's a bit unreliable/ugly to rely on it now.

This fixes the command, it works again for all versions of PHP 5.4.x
A very similar solution was also suggested on internals:
http://news.php.net/php.internals/53870

@michal-pipa any other ideas?

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

by michal-pipa at 2012-06-18T23:14:36Z

I'll take a closer look at this tomorrow.

But I think that you should revert to original behavior and call production front controller by default to be consistent with other servers.

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

by ajessu at 2012-06-19T08:48:17Z

> But I think that you should revert to original behavior and call production front controller by default to be consistent with other servers.

I disagree. This is a development-only server, and thus, the development controller should be called since IMHO it will be the most common use case for the command, development.
If for some reason, someone wants to use their production controller, it's as easy as providing a new router and passing it to the command explicitly.

Let me know if you come up with something else.
2012-06-19 10:56:44 +02:00
Erik Trapman
8eca661c20 [FileSystem] explains possible failure of symlink creation in windows 2012-06-19 09:53:15 +02:00
Arnaud Kleinpeter
60d371bc35 InputDefinition: Fixed unit tests 2012-06-19 00:10:56 +02:00
Arnaud Kleinpeter
c0997634ef InputDefinition: corrected grammar mistakes and added a @throws declaration 2012-06-18 23:37:16 +02:00
Albert Jessurum
d982bac008 Fix built-in server for PHP > 5.4.1 2012-06-18 23:10:49 +02:00
Fabien Potencier
086ff48228 merged branch jcowgill/console-windows-fix (PR #4594)
Commits
-------

bb87a71 [Console] Use 'mode' command to detect terminal size on Windows

Discussion
----------

[Console] Use 'mode' command to detect terminal size on Windows

This PR uses the windows 'mode' command to get the terminal height and width on windows.

I've left in the ANSICON stuff but I'm not sure if that's needed after this.

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

by travisbot at 2012-06-16T10:37:25Z

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

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

by fabpot at 2012-06-16T16:17:24Z

ping @Seldaek

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

by Seldaek at 2012-06-16T17:03:22Z

It's a good addition, but you should still use ANSICON first if it's available. mode returns the buffer size and not the window size, which means the lines are not the real terminal height, but the buffer setting. ANSICON has both informations and hence allows you to be more correct. For columns/width both offer equally good information since the buffer size is not bigger than the window.

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

by fabpot at 2012-06-17T10:41:21Z

Can you squash your commits before I merge? Thanks.

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

by jcowgill at 2012-06-17T13:23:01Z

Yes that's fine.

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

by fabpot at 2012-06-18T12:04:43Z

@jcowgill there are still 3 commits.

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

by jcowgill at 2012-06-18T14:59:51Z

Woops, it's done now
2012-06-18 20:17:56 +02:00
James Cowgill
bb87a71226 [Console] Use 'mode' command to detect terminal size on Windows 2012-06-18 15:58:29 +01:00
Fabien Potencier
faccd25c0f [Security] removed test that fail on PHP 5.3.3 2012-06-18 14:34:17 +02:00
Fabien Potencier
61a9345e6f [Security] fixed some unit tests for PHP 5.3.3 (see https://bugs.php.net/bug.php?id=53727) 2012-06-18 14:22:33 +02:00
Fabien Potencier
d2b612256b merged branch aerialls/profiler_height (PR #4600)
Commits
-------

e113600 [WebProfilerBundle] removed the extra space before the toolbar

Discussion
----------

[WebProfilerBundle] removed the extra space before the toolbar

The profiler toolbar has a height of 38px. This PR removes the (useless) extra space before it.

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

by travisbot at 2012-06-17T22:44:13Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1643364) (merged e1136001 into b27d9b54).
2012-06-18 14:03:39 +02:00
Fabien Potencier
dab9dea633 merged branch asm89/fix-component-testsuites (PR #4602)
Commits
-------

441c098 [HttpKernel] Remove unneeded test class (suggestion by @stof)
e49b714 [Routing] Fix component 'standalone' testsuite
0b0fe74 [HttpKernel] Fix component 'standalone' testsuite
8ff2838 [Form] Fix component 'standalone' testsuite

Discussion
----------

Fix component testsuites

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/asm89/symfony.png?branch=fix-component-testsuites)](http://travis-ci.org/asm89/symfony)
License of the code: MIT

The testsuites of some components would crash when running them seperately (from their own directory for example). This PR fixes that by skipping some additional tests if dependencies for the test aren't met. In the case of `HttpKernel` there was also a helper class in `KernelTest` that is now moved to it's own file. This was needed because the class implemented the `BundleInterface`, which depends on the `DependencyInjection` component. The autoloader would then crash the complete test suite.

I sent this PR to the `master` branch since the tests have been moved and splitted some while ago, before it wasn't really possible to have this situation. If for maintainability reasons it should still be send to the 2.0 branch, let me know!

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

by travisbot at 2012-06-18T08:25:58Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1645386) (merged f9b8ea82 into 0b8b76bf).

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

by travisbot at 2012-06-18T08:46:33Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1645448) (merged 441c0983 into 0b8b76bf).
2012-06-18 14:02:55 +02:00
Romain Neutron
b1f87440c9 Add Changelog BC Break note 2012-06-18 13:46:07 +02:00
Romain Neutron
24eb396f26 [Filesystem] Added few new behaviors:
- add a IOException and a main filesystem exception interface
 - whenever an action fails, an IOException is thrown
 - add access to the second and third arguments of touch() function
 - add a recursive option for chmod()
 - add a chown() method
 - add a chgrp() method
 - Switch the 'unlink' global function in Filesystem::symlink to Filesystem::remove.

BC break: mkdir() function now throws exception in case of failure instead of returning Boolean value.
2012-06-18 12:38:47 +02:00
Alexander
0be11f4d9d [Security] Fix retrieval of encoder when configured for concrete classes 2012-06-18 12:01:09 +02:00
Alexander
024cb91c5b [Security] Add failing testcases for EncoderFactory 2012-06-18 12:00:44 +02:00
Alexander
441c0983f6 [HttpKernel] Remove unneeded test class (suggestion by @stof) 2012-06-18 10:36:28 +02:00
Alexander
e49b714c1e [Routing] Fix component 'standalone' testsuite 2012-06-18 10:32:28 +02:00
Alexander
0b0fe74e93 [HttpKernel] Fix component 'standalone' testsuite
- Missing dependency in one file
- Move helper class out of KernelTest because it implemented an
  interface that depends on another component (thus would crash the
  testsuite if invoked)
2012-06-18 10:32:28 +02:00
Alexander
8ff2838bb8 [Form] Fix component 'standalone' testsuite 2012-06-18 10:32:28 +02:00
Fabien Potencier
0b8b76bfef [Security] allowed class names to be passed as an argument to EncoderFactoryInterface::getEncoder() 2012-06-18 08:12:50 +02:00
Jeanmonod David
9d730be385 Method rename and phpdoc fixes 2012-06-18 06:49:11 +02:00
Eriksen Costa
a609d55c1f [Locale] fixed StubIntlDateFormatter to behave like the ext/intl implementation 2012-06-18 01:41:22 -03:00
Julien Brochet
e11360018d [WebProfilerBundle] removed the extra space before the toolbar 2012-06-18 00:35:49 +02:00
Fabien Potencier
bc147d3492 merged branch aerialls/fs_exists (PR #4586)
Commits
-------

38cad9d [Filesystem] added exists method

Discussion
----------

[Filesystem] added exists method

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

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

by travisbot at 2012-06-15T16:29:20Z

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

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

by sstok at 2012-06-16T09:05:48Z

Shouldn't it be better to stop on the first failure? as all the others files will be false automatically.

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

by stof at 2012-06-16T10:21:49Z

indeed. We should avoid unnecessary filesystem IO by returning false as soon as it is known

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

by aerialls at 2012-06-16T11:55:24Z

Indeed it's better this way. fixed!

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

by travisbot at 2012-06-16T12:01:16Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1634615) (merged 8d98f417 into 76b2ed46).
2012-06-16 18:35:22 +02:00
Fabien Potencier
cd0aa3781b tweaked the previous commit 2012-06-16 18:27:53 +02:00
Fabien Potencier
1ac2e9c217 merged branch shieldo/fix_docblock_typo (PR #4590)
Commits
-------

bfe5e58 [Form] fixed typo in docblock

Discussion
----------

[Form] fixed typo in docblock

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

by travisbot at 2012-06-15T20:03:08Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1630865) (merged bfe5e585 into f881d282).
2012-06-16 18:22:26 +02:00
Fabien Potencier
f65ade24b2 fixed order of translation files registration 2012-06-16 18:09:40 +02:00
Julien Brochet
38cad9d415 [Filesystem] added exists method 2012-06-16 14:10:34 +02:00
Fabien Potencier
76b2ed46d6 moved validator translation files to the Form and Validator components to make them reusable (closes #4588) 2012-06-16 13:31:07 +02:00
Douglas Greenshields
bfe5e5856a [Form] fixed typo in docblock 2012-06-15 20:56:24 +01:00
Tobias Schultze
7464dcd206 added phpdoc 2012-06-15 17:33:40 +02:00
Fabien Potencier
f881d28240 [Validator] avoid to get information from the cache when we already have them locally (also fixes usage of this class when not using a cache) 2012-06-15 17:30:46 +02:00
Tobias Schultze
c413e7ba39 [Routing] remove RequestContextAwareInterface from RequestMatcherInterface 2012-06-15 17:27:49 +02:00
Tobias Schultze
921be34ee7 [Routing] fix phpdoc 2012-06-14 23:15:09 +02:00
Uwe Jäger
3ce8227a9b [Security] Only redirect to urls called with http method GET 2012-06-14 13:45:10 +02:00
Douglas Greenshields
9e71b426c4 [Validator] fixed typo in docblock 2012-06-14 12:25:16 +01:00
Fabien Potencier
6448fd0772 [FrameworkBundle] added a missing attribute in XSD 2012-06-14 11:31:07 +02:00
Christophe Coevoet
0d67b9f25f Removed useless use statements 2012-06-14 09:54:43 +02:00
Christophe Coevoet
a3c1299ac2 [Form] Added a missing use statement and fix a phpdoc 2012-06-14 09:53:49 +02:00
Florin Patan
f72ba0a27d Fixed detection of an active session 2012-06-14 01:48:01 +03:00
Douglas Greenshields
6b5b625a72 [Form] added FormBuilderInterface in Tests namespace, so as to enable easy mocking 2012-06-13 21:21:22 +01:00
Fabien Potencier
c07e9163a6 merged branch SamsonIT/remove_symlink_on_windows (PR #4565)
Commits
-------

fc3ebb8 [FileSystem] added if-windows check
0b58828 [FileSystem] remove symlinks under windows

Discussion
----------

[FileSystem] remove symlinks under windows

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes

When installing assets on Windows with symlink, the following error occurs when symlink-folders already exist. This PR makes sure symlink-folders are removed under Windows.

```
$ app/console assets:install web --symlink
Installing assets using the symlink option
Installing assets for Symfony\Bundle\FrameworkBundle into web/bundles/framework

  [ErrorException]
  Warning: symlink(): Cannot create symlink, error code(1314) in C:\workspace\erik\roompot\vendor\symfony\symfony\src\Symfony\Component\Filesystem\Filesystem.php line 167

assets:install [--symlink] [--relative] target
```

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

by travisbot at 2012-06-13T09:00:42Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1608541) (merged 0b58828b into 37550d23).

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

by travisbot at 2012-06-13T14:39:32Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1611288) (merged fc3ebb8c into 0f67ca88).
2012-06-13 16:41:41 +02:00
Jeanmonod David
e01a95e1ea Add a set of unit tests for the ExprBuilder class 2012-06-13 16:34:46 +02:00
Erik Trapman
fc3ebb8c65 [FileSystem] added if-windows check 2012-06-13 16:33:54 +02:00
Fabien Potencier
0f67ca88c1 [HttpFoundation] fixed StreamedResponse with HEAD as a method (closes #4502) 2012-06-13 16:21:50 +02:00
Fabien Potencier
6efc00d39d merged branch kriswallsmith/head-streamed-response-err (PR #4502)
Commits
-------

280fc05 failing test for HEAD StreamedResponse requests

Discussion
----------

[WIP] failing test for HEAD StreamedResponse requests

An exception is thrown if you prepare a StreamedResponse with a HEAD request. I'm not sure what the right fix is…

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

by kriswallsmith at 2012-06-06T15:51:04Z

The Travis build is here: http://travis-ci.org/#!/symfony/symfony/builds/1543352

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

by sstok at 2012-06-08T11:07:31Z

Well a HEAD can't/shouldn't be streamed as it doesn't contain a body so what is the real problem here?

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

by kriswallsmith at 2012-06-08T16:14:18Z

@sstok the response is prepared by the ResponseListener regardless of request method

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

by adrienbrault at 2012-06-08T19:41:27Z

Shouldn't the test at least assert something ?
2012-06-13 16:17:27 +02:00
Fabien Potencier
6baa2b19c4 merged branch stof/change_typehint (PR #4569)
Commits
-------

92e028f Changed the typehint in the LocaleListener

Discussion
----------

Changed the typehint in the LocaleListener

The listener does not depend on the RouterInterface but only on the
RequestContextAwareInterface which is also implemented by the matcher
and the generator. Changing the typehint allow reusing the listener
in Silex.

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

by travisbot at 2012-06-13T14:12:10Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1611055) (merged 92e028f1 into 1d7501db).
2012-06-13 16:13:52 +02:00
Christophe Coevoet
92e028f1f0 Changed the typehint in the LocaleListener
The listener does not depend on the RouterInterface but only on the
RequestContextAwareInterface which is also implemented by the matcher
and the generator. Changing the typehint allow reusing the listener
in Silex.
2012-06-13 16:06:22 +02:00
Fabien Potencier
1d7501dbc4 merged branch stealth35/fs_micropt (PR #4568)
Commits
-------

abab929 Prevent empty value in isAbsolutePath, use rtrim in mirror

Discussion
----------

Prevent empty value in isAbsolutePath, use rtrim in mirror

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/stealth35/symfony.png?branch=fs_micropt)](http://travis-ci.org/stealth35/symfony)

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

by travisbot at 2012-06-13T13:39:39Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1610607) (merged abab9295 into 3ab9a6ee).
2012-06-13 16:04:04 +02:00
Fabien Potencier
3ab9a6eec5 [Yaml] fixed string parsing (closes #4561) 2012-06-13 14:57:32 +02:00
stealth35
abab929516 Prevent empty value in isAbsolutePath, use rtrim in mirror 2012-06-13 14:39:17 +02:00
Fabien Potencier
c55ddb9276 merged branch merk/patch-2 (PR #4561)
Commits
-------

4ac48d9 Added failing YAML inline string to tests

Discussion
----------

Added failing YAML inline string to tests

#4042 introduced a regression for yaml string parsing starting with a double colon (::). The below configuration syntax no longer works.

The addition to the tests generates a failure:

1) Symfony\Component\Yaml\Tests\InlineTest::testDump
Symfony\Component\Yaml\Exception\ParseException: Malformed inline YAML string ('::form_base.html.twig').

```yaml
# Twig Configuration
twig:
    debug:            %kernel.debug%
    strict_variables: %kernel.debug%
    form:
        resources:
            - '::form_theme.html.twig'
            - 'InfiniteFormBundle::form_theme.html.twig'
```

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

by merk at 2012-06-12T22:15:42Z

For those having this trouble, locking composer at a specific symfony commit is the best option until it is fixed:

```
        "symfony/symfony": "dev-master#3bb7dc0bfa87b2d4db8262be65b5f49cc6a17a9b",
```

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

by travisbot at 2012-06-13T00:44:45Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1605553) (merged 4ac48d9e into 37550d23).
2012-06-13 14:06:46 +02:00
Erik Trapman
0b58828b3f [FileSystem] remove symlinks under windows 2012-06-13 10:40:20 +02:00
Fabien Potencier
f5c99d2421 merged branch Tobion/eager (PR #4562)
Commits
-------

49e9957 added test to ensure matching is eager

Discussion
----------

[Routing] added test to ensure matching is eager

This just adds a passing test that wasn't covered yet, so we don't break this scenario in the future.

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

by travisbot at 2012-06-13T01:04:09Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1605738) (merged 49e99572 into 37550d23).
2012-06-13 08:18:21 +02:00
Tim Nagel
4ac48d9e6c Added failing YAML inline string to tests 2012-06-13 08:07:25 +10:00
Fabien Potencier
37550d23c6 merged branch Burgov/enhance_form_error_message (PR #4557)
Commits
-------

b5cf337 [Form] Enhanced the form error message

Discussion
----------

[Form] Enhanced the form error message

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes

The error message on type mismatch is a bit obscure:

The form's view data is expected to be an instance of class Samson\Bundle\TRSBundle\Entity\Labour, but has the type object. You can avoid this error by setting the "data_class" option to null or by adding a view transformer that transforms object to Samson\Bundle\TRSBundle\Entity\Labour.

This commit changes it to:

The form's view data is expected to be an instance of class Samson\Bundle\TRSBundle\Entity\Labour, but is an instance of class Closure. You can avoid this error by setting the "data_class" option to null or by adding a view transformer that transforms an instance of Closure to an instance of class Samson\Bundle\TRSBundle\Entity\Labour.

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

by travisbot at 2012-06-12T14:04:08Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1601478) (merged 70a15df6 into 77839690).

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

by travisbot at 2012-06-12T14:06:31Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1601507) (merged 12ec4dbd into 77839690).

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

by travisbot at 2012-06-12T14:13:09Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1601517) (merged b5cf337c into 77839690).

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

by bschussek at 2012-06-12T18:21:31Z

👍 Thanks!
2012-06-12 20:26:00 +02:00
Fabien Potencier
ba8333a5b2 merged branch Burgov/builder_getparent_call_fix (PR #4556)
Commits
-------

1e83206 [Form] FormBuilderInterface->getParent() doesn't take any arguments (anymore)

Discussion
----------

[Form] FormBuilderInterface->getParent() doesn't take any arguments (anymore)

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes

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

by travisbot at 2012-06-12T13:43:25Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1601018) (merged 9826ca66 into 77839690).

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

by travisbot at 2012-06-12T13:51:33Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1601030) (merged 1e83206e into 77839690).

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

by bschussek at 2012-06-12T18:21:56Z

👍 Thanks again! :)
2012-06-12 20:25:45 +02:00
Fabien Potencier
28f6c5889b merged branch Seldaek/route-gen (PR #4534)
Commits
-------

31843cf [FrameworkBundle] Add info to config
d5ab4c1 [Routing] Update changelog
bbef65e [Routing] Add strict_parameters option to disable exceptions when a route generation fails due to an invalid parameter

Discussion
----------

[Routing] Add strict_parameters option to disable exceptions on invalid parameters

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

by travisbot at 2012-06-09T15:07:26Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1577025) (merged bbef65e6 into 37678e17).

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

by stof at 2012-06-09T15:43:48Z

Seems good, but you forgot to update the Changelog of the component. Anyway, let's wait for @vicb's review as he knows the Routing component better than me.

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

by Seldaek at 2012-06-09T16:35:56Z

I updated the changelog

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

by travisbot at 2012-06-09T16:38:31Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1577716) (merged d5ab4c1d into 37678e17).

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

by travisbot at 2012-06-11T10:10:37Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1590901) (merged a54e59e4 into 37678e17).

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

by travisbot at 2012-06-11T13:50:21Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1591926) (merged 31843cf0 into 0995b1f2).
2012-06-12 19:58:14 +02:00
Fabien Potencier
ef41e308cc merged branch Tobion/phpdoc (PR #4539)
Commits
-------

680e732 [Routing] fix phpDoc

Discussion
----------

[Routing] fix phpDoc

using inheritdoc where possible and removing api tag when parent interface has one
as requested by stof and fabpot

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

by travisbot at 2012-06-09T16:14:53Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1577508) (merged 0a44632a into f8a09db5).

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

by travisbot at 2012-06-10T19:36:25Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1585766) (merged 680e732a into 7bec0786).
2012-06-12 19:54:37 +02:00
Fabien Potencier
6e524e2863 merged branch jalliot/patch-4 (PR #4544)
Commits
-------

5d55726 [HttpFoundation] Added 308 as a valid redirect code

Discussion
----------

[HttpFoundation] Added 308 as a valid redirect code

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

I think this should go on 2.0 but error code 308 has only been added in master...

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

by lyrixx at 2012-06-09T22:56:32Z

👍

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

by travisbot at 2012-06-10T06:27:18Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1579937) (merged 5d557261 into 6266b72d).
2012-06-12 19:54:09 +02:00
Fabien Potencier
41f48b7e6c merged branch mvrhov/1813_regression (PR #4551)
Commits
-------

5d88255 Authorization header should only be rebuild when Basic Auth scheme is used

Discussion
----------

[Regression fix] Authorization header should only be rebuild when Basic Auth scheme is used

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: fixes regression introduced by #1813
Todo: N/A
License of the code: MIT

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

by travisbot at 2012-06-11T14:40:28Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1592604) (merged cf5ee26a into 27100ba4).

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

by mvrhov at 2012-06-12T06:13:01Z

fixed

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

by travisbot at 2012-06-12T06:14:55Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1598555) (merged 5d88255d into 27100ba4).
2012-06-12 19:52:08 +02:00
Bart van den Burg
b5cf337c9c [Form] Enhanced the form error message
The error message on type mismatch is a bit obscure:

The form's view data is expected to be an instance of class Samson\Bundle\TRSBundle\Entity\Labour, but has the type object. You can avoid this error by setting the "data_class" option to null or by adding a view transformer that transforms object to Samson\Bundle\TRSBundle\Entity\Labour.

This commit changes it to:

The form's view data is expected to be an instance of class Samson\Bundle\TRSBundle\Entity\Labour, but is an instance of Closure. You can avoid this error by setting the "data_class" option to null or by adding a view transformer that transforms an instance of Closure to an instance of Samson\Bundle\TRSBundle\Entity\Labour.
2012-06-12 16:02:18 +02:00
Bart van den Burg
1e83206e1d [Form] FormBuilderInterface->getParent() doesn't take any arguments (anymore) 2012-06-12 15:07:40 +02:00
Fabien Potencier
77839690d9 changed getName() to name on all Reflection* object calls (fixes #4555, refs https://bugs.php.net/bug.php?id=61384) 2012-06-12 14:23:19 +02:00
Fabien Potencier
ba16a51d37 changed getName() to name on all Reflection* object calls (fixes #4555, refs https://bugs.php.net/bug.php?id=61384) 2012-06-12 13:59:42 +02:00
Fabien Potencier
66ff06096c fixed an issue with session mocking in functional tests that do not start with a fresh session instance for each request (Silex for instance) 2012-06-12 10:24:12 +02:00
Fabien Potencier
171eecf679 [HttpFoundation] removed unused variable 2012-06-12 10:01:41 +02:00
Miha Vrhovnik
5d88255d4e Authorization header should only be rebuild when Basic Auth scheme is used 2012-06-12 08:10:53 +02:00
Jordi Boggiano
31843cf0bf [FrameworkBundle] Add info to config 2012-06-11 14:26:01 +02:00
Fabien Potencier
0995b1f28b moved the UserPassword validator from the security bundle to the security component to make it reusable outside the full-stack framework 2012-06-10 21:58:31 +02:00
Fabien Potencier
ea8ccf65ce [TwigBridge] updated composer file 2012-06-10 21:51:29 +02:00
Tobias Schultze
680e732a9e [Routing] fix phpDoc
using inheritdoc where possible and removing api tag when parent interface has one
2012-06-10 21:30:17 +02:00
Fabien Potencier
7bec0786be moved the Security Twig extension to the bridge 2012-06-10 19:01:52 +02:00
l3l0
83ff200e5f [OptionsResolver] Added options resolver tests to improve coverage
[OptionsResolver] Fixed test names and iterator test
2012-06-10 14:54:03 +02:00