Commit Graph

11492 Commits

Author SHA1 Message Date
Fabien Potencier
ca567b5109 fixed CS 2012-10-28 08:06:38 +01:00
Fabien Potencier
5cdf696bde added a SecureRandomInterface 2012-10-28 08:06:38 +01:00
Fabien Potencier
234f7255bb rename String to StringUtils 2012-10-28 08:06:37 +01:00
Fabien Potencier
5849855eb9 moved the secure random dep for remember me as a constructor argument 2012-10-28 08:06:37 +01:00
Fabien Potencier
248703f6d8 renamed Prng to SecureRandom 2012-10-28 08:06:33 +01:00
Fabien Potencier
c0c89724b0 simplified the Prng code 2012-10-28 08:03:05 +01:00
Fabien Potencier
e5dc7afe90 moved the secure random class from JMSSecurityExtraBundle to Symfony (closes #3595) 2012-10-28 08:03:00 +01:00
Fabien Potencier
bde2e26b69 [Form] updated CHANGELOG 2012-10-25 15:43:31 +02:00
Fabien Potencier
3138332152 [Form] tweaked previous merge 2012-10-25 15:42:46 +02:00
Fabien Potencier
13319da017 merged branch Dattaya/form/trim_listener (PR #4115)
This PR was squashed before being merged into the master branch (closes #4115).

Commits
-------

878dd91 [2.2] [Form] Trim listener, unicode whitespace characters.

Discussion
----------

[2.2] [Form] Trim listener, unicode whitespace characters.

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

I have some questions. ZERO WIDTH SPACE (200B) doesn't belong to White_Space but it's invisible and treated as white space by the html4.1 spec - http://www.w3.org/TR/html4/struct/text.html#h-9.1
Same question for
* U+202F	NARROW NO-BREAK SPACE
* U+FEFF	ZERO WIDTH NO-BREAK SPACE

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

by Dattaya at 2012-04-26T09:49:25Z

It seems to me that the check `mb_check_encoding($data, 'UTF-8')` is unnecessary. For non utf8 characters `preg_replace` returns `null` if `u` flag is set.
From http://www.pcre.org/pcre.txt:
>When you set the PCRE_UTF8 flag, the byte strings  passed  as  patterns
       and subjects are (by default) checked for validity on entry to the rel-
       evant functions.
...
>If an invalid UTF-8 string is passed to PCRE, an error return is given.

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

by Dattaya at 2012-07-27T06:52:58Z

Forgot to mention that `Cc` property includes more characters than needed (`0009-000D` and `0085`) but I think control characters shouldn't appear in a form field anyway.

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

by stof at 2012-10-13T16:47:47Z

@Dattaya ping
2012-10-25 15:40:56 +02:00
Yaroslav Kiliba
878dd91d37 [2.2] [Form] Trim listener, unicode whitespace characters. 2012-10-25 15:40:54 +02:00
Fabien Potencier
38b1ab68a3 Merge branch '2.1'
* 2.1:
  bumped Symfony version to 2.0.19-DEV
  updated VERSION for 2.0.18
  update CONTRIBUTORS for 2.0.18
  updated CHANGELOG for 2.0.18
  updated vendors for 2.0.18
  Remove § about prototype_name customization in 2.0
  fix option name
  Add to DateFormats 'D M d H:i:s Y T' (closes #5830)
2012-10-25 15:12:09 +02:00
Fabien Potencier
1277e6746b Merge branch '2.0' into 2.1
* 2.0:
  bumped Symfony version to 2.0.19-DEV
  updated VERSION for 2.0.18
  update CONTRIBUTORS for 2.0.18
  updated CHANGELOG for 2.0.18
  updated vendors for 2.0.18
  Add to DateFormats 'D M d H:i:s Y T' (closes #5830)

Conflicts:
	CONTRIBUTORS.md
	src/Symfony/Component/HttpKernel/Kernel.php
	tests/Symfony/Tests/Bridge/Monolog/Processor/WebProcessorTest.php
	vendors.php
2012-10-25 15:11:50 +02:00
Fabien Potencier
887207402b bumped Symfony version to 2.0.19-DEV 2012-10-25 15:09:46 +02:00
Fabien Potencier
b95b4f7f40 merged branch stof/stub_lenient_getter (PR #5836)
This PR was merged into the master branch.

Commits
-------

bd37f24 [Locale] Implement the lenient isser in the StubIntlFormatter

Discussion
----------

[Locale] Implement the lenient isser in the StubIntlFormatter

When hardcoding other settings in the stub (the calendar, the locale...), the corresponding getters are implemented using the hardcoded value. This does the same for ``isLenient`` to be consistent.
2012-10-25 15:04:42 +02:00
Fabien Potencier
f31c6f97b6 merged branch greg0ire/fix_upgrade_prototype_name_option (PR #5833)
This PR was merged into the 2.1 branch.

Commits
-------

6fb4a1b Remove § about prototype_name customization in 2.0
8a347fd fix option name

Discussion
----------

Fix upgrade prototype name option
2012-10-25 15:04:22 +02:00
Christophe Coevoet
bd37f246e6 [Locale] Implement the lenient isser in the StubIntlFormatter 2012-10-25 14:24:18 +02:00
Fabien Potencier
03fbb485e0 updated VERSION for 2.0.18 2012-10-25 10:56:58 +02:00
Fabien Potencier
12dd94804c update CONTRIBUTORS for 2.0.18 2012-10-25 10:56:32 +02:00
Fabien Potencier
065512db62 updated CHANGELOG for 2.0.18 2012-10-25 10:56:03 +02:00
Fabien Potencier
4250c033d0 updated vendors for 2.0.18 2012-10-25 10:54:02 +02:00
Grégoire Paris
6fb4a1bbdc Remove § about prototype_name customization in 2.0
I don't think this was even possible in 2.0
2012-10-25 10:33:18 +02:00
Grégoire Paris
8a347fdba6 fix option name 2012-10-25 10:33:03 +02:00
Xavier REN
20898e53a6 Add to DateFormats 'D M d H:i:s Y T' (closes #5830)
DateFormat seen on the web
2012-10-25 09:07:48 +02:00
Fabien Potencier
67d9253127 Merge branch '2.1'
* 2.1:
  added missing use statment (closes #5825)
  Code cleanup
  [WebProfilerBundle] Fixed the use of nested macros
  Removed unused use statements.
  Nsdocblocks
  [ConfigDumpReference] avoid notice for variable nodes
  fixed fallback locale
  UniqueValidatorTest, Change message on assertions
  Documented removed _form_is_choice_group function

Conflicts:
	src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php
	src/Symfony/Bundle/WebProfilerBundle/Profiler/TemplateManager.php
2012-10-24 17:41:27 +02:00
Fabien Potencier
94f5f49894 merged branch bamarni/patch-10 (PR #5783)
This PR was merged into the 2.1 branch.

Commits
-------

3553276 [ConfigDumpReference] avoid notice for variable nodes

Discussion
----------

[ConfigDumpReference] avoid notice for variable nodes

When a variable node has an array as default value, a notice occurs later on because of an "array to string conversion", which is turned to an exception in debug mode (mandatory in order to run this command).
2012-10-24 17:35:37 +02:00
Fabien Potencier
20bb205f53 merged branch umpirsky/patch-1 (PR #5798)
This PR was merged into the master branch.

Commits
-------

40341bb Changed MoneyType::$patterns visibility.
c88fe94 Changed getPattern visibility

Discussion
----------

Changed getPattern visibility

It should be possible to override this method.

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

by Inori at 2012-10-22T19:25:37Z

Probably makes sense to also change visibility of [MoneyType::$patterns](c88fe94707/src/Symfony/Component/Form/Extension/Core/Type/MoneyType.php (L23))

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

by umpirsky at 2012-10-22T20:49:09Z

@Inori Fixed, thanks.
2012-10-24 17:32:38 +02:00
Fabien Potencier
562d3516fd merged branch nomack84/code_cleanup (PR #5818)
This PR was merged into the 2.1 branch.

Commits
-------

f06432b Code cleanup

Discussion
----------

Code cleanup

Not sure at the end if this good or not. If it is useless, just close it.
2012-10-24 17:12:48 +02:00
Stano Turza
11ba41bb17 added missing use statment (closes #5825) 2012-10-24 17:10:37 +02:00
Sasa Stamenkovic
40341bbb2f Changed MoneyType::$patterns visibility. 2012-10-22 22:46:47 +02:00
Fabien Potencier
28482f8216 merged branch stof/timeline_panel (PR #5801)
This PR was merged into the 2.1 branch.

Commits
-------

039bdfd [WebProfilerBundle] Fixed the use of nested macros

Discussion
----------

[WebProfilerBundle] Fixed the use of nested macros

Closes #5800

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

by stof at 2012-10-22T20:03:10Z

@fabpot ping. this regression is quite annoying as I like the profiler
2012-10-22 22:20:01 +02:00
Mario A. Alvarez Garcia
f06432bc73 Code cleanup 2012-10-22 10:37:12 -04:00
Christophe Coevoet
039bdfd7e7 [WebProfilerBundle] Fixed the use of nested macros
Closes #5800
2012-10-21 20:33:40 +02:00
Fabien Potencier
188589cf5d merged branch Seldaek/read-raw (PR #5799)
This PR was merged into the master branch.

Commits
-------

94f3ba5 [Console] Read input in raw mode to avoid processing escape sequences

Discussion
----------

[Console] Read input in raw mode to avoid processing escape sequences

As outlined in composer/composer#1238:

> Use read -r rather than the current read shell builtin to take a password from the user on the CLI, the -r is the raw option which means backslashes (\) aren't interpreted as escape characters, so \ is a literal \, otherwise they are nommed or double slashes become single ones etc.
2012-10-21 18:11:21 +02:00
Jordi Boggiano
94f3ba5236 [Console] Read input in raw mode to avoid processing escape sequences 2012-10-21 17:09:07 +02:00
Саша Стаменковић
c88fe94707 Changed getPattern visibility
It should be possible to override this method.
2012-10-21 15:41:00 +03:00
Fabien Potencier
cc10715815 merged branch umpirsky/minor-use-fixes (PR #5786)
This PR was submitted for the master branch but it was merged into the 2.1 branch instead (closes #5786).

Commits
-------

199a593 Removed unused use statements.

Discussion
----------

Removed unused use statements.
2012-10-20 09:11:36 +02:00
umpirsky
82dfd30f4e Removed unused use statements. 2012-10-20 09:11:36 +02:00
Fabien Potencier
bb636c857a merged branch drak/nsdocblocks (PR #5789)
This PR was squashed before being merged into the 2.1 branch (closes #5789).

Commits
-------

788cc2c Nsdocblocks

Discussion
----------

Nsdocblocks

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -
2012-10-20 09:10:30 +02:00
Drak
788cc2c7ef Nsdocblocks 2012-10-20 09:10:30 +02:00
Bilal Amarni
3553276af2 [ConfigDumpReference] avoid notice for variable nodes 2012-10-19 15:53:01 +03:00
Fabien Potencier
dba9bc3595 merged branch astina/fallback-locale-fix (PR #5746)
This PR was submitted for the master branch but it was merged into the 2.1 branch instead (closes #5746).

Commits
-------

96d87ad [Locale] fixed fallback locale

Discussion
----------

[Locale] fixed fallback locale

The `getFallbackLocale()` method in `Symfony\Component\Locale\Locale` did not return a fallback locale if the current locale (`Locale::getDefault()`) was a 5-char locale like de_CH.

`LocaleTest` failed when the locale was set to de_CH before running (see changes in LocaleTest).

(second attempt after messing up PR#5641)

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

by eriksencosta at 2012-10-15T05:08:25Z

Original PR: #5641.
2012-10-19 13:24:34 +02:00
Philipp Kräutli
965734e857 fixed fallback locale 2012-10-19 13:24:34 +02:00
Fabien Potencier
390f36a86b merged branch acasademont/locale_request_collector (PR #5769)
This PR was merged into the master branch.

Commits
-------

20f19bf Add the Request locale to the RequestDataCollector

Discussion
----------

[HttpKernel] Add the Request locale to the RequestDataCollector

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/acasademont/symfony.png)](http://travis-ci.org/acasademont/symfony)
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -

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

by acasademont at 2012-10-17T09:01:32Z

Seems like some Twig tests are failing in the master branch
2012-10-19 13:22:50 +02:00
Fabien Potencier
ab1a434eba merged branch eventhorizonpl/100ptc_component_httpfundation_p12 (PR #5773)
This PR was merged into the master branch.

Commits
-------

5b3ed82 MetadataBag test

Discussion
----------

MetadataBag test

Hi,

This patch adds MetadataBag test.

Best regards,
Michal
2012-10-19 13:22:05 +02:00
Fabien Potencier
bb0d402b70 merged branch pkruithof/patch-5 (PR #5781)
This PR was merged into the 2.1 branch.

Commits
-------

3e15d44 Documented removed _form_is_choice_group function

Discussion
----------

Documented removed `_form_is_choice_group` function

Also changed for-loop variables to match the current `form_div_layout.html.twig` code.
2012-10-19 13:21:27 +02:00
Fabien Potencier
22201dca3c merged branch spike31/patch-1 (PR #5782)
This PR was submitted for the master branch but it was merged into the 2.1 branch instead (closes #5782).

Commits
-------

d662e22 [DoctrineBridge] UniqueValidatorTest, Change message on assertions

Discussion
----------

[DoctrineBridge] UniqueValidatorTest, Change message on assertions
2012-10-19 13:20:42 +02:00
Gilles Gauthier
602a5eb3f4 UniqueValidatorTest, Change message on assertions 2012-10-19 13:20:42 +02:00
Peter Kruithof
3e15d448af Documented removed _form_is_choice_group function
Also changed for-loop variables to match the current `form_div_layout.html.twig` code.
2012-10-19 11:53:49 +03:00
Fabien Potencier
388cbff022 merged branch arnaud-lb/routing-php-dumper-simplification (PR #5734)
This PR was merged into the master branch.

Commits
-------

e54d749 [Routing] Simplified php matcher dumper (and optimized generated matcher)

Discussion
----------

[Routing] Simplified php matcher dumper (and optimized generated matcher)

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

This simplifies the php matcher dumper by allowing the dumper to re-organize routes in the dumper's own structure.

As a result, dumping is made a little simpler. This is also helps much for my hostname-based routes PR #3378.

Reorganizing routes also allows to find more optimization opportunities:

Currently the dumper wraps some collections of routes in a `if (0 === strpos($pathinfo, '/someprefix')` if the collection has user-defined prefix, and if it contains more than one direct child Route. This can miss many optimization opportunities.

The PR changes this by building a prefix tree of routes based on the static prefix extracted from routes' patterns. Then every leave having a prefix and more than one child (route or collection) will be wrapped in a `if` statement.

Example:

```
// No explicit prefix is specified
@Route("/cafe")
@Route("/cacao")
@Route("/coca")
```

is compiled like this:

```
if (url starts with /c) {
    if (url starts with /ca) {
        // test route "/cafe"
        // test route "/cacao"
    }
    // test route "/coca"
}
```

Some tests have many white space changes, much more easier to review [here](https://github.com/symfony/symfony/pull/5734/files?w=1)

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

by Tobion at 2012-10-13T02:27:54Z

I'm not sure if adding these specific classes just for dumping is the best implementation because they duplicate some logic and this optimization should also work out-of-the-box with the standard RouteCollection etc.
What I have in mind is a new method in RouteCollection like `RouteCollection::optimizeTree` that returns a new RouteCollection with the Routes that includes these optimization you do here. So there would probably be no need for the new classes.

It think it requires some changes in RouteCollection like the handling of prefix that must start with a slash currently, which is too restrictive. But it should be possible.

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

by arnaud-lb at 2012-10-13T12:52:32Z

@Tobion

> I'm not sure if adding these specific classes just for dumping is the best implementation because they duplicate some logic and this optimization should also work out-of-the-box with the standard RouteCollection etc.

I think RouteCollection and DumperCollection do not share the same concerns; and RouteCollection does things that don't allow to reorganize routes freely. For instance when adding a collection to a RouteCollection this changes all the child routes' prefix, requirements, options, etc. When setting a collection's prefix, this prepends the prefix to every child route's pattern, etc.

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

by arnaud-lb at 2012-10-15T08:50:23Z

squashed the CS commits

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

by arnaud-lb at 2012-10-15T13:50:16Z

@fabpot @Tobion this PR is ready to be merged if everyone agrees

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

by Tobion at 2012-10-16T18:10:36Z

When the above is fixed, I think it's good to be merged.

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

by arnaud-lb at 2012-10-17T08:40:20Z

Fixed; thanks @Tobion @stof for your reviews

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

by Tobion at 2012-10-19T03:30:10Z

@arnaud-lb could you please test whether your PR fixes #5780 as a side-effect?
I can image that it's fixed because you use `$route->compile()->getStaticPrefix();` for prefix optimization.
If it's fixed please add a test case. If not, that's fine, and we need to fix it in another PR.
2012-10-19 07:56:40 +02:00