Commit Graph

8890 Commits

Author SHA1 Message Date
Alexander
915704c071 [Security] Move default authentication failure handling strategy to seperate class
[Security] Update configuration for changes regarding default failure handler
[Security] Fixes + add AbstractFactory test for failure handler
2012-07-08 19:59:10 +02:00
Alexander
c6aa392df7 [Security] Move default authentication success handling strategy to seperate class
[Security] Update configuration for changes regarding default success handler
[Security] Fix + add AbstractFactory test
2012-07-08 19:59:10 +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
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
Peter Kokot
df66d90196 slovenian validators translations updated 2012-07-08 09:37:00 +02:00
Francesc Rosàs
6d94f3eaa8 Ensure there is a session before getting the session id 2012-07-07 20:30:29 +02:00
Adrien Brault
0a4fd43e0e [Security] Fix typo in docblock 2012-07-07 20:42:10 +03: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
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
Tim Nagel
0a43d7d27c Add missing include in OptionsResolver README.md 2012-07-06 10:26:35 +10: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
Włodzimierz Gajda
b4d7a7e8f6 [Component][Finder][SplFileInfo] file_get_contents=>fpassthru 2012-07-04 18:50:56 +02: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
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
Włodzimierz Gajda
18f8fc7ff0 [Finder] tests for Yaml class 2012-07-04 18:29:04 +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
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
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
Jeremy Mikola
0fe56e6012 [Config] Fix comment typo 2012-07-03 12:34:31 -03:00
Fabien Potencier
3ee1b383af merged branch vicb/auto_start (PR #4724)
Commits
-------

c5470b0 [Session] Removes references to the deprecated 'auto_start' setting

Discussion
----------

[Session] Removes references to the deprecated 'auto_start' setting

fix #4721
2012-07-03 16:13:04 +02:00
Victor Berchet
c5470b06bb [Session] Removes references to the deprecated 'auto_start' setting 2012-07-03 15:44:06 +02:00
Victor Berchet
aef7663676 [FrameworkBundle] Create a dedicated template filename parser 2012-07-03 14:58:30 +02:00
Fabien Potencier
2335dd0d60 merged branch bamarni/compile-classes (PR #4694)
Commits
-------

26a1e0b [ClassLoader] ordered ClassCollectionLoader writing to avoid redeclaration at runtime

Discussion
----------

[HttpKernel] allowed classes to compile to be prepended

I had an issue when registering JMSDIExtraBundle before the frameworkBundle, because the bundle is adding a class to compile wich extends a class to compile added by the frameworkbundle (https://github.com/schmittjoh/JMSDiExtraBundle/blob/master/HttpKernel/ControllerResolver.php#L39).

In my kernel, the bundle was registered before the frameworkbundle, if it's the case, the class is writed before the symfony core class in the cache file, so it will trigger the autoloader to load the symfony core class, then we'll have a fatal error because we're declaring 2 times the same class.

I'm suggesting to add a way to prepend the classes to compile added by an extension, this way we could force classes from the core bundle to pe prepended, and avoid this kind of error with other bundles adding classes extending core classes or implementing core interface. I've also added it to the frameworkbundle.

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

by travisbot at 2012-07-01T12:32:28Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1750090) (merged a989d35c into a1b73887).

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

by schmittjoh at 2012-07-01T12:45:46Z

This doesn't sound really failure proof, better would be to resolve the compiled classes in a way that handles the dependencies gracefully regardless of the order that they are registered in.

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

by bamarni at 2012-07-01T13:03:15Z

yes that would be much cleaner, even if it's not perfect, I don't have any other examples, but I think in most of situations this error happens because of the frameworkbundle late registration?

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

by bamarni at 2012-07-01T23:07:24Z

I've added an automatic reordering as suggested. Now I don't get the error whatever the order of FrameworkBundle and JMSDIExtraBundle is.

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

by vicb at 2012-07-02T10:02:33Z

Does the algo really works ?

Let's say I have the following hierarchy `A < B < C` and the classes added in the following order; `C, B, A`. I believe that the algo would return `B, A, C` instead of `A, B, C`.

An other question: should the dependency resolution be implemented in the `ClassCollectionLoader` rather than in the compiler pass ?

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

by vicb at 2012-07-02T10:23:11Z

 @bamarni could you confirm the issue with the algo ? If it is confirmed, do you have time to work on a fix ?

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

by bamarni at 2012-07-02T11:05:53Z

the algo looks correct, there is a loop checking dependencies and appending the parent classes at the begining so it should also work with A > B > C, but I'll check and add a unit test.

You're right about the location it could belong there if we want a general fix, should I put it in the ClassLoader component?

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

by vicb at 2012-07-02T11:28:14Z

Yep please move the code to the ClassLoader.

You could also add some cache mechanism:
- ReflectionClass could be cached (they might be use mulitple times when some dependencies exist and are also used by the class loader)
- May be you could also cache the hierarchy of the classes

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

by bamarni at 2012-07-02T17:25:08Z

@vicb : indeed there were something wrong with the algo when it needed to handle more than 1 level of dependency, it's fixed, I've added a few test case and it passes.

Caching the dependencies found with reflection would be useful if people are dumping several files with some similar classes in the same process, but I don't see why we would need to cache the hierarchy?

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

by vicb at 2012-07-02T18:29:06Z

@bamarni I was referring to a local cache (ie local variable).

- On the first iteration, the code instantiate a reflection class,
- On other iteration you would instantiate again a reflection class for a subset of the classes
- ...
- In the end the former code instantiate again a reflection class for each class in order to get the file name, ...

I was also thinking of an other algo: count the number of parent classes for each classes to include and order classes according to this number. This would be a single loop only, what do you think ?

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

by bamarni at 2012-07-02T19:32:34Z

hum good idea counting the parents is cleaner, even though it looks enough, would it also make sense to treat interfaces and classes separately? I'm thinking about a file with all the interfaces at the begining (ordered by number of parents desc), then the classes would be appended (ordered by number of parents desc too).

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

by vicb at 2012-07-03T07:05:07Z

There is no real benefit in making the interfaces appear first but you can do it if it doesn't make the code more complex.

Please also add the `@throws` annotation to the methods.

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

by bamarni at 2012-07-03T09:37:28Z

@vicb : I've changed it to use the parents count, looks good to me.

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

by bamarni at 2012-07-03T12:23:46Z

changed

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

by bamarni at 2012-07-03T12:42:29Z

fixed
2012-07-03 14:53:35 +02:00
Bilal Amarni
26a1e0be5e [ClassLoader] ordered ClassCollectionLoader writing to avoid redeclaration at runtime 2012-07-03 14:40:59 +02:00
Tobias Schultze
5c6f848a7d [Routing] use faster approach for encoding rel segments
replaced the preg_replace code that was 1.4 times slower than the new code (verified with benchmark
2012-07-03 12:52:06 +02:00
Tobias Schultze
25d326b55e [Routing] fix encoding of path segments '.' and '..' 2012-07-03 12:52:05 +02:00
Tobias Schultze
51b610f8ba [Profiler] fix typehint 2012-07-03 13:04:37 +03:00
Victor Berchet
816539b110 [FrameworkBundle] Display an error message when 'session.auto_start' is used (deprecated) 2012-07-03 11:35:02 +02:00
Fabien Potencier
11e8a33c7c merged branch Tobion/4166 (PR #4530)
Commits
-------

3466896 [Routing] fix encoding of static static, so UrlGenerator produces valid URLs

Discussion
----------

[Routing] fix encoding of static text

Fixes #4166

As requested by Fabien, I split #4205 into multiple PRs.

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

by stof at 2012-06-09T12:49:32Z

github tells me this PR cannot be merged automatically. Could you rebase it ?

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

by Tobion at 2012-06-09T13:12:55Z

Done

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

by travisbot at 2012-06-09T13:18:18Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1576266) (merged 3466896a into 15b5aa4f).
2012-07-03 11:09:19 +02:00
Fabien Potencier
bf59b8677c merged branch fabpot/charset-fix (PR #4716)
Commits
-------

d9439ab made the charset overridable (closes #2072)

Discussion
----------

made the charset overridable (closes #2072)

The charset was configurable in a configuration file but it never worked:

    framework:
        charset: ISO-8859-1

Now, like for the cache and log dirs, you can configure the charset by
overriding the getCharset() method in the app kernel:

    public function getCharset()
    {
        return 'ISO-8859-1';
    }

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

by fabpot at 2012-07-03T07:26:04Z

See #2072 for the previous attempts to fix this issue.
2012-07-03 10:43:15 +02:00
Fabien Potencier
d9439aba71 made the charset overridable (closes #2072)
The charset was configurable in a configuration file but it never worked:

    framework:
        charset: ISO-8859-1

Now, like for the cache and log dirs, you can configure the charset by
overriding the getCharset() method in the app kernel:

    public function getCharset()
    {
        return 'ISO-8859-1';
    }
2012-07-03 10:28:30 +02:00
Fabien Potencier
f47b9a6625 [WebProfilerBundle] inlined a service (closes #4717) 2012-07-03 10:02:51 +02:00
Fabien Potencier
736aa210a2 merged branch simensen/normalize-querystring (PR #4711)
Commits
-------

6296a24 Standalone query string normalization

Discussion
----------

[HttpFoundation] Standalone query string normalization

I wanted to leverage query string normalization in a test. I considered copying this code to my own library but I noticed that the only instance data `getQueryString` needed to know from the `Request` was `QUERY_STRING` so I broke the rest out into a standalone static function.

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

by simensen at 2012-07-02T20:05:59Z

I made the requested changes.

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

by fabpot at 2012-07-02T20:10:27Z

Can you squash your commits? Thanks.

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

by simensen at 2012-07-02T20:16:52Z

Sure, no problem. Hopefully I did it correctly.
2012-07-02 22:18:33 +02:00
Beau Simensen
6296a241a8 Standalone query string normalization 2012-07-02 13:11:17 -07:00
Fabien Potencier
67a69ea357 [Security] updated CHANGELOG 2012-07-02 19:29:27 +02:00
Fabien Potencier
637aaacccb merged branch uwej711/security_target_path_master (PR #4409)
Commits
-------

8ffaafa Make the session entry for the target url firewall dependent.

Discussion
----------

[Security] Make the session entry for the target url firewall dependent.

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

If there are two firewalls (eg. main and admin), calling an protected admin url
will direct you to the login form of the admin. If I ignore this and go to the login
form of the main firewall directly I will end up being redirected to the stored
admin target url, which will lead me to the admin login form again.

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

by travisbot at 2012-05-25T09:33:44Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1431566) (merged 8ffaafa8 into 45849ce3).

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

by uwej711 at 2012-06-09T08:05:54Z

Doesn't this make sense or did this slip through? Or is there something missing?
2012-07-02 19:27:21 +02:00
avorobiev
036c15ecfa [DependencyInjection] Unescape class arguments part 2 2012-07-02 18:17:30 +04:00
avorobiev
19bdae1b90 [DependencyInjection] Fixed unescaping of class arguments 2012-07-02 18:10:38 +04:00
Fabien Potencier
81fe2ff8e2 merged branch fabpot/locale-listener (PR #4692)
Commits
-------

88caf3a [HttpKernel] removed the storage of the current locale in the session

Discussion
----------

[HttpKernel] removed the storage of the current locale in the session

Before this commit, the current locale was stored in the session (if one
was already started). That way, for the next requests, even if the
request locale attribute was not set, the locale was "restored".

But this is a really bad practice as it means that the same URL can have
a different content depending on the previous requests. It would have
been better if the Vary header was set but the locale can be different
from the value coming from the Accept-Language anyway.

This is a BC break but fortunately, you can restore the 2.0 behavior by
creating a simple event listener that contains the logic removed by this
commit.

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

by travisbot at 2012-07-01T06:56:48Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1748659) (merged 009e30f0 into 2e356c1a).

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

by schmittjoh at 2012-07-01T08:15:46Z

How about using a cookie instead? It would remove the BC break, and also be possible to use a vary header?

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

by fabpot at 2012-07-01T09:13:44Z

The goal is to make Symfony as stateless as possible; introducing a cookie would defeat this goal.

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

by drak at 2012-07-01T09:19:37Z

@fabpot - thank you for bringing this to attention. I was meaning to do it a long time ago. The requested language is entirely a per request issue and must always be so. URLs must only ever return one content, and not multiple (e.g. different languages). The correct way to behave is to detect the language based on URL and failing that where a language is not requested, to look at the preferred language from the browser request and if available it can be redirected to that resource (e.g. /fr). This is what we do in Zikula. We have a further session based setting for "preferred language" which if set will override the browser default.

In summary:

1. If the language is specified in the GET request, return that language always. E.g. domain.com/fr/foo should return a French version of foo

2. If no language is specified in the GET request: first check the session for a preferred language, otherwise check the browser string for the preferred language and then if necessary, redirect to that resource. We have a setting which additionally say "always have language in URL, and don't put language code in URL for default language"

This means what in Zikula we only ever have one URL per language version of a page, but it still allows for users to set their preferred language which is taken in to account mainly when they visit the homepage (but in fact any page without a specific language in the request).

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

by drak at 2012-07-01T09:38:06Z

+1 on this PR. Basically the request locale should be in the Request object and calculated according to the applications preferences.

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

by schmittjoh at 2012-07-01T12:38:25Z

I agree that content must be detected based on the request, but I strongly disagree with relying entirely on the URL.

@fabpot, if you think about it using a cookie would still be stateless. There would be no state whatsoever, the detection would be entirely based on the request. Whether the language information is transmitted in the URL or as part of request headers is for the developer to decide eventually, at least IMO. My suggestion would just provide a default which is more BC.

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

by drak at 2012-07-01T20:08:50Z

@schmittjoh it's not entirely from the URL, there are browser preferences and also user defaults ca nalso available but the latter is slightly higher level. IMO it's not really Symfony's job here, it's application level specific. We have a pretty good working example of that in Zikula. Anyone can easily implement your own requirements with a listener.

What is absolutely clear however is it is wrong for one URL to deliver more than one version of any content.

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

by schmittjoh at 2012-07-01T21:16:52Z

I'm 100% for this change. My suggestion would just be more BC while still keeping Symfony2 stateless. Of course, it can be easily implemented in userland if we do not care about BC here.

Regarding different URLs per content, I do not think that this is our decision to make. Generally, developers should be able to make whatever content negotation they see fit. Whether they rely solely on the URL, or also take other request headers into account should not be limited by Symfony2.

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

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

I've added a paragraph in the UPGRADE file with a listener example that can be used to keep BC.
2012-07-02 12:37:57 +02:00
Fabien Potencier
88caf3a370 [HttpKernel] removed the storage of the current locale in the session
Before this commit, the current locale was stored in the session (if one
was already started). That way, for the next requests, even if the
request locale attribute was not set, the locale was "restored".

But this is a really bad practice as it means that the same URL can have
a different content depending on the previous requests. It would have
been better if the Vary header was set but the locale can be different
from the value coming from the Accept-Language anyway.

This is a BC break but fortunately, you can restore the 2.0 behavior by
creating a simple event listener that contains the logic removed by this
commit.
2012-07-02 12:36:25 +02:00
Fabien Potencier
7407773234 [WebProfilerBundle] tweaked previous merge 2012-07-02 11:12:51 +02:00
Fabien Potencier
155320ae83 merged branch wodor/profiler_rely_on_profile_3372 (PR #3373)
Commits
-------

1472283 fixed CS
bc73487 renamed template to TemplateManager , moved profiler to the deps of manager
5fd6ed6 properties protected
abd0eb7 generating template names moved out from controller  to another class
6138e80 [Profiler] relying on config of displayed profile  instead of current config.

Discussion
----------

[2.2][Profiler] relying on config of displayed profile  instead of current config

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: code of ProfilerController is not covered by any test
Fixes the following tickets: #3372
Todo: ~

This fixes the exception which is raised when viewed profile has other  data collectors than in config of currently run profiler.
explained here
https://github.com/symfony/symfony/issues/3372

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

by fabpot at 2012-02-16T06:11:00Z

This should probably be done on the 2.0 branch. Also, I think we need to check if the panel is actually available in the current profiler (if not, we won't be able to display it anyway). So, both checks are important.

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

by wodor at 2012-02-18T10:15:40Z

defects mentioned by Stof are fixed
2012-07-02 11:05:28 +02:00
Bart van den Burg
6e168cdbb9 fixed dutch translations
mostly reverts a859f7

e-mailadres: http://www.onzetaal.nl/taaladvies/advies/e-mailadres-emailadres
"waarde" is not a neutral word, so it cannot be referred to as "het"
"verwachte" here is an adjective, not a verb - http://www.leestrainer.nl/Leerlijn%20werkwoorden/als%20bijvnm%20schrijven.htm
2012-07-02 10:54:18 +02:00
Fabien Potencier
28b6ff0f48 merged branch nomack84/wdt_documentation_link_color_fix (PR #4260)
Commits
-------

b804b94 Fixed style for the abbr tag
147cab7 [WDT] Fix the color of Documentation link to keep concistence.

Discussion
----------

[WDT] Fix the color of Documentation link to keep concistence.

This pull request is to make the Documentation link black as the other links of the WDT

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

by travisbot at 2012-05-11T13:33:24Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1304777) (merged 5a87a098 into 554e0738).

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

by Tobion at 2012-05-11T16:36:39Z

should be done via selector in the css file that is used for the WDT (also refactor the profiler token link like this)

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

by nomack84 at 2012-05-11T17:46:15Z

Done.

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

by travisbot at 2012-05-11T17:48:24Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1307502) (merged eee437c9 into 554e0738).

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

by travisbot at 2012-05-11T18:27:55Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1307838) (merged 3604f131 into dd0da03c).

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

by mvrhov at 2012-05-11T18:40:05Z

While you are at it, the controller text color is also wrong.

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

by travisbot at 2012-05-11T18:43:00Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1308018) (merged 147cab74 into dd0da03c).

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

by nomack84 at 2012-05-11T18:49:47Z

@mvrhov I don't see the difference.

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

by mvrhov at 2012-05-11T19:45:45Z

Set the color for abbr tag on your website to red or something like that. By default abbr color is set to black. My website has is set to #55555 so the controller name its barely visible.

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

by nomack84 at 2012-05-14T12:42:30Z

@mvrhov Done!

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

by travisbot at 2012-05-14T12:43:48Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1326494) (merged b804b942 into dd0da03c).

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

by nomack84 at 2012-05-15T13:09:59Z

Hi @fabpot,
Can you merge this? The only thing it does is add a missed style to the Documentation link and also to the abbr tag, as suggested by @mvrhov.
Greetings!
2012-07-02 10:42:21 +02:00
Harm van Tilborg
a859f729e3 Better Dutch translation of some validator messages 2012-07-02 11:20:06 +03:00
Fabien Potencier
dd1115a286 merged branch vicb/finder/regex (PR #4699)
Commits
-------

4d09fe6 [Finder] '*' and '?' are considered are glob pattern rather than delimiters (fix #4664)

Discussion
----------

[Finder] '*' and '?' are considered are glob pattern rather than delimit...

...ers (fix #4664)
2012-07-02 09:47:07 +02:00
Victor Berchet
4d09fe6e04 [Finder] '*' and '?' are considered are glob pattern rather than delimiters (fix #4664) 2012-07-02 09:05:19 +02:00
Fabien Potencier
b6e4fd0393 [HttpKernel] fixed a test 2012-07-01 23:28:11 +02:00
Fabien Potencier
6dd342c351 fixed previous merge 2012-07-01 23:25:00 +02:00
Fabien Potencier
d2b5208a77 merged branch dlsniper/session-start-fix (PR #4541)
Commits
-------

f72ba0a Fixed detection of an active session

Discussion
----------

[WIP][HttpFoundation][Session] Fixed detection of an active session

Bug fix: yes
Feature addition: no
Backwards compatibility break: not sure
Symfony2 tests pass: no
Fixes the following tickets: #4529
Todo: Fix failing tests
License of the code: MIT
Documentation PR: ~

This fixes the problem when the session variable inside $request now has always data in it as it's now more powerful but this introduces the problem that the old way of detecting if a session is started or not doesn't work anymore.

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

by travisbot at 2012-06-09T21:53:17Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1578839) (merged 9ae13e12 into 6266b72d).

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

by drak at 2012-06-10T01:57:59Z

Sessions should be started implicitly. The SF auto_start config parameter controls the session listener to start the session.

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

by dlsniper at 2012-06-11T06:46:02Z

So this patch is correct then and I should continue the work on it?

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

by drak at 2012-06-11T07:51:39Z

@dlsniper - no it's not correct.  The session should not be auto-started like this, @fabpot and I recently discussed it.

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

by dlsniper at 2012-06-11T07:52:55Z

@Drak, ok I'll remove the patch for auto_start then but the fix for start would still stand, right?

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

by drak at 2012-06-12T18:40:35Z

@dlsniper - I have no objection to the rest of the PR except for the autostart stuff.  I've annotated for clarity :)

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

by travisbot at 2012-06-12T19:51:12Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1604158) (merged 3499980e into 37550d23).

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

by travisbot at 2012-06-12T19:52:00Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1604166) (merged dcc73071 into 37550d23).

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

by dlsniper at 2012-06-12T19:56:51Z

Seems Travis doesn't like the squashing of commits that I've did but the PR does pass the normal tests.
@drak is this good for merging now?

Thanks :)

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

by dlsniper at 2012-06-13T09:05:09Z

@fabpot this can be merged safely, I've just applied the patch on my production application and the patch is ok, it's just travis failing.

Thanks

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

by travisbot at 2012-06-13T09:23:46Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1608735) (merged 1a6eabd2 into 37550d23).

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

by travisbot at 2012-06-13T09:28:26Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1608758) (merged 4e3a93c8 into 37550d23).

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

by dlsniper at 2012-06-13T09:29:28Z

I've noticed that this is failing, I'll fix it later on today.

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

by travisbot at 2012-06-13T15:14:01Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1611541) (merged 5504c4b7 into 37550d23).

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

by drak at 2012-06-13T15:23:47Z

It's possible that other tests are failing not related to this PR. Run the tests on the current master, and try rebasing your branch to the current master also.

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

by dlsniper at 2012-06-13T15:44:22Z

I've just reminded why this is failing on builds, I can't do them locally because of this:
```
Installing dev dependencies
Your requirements could not be solved to an installable set of packages.

        Problems:
                - Problem caused by:
                        - Installation request for doctrine/orm [>= 2.2.0.0, < 2.4.0.0-dev]: Satisfiable by [doctrine/orm-2.2.2, doctrine/orm-2.2.1, doctrine/orm-2.2.0, doctrine/orm-2.2.x-dev, doctrine/orm-2.3.x-dev].
```

I'll try and install this somehow and see what's wrong with it.

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

by mvrhov at 2012-06-13T18:08:58Z

@dlsniper: as @stof said to me this should be resolved in latest versions of composer, but it seems that is not. The problem is that composer cannot figure out that you are on dev-master if you try to instal dev. dependencies on feature branch. Take a look at the .travis.yml file on how to do a proper dev vendors install.
cc @Seldaek

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

by dlsniper at 2012-06-13T23:08:53Z

@mvrhov Thanks for pointing this out.

@drak I still got two tests not passing but I'm not sure how to fix them as adding $session->start() will either fail with the message that the session has already been started, the headers_sent() call which returns true. Any help with them will be greatly appreciated. Thanks!

Here is what the HttpKernel tests are returning:
```
There were 2 failures:

1) Symfony\Component\HttpKernel\Tests\EventListener\LocaleListenerTest::testDefaultLocaleWithSession
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'es'
+'fr'

/var/www/symfony-orig/src/Symfony/Component/HttpKernel/Tests/EventListener/LocaleListenerTest.php:51

2) Symfony\Component\HttpKernel\Tests\EventListener\LocaleListenerTest::testLocaleFromRequestAttribute
Expectation failed for method name is equal to <string:set> when invoked 1 time(s).
Method was expected to be called 1 times, actually called 0 times.

FAILURES!
Tests: 263, Assertions: 1025, Failures: 2, Skipped: 10.
```

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

by travisbot at 2012-06-13T23:42:59Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1614883) (merged 1004b7c0 into c07e9163).

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

by travisbot at 2012-06-13T23:53:06Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1614897) (merged f72ba0a2 into c07e9163).

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

by dlsniper at 2012-06-16T20:14:41Z

@stof / @vicb Hi, do either of you think that you can either point me out to the right direction for fixing this either ping someone else for home help as @drak doesn't seem available for this and at the moment I'm pretty much clueless in what direction I should take this fix.

Thanks!

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

by dlsniper at 2012-06-19T14:16:29Z

ping @fabpot Can you please provide some input on this one as I'm a bit stuck and seems noone else is available.

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

by drak at 2012-06-20T10:24:43Z

fyi - I'll be able to look again in a few days

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

by fabpot at 2012-07-01T07:53:28Z

I'm +1 to add the `isStarted()` method, but -1 for the change of `Request::hasSession`.

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

by drak at 2012-07-01T09:06:15Z

@fabpot, I agree. `hasSession()` should not be changed, it's semantically incorrect to make it return effectively "hasActiveSession".
2012-07-01 23:20:45 +02:00
Fabien Potencier
7ac10fefa0 merged branch jalliot/load-class-cache (PR #4542)
Commits
-------

f09789b [FrameworkBundle] Generate the class cache when warming up the cache

Discussion
----------

[FrameworkBundle] Generate the class cache when warming up the cache

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/jalliot/symfony.png?branch=load-class-cache)](http://travis-ci.org/jalliot/symfony)
Fixes the following tickets: -
Todo: -

With this PR, the commands `cache:clear` (if `--no-warmup` hasn't been specified) and `cache:warmup` generate the class cache. Now the first page load after clearing the cache does not take over one second anymore :)
Of course, if someone does not want to use the class cache for whatever reason, he can always remove the `$kernel->loadClassCache()` in his front controller and the cache will just be ignored...

On a side note, can someone explain why [SensioDistributionBundle does not warmup the cache in the Composer post-install script](https://github.com/sensio/SensioDistributionBundle/blob/master/Composer/ScriptHandler.php#L48)?

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

by travisbot at 2012-06-10T05:18:30Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1579114) (merged baecbaee into 6266b72d).

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

by travisbot at 2012-06-10T05:24:48Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1579154) (merged f09789b1 into 6266b72d).

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

by jalliot at 2012-06-28T23:18:54Z

@fabpot ping
2012-07-01 23:19:22 +02:00
Fabien Potencier
8a3f5bd323 merged branch Tobion/requestmatcher (PR #4582)
Commits
-------

7464dcd added phpdoc
c413e7b [Routing] remove RequestContextAwareInterface from RequestMatcherInterface
921be34 [Routing] fix phpdoc

Discussion
----------

[Routing] RequestMatcherInterface doesn't need context

Matchers that implement RequestMatcherInterface should match a Request, thus they don't need the request context.

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

by travisbot at 2012-06-14T21:39:48Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1624496) (merged f5ff1fe0 into 7c91ee57).

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

by schmittjoh at 2012-06-15T13:32:59Z

I think it makes sense to remove the RequestContext from the RequestMatcher.

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

by travisbot at 2012-06-15T15:54:28Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1628931) (merged 7464dcd2 into f881d282).

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

by Tobion at 2012-06-26T12:32:06Z

Anything missing?
2012-07-01 23:09:16 +02:00
Fabien Potencier
4f4c679eef [FrameworkBundle] fixed client insulation (closes #1726, closes #4608) 2012-07-01 23:01:26 +02:00
Fabien Potencier
c0e4760b38 merged branch kriswallsmith/form/mv-humanize (PR #4645)
Commits
-------

c1e4166 moved create of default form label to view layer

Discussion
----------

move create of default form label to view layer

A small optimization if you provide custom labels in the view layer (i.e. `{{ form_label(form.name, 'Your name') }}`

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

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

by travisbot at 2012-06-24T14:45:17Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1694310) (merged 37f0b774 into 0d4b02e4).

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

by travisbot at 2012-06-24T15:03:44Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1694418) (merged c1e4166e into 0d4b02e4).
2012-07-01 22:38:07 +02:00
Fabien Potencier
85d77c2ec9 merged branch flojon/patch-1 (PR #4638)
Commits
-------

eb26e89 [FrameworkBundle] Fix built-in server when using query params in paths

Discussion
----------

[FrameworkBundle] Fix built-in server when using query params in paths

$_SERVER['REQUEST_URI'] will contain the query params so is_file will fail.
I propose to use $_SERVER['SCRIPT_FILENAME'] instead which contains the full path and no query params.

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

by ajessu at 2012-06-23T10:17:34Z

I was going to make this comment on your approach in #4484, but I'll make it here, since that issue is already closed.

Your solution won't work on PHP 5.4.0, as `$_SERVER['SCRIPT_FILENAME']` will not be set [see PHP bug #60850](https://bugs.php.net/bug.php?id=60850).

Also PHP 5.4.1 and up, if you don't request a file explicitely, Ex:

     http://localhost:8000/app_dev.php

but a location, Ex:

    http://localhost:8000/

The value of the `$_SERVER['SCRIPT_FILENAME']` will be the router file, not the script name, which makes relying on `$_SERVER['SCRIPT_FILENAME']` inconsistent. [See this comment on the php bug](https://bugs.php.net/bug.php?id=60850#1331261652)

I'm not sure if (nor how?) the issue of the params should be addressed on this "default" router, to not make it overly complex.

For your use case, and this is just my own early opinion without much thought, in case we can't come up with a general solution, there is always the option of defining your own router and passing it to the `server:run` command with `--router` like so:

    php app/console server:run --router=app/config/my_own_router.php

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

by flojon at 2012-06-23T10:31:47Z

So would `$_SERVER['SCRIPT_NAME']` be more reliable? Like this:

    if (is_file($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . $_SERVER['SCRIPT_NAME'])) {
        return false;
    }

I did a simple test and `$_SERVER['SCRIPT_NAME']` is set to `/` when accessing the root (using PHP 5.4.3).

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

by flojon at 2012-06-23T10:51:22Z

Browse around the code a bit and `$_SERVER['SCRIPT_NAME']` has been there since PHP 5.4.0:
https://github.com/php/php-src/blob/php-5.4.0/sapi/cli/php_cli_server.c#L598

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

by travisbot at 2012-06-23T11:16:59Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1688361) (merged eb26e896 into 0d4b02e4).

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

by travisbot at 2012-06-24T10:23:52Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1688043) (merged 71855665 into 0d4b02e4).

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

by CHH at 2012-06-29T07:17:32Z

This works fine for me!

👍

Could someone please merge this? This issue makes the `server:run` command currently quite unusable, because it can't load CSS for example which has a `?v=` parameter.

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

by ajessu at 2012-06-29T08:25:14Z

👍 from me also. Works just like `$_SERVER['REQUEST_URI']`, but doesn't include the params.

Tested working on PHP 5.4.0 and 5.4.3.
2012-07-01 22:34:54 +02:00
Fabien Potencier
ed49e3be35 [Routing] removed trailing slash behavior on non-safe requests (refs #2626) 2012-07-01 19:02:05 +02:00
Fabien Potencier
16976be8ce [Routing] fixed indentation 2012-07-01 18:56:00 +02:00
Marc Abramowitz
c1fea1d8c8 fixed incorrect reference to set*Service() method 2012-07-01 12:35:01 +02:00
Fabien Potencier
a1b73887f7 [Yaml] fixed parsing when a mapping is mixed within a sequence and vice-versa (closes #4634) 2012-07-01 11:19:53 +02:00
Fabien Potencier
2e356c1ab9 [FrameworkBundle] removed the auto-starting of the session when a previous session exists (it is not needed anymore as the session is now always started on demand) 2012-06-30 20:44:16 +02:00
Sergey Linnik
0b02e3ce79 [FrameworkBundle] Removed unneeded parameter 2012-06-30 13:11:07 +04:00
Fabien Potencier
741927baf3 [FrameworkBundle] removed unneeded start call 2012-06-30 09:42:40 +02:00
Fabien Potencier
fe527d00c1 merged branch drak/session_on_demand (PR #4264)
Commits
-------

911db69 [FrameworkBundle] Typo fix
19eeac8 [HttpFoundation] Removed erroneous reliance on session.auto_start
dcac5d7 [HttpFoundation] Corrected docblocks and properties.
1fd66f3 [FrameworkBundle] Remove 'auto_start' configuration parameter.

Discussion
----------

[HttpFoundation] Remove session start on demand

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

This removes false reliance on ini directive `session.auto_start` to allow a session to start when session bags are accessed before the `SessionStorageInterface` is started.

Sessions must be explicitly started in all circumstances.

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

by stloyd at 2012-06-13T07:22:24Z

@drak Shouldn't you add note about this change in upgrade file ?

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

by drak at 2012-06-13T15:13:37Z

It's a development version change, so not really. But saying that, I have a bunch of documentation to amend when this gets merged and at that time I'll make sure the changelogs and upgrading are up to date as part of that.

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

by dlsniper at 2012-06-13T21:57:28Z

@drak If this change will kick in what does one user of Symfony 2 Standard must do in order to keep compat with this merge? I see that you said you'll update the docs but until that happens some might upgrade their app directly to master :)

Thanks.

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

by drak at 2012-06-14T01:36:04Z

@dlsniper - nothing. This corrects a bug and inconsistency.

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

by travisbot at 2012-06-29T17:48:42Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1739033) (merged 19eeac88 into 62100f1a).

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

by drak at 2012-06-29T17:55:13Z

@fabpot ping. The failing Travis is nothing to do with this PR (see the travis logs).

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

by travisbot at 2012-06-29T20:39:43Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1739805) (merged 911db69b into 62100f1a).
2012-06-30 09:39:50 +02:00
Drak
911db69bfe [FrameworkBundle] Typo fix 2012-06-29 20:13:19 +01:00
Drak
19eeac88ca [HttpFoundation] Removed erroneous reliance on session.auto_start 2012-06-29 18:05:14 +01:00
Drak
dcac5d7fd6 [HttpFoundation] Corrected docblocks and properties. 2012-06-29 18:04:40 +01:00
Drak
1fd66f3cdf [FrameworkBundle] Remove 'auto_start' configuration parameter. 2012-06-29 17:34:28 +01:00
Fabien Potencier
62100f1a18 merged 2.0 2012-06-29 18:03:08 +02:00
Fabien Potencier
b89b00fa20 bumped minimal version of Swiftmailer to 4.2.0 2012-06-29 18:02:19 +02:00
Fabien Potencier
df1050fa32 merged 2.0 2012-06-29 18:01:01 +02:00
Fabien Potencier
997bcfc420 [SwiftmailerBridge] allowed versions 4.2.* 2012-06-29 18:00:35 +02:00
Fabien Potencier
8ebe624b82 [HttpKernel] added some unit tests 2012-06-29 08:38:15 +02:00
Fabien Potencier
fd0e589c2b fixed sub-requests with a different method than the main request 2012-06-29 08:31:02 +02:00
Fabien Potencier
a725f023c1 fixed typo 2012-06-29 00:35:09 +02:00
Fabien Potencier
e0351c93df merged branch fabpot/request-methods (PR #4679)
Commits
-------

df8d94e added Request::getSchemeAndHttpHost() and Request::getUserInfo() (closes #4312, refs #3416, refs #3056)

Discussion
----------

added Request::getSchemeAndHttpHost() and Request::getUserInfo()

see #4312

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

by travisbot at 2012-06-28T15:22:03Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1730172) (merged 598bd56f into 0d275701).

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

by Seldaek at 2012-06-28T15:22:35Z

Why not just `getSchemeAndHost`? That sounds long enough, and is fairly explicit given the context.

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

by fabpot at 2012-06-28T15:25:34Z

@Seldaek because (and that's probably unfortunate) we have both `getHost()` and `getHttpHost()`. The former does not include the port whereas the latter does.

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

by Seldaek at 2012-06-28T15:26:42Z

Ok makes sense.

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

by travisbot at 2012-06-28T16:11:16Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1730630) (merged df8d94e3 into 884a8264).
2012-06-28 19:05:50 +02:00
Xavier Lacot
e44e21c2e9 Reverted to Symfony 2.0's signature, which made it simple to display only a subset of the routes of the application.
This is particularly useful for FOSJsRoutingBundle's fos:js-routing:debug command, which allows to filter the list of javascript-exposed routes.
2012-06-28 18:29:35 +02:00
Fabien Potencier
df8d94e33c added Request::getSchemeAndHttpHost() and Request::getUserInfo() (closes #4312, refs #3416, refs #3056) 2012-06-28 17:56:04 +02:00
Fabien Potencier
884a8264b3 fixed CS 2012-06-28 17:48:35 +02:00
Fabien Potencier
9fb567dc43 merged branch stealth35/populate_files (PR #2892)
Commits
-------

b217897 [HttpFoundation] Complete Request::overrideGlobals

Discussion
----------

[2.2][HttpFoundation] complete Request::overrideGlobals

Bug fix: yes
Feature addition: yes
Backwards compatibility break: yes
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/stealth35/symfony.png?branch=populate_files)](http://travis-ci.org/stealth35/symfony)Fixes the following tickets: -
Todo: -

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

by stealth35 at 2011-12-15T14:20:36Z

Thank guys, should be better now

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

by stealth35 at 2011-12-15T16:14:40Z

@stloyd ✌️

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

by stloyd at 2011-12-15T16:22:48Z

@stealth35 You should update also [`RequestTest`](https://github.com/symfony/symfony/blob/master/tests/Symfony/Tests/Component/HttpFoundation/RequestTest.php#L623) which would show you typos you have few mins ago ;-)

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

by stealth35 at 2011-12-15T16:57:16Z

@stloyd done, thanks for your review

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

by canni at 2011-12-15T20:27:28Z

As this is bugfix, this shouldn't be re-based against 2.0?

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

by stealth35 at 2011-12-15T20:50:05Z

@canni It's more a forget feature, I tagged it to bug fix because of the `FIXME`, and it's add a method, IMO there is no rush

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

by canni at 2011-12-15T20:55:28Z

@stealth35 no rush at all, I was just curious :)

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

by vicb at 2012-01-06T16:24:31Z

I would say "Backwards compatibility break: yes" i.e.tests have been modified.

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

by stealth35 at 2012-01-06T16:36:15Z

@vicb the tests are not modified, just some addition

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

by vicb at 2012-01-06T16:40:30Z

@stealth35 https://github.com/symfony/symfony/pull/2892/files#L2R46

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

by stealth35 at 2012-01-06T17:13:07Z

@vicb it's not a compatibility break ...

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

by vicb at 2012-01-06T17:19:35Z

Well, same inputs, different outputs, this is a compatibility break to me.
But however it is named we should not change the behavior of this class; Client values are values as passed by the client you should no try to guess them.

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

by stealth35 at 2012-01-06T17:32:41Z

@vicb the behavior ? when you change the GET or POST values with `HttpFoundation\*Bag` (replace/set) it's the same thing

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

by vicb at 2012-01-06T17:35:39Z

I am referring to the difference in behavior between the current implementation and the version in this PR.
They do not behave the same and that's why the tests have been modified.

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

by fabpot at 2012-02-14T23:33:42Z

any progress on this PR?

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

by vicb at 2012-02-15T07:48:34Z

To make it clear I strongly disagree with the modifs in this PR. Available to help if needed.

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

by stealth35 at 2012-02-15T09:24:50Z

@fabpot Well, `move_uploaded_file` will not work so I have some doubt about this, @vicb just don't like the fact to add the mime type type and the size, it's not an important thing, I can remove it we can discuss later about that,

@vicb the last thing to do, it's to recreate the weird php $_FILES array

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

by vicb at 2012-02-23T17:11:29Z

@stealth35 I don't think we can bypass the `move_uploaded_file` security check - which is good. Is there any interest in this PR w/o this ?

If no we should just update phpDoc comment and remove the FIXME (meaning we can not override the `$_FILES`).

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

by stealth35 at 2012-03-10T16:13:14Z

@vicb updated

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

by vicb at 2012-03-11T09:38:20Z

@stealth35 what about adding some unit tests ?

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

by stealth35 at 2012-03-11T11:06:44Z

> what about adding some unit tests ?

@vicb `request_order` is PHP_INI_PERDIR, so I don't really how to handle this

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

by vicb at 2012-03-11T11:15:55Z

by creating a `protected getRequestOrder()` method or something like this ?

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

by stealth35 at 2012-03-11T11:36:11Z

it's too bad to create a method just for this, I can make cond in the test

``` php
<?php
$request->initialize(array('get' => 'foo'), array('post' => 'bar'));
$request->overrideGlobals();

$request_order = ini_get('request_order');

if ('gp' === $request_order) {
    $this->assertEquals(array('get' => 'foo', 'post' => 'bar'), $_REQUEST);
} else if ('pg' === $request_order) {
    $this->assertEquals(array('post' => 'bar', 'get' => 'foo'), $_REQUEST);
}
// ...
```

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

by vicb at 2012-03-11T12:02:17Z

This would only test one case.

Some thoughts about your snippet:

* The init should probably be `$request->initialize(array('foo' => 'get'), array('foo' => 'post'));`,
* `$request_order` does not take into account `variables_order.ini`,
* missing `strtolower`

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

by fabpot at 2012-03-23T21:21:59Z

What's the status of this PR? What needs to be done before merging?

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

by stealth35 at 2012-03-24T18:33:42Z

@fabpot missing some tests, it's not essay to tests an `ini`directive, @vicb recommand a `getRequestOrder` method, it's not a bad idea

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

by vicb at 2012-03-24T20:06:53Z

and change `$request_order` to `$requestOrder` as suggested by @henrikbjorn I can't find where

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

by stealth35 at 2012-06-14T12:42:25Z

I need help for testing

``` php
<?php
$request = $this->getMock('Request', array('overrideGlobals', 'initialize'));

$request->expects($this->any())
        ->method('getRequestOrder')
        ->will($this->returnValue('gp'));

$request->initialize(array('foo' => 'fooget'), array('foo' => 'foopost'));
$request->overrideGlobals();

$this->assertEquals(array_merge($_GET, $_POST), $_REQUEST);
```
2012-06-28 17:48:02 +02:00
Fabien Potencier
9572e9bd6e merged branch eriksencosta/issue-3841 (PR #4601)
Commits
-------

a609d55 [Locale] fixed StubIntlDateFormatter to behave like the ext/intl implementation

Discussion
----------

[2.0][WIP][Locale] StubIntlDateFormatter should use the TZ environment variable instead of the PHP's date.timezone setting

Bug fix: yes
Feature addition: no
Backwards compatibility break: yes
Symfony2 tests pass: yes
Fixes the following tickets: #3841
Todo: Check ext/intl changes for the next PHP 5.4 release
License of the code: MIT

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

There were changes that need to be investigated for the next PHP 5.4 release:

 - [php-src @ eb346ef](eb346ef0f4)
 - [php-src @ 888e77f](888e77ff73)

A strong evidence of bug in ext/intl was found while testing `StubIntlDateFormatter`. See the comment available at the docblock of `StubIntlDateFormatterTest`'s `testFormatWithDefaultTimezoneIntlShouldUseTheTzEnvironmentVariableWhenAvailable()` method and the following Gist for test scripts: https://gist.github.com/2946342

Maybe the upcoming PHP 5.4 release fix this bug since it will use the PHP's `date.timezone` when no time zone is provided. If confirmed the bug, it will need to be reported to the ext/intl maintainers.

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

by travisbot at 2012-06-18T05:02:05Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1644431) (merged a609d55c into cd0aa378).

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

by fabpot at 2012-06-28T14:09:08Z

@eriksencosta Now that PHP 5.4.4 is out, our tests for the Locale components are broken. Is this PR ready to be merged?

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

by eriksencosta at 2012-06-28T14:53:14Z

@fabpot the failed test case seems unrelated to this issue. I will debug it.

Failed test: `Locale\Tests\Stub\StubNumberFormatterTest::testParseTypeInt64IntlWith32BitIntegerInPhp32Bit`

Recent build job: http://travis-ci.org/#!/symfony/symfony/jobs/1729618

I just need to confirm mine todo note. If you want, merge it, I'll track this and make a new PR if needed (possibly only to remove the TODO note.)
2012-06-28 16:57:13 +02:00
Fabien Potencier
0d2757014e merged branch jeanmonod/config-unittest-on-exprbuilder (PR #4570)
Commits
-------

9d730be Method rename and phpdoc fixes
e01a95e Add a set of unit tests for the ExprBuilder class

Discussion
----------

Add a set of unit tests for the Config/ExprBuilder class

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

by travisbot at 2012-06-13T14:55:31Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1611400) (merged e01a95e1 into c07e9163).

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

by jeanmonod at 2012-06-13T22:04:52Z

Hi there,

I write all these tests because I'll come latter with an other PR that extend the ExprBuilder functionality. But I'm not sure I use the best way for testing this class. It's working, but some refactoring suggestions will be welcome...
@stof and @schmittjoh what do you think about that?
2012-06-28 16:11:59 +02:00
Fabien Potencier
cd08db8e2a merged branch shieldo/mockable_formbuilderinterface (PR #4572)
Commits
-------

6b5b625 [Form] added FormBuilderInterface in Tests namespace, so as to enable easy mocking

Discussion
----------

[Form] added FormBuilderInterface in Tests namespace, so as to enable ea...

...sy mocking

Adding a ``FormBuilderInterface`` in the ``Tests`` namespace, along same lines as ``FormInterface`` already there, for the purposes of being able to mock it straightforwardly (as ``FormBuilderInterface`` extends ``\Traversable``, and therefore creating a mock in PHPUnit causes a fatal error that the mock ``must implement interface Traversable as part of either Iterator or IteratorAggregate``).  Currently in the tests a ``FormBuilder`` object is used with a mock event dispatcher and form factory passed into the constructor, but this is long-winded to have to do in tests for code outside the framework.

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

by travisbot at 2012-06-13T22:03:12Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1613957) (merged 6b5b625a into c07e9163).

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

by bschussek at 2012-06-14T07:22:33Z

👍
2012-06-28 16:10:42 +02:00
Fabien Potencier
be27ccf961 [FrameworkBundle] removed duplicated line 2012-06-28 16:05:05 +02:00
Fabien Potencier
84e619c016 merged branch hason/translationrequest (PR #4650)
Commits
-------

8ae0fa2 [FrameworkBundle] Fixed locale detection from request

Discussion
----------

[FrameworkBundle] Fixed locale detection from request

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

by travisbot at 2012-06-25T10:09:24Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1699743) (merged 8ae0fa21 into 03c8d4d2).
2012-06-28 16:03:12 +02:00
Fabien Potencier
b5e6613ad0 merged branch everzet/config-interface-check (PR #4659)
Commits
-------

d4a0988 [FrameworkBundle] added configuration interface check

Discussion
----------

[FrameworkBundle] added configuration interface check

Added check for ConfigurationInterface to config ref dumping
command. To ensure that configuration implements needed
`getConfigTreeBuilder()` command

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

by travisbot at 2012-06-26T09:19:03Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1708744) (merged d4a09881 into d131f9d3).
2012-06-28 15:07:45 +02:00
Fabien Potencier
f7d2ad2175 merged branch acasademont/camelize_property_path_add_and_remove_methods (PR #4673)
Commits
-------

9fabb3d [Form] Camelize 'add' and 'remove' methods in the PropertyPath

Discussion
----------

[Form] Camelize 'add' and 'remove' methods in the PropertyPath

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

This issue camelizes the 'add' and 'remove' methods, as it is already done with the 'set' method.
This fixes a problem with properties like 'custom_messages', where the 'add' and 'remove' methods are 'addCustom_message' and 'removeCustom_message' instead of 'addCustomMessage' and 'removeCustomMessage'.

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

by acasademont at 2012-06-27T18:16:36Z

Seems the tests are failing due to some unrelated test in PHP 5.3.14 and PHP 5.4. PHP 5.3.3 works fine

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

by travisbot at 2012-06-27T18:38:39Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1722847) (merged 9fabb3dc into d0e15472).
2012-06-28 15:05:21 +02:00
Kirill chEbba Chebunin
10e0b0b24b [Templating] Use LoaderInterface instead of abstract Loader in ChainLoader 2012-06-28 16:26:23 +04:00
Fabien Potencier
e8c0e07841 merged branch vlechemin/ticket_3472 (PR #3473)
Commits
-------

ab47a88 [FrameworkBundle][Translator] Fix test for request being available in order to get the locale.

Discussion
----------

[FrameworkBundle][Translator] Fix test for request being available.

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #3472
Todo: -
2012-06-27 20:31:58 +02:00
Albert Casademont
9fabb3dc2f [Form] Camelize 'add' and 'remove' methods in the PropertyPath
This issue camelizes the 'add' and 'remove' methods,
as it is already done with the 'set' method.
This fixes a problem with properties like 'custom_messages',
where the 'add' and 'remove' methods are 'addCustom_message'
and 'removeCustom_message' instead of 'addCustomMessage'
and 'removeCustomMessage'.
2012-06-27 19:26:17 +02:00
Fabien Potencier
d0e154725c merged branch Partugal/parameterBag (PR #4468)
Commits
-------

1227cc2 add escapeValue to ParameterBagInterface

Discussion
----------

add escapeValue to ParameterBagInterface

#4465

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

by travisbot at 2012-05-30T18:01:47Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1479725) (merged 1227cc2a into 49e213ce).

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

by drak at 2012-05-31T02:42:44Z

@bschussek - there are a few form tests failing that seem to have been merged into master and thus all other unrelated PRs are failing their travis build checks. @fabpot
2012-06-26 17:35:24 +02:00
Fabien Potencier
fb3f77174c merged branch albyrock87/master (PR #4662)
Commits
-------

4d0cfbb Fix Italian translations in Validator

Discussion
----------

Fix Italian translation in Validator

I hope this time it'll work!

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

by travisbot at 2012-06-26T11:08:19Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1709695) (merged 4d0cfbb6 into 42212394).

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

by fabpot at 2012-06-26T15:17:30Z

That's weird. It still does not appear on your account: https://github.com/albyrock87/symfony is a 404.

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

by henrikbjorn at 2012-06-26T15:20:51Z

he renamed the repository instead i think https://github.com/albyrock87/symfony-fix-form-validation-italian
2012-06-26 17:31:23 +02:00
Fabien Potencier
c4a8feb68b merged branch Wotre/master (PR #4640)
Commits
-------

81d0552 Adding the database to the DSN we are sending to the MongoDB server

Discussion
----------

Adding the database to the DSN we are sending to the MongoDB server

Adding the database to the DSN we are sending to the MongoDB server.

According to the [documentation from PHP](http://be2.php.net/manual/en/mongo.construct.php) the database will default to admin if it isn't specified in this DSN. Unfortunately the username we're trying to login with shouldn't have access to this database.

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

by travisbot at 2012-06-23T13:54:28Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1688817) (merged 2251be90 into 0d4b02e4).

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

by travisbot at 2012-06-25T11:34:17Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1700214) (merged 45d0748b into 0d4b02e4).

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

by Wotre at 2012-06-25T12:16:49Z

It looks to me like travisbot failed because of an error in the routing system that was fixed in c67cf8b56b, not because of the code I altered.

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

by travisbot at 2012-06-25T16:45:12Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1702410) (merged aa659463 into 0d4b02e4).

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

by fabpot at 2012-06-26T05:07:37Z

Can you squash your commits before I merge? Thanks.

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

by Wotre at 2012-06-26T12:02:02Z

I think I've managed to do that, but correct me if I've done something wrong :)

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

by travisbot at 2012-06-26T12:05:19Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1710220) (merged dcb79089 into 0d4b02e4).

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

by fabpot at 2012-06-26T12:14:28Z

@Wotre Unfortunately, that's wrong. You can read how to do that in the contrib docs: http://symfony.com/doc/current/contributing/code/patches.html#rework-your-patch

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

by Wotre at 2012-06-26T12:37:59Z

Thanks for the help, looks like I forgot the -f when pushing. It should be okay now
2012-06-26 14:41:54 +02:00
Wotre
81d0552ba4 Adding the database to the DSN we are sending to the MongoDB server 2012-06-26 13:59:41 +02:00
Alberto Aldegheri
4d0cfbb619 Fix Italian translations in Validator 2012-06-26 12:43:34 +02:00
Fabien Potencier
42212394cb fixed phpdoc 2012-06-26 12:06:05 +02:00
Fabien Potencier
21e2f29eb1 [Security] simplified some code 2012-06-26 11:30:41 +02:00
Fabien Potencier
16a0af1262 [Security] changed the HttpUtils constructor to tak both a UrlGenerator and a UrlMatcher instead of a Router (to make it useable by Silex) 2012-06-26 11:18:35 +02:00
everzet
d4a09881f1 [FrameworkBundle] added configuration interface check
Added check for ConfigurationInterface to config ref dumping
command. To ensure that configuration implements needed
`getConfigTreeBuilder()` command
2012-06-26 10:46:00 +02:00
Eduardo Gulias
4bfb6fddf7 [FrameworkBundle][Command] ContainerDebugCommand - Changed visibility to allow re use in childs 2012-06-26 09:01:12 +02:00
Fabien Potencier
5a8e20643e merged branch adrienbrault/http-foundation-fixes (PR #4483)
Commits
-------

9a74b85 [HttpFoundation] CS and phpdoc fixes

Discussion
----------

[HttpFoundation] CS and phpdoc fixes

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: -

Hey

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

by travisbot at 2012-06-02T00:30:49Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1504379) (merged 2f0117f2 into 1541fe26).

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

by fabpot at 2012-06-25T14:53:18Z

@adrienbrault Can you have a look at my comments?

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

by adrienbrault at 2012-06-25T16:24:49Z

Done! Sorry for the delay

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

by travisbot at 2012-06-25T17:50:24Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1702850) (merged 9a74b851 into 58436de1).
2012-06-25 22:29:10 +02:00
David Zuelke
34ab4812b5 Fix severity, file and line in ErrorExceptions
Fix `ErrorHandler` only handing an error message to the constructor of
`ErrorException`, but not the severity, file name or line number.
2012-06-25 22:04:54 +02:00
Adrien BRAULT
9a74b851e6 [HttpFoundation] CS and phpdoc fixes 2012-06-25 18:21:41 +02:00
Fabien Potencier
c67cf8b56b [Routing] fixed previous merge 2012-06-25 13:50:03 +02:00
Fabien Potencier
db9a8c1e4e merged branch Crell/routecollection-count (PR #4642)
Commits
-------

c350944 Add the Countable interface to RouteCollection.

Discussion
----------

Add the Countable interface to RouteCollection.

Since RouteCollection is a fancy-pants array of Routes, and it already is iterable, it would be nice if it were also countable.

There may be optimizations to be had here, but I figure this is a decent start.  There should be no BC breaks here, just some DX convenience.

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

by Crell at 2012-06-23T17:01:43Z

You Symfony people and your gratuitous whitespace... :-P

Both fixed and rebased.

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

by travisbot at 2012-06-23T17:25:31Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1689898) (merged 6b588eb3 into 0d4b02e4).

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

by travisbot at 2012-06-23T17:26:06Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1689902) (merged abd74cf5 into 0d4b02e4).

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

by travisbot at 2012-06-23T18:10:57Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1689975) (merged c3509446 into 0d4b02e4).

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

by mvrhov at 2012-06-24T07:11:12Z

@Crell running [php-cs-fixer](http://cs.sensiolabs.org/) on your changes will prevent you from being stoffed :P about CS

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

by stof at 2012-06-24T09:34:24Z

@mvrhov depends. The CS fixer will replace tabs with 4 spaces, but it will not fix it if using 2 spaces instead of 4. it cannot fix everything

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

by vicb at 2012-06-24T17:14:14Z

@Crell what is your use case ?

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

by fabpot at 2012-06-25T06:59:00Z

I'm not opposed to the change but what's the use case?

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

by lsmith77 at 2012-06-25T11:22:01Z

This is semi related to ideas we have for the dynamic router in the CMF. The 2 main reasons for the existence of the dynamic router are:
1) the fact that end users should be able to define new routes
2) the fact that there might just be too many routes to dump those efficiently to PHP

