Commit Graph

6616 Commits

Author SHA1 Message Date
Deni
e7c07c49a2 [FrameworkBundle] Updated the Russian translations. 2011-07-27 15:42:03 +04:00
Daniel Gomes
00e10f9a44 updated pt_PT translation 2011-07-27 12:59:56 +02:00
Fabien Potencier
4197740599 merged branch hason/czechvalidators (PR #1828)
Commits
-------

1d90b43 [FrameworkBundle] updated czech translation

Discussion
----------

[FrameworkBundle] updated czech translation
2011-07-27 12:43:26 +02:00
Martin Hason
1d90b43a4f [FrameworkBundle] updated czech translation 2011-07-27 12:35:15 +02:00
Fabien Potencier
5731516070 merged branch lenar/dialoghelper-eof (PR #1704)
Commits
-------

07298ac Detect EOF when reading input stream

Discussion
----------

[Console] Detect EOF when reading input stream

This is related to commits 511a9a1fd7 and 3a5d508766.

First of them introduced abort-on-EOF and the second regressed the functionality.
Problem is stream_get_line() doesn't return false on EOF. So it needs call to feof() to
detect the situation.

Still, it's not ideal. With fgets() it worked fine, but with stream_get_line() one has to press
CTRL+D twice to get out. I presume this could be bug in PHP itself.

But better than nothing. Please consider.

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

by fabpot at 2011/07/19 22:47:53 -0700

I have used `stream_get_line` especially because it does not return `false` on eof. This is needed when you pass your own stream for unit tests.

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

by lenar at 2011/07/25 06:05:59 -0700

This is not the best solution I think. Tests should mimic and cope with real life not the other way around.
Better solution would be to fix testcase. Like this: lenar/SensioGeneratorBundle@6ff3f26881. Or maybe create a special "testing" stream wrapper that wraps php://memory and gives out just linefeeds after real data ends.

And then change stream_get_line() back to fgets() if there is no other reason for this change.

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

by fabpot at 2011/07/25 06:24:20 -0700

When applying your patch to the generator bundle (and revert to use `fgets`), I get "RuntimeException: Aborted" exceptions.

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

by lenar at 2011/07/25 06:35:08 -0700

With d326f89 added + lenar/SensioGeneratorBundle@6ff3f26881 I can successfully run every test in that file.

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

by fabpot at 2011/07/26 23:31:36 -0700

@lenar: not for me. I have many 'Aborted' exception on my Mac.

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

by fabpot at 2011/07/26 23:41:18 -0700

And I have the exact same errors on Linux:

    There were 7 errors:

    1) Sensio\Bundle\GeneratorBundle\Tests\Command\GenerateBundleCommandTest::testInteractiveCommand with data set #0 (array('/tmp'), 'Foo/BarBundle
    ', array('Foo\\BarBundle', 'FooBarBundle', '/tmp/', 'annotation', false))
    RuntimeException: Aborted

    .../Symfony/Component/Console/Helper/DialogHelper.php:40
    .../Symfony/Component/Console/Helper/DialogHelper.php:97
    .../symfony-standard/vendor/bundles/Sensio/Bundle/GeneratorBundle/Command/GenerateBundleCommand.php:165
    .../Symfony/Component/Console/Command/Command.php:205
    .../Symfony/Component/Console/Tester/CommandTester.php:66
    .../symfony-standard/vendor/bundles/Sensio/Bundle/GeneratorBundle/Tests/Command/GenerateBundleCommandTest.php:39

    2) Sensio\Bundle\GeneratorBundle\Tests\Command\GenerateBundleCommandTest::testInteractiveCommand with data set #1 (array('/tmp'), 'Foo/BarBundle
    BarBundle
    foo
    yml
    n', array('Foo\\BarBundle', 'BarBundle', 'foo/', 'yml', false))
    RuntimeException: Aborted

    .../Symfony/Component/Console/Helper/DialogHelper.php:40
    .../Symfony/Component/Console/Helper/DialogHelper.php:62
    .../symfony-standard/vendor/bundles/Sensio/Bundle/GeneratorBundle/Command/GenerateBundleCommand.php:83
    .../Symfony/Component/Console/Command/Command.php:214
    .../Symfony/Component/Console/Tester/CommandTester.php:66
    .../symfony-standard/vendor/bundles/Sensio/Bundle/GeneratorBundle/Tests/Command/GenerateBundleCommandTest.php:39

    3) Sensio\Bundle\GeneratorBundle\Tests\Command\GenerateBundleCommandTest::testInteractiveCommand with data set #2 (array('/tmp', 'yml', 'BarBundle', true), 'Foo/BarBundle
    ', array('Foo\\BarBundle', 'BarBundle', '/tmp/', 'yml', true))
    RuntimeException: Aborted

    .../Symfony/Component/Console/Helper/DialogHelper.php:40
    .../Symfony/Component/Console/Helper/DialogHelper.php:97
    .../symfony-standard/vendor/bundles/Sensio/Bundle/GeneratorBundle/Command/GenerateBundleCommand.php:165
    .../Symfony/Component/Console/Command/Command.php:205
    .../Symfony/Component/Console/Tester/CommandTester.php:66
    .../symfony-standard/vendor/bundles/Sensio/Bundle/GeneratorBundle/Tests/Command/GenerateBundleCommandTest.php:39

    4) Sensio\Bundle\GeneratorBundle\Tests\Command\GenerateDoctrineEntityCommandTest::testInteractiveCommand with data set #0 (array(), 'AcmeBlogBundle:Blog/Post
    ', array('Blog\\Post', 'annotation', array()))
    RuntimeException: Aborted

    .../Symfony/Component/Console/Helper/DialogHelper.php:40
    .../Symfony/Component/Console/Helper/DialogHelper.php:97
    .../symfony-standard/vendor/bundles/Sensio/Bundle/GeneratorBundle/Command/GenerateDoctrineEntityCommand.php:145
    .../Symfony/Component/Console/Command/Command.php:205
    .../Symfony/Component/Console/Tester/CommandTester.php:66
    .../symfony-standard/vendor/bundles/Sensio/Bundle/GeneratorBundle/Tests/Command/GenerateDoctrineEntityCommandTest.php:39

    5) Sensio\Bundle\GeneratorBundle\Tests\Command\GenerateDoctrineEntityCommandTest::testInteractiveCommand with data set #1 (array('AcmeBlogBundle:Blog/Post'), '', array('Blog\\Post', 'annotation', array()))
    RuntimeException: Aborted

    .../Symfony/Component/Console/Helper/DialogHelper.php:40
    .../Symfony/Component/Console/Helper/DialogHelper.php:97
    .../symfony-standard/vendor/bundles/Sensio/Bundle/GeneratorBundle/Command/GenerateDoctrineEntityCommand.php:121
    .../Symfony/Component/Console/Command/Command.php:205
    .../Symfony/Component/Console/Tester/CommandTester.php:66
    .../symfony-standard/vendor/bundles/Sensio/Bundle/GeneratorBundle/Tests/Command/GenerateDoctrineEntityCommandTest.php:39

    6) Sensio\Bundle\GeneratorBundle\Tests\Command\GenerateDoctrineEntityCommandTest::testInteractiveCommand with data set #2 (array(), 'AcmeBlogBundle:Blog/Post
    yml

    ', array('Blog\\Post', 'yml', array()))
    RuntimeException: Aborted

    .../Symfony/Component/Console/Helper/DialogHelper.php:40
    .../Symfony/Component/Console/Helper/DialogHelper.php:62
    .../symfony-standard/vendor/bundles/Sensio/Bundle/GeneratorBundle/Command/GenerateDoctrineEntityCommand.php:153
    .../Symfony/Component/Console/Command/Command.php:205
    .../Symfony/Component/Console/Tester/CommandTester.php:66
    .../symfony-standard/vendor/bundles/Sensio/Bundle/GeneratorBundle/Tests/Command/GenerateDoctrineEntityCommandTest.php:39

    7) Sensio\Bundle\GeneratorBundle\Tests\Command\GenerateDoctrineEntityCommandTest::testInteractiveCommand with data set #3 (array(), 'AcmeBlogBundle:Blog/Post
    yml
    title

    255
    description
    text

    ', array('Blog\\Post', 'yml', array(array('title', 'string', 255), array('description', 'text'))))
    RuntimeException: Aborted

    .../Symfony/Component/Console/Helper/DialogHelper.php:40
    .../Symfony/Component/Console/Helper/DialogHelper.php:62
    .../symfony-standard/vendor/bundles/Sensio/Bundle/GeneratorBundle/Command/GenerateDoctrineEntityCommand.php:153
    .../Symfony/Component/Console/Command/Command.php:205
    .../Symfony/Component/Console/Tester/CommandTester.php:66
    .../symfony-standard/vendor/bundles/Sensio/Bundle/GeneratorBundle/Tests/Command/GenerateDoctrineEntityCommandTest.php:39

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

