Commit Graph

9394 Commits

Author SHA1 Message Date
Fabien Potencier
ee51ca8c16 merged branch eventhorizonpl/100ptc_component_httpfundation_p4 (PR #5415)
Commits
-------

b89d4ee StreamedResponseTest

Discussion
----------

StreamedResponseTest

Hi,

This patch adds one test to StreamedResponseTest and fixes another. StreamedResponse has 100% test coverage.

Best regards,
Michal
2012-09-04 14:18:30 +02:00
Fabien Potencier
36c64e0e33 merged branch eventhorizonpl/100ptc_component_httpfundation_p5 (PR #5416)
Commits
-------

21a5841 RedirectResponse tests

Discussion
----------

RedirectResponse tests

Hi,

This patch adds 100% test coverage for RedirectResponse class.

Best regards,
Michal
2012-09-04 14:18:13 +02:00
Michal Piotrowski
21a5841c6a RedirectResponse tests 2012-09-01 08:25:20 -04:00
Michal Piotrowski
b89d4eeb23 StreamedResponseTest 2012-09-01 07:57:21 -04:00
Fabien Potencier
797ba6846a merged branch bschussek/issue4670 (PR #5406)
Commits
-------

04fd5f1 [Form] Fixed PropertyPath to not modify Collection instances (not even their clones)

Discussion
----------

[Form] Fixed PropertyPath to not modify Collection instances

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

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

by pocallaghan at 2012-08-31T14:20:52Z

As far as I can see the pull request does fix the issue, which makes sense based on the code change (I didn't know iterator_to_array existed, good call). One thing I would say, I'm not sure on the use in the change to the test case. It's not clear to me what additional protection this extra assertion gives, as both the old and new code seem to pass.

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

by bschussek at 2012-08-31T14:21:46Z

The new assertion is there because not even the old code (`clone`) was tested.

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

by stof at 2012-08-31T14:37:38Z

@bschussek but was it failing without the code change ?

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

by bschussek at 2012-08-31T22:12:00Z

@stof It was not, but I was unable to write a good test for the change within reasonable time. I added an explanatory comment instead.
2012-09-01 08:47:43 +02:00
Fabien Potencier
07ec1cb63b [Security] fixed typo in a test 2012-08-31 19:17:17 +02:00
Bernhard Schussek
04fd5f1b21 [Form] Fixed PropertyPath to not modify Collection instances (not even their clones) 2012-08-31 14:34:27 +02:00
Fabien Potencier
0f61b2eb90 merged branch Tobion/uselessparamdefaults (PR #5400)
Commits
-------

cb7e3f5 [Routing] added route compile check to identify a default value of a required variable that does not match the requirement

Discussion
----------

[Routing] added route compile check to identify a bad default value

BC break: yes but only for strange route definitions

See the exception message in code for the reasoning.

An exception is thrown for a __required__ variable that __has a default__ that __doesn't match__ the requirement.
So optional variables can of course still have a default that don't meet the requirement, which is useful.
This helps to identify useless route definitions at compile time instead of when generating or matching a URL.
2012-08-31 11:55:46 +02:00
Fabien Potencier
5e7723fcbb merged branch janmarek/patch-1 (PR #5202)
Commits
-------

890aea2 FileLocatorInterface used in typehint instead of FileLocator

Discussion
----------

FileLocatorInterface used in typehint instead of FileLocator

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

by stof at 2012-08-30T22:09:39Z

@fabpot this makes sense (and it is BC)

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

by mvrhov at 2012-08-31T08:34:17Z

What's wrong with Interface hint? I always hint interface when available as this means that I can inject whatever class implementing that interface.
2012-08-31 11:52:07 +02:00
Tobias Schultze
cb7e3f5edb [Routing] added route compile check to identify a default value of a required variable that does not match the requirement 2012-08-31 08:36:21 +02:00
Tobias Schultze
33638320f2 extended phpdoc of ConfigurableRequirementsInterface 2012-08-30 16:35:30 +02:00
Tobias Schultze
5f64503132 [Routing] added test for disabled requirements check 2012-08-30 15:08:30 +02:00
Tobias Schultze
4225869939 [Routing] allow disabling the requirements check on URL generation 2012-08-30 15:08:29 +02:00
Romain Neutron
407db6510b Add @Seldaek remote modifications 2012-08-30 14:49:05 +02:00
Romain Neutron
3bfb9762d7 Add unit test demonstrating bad exit code getter for a failing process 2012-08-30 12:55:38 +02:00
Fabien Potencier
2982e6e678 merged branch rdohms/html5-regexp (PR #5382)
Commits
-------

7503ec9 Issue #5307: HTML regexp when match is false

Discussion
----------

Issue #5307: HTML regexp when match is false

When match is false the html5 validation regexp should be either inverted or not added.
Since we are in RC added a fix where this is not added, but marked a @todo so that this
can be revisited and we try to inverse the regexp instead.

Discussed in #5307.

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

by bschussek at 2012-08-30T08:40:06Z

👍 once the CS issue is fixed.

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

by rdohms at 2012-08-30T09:23:57Z

Could swear that was the CS in PSR-1 or 2, anyway, fixed.

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

by fabpot at 2012-08-30T09:26:07Z

Can you squash your commits before I merge? Thanks.

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

by rdohms at 2012-08-30T09:54:26Z

@fabpot done.
2012-08-30 12:00:56 +02:00
Rafael Dohms
7503ec954f Issue #5307: HTML regexp when match is false
When match is false the html5 validation regexp should be either inverted or not added.
Since we are in RC added a fix where this is not added, but marked a @todo so that this
can be revisited and we try to inverse the regexp instead.
2012-08-30 11:53:07 +02:00
Fabien Potencier
03f34a9765 merged branch mpiecko/master (PR #5280)
Commits
-------

58ebd1b [Form] Fixed error bubbling from DateTime widget - Issue #5270
8ea1607 Update src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php

Discussion
----------

[Form] Fixed error bubbling from DateTime widget - Issue #5270

This is related to https://github.com/symfony/symfony/issues/5270

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

by mpiecko at 2012-08-16T19:37:45Z

Travisbot shows something like this in it's log:

    [Composer\Downloader\TransportException] The "http://nodeload.github.com/phingofficial/phing/zipball/2.4.12" file could not be downloaded (HTTP/1.1 500 Internal Server Error)

So is it my PR ot Travis CI who fails ... ? I saw this error in some other PR's ...

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

by stloyd at 2012-08-16T20:40:39Z

It's GitHub =)

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

by mpiecko at 2012-08-17T09:36:31Z

Bad GitHub :)

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

by bschussek at 2012-08-17T11:21:39Z

Could you please add a test to DateTimeTypeTest?

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

by mpiecko at 2012-08-17T12:23:40Z

Sure!

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

by bschussek at 2012-08-30T08:20:08Z

👍
2012-08-30 10:23:27 +02:00
Fabien Potencier
548db6dfcd fixed typo 2012-08-30 09:43:00 +02:00
Fabien Potencier
2da2a44382 merged branch Tobion/strictrequirements (PR #5181)
Commits
-------

0706d18 [Routing] fixed 4 bugs in the UrlGenerator

Discussion
----------

[Routing] UrlGenerator: fixed missing query param and some ignored requirements

This was pretty hard to figure out. I could fix 4 bugs and refactor the code to safe 2 variables and several assignments. Sorry for doing this in one commit, but they were highly interdependent.
See the added tests for what was fixed. The most obvious bug was that a query param was ignored if it had by accident the same name as a default param (but wasn't used in the path).
In 3 cases it generated the wrong URL that wouldn't match this route. The generator wrongly ignored either the requirements or the passed parameter. I had to adjust one test that was asserting something wrong (see comments).

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

by Tobion at 2012-08-13T14:22:35Z

ping @fabpot

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

by Tobion at 2012-08-29T17:53:07Z

@fabpot I think it's important to merge this before 2.1 final.
2012-08-30 09:34:36 +02:00
Fabien Potencier
58855475c6 [HttpFoundation] added missing property declarations (refs #5379) 2012-08-30 09:11:02 +02:00
Fabien Potencier
24ae90deee merged branch Baachi/test-refactoring (PR #5379)
Commits
-------

f2d8a8a Refactor the unit test for the "MongoDbSessionHandler"

Discussion
----------

[HttpFoundation] Refactor the unit test for the "MongoDbSessionHandler"

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

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

by drak at 2012-08-29T19:49:49Z

Big +1 from me. Exactly how these kind of tests should be written.
2012-08-30 09:10:05 +02:00
DerManoMann
cf4189bdaf Move remember me ResponseListener from security bundle into security component
This move allows to implement the remember me feature in Silex without having to reference the security bundle.
2012-08-30 11:15:49 +12:00
Markus Bachmann
f2d8a8a85b Refactor the unit test for the "MongoDbSessionHandler" 2012-08-29 21:23:32 +02:00
Fabien Potencier
ecab04c38d merged branch Tobion/formexception (PR #5337)
Commits
-------

eb2eba1 [Form] don't allow users to force exceptions by submitting unexpected data

Discussion
----------

[Form] don't allow users to force exceptions by submitting unexpected data

fix #5334

This makes it more fault-tolerant by simply ignoring wrong stuff from hackers.

@bschussek: I didn't find any other UnexpectedTypeExceptions that could be invoked by simply submitting unexpected data. But I'm not 100% sure that there aren't any indirectly invokeable, e.g. in some listeners.

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

by stof at 2012-08-24T22:34:52Z

a test is missing for this.

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

by Tobion at 2012-08-24T23:02:26Z

@stof true, I will add one

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

by Tobion at 2012-08-25T13:51:23Z

Added test.

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

by bschussek at 2012-08-29T11:07:37Z

👍

Could you please squash the commits?

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

by Tobion at 2012-08-29T13:43:52Z

Done.
2012-08-29 15:48:30 +02:00
Tobias Schultze
eb2eba17e3 [Form] don't allow users to force exceptions by submitting unexpected data
this makes it more fault-tolerant by simply ignoring wrong stuff from hackers

[Form] added test to ensure binding of wrong data is ignored
2012-08-29 15:43:26 +02:00
Fabien Potencier
e49fd8fd0a merged branch Tobion/formincon (PR #5355)
Commits
-------

7e8ab54 [Form] raise OutOfBoundsException instead of InvalidArgumentException for inexistent form childs to be in line with PropertyPath

Discussion
----------

[Form] raise OutOfBoundsException instead of InvalidArgumentException in Form::get

BC break: yes

Raise OutOfBoundsException instead of InvalidArgumentException in Form::get for inexistent form childs to be in line with PropertyPath, which also uses OutOfBoundsException for invalid indexes. OutOfBoundsException fits much better as it extends RuntimeException instead of LogicException and this error can typically not be detected at compile time.

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

by bschussek at 2012-08-29T11:01:01Z

👍

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

by stloyd at 2012-08-29T11:07:51Z

Shouldn't this change be noted in upgrade file ?

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

by stof at 2012-08-29T11:23:04Z

it should (and in the changelog of the component)
2012-08-29 13:46:44 +02:00
Fabien Potencier
deb41a10de merged branch Tobion/formguess (PR #5361)
Commits
-------

e7e39e0 [Form] refactor Guess
dcbeeb1 [Form] replaced UnexpectedValueException by InvalidArgumentException in Guess

Discussion
----------

[Form] replaced UnexpectedValueException by InvalidArgumentException in Guess

BC break: yes

this is a better fit because the error is a logic exception (that can be detected at compile time, i.e. when writing the code) instead of a runtime exception

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

by bschussek at 2012-08-29T10:51:54Z

👍
2012-08-29 13:44:34 +02:00
Fabien Potencier
77a47d362c merged branch Tobion/formhasparent (PR #5360)
Commits
-------

0186731 [Form] removed hasParent from FormInterface and deprecated its use

Discussion
----------

[Form] removed hasParent from FormInterface and deprecated its use

There are already 2 alternatives with getParent() and isRoot(), so a third one with similar semantics is confusing and unneeded.

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

by bschussek at 2012-08-29T11:11:11Z

👍
2012-08-29 13:43:39 +02:00
Fabien Potencier
0e9156dd34 merged branch Tobion/formrefactor (PR #5338)
Commits
-------

492c990 [Form] optimized PropertyPathMapper to invoke the expensive property path less often
47a8bbd [Form] optimized the binding of child forms and calculation of extra data
8d45539 [Form] refactor Form::bind to save 7 assignments

Discussion
----------

[Form] refactor Form::bind to save 7 assignments and a complete loop

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

by stof at 2012-08-24T23:45:18Z

the new code is not equivalent. See travis for the proof.

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

by Tobion at 2012-08-25T01:50:41Z

@stof fixed, I had to reduce the refactoring a little

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

by bschussek at 2012-08-29T11:05:52Z

👍
2012-08-29 13:43:12 +02:00
Fabien Potencier
867e31ca39 merged branch Tobion/formhaserrors (PR #5356)
Commits
-------

d5eb4f7 [Form] fix phpdoc of Form::hasErrors
5cb8264 [Form] deprecated Form::hasErrors that isn't part of the Interface

Discussion
----------

[Form] deprecated Form::hasErrors that isn't part of the Interface

This method is not part of FormInterface, so I deprecated it as it cannot be used reliably. This is consistent with other hassers that were deprecated like `hasChildren` where one should use `count` instead.

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

by stof at 2012-08-26T19:11:19Z

You should deprecate it, not remove it

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

by Tobion at 2012-08-26T19:17:35Z

oh right. I thought it was added in 2.1 and thus can be removed but it's also in 2.0.
Done.

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

by bschussek at 2012-08-29T11:00:32Z

👍
2012-08-29 13:42:45 +02:00
Fabien Potencier
003f8c59c3 merged branch Tobion/formparent (PR #5357)
Commits
-------

30c1457 [Form] fixed Form::setParent(null)
214f0de [Form] added test with null parent

Discussion
----------

[Form] fixed Form::setParent(null)

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

by bschussek at 2012-08-29T10:58:20Z

👍
2012-08-29 13:42:13 +02:00
Fabien Potencier
e080f5ae68 merged branch Tobion/redirectcontroller (PR #5368)
Commits
-------

3f8127c fixed '0' problem
7bec460 fixed phpdoc
4c5bfab [FrameworkBundle] non-permanent redirect should be status code 404 according to spec

Discussion
----------

[FrameworkBundle] non-permanent redirect to unknown location with 404

according to spec: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html see 410 Gone

bc break: tiny when omitting 2 parameter (I can avoid this with `func_num_args` but i think its not necessary and makes the code strange and inconsistent)
2012-08-29 12:24:19 +02:00
Fabien Potencier
0881bdeb89 merged branch Tobion/patch-7 (PR #5377)
Commits
-------

dd0403f [Routing] small refactoring in Router

Discussion
----------

[Routing] small refactoring in Router
2012-08-29 09:29:15 +02:00
Tobias Schultze
dd0403f117 [Routing] small refactoring in Router 2012-08-29 09:36:18 +03:00
Daniel Gomes
f52e6dfa13 minor correction 2012-08-29 01:17:36 +01:00
Tobias Schultze
3f8127ca1a fixed '0' problem 2012-08-29 01:07:28 +02:00
Tobias Schultze
7bec46036a fixed phpdoc 2012-08-29 01:04:20 +02:00
Fabien Potencier
9f4525a614 merged branch pitiflautico/patch-1 (PR #5372)
Commits
-------

7fc8fc0 [Form] Fix double semicolon

Discussion
----------

[Form] Fix double semicolon
2012-08-28 16:00:19 +02:00
Daniel Perez Pinazo
7fc8fc0419 [Form] Fix double semicolon 2012-08-28 16:24:45 +03:00
Albert Casademont
8bac44274c [Validator] Fix Spanish and Catalan translation messages for the CSRF token validator 2012-08-28 13:55:44 +02:00
Fabien Potencier
3969011f7f [Routing] fixed a test 2012-08-28 13:06:09 +02:00
Fabien Potencier
e35b4d8afe bumped Symfony version to 2.1.0-DEV 2012-08-28 10:43:50 +02:00
Fabien Potencier
39606c8c3f updated VERSION for 2.1.0-RC2 2012-08-28 10:00:18 +02:00
Fabien Potencier
a6bc12c9c1 Merge branch '2.0'
* 2.0:
  updated VERSION for 2.0.17
  updated CHANGELOG for 2.0.17
  updated vendors for 2.0.17
  fixed XML decoding attack vector through external entities
  prevents injection of malicious doc types
  disabled network access when loading XML documents
  refined previous commit
  prevents injection of malicious doc types
  standardized the way we handle XML errors
  Redirects are now absolute

Conflicts:
	CHANGELOG-2.0.md
	src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php
	src/Symfony/Component/DomCrawler/Crawler.php
	src/Symfony/Component/HttpKernel/Kernel.php
	tests/Symfony/Tests/Component/DependencyInjection/Loader/XmlFileLoaderTest.php
	tests/Symfony/Tests/Component/Routing/Loader/XmlFileLoaderTest.php
	tests/Symfony/Tests/Component/Serializer/Encoder/XmlEncoderTest.php
	tests/Symfony/Tests/Component/Translation/Loader/XliffFileLoaderTest.php
	tests/Symfony/Tests/Component/Validator/Mapping/Loader/XmlFileLoaderTest.php
	vendors.php
2012-08-28 09:54:42 +02:00
Fabien Potencier
348babccba updated VERSION for 2.0.17 2012-08-28 09:05:44 +02:00
Fabien Potencier
5bf4f92e86 fixed XML decoding attack vector through external entities 2012-08-28 08:43:14 +02:00
Fabien Potencier
4e0c99211d prevents injection of malicious doc types 2012-08-28 08:43:14 +02:00
Fabien Potencier
47fe725bd4 disabled network access when loading XML documents 2012-08-28 08:43:14 +02:00
Fabien Potencier
c896d71594 refined previous commit 2012-08-28 08:43:14 +02:00