Commit Graph

8257 Commits

Author SHA1 Message Date
Henrik Bjørnskov f143822d52 Removed invalid dependencies and replaces in composer.json 2012-02-09 10:13:03 +01:00
Fabien Potencier e69a30b2a5 [SwiftmailerBundle] moved the bundle to its own repository 2012-02-09 09:51:46 +01:00
Fabien Potencier 1e3028d0d7 merged branch benji07/patch-1 (PR #3289)
Commits
-------

a38cfa3 [Serializer] Fix typo

Discussion
----------

[Serializer] Fix typo in comments
2012-02-09 07:26:49 +01:00
Fabien Potencier 4c4a1d6d8a merged branch jmikola/cc-optional-warmers (PR #3302)
Commits
-------

42c9892 [FrameworkBundle] Allow cache:clear/warmup to skip optional warmers

Discussion
----------

[FrameworkBundle] Allow cache:clear/warmup to skip optional warmers

> Bug fix: no
> Feature addition: yes
> Backwards compatibility break: yes
> Symfony2 tests pass: [yes](http://travis-ci.org/#!/jmikola/symfony/builds/647861)

Exercise.com has been using this for a while for our local environments. Skipping the optional cache warmers (namely Assetic) can save quite a bit of time.
2012-02-09 07:08:52 +01:00
Jeremy Mikola 42c98921a2 [FrameworkBundle] Allow cache:clear/warmup to skip optional warmers 2012-02-08 20:16:02 -05:00
Fabien Potencier 11f83a6481 merged branch umpirsky/serbian-translation-latin (PR #3297)
Commits
-------

fd15529 Added Serbian Latin translation for validatoor messages.

Discussion
----------

Added Serbian Latin translation for validatoor messages.

Files named as specified by stof https://github.com/symfony/symfony/pull/3167#issuecomment-3598423
2012-02-08 07:58:07 +01:00
Sasa Stamenkovic fd15529ea6 Added Serbian Latin translation for validatoor messages. 2012-02-07 21:49:41 +01:00
Benjamin Lévêque a38cfa3763 [Serializer] Fix typo 2012-02-07 10:25:10 +01:00
Fabien Potencier 5676a91b8d updated CHANGELOG for 2.1 2012-02-06 17:45:32 +01:00
Fabien Potencier 8c11e9baa7 merged branch thesalla/mapfiledumper (PR #2471)
Commits
-------

ba3b321 [ClassLoader] Added a class map file generator utility

Discussion
----------

[ClassLoader] Added a class map file generator utility

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

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

by lsmith77 at 2011-11-30T19:33:52Z

@thesalla do you have time/interest to finish this up?

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

by thesalla at 2011-12-01T09:55:50Z

sure (will attempt at least), but no sooner than tomorrow

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

by stof at 2011-12-12T20:41:41Z

@thesalla @fabpot what is the state of this PR ?

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

by thesalla at 2011-12-17T19:36:58Z

If you don't have any other suggestions or ideas, I'd consider it finished.

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

by lsmith77 at 2012-01-24T09:27:12Z

ping

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

by fabpot at 2012-02-02T08:21:38Z

@thesalla: Can you rename the ClassMapDumper class to ClassMapGenerator and then squash your commit before the merge? Thanks.

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

by thesalla at 2012-02-04T12:55:48Z

@fabpot done.
2012-02-06 17:45:10 +01:00
Fabien Potencier aa1676c7b5 merged branch henrikbjorn/doctrine-unique-validator (PR #3275)
Commits
-------

928e352 Change the array access used in UniqueEntityValidator

Discussion
----------

[DoctrineBridge] Change the array access used in UniqueEntityValidator

MongoDB ODM Cursor does not implement ArrayAccess and therefor using
`$result[0]` will fail. `reset()` rewinds the array and returns the
first element value.

DoctrineMongoDBBundle#77

/cc @beberlei

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

by henrikbjorn at 2012-02-06T08:09:25Z

Made a mistake, the findBy call would still return a cursor. Changed the findBy to findOneBy we only want one result anyway.

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

by stof at 2012-02-06T08:11:26Z

findOneBy is wrong: you will not detect duplicate anymore if you return a single element

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

by henrikbjorn at 2012-02-06T08:28:03Z

@stof before it was only the first result that was used anyway so if it had found 3 results it would only have used the first one. Performance is apparently the biggest issue with findOneBy so this have been reverted.

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

by stof at 2012-02-06T08:31:17Z

@henrikbjorn no, we use other results too: if ``count()`` is not 1, the validation fails

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

by stof at 2012-02-06T08:36:06Z

Btw, running the testsuite would have tell you there is an issue when using findOneBy as it was breaking a test :)

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

by bschussek at 2012-02-06T10:45:44Z

Why doesn't this validator use a SELECT COUNT anyway?

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

by stof at 2012-02-06T10:57:00Z

@bschussek because we need to check if an existing value is for the same object or another one. Otherwise, the valdiation would fail as soon as you are editing an existing object without changing the unique value

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

by henrikbjorn at 2012-02-06T11:03:40Z

@stof @bschussek other changes that should be done? Else it should be ready to be merged ?

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

by henrikbjorn at 2012-02-06T13:00:57Z

@stof done an rebased.

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

by bschussek at 2012-02-06T13:04:44Z

👍 /cc @fabpot
2012-02-06 14:06:46 +01:00
Henrik Bjørnskov 928e352d09 Change the array access used in UniqueEntityValidator
convert iterator to array if it isnt already (mongodb)

More specific if

Dont do iterator_to_array if object implements \ArrayAccess

CS fix
2012-02-06 14:00:20 +01:00
Fabien Potencier 9855886dc5 merged branch grizlik/master (PR #3261)
Commits
-------

b65a997 [Form] Added test ChoiceList::testGetChoicesForValuesCorrectOrderingOfResult for correct ordering check
a60daff [Form] Fixed incorrect sorting in ChoiceList::getChoicesForValues

Discussion
----------

[Form] Fixed incorrect sorting in ChoiceList::getChoicesForValues

ChoiceList::getChoicesForValues return collection with sorting, that not corresponding to the sorting for input keys

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

by bschussek at 2012-02-03T21:40:49Z

Can you adapt the test cases to fail for this case please? (probably by use of assertSame instead of assertEquals in one of the existing tests)

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

by grizlik at 2012-02-04T08:41:44Z

I need to create a new test or modify an existing one?

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

by bschussek at 2012-02-04T09:58:04Z

Something like this in ChoiceListTest:

    public function testGetChoicesForValuesReverseOrderedValues()
    {
        $values = array('2', '1');
        $this->assertSame(array($this->obj3, $this->obj2), $this->list->getChoicesForValues($values));
    }
2012-02-06 09:56:24 +01:00
Fabien Potencier c75ca12140 merged branch bschussek/issue3269 (PR #3270)
Commits
-------

78c1451 [Validator] Throwing exception in ConstraintValidator::setMessage() if initialize() wasn't called

Discussion
----------

[Validator] Throwing exception in ConstraintValidator::setMessage() if initialize() wasn't called

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

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

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

by Maks3w at 2012-02-05T09:52:21Z

One problem was that. Now I initialized the unit test with a execution
context mockup and works good.

Another problem I found is in the rules for upgrade from 2.0 to
2.1:

In v2.0: with setMessages() only one argument is mandatory ($message)
In v2.1: With the new way, addViolation(), then you need 2 arguments.
But, in v2.0 with the new way, addViolation, required 3 arguments.

So for preserve forward and backward compatibility, you need pass 3
arguments to addViolation()  I think that it is helpfull and could be written in the
doc.

At the last one ¿What is the purpose of the third argument? ¿Can I pass
any object as invalid value?

Thanks

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

by bschussek at 2012-02-05T10:45:16Z

The last argument should always be the validated value that caused the constraint to fail.
2012-02-06 09:53:04 +01:00
Fabien Potencier 1bef14a02a [Process] fixed usage of constants in closure 2012-02-06 07:00:39 +01:00
Fabien Potencier 7581c3b221 merged branch willdurand/fix-propel-bridge (PR #3274)
Commits
-------

80682ba Fixed CS
007de8c [Tests] [Propel] Added some tests for the ModelChoiceList class
8257efd [Propel] Refactored the whole ModelChoiceList

Discussion
----------

Fix propel bridge

Ok, so I rewrote the `ModelChoiceList` based on the `EntityChoiceList`, and I provided the same test suite.
Sorry for the last PR, it was a fix to avoid fatal..

Cheers,
William
2012-02-06 06:57:03 +01:00
William DURAND 80682ba3c9 Fixed CS 2012-02-06 00:17:29 +01:00
William DURAND 007de8c265 [Tests] [Propel] Added some tests for the ModelChoiceList class 2012-02-05 23:08:07 +01:00
William DURAND 8257efd38f [Propel] Refactored the whole ModelChoiceList 2012-02-05 23:08:06 +01:00
Fabien Potencier c2e8a0a24a [Process] added some constant to avoid harcoded strings 2012-02-05 12:11:37 +01:00
Fabien Potencier 766b88fd21 [HttpKernel] added support for FlattenException in ExceptionHandler::createResponse 2012-02-05 12:11:13 +01:00
Bernhard Schussek 78c145196b [Validator] Throwing exception in ConstraintValidator::setMessage() if initialize() wasn't called 2012-02-05 10:03:22 +01:00
Gyula Sallai ba3b321842 [ClassLoader] Added a class map file generator utility
fixed cs

Small refactoring for Finder support

If class name found, return

Find multiple classes and namespaces in the same file

fixed problems with inheritance and non-php files

Renamed ClassMapDumper to ClassMapGenerator

fixed error with splfileinfo
2012-02-04 13:48:25 +01:00
grizlik b65a9972fb [Form] Added test ChoiceList::testGetChoicesForValuesCorrectOrderingOfResult for correct ordering check 2012-02-04 14:14:29 +04:00
Fabien Potencier 6e60967827 [DoctrineBridge] fixed a unit test after the 2.0 merge 2012-02-04 08:08:27 +01:00
Fabien Potencier b1148e334f merged 2.0 2012-02-04 08:03:45 +01:00
Fabien Potencier 79a957be77 merged branch kbond/config_dump_command (PR #3187)
Commits
-------

4847d3a renamed command
e97af0b code fixes
df94282 [FrameworkBundle] removed unnecessary DebugCommand
fa32885 [SecurityBundle] added configuration info
2f8ad93 [MonologBundle] added configuration info
9757958 [FrameworkBundle] added configuration info
58939f1 [TwigBundle] added configuration docs
8dc40e4 [FrameworkBundle] added config:dump console command

Discussion
----------

Config dump command

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #1663
Todo: add more config info/examples

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

This is a config dump command based on the additions of PR #1099.  This was initially part of that PR and there is some discussion there about it (https://github.com/symfony/symfony/pull/1099)

### Usage:

1. dump by root node: ``app/console config:dump framework``
2. dump by bundle name: ``app/console config:dump FrameworkBundle``

A few issues/notes:

* Only dumps to yaml
* Only 1 configuration per bundle (this was brought by @stof here: https://github.com/symfony/symfony/pull/1099#issuecomment-1242993)
* Works out of the box for most bundles but not ones that use a non-standard ``Configuration`` class (such as the assetic bundle).  In this case ``Extension::getConfiguration()`` must be configurated.

I have used it to create some (most) of the config reference docs.  It works fine but I find it somewhat crude, any suggestions to improve it would be appreciated.

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

by kbond at 2012-01-24T21:00:43Z

Few more issues:

1. Should I abstract the logic to a "normalizer" class that converts the Configuration class into a manageable array?  I struggle with this idea because isn't that what ``TreeBuilder`` basically is?
2. @stof made a good point that ``config:dump`` doesn't really describe what this does.  Would dumping your config be useful?  Perhaps ``config:dump framework`` dumps the config for your project while ``config:dump --ref framework`` dumps the default reference?

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

by stof at 2012-01-24T21:18:15Z

@kbond you cannot really dump the config. Part of it does not go through these extensions at all. And it does not make much sense anyway IMO.
the command as is does the right job IMO (i.e. dumping a reference for the extension). But its name should be improved

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

by kbond at 2012-01-24T21:20:51Z

``config:reference`` perhaps?

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

by fabpot at 2012-02-02T10:05:19Z

This command is about displaying the default configuration for a given bundle. So, what about `config:dump-reference`? As I understand, the command name is the last element to figure out before merging, right?

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

by stof at 2012-02-02T10:19:49Z

@fabpot indeed.

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

by stof at 2012-02-02T10:34:16Z

and +1 for ``config:dump-reference``

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

by Tobion at 2012-02-02T12:08:03Z

why not use the words you chose yourself: `config:dump-default`
I think it's more explicit.
2012-02-04 08:01:13 +01:00
Fabien Potencier 5251177002 merged branch helmer/readonly_fix (PR #3258)
Commits
-------

8321593 [Form] DRYed ChoiceType
0753cee [Form] Fixed read_only attribute for expanded fields

Discussion
----------

[Form] Fixed read_only attribute for expanded fields

Expanded choice widgets lose the knowledge of read_only attribute value.

Fixes bug introduced by #3193

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

by helmer at 2012-02-02T16:24:50Z

Please hold before merging, @bschussek had some thoughts about my changes in ``ChoiceType``, waiting for feedback.

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

by bschussek at 2012-02-02T16:33:12Z

I'm fine with the refactoring then, but please split it into two commits at least. The changes in ChoiceType have nothing in common with the actual issue here.

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

by helmer at 2012-02-02T19:40:39Z

Tests added.

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

by bschussek at 2012-02-03T10:14:32Z

Great, thanks.

@fabpot 👍
2012-02-04 07:59:57 +01:00
Fabien Potencier c9e87491b4 merged branch stof/unescape_paramaters (PR #3260)
Commits
-------

a7b48c0 Renamed the method
8e13095 Fixed the unescaping of parameters to handle arrays
045f936 Changed the testcase to expect the unescaping only after the resolution
a1b6d4c Added a failing testcase for escaped % in array parameters

Discussion
----------

Unescape paramaters

This fixes the unescaping of % in parameters when it is used in an array.

It is a replacement for @lsmith77's work done in #3241 but with a working fix this time :)
2012-02-04 07:58:12 +01:00
Fabien Potencier ffef177c4a merged branch willdurand/fix-propel-bridge (PR #3266)
Commits
-------

3c227fd [Propel] Fixed naming due to changes in #87b16e7015c02e794c33dbfc05812cf070b4ac68

Discussion
----------

[Propel] Fixed naming due to changes in #87b16e7015c02e794c33dbfc05812cf070b4ac68

+ minor CS fix

I'll provide unit tests for the Propel bridge in a separate PR.
2012-02-04 07:43:54 +01:00
William DURAND 3c227fdd74 [Propel] Fixed naming due to changes in #87b16e7015c02e794c33dbfc05812cf070b4ac68
+ minor CS fix
2012-02-03 23:06:29 +01:00
grizlik a60daffb47 [Form] Fixed incorrect sorting in ChoiceList::getChoicesForValues 2012-02-03 14:21:24 +04:00
Helmer Aaviksoo 8321593c85 [Form] DRYed ChoiceType 2012-02-03 11:49:06 +02:00
Helmer Aaviksoo 0753cee11a [Form] Fixed read_only attribute for expanded fields 2012-02-03 11:49:06 +02:00
Christophe Coevoet a7b48c058b Renamed the method 2012-02-02 18:59:53 +01:00
Christophe Coevoet 8e13095e5c Fixed the unescaping of parameters to handle arrays 2012-02-02 18:34:11 +01:00
Christophe Coevoet 045f936038 Changed the testcase to expect the unescaping only after the resolution
String values are not unescaped either in resolveValue() because it can
be called several times for the same parameter.
2012-02-02 18:34:05 +01:00
lsmith77 a1b6d4c46b Added a failing testcase for escaped % in array parameters 2012-02-02 18:33:55 +01:00
kbond 4847d3ad35 renamed command 2012-02-02 11:47:41 -05:00
Fabien Potencier 2cd246786d merged branch bschussek/issue3239 (PR #3256)
Commits
-------

8714d79 [Form] Simplified code in MergeCollectionListener
8ab982a [Form] Fixed: Custom add and remove method are not invoked if disallowed
02f61ad [Form] Renamed choice and collection options "adder_prefix" and "remover_prefix" to "add_method" and "remove_method" and allowed to specify full method names
b393774 [Form] Used direct method access in MergeCollectionListener instead of Reflection to avoid problems when using class hierarchies
d208f4e [Form] Made it possible to use models with only either addXxx() or removeXxx()

Discussion
----------

[Form] Fixed edge cases in MergeCollectionListener

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

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

Fixes an issue mentioned in the comments of #3239

see https://github.com/symfony/symfony/pull/3239#issuecomment-3776312

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

by bschussek at 2012-02-02T12:12:17Z

Wait a minute before merging this.

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

by bschussek at 2012-02-02T13:01:55Z

@fabpot Ready to merge
2012-02-02 17:28:40 +01:00
Fabien Potencier df2ad15768 merged branch bschussek/issue2861 (PR #3257)
Commits
-------

bd461e2 [Form] Forms now don't create empty objects anymore if they are completely empty and not required. The empty data for these forms is null.

Discussion
----------

[Form] Forms now don't create empty objects anymore if they are empty and not required

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

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

If a form (or a nested form) is left completely empty upon submission and is not required, no new data object will be generated anymore. Instead, the form returns null as data.
2012-02-02 17:23:50 +01:00
Bernhard Schussek 8714d7924e [Form] Simplified code in MergeCollectionListener 2012-02-02 14:45:39 +01:00
Bernhard Schussek bd461e295d [Form] Forms now don't create empty objects anymore if they are completely empty and not required. The empty data for these forms is null. 2012-02-02 14:40:19 +01:00
Kevin Bond e97af0bac0 code fixes 2012-02-02 08:20:37 -05:00
kbond df94282dab [FrameworkBundle] removed unnecessary DebugCommand 2012-02-02 08:20:37 -05:00
kbond fa32885ea3 [SecurityBundle] added configuration info 2012-02-02 08:20:37 -05:00
kbond 2f8ad93db8 [MonologBundle] added configuration info 2012-02-02 08:20:37 -05:00
kbond 97579587c1 [FrameworkBundle] added configuration info 2012-02-02 08:20:37 -05:00
kbond 58939f16f3 [TwigBundle] added configuration docs 2012-02-02 08:20:37 -05:00
kbond 8dc40e4d29 [FrameworkBundle] added config:dump console command 2012-02-02 08:20:37 -05:00