Commit Graph

10290 Commits

Author SHA1 Message Date
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
Roman Marintsenko
819fe346e0 [Form] refactored variable name to be more consistent with rest of the naming 2012-07-06 11:41:38 +03: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
Fabien Potencier
3f9e8ffe5c [ClassLoader] made ClassCollectionLoader::load() automatically include class dependencies 2012-07-04 15:19:35 +02:00
Fabien Potencier
41da9c7068 merged branch Tobion/patch-3 (PR #4720)
Commits
-------

51b610f [Profiler] fix typehint

Discussion
----------

[Profiler] fix typehint

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

by fabpot at 2012-07-03T10:23:25Z

The profiler only works with Twig anyway.

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

by Tobion at 2012-07-03T10:29:18Z

Right. But why does he have this error: f47b9a6625 (commitcomment-1532164)

And since the class only uses methods of the general interface, I thought this makes it more reliable.

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

by fabpot at 2012-07-03T10:37:26Z

It was unrelated and I fixed that problem already.
2012-07-04 15:15:20 +02:00
Fabien Potencier
2115d0d13a merged branch shieldo/patch-7 (PR #4741)
Commits
-------

6751c87 [Profiler] fixed a couple of minor typos in a test

Discussion
----------

[Profiler] fixed a couple of minor typos in a test
2012-07-04 15:10:19 +02:00
Victor Berchet
0555913fbb [FrameworkBundle] Allow using kernel parameters in routes
Kernel parameters can now be used at any position in patterns, defaults and requirements.
2012-07-04 14:47:36 +02:00
Douglas Greenshields
6751c87b52 [Profiler] fixed a couple of minor typos in a test 2012-07-04 13:15:12 +02:00
Fabien Potencier
e71149b4d9 [Locale] skipped a test until #4718 is fixed (refs #4718) 2012-07-04 07:31:08 +02:00
Fabien Potencier
b9f005eab3 merged branch Tobion/query (PR #4735)
Commits
-------

c40a4e5 [HttpFoundation] fix query string normalization
f9ec2ea refactored test method
0880174 [HttpFoundation] added failing tests for query string normalization

Discussion
----------

[HttpFoundation] fix query string normalization

This fixes the query string normalization. There were several problems in it (see test cases that I added).
The main issue, that first catched my eye, was that the query string was urldecoded before it was exploded by `=`. See old code: `explode('=', rawurldecode($segment), 2);`. This means an encoded `=` (`%3D`) would falsely be considered a separator and thus lead to complete different parameters. The fixed test case is at `pa%3Dram=foo%26bar%3Dbaz&test=test`.

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

by Tobion at 2012-07-04T02:21:25Z

cc @simensen considering your PR 4711
2012-07-04 07:27:44 +02:00
Fabien Potencier
c4a33713a6 merged branch Tobion/request (PR #4737)
Commits
-------

d37003e [HttpFoundation] small fixes in Request

Discussion
----------

[HttpFoundation] small fixes in Request

phpdoc fixes,
making http_build_query explicit
fixing query string of '0', that was ignored.

Unfortunately this '0' problematic is omnipresent because PHP makes it so easy to get wrong (as it is converted to boolean false). I don't know how often I fixed such issue already.
2012-07-04 07:18:32 +02:00
Fabien Potencier
8d84e75a75 merged branch Tobion/prevsession (PR #4736)
Commits
-------

4d0ae1f [HttpFoundation] refactored hasPreviousSession

Discussion
----------

[HttpFoundation] refactored hasPreviousSession
2012-07-04 07:16:31 +02:00
Tobias Schultze
d37003ec56 [HttpFoundation] small fixes in Request 2012-07-04 04:13:21 +02:00
Tobias Schultze
4d0ae1fb0c [HttpFoundation] refactored hasPreviousSession 2012-07-04 03:41:37 +02:00
Tobias Schultze
c40a4e50a9 [HttpFoundation] fix query string normalization 2012-07-04 03:10:48 +02:00
Tobias Schultze
f9ec2ea3be refactored test method 2012-07-04 03:05:07 +02:00
Tobias Schultze
0880174a54 [HttpFoundation] added failing tests for query string normalization 2012-07-04 02:42:19 +02:00
Fabien Potencier
af57fe0f3a merged branch Seldaek/processfinder (PR #4731)
Commits
-------

45219ef [Process] Add default xampp path to the list of possible paths to check
28e1313 [Process] Clean-up/simplify code
56f473a [Process] Add extra dirs argument to the executable finder to allow searching more dirs

Discussion
----------

ExecutableFinder changes

It cleans up stuff a bit and adds a guess for xampp users that wouldn't have php in their path
2012-07-03 21:44:11 +02:00
Fabien Potencier
037b4d8096 [ClassLoader] fixed typo 2012-07-03 21:28:10 +02:00
Fabien Potencier
391ee67d68 merged branch vicb/profiler (PR #4727)
Commits
-------

eda439f [EventDataCollector] Display a better message when no events have been recorded
6b87981 [TimeDataCollector] Do not throw an exception when no events are recorded

Discussion
----------

[Profiler] Better support for collector in a production env

relates to #3706.

With this PR it is possible to:
- enable only the profiler in a production environment - the wdt being disabled you have to switch to the development environment to inspect the collected data,
- enable both the profiler and the wdt in a production environment (the use case form #3706).

@jmikola would this solve your use case ?
2012-07-03 19:54:59 +02:00
Fabien Potencier
a5f257210b merged branch bschussek/issue4480 (PR #4732)
Commits
-------

45d967e [Form] Fixed: Empty forms can be compound too

Discussion
----------

[Form] Fixed: Empty forms can be compound too

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #4480
Todo: -
2012-07-03 19:47:53 +02:00
Bernhard Schussek
45d967e95e [Form] Fixed: Empty forms can be compound too 2012-07-03 19:10:17 +02:00
Fabien Potencier
6f4d28181a [ClassLoader] added missing support for PHP 5.4 traits 2012-07-03 19:09:11 +02:00
Fabien Potencier
85977649a4 fixed unit tests 2012-07-03 19:06:57 +02:00
Jordi Boggiano
45219ef80f [Process] Add default xampp path to the list of possible paths to check 2012-07-03 18:58:37 +02:00
Jordi Boggiano
28e1313e5d [Process] Clean-up/simplify code 2012-07-03 18:58:27 +02:00
Fabien Potencier
3cfe916e65 [FrameworkBundle] fixed some unit tests 2012-07-03 18:55:00 +02:00
Jordi Boggiano
56f473a073 [Process] Add extra dirs argument to the executable finder to allow searching more dirs 2012-07-03 18:19:03 +02:00
Victor Berchet
eda439ffe5 [EventDataCollector] Display a better message when no events have been recorded 2012-07-03 18:15:27 +02:00
Victor Berchet
6b87981641 [TimeDataCollector] Do not throw an exception when no events are recorded 2012-07-03 18:15:20 +02:00
Fabien Potencier
23f41a21ca merged branch vicb/templates (PR #4723)
Commits
-------

aef7663 [FrameworkBundle] Create a dedicated template filename parser

Discussion
----------

[FrameworkBundle] Create a dedicated template filename parser

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

related to #3116
2012-07-03 17:47:16 +02:00
Fabien Potencier
4bb1431720 merged branch jmikola/patch-2 (PR #4728)
Commits
-------

0fe56e6 [Config] Fix comment typo

Discussion
----------

[Config] Fix comment typo
2012-07-03 17:43:58 +02:00
Jeremy Mikola
0fe56e6012 [Config] Fix comment typo 2012-07-03 12:34:31 -03:00
Fabien Potencier
480323c4e9 merged branch mageekguy/master (PR #4725)
Commits
-------

6155583 Remove bug in locale management in listener.

Discussion
----------

Remove bug in locale listener
2012-07-03 16:27:02 +02:00
Frédéric Hardy
615558394a Remove bug in locale management in listener. 2012-07-03 16:15:48 +02:00