Commit Graph

12301 Commits

Author SHA1 Message Date
Fabien Potencier
11ff4330c5 [Translation] fixed CS in unit tests 2012-12-14 14:07:36 +01:00
Fabien Potencier
c40db35c91 [Translation] removed some code that is not done anywhere else in Symfony 2012-12-14 14:04:54 +01:00
Fabien Potencier
63719a0a19 [Translation] created a new interface to avoid breaking BC 2012-12-14 13:44:07 +01:00
Fabien Potencier
23e9e65c00 [Translation] fixed name 2012-12-14 13:44:05 +01:00
Clemens Tolboom
5607732a66 [Translation] added Metadata to MessageCatalogue 2012-12-14 13:34:43 +01:00
Fabien Potencier
da98371c35 merged branch francisbesset/check_mime_type (PR #6345)
This PR was merged into the 2.0 branch.

Commits
-------

d3f5f3a Added comment
773d818 [FrameworkBundle] Added a check on file mime type for CodeHelper::fileExcerpt()

Discussion
----------

[FrameworkBundle] Added a check on file mime type for CodeHelper::fileExcerpt()

Fixed a bug on `CodeHelper::fileExcerpt()`.

I add a check on the file mime type because I use a phar of phpunit and when a exception throwed in a test, Symfony build a page with the stack trace of the exception.

The phpunit.phar path is in the stack trace and Symfony call `highlight_file()` function on this file path.
`highlight_file()` cannot parse the phar file and warnings are displayed.

This PR add a check on the file mime type.
**This PR can be applied on 2.0, 2.1 and master branches.**

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes (The broken test seems to be unrelated to this change)
Fixes the following tickets: -
License of the code: MIT
2012-12-14 12:58:39 +01:00
Fabien Potencier
1e0a9d0ea7 merged branch robinduval/validator-translation (PR #6347)
This PR was merged into the master branch.

Commits
-------

7511a50 [Validator] Card validation - French translations

Discussion
----------

[Validator] Card validation - French translations
2012-12-14 12:57:57 +01:00
robinduval
7511a500ce [Validator] Card validation - French translations 2012-12-14 12:35:25 +01:00
Bilal Amarni
f0743b10aa Merge pull request #1 from pylebecq/2.0
[FrameworkBundle] Added tests for trusted_proxies configuration.
2012-12-14 03:35:09 -08:00
Francis Besset
d3f5f3a44f Added comment 2012-12-14 12:28:48 +01:00
Fabien Potencier
410677d55a merged branch Tobion/patch-1 (PR #6346)
This PR was merged into the master branch.

Commits
-------

efa6c91 [Routing] add missing phpdoc return

Discussion
----------

[Routing] add missing phpdoc return
2012-12-14 12:17:22 +01:00
Pierre-Yves LEBECQ
555e777b0c [FrameworkBundle] Added tests for trusted_proxies configuration. 2012-12-14 12:05:15 +01:00
Francis Besset
773d818d6b [FrameworkBundle] Added a check on file mime type for CodeHelper::fileExcerpt() 2012-12-14 11:53:52 +01:00
Tobias Schultze
efa6c91139 [Routing] add missing phpdoc return 2012-12-14 11:40:56 +01:00
Fabien Potencier
f070e54c05 merged branch fabpot/console-select (PR #6343)
This PR was merged into the master branch.

Commits
-------

008dc8f [Console] tweaked the select() method in the dialog helper to be more consistent with other method in the same class
692b0f4 [Console] added select() method for DialogHelper

Discussion
----------

[Console] Add ability to select values interactively

This is a slightly modified version of #5417

Adds ability to select from value list:

    $values = array('One', 'Two', 'Three');
    $pick = $this->getHelper('dialog')->select($output, 'Pick a bundle:', $values, 2);
    var_dump($pick);

... would give the following CLI output:

    Pick a bundle:
      0   One
      1   Two
      2   Three
    > 1
    1

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

by Seldaek at 2012-12-14T09:07:40Z

Maybe the default value should be shown somehow?

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

by fabpot at 2012-12-14T09:28:42Z

@Seldaek: It's up to you to display it (probably in the question). That's how the other `ask*` methods work.

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

by Tobion at 2012-12-14T09:38:40Z

Would be nice to also add the ability to select multiple values (probably other PR).
So one can select each option individually to toggle it's selection. And one can select multiple with a range like `2-7` (as in the git console with `git add -i`).

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

by fabpot at 2012-12-14T09:45:10Z

@Tobion That's indeed something that should be done in another PR.
2012-12-14 10:45:33 +01:00
Fabien Potencier
008dc8f1ce [Console] tweaked the select() method in the dialog helper to be more consistent with other method in the same class 2012-12-14 10:43:16 +01:00
Serge Smertin
692b0f41ae [Console] added select() method for DialogHelper 2012-12-14 08:36:07 +01:00
Fabien Potencier
a482aa0640 [WebProfilerBundle] made a small optimization 2012-12-14 08:20:45 +01:00
Fabien Potencier
c6bd807726 merged branch jmikola/2.1-mongoclient (PR #6338)
This PR was merged into the 2.1 branch.

Commits
-------

f24e3d7 [HttpKernel] Revise MongoDbProfilerStorage::write() return value
78c5273 [Session] Document Mongo|MongoClient argument type instead of "object"
de19a81 [HttpKernel] Support MongoClient and Mongo connection classes
b28af77 [Session] Support MongoClient and Mongo connection classes
20e93bf [Session] Utilize MongoDB::selectCollection()

Discussion
----------

[2.1] Support PHP MongoDB driver 1.3.0+ in profiler/session classes

> Bug fix: yes
> Feature addition: yes
> Backwards compatibility break: no
> Symfony2 tests pass: yes
> Fixes the following tickets: #6130
> License of the code: MIT

I don't believe this is a BC break, but just to confirm:  the MongoDbSessionHandler constructor signature changed, as I removed the `Mongo` type hint.

Bug fix entails allowing MongoClient to be used by default if the new driver is available, since the original Mongo class is deprecated. I also removed the assumption about `MongoCollection::update()`'s return value, since it may be a status array now.

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

by jmikola at 2012-12-13T22:04:47Z

Lots of test failures, but they appear to be unrelated.
2012-12-14 08:19:02 +01:00
Fabien Potencier
318baf3112 merged branch alexcarol/patch-1 (PR #6340)
This PR was merged into the master branch.

Commits
-------

632f57d Corrected typo in catalan translation

Discussion
----------

Corrected typo in catalan translation
2012-12-14 08:17:48 +01:00
Fabien Potencier
422ad836fb merged branch igorw/patch-3 (PR #6341)
This PR was merged into the 2.1 branch.

Commits
-------

a5530c5 [Propel1Bridge] Fix "and => &&" CS in ModelChoiceList

Discussion
----------

[Propel1Bridge] Fix "and => &&" CS in ModelChoiceList

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

by willdurand at 2012-12-13T22:52:45Z

👍
2012-12-14 08:05:49 +01:00
Colin Frei
c21b12e896 [Form] handle BC use of deprecated stuff in non-test-methods. 2012-12-14 07:33:36 +01:00
Colin Frei
fc2be6ddc8 [Form] catch deprecated errors in tests 2012-12-14 07:31:09 +01:00
Colin Frei
800a032f07 [Form] replace bindRequest() with bind(), as bindRequest is deprecated 2012-12-14 07:29:01 +01:00
Igor Wiedler
a5530c5d54 [Propel1Bridge] Fix "and => &&" CS in ModelChoiceList 2012-12-13 23:51:22 +01:00
Alex Carol
632f57d862 Corrected typo in catalan translation 2012-12-13 23:08:14 +01:00
Jeremy Mikola
f24e3d79ea [HttpKernel] Revise MongoDbProfilerStorage::write() return value
This should be functionally equivalent, but will be more robust if update() ever returns a falsey value.
2012-12-13 16:41:47 -05:00
Jeremy Mikola
78c5273913 [Session] Document Mongo|MongoClient argument type instead of "object" 2012-12-13 16:21:49 -05:00
Jeremy Mikola
de19a81107 [HttpKernel] Support MongoClient and Mongo connection classes
MongoClient defaults its write concern to w=1 (i.e. "safe" writes), which means update() may return an array instead of boolean true. Check for this before returning from write().
2012-12-13 16:20:39 -05:00
Jeremy Mikola
b28af77101 [Session] Support MongoClient and Mongo connection classes
This provides compatibility with pre-1.3.0 and newer PHP MongoDB drivers.
2012-12-13 15:48:37 -05:00
Jeremy Mikola
20e93bf1a4 [Session] Utilize MongoDB::selectCollection() 2012-12-13 15:46:59 -05:00
Fabien Potencier
b43d7bf66b [Translation] fixed a unit test 2012-12-13 21:23:16 +01:00
Fabien Potencier
59d62b0aa2 merged branch umpirsky/rename-qt-loader (PR #6335)
This PR was merged into the master branch.

Commits
-------

74a06f8 QtTranslationsLoader class renamed to QtFileLoader.

Discussion
----------

[Translation] QtTranslationsLoader class renamed to QtFileLoader.

QtTranslationsLoader class renamed to QtFileLoader. QtTranslationsLoader is deprecated and will be removed in 2.3.

Fixes #6332.
2012-12-13 21:22:50 +01:00
Fabien Potencier
2447757a4e merged branch bschussek/datetimetostringtransformer (PR #6333)
This PR was merged into the 2.1 branch.

Commits
-------

b20c5ca [Form] Fixed reverse transformation of values in DateTimeToStringTransformer

Discussion
----------

[Form] Fixed reverse transformation of values in DateTimeToStringTransformer

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

The parts not given in the format are reset to the corresponding values of
the UNIX base timestamp. For example, when parsing with the format "Y-m-d",
parsing

    "2012-05-18"

now results in the date

    "2012-05-18 00:00:00 UTC"

instead of

    "2012-05-18 12:58:27 UTC"

as before, where the time part corresponded to the local server time.

Another example: When parsing with the format "H:i:s", parsing

    "12:58:27"

now results in

    "1970-01-01 12:58:27 UTC"

instead of

    "2012-12-13 12:58:27 UTC"

as before, where again the date part corresponded to the local server time.

This behavior is now consistent with DateTimeToArrayTransformer and
DateTimeToLocalizedStringTransformer.
2012-12-13 21:21:50 +01:00
Fabien Potencier
5a8534a5db merged branch umpirsky/fix-issue-5797 (PR #6331)
This PR was merged into the master branch.

Commits
-------

2196810 Added QtTranslationsLoader tests.
201818b Fixed #5797.

Discussion
----------

[Translation] Fixed #5797.

This should fix issue #5797.

What I did is prevented `Translator` to throw `NotFoundResourceException` if resource is not found and there are fallback locales to process. This happens for locales like `en_GB`, `fr_FR`...

I also tested this fix against real application which uses Validation component without full stack framework and I was able to use `en_GB` locale without any errors only after this fix.
2012-12-13 21:21:21 +01:00
umpirsky
74a06f84b6 QtTranslationsLoader class renamed to QtFileLoader. 2012-12-13 20:15:36 +01:00
umpirsky
219681092c Added QtTranslationsLoader tests. 2012-12-13 19:47:04 +01:00
Bernhard Schussek
b20c5ca2ef [Form] Fixed reverse transformation of values in DateTimeToStringTransformer
The parts not given in the format are reset to the corresponding values of
the UNIX base timestamp. For example, when parsing with the format "Y-m-d",
parsing

    "2012-05-18"

now results in the date

    "2012-05-18 00:00:00 UTC"

instead of

    "2012-05-18 12:58:27 UTC"

as before, where the time part corresponded to the local server time.

Another example: When parsing with the format "H:i:s", parsing

    "12:58:27"

now results in

    "1970-01-01 12:58:27 UTC"

instead of

    "2012-12-13 12:58:27 UTC"

as before, where again the date part corresponded to the local server time.

This behavior is now consistent with DateTimeToArrayTransformer and
DateTimeToLocalizedStringTransformer.
2012-12-13 19:30:06 +01:00
Fabien Potencier
4c3edc276a Merge branch '2.1'
* 2.1:
  [Console] Add support for parsing terminal width/height on localized windows, fixes #5742
  [Form] Fixed treatment of countables and traversables in Form::isEmpty()
  refactor ControllerNameParser
  [Form] Fixed FileType not to throw an exception when bound empty
  - Test undefined index #
  Maintain array structure
  Check if key # is defined in $value
  Update src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf
2012-12-13 19:25:06 +01:00
Fabien Potencier
521fcb1c8b merged branch Seldaek/consolfix (PR #6330)
This PR was merged into the 2.1 branch.

Commits
-------

d2231d8 [Console] Add support for parsing terminal width/height on localized windows, fixes #5742

Discussion
----------

[Console] Add support for parsing terminal width/height on localized windows

Fixes #5742

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

by pborreli at 2012-12-13T17:44:53Z

thanks
2012-12-13 19:14:26 +01:00
umpirsky
201818bd4b Fixed #5797. 2012-12-13 18:48:40 +01:00
Jordi Boggiano
d2231d8cd8 [Console] Add support for parsing terminal width/height on localized windows, fixes #5742 2012-12-13 18:42:00 +01:00
Fabien Potencier
99a66c97d5 merged branch vicb/kernel/stripcomments (PR #6328)
This PR was merged into the master branch.

Commits
-------

aab60e3 [HttpKernel] fix public Kernel::stripComments()

Discussion
----------

[HttpKernel] fix public Kernel::stripComments()

Needs fix as the method is public.

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

by fabpot at 2012-12-13T17:01:52Z

Can you explain what you mean by "Needs fix as the method is public."?

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

by vicb at 2012-12-13T17:15:05Z

@fabpot One can argue that the fix could not be reached if the method was private.
2012-12-13 18:31:33 +01:00
Fabien Potencier
548dc64639 merged branch fabpot/webprofiler-refactor (PR #6323)
This PR was merged into the master branch.

Commits
-------

142cffb fixed unit tests
fc444f1 fixed support for Twig loaders when they do not extend Twig_ExistsLoaderInterface
f005649 [WebProfilerBundle] decoupled the bundle from TwigBundle
35d63df removed the dependency on the container for exception handling

Discussion
----------

Webprofiler refactor

This PR removes two hard dependencies from WebProfilerBundle:

 * The dependency on the DIC;
 * The dependency on TwigBundle.

It also removes the dependency on the DIC in the exception controller from TwigBundle for more consistency.
2012-12-13 18:14:33 +01:00
Fabien Potencier
142cffbc4f fixed unit tests 2012-12-13 17:59:38 +01:00
Victor Berchet
aab60e33a9 [HttpKernel] fix public Kernel::stripComments() 2012-12-13 17:56:02 +01:00
Fabien Potencier
fc444f1a55 fixed support for Twig loaders when they do not extend Twig_ExistsLoaderInterface 2012-12-13 17:11:26 +01:00
Fabien Potencier
21f8f8c62d merged branch bschussek/issue6246 (PR #6322)
This PR was merged into the master branch.

Commits
-------

81bdab8 [Validator] Fixed: Arrays are validated recursively by default

Discussion
----------

[Validator] Arrays are validated recursively now by default

Bug fix: yes
Feature addition: yes?
Backwards compatibility break: yes
Symfony2 tests pass: yes
Fixes the following tickets: #6246
Todo: -
License of the code: MIT
Documentation PR: -
2012-12-13 16:20:40 +01:00
Fabien Potencier
722c19bca5 merged branch bschussek/issue5828 (PR #6321)
This PR was merged into the 2.1 branch.

Commits
-------

03b880f [Form] Fixed treatment of countables and traversables in Form::isEmpty()

Discussion
----------

[Form] Fixed treatment of countables and traversables in Form::isEmpty()

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #5826, #5828
Todo: -
License of the code: MIT
Documentation PR: -
2012-12-13 16:19:02 +01:00
Fabien Potencier
f005649315 [WebProfilerBundle] decoupled the bundle from TwigBundle 2012-12-13 16:01:47 +01:00