Now in some cases despite 1) the users might still want to dump key routes or even all routes as part of some deployment process to mod_rewrite or PHP when moving content from a staging database to a production database for better performance and reduced load on the database server.

Also even with the dynamic router it would be good to have tools available like ``app/console router:debug``.

But for both the use case of dumping some/all routes or when listing routes it might be necessary to implement some stop gap solutions to first check if this wouldn't lead to a too big collection. So it could be useful to be able to use whatever efficient solution the dynamic data store has for determining the count before starting to actually read the data from the data source.
2012-06-25 13:27:15 +02:00
Martin Hasoň
8ae0fa2178 [FrameworkBundle] Fixed locale detection from request 2012-06-25 11:49:17 +02:00
everzet
dbeff6979b [TwigBundle] added support for custom loader paths
Before this commit, there was no ability to specify custom
search paths for Twig loader. Lets say we have twig templates
outside bundles directories (parts of the domain logic, not
application) - we want to be able to load them.

This commit adds `loader_paths` parameter to twig config,
which is used to set custom paths to the loader.
2012-06-25 11:36:26 +02:00
Fabien Potencier
03c8d4d2b0 bumped Symfony version to 2.1.0-DEV 2012-06-25 09:25:26 +02:00
Kris Wallsmith
c1e4166ead moved create of default form label to view layer 2012-06-24 07:57:42 -07:00
Tobias Schultze
aeead1c7a7 fix #4643 2012-06-24 16:06:01 +03:00