Commit Graph

11888 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
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
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
Igor Wiedler
bd0ad92559 [DependencyInjection] Allow frozen containers to be dumped to graphviz 2013-02-07 23:33:52 +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
Fabien Potencier
7a35cb7c3b merged branch romainneutron/file-binary-guesser (PR #7006)
This PR was merged into the 2.0 branch.

Commits
-------

a12744e Add dot character `.` to legal mime subtype regular expression

Discussion
----------

[HttpFoundation][2.0] Add dot character `.` to legal mime subtype regular expression

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

For example, the following mimetype (used for Microsoft powerpoints) is not recognized given the current regexp : `application/vnd.ms-powerpoint; charset=binary`
2013-02-07 17:36:12 +01:00
Romain Neutron
a12744e30e Add dot character . to legal mime subtype regular expression 2013-02-07 17:24:12 +01:00
Fabien Potencier
4b30ae66d5 merged branch fabpot/request-uti-fix (PR #6966)
This PR was merged into the 2.0 branch.

Commits
-------

ddf4678 [HttpFoundation] fixed the creation of sub-requests under some circumstancies (closes #6923, closes #6936)

Discussion
----------

[HttpFoundation] fixed the creation of sub-requests under some circumstancies (closes #6923, closes #6936)

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

This fixes the creation of a sub-request when the master request Request URI
is determined with specific server information.
2013-02-07 15:53:27 +01:00
Fabien Potencier
e50d33308a [HttpKernel] fixed the creation of the Profiler directory 2013-02-07 12:58:33 +01:00
Fabien Potencier
ddf4678dd6 [HttpFoundation] fixed the creation of sub-requests under some circumstancies (closes #6923, closes #6936)
This fixes the creation of a sub-request when the master request Request URI
is determined with specific server information.
2013-02-04 19:34:49 +01:00
Fabien Potencier
3e2ff71b7c merged branch fabpot/avoid-session-creation (PR #6964)
This PR was merged into the 2.1 branch.

Commits
-------

8ca00c5 [Security] fixed session creation when none is needed (closes #6917)

Discussion
----------

[Security] fixed session creation when none is needed (closes #6917)

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

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

by drak at 2013-02-04T16:24:49Z

That looks good. Maybe we need a test for this logic to prevent any regression in the future?

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

by bendavies at 2013-02-04T16:30:38Z

Yep, this was exactly what i tried locally, but really wasn't familiar enough with it to be confident enough to submit it as a fix.

Works for me!

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

by bendavies at 2013-02-04T17:19:32Z

A few test failures which were added by the breaking PR #2414 in the first place.

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

by fabpot at 2013-02-04T18:00:31Z

I've fixed the tests which now really test that the session is not started.
2013-02-04 19:15:54 +01:00
Fabien Potencier
8ca00c598c [Security] fixed session creation when none is needed (closes #6917) 2013-02-04 18:59:58 +01:00
Fabien Potencier
09bbb68e9f [FrameworkBundle] removed obsolete comment (see 2e356c1) 2013-02-04 18:48:13 +01:00
Fabien Potencier
04cb480e30 Merge branch '2.0' into 2.1
* 2.0:
  fixed a circular call (closes #6864)
2013-02-04 13:41:37 +01:00
Fabien Potencier
1eab5151b3 merged branch fabpot/container-dumper-fix (PR #6959)
This PR was submitted for the 2.2 branch but it was merged into the 2.0 branch instead (closes #6959).

Commits
-------

ad889c9 [DependencyInjection] fixed a circular call (closes #6864)

Discussion
----------

[DependencyInjection] fixed a circular call (closes #6864)

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #6864
| License       | MIT
| Doc PR        | n/a
2013-02-04 13:39:09 +01:00
Fabien Potencier
74f2fcfed0 fixed a circular call (closes #6864) 2013-02-04 13:39:09 +01:00
Fabien Potencier
0c3d0db5de merged branch franmomu/add_phpdoc_to_authentication_events (PR #6831)
This PR was merged into the 2.1 branch.

Commits
-------

e7624b6 [Security] Add PHPDoc to AuthenticationEvents

Discussion
----------

[Security] Added PHPDoc to AuthenticationEvents

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |
2013-02-01 22:52:20 +01:00
Fabien Potencier
8c804c79aa merged branch igorw/session-save-handler-comment (PR #6922)
This PR was merged into the 2.1 branch.

Commits
-------

d6c0455 Correct comment in NativeSessionStorage regarding session.save_handler

Discussion
----------

Correct comment in NativeSessionStorage regarding session.save_handler

It's save_handler, not save_handlers.
2013-01-31 08:57:23 +01:00
Igor Wiedler
d6c0455c11 Correct comment in NativeSessionStorage regarding session.save_handler
It's save_handler, not save_handlers.
2013-01-30 22:06:00 +01:00
Fabien Potencier
6f71948023 [Yaml] fixed wrong merge (indentation default is 4 as of 2.1) 2013-01-27 17:12:43 +01:00
Fabien Potencier
f0fefeb139 merged branch xamado/master (PR #6884)
This PR was submitted for the master branch but it was merged into the 2.1 branch instead (closes #6884).

Commits
-------

c261760 Fixed missing class argument when throwing exception

Discussion
----------

Added missing parameter to Exception in DebugClassLoader

The DebugClassLoader was missing the $class argument to sprintf() when it tries to throw the exception, making the actual error you are getting more daunting :)

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

by stof at 2013-01-25T23:31:58Z

oops, sorry.

@fabpot this should be merged in 2.1 as you merged the change there
2013-01-26 08:21:53 +01:00
Xavier Amado
d77828ca22 Fixed missing class argument when throwing exception 2013-01-26 08:21:53 +01:00
Fran Moreno
e7624b6b83 [Security] Add PHPDoc to AuthenticationEvents 2013-01-22 10:47:05 +01:00
Fabien Potencier
bdc7e91865 Merge branch '2.0' into 2.1
* 2.0:
  [DependencyInjection] fixed the creation of synthetic services in ContainerBuilder
  [Security] PHPDoc in SecurityEvents
  [FrameworkBundle] fixed Client::doRequest that must call its parent method (closes #6737)
  [Yaml] fixed ignored text when parsing an inlined mapping or sequence (closes #6786)
  [Yaml] fixed #6773
  [Yaml] fixed #6770
  bumped Symfony version to 2.0.23-DEV

Conflicts:
	src/Symfony/Component/DependencyInjection/ContainerBuilder.php
	src/Symfony/Component/HttpKernel/Kernel.php
	src/Symfony/Component/Yaml/Inline.php
	src/Symfony/Component/Yaml/Tests/InlineTest.php
2013-01-22 08:14:57 +01:00
Fabien Potencier
115114b0dc merged branch fabpot/synthetic-service-fix (PR #6827)
This PR was merged into the 2.0 branch.

Commits
-------

4119caf [DependencyInjection] fixed the creation of synthetic services in ContainerBuilder

Discussion
----------

[DependencyInjection] fixed the creation of synthetic services in ContainerBuilder

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

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

by stof at 2013-01-22T00:14:29Z

👍
2013-01-22 08:11:41 +01:00
Fabien Potencier
4119cafdbe [DependencyInjection] fixed the creation of synthetic services in ContainerBuilder 2013-01-21 23:08:41 +01:00
Fabien Potencier
5663820aa6 merged branch franmomu/added_phpdoc_security_events (PR #6818)
This PR was squashed before being merged into the 2.0 branch (closes #6818).

Commits
-------

598ae9d [Security] PHPDoc in SecurityEvents

Discussion
----------

[Security] PHPDoc in SecurityEvents

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

I'm not sure about the description given.
2013-01-21 16:19:16 +01:00
Fran Moreno
598ae9d050 [Security] PHPDoc in SecurityEvents 2013-01-21 16:19:16 +01:00
Fabien Potencier
fada75c420 merged branch asm89/patch-3 (PR #6806)
This PR was merged into the 2.1 branch.

Commits
-------

e6a7e4c Fix typos in README

Discussion
----------

Fix typos in README
2013-01-20 09:33:14 +01:00
Alexander
e6a7e4ceb7 Fix typos in README 2013-01-19 11:32:41 +01:00
Fabien Potencier
84c6b486d1 merged branch stof/debug_class_loader (PR #6803)
This PR was submitted for the master branch but it was merged into the 2.1 branch instead (closes #6803).

Commits
-------

be05741 Added an error message in the DebugClassLoader when using / instead of \.

Discussion
----------

Added an error message in the DebugClassLoader when using / instead of \.

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

Using ``/`` instead of ``\`` when writing class names in a configuration seems to happen regularly. See aba8f1e180 (commitcomment-2461266) for the latest case I saw. I guess it may come from the fact that SensioGeneratorBundle allows using both for convenience in the CLI to get rid of escaping issues.
This will give people a better error message when they use a ``/`` instead of having them figure that the class name in the message using ``/`` and not ``\`` and this is the reason of the issue.
2013-01-19 08:47:26 +01:00
Christophe Coevoet
11aaa2e672 Added an error message in the DebugClassLoader when using / instead of \. 2013-01-19 08:47:26 +01:00
Fabien Potencier
9223c5acfd merged branch vicb/php5.3.16 (PR #6795)
This PR was merged into the 2.1 branch.

Commits
-------

5aa83ad KNOWN_ISSUES with php 5.3.16

Discussion
----------

KNOWN_ISSUES with php 5.3.16

see https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/Tests/Controller/ControllerResolverTest.php#L137

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

by vicb at 2013-01-18T12:33:57Z

SymfonyRequirements is already updated with this
2013-01-18 17:11:07 +01:00
Victor
5aa83ad1eb KNOWN_ISSUES with php 5.3.16 2013-01-18 13:28:05 +01:00
Fabien Potencier
b9963ea078 merged branch fabpot/yaml-fix (PR #6790)
This PR was merged into the 2.0 branch.

Commits
-------

53ccc2c [Yaml] fixed ignored text when parsing an inlined mapping or sequence (closes #6786)

Discussion
----------

[Yaml] fixed ignored text when parsing an inlined mapping or sequence (closes #6786)

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #6786
| License       | MIT
| Doc PR        | n/a
2013-01-18 12:35:45 +01:00
Fabien Potencier
9773c8abeb merged branch fabpot/client-fix (PR #6792)
This PR was merged into the 2.0 branch.

Commits
-------

ce38069 [FrameworkBundle] fixed Client::doRequest that must call its parent method (closes #6737)

Discussion
----------

[FrameworkBundle] fixed Client::doRequest that must call its parent method (closes #6737)

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #6737
| License       | MIT
| Doc PR        | n/A
2013-01-18 12:35:39 +01:00
Fabien Potencier
ce38069a94 [FrameworkBundle] fixed Client::doRequest that must call its parent method (closes #6737) 2013-01-18 11:08:30 +01:00
Fabien Potencier
53ccc2c677 [Yaml] fixed ignored text when parsing an inlined mapping or sequence (closes #6786) 2013-01-18 10:52:07 +01:00
Fabien Potencier
0391ac770e merged branch ezzatron/yaml-negative-integers (PR #6784)
This PR was merged into the 2.0 branch.

Commits
-------

fea20b7 [Yaml] fixed #6770

Discussion
----------

[Yaml] fixed parsing of negative integers (2.0 branch)

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

Note that an unrelated test fixture for large integers had to be changed to work on systems with 64-bit integer support because of the change from `assertEquals()` to `assertSame()`. Please see the diff for clarification.
2013-01-18 07:25:05 +01:00
Fabien Potencier
4d673d732d merged branch ezzatron/yaml-block-chomping (PR #6785)
This PR was merged into the 2.0 branch.

Commits
-------

ab0385c [Yaml] fixed #6773

Discussion
----------

[Yaml] fixed parsing of blocks with 'keep' chomping indicators (2.0 branch)

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

Also added a full set of tests for all combinations of literal/folded blocks and strip/clip/keep chomping indicators in both mid-file and end-of file positions.
2013-01-18 07:24:55 +01:00
Erin Millard
ab0385c633 [Yaml] fixed #6773 2013-01-18 09:42:00 +10:00
Erin Millard
fea20b7eb2 [Yaml] fixed #6770 2013-01-18 09:32:48 +10:00