Commit Graph

13082 Commits

Author SHA1 Message Date
Igor Wiedler
06c26dc7ed Remove array type hint from GetResponseForControllerResultEvent::setControllerResult() 2013-02-13 02:35:51 +01:00
Fabien Potencier
a4ac5e6374 bumped Symfony version to 2.2.0-DEV 2013-02-11 16:24:43 +01:00
Fabien Potencier
f410931dd8 Revert "merged branch povilas/issue_6101 (PR #6708)"
This reverts commit b2bcbbbd19, reversing
changes made to c5fcf0d0cc.
2013-02-11 13:46:49 +01:00
Fabien Potencier
95ba9449e2 Merge branch '2.1' into 2.2
* 2.1:
  [DependencyInjection] fixed tests (refs #7017)
2013-02-11 12:43:49 +01:00
Fabien Potencier
0209eb6c47 Merge branch '2.0' into 2.1
* 2.0:
  [DependencyInjection] fixed tests (refs #7017)
2013-02-11 12:42:49 +01:00
Fabien Potencier
d41fc8bb2d [DependencyInjection] fixed tests (refs #7017) 2013-02-11 12:41:22 +01:00
Fabien Potencier
743612bbbd Merge branch '2.1' into 2.2
* 2.1:
  added support for the X-Forwarded-For header (closes #6982, closes #7000)
  fixed the IP address in HttpCache when calling the backend
  [EventDispatcher] Added assertion.
  [EventDispathcer] Fix removeListener
  [DependencyInjection] Add clone for resources which were introduced in 2.1
  [DependencyInjection] Allow frozen containers to be dumped to graphviz
  Fix 'undefined index' error, when entering scope recursively
  [Security] fixed session creation on login (closes #7011)
  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-11 12:26:43 +01:00
Fabien Potencier
33aca01611 Merge branch '2.0' into 2.1
* 2.0:
  [EventDispatcher] Added assertion.
  [EventDispathcer] Fix removeListener

Conflicts:
	src/Symfony/Component/EventDispatcher/Tests/EventDispatcherTest.php
2013-02-11 12:26:14 +01:00
Fabien Potencier
95afd69a0e merged branch hason/bc_xml (PR #6393)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #6393).

Commits
-------

697d53d [Router] Fixed XmlFileLoaderTest::testLoadThrowsExceptionWithInvalidFileEvenWithoutSchemaValidation

Discussion
----------

[Router] Fixed test
2013-02-11 12:24:47 +01:00
Martin Hasoň
f0afc2c009 Fixed XmlFileLoaderTest::testLoadThrowsExceptionWithInvalidFileEvenWithoutSchemaValidation 2013-02-11 12:24:47 +01:00
Fabien Potencier
b2bcbbbd19 merged branch povilas/issue_6101 (PR #6708)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #6708).

Commits
-------

90a3e7a [HttpFoundation] moved file hash calculation to own method

Discussion
----------

[HttpFoundation] moved file hash calculation to own method

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

This commit adds ability to change default hashing implementation by extending BinaryFileResponse.

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

by stloyd at 2013-01-11T16:23:30Z

IMO it's looks a like overkill...

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

by lsmith77 at 2013-01-11T16:39:33Z

hmm yeah .. seems like something that could be done via inheritance ..

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

by Tobion at 2013-01-11T17:44:29Z

I agree, overriting the method is much simpler solution.

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

by jalliot at 2013-01-11T18:16:04Z

Besides the `$autoetag` variable is false by default so you have to explicitly enable this behavior...

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

by povilas at 2013-01-11T18:39:31Z

@lsmith77, @Tobion,  you mean, just move hash calculation to separate protected method, and when you want to change hashing you must extend BinaryFileResponse?
2013-02-11 12:20:16 +01:00
povilas
a9238493a7 moved file hash calculation to own method 2013-02-11 12:20:15 +01:00
Fabien Potencier
c5fcf0d0cc merged branch dlsniper/validator-check-property-metadata (PR #6972)
This PR was squashed before being merged into the 2.2 branch (closes #6972).

Commits
-------

4cbdbcb [Validator] Add check for existing metadata on property

Discussion
----------

[Validator] Add check for existing metadata on property

| Q             | A
| ------------- | ---
| Bug fix?      | no (sort of)
| New feature?  | no
| BC breaks?    | no (I don't think so)
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | ~
| License       | MIT
| Doc PR        | ~

Todo:
- [x] Check if the new method should be added to the interface as well.

This adds a check for metadata existence before usage else the code will emit a warning.

This should not be a BC break or a bug fix as the patched code is 2.2 specific.

@bschussek let me know if I should add the method in the interface as well. Thank you.

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

by vicb at 2013-02-05T10:40:56Z

Strictly speaking this is a BC break (you are adding a public method). But I guess we should better defined what should be describe as BC break - I have asked myself the same question more than one time /cc @fabpot

Please also add a UT and a note in the changelog.

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

by dlsniper at 2013-02-05T11:26:30Z

@vicb thanks for input. In this case I guess I should add the method to the interface as well.

As for unit tests I'll add them soon as well.

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

by fabpot at 2013-02-05T14:19:14Z

Can you add a test?

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

by dlsniper at 2013-02-05T15:57:12Z

I'll do it tonight as I've bumped into some work related issues.

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

by fabpot at 2013-02-11T11:11:12Z

Just for the record, this is not a BC break as the interface was added in 2.2.
2013-02-11 12:11:43 +01:00
Florin Patan
4cbdbcb1f9 [Validator] Add check for existing metadata on property 2013-02-11 12:11:43 +01:00
Fabien Potencier
880c1a0526 merged branch jakzal/2.0-event (PR #7038)
This PR was merged into the 2.0 branch.

Commits
-------

4ce9ac3 [EventDispatcher] Added assertion.

Discussion
----------

[EventDispatcher] Added assertion

re #7023, I think it actually makes sense to add an assertion here. It reveals the intent of the test (listener is not removed).

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

by vicb at 2013-02-10T11:32:06Z

I don't think the assertion would fail with the former code, would it ?

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

by vicb at 2013-02-10T11:34:30Z

I mean an error would be generated even before the assertion.

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

by jakzal at 2013-02-10T11:37:05Z

Yes, it would fail before getting to the assertion with: *Object of class Closure could not be converted to int*.

However, this is something good to test for (and document - test is a documentation). We're not checking if type is taken into account in other tests. This test might still fail if code inside removeListener() changed.

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

by vicb at 2013-02-10T11:42:29Z

I don't really understand your point and think it is a bit useless here but I am not against your change - I don't argue that test is doc though.

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

by jakzal at 2013-02-10T15:38:09Z

Assertion is indeed useless for the bug you discovered and fixed. I think it's still worth to have it there for  other reason:
* test readability and completeness - with an assertion it's more clear that we don't expect the listener to be removed with the `removeListener()` call if passed argument doesn't match the one added before

If you still don't see my point just close this PR :)

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

by vicb at 2013-02-10T17:34:35Z

What I mean is that you are unit testing php and it is not a job for sf. So it is not strictly required but as it doesn't hurt, let's merge your change.

Jakub Zalas <notifications@github.com> wrote:

>Assertion is indeed useless for the bug you discovered and fixed. I
>think it's still worth to have it there for  other reason:
>* test readability and completeness - with an assertion it's more clear
>that we don't expect the listener to be removed with the
>`removeListener()` call if passed argument doesn't match the one added
>before
>
>If you still don't see my point just close this PR :)
>
>
>---
>Reply to this email directly or view it on GitHub:
>https://github.com/symfony/symfony/pull/7038#issuecomment-13351469
2013-02-11 11:54:19 +01:00
Fabien Potencier
2c6e882b1b merged branch fabpot/pattern-fix (PR #6998)
This PR was merged into the 2.2 branch.

Commits
-------

73aa7d1 replaced usage of the deprecated pattern routing key (replaced with path)

Discussion
----------

replaced usage of the deprecated pattern routing key (replaced with path)

| 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

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

by lsmith77 at 2013-02-07T13:35:54Z

do we have tests to cover the BC behavior?

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

by fabpot at 2013-02-07T16:30:31Z

I've just added some tests for the legacy way.
2013-02-11 11:51:33 +01:00
Fabien Potencier
22e997ace0 merged branch fabpot/ip-cache (PR #7034)
This PR was submitted for the 2.2 branch but it was merged into the 2.1 branch instead (closes #7034).

Commits
-------

1fdded5 [HttpKernel] added support for the X-Forwarded-For header (closes #6982, closes #7000)
be65d7c [HttpKernel] fixed the IP address in HttpCache when calling the backend

Discussion
----------

Make HttpCache behaves more like a real reverse proxy

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

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

by bendavies at 2013-02-10T00:55:29Z

Awesome, thanks Fabien. should this not target 2.0/2.1?
2013-02-11 11:50:30 +01:00
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