by lenar at 2011/07/26 23:56:46 -0700

@fabpot: and you modified all those tests? I only modified ```Tests/Command/GenerateDoctrineCrudCommandTest.php```
and that doesn't fail as I see from your log. I just provided example, though I could add necessary changes for other tests too.

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

by fabpot at 2011/07/27 00:09:32 -0700

@lenar: ah, sorry about that. Then, can you provide a fix for all the other tests too? Thanks a lot.

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

by lenar at 2011/07/27 00:22:54 -0700

@fabpot: actually what do you think about this kind of fix instead for tests: lenar/SensioGeneratorBundle@517f263cb0 instead my previous proposal (lenar/SensioGeneratorBundle@6ff3f26). Really simple, short and effective.

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

by fabpot at 2011/07/27 00:37:51 -0700

@lenar: looks good to me. Can you create a PR?

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

by lenar at 2011/07/27 00:45:36 -0700

@fabpot: sensio/SensioGeneratorBundle#60
2011-07-27 10:20:36 +02:00
Deni
e16ddcfd30 [FrameworkBundle] Renamed validators.cn.xliff to validators.zh_CN.xliff 2011-07-27 12:16:47 +04:00
Deni
62da90ad62 [FrameworkBundle] Fixed the Chinese translations by @heccjj
Merge remote-tracking branch 'heccjj/patch-1' into cn_translations
2011-07-27 12:02:44 +04:00
lenar
07298ac699 Detect EOF when reading input stream
[Console] Change back to fgets() in DialogHelper
2011-07-27 10:47:43 +03:00
Fabien Potencier
8700cd6154 fixed CS 2011-07-27 08:27:46 +02:00
Fabien Potencier
422522bcf8 merged branch aboks/mimetype_test (PR #1775)
Commits
-------

1283c47 [HttpFoundation] Fixed incorrect test; MimeTypeGuesser should be (and is) able to detect a path that is not a file also without the 'fileinfo' extension

Discussion
----------

[HttpFoundation] Fixed incorrect test when 'fileinfo' extension is not enabled

This test failed on my box with `fileinfo` disabled. The `FileNotFoundException` is thrown also when the `fileinfo`-extension is not enabled, so it should be expected.
2011-07-27 08:24:12 +02:00
Fabien Potencier
e45f265aba merged branch chtitux/patch-contrib-syntax (PR #1809)
Commits
-------

ae9f6a1 Format CONTRIBUTORS.md with MarkDown syntax

Discussion
----------

Format CONTRIBUTORS.md with MarkDown syntax

Just made a s/^/ - / for a "beautiful" list Markdown : ae9f6a16ce/CONTRIBUTORS.md
2011-07-27 08:22:19 +02:00
Fabien Potencier
de9f8ab47e added a unit test for previous merge 2011-07-27 08:00:56 +02:00
Fabien Potencier
c248f8123d merged branch craue/patch-9 (PR #1787)
Commits
-------

c558b78 avoid rendering the `ChoiceType` separator if all `choices` are `preferred_choices`

Discussion
----------

avoid rendering the `ChoiceType` separator if all `choices` are `preferred_choices`

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

by fabpot at 2011/07/24 00:51:21 -0700

The same change should be made to the PHP template.

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

by fabpot at 2011/07/25 00:31:39 -0700

I forgot to ask you to add some unit tests too. Thanks.

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

by craue at 2011/07/25 10:23:34 -0700

Are you asking for PHPUnit tests? If so, unfortunately, I'm not able to add those because I haven't used PHPUnit yet. ;)

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

by lenar at 2011/07/25 12:47:51 -0700

I would prefer ```choises | length``` without spaces as everywhere else.

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

by lenar at 2011/07/25 12:50:32 -0700

@fabpot: Since <option disabled> is unclickable in browser (by HTML spec) this really doesn't change anything (something not there is as unclickable) except the the look when rendered. I have hard time to imagine what could become unit-testable here by this change.

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

by stof at 2011/07/25 13:03:47 -0700

@lenar unit testing is not about what the browser could do. What should be unit-tested is that an example will only preferred choices does not output the separator, which is exactly what this PR is about

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

by stof at 2011/07/25 13:04:03 -0700

@lenar unit testing is not about what the browser could do. What should be unit-tested is that an example will only preferred choices does not output the separator, which is exactly what this PR is about

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

by lenar at 2011/07/25 13:08:33 -0700

@stof: ok, put this way you are definitely right.

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

by craue at 2011/07/25 13:37:50 -0700

@lenar: You're right about the spaces. I'm using them in my projects but will remove them here for the sake of consistency.

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

by stloyd at 2011/07/25 13:40:40 -0700

@craue I will write today/tomorrow test to cover your code and send you PR.

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

by craue at 2011/07/25 14:00:26 -0700

@stloyd: That would be nice. But I'm still not that familiar with Git(Hub). Is there anything I have to take care of?

Also, I'd like to squash my three commits into one ... if this is possible for an open PR and if I find out how to do that easily. :D

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

by fabpot at 2011/07/26 00:18:22 -0700

@craue: yes, you should squash your commits into one and use `--force` when you push (the PR will automatically be updated accordingly).
2011-07-27 07:59:53 +02:00
Fabien Potencier
c6308a5daf merged branch stof/trans_locale (PR #1808)
Commits
-------

85c0087 [TwigBridge] Made the locale configurable for the trans and transchoice tags
3ea31a0 [TwigBridge] Made the locale configurable for the trans and transchoice filters

Discussion
----------

Trans locale

This allows setting the locale when translating in a Twig template. This was already allowed in the Translator and in the PHP templates
2011-07-27 07:44:42 +02:00
Fabien Potencier
bddfb9f052 merged branch husinluck/master (PR #1822)
Commits
-------

0832f4d Updated Persian translation
2a4fca8 translated validators resources into Persian

Discussion
----------

Persian translation

Added Persian validator translations
2011-07-27 07:43:45 +02:00
Fabien Potencier
1c564f39ca merged branch dlsniper/patch-1 (PR #1820)
Commits
-------

be4b77d Updated Romanian translation

Discussion
----------

Updated Romanian translation

Updated Romanian translation for validation messages to match the latest messages.
2011-07-27 07:43:39 +02:00
Fabien Potencier
84875b5761 merged branch aboks/dutch_translations (PR #1821)
Commits
-------

9883c60 [FrameworkBundle] Updated Dutch validator translations

Discussion
----------

[FrameworkBundle] Updated Dutch validator translations
2011-07-27 07:43:28 +02:00
Hossein Bukhamsin
0832f4d92f Updated Persian translation 2011-07-27 09:31:14 +04:30
Hossein Bukhamsin
2a4fca8f8f translated validators resources into Persian 2011-07-27 09:18:19 +04:30
heccjj
057cf2fc97 Edited src/Symfony/Bundle/FrameworkBundle/Resources/translations/validators.cn.xliff via GitHub 2011-07-27 10:21:49 +08:00
Arnout Boks
9883c603a7 [FrameworkBundle] Updated Dutch validator translations 2011-07-27 00:07:10 +02:00
dlsniper
be4b77d407 Updated Romanian translation 2011-07-27 01:00:05 +03:00
Fabien Potencier
b56a40c9b6 merged branch stloyd/patch-8 (PR #1819)
Commits
-------

fe8e0ad [Validator] Sync polish translation

Discussion
----------

[Validator] Sync polish translation
2011-07-26 20:50:06 +02:00
Fabien Potencier
9b6a7c996d merged branch xmontana/patch-1 (PR #1818)
Commits
-------

321dd45 Updated spanish and catalan translations

Discussion
----------

Updated spanish and catalan translations

Added new translations based on the indonesian updated file.
2011-07-26 20:49:40 +02:00
Fabien Potencier
ac65da5d84 merged branch alifity/updated_indonesian (PR #1817)
Commits
-------

a66a0ff updated missing validator translation #8

Discussion
----------

updated missing validator translation #8
2011-07-26 20:49:20 +02:00
Joseph Bielawski
fe8e0ad414 [Validator] Sync polish translation 2011-07-26 21:37:22 +03:00
Xavier Montaña Carreras
321dd45eea Updated spanish and catalan translations 2011-07-26 20:15:58 +02:00
Alif Rachmawadi
a66a0ff076 updated missing validator translation #8 2011-07-27 00:06:51 +07:00
Fabien Potencier
3c0693b34e merged branch alifity/updated_indonesian (PR #1816)
Commits
-------

c95f461 Updated indonesian translation

Discussion
----------

Updated indonesian translation
2011-07-26 17:26:25 +02:00
Alif Rachmawadi
c95f4619e6 Updated indonesian translation 2011-07-26 22:12:00 +07:00
Fabien Potencier
cae31a72c2 merged branch jdreesen/fix-02 (PR #1814)
Commits
-------

b6ff4d8 [FrameworkBundle] Updated German validator translation

Discussion
----------

[FrameworkBundle] Updated German validator translation
2011-07-26 15:15:45 +02:00
jdreesen
b6ff4d837b [FrameworkBundle] Updated German validator translation 2011-07-26 14:49:09 +02:00
Fabien Potencier
8664c7ae8d merged branch fatganz/master (PR #1812)
Commits
-------

6d56f74 Fixed typo in ukrainian validator messages translation

Discussion
----------

Updated Ukrainian validator translation

Fixed typo in Ukrainian validator messages translation
2011-07-26 14:48:53 +02:00
Rostyslav Kinash
6d56f741f4 Fixed typo in ukrainian validator messages translation 2011-07-26 15:08:50 +03:00
Fabien Potencier
748bf6233c merged branch fatganz/master (PR #1811)
Commits
-------

5d6ec70 Added ukrainian validator transaltions

Discussion
----------

Ukrainian validator messages

Added Ukrainian translation for validator messages
2011-07-26 13:46:30 +02:00
Rostyslav Kinash
5d6ec70b88 Added ukrainian validator transaltions 2011-07-26 14:38:53 +03:00
Théophile Helleboid - chtitux
ae9f6a16ce Format CONTRIBUTORS.md with MarkDown syntax 2011-07-26 13:24:23 +02:00
Christian Raue
c558b78bc6 avoid rendering the ChoiceType separator if all choices are preferred_choices 2011-07-26 12:55:46 +02:00
Fabien Potencier
fe5ac6aa6e merged branch elliot/issue-1768-expected-alias (PR #1807)
Commits
-------

d664f5f Changed the wording of the exception thrown when Bundle::getAlias() returns something different to the Container::underscore version, fixes #1768

Discussion
----------

Changed exception wording

Changed the wording of the exception thrown when Bundle::getAlias() returns something different to the Container::underscore version, fixes #1768
2011-07-26 12:31:13 +02:00
Elliot Anderson
d664f5f087 Changed the wording of the exception thrown when Bundle::getAlias() returns something different to the Container::underscore version, fixes #1768 2011-07-26 20:18:06 +10:00
Fabien Potencier
853935fbab [HttpFoundation] made PHP_AUTH_PW optional 2011-07-26 09:32:45 +02:00
Fabien Potencier
acd9d09ada [HttpKernerl] fixed some unit tests 2011-07-26 09:28:27 +02:00
Fabien Potencier
5c13835d21 merged branch aboks/event_trace (PR #1786)
Commits
-------

9d8e6f6 [FrameworkBundle] Changed TraceableEventDispatcher to log calls to event listeners _before_ actually calling them

Discussion
----------

[FrameworkBundle] Log calls to event listereners _before_ calling them

The current implementation of `TraceableEventDispatcher` logs calls to event listeners _after_ actually calling them. This leads to strange logs when an event listener triggers another event.

For example, if I attach some `LoginListener` to the `security.interactive_login`-event, the log will look something like this:
<pre>
...
User "myusername" has been authenticated successfully
Notified event "security.interactive_login" to listener "MyVendor\MyBundle\EventListener\LoginListener::onSecurityInteractiveLogin".
Notified event "kernel.request" to listener "Symfony\Component\Security\Http\Firewall::onKernelRequest".
...
</pre>
From the logs it looks like the `kernel.request` event was fired after the user was authenticated, whereas it was actually the listener to `kernel.request` that caused the user to be authenticated.

By logging the call to the event listener _before_ calling it, the logs will look like this:
<pre>
...
Notified event "kernel.request" to listener "Symfony\Component\Security\Http\Firewall::onKernelRequest".
Notified event "security.interactive_login" to listener "MyVendor\MyBundle\EventListener\LoginListener::onSecurityInteractiveLogin".
User "myusername" has been authenticated successfully
...
</pre>
In my opinion this makes the causal relationship between the events clearer.

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

by stof at 2011/07/24 11:18:48 -0700

👍 for this.
2011-07-26 09:24:48 +02:00
Fabien Potencier
37a127aca3 merged branch snc/patch-1 (PR #1790)
Commits
-------

5219f81 Using the $status parameter instead of fixed value when creating a RedirectResponse.

Discussion
----------

Using the $status parameter instead of fixed value

I checked the usages and the optional `$status` parameter is never used, so maybe another option would be to remove the parameter completely...

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

by jaugustin at 2011/07/25 03:11:00 -0700

maybe you could test that $status is a valid redirect code

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

by stloyd at 2011/07/25 04:40:21 -0700

@jaugustin This check is already included in `RedirectResponse` class.
2011-07-26 09:23:40 +02:00
Fabien Potencier
18b1a66c2a partially reverted previous commit 2011-07-26 09:22:13 +02:00
Fabien Potencier
91a41020a8 merged branch sasezaki/BrowserKit_useragent (PR #1789)
Commits
-------

266e60e Don't tell a lie to every WebServers

Discussion
----------

Please don't tell a lie to every WebServers

Fake Useragent name should be only in test case .
2011-07-26 09:21:10 +02:00
Fabien Potencier
195a66fd9d merged branch stloyd/patch-6 (PR #1800)
Commits
-------

03bd20f FrameworkExtension - Remove unused variable

Discussion
----------

FrameworkExtension - Remove unused variable
2011-07-26 09:19:24 +02:00
Fabien Potencier
72201a2485 merged branch 1ed/hungarian-validator-messages (PR #1803)
Commits
-------

987eb54 [FrameworkBundle] updated hungarian validator messages

Discussion
----------

[FrameworkBundle] updated hungarian validator messages
2011-07-26 09:06:25 +02:00
Fabien Potencier
04ac1fdba2 [Routing] changed UrlGeneratorInterface::generate() signature to allow passing objects instead of arrays 2011-07-26 08:00:41 +02:00
Christophe Coevoet
85c0087825 [TwigBridge] Made the locale configurable for the trans and transchoice tags 2011-07-26 01:27:09 +02:00