Commit Graph

10324 Commits

Author SHA1 Message Date
Fabien Potencier
6e1e49e3d6 bumped Symfony version to 2.1.0-DEV 2012-07-09 11:39:24 +02:00
Fabien Potencier
70bb756cd8 updated VERSION for 2.1.0 2012-07-09 09:52:38 +02:00
Fabien Potencier
07a6ef5d68 [Locale] re-activated a test now that the bug is fixed 2012-07-09 09:45:48 +02:00
Fabien Potencier
c16de9bc30 merged branch gajdaw/issue_4719_appendix (PR #4795)
Commits
-------

d1a142e Issue #4719 - (Redis and Memcached fixes and test)

Discussion
----------

Issue #4719 - (Redis and Memcached fixes and test)

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

The same problem concerns `RedisProfilerStorage` and `BaseMemcacheProfilerStorage`.
Solution is similar.
2012-07-09 09:36:40 +02:00
Włodzimierz Gajda
d1a142ebe8 Issue #4719 - (Redis and Memcached fixes and test) 2012-07-09 09:18:22 +02:00
Fabien Potencier
5def75101e merged 2.0 2012-07-09 08:31:54 +02:00
Fabien Potencier
7a91cace9e merged branch Tobion/patch-1 (PR #4790)
Commits
-------

413e0ae fix another '0' problem

Discussion
----------

[HttpFoundation] fix another '0' problem
2012-07-09 08:31:25 +02:00
Fabien Potencier
fd1d5e8c10 merged branch eriksencosta/issue-4718 (PR #4794)
Commits
-------

28f002d [Locale] fixed bug on the parsing of TYPE_INT64 integers in 32 bit and 64 bit environments, caused by PHP bug fix :) (closes #4718)

Discussion
----------

[Locale] fixed bug on the parsing of TYPE_INT64 integers in 32 bit and 64 bit environments, caused by PHP bug fix

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

[![Build Status](https://secure.travis-ci.org/eriksencosta/symfony.png?branch=issue-4718)](http://travis-ci.org/eriksencosta/symfony)

Tests pass on PHP 5.3.3, 5.3.14 and 5.4.4 with ICU 4.2, 4.4 and 4.6 on 32 and 64 bit environments.
2012-07-09 08:28:53 +02:00
Eriksen Costa
28f002d978 [Locale] fixed bug on the parsing of TYPE_INT64 integers in 32 bit and 64 bit environments, caused by PHP bug fix :) (closes #4718) 2012-07-08 22:15:42 -03:00
Tobias Schultze
413e0ae6e6 fix another '0' problem 2012-07-09 00:24:52 +03:00
Fabien Potencier
b34bdd4639 merged branch bschussek/testfix (PR #4787)
Commits
-------

2e1941f [Form] Fixed failing test in AbstractLayoutTest

Discussion
----------

[Form] Fixed failing test in AbstractLayoutTest

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
2012-07-08 19:29:11 +02:00
Bernhard Schussek
2e1941fe55 [Form] Fixed failing test in AbstractLayoutTest 2012-07-08 16:56:41 +02:00
Fabien Potencier
97b017bf3f merged branch gajdaw/kernel_test_fix (PR #4766)
Commits
-------

6de6806 [Component][HttpKernel] fixed testGetRootDir() on Win

Discussion
----------

[Component][HttpKernel] fixed testGetRootDir() on Win

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

Method `getRootDir()` returns path containing slashes. On Windows machine `__DIR__` and `DIRECTORY_SEPARATOR` are backslashes. To pass the test on win machine we have to translate `\` into `/`.
2012-07-08 12:14:29 +02:00
Fabien Potencier
dd4235ad38 merged branch yanoosh/ticket_4719 (PR #4779)
Commits
-------

74aa502 [HttpKernel] Fix #4719. Added condition which verify existence of profiler dump file. If file does not exists script inserts record to csv file.

Discussion
----------

[HttpKernel] Ticket #4719. Each call of FileProfilerStorage->write method adds row to index file.

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT

Each call of FileProfilerStorage->write method adds row to index file even if profiler dump is only updated. Event dispatcher in kernel call several times write method to save fresh profiler info. I add condition which checks if profiler file already exist then ignore add row to index file.

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

by fabpot at 2012-07-08T08:04:33Z

Can you squash your commits before I merge? Thanks.

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

by yanoosh at 2012-07-08T10:08:48Z

Ready to merge.
2012-07-08 12:11:25 +02:00
Janusz Jablonski
74aa5021df [HttpKernel] Fix #4719. Added condition which verify existence of profiler dump file. If file does not exists script inserts record to csv file. 2012-07-08 12:07:05 +02:00
Fabien Potencier
b8f99ee19e merged branch arnaud-lb/memory-example-fix (PR #4769)
Commits
-------

8997853 [Security] fixed in_memory provider example

Discussion
----------

[Security] fixed in_memory provider example

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

This fixes the in_memory provider configuration example shown by config:dump-reference

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

by stof at 2012-07-06T11:07:50Z

👍
2012-07-08 10:05:28 +02:00
Fabien Potencier
443d70463c merged branch peterkokot/translations (PR #4784)
Commits
-------

df66d90 slovenian validators translations updated

Discussion
----------

Slovenian validators translations updated

Updated Slovenian validators translations for master branch.
2012-07-08 10:05:08 +02:00
Fabien Potencier
ea6fbba787 merged branch adrienbrault/patch-1 (PR #4780)
Commits
-------

0a4fd43 [Security] Fix typo in docblock

Discussion
----------

[Security] Fix typo in docblock

Bug fix: no
Feature addition: no
Backwards compatibility break: yes
Symfony2 tests pass:
Fixes the following tickets:
Todo:
License of the code: MIT
Documentation PR:
2012-07-08 10:03:49 +02:00
Peter Kokot
df66d90196 slovenian validators translations updated 2012-07-08 09:37:00 +02:00
Adrien Brault
0a4fd43e0e [Security] Fix typo in docblock 2012-07-07 20:42:10 +03:00
Fabien Potencier
22470fdb2c merged branch bschussek/issue4732 (PR #4773)
Commits
-------

c09bad8 [Form] Clarified how to adapt forms that inherited from FieldType for Symfony 2.1

Discussion
----------

[Form] Clarified how to adapt forms that inherited from FieldType for Symfony 2.1

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: comments in #4732
Todo: -
2012-07-06 19:45:36 +02:00
Fabien Potencier
0a3436d105 merged branch bschussek/issue4693 (PR #4772)
Commits
-------

d6e1f39 [Form] Fixed FormBuilder to maintain order of its children

Discussion
----------

[Form] Fixed FormBuilder to maintain order of its children

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #4693
Todo: -
2012-07-06 19:44:07 +02:00
Fabien Potencier
9146aded18 merged branch bschussek/issue4715 (PR #4771)
Commits
-------

5fe3f39 [Form] Made data mappers completely responsible for dealing with empty values. Removed duplication of code.
9bf6e8b [Form] Compound forms now always need a data mapper. Otherwise an exception is thrown.

Discussion
----------

[Form] Made requirements for data mappers stricter

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

This cleanup was done while trying to fix #4715, which is not easily fixable right now. It breaks BC for those people who do not extend `FormType` and manually construct `Form` instances, which hopefully nobody does as it is absolutely *not* recommended at this time.
2012-07-06 19:43:23 +02:00
Fabien Potencier
98b6fc7f01 merged branch Adel-E/patch-1 (PR #4775)
Commits
-------

dbb63ae Fix typo change String to string

Discussion
----------

Fix typo change "String" to "string"

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: N/A
Todo: N/A
License of the code: MIT
Documentation PR: N/A
2012-07-06 19:42:36 +02:00
Bernhard Schussek
c09bad8aea [Form] Clarified how to adapt forms that inherited from FieldType for Symfony 2.1 2012-07-06 19:15:07 +02:00
Adel
dbb63aee9c Fix typo change String to string 2012-07-06 19:52:14 +03:00
Bernhard Schussek
d6e1f39d09 [Form] Fixed FormBuilder to maintain order of its children 2012-07-06 17:32:57 +02:00
Bernhard Schussek
5fe3f39ebc [Form] Made data mappers completely responsible for dealing with empty values. Removed duplication of code. 2012-07-06 16:46:24 +02:00
Fabien Potencier
1cb9a74057 [Security] fixed automatic registration of the response listener when creating the listener
This is not a problem with Symfony, but when using the component
standalone (Silex for instance), the context listener might be
instantiated even if the firewall does not need to be fired. In that
case, the handle() method is not called, but the response listener is
called, which means that en empty token is stored in the session.

For Silex, it means that when authenticated, if you visit a 404 page,
you would be disconnected automatically.
2012-07-06 15:59:19 +02:00
Bernhard Schussek
9bf6e8ba59 [Form] Compound forms now always need a data mapper. Otherwise an exception is thrown. 2012-07-06 15:33:06 +02:00
Fabien Potencier
57581193d3 merged branch Inori/refactor-naming (PR #4767)
Commits
-------

819fe34 [Form] refactored variable name to be more consistent with rest of the naming

Discussion
----------

[Form] Refactored config variable naming to be more consistent

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

Since `clientTransformer` is renamed to `viewTransformer` everywhere, I think for consistency reasons config variable name should be changed too..

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

by stloyd at 2012-07-06T07:31:39Z

Maybe also rename of `normTransformers` to `modelTransformers` ? As this were changed too.

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

by Inori at 2012-07-06T07:40:53Z

@stloyd makes sense, done

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

by bschussek at 2012-07-06T08:24:43Z

Thanks for the cleanup. Can you squash the commits and prefix the message with "[Form]" please?

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

by Inori at 2012-07-06T08:43:49Z

@bschussek done

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

by bschussek at 2012-07-06T09:31:04Z

Thanks! @fabpot 👍
2012-07-06 12:00:31 +02:00
Arnaud Le Blanc
8997853dbd [Security] fixed in_memory provider example 2012-07-06 11:40:37 +02:00
Roman Marintsenko
819fe346e0 [Form] refactored variable name to be more consistent with rest of the naming 2012-07-06 11:41:38 +03:00
Włodzimierz Gajda
6de6806123 [Component][HttpKernel] fixed testGetRootDir() on Win 2012-07-06 08:26:06 +02:00
Fabien Potencier
a7ad32bde1 merged branch merk/patch-3 (PR #4765)
Commits
-------

0a43d7d Add missing include in OptionsResolver README.md

Discussion
----------

Add missing include in OptionsResolver README.md

There was a missing interface in the readme.
2012-07-06 08:19:23 +02:00
Tim Nagel
0a43d7d27c Add missing include in OptionsResolver README.md 2012-07-06 10:26:35 +10:00
Fabien Potencier
6b5be0b971 merged branch Divi/patch-1 (PR #4762)
Commits
-------

b9c5182 Fix error variable name.

Discussion
----------

Fix error variable name.

If a user has a custom charset (not UTF-8), a message should appear, but the variable name is wrong, and we got this message :

```
Notice: Undefined variable: messages in C:\Work\Project\vendor\symfony\symfony\src\Symfony\Bundle\FrameworkBundle\DependencyInjection\Configuration.php line 57
```

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

by 12k at 2012-07-05T12:28:03Z

![Not bad](http://29.media.tumblr.com/tumblr_lltzgnHi5F1qzib3wo1_400.jpg)
2012-07-05 14:43:07 +02:00
Sylvain Lorinet
b9c518213d Fix error variable name. 2012-07-05 15:21:41 +03:00
Fabien Potencier
73d3efb7a9 [FrameworkBundle] added a note about the classes cache 2012-07-05 08:00:39 +02:00
Fabien Potencier
1a37b78078 reverted #4542 2012-07-05 07:56:16 +02:00
Fabien Potencier
1cff9502ca merged branch lavoiesl/master (PR #4522)
Commits
-------

6f9eda9 [Form][Validator] Fixed generation of HTML5 pattern attribute based on Assert\Regex to remove delimiters.

Discussion
----------

[Form][Validator] Fixed generation of HTML5 pattern attribute based on Assert\Regex by removing delimiters or using a new option: htmlPattern.

Hopefully, this time is the good one…

* Fixes: [#3766, #4077, #4513, #4520, #4521]
* Bug fix: yes
* Feature addition: yes
* BC break: no
* Symfony2 tests pass: yes

In Issue #3766, it was asked that Assert\Regex generates HTML5 pattern attribute.
It was done in PR #4077, but the generated Regex is in delimited format which is not supported by HTML5.

Hence, `/[a-z]+/` would be converted to `[a-z]+`.
If flags are specified like in `/[a-z]+/i`, it cannot be converted and pattern validation will be disabled client-side. If is however now possible, using a new option, `htmlPattern`, to specify the pattern you want to be used.

Example:

```php
<?php
/**
 * @Assert\Regex(pattern="/^[0-9]+[a-z]*$/i", htmlPattern="^[0-9]+[a-zA-Z]*$")
 */
private $civic_number;
```

**Note**: [Documentation](http://symfony.com/doc/current/reference/constraints/Regex.html) should be updated accordingly.

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

by lavoiesl at 2012-06-08T15:45:17Z

God, I just found out you can "add more commits to this pull request by pushing to the master branch on lavoiesl/symfony"…

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

by travisbot at 2012-06-08T15:50:31Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1568634) (merged 2d767b41 into b84b46ba).

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

by petajaros at 2012-07-04T14:23:16Z

Anything new about this issue?

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

by lavoiesl at 2012-07-04T16:25:43Z

Alright, tests are passing using `phpunit -c phpunit.xml.dist --filter 'RegexValidatorTest'`. @travisbot reports errors because he can’t even start the tests due to dependencies, which is not related

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

by vicb at 2012-07-04T16:31:13Z

It should be ready to merge when you have taken the last comments into account. thanks.

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

by lavoiesl at 2012-07-04T16:39:05Z

So it seems this PR will finally pass, thanks a lot.

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

by vicb at 2012-07-04T17:03:35Z

Thank you for this PR and the changes.

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

by fabpot at 2012-07-04T17:10:20Z

@lavoiesl Can you squash your commits before I merge? Thanks.

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

by lavoiesl at 2012-07-04T17:25:18Z

There. I also left trace of some commits I did.

Thanks
2012-07-04 19:27:14 +02:00
Sébastien Lavoie
6f9eda9582 [Form][Validator] Fixed generation of HTML5 pattern attribute based on Assert\Regex to remove delimiters.
[Validator] Added delimiter escaping to Validator\Constraints\Regex::getNonDelimitedPattern

[Form][Validator] Added htmlPattern option for Regex Validation.

[Validator] Fixed Validator\Constraints\Regex::getNonDelimitedPattern variable declarations

[Validator] Fixed tests for Regex htmlPattern option (instead of html_pattern)

[Validation] tweaked generation of pattern to include .* when not anchors are present. Also removed the exception and made getNonDelimitedPattern private
2012-07-04 13:23:21 -04:00
Fabien Potencier
d4bd50a340 merged branch vicb/router/kp (PR #4745)
Commits
-------

0555913 [FrameworkBundle] Allow using kernel parameters in routes

Discussion
----------

[FrameworkBundle] Allow using kernel parameters in routes

Kernel parameters can now be used at any position in patterns, defaults and requirements.

Relates to: #3316, #3276

**Differences from 3316:**

- The substitution is now done in the `Router`,
- 3316 uses `$container->getParameterBag()` which is not part of the `ContainerInterface`. The way it been solved in this PR is that some code have been duplicated inside the `Router`, see `resolveString()`.

**BC break:**

Before this PR, nonexistent parameters would have be silently ignored (ie `%idontexist%` would not have been replaced). After this PR, they will throw an exception. However you can escape the value (ie `%%idontexist%%` will be accepted and replaced by `%idontexist%`).

_This behavior is not mandatory and can be reverted if needed. However this keeps the router more consistent with the DI_.

Any feedback ? @helmer @Koc

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

by Seldaek at 2012-07-04T12:40:08Z

👍 for consistency.

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

by helmer at 2012-07-04T13:07:11Z

+1 a much better solution to the problem than mine, closing #3316

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

by Tobion at 2012-07-04T13:21:59Z

How about escaping kernel params with `\%idontexist%` as I suggested it for route params in 4563?

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

by stof at 2012-07-04T13:28:55Z

@Tobion this would not be consistent with the way DI parameters are escaped elsewhere

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

by Koc at 2012-07-04T14:24:25Z

Looks good for me, thanx.
2012-07-04 18:48:59 +02:00
Fabien Potencier
615f278409 merged branch stof/composer_stability (PR #4750)
Commits
-------

30ca007 Changed the minimum stability to dev for the testsuite

Discussion
----------

Changed the minimum stability to dev for the testsuite

This will fix the testsuite as the default stability changed to stable in composer today
2012-07-04 18:47:49 +02:00
Fabien Potencier
aa0399ef27 merged branch gajdaw/finder_yaml_tests (PR #4749)
Commits
-------

18f8fc7 [Finder] tests for Yaml class

Discussion
----------

[Finder] tests for Yaml class

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

Additional tests improving tests coverage.
2012-07-04 18:45:07 +02:00
Christophe Coevoet
30ca007ae7 Changed the minimum stability to dev for the testsuite 2012-07-04 18:43:06 +02:00
Włodzimierz Gajda
18f8fc7ff0 [Finder] tests for Yaml class 2012-07-04 18:29:04 +02:00
Fabien Potencier
63463c4782 merged branch instaclick/ignore-validation-exception (PR #4748)
Commits
-------

383efdf Ignore validation exception so we get a more informative error message from $this->getXmlErrors().

Discussion
----------

Ignore validation exception so we get a more informative error message

Ignore validation exception so we get a more informative error message from $this->getXmlErrors().

This is consistent with https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Translation/Loader/XliffFileLoader.php#L82
2012-07-04 18:27:50 +02:00
Anthon Pang
383efdfadc Ignore validation exception so we get a more informative error message from $this->getXmlErrors().
This is consistent with https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Translation/Loader/XliffFileLoader.php#L82
2012-07-04 11:22:26 -04:00
Fabien Potencier
000d54cd27 merged branch fabpot/classloader-optim (PR #4729)
Commits
-------

3f9e8ff [ClassLoader] made ClassCollectionLoader::load() automatically include class dependencies
6f4d281 [ClassLoader] added missing support for PHP 5.4 traits

Discussion
----------

Classloader optimization

The first commit fixes support for PHP 5.4 trait.

The second one does several things:

 * it optimizes the recent merge so that the reflection class instance is only loaded once;
 * we use the fact that we now get all class dependencies to automatically add all class dependencies to the map.

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

by fabpot at 2012-07-03T17:26:46Z

I've updated to take into accounts traits.

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

by bamarni at 2012-07-04T11:58:57Z

great job 👍

I can't see it in the diff as this part hasn't changed, but somewhere in the autoReload block there is :
```
if ($meta[1] != $classes) {
    $reload = true;
}
```

It should be array_unique($classes), otherwise the file would be perpetually regenerated in autoReload mode when the input contains duplicate, because they're implicitely removed when dumping the files.

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

by fabpot at 2012-07-04T13:20:04Z

@bamarni I've added an `array_unique` call at the top (this bug existed before by the way).
2012-07-04 15:47:47 +02:00