Commit Graph

11047 Commits

Author SHA1 Message Date
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
Johannes M. Schmitt a2a6cdca8d prevents injection of malicious doc types 2012-08-28 08:43:14 +02:00
Fabien Potencier 865461d204 standardized the way we handle XML errors 2012-08-28 08:43:14 +02:00
Thorsten Hallwas 352e8f583c Redirects are now absolute
According to w3c locations need to be absolute:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.30
2012-08-28 08:40:05 +02:00
Tobias Schultze 7e8ab546e4 [Form] raise OutOfBoundsException instead of InvalidArgumentException for inexistent form childs to be in line with PropertyPath 2012-08-28 08:29:12 +02:00
Tobias Schultze 0186731cca [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.
2012-08-28 08:23:10 +02:00
Tobias Schultze e7e39e04e3 [Form] refactor Guess 2012-08-28 08:15:57 +02:00
Tobias Schultze dcbeeb1df7 [Form] replaced UnexpectedValueException by InvalidArgumentException in Guess
this is a better fit because the error is a logic exception instead of a runtime exception
2012-08-28 08:15:56 +02:00
Tobias Schultze 4c5bfab058 [FrameworkBundle] non-permanent redirect should be status code 404 according to spec 2012-08-28 08:03:23 +02:00
Fabien Potencier c0590bfd7c merged branch eventhorizonpl/100pc_symfony_component_class_loader_p2 (PR #5330)
Commits
-------

f1970fa dump test

Discussion
----------

Symfony\Component\ClassLoader\ClassMapGenerator dump test

Hi,

100 percent test coverage for ClassMapGenerator  :)

Best regards,
Michal

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

by eventhorizonpl at 2012-08-24T07:47:24Z

Fixed, thanks for the review!
2012-08-28 07:39:30 +02:00
Fabien Potencier 66a060defd merged branch Tobion/formdoc (PR #5350)
Commits
-------

83dc966 [Form] Fixed some PHPDoc
596bbb1 [Form] fixed FormConfigBuilder to use PropertyPathInterface
a523823 [Form] fixed and added phpDoc

Discussion
----------

[Form] fixed and added phpDoc

[ci skip]

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

by sstok at 2012-08-26T08:11:01Z

Some descriptions don''t seem to be properly aligned, use the CS-fixer.

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

by Tobion at 2012-08-26T17:02:25Z

@sstok This is more about manual fixes concerning forgotten exceptions or wrong data type. The cs fixer gives many false positives and can be applied later.
2012-08-28 07:38:26 +02:00
Fabien Potencier f11d7a0a0c merged branch Seldaek/sigchild-workaround (PR #5353)
Commits
-------

7b63428 [Process] Add workaround for PHP's internal sigchild failing to return proper exit codes

Discussion
----------

[Process] Add workaround for PHP's internal sigchild failing to return proper exit codes

PHP compiled with --enable-sigchild basically fails to return exit codes, and randomly returns -1 instead most of the time (see https://bugs.php.net/bug.php?id=29123).

This works around it by having the exit code going through another pipe. It's enabled by default for linux because the new pipe trick won't work on windows I think, but that's unlikely to be an issue because most people don't compile their own php there.

I could have it enabled only when sigchild is enabled using the code below, but obviously that adds some overhead, so I'm not sure what's worst.

```php
ob_start();
phpinfo(INFO_GENERAL);
$sigchild = false !== strpos(ob_get_clean(), '--enable-sigchild');
```

That said, this renders composer unusable (because we do check exit codes) for people having sigchild enabled, and it's not so easy to workaround outside of the Process class itself, so I hope this is an acceptable fix.

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

by schmittjoh at 2012-08-26T13:41:18Z

How about prepending commands with ``exec`` to avoid spawning child processes altogether?

see #5030

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

by Seldaek at 2012-08-26T13:51:40Z

@schmittjoh I'm not sure how that's related to this issue? The problem here is that $exitcode is -1 when it should be 0, I don't see how the additional level of exec would help but maybe I'm missing your point.

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

by schmittjoh at 2012-08-26T13:59:15Z

I haven't looked in detail at this, but exec removes the child wrapper that PHP adds normally.

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

by fabpot at 2012-08-26T16:10:24Z

What about doing the fix in 2.0?

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

by stof at 2012-08-26T16:13:04Z

Can it be applied to 2.0 without too much work ? The Process component has been refactored for 2.1

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

by Seldaek at 2012-08-26T16:16:06Z

Just tried to rebase and it's not so trivial.. I can try to rebuild the
patch from scratch for 2.0 if it's important.

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

by fabpot at 2012-08-26T16:24:38Z

ok, let's only do the fix for master for now.

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

by Seldaek at 2012-08-26T20:49:39Z

@fabpot ok so the question remains whether there should be a ctor check for the configure flag to enable this or if we just always do it and hope it doesn't cause issues.
2012-08-28 07:36:52 +02:00
Fabien Potencier 5cc43f9486 fixed merge 2012-08-27 21:31:24 +02:00
Pascal Borreli 83dc966f1c [Form] Fixed some PHPDoc 2012-08-27 18:33:44 +02:00
Tobias Schultze 596bbb1327 [Form] fixed FormConfigBuilder to use PropertyPathInterface 2012-08-27 18:33:44 +02:00
Tobias Schultze a52382344d [Form] fixed and added phpDoc 2012-08-27 18:33:43 +02:00
Michal Piotrowski f1970fa5a3 dump test
fix things pointed out by stof

fix things pointed out by pborreli

fix things pointed out by fabpot
2012-08-27 17:51:49 +02:00
Tobias Schultze d5eb4f730b [Form] fix phpdoc of Form::hasErrors 2012-08-26 21:37:25 +02:00
Tobias Schultze 5cb82648ad [Form] deprecated Form::hasErrors that isn't part of the Interface 2012-08-26 21:36:52 +02:00
Tobias Schultze 30c145775d [Form] fixed Form::setParent(null) 2012-08-26 21:21:27 +02:00
Tobias Schultze 214f0de6e9 [Form] added test with null parent 2012-08-26 21:21:26 +02:00
Jordi Boggiano 7b63428698 [Process] Add workaround for PHP's internal sigchild failing to return proper exit codes 2012-08-26 15:13:51 +02:00
Fabien Potencier 2c0e851059 merged branch vitaliytv/master (PR #5352)
Commits
-------

1f95b1e [Validator] updated Ukrainian translation of messages

Discussion
----------

[Validator] updated Ukrainian translation of messages
2012-08-26 13:03:16 +02:00
vitaliytv 1f95b1e8f7 [Validator] updated Ukrainian translation of messages 2012-08-26 13:55:38 +03:00
Fabien Potencier c29edb5e2e merged 2.0 2012-08-26 11:32:04 +02:00
Fabien Potencier 9a355e995a [HttpKernel] excluded a test on PHP 5.3.16, which is buggy (PHP, not Symfony ;)) 2012-08-26 11:23:03 +02:00
Fabien Potencier 71732b1ec7 merged branch bdmu/ticket_5345 (PR #5346)
Commits
-------

85a53c1 [FrameworkBundle] fixed *FrameworkExtensionTest::testTranslator fail on Windows on master branch

Discussion
----------

[FrameworkBundle] fixed *FrameworkExtensionTest::testTranslator fail on Windows on master branch

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #5345
Todo: -
License of the code: MIT
Documentation PR:
fixed using some
str_replace('/', DIRECTORY_SEPARATOR, <value>)
so it works on Windows because it replaces the / in \ and shouldn't affect linux based OS, since it will replace / with /.

Not very nice, but it works, if anyone wants to do better, he/she is most welcome.
2012-08-26 11:11:06 +02:00
Fabien Potencier 04c46ebd33 merged branch bdmu/ticket_5343 (PR #5344)
Commits
-------

f694615 [Process] fix ProcessTest::testProcessPipes hangs on Windows on branch 2.0

Discussion
----------

[Process] fix ProcessTest::testProcessPipes hangs on Windows on branch 2.0

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #5343
Todo: -
License of the code: MIT
Documentation PR:
Marked the test as skipped on Windows, exactly as it is done on master branch (kind of backport)

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

by pborreli at 2012-08-25T20:06:58Z

👍
2012-08-26 11:09:43 +02:00
Fabien Potencier 71f3081188 merged branch bdmu/ticket_5341 (PR #5342)
Commits
-------

9beffff [HttpKernel] KernelTest::testGetRootDir fails on Windows for branch 2.0

Discussion
----------

[HttpKernel] fix KernelTest::testGetRootDir fails on Windows for branch 2.0

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #5341
Todo: -
License of the code: MIT
Documentation PR:
replace
$this->assertEquals(DIR, $kernel->getRootDir());
with
$this->assertEquals(DIR, realpath($kernel->getRootDir()));
line 287

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

by pborreli at 2012-08-25T20:23:34Z

👍
2012-08-26 11:07:01 +02:00
Fabien Potencier f8f4408eba merged branch 1ed/hungarian-validator-messages (PR #5348)
Commits
-------

4af877b [Validator] updated hungarian translation of messages

Discussion
----------

[Validator] updated hungarian translation of messages
2012-08-26 10:59:46 +02:00
Tobias Schultze 492c99073b [Form] optimized PropertyPathMapper to invoke the expensive property path less often 2012-08-26 08:43:27 +02:00
Gábor Egyed 4af877b532 [Validator] updated hungarian translation of messages 2012-08-26 00:39:15 +02:00
Christophe L 85a53c1ec9 [FrameworkBundle] fixed *FrameworkExtensionTest::testTranslator fail on Windows on master branch 2012-08-26 00:54:18 +04:00
Christophe L f694615bc5 [Process] fix ProcessTest::testProcessPipes hangs on Windows on branch 2.0 2012-08-25 23:29:32 +04:00
Christophe L 9beffff263 [HttpKernel] KernelTest::testGetRootDir fails on Windows for branch 2.0 2012-08-25 22:46:45 +04:00
Fabien Potencier bef34bda67 merged branch Tobion/patch-2 (PR #5240)
Commits
-------

9e5d5a4 [Form] fix static method call

Discussion
----------

[Form] fix static method call

`allowDataWalking` was called statically, but wasnt defined as such.
2012-08-25 19:04:51 +02:00
Fabien Potencier d1be451996 merged branch willdurand/fix-composer-components (PR #5318)
Commits
-------

933e821 Add minimum-stability (dev) in each component

Discussion
----------

Add minimum-stability (dev) in each component

This fixes the ability to run the test suite in each component if a `composer install` is needed.

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

by stof at 2012-08-22T13:57:14Z

If you really want to run the testsuite standalone, some dev requirements are missing (SecurityBundle needs the FrameworkBundle for its functional tests for instance). If you have some time to check the missing dev requirement, it would be great.
Anyway, 👍 for this

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

by willdurand at 2012-08-22T13:59:15Z

Yes I already did that once. I'll try to fix more components later.

On Wed, Aug 22, 2012 at 3:57 PM, Christophe Coevoet <
notifications@github.com> wrote:

> If you really want to run the testsuite standalone, some dev requirements
> are missing (SecurityBundle needs the FrameworkBundle for its functional
> tests for instance). If you have some time to check the missing dev
> requirement, it would be great.
> Anyway, [image: 👍] for this
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/symfony/symfony/pull/5318#issuecomment-7934886>.
>
>

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

by stof at 2012-08-22T14:02:23Z

Well, I think most components should be good now (as some work has been done on them). But the bridges and bundles may need some work (bundles were not having any dev requirements until yesterday when @guilhermeblanco added some on FrameworkBundle)

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

by pborreli at 2012-08-22T14:14:00Z

what about having for each READ-ONLY repo his own .travis.yml and travisci hook activated ?

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

by fabpot at 2012-08-22T14:30:13Z

please, don't add more travis files. The main already tests everything, and that's all we need.

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

by stof at 2012-08-22T14:33:46Z

@pborreli tests should not be different for subtree split repos as the code is the same and the tests are the same (except that more tests could be skipped because of missing deps).
Note that for the bundles, it is likely to be different currently as I think some skip tests are missing (just like dev requirements are). But fixing this does not require enablign travis.

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

by pborreli at 2012-08-22T14:42:30Z

ok, i was just thinking about a way to be sure each component is usable individually but yeah that would require to relaunch each tests and add a bunch of travis files + hook

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

by hason at 2012-08-24T13:12:04Z

@stof, @eriksencosta, @fabpot: Tests are different for Locale component, see #5235

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

by stof at 2012-08-24T13:35:07Z

@hason no. You also need to do it when running the tests of the Locale component as part of the full run.
2012-08-25 19:03:43 +02:00
Fabien Potencier b5517b2f1c merged branch eventhorizonpl/100pc_symfony_component_class_loader (PR #5329)
Commits
-------

8c74b55 getNamespaces test

Discussion
----------

100pc symfony component class loader

Hi,

I added some tests for Symfony\Component\ClassLoader\UniversalClassLoader and Symfony\Component\ClassLoader\ClassLoader.

Best regards,
Michal

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

by eventhorizonpl at 2012-08-23T20:05:02Z

Fixed. Thanks for the review!

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

by pborreli at 2012-08-24T05:11:00Z

👍

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

by fabpot at 2012-08-24T05:46:36Z

Can you squash your commits before I merge the PR? Thanks.
2012-08-25 18:59:24 +02:00
Fabien Potencier 0e9d1ea069 merged branch meandmymonkey/fluent-validatorbuilder (PR #5328)
Commits
-------

1ff081d added tests for ValidatorBuilder fluent interface
fec11ae updated docblocks for ValidatorBuilderInterface
b5aaf53 added fluent interface to validatorbuilder

Discussion
----------

[Validator] Added missing fluent interface to ValidatorBuilder

The new ValidatorBuilder class seems to be intended to have a fluent interface, reasoning:

- Static Validation::createValidatorBuilder() method exists
- Consistency with other builders in the framework
- Component README actually uses fluent interface for examples.

This was not implemented though. This PR adds the fluent interface.

BC Break: No
Symfony2 Tests Pass: Yes

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

by henrikbjorn at 2012-08-23T09:47:35Z

Could you add a test for this? :)

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

by bschussek at 2012-08-23T12:04:12Z

Great, thanks! 👍

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

by meandmymonkey at 2012-08-23T12:30:40Z

@henrikbjorn Yes, will do.

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

by meandmymonkey at 2012-08-25T16:21:37Z

@henrikbjorn done
2012-08-25 18:51:05 +02:00
Andreas Hucks 1ff081d93f added tests for ValidatorBuilder fluent interface 2012-08-25 18:16:50 +02:00
Tobias Schultze 47a8bbdada [Form] optimized the binding of child forms and calculation of extra data 2012-08-25 16:01:45 +02:00
Tobias Schultze 8d45539eac [Form] refactor Form::bind to save 7 assignments 2012-08-25 03:46:40 +02:00
Fabien Potencier a1e6cfbe15 merged branch ganchiku/compiledroute_bcbreak_fix (PR #5333)
Commits
-------

472dfdc oops, the command with name, too
b1a9587 fixed bug related to the change PR #5326

Discussion
----------

fixed bug related to the change PR #5326

PR #5326 cause error on debugging command for route. compiledroute does not have getRequirements anymore, so should use not compiled route instead.
2012-08-24 16:48:05 +02:00
Shin 472dfdc46a oops, the command with name, too 2012-08-24 23:41:40 +09:00
Shin b1a9587ea7 fixed bug related to the change PR #5326 2012-08-24 23:33:39 +09:00
Fabien Potencier 602a45880f merged branch Tobion/compiledroute (PR #5326)
Commits
-------

4f57d69 [Routing] removed cyclic reference Route<->CompiledRoute

Discussion
----------

[Routing] removed cyclic reference Route<->CompiledRoute

BC break: yes

I think we should remove this proxy behavior from CompiledRoute. Cyclic references are often not a good idea and in this case it doesn't even make sense. It's like an integrated decompiler ^^ when going from CompiledRoute -> Route.

It also conflicts with the single responsibility principle in OOP design as you would need to change the CompiledRoute class whenever you change the Route class.

It also mitigates problems like
```
$compiled = $route->compile();
// $route is change by some other layer
$compiled->getRoute(); // is not in synch with $compiled anymore although this getter makes us believe that
```
2012-08-24 10:20:27 +02:00
Michal Piotrowski 8c74b55a27 getNamespaces test
getPrefixes test

loadClass test

getPrefixes test

addPrefix test

getFallbackDirs test

fix things pointed out by stof
2012-08-24 09:33:45 +02:00
Andreas Hucks fec11aec01 updated docblocks for ValidatorBuilderInterface 2012-08-23 11:12:01 +02:00
Andreas Hucks b5aaf534ab added fluent interface to validatorbuilder 2012-08-23 11:11:32 +02:00