Commit Graph

7055 Commits

Author SHA1 Message Date
Bernhard Schussek
6641f3e231 [Validator] Added constraints Optional and Required for the CollectionValidator 2012-01-16 11:30:56 +01:00
Fabien Potencier
efada56312 merged branch pulzarraider/czech_translations_update (PR #3120)
Commits
-------

f69116b czech translations update

Discussion
----------

[FrameworkBundle] Czech translations update

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
2012-01-16 07:46:22 +01:00
Fabien Potencier
5fa0f2d92b merged 2.0 2012-01-16 07:44:08 +01:00
Fabien Potencier
33f68fe821 added a missing use statement 2012-01-16 07:42:19 +01:00
Andrej Hudec
f69116b700 czech translations update 2012-01-16 00:48:18 +01:00
Sebastian Hörl
dd12ff836d CS fix, getConstraints renamed 2012-01-15 13:11:15 +01:00
Sebastian Hörl
09c191136a [Validator] Improved dynamic constraints 2012-01-14 02:24:14 +01:00
Sebastian Hörl
54cb6e458e [Validator] Added dynamic constraints 2012-01-14 02:06:07 +01:00
Fabien Potencier
119a24f016 merged branch makasim/yaml-throw-not-readable (PR #3105)
Commits
-------

7961014 [Yaml][Parser] changes according review
efce640 [Yaml][Parser] throw an exception if not readable

Discussion
----------

[Yaml][Parser] throw an exception if service file not readable.

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

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

by makasim at 2012-01-13T15:49:49Z

 @fabpot done
2012-01-13 22:27:28 +01:00
Kris Wallsmith
d67d419f3c [HttpFoundation] added missing trustProxy condition 2012-01-13 11:05:57 -08:00
Maksim Kotlyar
7961014140 [Yaml][Parser] changes according review 2012-01-13 17:48:38 +02:00
Maksim Kotlyar
efce640a5e [Yaml][Parser] throw an exception if not readable 2012-01-13 10:48:50 +02:00
Fabien Potencier
741859dc47 merged branch canni/user_comparable_interface2 (PR #2927)
Commits
-------

e23d452 Add info about BC Break to CHANGELOG-2.1
d7ffeb5 Add some more tests, and enforce boolean return value of interface implementations.
9d3a49f When method name is `hasUserChanged` the return boolean should be true (to match question semantics) and false when user has not changed, this commits inverts return statements.
c57b528 Add note about `AdvancedUserInterface`.
3682f62 Refactor `isUserChanged` to `hasUserChanged`
56db4a1 Change names to Equatable
680b108 Suggested fixes ;)
9386583 [BC Break][Security] Moved user comparsion logic out of UserInterface As discussed on IRC meetings and in PR #2669 I came up with implementation. This is option2, I think more elegant.

Discussion
----------

[BC Break][Security][Option2] Moved user comparsion logic out of UserInterface

As discussed on IRC meetings and in PR #2669 I came up with implementation.
This is option2, I think more elegant.

BC break: yes
Feature addition: no/feature move
Symfony2 test pass: yes
Symfony2 test written: yes
Todo: decide about naming

[![Build Status](https://secure.travis-ci.org/canni/symfony.png)](http://travis-ci.org/canni/symfony)

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

by schmittjoh at 2011-12-19T19:33:24Z

This looks much better than the previous PR. Thanks!

One thing, we also discussed this on Doctrine, the name "comparable" is used in most programming languages to perform a real compare operation that is ">", "<", or "=". In this case though, we are specifically interested in equality of two objects (we cannot establish a natural order between these objects). Java has no such interface as all objects naturally have an equals() method, .NET uses "Equatable" which looks a bit odd. Not sure if there are better names.

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

by canni at 2011-12-19T19:34:52Z

I think this is best of "both worlds" we have nice full-featured implementation suitable for most, and if someone needs advanced compare logic just implements interface. @stof @schmittjoh, what do you think?

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

by stof at 2011-12-19T19:36:55Z

@canni I already commented on the code, and I agree with @schmittjoh that the naming can be confusing

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

by jmikola at 2011-12-20T17:33:22Z

I don't mean to bikeshed, but I strongly agree with @schmittjoh about implications of "compare". I'm not concerned with the interface name so much as I am with `compareUser()`. Given that this method returns a boolean, I think it's best to prefix it with `is` (e.g. `isSameUser`, `isUserEqualTo`) or `equals` (e.g. `equalsUser`).

In this PR, the Token class is implementing the interface, so I think having "User" in the method name is a good idea. Naturally, if the interface was intended for User classes, we could do without it.

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

by canni at 2011-12-20T19:00:00Z

@jmikola in this PR Token class does not implement any additional interface, and `compareUser` is `private` and used internally. I don't stand still after this names, I'll update PR as soon as some decision about naming will be done.

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

by jmikola at 2011-12-21T02:29:59Z

@canni: My mistake, I got confused between the Token method and interface method, which you've since renamed in canni/symfony@fcfcd1087b.

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

by mvrhov at 2011-12-21T06:09:45Z

hm. Now I'm going to bike shed. Wouldn't the proper function name be hasUserChanged?

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

by stof at 2011-12-21T10:58:38Z

it would probably be bettter. The meaning of ``true`` and ``false`` would then be the opposite of the current ones but this is not an issue IMO as it is a different method

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

by jstout24 at 2011-12-27T18:08:49Z

@canni nice job

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

by fabpot at 2011-12-30T14:59:11Z

The method `isUserChanged()` must be rename. What about `hasUserChanged()` as @mvrhov suggested or `isUserDifferent()`?

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

by canni at 2012-01-02T11:44:05Z

@fabpot done.

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

by fabpot at 2012-01-02T18:13:40Z

The only missing thing I can think of is adding some unit tests.

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

by canni at 2012-01-10T20:16:25Z

@fabpot is there anything more you think that should done in this PR?

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

by stof at 2012-01-10T20:38:46Z

@canni can you rebase your branch ? it conflicts with the current master according to github

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

by canni at 2012-01-10T20:56:55Z

@stof done.

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

by fabpot at 2012-01-12T18:06:00Z

@canni: Can you just add some information in the CHANGELOG and in the UPGRADE file? That's all I need to merge this PR now. Thanks a lot.

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

by canni at 2012-01-12T18:16:32Z

@fabpot done, and no problem :)
2012-01-12 19:26:40 +01:00
Fabien Potencier
a81ab35045 merged branch henrikbjorn/framework-bundle-composer (PR #3100)
Commits
-------

78ce60c Add config as required
10b3cde [FrameworkBundle] Add missing dependency and recommended libraries fixes #3094

Discussion
----------

[FrameworkBundle] Add missing dependency and recommended libraries

Fixes #3094

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

by fabpot at 2012-01-12T17:31:14Z

You forgot the dependency on config? Is it on purpose

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

by henrikbjorn at 2012-01-12T17:39:20Z

the config is recommended package on the DependencyInjection component.

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

by stof at 2012-01-12T17:40:56Z

@henrikbjorn yeah, but it is *required* dependency for FrameworkBundle, not only recommended

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

by henrikbjorn at 2012-01-12T17:41:56Z

well it will install it by default as it is recommended.

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

by stof at 2012-01-12T17:43:05Z

@henrikbjorn yeah, but it will be skipped if the user asks to avoid recommended packages (the flag is not implemented yet IIRC) which would break FrameworkBundle as it requires the component
2012-01-12 18:49:58 +01:00
Fabien Potencier
02a12b2c5c merged branch kriswallsmith/strpos (PR #3097)
Commits
-------

fe62401 optimized string starts with checks

Discussion
----------

optimized string starts with checks

Doing this with strpos() is slightly faster than substr().

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

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

by vicb at 2012-01-11T19:58:27Z

How faster ? even if the string is long and do not contain an occurrence of the sub-string ?
Looks like micro-(not)-optimizations to me.

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

by kriswallsmith at 2012-01-11T20:04:26Z

The difference is about 0.1s when repeated 1M times.

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

by vicb at 2012-01-11T20:08:12Z

% would be better (machine & env independant), what string size, what match offset ?
I personally vote against (`substr` is more meaningful to me and I do not like micro-optims)

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

by kriswallsmith at 2012-01-11T20:12:34Z

I personally consider this a coding standard but don't want to bikeshed here :)

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

by vicb at 2012-01-11T20:28:08Z

I have [tried](https://gist.github.com/1596588) at home.
`strpos ` **is** faster unless you have a very long string, probably because you do not need to create a new string, interesting, thanks for the tip.

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

by Tobion at 2012-01-11T22:40:18Z

I think strpos() is more useful. Say you want to change the string you have to replace 2 variables (the text and the length parameter) when using substr(). It could also introduce bugs when they don't match. With strpos() it's only the text.

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

by robocoder at 2012-01-11T22:43:22Z

alternate micro-optimization that doesn't create a temporary string:
```
strncmp($v, "@", 1) === 0
```

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

by Tobion at 2012-01-11T22:47:12Z

@robocoder probably the fastest solution but needs to be benchmarked
2012-01-12 18:48:45 +01:00
Fabien Potencier
fb3513a50e merged branch kriswallsmith/kernel/unnecessary-regex (PR #3104)
Commits
-------

7f7f82a [HttpKernel] removed unnecessary regex

Discussion
----------

[HttpKernel] removed unnecessary regex

The pattern was also flawed because of the unescaped `.`

```
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
```
2012-01-12 18:47:17 +01:00
Fabien Potencier
c185302c0d merged branch canni/fix_collection_validator (PR #3078)
Commits
-------

7f7c2a7 Add prof-of-concept test, this test will fail without changes in previous commit
253eeba [BugFix][Validator] Fix for PHP incosistent behaviour of ArrayAccess

Discussion
----------

[BugFix][Validator] Fix for PHP incosistent behaviour of ArrayAccess

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

[![Build Status](https://secure.travis-ci.org/canni/symfony.png)](http://travis-ci.org/canni/symfony)

Because PHP function `array_key_exists` is buggy, it works great with native
PHP `ArrayObject` instances, but hand written implementations of `ArrayAccess`
and `Traversable` objects will fail to work with `CollectionValidator`

Tests from second commit are valid use cases, but without this change, they will fail.
2012-01-12 18:45:54 +01:00
Henrik Bjørnskov
78ce60caeb Add config as required 2012-01-12 18:44:23 +01:00
Kris Wallsmith
7f7f82a53e [HttpKernel] removed unnecessary regex
The pattern was also flawed because of the unescaped `.`
2012-01-12 09:33:03 -08:00
Henrik Bjørnskov
10b3cde57b [FrameworkBundle] Add missing dependency and recommended libraries fixes #3094 2012-01-12 12:27:23 +01:00
Henrik Bjørnskov
348a3c61af [TwigBridge] Use reflection to get guess the file path for form resources fixes #3093 2012-01-12 12:23:44 +01:00
Kris Wallsmith
fe62401907 optimized string starts with checks
Doing this with strpos() is slightly faster than substr().
2012-01-11 11:33:56 -08:00
Fabien Potencier
fa1c946140 fixed some phpdoc 2012-01-11 15:52:51 +01:00
Fabien Potencier
b9a14f0411 merged 2.0 2012-01-11 15:47:52 +01:00
Fabien Potencier
7ee2f6da75 fixed some phpdoc 2012-01-11 15:46:50 +01:00
Fabien Potencier
f57615b4a4 merged branch kriswallsmith/form/validator-fix (PR #3082)
Commits
-------

aa58330 [Form] fixed flawed condition

Discussion
----------

[Form] fixed flawed condition

The validate() method always returns an object. The test is whether there are violations in that object.

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

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

by fabpot at 2012-01-10T21:22:10Z

What about removing the if condition altogether?

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

by kriswallsmith at 2012-01-10T21:23:55Z

This way we avoid creating an `ArrayIterator` for no reason.
2012-01-11 08:15:19 +01:00
Fabien Potencier
1b59259c00 merged branch vicb/stopwatch (PR #3088)
Commits
-------

c0ad1ac [HttpKernel] Minor fixes in the Stopwatch

Discussion
----------

[HttpKernel] Minor fixes in the Stopwatch

Not a breakthrough, fixing `'0'` handling at 2 places, some re factoring (fluid interface)
2012-01-11 08:14:28 +01:00
Drak
39f1ecd96d [ClassLoader] Update PSR-0 reference. 2012-01-11 09:27:00 +05:45
Victor Berchet
c0ad1ac170 [HttpKernel] Minor fixes in the Stopwatch 2012-01-10 22:23:16 +01:00
Hugo Hamon
f750e5420e [HttpKernel] removed unused local $event variable in Stopwatch::stopSection() method. 2012-01-10 22:07:40 +01:00
Hugo Hamon
defdac6d0d [DependencyInjection] removed unused private property $parameterBag in ResolveParameterPlaceHoldersPass::process() method. 2012-01-10 22:07:35 +01:00
Hugo Hamon
1ad3d8673b [DependencyInjection] removed unused $compiler local variable in RepeatedPass::process() method. 2012-01-10 22:07:30 +01:00
Hugo Hamon
7088d942ce [DependencyInjection] fixed wrong local variable name in RemoveUnusedDefinitionsPass::process() method. 2012-01-10 22:07:25 +01:00
Hugo Hamon
a7f857da87 [Console] removed unused $position parameter in Shell::autocompleter() method. 2012-01-10 22:07:21 +01:00
Hugo Hamon
ef6297afdb [BrowserKit] removed unused $name variable in CookieJar::allValues() method. 2012-01-10 22:07:07 +01:00
Dariusz Górecki
d7ffeb5844 Add some more tests, and enforce boolean return value of interface implementations. 2012-01-10 21:55:05 +01:00
Dariusz Górecki
9d3a49f065 When method name is hasUserChanged the return boolean should be true
(to match question semantics) and false when user has not changed,
this commits inverts return statements.
2012-01-10 21:55:05 +01:00
Dariusz Górecki
c57b528cca Add note about AdvancedUserInterface. 2012-01-10 21:55:05 +01:00
Dariusz Górecki
3682f62a07 Refactor isUserChanged to hasUserChanged 2012-01-10 21:55:05 +01:00
Dariusz Górecki
56db4a1d26 Change names to Equatable 2012-01-10 21:55:04 +01:00
Dariusz Górecki
680b1086e9 Suggested fixes ;) 2012-01-10 21:55:04 +01:00
Dariusz Górecki
9386583b19 [BC Break][Security] Moved user comparsion logic out of UserInterface
As discussed on IRC meetings and in PR #2669 I came up with implementation.
This is option2, I think more elegant.

BC break: yes
Feature addition: no/feature move
Symfony2 test pass: yes
Symfony2 test written: yes
Todo: feedback needed
2012-01-10 21:54:56 +01:00
Kris Wallsmith
aa58330047 [Form] fixed flawed condition 2012-01-10 09:16:51 -08:00
Kris Wallsmith
753c06761a [FrameworkBundle] added $view['form']->csrfToken() helper 2012-01-10 05:18:23 -08:00
Kris Wallsmith
e1aced89fd [Twig] added {{ csrf_token() }} helper 2012-01-10 05:16:32 -08:00
Dariusz Górecki
253eebad88 [BugFix][Validator] Fix for PHP incosistent behaviour of ArrayAccess
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #2779
Todo: -

Because PHP function `array_key_exists` is buggy, it works great with native
PHP `ArrayObject` instances, but hand written implementations of `ArrayAccess`
and `Traversable` objects will fail to work with `CollectionValidator`
2012-01-10 11:06:00 +01:00
Maerlyn
63e7f95f60 updated hungarian translations 2012-01-10 09:39:04 +01:00
Fabien Potencier
009e6d739e merged branch Seldaek/route_redirect (PR #3074)
Commits
-------

af32590 [FrameworkBundle] Use only _route_params to generate redirect routes

Discussion
----------

[FrameworkBundle] Use only _route_params to generate redirect routes

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

Routes in RedirectController are generated using all request attributes, which is inconvenient since I abuse request attributes to store other things (device types and such) relevant to the app. It renders the RedirectController useless since it adds unrelated query parameters to URLs it creates.
2012-01-10 07:35:44 +01:00
Fabien Potencier
a3ddc8e9b9 merged branch pulzarraider/updated_sk_validator (PR #3072)
Commits
-------

c8bafcf Updated validators.sk.xlf file

Discussion
----------

[FrameworkBundle] Slovak translations updated

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

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

by stof at 2012-01-09T20:33:53Z

can you send the ids below 41 to the 2.0 branch ? Only 42-28 are new for 2.1

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

by pulzarraider at 2012-01-09T20:39:42Z

Done, see #3073.
2012-01-10 07:35:33 +01:00
Fabien Potencier
1cbb041b99 merged branch pulzarraider/updated_sk_validator_2_0 (PR #3073)
Commits
-------

127cf52 Updated validators.sk.xlf file (for Symfony 2.0)

Discussion
----------

[FrameworkBundle] Slovak translations updated

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

This PR is for Symfony 2.0.
2012-01-10 07:35:20 +01:00
Jordi Boggiano
af3259026d [FrameworkBundle] Use only _route_params to generate redirect routes 2012-01-09 21:29:20 +01:00
Andrej Hudec
127cf52d89 Updated validators.sk.xlf file (for Symfony 2.0) 2012-01-09 21:20:15 +01:00
Andrej Hudec
c8bafcfd0f Updated validators.sk.xlf file 2012-01-09 20:57:39 +01:00
Jordi Boggiano
bea7a9c865 [Console] Fix tests on windows 2012-01-09 17:05:16 +01:00
Fabien Potencier
cd77327e9a merged 2.0 2012-01-09 14:01:55 +01:00
Fabien Potencier
caec56fbe3 merged branch inanimatt/2.0 (PR #3068)
Commits
-------

0507840 Prevent parameters from overwriting the template filename.

Discussion
----------

Prevent parameters from overwriting the template filename.

Fixes a potential arbitrary file execution exploit.
2012-01-09 14:01:32 +01:00
Matt Robinson
0507840b67 Prevent parameters from overwriting the template filename.
Fixes a potential arbitrary file execution exploit.
2012-01-09 11:40:00 +00:00
Fabien Potencier
4ad7e0e4dd merged branch Seldaek/console_opts2 (PR #3061)
Commits
-------

c7ab9ba [Console] Allow redefinition of application options descriptions

Discussion
----------

[Console] Allow redefinition of application options descriptions

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

This allows you to redefine an `InputOption` as long as it keeps the same semantic (same default, same name, same alias, same modes). There are two purposes:

- Modifying the description with a more accurate one
- Making sure the option appears in your commands' help

Concrete example: I often want to provide a verbose version of commands. It's an elegant and very common pattern, but I basically can't document what is going to happen if you do `--verbose` since the base Application already defines `--verbose`. Also the `--verbose` option does not appear when you do `console <command> --help`, which means people probably won't think of using that option.
2012-01-09 12:31:41 +01:00
Fabien Potencier
61975a1b3d [Console] tweaked previous merge 2012-01-09 12:22:03 +01:00
Fabien Potencier
4f8f2d4f47 merged branch Seldaek/console_opts (PR #3060)
Commits
-------

7f7b853 [Console] Format simple arrays nicer

Discussion
----------

[Console] Format simple arrays nicer

Minor cosmetic adjustment for simple (i.e. with sequential numeric keys) arrays
2012-01-09 12:15:01 +01:00
Fabien Potencier
2f0afb2b5a fixed CS 2012-01-09 12:13:49 +01:00
Fabien Potencier
e8d1bd2902 merged branch weaverryan/security-phpdoc (PR #3055)
Commits
-------

8ee9161 [Security] Adding more extensive PHPDoc to UserInterface, AdvancedUserInterface and UserProviderInterface

Discussion
----------

More extensive PHPDoc for Security interfaces

Hey guys!

We've started to get into the habit of documenting interfaces and methods in the official docs. I think these things should be omitted from the documentation entirely, and replaced with a link to API docs that rock (I've started doing this already).

This PR just takes some of the details we have in the docs and pushes them back as PHPDoc. I use `@see`, `<code>` and changed a particular `@throws` to have a FQ class name since there's no `use` statement.

Thanks!

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

by weaverryan at 2012/01/07 20:24:15 -0800

Ok, updated and I think it's clearer now.

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

by fabpot at 2012/01/07 23:29:45 -0800

@weaverryan Great! I think that's a really good idea to document interfaces in the API, that makes a lot of sense.

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

by maastermedia at 2012/01/08 02:10:04 -0800

+1 Symfony API needs that atention also, yes. Thank you.

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

by lsmith77 at 2012/01/08 11:45:04 -0800

@fabpot: but then we should also add a list of interfaces to the API http://screencast.com/t/vu4Tljkri0
2012-01-09 12:10:47 +01:00
Fabien Potencier
dc65b3478f merged branch maastermedia/translations (PR #3064)
Commits
-------

10ecaba slovenian validators.xlf updated

Discussion
----------

Validators.sl.xlf updated

PR sent intentionally to symfony:master because of different translations set in translations.XYZ.xlf and translations.XYZ.xliff in current 2.0 branch.
2012-01-09 12:00:40 +01:00
Fabien Potencier
ca8dc87940 merged 2.0 2012-01-09 11:51:30 +01:00
Fabien Potencier
40053bca03 merged branch Seldaek/console_tests_2_0 (PR #3066)
Commits
-------

c9129e5 Fix Console tests on windows

Discussion
----------

Fix Console tests on windows (2.0)

Rebased #3059 on 2.0 - once this is applied I will rebase it again because some of the fixes could not be applied to 2.0.
2012-01-09 11:49:57 +01:00
Hugo Hamon
96425b01f7 [SwiftmailerBundle] harmonized commands descriptions. 2012-01-09 10:05:25 +01:00
Jordi Boggiano
c9129e51fe Fix Console tests on windows 2012-01-09 10:04:20 +01:00
Hugo Hamon
7eb1c436ae [FrameworkBundle] harmonized commands descriptions. 2012-01-09 10:01:34 +01:00
Hugo Hamon
082909417b [DoctrineBundle] harmonized commands descriptions. 2012-01-09 10:01:09 +01:00
Peter Kokot
10ecaba75d slovenian validators.xlf updated 2012-01-09 09:15:10 +01:00
Fabien Potencier
21993aa670 merged branch Tobion/assert-fix (PR #3063)
Commits
-------

1728493 made the assertions in the RequestTest more explicit and improved PHPDoc

Discussion
----------

made the assertions in the RequestTest more explicit and improved PHPDoc

as discussed in 4f1edb50d8 (comments)
2012-01-09 08:09:34 +01:00
Tobias Schultze
17284937f6 made the assertions in the RequestTest more explicit and improved PHPDoc 2012-01-09 06:33:53 +01:00
Peter Kokot
620a354026 slovenian translations updated 2012-01-09 03:02:36 +01:00
Jordi Boggiano
c7ab9ba7ec [Console] Allow redefinition of application options descriptions 2012-01-09 00:42:35 +01:00
Jordi Boggiano
7f7b853d79 [Console] Format simple arrays nicer 2012-01-09 00:03:43 +01:00
Eric Clemmons
85bf553cca GetSetMethodNormalizer uses lcfirst instead of strtolower when computing method names 2012-01-08 13:55:41 -08:00
Fabien Potencier
8ce034fae0 Revert "merged 2.0"
This reverts commit 7000e944fd, reversing
changes made to 9d9013d662.
2012-01-08 20:43:02 +01:00
Ryan Weaver
8ee9161e6b [Security] Adding more extensive PHPDoc to UserInterface, AdvancedUserInterface and UserProviderInterface 2012-01-07 22:23:05 -06:00
Fabien Potencier
561cde7743 merged branch digitalkaoz/bugfix_2730_v4 (PR #3052)
Commits
-------

9441c46 [DependencyInjection] PhpDumper, fixes #2730

Discussion
----------

[DependencyInjection] PhpDumper, fixes #2730

Hey, this PR fixes #2730, if no parameters are set, the constructor wont get passed a ParameterBag

Bug fix: yes (#2730)
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes

3rd and last try ;) this time i think its all fine
2012-01-07 16:41:16 +01:00
Dariusz Górecki
3702541b5a Add tests 2012-01-07 16:30:46 +01:00
Dariusz Górecki
4f38b14e7d Remove elseif 2012-01-07 15:13:48 +01:00
Dariusz Górecki
3d20e399e9 [Form] Enable empty root form name
BC Break: no
Feature addition: yes
Symfony2 tests pass: yes
Fixes the following issues: #2790
Todo: need more testing

This PR enables usage of empty string as a form name (only at root level).
2012-01-07 15:13:48 +01:00
Christophe Coevoet
9bc41d00d1 [HttpFoundation] Fixed #3053 2012-01-07 14:27:33 +01:00
digitalkaoz
9441c46bb6 [DependencyInjection] PhpDumper, fixes #2730 2012-01-06 21:20:08 +01:00
Fabien Potencier
3e9d937eb8 updated VERSION for 2.0.9 2012-01-06 07:49:25 +01:00
Fabien Potencier
5b566f84b6 merged branch antonbabenko/master (PR #2995)
Commits
-------

1cd74ec Added norwegian translations of validators

Discussion
----------

Added norwegian translations of validators

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

by stof at 2011/12/29 10:14:43 -0800

Can you send a PR to the 2.0 branch instead of master to add these translation for the ids 1 to 41 (missing in your PR btw) ? and then another PR to master for the ids 42 to 48 which are new for 2.1 ?

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

by antonbabenko at 2011/12/29 10:59:39 -0800

Ok, will do, but where can I find the correct original one ? I took german file as the most complete. Some languages have different amount of phrases and sources.

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

by javiereguiluz at 2011/12/29 11:23:04 -0800

@antonbabenko you can use the Spanish translation as an example (it was updated very recently and I initially made the same mistake ;) ):

  * #2968 for 2.0 branch (added id 41)
  * #2969 for master branch (added ids 42 - 48)

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

by antonbabenko at 2011/12/29 11:28:03 -0800

Thanks Javier.
2012-01-06 04:21:06 +01:00
Fabien Potencier
0492290a3b [Console] added a missing method (closes #3043) 2012-01-06 04:12:25 +01:00
Tobias Schultze
daee68a54e fixed typos and unified PHPDoc in the Response class 2012-01-05 23:17:04 +01:00
Fabien Potencier
3e24636904 merged branch justinrainbow/2_0_framework_bundle_fix (PR #3039)
Commits
-------

7c8bd3d [FrameworkBundle] Invalid composer ref fix

Discussion
----------

[FrameworkBundle] Invalid composer ref fix

Changes the `composer.json` reference in the FrameworkBundle to use the `symfony/translation` package rather than the current `symfony/translator` (which doesn't exist).
2012-01-05 17:11:25 +01:00
Justin Rainbow
7c8bd3d917 [FrameworkBundle] Invalid composer ref fix
The composer.json was referencing a "symfony/translator" package
which does not exist.  This has been updated to use the
"symfony/translation" package.
2012-01-05 09:00:58 -07:00
Fabien Potencier
85a5f1533b fixed previous merge 2012-01-05 14:55:00 +01:00
Fabien Potencier
7000e944fd merged 2.0 2012-01-05 14:54:04 +01:00
Fabien Potencier
208c2e468c removed the version attribute in all composer.json files 2012-01-05 14:51:20 +01:00
Fabien Potencier
2a33fbdd16 merged branch tystr/sanitize_queries_fix (PR #3032)
Commits
-------

261325d Cast $query['params'] to array to ensure it is a valid argument for the foreach.

Discussion
----------

[DoctrineBridge] Account for $query['params'] being null in DoctrineDataCollector's sanitizeQueries method

I was getting this error because inside the sanitizeQueries method of DoctrineDataCollector, there's no handling for $query['params'] being null.

ErrorException: Warning: Invalid argument supplied for foreach() in .../vendor/symfony/src/Symfony/Bridge/Doctrine/DataCollector/DoctrineDataCollector.php line 91
2012-01-05 14:36:06 +01:00
Fabien Potencier
9d9013d662 merged branch franmomu/patch-1 (PR #3033)
Commits
-------

0ed3497 [FrameworkBundle][translations] Updated Catalan translation

Discussion
----------

[FrameworkBundle][translations] Updated Catalan translation

Added some translations

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

by stof at 2012/01/04 19:14:29 -0800

Can you send the trans-unit 41 to the 2.0 branch as it is already part of the 2.0 release (ids 42 and above are new for 2.1)

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

by franmomu at 2012/01/05 00:53:49 -0800

Of course, I didn't realize
2012-01-05 14:29:56 +01:00
Fabien Potencier
7572cfa95a merged 2.0 2012-01-05 14:29:25 +01:00
Fran Moreno
d0c54e1856 [FrameworkBundle][translations] Updated Catalan translation 2012-01-05 10:07:52 +01:00
franmomu
0ed3497eca [FrameworkBundle][translations] Updated Catalan translation 2012-01-05 02:42:39 +01:00
Tyler Stroud
261325d33c Cast $query['params'] to array to ensure it is a valid argument for the foreach.
This prevents errors if $query['params'] is null
2012-01-04 12:23:42 -08:00
stealth35
f4890c24f9 [Translation] Po/MoFileLoader parse plurization rules 2012-01-03 18:44:44 +01:00
Igor Wiedler
83c23ca0be [streaming] Do not set a Transfer-Encoding header of chunked
Apache expects the response to already be in chunked format in that case,
which causes it to not deliver the streamed body.

If no Content-Length is set on the response, web servers will automatically
switch to chunked Transfer-Encoding, and handle the chunking for you.

Nginx does not share the issue that apache has, but will add the Content-
Length header too.
2012-01-02 19:50:39 +01:00
Fabien Potencier
5f959e3e6f merged branch henrikbjorn/security-extension-check-path (PR #3005)
Commits
-------

c37c145 [SecurityBundle] Only throw exception if check_path looks like an url

Discussion
----------

[SecurityBundle] Only throw exception if check_path looks like an url

fixes #2954 and enables the usage of route names like you can in all other paths
2012-01-02 19:16:50 +01:00
Fabien Potencier
dcf209a4aa [DoctrineBundle] removed the bundle (migrated to the Doctrine organization) 2012-01-02 18:07:52 +01:00
Fabien Potencier
d3ab39d3b6 merged branch rouffj/propel-extension (PR #3011)
Commits
-------

20f96bd Fix CS
2f47cca [Propel1] Add a PropelExtension

Discussion
----------

[Propel1] Add a PropelExtension

The propel extension allow to use propel specific type (ModelType) outside of
Symfony2.

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

by rouffj at 2012/01/01 15:36:10 -0800

@Stof Fixed :).

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

by willdurand at 2012/01/02 07:38:22 -0800

👍
2012-01-02 17:51:14 +01:00
Fabien Potencier
ce6399e254 [TwigBridge] added a way to specify a default domain for a Twig template (via the 'trans_default_domain' tag)
Note that the tag only influences the current templates. It has no effect on included files to avoid unwanted side-effects.
2012-01-02 17:48:19 +01:00
Fabien Potencier
2a5758f082 [TwigBridge] allow the domain translation to be null when calling the trans and transchoice filters (to allow passing a locale without hardcoding the messages domain) 2012-01-02 17:10:27 +01:00
Fabien Potencier
7424e62d67 [TwigBridge] moved the default value for the translation domain to the Node compilation (allows to know when a domain has been provided by the user) 2012-01-02 17:09:43 +01:00
Fabien Potencier
c73e034229 [TwigBridge] added missing transchoice filters whe extracting translations from templates 2012-01-02 17:08:10 +01:00
Fabien Potencier
789d5ad20f [FrameworkBundle] allowed attributes of the render() method to be arrays 2012-01-02 16:31:32 +01:00
Fabien Potencier
cadf3d4243 [HttpKernel] fixed doubled results for the file profiler (closes #2915) 2012-01-02 12:10:17 +01:00
Fabien Potencier
254e49b47c [FrameworkBundle] removed the possibility to pass a non-scalar attributes when calling render() to make the call works with or without a reverse proxy (closes #2941) 2012-01-02 11:47:41 +01:00
Joseph Rouff
20f96bd49d Fix CS 2012-01-02 00:34:34 +01:00
Joseph Rouff
2f47ccab9c [Propel1] Add a PropelExtension
The propel extension allow to use propel specific type (ModelType) outside of
Symfony2.
2012-01-02 00:25:31 +01:00
Peter Kokot
fae715798a slovenian validators translations correction 2012-01-01 20:48:21 +01:00
Fabien Potencier
1e2d1a3406 [WebProfilerBundle] fixed some bugs 2011-12-31 16:35:58 +01:00
Fabien Potencier
66a18f3239 [BrowserKit] first attempt at fixing CookieJar (closes #2209) 2011-12-31 16:32:51 +01:00
Fabien Potencier
b46114a0f6 [WebProfilerBundle] moved the computation of the Router panel at runtime 2011-12-31 15:53:13 +01:00
Fabien Potencier
3d5ecc0478 [HttpKernel] added the path info in the request data collector 2011-12-31 15:51:33 +01:00
Fabien Potencier
e462f7b668 [Templating] simplified PhpEngine as it cannot implements the streaming interface 2011-12-31 14:50:33 +01:00
Fabien Potencier
6c6d91ed74 fixed typo 2011-12-31 10:50:19 +01:00
Fabien Potencier
899e252032 merged branch symfony/streaming (PR #2935)
Commits
-------

887c0e9 moved EngineInterface::stream() to a new StreamingEngineInterface to keep BC with 2.0
473741b added the possibility to change a StreamedResponse callback after its creation
8717d44 moved a test in the constructor
e44b8ba made some cosmetic changes
0038d1b [HttpFoundation] added support for streamed responses

Discussion
----------

[HttpFoundation] added support for streamed responses

To stream a Response, use the StreamedResponse class instead of the
standard Response class:

    $response = new StreamedResponse(function () {
        echo 'FOO';
    });

    $response = new StreamedResponse(function () {
        echo 'FOO';
    }, 200, array('Content-Type' => 'text/plain'));

As you can see, a StreamedResponse instance takes a PHP callback instead of
a string for the Response content. It's up to the developer to stream the
response content from the callback with standard PHP functions like echo.
You can also use flush() if needed.

From a controller, do something like this:

    $twig = $this->get('templating');

    return new StreamedResponse(function () use ($templating) {
        $templating->stream('BlogBundle:Annot:streamed.html.twig');
    }, 200, array('Content-Type' => 'text/html'));

If you are using the base controller, you can use the stream() method instead:

    return $this->stream('BlogBundle:Annot:streamed.html.twig');

You can stream an existing file by using the PHP built-in readfile() function:

    new StreamedResponse(function () use ($file) {
        readfile($file);
    }, 200, array('Content-Type' => 'image/png');

Read http://php.net/flush for more information about output buffering in PHP.

Note that you should do your best to move all expensive operations to
be "activated/evaluated/called" during template evaluation.

Templates
---------

If you are using Twig as a template engine, everything should work as
usual, even if are using template inheritance!

However, note that streaming is not supported for PHP templates. Support
is impossible by design (as the layout is rendered after the main content).

Exceptions
----------

Exceptions thrown during rendering will be rendered as usual except that
some content might have been rendered already.

Limitations
-----------

As the getContent() method always returns false for streamed Responses, some
event listeners won't work at all:

* Web debug toolbar is not available for such Responses (but the profiler works fine);
* ESI is not supported.

Also note that streamed responses cannot benefit from HTTP caching for obvious
reasons.

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

by Seldaek at 2011/12/21 06:34:13 -0800

Just an idea: what about exposing flush() to twig? Possibly in a way that it will not call it if the template is not streaming. That way you could always add a flush() after your </head> tag to make sure that goes out as fast as possible, but it wouldn't mess with non-streamed responses. Although it appears flush() doesn't affect output buffers, so I guess it doesn't need anything special.

When you say "ESI is not supported.", that means only the AppCache right? I don't see why this would affect Varnish, but then again as far as I know Varnish will buffer if ESI is used so the benefit of streaming there is non-existent.

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

by cordoval at 2011/12/21 08:04:21 -0800

wonder what the use case is for streaming a response, very interesting.

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

by johnkary at 2011/12/21 08:19:48 -0800

@cordoval Common use cases are present fairly well by this RailsCast video: http://railscasts.com/episodes/266-http-streaming

Essentially it allows faster fetching of web assets (JS, CSS, etc) located in the &lt;head>&lt;/head>, allowing those assets to be fetched as soon as possible before the remainder of the content body is computed and sent to the browser. The end goal is to improve page load speed.

There are other uses cases too like making large body content available quickly to the service consuming it. Think if you were monitoring a live feed of JSON data of newest Twitter comments.

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

by lsmith77 at 2011/12/21 08:54:35 -0800

How does this relate the limitations mentioned in:
http://yehudakatz.com/2010/09/07/automatic-flushing-the-rails-3-1-plan/

Am I right to understand that due to how twig works we are not really streaming the content pieces when we call render(), but instead the entire template with its layout is rendered and only then will we flush? or does it mean that the render call will work its way to the top level layout template and form then on it can send the content until it hits another block, which it then first renders before it continues to send the data?

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

by stof at 2011/12/21 09:02:53 -0800

@lsmith77 this is why the ``stream`` method calls ``display`` in Twig instead of ``render``. ``display`` uses echo to print the output of the template line by line (and blocks are simply method calls in the middle). Look at your compiled templates to see it (the ``doDisplay`` method)
Rendering a template with Twig simply use an output buffer around the rendering.

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

by fabpot at 2011/12/21 09:24:33 -0800

@lsmith77: We don't have the Rails problem thanks to Twig as the order of execution is the right one by default (the layout is executed first); it means that we can have the flush feature without any change to how the core works. As @stof mentioned, we are using `display`, not `render`, so we are streaming your templates for byte one.

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

by fabpot at 2011/12/21 09:36:41 -0800

@Seldaek: yes, I meant ESI with the PHP reverse proxy.

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

by fabpot at 2011/12/21 09:37:34 -0800

@Seldaek: I have `flush()` support for Twig on my todo-list. As you mentioned, It should be trivial to implement.

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

by fzaninotto at 2011/12/21 09:48:18 -0800

How do streaming responses deal with assets that must be called in the head, but are declared in the body?

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

by fabpot at 2011/12/21 09:52:12 -0800

@fzaninotto: What do you mean?

With Twig, your layout is defined with blocks ("holes"). These blocks are overridden by child templates, but evaluated as they are encountered in the layout. So, everything works as expected.

As noted in the commit message, this does not work with PHP templates for the problems mentioned in the Rails post (as the order of execution is not the right one -- the child template is first evaluated and then the layout).

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

by fzaninotto at 2011/12/21 10:07:35 -0800

I was referring to using Assetic. Not sure if this compiles to Twig the same way as javascript and stylesheet blocks placed in the head - and therefore executed in the right way.

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

by fabpot at 2011/12/21 10:34:59 -0800

@Seldaek: I've just added a `flush` tag in Twig 1.5: 1d6dfad4f5

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

by catchamonkey at 2011/12/21 13:29:22 -0800

I'm really happy you've got this into the core, it's a great feature to have! Good work.
2011-12-31 08:12:02 +01:00
Fabien Potencier
887c0e9c04 moved EngineInterface::stream() to a new StreamingEngineInterface to keep BC with 2.0 2011-12-31 08:11:20 +01:00
Henrik Bjørnskov
c37c14528e [SecurityBundle] Only throw exception if check_path looks like an url 2011-12-30 20:00:08 +01:00
Fabien Potencier
d12f5b202c [Routing] removed trailing slash support for routes that are not available for GET/HEAD methods (as the redirection will always occurs with a GET/HEAD request, closes #2626) 2011-12-30 19:30:23 +01:00
Fabien Potencier
eef8a3c513 [FrameworkBundle] changed the implementation of Controller::getUser() to be similar to the one from GlobalVariables::getUser() 2011-12-30 16:15:28 +01:00
Fabien Potencier
a78437bba9 Revert "merged branch kriswallsmith/security/demeter-fix (PR #2816)"
This reverts commit 76ba2bc7ac, reversing
changes made to 4730f4303b.
2011-12-30 16:05:26 +01:00
Fabien Potencier
466a8b8f48 Merge branch '2.0'
* 2.0:
  [Tests] Skip segfaulting form test
  Rename test file
  [BrowserKit] added missing @return PHPDoc for the Client::submit() method.
  also test PHP 5.3.2, since this is the official lowest supported PHP version
2011-12-30 15:44:05 +01:00
alefranz
de9d7d8c3c Updated italian traslation of validator 2011-12-29 20:56:01 +01:00
Anton Babenko
1cd74ec2cd Added norwegian translations of validators 2011-12-29 18:21:01 +01:00
Hugo Hamon
885fa02871 [BrowserKit] added missing @return PHPDoc for the Client::submit() method. 2011-12-29 15:00:40 +01:00
Fabien Potencier
23e04e3acb merged 2.0 2011-12-29 09:22:11 +01:00
Fabien Potencier
a01eee8536 merged branch ericclemmons/2884-parameterbag-with-spaces (PR #2976)
Commits
-------

85ca8e3 ParameterBag no longer resolves parameters that have spaces.
99011ca Added tests for ParameterBag parameters with spaces

Discussion
----------

[DependencyInjection] Parameters with spaces are not resolved

Bug fix: yes
Feature addition: no
Backwards compatibility break: no (not likely, according to convention)
Symfony2 tests pass: yes
Fixes the following tickets: #2884

`ParameterBag` currently resolves anything between two `%` signs, which creates issues for any parameters in the DIC that are legitimate text.  This PR enforces the [documented parameter convention](http://symfony.com/doc/2.0/book/service_container.html#service-parameters) so that only `%parameters.with.no_spaces%` are resolved.

I was considering using instead `^%([^\w\._-]+)%$`, but felt that was too constricting & could easily introduce issues with existing applications.
2011-12-28 21:36:04 +01:00
Fabien Potencier
cab70f4083 merged 2.0 2011-12-28 20:44:29 +01:00
Fabien Potencier
48203fc1a2 merged branch havvg/patch-1 (PR #2957)
Commits
-------

41950a6 [WebProfilerBundle] add margin-bottom to caption

Discussion
----------

[WebProfilerBundle] add margin-bottom to caption

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

by fabpot at 2011/12/26 13:15:57 -0800

What does it fix?

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

by havvg at 2011/12/27 02:46:16 -0800

Just a minor design issue with table captions.

Without: http://dl.dropbox.com/u/548684/PR2957/without-margin.png
With: http://dl.dropbox.com/u/548684/PR2957/with-margin.png

I currently hold it in a custom css, but thought it is generic enough to be put into the bundle.

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

by henrikbjorn at 2011/12/27 04:03:53 -0800

@havvg What custom bundle is that ? and what does it show? look interesting

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

by havvg at 2011/12/27 04:40:18 -0800

@henrikbjorn It's a bundle (not published yet, https://github.com/havvg/HavvgCloudcontrolBundle) adding features to fully utilize applications on http://cloudcontrol.com PaaS.
2011-12-28 20:42:42 +01:00
Fabien Potencier
6c96ccef4f merged branch javiereguiluz/phpdoc-console-component (PR #2978)
Commits
-------

3f2e1b0 [Console] Updated tests to reflect the change from `program` to `application`
2b64944 [Console][Output] Fixed some minor typos and grammatical errors
96997f1 [Console][Input] Added missing PHPDoc and fixed some minor typos and grammatical errors
855b8af [Console][Helper] Added missing PHPDoc and fixed some minor typos and grammatical errors
3ad02bd [Console][Formatter] Added missing PHPDoc @throws and fixed some minor typos and grammatical errors
33e3f11 [Console] Added a missing PHPDoc and replaced `program` by `application`

Discussion
----------

[Console] Fixed and completed PHPDoc

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

Fixes the following tickets: -

* Fixed minor typos and grammatical errors
* Added missing PHPDoc for some methods
* Added missing @throws
2011-12-28 20:38:46 +01:00
Fabien Potencier
15d72733ef merged branch mshtukin/master (PR #2979)
Commits
-------

1bc10e5 Forgotten </trans-unit> tag added

Discussion
----------

Forgotten </trans-unit> tag added

on src/Symfony/Bundle/FrameworkBundle/Resources/translations/validators.es.xlf
2011-12-28 20:38:29 +01:00
Javier López
60f845f518 'for' was duplicated 2011-12-28 16:35:20 +00:00
Michael
1bc10e5375 Forgotten </trans-unit> tag added 2011-12-28 14:15:50 +02:00
Javier Eguíluz
2b64944fd7 [Console][Output] Fixed some minor typos and grammatical errors 2011-12-28 10:42:15 +01:00
Javier Eguíluz
96997f12d6 [Console][Input] Added missing PHPDoc and fixed some minor typos and grammatical errors 2011-12-28 10:39:14 +01:00
Javier Eguíluz
855b8af776 [Console][Helper] Added missing PHPDoc and fixed some minor typos and grammatical errors 2011-12-28 10:33:49 +01:00
Javier Eguíluz
3ad02bd5f9 [Console][Formatter] Added missing PHPDoc @throws and fixed some minor typos and grammatical errors 2011-12-28 10:29:22 +01:00
Javier Eguíluz
33e3f11f48 [Console] Added a missing PHPDoc and replaced program by application 2011-12-28 10:22:28 +01:00
Eric Clemmons
85ca8e3615 ParameterBag no longer resolves parameters that have spaces.
They must be strictly "%some.parameter%" or similar.
2011-12-27 12:49:22 -08:00
Fabien Potencier
e10448e9ea Merge branch '2.0'
* 2.0:
  [TwigBridge] changed composer.json max version for Twig
  use the forward compat version in the Filesystem service
2011-12-27 12:11:56 +01:00
Fabien Potencier
c92d75f6dd [TwigBridge] changed composer.json max version for Twig 2011-12-27 12:11:50 +01:00
Fabien Potencier
b254851e91 merged branch lsmith77/forward_compat_filesystem (PR #2971)
Commits
-------

aacb2de use the forward compat version in the Filesystem service

Discussion
----------

use the forward compat version in the Filesystem service

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

by changing the service it should fix any type hints for the Filesystem class inside 2.1, but it shouldn't affect anyone still type hinting the old location in 2.0 since the new forward compat file extends the old file.

See
00c988bf0c (commitcomment-820879)

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

by tobiassjosten at 2011/12/26 18:41:45 -0800

👍
2011-12-27 10:01:26 +01:00
lsmith77
aacb2deb20 use the forward compat version in the Filesystem service 2011-12-27 00:32:17 +01:00
Fabien Potencier
228f3fc540 merged branch webfactory/tolerant_esi_include (PR #2952)
Commits
-------

cae7db0 Be more tolerant and also accept <esi:include ...></esi:include>, also if it is not 100% standards compliant.

Discussion
----------

Be more tolerant and also accept <esi:include ...></esi:include>

I know this is not 100% standards compliant, but:

We need to do some XHTML processing on the output using PHP's DOM extension and the underlying libxml2.

libxml2 seems to be unable to keep the <esi:include /> tag as such and will expand it to ```<esi:include ...></esi:include>```.

Note this has nothing to do with having LIBXML_NOEMPTYTAG set (http://php.net/manual/de/domdocument.savexml.php). Rather it seems to be a problem for libxml that it cannot recognize <esi:include> as an "EMPTY" tag (in the DTD sense) because it is not defined in a standard xhtml1-strict DTD.
2011-12-26 22:30:23 +01:00
Fabien Potencier
8282cd9f66 reverted wrong CD fix 2011-12-26 22:17:17 +01:00