Commit Graph

11243 Commits

Author SHA1 Message Date
Fabien Potencier
cba2a31e36 bumped Symfony version to 2.2.0-DEV 2012-09-06 12:12:45 +02:00
Fabien Potencier
e7059b44c7 bumped Symfony version to 2.1.1-DEV 2012-09-06 12:12:03 +02:00
Fabien Potencier
5745b53d05 updated VERSION for 2.1.0 2012-09-06 11:01:56 +02:00
Fabien Potencier
4035e1a755 Merge branch '2.0'
* 2.0:
  bumped Symfony version to 2.0.18-DEV

Conflicts:
	src/Symfony/Component/HttpKernel/Kernel.php
2012-09-06 10:57:51 +02:00
Fabien Potencier
00ec9b5391 Revert "merged branch Tobion/strictrequirements (PR #5181)"
This reverts commit 2da2a44382, reversing
changes made to 58855475c6.
2012-09-05 17:44:14 +02:00
Fabien Potencier
aae4ceea56 Revert "merged branch Tobion/requirementscheck (PR #5187)"
This reverts commit 2cf50b7801, reversing
changes made to 569e29d91f.
2012-09-05 17:44:10 +02:00
Fabien Potencier
fdf25289f8 Revert "merged branch Tobion/uselessparamdefaults (PR #5400)"
This reverts commit 0f61b2eb90, reversing
changes made to 5e7723fcbb.
2012-09-05 17:44:05 +02:00
Tobias Schultze
7c5cfeb776 [Routing] added test why #5238 is not that easy 2012-09-05 06:36:05 +02:00
Michal Piotrowski
8f467956c8 tests for HeaderBag 2012-09-04 20:36:25 +02:00
Michal Piotrowski
9bc8f659bd Cookie tests 2012-09-04 18:27:42 +02:00
Fabien Potencier
1dd153205b merged branch beberlei/RevertDbalAcl (PR #5253)
Commits
-------

1b5ad17 Revert "Removed MySQL-exclusive usage of unsigned integer from table creation"

Discussion
----------

[Security][DBAL] Revert MySQL unsigned removal

Revert "Removed MySQL-exclusive usage of unsigned integer from table creation"

This reverts commit 57694aaa94.

The problem is underlying in Doctrine DBAL change tracking and should
either be fixed or ignored there.

I opened a ticket on Doctrine Jira http://doctrine-project.org/jira/browse/DBAL-322

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

by fabpot at 2012-08-14T06:40:47Z

I will merge this PR after we have a release of DBAL that includes the fix for DBAL-322.

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

by acasademont at 2012-08-20T08:01:48Z

This was already fixed 2 weeks ago in doctrine/dbal#183 so i guess this can be closed

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

by acasademont at 2012-08-20T08:02:06Z

merged i mean
2012-09-04 16:49:55 +02:00
Fabien Potencier
0919361e2e merged branch eventhorizonpl/100ptc_component_httpfundation (PR #5409)
Commits
-------

3036b00 JsonResponseTest

Discussion
----------

JsonResponseTest

Hi,

This patch adds some tests for JsonResponse.

Best regards,
Michal

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

by eventhorizonpl at 2012-09-01T07:09:12Z

Done. Thanks for the review!
2012-09-04 14:24:42 +02:00
Fabien Potencier
2cd61ab8d9 merged branch eventhorizonpl/100_ptc_symfony_component_class_loader_p3 (PR #5412)
Commits
-------

8a3c8c9 load test

Discussion
----------

load test

Hi,

This patch add test that covers this situation

public static function load($classes, $cacheDir, $name, $autoReload, $adaptive = false, $extension = '.php')
{
  // each $name can only be loaded once per PHP process
  if (isset(self::$loaded[$name])) {
     return;
}

Best regards,
Michal
2012-09-04 14:23:54 +02:00
Fabien Potencier
5040599272 merged branch eventhorizonpl/100ptc_component_httpfundation_p2 (PR #5413)
Commits
-------

0af8778 Response tests

Discussion
----------

Response tests

Hi,

This patch adds some tests to ResponseTest.

Best regards,
Michal

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

by eventhorizonpl at 2012-09-01T09:45:16Z

Fixed, thanks for the review.

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

by eventhorizonpl at 2012-09-02T19:39:26Z

CS fixed. Thanks for the review :)
2012-09-04 14:19:30 +02:00
Fabien Potencier
a44c8d8c84 merged branch eventhorizonpl/100ptc_component_httpfundation_p3 (PR #5414)
Commits
-------

c74d9a9 ResponseHeaderBag tests

Discussion
----------

ResponseHeaderBag tests

Hi,

This patch adds some ResponseHeaderBag tests. Now ResponseHeaderBag got 100% test coverage :)

Best regards,
Michal
2012-09-04 14:18:55 +02:00
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
Fabien Potencier
7888598547 merged branch armetiz/patch-2 (PR #5429)
Commits
-------

6d49bfb Remove "you" word.

Discussion
----------

Remove "you" word.
2012-09-04 12:57:37 +02:00
Thomas Tourlourat
6d49bfb394 Remove "you" word. 2012-09-04 12:35:57 +03:00
Tobias Schultze
02516de652 [Routing] fix variable with a requirement of '0' 2012-09-04 07:18:13 +02:00
Tobias Schultze
be28e56f4e [Routing] disallow numeric named variables in pattern
because PHP raises an error for such subpatterns in PCRE and thus would break matching, e.g. '(?<123>.+)'.
2012-09-04 07:10:18 +02:00
Tobias Schultze
1f5b7930c0 [Routing] fix setting empty requirement in Route 2012-09-04 06:31:46 +02:00
Michal Piotrowski
0af87785a7 Response tests
fix things pointed out by Koc

fix things pointed out by stof
2012-09-02 15:37:09 -04: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
Michal Piotrowski
c74d9a90f5 ResponseHeaderBag tests 2012-09-01 07:18:47 -04:00
Michal Piotrowski
8a3c8c9c03 load test 2012-09-01 03:02:36 -04:00
Michal Piotrowski
3036b009a3 JsonResponseTest 2012-09-01 02:56:27 -04:00
Sebastian Bergmann
41ffd006e5 Point to information on how to run the test suite. (closes #5405) 2012-09-01 08:52:18 +02: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
Tobias Schultze
0f86a33b61 micro-optim: replace for with foreach 2012-09-01 02:18:27 +02:00
Tobias Schultze
4efb9fec50 [Form] Remove unneeded FormUtil constants
They are part of the public API (as const are always public) but cannot be used at all from outside the class as the$pluralMap is private. The meaning of the indices is already documented in the array.
2012-09-01 02:16:28 +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
c0673d77d0 merged branch stof/fix_testsuite (PR #5403)
Commits
-------

7ef6295 Removed the unnecessary file include

Discussion
----------

Removed the unnecessary file include

As of Doctrine 2.2, the ORM annotations can be found by the autoloader directly.

This will also avoid breaking the testsuite in case the dev deps have not been installed as the ORM would not be available in this case (the tests relying on the ORM should already be skipped when it is not available). See #5402
2012-08-31 13:41:36 +02:00
Christophe Coevoet
7ef629525e Removed the unnecessary file include
As of Doctrine 2.2, the ORM annotations can be found by the autoloader
directly.
2012-08-31 13:16:54 +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
Romain Neutron
f2e4802565 [Yaml] Normalize exceptions 2012-08-30 21:55:18 +02:00
Romain Neutron
b0f5f2e7f2 [Serializer] Normalize exceptions 2012-08-30 21:55:08 +02:00
Romain Neutron
bcd8db2a34 [DependencyInjection] Normalize exceptions 2012-08-30 21:32:42 +02:00
Romain Neutron
c5e7793004 [Process] Normalize exceptions 2012-08-30 21:25:16 +02:00
Fabien Potencier
2cf50b7801 merged branch Tobion/requirementscheck (PR #5187)
Commits
-------

3363832 extended phpdoc of ConfigurableRequirementsInterface
5f64503 [Routing] added test for disabled requirements check
4225869 [Routing] allow disabling the requirements check on URL generation

Discussion
----------

[Routing] allow disabling the requirements check on URL generation

This adds the possibility to disable the requirements check (`strict_requirements = null`) on URL generation.

To sum up, here the possibilities:
- `strict_requirements = true`: throw exception for mismatching requirements (most useful in development environment).
- `strict_requirements = false`: don't throw exception but return null as URL for mismatching requirements and log it (useful when you cannot control all params because they come from third party libs or something but don't want to have a 404 in production environment. it logs the mismatch so you can review it).
- `strict_requirements = null`: Return the URL with the given parameters without checking the requirements at all. When generating an URL you should either trust your params or you validated them beforehand because otherwise it would break your link anyway (just as with strict_requirements=false). So in production environment you should know that params allways pass the requirements. Thus you could disable the check on each URL generation for performance reasons. If you have 300 links on a page and each URL at least one param you safe 300 unneeded `preg_match` calls. I tested the performance in one of my projects. The rendering time of a single template that contains ~300 links with several params was reduced from avg. 46ms to avg. 42ms. That are 8.7% reduction in the twig layer where the links are created on each request. So this option combines the improved usability of strict_requirements=false with an additional increased performance.

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

by fabpot at 2012-08-30T13:40:38Z

Can you put the comment about all the possibilities you have mentioned here in the phpdoc for future reference? Thanks.

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

by Tobion at 2012-08-30T13:49:25Z

In `ConfigurableRequirementsInterface` or which phpdoc would you like to have it? Because `ConfigurableRequirementsInterface` already has it explained. But I can extend its description if thats what you mean.

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

by fabpot at 2012-08-30T13:50:40Z

The comment in the PR is more explicit and more detailed than the one in the interface. So, yes, basically, it would be great if you can move all the information in the interface phpdoc.

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

by Tobion at 2012-08-30T14:35:59Z

Done.
2012-08-30 16:40:08 +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
Fabien Potencier
569e29d91f merged branch romainneutron/ProcessExitCode (PR #5386)
Commits
-------

407db65 Add @Seldaek remote modifications
3bfb976 Add unit test demonstrating bad exit code getter for a failing process

Discussion
----------

Add unit test demonstrating bad exit code getter for a failing process

Since symfony/symfony@7b63428698 exit code are not well handled anymore.

The unit test provided with this PR demonstrates it

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

by fabpot at 2012-08-30T11:05:05Z

ping @Seldaek

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

by stof at 2012-08-30T11:13:13Z

We probably need to enable the workaround only when sigchild is used.

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

by Seldaek at 2012-08-30T12:51:22Z

Ok I figured out the problem, the hack is even hackier I guess now, but it should work for people with and without --enable-sigchild at least.
2012-08-30 15:04:53 +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