Commit Graph

9291 Commits

Author SHA1 Message Date
Victor Berchet
cffcdc933f Improve the TypeGuesser to match the latest Sf2.1 2012-04-15 17:22:29 +02:00
Fabien Potencier
e7470ffebb merged branch willdurand/propel-bridge (PR #3949)
Commits
-------

51e19d5 Added propel1-bridge to the main composer.json
fba5d68 [Propel1] Added composer.json
bbf0122 [Propel1] Fixed phpunit.xml.dist

Discussion
----------

Added composer.json to the Propel bridge

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

by stof at 2012-04-15T00:14:12Z

you need to add it in the ``replace`` section for the main package too

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

by willdurand at 2012-04-15T00:17:13Z

Ah done, I forgot that file, thanks.
2012-04-15 08:56:17 +02:00
Fabien Potencier
48af0ba722 merged branch eriksencosta/locale-fixes-2.0 (PR #3947)
Commits
-------

b1ea552 [Locale] micro-optimization
663d218 [Locale] changed method name
bb61e09 [Locale] use the correct way for Intl error

Discussion
----------

[2.0][Locale] rebased PR 3765 plus few changes

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

#3765 was right but was made in master. Cherry-picked and rebased for 2.0.

Tests are passing.
2012-04-15 08:55:07 +02:00
Fabien Potencier
9af658a072 merged branch stloyd/fix_di (PR #3944)
Commits
-------

05b2238 [DependencyInjection] Fix for issue introduced in 3ae826a

Discussion
----------

[2.0][DependencyInjection] Fix for issue introduced in 3ae826a

Bug fix: yes
Tests pass: ![Travis CI](https://secure.travis-ci.org/stloyd/symfony.png?branch=fix_di)

Fix for issue introduced in 3ae826a

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

by eriksencosta at 2012-04-14T21:08:40Z

@fabpot The 2.0 test suite is broken without this fix.
2012-04-15 08:54:14 +02:00
William DURAND
51e19d56fd Added propel1-bridge to the main composer.json 2012-04-15 02:16:34 +02:00
William DURAND
fba5d68397 [Propel1] Added composer.json 2012-04-15 02:05:10 +02:00
William DURAND
bbf0122dd0 [Propel1] Fixed phpunit.xml.dist 2012-04-15 02:03:48 +02:00
Eriksen Costa
b1ea552448 [Locale] micro-optimization 2012-04-14 17:16:22 -03:00
Eriksen Costa
663d218e97 [Locale] changed method name 2012-04-14 17:15:57 -03:00
stealth35
bb61e09340 [Locale] use the correct way for Intl error 2012-04-14 17:11:17 -03:00
Joseph Bielawski
05b223817e [DependencyInjection] Fix for issue introduced in 3ae826a 2012-04-14 12:59:57 +02:00
Fabien Potencier
45d43d325a merged branch drak/clear_tag (PR #3940)
Commits
-------

80f96b7 [DependencyInjection] Add ability to clear tags by name.

Discussion
----------

[DependencyInjection] Add ability to clear tags by name.

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

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

by jalliot at 2012-04-14T07:50:51Z

@drak Just for information, what is the use case?

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

by drak at 2012-04-14T08:40:13Z

I'm using this to filter (and prevent) some listeners from being loaded
into the dispatcher.

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

by lsmith77 at 2012-04-14T09:37:39Z

tags are used by compiler passes. bundles that set these tags expect some defined bundle to take some specific actions on the given services. as such this is already a fairly "fragile" relationship. once other compiler passes then start messing with these tags it can get even more tricky. then again, as long as you know what you are doing ..

that being said .. this method just adds convenience, since one could always just get all the tags, unset and reset them in bulk.

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

by drak at 2012-04-14T09:42:04Z

@lsmith77 - exactly.
2012-04-14 12:39:38 +02:00
Fabien Potencier
0078faa84b merged branch jakzal/2.0-StaticMethodLoaderFix (PR #3937)
Commits
-------

089188f [Validator] Fixed StaticMethodLoader when used with abstract methods.

Discussion
----------

[Validator] Fixed StaticMethodLoader when used with abstract methods.

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #3179
2012-04-14 12:37:40 +02:00
Fabien Potencier
8cdf49bf87 merged branch stloyd/tests (PR #3941)
Commits
-------

bfc1aaf [Tests] Use proper assertions

Discussion
----------

[Tests] Use proper assertions

* `assertEquals(false, *)` -> `assertFalse(*)`
* `assertEquals(true, *)` -> `assertTrue(*)`
* `assertEquals(null, *)` -> `assertNull(*)`
* `assertEquals(x, count(*))` -> `assertCount(x, *)`
* `assertSame(false, *)` -> `assertFalse(*)`
* `assertSame(true, *)` -> `assertTrue(*)`
* `assertSame(null, *)` -> `assertNull(*)`

![Travis CI](https://secure.travis-ci.org/stloyd/symfony.png?branch=tests)

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

by drak at 2012-04-14T08:44:16Z

This is nice, but the commit message leads one to believe bugs are beings fixed, when actually it's just about using PHPUnit shortcut/covenience methods.
2012-04-14 12:36:31 +02:00
Joseph Bielawski
bfc1aafff6 [Tests] Use proper assertions 2012-04-14 10:05:05 +02:00
Drak
80f96b7a1b [DependencyInjection] Add ability to clear tags by name. 2012-04-14 11:56:21 +05:45
Jakub Zalas
089188f603 [Validator] Fixed StaticMethodLoader when used with abstract methods. 2012-04-13 21:40:36 +01:00
Fabien Potencier
d2fd9ce7b9 merged 2.0 2012-04-13 22:21:31 +02:00
Fabien Potencier
098b934410 merged branch vicb/profiler/listener_2.0 (PR #3935)
Commits
-------

01fcb08 [HttpKernel] Fix the ProfilerListener (fix #3620)

Discussion
----------

[HttpKernel] Fix the ProfilerListener (fix #3620)

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/vicb/symfony.png?branch=profiler/listener_2.0)](http://travis-ci.org/vicb/symfony)
Fixes the following tickets: #3620, PR #3618

Many thanks to @guilhermeblanco for helping with the tests.

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

by vicb at 2012-04-13T20:10:15Z

For ref: that's basically a backport of #3920 for 2.0
2012-04-13 22:16:12 +02:00
Victor Berchet
01fcb08ea2 [HttpKernel] Fix the ProfilerListener (fix #3620) 2012-04-13 21:51:39 +02:00
Sasa Stamenkovic
24bd8f4706 Added missing dot to translation messages. 2012-04-13 21:43:24 +02:00
Sasa Stamenkovic
4bff221e7b Added missing dot to translation messages. 2012-04-13 21:43:24 +02:00
Sasa Stamenkovic
74548943e2 Added missing dot to translation messages. 2012-04-13 21:43:24 +02:00
Sasa Stamenkovic
6e90c508d6 Updated upgrade instructions. 2012-04-13 21:43:24 +02:00
Sasa Stamenkovic
7e21dd1c57 Added missing dot to translation messages. 2012-04-13 21:43:23 +02:00
Fabien Potencier
d9fa1b94ae merged branch stof/form_cleanup (PR #3931)
Commits
-------

538819a [Form] Fixed the tests
9e956a8 [Form] Cleaned the FormValidatorInterface deprecation

Discussion
----------

[Form] Cleaned the FormValidatorInterface deprecation

This fixes my feedback on #3797

[![Build Status](https://secure.travis-ci.org/stof/symfony.png?branch=form_cleanup)](http://travis-ci.org/stof/symfony)
2012-04-13 21:41:36 +02:00
Fabien Potencier
8e59a4ed79 merged branch jmikola/doctrine-unique-proxies (PR #3933)
Commits
-------

41bdf26 [DoctrineBridge] Initialize proxies in UniqueEntityValidator

Discussion
----------

[DoctrineBridge] Initialize proxies in UniqueEntityValidator

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

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

by stof at 2012-04-13T18:17:57Z

I think you should use ``$em->initializeObject($value)`` instead (which is a no-op for other objects)

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

by jmikola at 2012-04-13T18:24:22Z

@stof: Thanks for the suggestion. I wasn't aware of that method.
2012-04-13 21:41:11 +02:00
Jeremy Mikola
41bdf26cb2 [DoctrineBridge] Initialize proxies in UniqueEntityValidator
Fixes #3163
2012-04-13 14:24:50 -04:00
Christophe Coevoet
538819a8bf [Form] Fixed the tests 2012-04-13 19:11:38 +02:00
Christophe Coevoet
9e956a8ecd [Form] Cleaned the FormValidatorInterface deprecation 2012-04-13 18:57:23 +02:00
Fabien Potencier
22177fa029 merged branch vicb/profiler/listener (PR #3920)
Commits
-------

b611db8 [Profiler] Sub requests are not Main requests
2551270 [Profiler] Minimize the number of Profile writes

Discussion
----------

[HttpKernel] Profiler Listener tweaks

* `setParent()` is called in [`Profile::addChild()`](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/Profiler/Profile.php#L180) in 2.1
* The profiles are now only saved once only in the listener (either at the end of the main request or on an exception)
* The profiles are now only saved once only in the TraceableEventDispatcher (twice for the root profile when there is a kernel.terminate' event

[![Build Status](https://secure.travis-ci.org/vicb/symfony.png?branch=profiler/listener)](http://travis-ci.org/vicb/symfony)

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

by vicb at 2012-04-13T11:15:25Z

Not so sure for the save part... I'll double check
2012-04-13 18:56:35 +02:00
Victor Berchet
b611db8e41 [Profiler] Sub requests are not Main requests 2012-04-13 18:42:55 +02:00
Victor Berchet
255127081a [Profiler] Minimize the number of Profile writes
squash

squash
2012-04-13 18:30:43 +02:00
Fabien Potencier
a4ea77bc5d merged branch phreaknerd/fix_issue_#3251_for_2.0 (PR #3926)
Commits
-------

3ae826a Fix issue #3251: Check attribute type of service tags

Discussion
----------

Fix issue #3251: Check attribute type of service tags

The attributes of service tags have to be of a scalar type.
It was possible to add arrays here with yaml-configuration.
2012-04-13 17:24:08 +02:00
Carsten Nielsen
3ae826a07d Fix issue #3251: Check attribute type of service tags
The attributes of service tags have to be of a scalar type.
It was possible to add arrays here with yaml-configuration.
2012-04-13 17:07:37 +02:00
Fabien Potencier
baabe2649e merged branch bschussek/remove-form-validator (PR #3797)
Commits
-------

6df7a72 [Form] Deprecated FormValidatorInterface and moved implementations to event listeners

Discussion
----------

[Form] Removed FormValidatorInterface and notion of form validators

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

![Travis Build Status](https://secure.travis-ci.org/bschussek/symfony.png?branch=remove-form-validator)

This cleanup has been lying on a disk for a while, so here it goes.

The FormValidatorInterface has been removed in order to reduce the complexity of the Form API. The same expressivity can be achieved by using POST_BIND event listeners. The POST_VALIDATE event introduced in e6577debf6 can be replaced by a POST_BIND listener with low priority.

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

by bschussek at 2012-04-11T15:19:24Z

Rebased on master.

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

by bschussek at 2012-04-12T12:46:14Z

@fabpot Can this be merged?
2012-04-13 17:00:38 +02:00
Bernhard Schussek
6df7a7223e [Form] Deprecated FormValidatorInterface and moved implementations to event listeners 2012-04-13 16:42:01 +02:00
Fabien Potencier
463114134b merged branch asm89/configurable-session-save-path (PR #3912)
Commits
-------

c0e7ee9 [FrameworkBundle] Make session save path configurable

Discussion
----------

[FrameworkBundle] Make session save path configurable

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/asm89/symfony.png?branch=configurable-session-save-path)](http://travis-ci.org/asm89/symfony)

Makes it possible to configure the session save path. It still defaults to saving sessions in the kernel cache dir. This might not be appropriate if you want to keep your user sessions after deploying your application.

As promised to @fabpot I will also do a PR on the docs explaining why this might be useful.

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

by drak at 2012-04-13T10:16:17Z

It might be good to default this value to `%kernel.cache_dir%/sessions`.

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

by stloyd at 2012-04-13T10:30:58Z

@drak https://github.com/symfony/symfony/pull/3912/files#L0R184

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

by drak at 2012-04-13T10:31:57Z

@stloyd need my eyes checked :-P
2012-04-13 14:51:40 +02:00
Fabien Potencier
1547a82eae merged branch Tobion/httpkernel-test (PR #3906)
Commits
-------

c331f4a HttpKernel test fix on windows

Discussion
----------

HttpKernel test fix on windows

The changes in `StopwatchEventTest` are only for consistency with the other tests in this file.

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

by drak at 2012-04-13T04:16:19Z

@fabpot - This seems to be an eternal problem with the these particular tests. I wonder if there is a better way to do this.  How about a simple greater than condition to show time has elapsed?

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

by Tobion at 2012-04-13T04:33:04Z

The tests are fine. I didn't change them. Just made it more consistent.

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

by drak at 2012-04-13T04:49:20Z

Yes, but if you look at the history of these tests files, they are constantly being tweaked for whatever reason (and they often fail on windows builds randomly). This is a clear indication the tests are not robust and a different approach is probably warranted if it can be found.

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

by drak at 2012-04-13T04:52:53Z

@Tobion - regarding the commit message, what does "fix" refer to if the tests are fine?

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

by Tobion at 2012-04-13T04:56:39Z

The test in `KernelTest` did not pass for me. That's fixed.
2012-04-13 14:45:21 +02:00
Alexander
c0e7ee9a6c [FrameworkBundle] Make session save path configurable 2012-04-13 10:48:56 +02:00
Fabien Potencier
114bc14c21 [FrameworkBundle] fixed name collision 2012-04-13 09:04:04 +02:00
Fabien Potencier
d87a197d80 merged branch drak/kernel_dicb (PR #3909)
Commits
-------

82bbf3b [HttpKernel] Allow override of ContainerBuilder instance used to build container

Discussion
----------

[HttpKernel] Allow override of ContainerBuilder class in Kernel

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

The ContainerBuilder class is hard coded into the `buildContainer()` method and is therefor not extensible.

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

by fabpot at 2012-04-13T04:54:28Z

I would definitely prefer a `getContainerBuilder()` that returns a container builder. But why would you want to do that?

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

by drak at 2012-04-13T05:12:13Z

@fabpot - The use case is to override the behaviour of the compilation that is performed by the kernel on the container.  There is no way to override the compile() method called on the builder because the class is created hard in `Kernel::buildContainer()`. This was the simplest way to change it without other cascading changes.

If we had a method which returned a container builder instance, would it just be something that creates a container builder, or acts as a getter on a property? The reason I ask is there is no real need to have a container builder persisting in a property, so a method that just returns a `new ContainerBuilder()` would also work but then we have to deal with the constructor as there is no way to set a ParameterBag on a container and `Kernel::buildContainer()` needs that.

Basically, my reasoning is that since this particular container is just a throwaway, it seems ok to control the class name that was used to create the throwaway builder.

So are you suggesting doing this instead?

    protected function getContainerBuilder()
    {
        return new ContainerBuilder(new ParameterBag($this->getKernelParameters()));
    }

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

by fabpot at 2012-04-13T05:22:20Z

Yes this was my suggestion. But are you sure you cannot solve your problems with compiler passes?

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

by drak at 2012-04-13T05:38:29Z

@fabpot, yes, this particular issue can't be solved by compiler passes.  I'll adapt the PR.

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

by drak at 2012-04-13T05:46:03Z

@fabpot, amended as per your suggestion.
2012-04-13 07:50:57 +02:00
Drak
82bbf3b8b1 [HttpKernel] Allow override of ContainerBuilder instance used to build container 2012-04-13 11:27:54 +05:45
Fabien Potencier
70df8d3892 [FrameworkBundle] made the Esi and Store instances configurable in HttpCache base class 2012-04-13 07:23:33 +02:00
Fabien Potencier
0956be908c merged branch Tobion/route-compiler (PR #3891)
Commits
-------

cb47b03 [Routing] small refactoring + language fixes

Discussion
----------

[Routing] small refactoring + language fixes

tests pass, no bc break

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

by vicb at 2012-04-12T06:42:19Z

@Tobion could you squash your commits ?

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

by Tobion at 2012-04-12T19:25:03Z

done
2012-04-13 06:59:08 +02:00
Fabien Potencier
cec8fed31c merged branch willdurand/add-all-method-to-form-builder (PR #3886)
Commits
-------

be2456b [Form] [Tests] Used assertCount()
4120f13 [Form] Added all() method to the FormBuilder class

Discussion
----------

[Form] Added all() method to the FormBuilder class

In order to perform some introspection on a FormBuilder instance,
we need to be able to get its children. Almost everything is accessible
in this class, but the children are not.

This PR adds a all() method to respect the current API (get(), remove(),
...).

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

by bschussek at 2012-04-12T09:54:04Z

👍
2012-04-13 06:56:27 +02:00
Tobias Schultze
c331f4a306 HttpKernel test fix on windows 2012-04-13 00:48:19 +02:00
Tobias Schultze
cb47b03209 [Routing] small refactoring + language fixes 2012-04-12 21:23:30 +02:00
Fabien Potencier
b2af6b4f24 merged branch drak/eventsubscribersnotice (PR #3902)
Commits
-------

e199049 [EventDispatcher] Fixed edge case not covered by tests that generated E_NOTICES

Discussion
----------

[EventDispatcher] Fixed edge case not covered by tests.

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

Fixes case not covered by tests.
2012-04-12 13:47:50 +02:00
Drak
e199049581 [EventDispatcher] Fixed edge case not covered by tests that generated E_NOTICES 2012-04-12 16:21:33 +05:45