Commit Graph

13167 Commits

Author SHA1 Message Date
Fabien Potencier
42d3c4c9ca added support for the X-Forwarded-For header (closes #6982, closes #7000) 2013-02-11 11:50:30 +01:00
Fabien Potencier
6a9c5102b2 fixed the IP address in HttpCache when calling the backend 2013-02-11 11:50:29 +01:00
Fabien Potencier
c5148a1d11 fixed typos in composer.json version constraints 2013-02-11 11:28:56 +01:00
Fabien Potencier
1697b7204c merged branch fabpot/composer-deps (PR #7027)
This PR was merged into the 2.2 branch.

Commits
-------

0e4a1fe updated required versions when depending on the HttpFoundation component
2704705 updated required versions when depending on the HttpKernel component
0a70fe7 updated required versions when depending on the Config component
2f1939b updated required versions when depending on the Form component
719628a updated required versions when depending on the DependencyInjection component
3db311a updated required versions when depending on the Validator component
a671313 updated required versions when depending on the Translation component
289ccfc updated required versions when depending on the Routing component
a742f0a updated required versions when depending on the EventDispatcher component
51857fe updated required versions when depending on the OptionsResolver component
20dfc15 updated required versions when depending on the PropertyAccess component
f971ccf updated required versions when depending on the Security component
da06817 updated required versions when depending on the Templating component
108a8c0 updated required versions when depending on the Stopwatch component
155cccb updated required versions when depending on the Process component
b95184b updated required versions when depending on the Finder component
a5da4a1 updated required versions when depending on the Dom Crawler component
0d74948 use ~2.0 when depending on the Dom Crawler component
d2d4c0a use ~2.1 when depending on the ClassLoader component
4def221 use ~2.0 when depending on the CSS selector component
9b64be2 use ~2.0 when depending on the locale component
c3906a4 updated required versions when depending on the Yaml component

Discussion
----------

Update Composer deps

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Since we adopted Composer in Symfony, we limit the Symfony Components deps for any Symfony Component to the current version of Symfony. That's very limited as for instance, any version of Yaml can be used as a dependency for any other Symfony Component. So, this PR changes the version constraints for dependencies to the largest range possible.

The idea is also to open the range even more when new versions of Symfony comes.

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

by bamarni at 2013-02-08T17:40:41Z

👍 closes #5891

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

by canni at 2013-02-08T23:42:04Z

👍

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

by simensen at 2013-02-09T05:35:41Z

👍

I think this is a great idea but it opens up the potential for internal version conflicts between components. The increased maintenance is probably worth it, though. :)

Several packages on Packagist are currently broken (see #6983) and I think this would fix that. A number of my projects have been forced back to 2.2@RC in favor of staying on 2.3@dev so I'm excited to see this resolved one way or another.

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

by vicb at 2013-02-09T10:06:36Z

Would the right way to fix this issue be semantic versioning ?
2013-02-11 11:09:17 +01:00
Fabien Potencier
a3131882e3 added a proper setter for the templating servicein HInclude 2013-02-10 12:34:10 +01:00
Jakub Zalas
4ce9ac3a27 [EventDispatcher] Added assertion. 2013-02-10 12:26:00 +01:00
Fabien Potencier
ade5de0da1 merged branch vicb/event (PR #7023)
This PR was squashed before being merged into the 2.0 branch (closes #7023).

Commits
-------

87f3db7 [EventDispathcer] Fix removeListener

Discussion
----------

[EventDispathcer] Fix removeListener

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | ~
| License       | MIT
| Doc PR        | ~

Todo

- [x] Add a UT

I won't have time to add a test before next Friday but this PR could save some debugging (especially with Silex & Closures)

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

by vicb at 2013-02-09T23:32:51Z

Probably related to https://bugs.php.net/bug.php?id=62976, I need to do some more investigation - I use 546. anyway the fix is valid for whatever php version.

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

by vicb at 2013-02-10T10:24:46Z

This **is** related to the PHP bug mentioned above, see http://3v4l.org/Q6WKj:

```
Output for 5.3.18 - 5.3.21, 5.4.8 - 5.5.0alpha4
bool(false)

Output for 5.3.0 - 5.3.17, 5.4.0 - 5.4.7
Notice: Object of class Klass could not be converted to int in /in/Q6WKj on line 9
Notice: Object of class Closure could not be converted to int in /in/Q6WKj on line 9
int(0)
```

@fabpot anything more needed to merge this ?

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

by fabpot at 2013-02-10T10:26:52Z

Is it possible to add a test?

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

by vicb at 2013-02-10T10:29:34Z

It is, for php versions < fixed version, I'll do that

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

by vicb at 2013-02-10T10:42:01Z

@fabpot ready Sir !

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

by vicb at 2013-02-10T10:44:35Z

well I can probably add an assert, please wait !
2013-02-10 11:45:08 +01:00
Victor
87f3db780e [EventDispathcer] Fix removeListener 2013-02-10 11:45:08 +01:00
Fabien Potencier
f2258e7ec7 merged branch jakzal/2.2-binary-response-fixes (PR #7032)
This PR was merged into the 2.2 branch.

Commits
-------

381bd7e [HttpFoundation] Added support for partial ranges in the BinaryFileResponse.
d9b9145 [HttpFoundation] Fixed byte ranges in the BinaryFileResponse.

Discussion
----------

2.2 binary response fixes

Fixes two problems described in #6961, related to handling requests with a *Range* header:
* BinaryFileResponse returns wrong number of bytes
* BinaryFileResponse incorrectly handles partial ranges

| Q              | A                                        |
|--------------|--------------------------------|
| Bug fix?          | yes |
|New feature? | no |
|BC breaks?    | no |
|Deprecations? |	no |
|Tests pass? | yes |
|Fixed tickets | #6961 |
|License | MIT |
|Doc PR | n/a |
2013-02-09 19:08:46 +01:00
Jakub Zalas
381bd7e235 [HttpFoundation] Added support for partial ranges in the BinaryFileResponse.
Valid ranges include:
* bytes=0-499
* bytes=500-999
* bytes=-500
* bytes=9500-
* bytes=0-0
2013-02-09 16:41:39 +01:00
Jakub Zalas
d9b91458f1 [HttpFoundation] Fixed byte ranges in the BinaryFileResponse.
According to rfc2616 (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.1)
byte positions are inclusive:

The first-byte-pos value in a byte-range-spec gives the byte-offset of
the first byte in a range. The last-byte-pos value gives the byte-offset
of the last byte in the range; that is, the byte positions specified are
inclusive. Byte offsets start at zero.
2013-02-09 16:41:27 +01:00
Fabien Potencier
0e4a1fe418 updated required versions when depending on the HttpFoundation component 2013-02-08 17:10:58 +01:00
Fabien Potencier
270470596f updated required versions when depending on the HttpKernel component 2013-02-08 17:10:57 +01:00
Fabien Potencier
0a70fe7079 updated required versions when depending on the Config component 2013-02-08 17:10:57 +01:00
Fabien Potencier
2f1939b4a0 updated required versions when depending on the Form component 2013-02-08 17:10:57 +01:00
Fabien Potencier
719628a5ce updated required versions when depending on the DependencyInjection component 2013-02-08 17:10:56 +01:00
Fabien Potencier
3db311a601 updated required versions when depending on the Validator component 2013-02-08 17:10:56 +01:00
Fabien Potencier
a6713136d0 updated required versions when depending on the Translation component 2013-02-08 17:10:56 +01:00
Fabien Potencier
289ccfc724 updated required versions when depending on the Routing component 2013-02-08 17:10:56 +01:00
Fabien Potencier
a742f0a03e updated required versions when depending on the EventDispatcher component 2013-02-08 17:10:55 +01:00
Fabien Potencier
51857feb8b updated required versions when depending on the OptionsResolver component 2013-02-08 17:10:55 +01:00
Fabien Potencier
20dfc15de6 updated required versions when depending on the PropertyAccess component 2013-02-08 17:10:55 +01:00
Fabien Potencier
f971ccf231 updated required versions when depending on the Security component 2013-02-08 17:10:54 +01:00
Fabien Potencier
da068171bb updated required versions when depending on the Templating component 2013-02-08 17:10:54 +01:00
Fabien Potencier
108a8c0117 updated required versions when depending on the Stopwatch component 2013-02-08 17:10:54 +01:00
Fabien Potencier
155cccbe8e updated required versions when depending on the Process component 2013-02-08 17:10:53 +01:00
Fabien Potencier
b95184b834 updated required versions when depending on the Finder component 2013-02-08 17:10:53 +01:00
Fabien Potencier
a5da4a1c9a updated required versions when depending on the Dom Crawler component 2013-02-08 17:10:53 +01:00
Fabien Potencier
0d74948280 use ~2.0 when depending on the Dom Crawler component 2013-02-08 17:10:52 +01:00
Fabien Potencier
d2d4c0a9bb use ~2.1 when depending on the ClassLoader component 2013-02-08 17:10:52 +01:00
Fabien Potencier
4def2219cd use ~2.0 when depending on the CSS selector component
The API is stable and won't change.
2013-02-08 17:10:52 +01:00
Fabien Potencier
9b64be2ee8 use ~2.0 when depending on the locale component
Some methods have been added in 2.1 but none of them are used by the
Symfony components.
2013-02-08 17:10:51 +01:00
Fabien Potencier
c3906a4acb updated required versions when depending on the Yaml component
The API has not changed since 2.0 and won't until 3.0.
2013-02-08 17:10:51 +01:00
Fabien Potencier
63bfd9ef79 [Doctrine] removed usage of the deprecated LoggerInterface in some tests 2013-02-08 17:10:08 +01:00
Fabien Potencier
642c95a631 added Universal* classes in the list of deprecated classes for 3.0 2013-02-08 17:10:00 +01:00
Fabien Potencier
7b8c0c1a73 merged branch mevers47/master (PR #7021)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #7021).

Commits
-------

c9c1ce6 [HttpKernel] exception listener, allow easier overloading of the default behavior

Discussion
----------

[HttpKernel] exception listener, allow easier overloading of the default behavior

Hi Fabien,

This commit you wrote about a month ago helped me to overload the 'logException' method:
1a6c9b3143

Because the logger property was private I could not access it from the subclass. This PR changes both properties: controller and logger from private to public members. So they can be used from 'logException'.
2013-02-08 12:43:40 +01:00
Martijn Evers
c3c9c9ec5b exception listener, allow easier overloading of the default behavior 2013-02-08 12:43:40 +01:00
Igor Wiedler
e0637fa9b7 [DependencyInjection] Add clone for resources which were introduced in 2.1 2013-02-07 23:54:50 +01:00
Fabien Potencier
648527355d Merge branch '2.0' into 2.1
* 2.0:
  [DependencyInjection] Allow frozen containers to be dumped to graphviz
  Add dot character `.` to legal mime subtype regular expression
  [HttpFoundation] fixed the creation of sub-requests under some circumstancies (closes #6923, closes #6936)
2013-02-07 23:54:36 +01:00
Fabien Potencier
8c250bd9c5 merged branch igorw/graphviz-frozen-container-2.0 (PR #7017)
This PR was merged into the 2.0 branch.

Commits
-------

bd0ad92 [DependencyInjection] Allow frozen containers to be dumped to graphviz

Discussion
----------

[DependencyInjection] Allow frozen containers to be dumped to graphviz

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

This PR replaces #7010.
2013-02-07 23:54:18 +01:00
Fabien Potencier
85557619ba [Routing] fixed previous merge 2013-02-07 23:44:42 +01:00
Fabien Potencier
0f8d417fb1 merged branch canni/fix_traceable_matcher (PR #7009)
This PR was merged into the 2.2 branch.

Commits
-------

30b0c37 [Router] Fix TraceableUrlMatcher

Discussion
----------

[BugFix][Router] Fix TraceableUrlMatcher

TraceableUrlMatcher does not take care with new host route features

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #6744
| License       | MIT
| Doc PR        | n/a
2013-02-07 23:44:24 +01:00
Igor Wiedler
bd0ad92559 [DependencyInjection] Allow frozen containers to be dumped to graphviz 2013-02-07 23:33:52 +01:00
Fabien Potencier
180699aa4f merged branch lmcd/abbr-fix (PR #7014)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #7014).

Commits
-------

d043cb4 Fix style for abbr elements in toolbar

Discussion
----------

[WDT] Fix style for abbr elements in toolbar

Styling for `abbr` elements (e.g. dotted underline) weren't being applied unless you were viewing a profile.
2013-02-07 23:19:05 +01:00
Lee McDermott
61aadd6304 Fix style for abbr elements in toolbar 2013-02-07 23:19:05 +01:00
Fabien Potencier
0c63bbdb01 merged branch ludekstepan/fix-di-scope-nesting (PR #6119)
This PR was submitted for the master branch but it was merged into the 2.1 branch instead (closes #6119).

Commits
-------

3b9f763 [DI] Fix 'undefined index' error, when entering scope recursively

Discussion
----------

[DI] Fix 'undefined index' error, when entering scope recursively

Imagine two scopes:

```php
$container = new Container();
$container->addScope(new Scope('foo'));
$container->addScope(new Scope('bar', 'foo'));
```

Enter the same scope twice recursively:

```php
$container->enterScope('foo');
// not entering bar in between
$container->enterScope('foo');
// prints warning: undefined index: bar
// at Symfony/Component/DependencyInjection/Container.php:341
```

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

by fabpot at 2012-11-28T16:30:00Z

The problem exists, but the fix looks wrong to me. We should keep the scoped services even with nested scopes. Right now, and even after your patch, we loose some information.

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

by ludekstepan at 2012-11-28T16:38:05Z

I don't know how to fix properly, the patch above is just a workaround.

Without the patch, it's not possible to simply create a child scope of the "request" scope, because "enterScope" would fail upon every forward between "request" and nested "request" unless "bar" scope was entered prior to forward.

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

by stof at 2012-11-28T16:51:50Z

@fabpot why would it be wrong ? If the nested scope was not active when entering a subrequest, there is simply nothing to save

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

by stloyd at 2013-01-04T18:16:54Z

Any news about this one ? =)

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

by stof at 2013-01-04T18:22:58Z

@fabpot could you explain which info we are loosing ?
2013-02-07 23:17:35 +01:00
Ludek Stepan
83e95586e7 Fix 'undefined index' error, when entering scope recursively 2013-02-07 23:17:35 +01:00
Fabien Potencier
10ed567f60 merged branch adriensamson/issue-7011 (PR #7013)
This PR was merged into the 2.1 branch.

Commits
-------

3615e19 [Security] fixed session creation on login (closes #7011)

Discussion
----------

[Security] fixed session creation on login (closes #7011)

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #7011
| License       | MIT
| Doc PR        | n/a

I fixed the test with UsernamePasswordToken (should start the session) and added a new test without token (should not start session).
2013-02-07 23:05:17 +01:00
Adrien Samson
3615e199d2 [Security] fixed session creation on login (closes #7011) 2013-02-07 21:22:30 +01:00
Dariusz Górecki
30b0c37b68 [Router] Fix TraceableUrlMatcher 2013-02-07 17:30:00 +00:00