Commit Graph

9230 Commits

Author SHA1 Message Date
Bernhard Schussek
65aa387da0 [Form] Fixed index generation in EntityChoiceList if ID is not an integer 2012-04-08 12:32:10 +02:00
marc.weistroff
8726ade310 Adds more features to twig:lint command 2012-04-08 11:14:51 +02:00
Fabien Potencier
5122d68c24 merged branch ruimarinho/exception_css_tweaks (PR #3827)
Commits
-------

fad114b Tweaked the exceptions layout CSS in order to display the error message even when wrapped around <pre> tags

Discussion
----------

Tweaked the exceptions layout CSS in order to display the error message even when wrapped around <pre> tags

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: ![Build status](https://secure.travis-ci.org/ruimarinho/symfony.png?branch=exception_css_tweaks)
Fixes the following tickets: -
Todo: -

Ever been in a situation when you're debugging code wrapped around `<pre>` tags and that code throws an exception? If you're familiar with this screenshot, you have :-) ![Image](http://i.imgur.com/dwxdD.png)

This PR is just a little tweak to the exceptions layout CSS in order to allow your to view the exception message. It also fixes a word break when messages are too long. ![Image 2](http://i.imgur.com/whxZv.png).

The build is currently failing due to an unmerged patch from the 2.0 branch.
2012-04-08 09:24:17 +02:00
Fabien Potencier
0e525fc5ce merged 2.0 2012-04-08 09:22:35 +02:00
Fabien Potencier
c6096e323e merged branch eriksencosta/test-fixes (PR #3830)
Commits
-------

fdee352 [TwigBridge] updated suggested packages
dad1750 [TwigBridge] updated TestCase as an abstract class
140ac20 [TwigBridge] fixed bootstrap

Discussion
----------

[TwigBridge] updated Composer suggested packages and test fixes

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

by eriksencosta at 2012-04-08T06:13:53Z

Rebased.
2012-04-08 09:18:17 +02:00
Fabien Potencier
bca8c5feac merged branch jakzal/FilesystemBugFix (PR #3828)
Commits
-------

22e2ad8 [Filesystem] Fixed relative path calculation for end path which is a subdirectory of the start path.
bc93787 [Filesystem] Fixed relative path calculation for paths with various combinations of trailing directory separators.

Discussion
----------

[Filesystem] Fixed relative path calculation

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
2012-04-08 09:16:07 +02:00
Eriksen Costa
fdee352619 [TwigBridge] updated suggested packages 2012-04-08 03:12:14 -03:00
Eriksen Costa
dad1750dfa [TwigBridge] updated TestCase as an abstract class 2012-04-07 18:49:17 -03:00
Eriksen Costa
140ac2014e [TwigBridge] fixed bootstrap 2012-04-07 18:47:00 -03:00
Jakub Zalas
22e2ad80c9 [Filesystem] Fixed relative path calculation for end path which is a subdirectory of the start path. 2012-04-07 21:52:26 +01:00
Jakub Zalas
bc93787a0d [Filesystem] Fixed relative path calculation for paths with various combinations of trailing directory separators. 2012-04-07 21:19:12 +01:00
Fabien Potencier
dee79e910d merged branch jakzal/SetCookieWithMultipleCookiesBugFix (PR #3823)
Commits
-------

7f92833 [BrowserKit] Fixed cs.
df3da28 [BrowserKit] Using assertNull instead of assertEquals.
87890d3 [BrowserKit] Fixed CookieJar issue being unable to parse multiple cookies from Set-Cookie.

Discussion
----------

[BrowserKit] Fixed CookieJar being unable to parse multiple cookies

Fix proposition for #3109

My fix splits value of *Set-Cookie* header by comma. Than it checks each extracted part if it starts with a cookie-name (token). If check is positive cookie is added to the list. Otherwise it's appended to the previous value. First element is always added to the list.

[rfc6265](http://tools.ietf.org/html/rfc6265) defines cookie-name with token:

    cookie-name = token
    token = <token, defined in [RFC2616], Section 2.2>

token is defined in [rfc2616](http://tools.ietf.org/html/rfc2616#section-2.2) as follows:

    token = 1*<any CHAR except CTLs or separators>
    CHAR = <any US-ASCII character (octets 0 - 127)>
    separators = "(" | ")" | "<" | ">" | "@"
                  | "," | ";" | ":" | "\" | <">
                  | "/" | "[" | "]" | "?" | "="
                  | "{" | "}" | SP | HT

That means cookie-name can be built out of following set of characters: *! # $ % & ' * + - . ^ _ ` | ~ 0-9 A-Z a-z*

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
2012-04-07 21:57:48 +02:00
Jakub Zalas
7f928332a9 [BrowserKit] Fixed cs. 2012-04-07 19:45:50 +01:00
Fabien Potencier
0a7f4668e0 [Process] added a note about user-defined error exist codes 2012-04-07 20:15:50 +02:00
Fabien Potencier
34b1b6b17d merged branch bschussek/issue3661 (PR #3821)
Commits
-------

e0ce6b4 [Form] Fixed required value guessed by ValidatorTypeGuesser

Discussion
----------

[Form] Fixed required value guessed by ValidatorTypeGuesser

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

![Travis Build Status](https://secure.travis-ci.org/bschussek/symfony.png?branch=issue3661)

The documentation states that a field is set to required if constrained with NotBlank or NotNull and to not required otherwise. Due to a bug this was not the case and fields were always required. This is now fixed.

The consequence is that some fields that were required before by default are not required anymore. The only difference is that the HTML5 "required" attribute disappears, because server-side validation did not occur before anyway.
2012-04-07 20:06:18 +02:00
Jakub Zalas
df3da289ad [BrowserKit] Using assertNull instead of assertEquals. 2012-04-07 18:45:48 +01:00
Jakub Zalas
87890d3a7c [BrowserKit] Fixed CookieJar issue being unable to parse multiple cookies from Set-Cookie. 2012-04-07 18:38:39 +01:00
Tom Van Looy
039ff6fc8e allow more control on GetSetMethodNormalizer by using callback functions and an ignoreAttributes list 2012-04-07 18:07:14 +02:00
Rui Marinho
fad114b76a Tweaked the exceptions layout CSS in order to display the error message even when wrapped around <pre> tags 2012-04-07 16:28:29 +01:00
Kim Hemsø Rasmussen
f1236844a8 Removed leftover from c/p 2012-04-07 17:15:32 +02:00
Bernhard Schussek
e0ce6b4c11 [Form] Fixed required value guessed by ValidatorTypeGuesser 2012-04-07 16:26:16 +02:00
marc.weistroff
1d7e9d9753 Adds a linter command for templates 2012-04-07 13:26:03 +02:00
Fabien Potencier
13aa515d65 merged branch jakzal/FilesystemTests (PR #3811)
Commits
-------

100e97e [Filesystem] Fixed warnings in makePathRelative().
f5f5c21 [Filesystem] Fixed typos in the docblocks.
d4243a2 [Filesystem] Fixed a bug in remove being unable to remove symlinks to unexisting file or directory.
11a676d [Filesystem] Added unit tests for mirror method.
8c94069 [Filesystem] Added unit tests for isAbsolutePath method.
2ee4b88 [Filesystem] Added unit tests for makePathRelative method.
21860cb [Filesystem] Added unit tests for symlink method.
a041feb [Filesystem] Added unit tests for rename method.
8071859 [Filesystem] Added unit tests for chmod method.
bba0080 [Filesystem] Added unit tests for remove method.
8e861b7 [Filesystem] Introduced workspace directory to limit complexity of tests.
a91e200 [Filesystem] Added unit tests for touch method.
7e297db [Filesystem] Added unit tests for mkdir method.
6ac5486 [Filesystem] Added unit tests for copy method.
1c833e7 [Filesystem] Added missing docblock comment.

Discussion
----------

[Filesystem] Fixed a bug in remove() being unable to unlink broken symlinks

While working on test coverage for Filesystem class I discovered a bug in remove() method.

Before removing a file a check is made if it exists:

    if (!file_exists($file)) {
        continue;
    }

Problem is [file_exists()](http://php.net/file_exists) returns false if link's target file doesn't exist. Therefore remove() will fail to delete a directory containing a broken link. Solution is to handle links a bit different:

    if (!file_exists($file) && !is_link($file)) {
        continue;
    }

Additionally, this PR improves test coverage of Filesystem component.

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes

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

by cordoval at 2012-04-07T00:55:59Z

✌.|•͡˘‿•͡˘|.✌

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

by fabpot at 2012-04-07T06:12:34Z

Tests do not pass for me:

    PHPUnit 3.6.10 by Sebastian Bergmann.

    Configuration read from /Users/fabien/work/symfony/git/symfony/phpunit.xml.dist

    .........................EE.......

    Time: 0 seconds, Memory: 5.25Mb

    There were 2 errors:

    1) Symfony\Component\Filesystem\Tests\FilesystemTest::testMakePathRelative with data set #0 ('/var/lib/symfony/src/Symfony/', '/var/lib/symfony/src/Symfony/Component', '../')
    Uninitialized string offset: 29

    .../rc/Symfony/Component/Filesystem/Filesystem.php:183
    .../rc/Symfony/Component/Filesystem/Tests/FilesystemTest.php:434

    2) Symfony\Component\Filesystem\Tests\FilesystemTest::testMakePathRelative with data set #1 ('var/lib/symfony/', 'var/lib/symfony/src/Symfony/Component', '../../../')
    Uninitialized string offset: 16

    .../rc/Symfony/Component/Filesystem/Filesystem.php:183
    .../rc/Symfony/Component/Filesystem/Tests/FilesystemTest.php:434

    FAILURES!
    Tests: 34, Assertions: 67, Errors: 2.

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

by jakzal at 2012-04-07T07:26:15Z

Sorry for this. For some reason my PHP error reporting level was to low to catch this...

Should be fixed now but I needed to modify the makePathRelative() (this bug existed before).
2012-04-07 10:18:55 +02:00
Fabien Potencier
e7dbc38941 merged branch eriksencosta/pt_BR-translations (PR #3817)
Commits
-------

bf51a58 [FrameworkBundle] fixed pt_BR translations (added commas to take a breath :)
dc94e27 [FrameworkBundle] synced pt_BR translations

Discussion
----------

synced and fixed pt_BR translations
2012-04-07 10:18:49 +02:00
Eriksen Costa
bf51a58f37 [FrameworkBundle] fixed pt_BR translations (added commas to take a breath :) 2012-04-07 04:30:12 -03:00
Eriksen Costa
dc94e27dbb [FrameworkBundle] synced pt_BR translations 2012-04-07 04:29:23 -03:00
Jakub Zalas
100e97ebe7 [Filesystem] Fixed warnings in makePathRelative(). 2012-04-07 08:23:20 +01:00
Fabien Potencier
72e854e943 fixed CS 2012-04-07 09:10:50 +02:00
Fabien Potencier
0a585b7130 merged branch eriksencosta/cs-fixes (PR #3816)
Commits
-------

abd59c3 Merge branch 'master' into cs-fixes
f5f0506 [TwigBundle] fixed CS

Discussion
----------

CS fixes
2012-04-07 09:04:09 +02:00
Eriksen Costa
abd59c3dbd Merge branch 'master' into cs-fixes 2012-04-07 03:53:28 -03:00
Fabien Potencier
d967d39d27 merged branch chmielot/3446-empty-multiple-entity-choice (PR #3734)
Commits
-------

a430f3d [#3446] [Form] Fix getChoicesForValues of EntityChoiceList on empty values

Discussion
----------

[Form] Fix reverseTransform on multiple entity form type

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

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

by stof at 2012-04-03T23:05:55Z

@bschussek ping

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

by stof at 2012-04-03T23:06:45Z

This is an alternate implementation for #3727

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

by chmielot at 2012-04-04T13:47:27Z

OK, this is another possibility to fix this issue with working tests. What do you think about this?

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

by chmielot at 2012-04-04T13:51:27Z

OK, just done.

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

by stof at 2012-04-04T13:51:39Z

@beberlei @bschussek ping

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

by bschussek at 2012-04-06T18:50:37Z

@fabpot 👍
2012-04-07 08:22:05 +02:00
Fabien Potencier
526fb7bf05 merged branch bschussek/issue3738 (PR #3807)
Commits
-------

6584721 [Form] Improved labels generated by default from form names
6e0b03a [Form] Fixed label of prototype in CollectionType
fc342d1 Merge remote branch 'umpirsky/collection-name' into issue3738
f91660d Added test for prototype label.

Discussion
----------

[Form] Fixed default label generated for the CollectionType prototype

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

![Travis Build Status](https://secure.travis-ci.org/bschussek/symfony.png?branch=issue3738)

(the fact that the build fails seems to origin from the broken master)
2012-04-07 08:15:43 +02:00
Fabien Potencier
048f8dabba merged branch eriksencosta/patch-1 (PR #3813)
Commits
-------

46c7ae1 added composer.lock to .gitignore

Discussion
----------

added composer.lock to .gitignore
2012-04-07 08:09:20 +02:00
Fabien Potencier
1c10b0b455 merged branch eriksencosta/readme-fixes (PR #3814)
Commits
-------

f3efea3 [Propel1Bridge][TwigBridge] fixed export instructions in the README files

Discussion
----------

[Propel1Bridge][TwigBridge] fixed export instructions in the README files
2012-04-07 08:09:06 +02:00
Fabien Potencier
987e69ee56 merged branch jmikola/di-yaml-loader-test (PR #3808)
Commits
-------

1c3e4ac [DependencyInjection] Fix Yaml file loader test

Discussion
----------

[DependencyInjection] Fix Yaml file loader test

This broke when 2.0 was recently merged into master with b9daae2847, as the Yaml fixture change from 24a0d0a2dc was not included.

https://twitter.com/webmozart/status/188325579894947840
2012-04-07 08:09:01 +02:00
Eriksen Costa
f5f0506b1b [TwigBundle] fixed CS 2012-04-07 01:24:57 -03:00
Eriksen Costa
f3efea3a6e [Propel1Bridge][TwigBridge] fixed export instructions in the README files 2012-04-06 23:24:52 -03:00
Eriksen Costa
46c7ae1ed4 added composer.lock to .gitignore 2012-04-06 22:15:14 -03:00
Jakub Zalas
f5f5c21228 [Filesystem] Fixed typos in the docblocks. 2012-04-07 00:05:37 +01:00
Jakub Zalas
d4243a28b6 [Filesystem] Fixed a bug in remove being unable to remove symlinks to unexisting file or directory. 2012-04-07 00:01:32 +01:00
Jakub Zalas
11a676d672 [Filesystem] Added unit tests for mirror method. 2012-04-06 23:56:57 +01:00
Jakub Zalas
8c940699c1 [Filesystem] Added unit tests for isAbsolutePath method. 2012-04-06 23:16:46 +01:00
Jakub Zalas
2ee4b8861c [Filesystem] Added unit tests for makePathRelative method. 2012-04-06 23:05:31 +01:00
Jakub Zalas
21860cbb5d [Filesystem] Added unit tests for symlink method. 2012-04-06 22:25:57 +01:00
Kim Hemsø Rasmussen
b74a5d4f14 Updated to new cache loader pattern. 2012-04-06 22:35:56 +02:00
Jakub Zalas
a041feb4b3 [Filesystem] Added unit tests for rename method. 2012-04-06 21:21:21 +01:00
Jakub Zalas
8071859915 [Filesystem] Added unit tests for chmod method. 2012-04-06 21:17:12 +01:00
Jakub Zalas
bba0080560 [Filesystem] Added unit tests for remove method. 2012-04-06 20:38:21 +01:00
Jakub Zalas
8e861b746a [Filesystem] Introduced workspace directory to limit complexity of tests. 2012-04-06 19:59:25 +01:00
Kim Hemsø Rasmussen
7e66908c02 Added XCache class loader 2012-04-06 20:32:52 +02:00