Commit Graph

10668 Commits

Author SHA1 Message Date
Fabien Potencier 3fff47acff merged branch weaverryan/message-selector-exception (PR #4929)
Commits
-------

480ab14 Further improving the MessageSelector exception

Discussion
----------

Further improving the MessageSelector exception

Hey guys!

The goal is just to give the users a better starting point when they see this exception.

See previous change in #4173 and conversation in #4207

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #4207
Todo: -
License of the code: MIT
Documentation PR: n/a

Thanks!

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

by stof at 2012-07-14T23:11:17Z

Shouldn't it be done in 2.0 instead ?

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

by weaverryan at 2012-07-15T00:15:42Z

I decided to go against 2.1 when I saw that #4173 was against 2.0. If we do it against 2.0, it'll cause a conflict when 2.0 is merged into master - seemed like too much trouble for such a small change.
2012-07-15 09:20:46 +02:00
Daniel Holmes 07992d352c [Validator] Added inheritDoc phpdoc for validate methods 2012-07-14 17:42:20 -07:00
Ryan Weaver 480ab14a33 Further improving the MessageSelector exception
See previous change in #4173 and conversation in #4207
2012-07-14 18:05:33 -05:00
Ryan Weaver 96638f4332 [UPGRADE] Tweaking formatting error with event listener section. Also tweaking values
Some of the values here are either wrong, or are drawing their logic from an area I can't find. I've used the following logic for this change:

* security.firewall - this is easy, it just changed

* locale listener - this didn't exist in Symfony 2.0, but it was done on the RouterListener::onKernelRequest(), which had a priority of 0. The new listener has a priority of 16

* The early request router listener is gone - I'm not sure it has an equivalent

* The RouterListener priority changed from 0 to 32
2012-07-14 16:45:36 -05:00
Drak 5ae0da015d Update changelogs 2012-07-14 22:43:03 +01:00
Fabien Potencier 1fbfee1387 merged branch excelwebzone/validator (PR #4927)
Commits
-------

c4ead52 [Validator] more updated hebrew messages

Discussion
----------

[Validator] more updated hebrew messages
2012-07-14 23:40:51 +02:00
excelwebzone c4ead527b3 [Validator] more updated hebrew messages 2012-07-14 14:32:16 -07:00
Drak ff91b9aed0 [FrameworkBundle] Make FlashBag the default.
This makes the full stack framework ESI compatible.
2012-07-14 18:24:10 +01:00
Fabien Potencier 36d12dde5b merged branch stof/serializer_improvement (PR #4904)
Commits
-------

12bdec3 Moved the NormalizationAwareInterface check to the ChainEncoder
28e137c [Serializer] Added a ChainEncoder and a ChainDecoder

Discussion
----------

[Serializer] Added a ChainEncoder and a ChainDecoder

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

These classes contains the logic previously defined in the Serializer itself to handle the choice of a serializer. This allows reusing it when using only the encoding part of the component, without having to use the Serializer class (which is not as handy to bootstrap when you want to use only encoders and decoders as normalizers come first)

I was wondering if these classes should have adders but I kept the constructor injection only to be consistent with the current code (encoders cannot be registered after the instantiation) and to avoid implementing the SerializerAwareInterface in them (to allow injecting the Serializer in serializer-aware encoders and decoders added later).

Note that this change is fully BC as it only changes the internal implementation of the Serializer.

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

by fabpot at 2012-07-14T11:07:32Z

ping @lsmith77 @Seldaek

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

by Seldaek at 2012-07-14T15:17:42Z

After a quick look, I'd say +1
2012-07-14 18:10:40 +02:00
Fabien Potencier 4dd47ac17b merged branch excelwebzone/validator (PR #4924)
Commits
-------

ddbb26e [Validator] updated hebrew messages

Discussion
----------

[Validator] updated hebrew messages
2012-07-14 18:09:33 +02:00
Fabien Potencier 21925f9900 merged branch cvschaefer/master (PR #4920)
Commits
-------

a80ef6b Fixed: The type name specified for the service propel.form.type.model does not match the actual name

Discussion
----------

[Propel1Bridge][Form] ModelType name is invalid

Since 6489a65960 "[Form] Added an exception for invalid type services" Symfony/Component/Form/Extension/DependencyInjection/DependencyInjectionExtension requires form type names to match the service name.

This fixes exception "The type name specified for the service propel.form.type.model does not match the actual name"

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

by willdurand at 2012-07-14T14:03:20Z

👍

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

by fabpot at 2012-07-14T14:17:36Z

I think it would be better to named it `propel_model`.

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

by willdurand at 2012-07-14T14:20:05Z

There is `entity` for Doctrine entities, not `doctrine_entity`. This should
be the same for Propel...

2012/7/14 Fabien Potencier <
reply@reply.github.com
>

> I think it would be better to named it `propel_model`.
>
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/symfony/symfony/pull/4920#issuecomment-6983217
>

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

by stloyd at 2012-07-14T14:22:34Z

@fabpot @willdurand Or we should rename Doctrine one too, to be more consistent...

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

by fabpot at 2012-07-14T14:30:41Z

We should definitely rename Doctrine too.

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

by cvschaefer at 2012-07-14T14:34:51Z

@fabpot Wouldn't that break all existing forms with doctrine entity form types?

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

by stof at 2012-07-14T14:54:03Z

It would break BC indeed, and changing the propel type name in the DIC config (which is the one used in before the latest refactoring) would also be a BC break.

And btw, we also use ``entity`` in the SecurityBundle config, not ``doctrine_entity``

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

by fabpot at 2012-07-14T15:04:31Z

You're right, let's not break BC for the sake of it.

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

by stof at 2012-07-14T15:13:23Z

Ok, so this PR should be merged as is, as I guess more people are using the Propel type in a PropelBundle context than with a standalone Form component (which would have used the getName method)

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

by cvschaefer at 2012-07-14T15:14:44Z

+1
2012-07-14 18:09:27 +02:00
Christophe Coevoet 1f2f866fff fixed the serialization of the SwitchUserRole 2012-07-14 18:00:37 +02:00
Christophe Coevoet b55930a45b [Security] Implemented the Serializable interface in the Role class 2012-07-14 17:42:15 +02:00
excelwebzone ddbb26e5ae [Validator] updated hebrew messages 2012-07-14 08:21:09 -07:00
Alexander 33f29ed174 [Form] '@group benchmark' for form performance tests 2012-07-14 16:20:31 +02:00
Alexander df2406f286 [Security] Add note to changelog about BC break 2012-07-14 16:07:27 +02:00
Alexander 01b2e3946c [Security] Extract default logout success handling logic 2012-07-14 16:07:08 +02:00
Christoph Schaefer a80ef6b482 Fixed: The type name specified for the service propel.form.type.model does not match the actual name 2012-07-14 16:45:00 +03:00
Fabien Potencier 28abff8147 merged branch hason/czech_validator_messages (PR #4919)
Commits
-------

42cfd25 [Validator] updated czech messages

Discussion
----------

[Validator] updated czech messages
2012-07-14 15:40:18 +02:00
Martin Hasoň 42cfd259ac [Validator] updated czech messages 2012-07-14 15:37:06 +02:00
Fabien Potencier 11f8cf0520 merged branch Dattaya/form/test-error (PR #4916)
Commits
-------

dbd169f [Form] Error in the SimpleFormTest case.

Discussion
----------

[Form] Error in the SimpleFormTest case.

Symfony2 tests pass: yes

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

by bschussek at 2012-07-14T13:25:28Z

Thanks, looks like a copy paste error. @fabpot 👍
2012-07-14 15:30:15 +02:00
Fabien Potencier baf990b762 [HttpKernel] fixed the request data collector which always started the session (closes #4915) 2012-07-14 15:04:55 +02:00
Yaroslav Kiliba dbd169f82e [Form] Error in the SimpleFormTest case. 2012-07-14 16:02:46 +03:00
Pierre Rineau 7d53909d47 Earlier PHP output buffer flush for non FPM environments 2012-07-14 14:47:09 +02:00
Fabien Potencier dcf933be39 merged branch jalliot/exception-profiler-logs (PR #4912)
Commits
-------

1764574 [TwigBundle] Improved logs display on exception page

Discussion
----------

[TwigBundle] Improved logs display on exception page

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

* Add the priority level in front of log entries
* Better display of warnings
2012-07-14 14:37:46 +02:00
Fabien Potencier 1d3428bf5f merged branch Mephistofeles/polish_validator_messages (PR #4913)
Commits
-------

d26f133 [Validator] [Resources] fixed polish validator translated messages for polish locale

Discussion
----------

[Validator] [Resources] fixed polish validator translated messages for...

...polish locale

Added pluralization support and translated new messages.
2012-07-14 14:36:53 +02:00
Mephistofeles d26f133e6a [Validator] [Resources] fixed polish validator translated messages for polish locale
Added pluralization support and translated new messages.
2012-07-14 14:08:31 +02:00
Jordan Alliot 1764574198 [TwigBundle] Improved logs display on exception page 2012-07-14 13:58:32 +02:00
Fabien Potencier c99b10804b merged branch stof/form_safeguard (PR #4910)
Commits
-------

6489a65 [Form] Added an exception for invalid type services

Discussion
----------

[Form] Added an exception for invalid type services

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes [![Build Status](https://secure.travis-ci.org/stof/symfony.png?branch=form_safeguard)](http://travis-ci.org/stof/symfony) (Travis fails randomly for the performance test)
Fixes the following tickets: -
Todo: -

Before the introduction of the FormRegistry, the getName() method was
never used for types registered through the DI container. The
FormRegistry now uses the getName() method and missconfigured services
will trigger a notice.
This was reported in FriendsOfSymfony/FOSCommentBundle#234
2012-07-14 13:41:41 +02:00
Christophe Coevoet 6489a65960 [Form] Added an exception for invalid type services
Before the introduction of the FormRegistry, the getName() method was
never used for types registered through the DI container. The
FormRegistry now uses the getName() method and missconfigured services
will trigger a notice.
This was reported in FriendsOfSymfony/FOSCommentBundle#234
2012-07-14 13:04:03 +02:00
Fabien Potencier 881aebeecb merged branch bschussek/performance (PR #4909)
Commits
-------

69e5e58 [Form] Individual rows of CollectionType cannot be styled anymore for performance reasons

Discussion
----------

[Form] Individual rows of CollectionType cannot be styled anymore

Bug fix: no
Feature addition: no
Backwards compatibility break: **yes**
Symfony2 tests pass: yes
Fixes the following tickets: #2806, #4733
Todo: -

Individual theming of blocks in a row of a collection form is now unsupported:

```
{% block _author_tags_0_label %}
    {# ... #}
{% endblock %}

{% block _author_tags_1_label %}
    {# ... #}
{% endblock %}
```

Instead, it is now possible to define a generic template for all rows, where the word "entry" replaces the previous occurence of the row index:

```
{% block _author_tags_entry_label %}
    {# ... #}
{% endblock %}
```

The main motivation for this change is performance. Looking up whether individual styles exist for each single block within each row costs a lot of time. Because the row index is included in the block names, caching is virtually impossible.

For [this specific, heavy form](http://advancedform.gpserver.dk/app_dev.php/taxclasses/1), this PR decreases rendering time from **7.7** to **2.5 seconds** on my machine.

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

by fabpot at 2012-07-14T10:55:29Z

@bschussek Can you also create a PR on symfony docs to update the documentation?
2012-07-14 13:03:43 +02:00
Christophe Coevoet 12bdec3cd2 Moved the NormalizationAwareInterface check to the ChainEncoder
This allows nesting a ChainEncoder inside another one without breaking
the check.
2012-07-14 12:15:12 +02:00
Christophe Coevoet 28e137c920 [Serializer] Added a ChainEncoder and a ChainDecoder
These classes contains the logic previously defined in the Serializer
itself to handle the choice of a serializer. This allows reusing it when
using only the encoding part of the component.
2012-07-14 12:15:07 +02:00
Bernhard Schussek 69e5e58629 [Form] Individual rows of CollectionType cannot be styled anymore for performance reasons 2012-07-14 12:10:29 +02:00
Fabien Potencier cf41bf8776 merged branch hhamon/french_translation_messages (PR #4906)
Commits
-------

b3958af [Validator] [Resources] fixed french validator translated messages for the french locale.

Discussion
----------

[Validator] [Resources] fixed french validator translated messages for the french locale

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #4900
2012-07-14 11:53:10 +02:00
Fabien Potencier f9765d57f8 merged branch stof/travis_version (PR #4905)
Commits
-------

7dcb637 Removed PHP 5.3.3 from the travis build as we require 5.3.4 now

Discussion
----------

Removed PHP 5.3.3 from the travis build as we require 5.3.4 now

This will fix the travis build.

We cannot add 5.3.4 to replace 5.3.3 as it is not available on Travis IIRC. @lsmith77 could you confirm this ?
2012-07-14 11:53:03 +02:00
Christophe Coevoet 7dcb6373ae Removed PHP 5.3.3 from the travis build as we require 5.3.4 now 2012-07-14 11:15:49 +02:00
Hugo Hamon b3958af35c [Validator] [Resources] fixed french validator translated messages for the french locale. 2012-07-14 11:14:40 +02:00
Fabien Potencier 4b2230da93 [WebProfilerBundle] injected Request object into the controller instead of getting it from the container 2012-07-14 10:09:51 +02:00
Fabien Potencier 5fb72144da merged branch jalliot/profiler-logs (PR #4902)
Commits
-------

77b4349 [WebProfiler] Improved logger panel

Discussion
----------

[WebProfiler] Improved logger panel

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

* Add missing priority levels from filter
* Display priority level in front of each log entry
* Add a yellow background for warnings and use the red one for errors and above (previously only errors)
* Display `No logs available for this priority.` when filter is too restrictive
2012-07-14 00:00:47 +02:00
Fabien Potencier 17888d2afb merged branch Tobion/patch-3 (PR #4903)
Commits
-------

ffd8c1e [Form] add thrown exceptions to FormRegistryInterface

Discussion
----------

[Form] add thrown exceptions to FormRegistryInterface
2012-07-14 00:00:15 +02:00
Tobias Schultze ffd8c1e773 [Form] add thrown exceptions to FormRegistryInterface 2012-07-14 00:14:36 +03:00
Jordan Alliot 77b434996e [WebProfiler] Improved logger panel 2012-07-13 22:51:18 +02:00
Fabien Potencier b0d7d9e406 merged branch zachbadgett/frameworkbundle-session-file-handler-fix (PR #4901)
Commits
-------

23d8735 Added NativeFileSessionHandler to classes to compile .
12d6ae7 Removed FileSessionHandler from FrameworkExtension to stop compiling a file that does not exist.

Discussion
----------

[FrameworkBundle] Removed FileSessionHandler from FrameworkExtension to stop compiling a file that does not exist.

PR #4899 removed FileSessionHandler which caused a class not found error from FrameworkBundle after the cache was created. This PR will fix it.

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

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

by stof at 2012-07-13T19:12:51Z

you should add the NativeSessionHandler class in the list instead as it replaces it

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

by tystr at 2012-07-13T19:14:29Z

+1

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

by zachbadgett at 2012-07-13T19:15:55Z

Done
2012-07-13 21:31:17 +02:00
Fabien Potencier a27aeda8f4 merged branch bschussek/performance (PR #4882)
Commits
-------

cd7835d [Form] Cached the form type hierarchy in order to improve performance
2ca753b [Form] Fixed choice list hashing in DoctrineType
2bf4d6c [Form] Fixed FormFactory not to set "data" option if not explicitely given
7149d26 [Form] Removed invalid PHPDoc text

Discussion
----------

[Form] WIP Improved performance of form building

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

This PR is work in progress and up for discussion. It increases the performance of FormFactory::createForm() on a specific, heavy-weight form from **0.848** to **0.580** seconds.

Before, the FormFactory had to traverse the hierarchy and calculate the default options of each FormType everytime a form was created of that type.

Now, FormTypes are wrapped within instances of a new class `ResolvedFormType`, which caches the parent type, the type's extensions and its default options.

The updated responsibilities: `FormFactory` is a registry and proxy for `ResolvedFormType` objects, `FormType` specifies how a form can be built on a specific layer of the type hierarchy (e.g. "form", or "date", etc.) and `ResolvedFormType` *does the actual building* across all layers of the hierarchy (by delegating to the parent type, which delegates to its parent type etc.).

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

by schmittjoh at 2012-07-12T18:25:40Z

Maybe ResolvedFormType

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

by jmather at 2012-07-13T02:56:38Z

I really like ResolvedFormType. That's the naming method I took for my tag parser that handes the same conceptual issue.

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

by axelarge at 2012-07-13T05:25:00Z

ResolvedFormType sounds very clear.
This change is great and I desperately hope to see more of this kind

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

by Baachi at 2012-07-13T06:41:26Z

Yes `ResolvedFormType` sounds good :) 👍

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

by fabpot at 2012-07-13T07:11:33Z

I like `ResolvedFormType` as well.

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

by henrikbjorn at 2012-07-13T07:46:48Z

👍 `ResolvedFormType` :shipit:

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

by stof at 2012-07-13T18:01:51Z

This looks good to me
2012-07-13 21:26:31 +02:00
Fabien Potencier 2dcc44897e raised the minimum version of PHP to 5.3.4 (closes #3856)
We've raised the minimum version of PHP because of a PHP
bug before 5.3.4:

https://bugs.php.net/bug.php?id=52083
https://bugs.php.net/bug.php?id=50027
2012-07-13 21:22:46 +02:00
Zach Badgett 23d87353a2 Added NativeFileSessionHandler to classes to compile . 2012-07-13 13:14:31 -06:00
Zach Badgett 12d6ae76a2 Removed FileSessionHandler from FrameworkExtension to stop compiling a file that does not exist. 2012-07-13 13:04:05 -06:00
Bernhard Schussek cd7835d8d2 [Form] Cached the form type hierarchy in order to improve performance 2012-07-13 20:39:30 +02:00
Fabien Potencier a798ff100c merged branch drak/nativestorage (PR #4899)
Commits
-------

a351362 [HttpFoundation] Add NativeSessionHandler tests
653821a [HttpFoundation] Remove FileSessionHandler
3456787 Partially revert "[HttpFoundation][Sessions] Refactored tests"
39813a0 Revert "[FrameworkBundle] Refactor session file handler service name and update changelogs"
fbee4cf Restore NativeFileSessionHandler

Discussion
----------

[Session] Restore NativeFileSessionStorage

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

This reverts the removal of the native file handler.
2012-07-13 20:34:02 +02:00