Commit Graph

37 Commits

Author SHA1 Message Date
Fabien Potencier
dec43f5539 merged 2.0 2011-10-29 12:01:39 +02:00
Fabien Potencier
851eb73778 removed unused use statements 2011-10-29 11:56:30 +02:00
Fabien Potencier
de9cf88676 merged 2.0 2011-10-17 02:33:13 +02:00
Fabien Potencier
360053d95a [DoctrineBridge] fixed a unit test 2011-10-16 22:45:12 +02:00
Christophe Coevoet
a1784c2b97 [DoctrineBridge] Updated the code to use the new registry 2011-10-16 14:57:14 +02:00
Tobias Schultze
c73643675f fixed language in test 2011-10-16 07:53:44 +03:00
Fabien Potencier
6b3c7ac62d Merge branch '2.0'
* 2.0:
  [Doctrine] GH-1635 - UniqueValidator now works with associations
2011-10-15 11:07:39 +02:00
Benjamin Eberlei
9d8046e407 [Doctrine] GH-1635 - UniqueValidator now works with associations 2011-10-15 09:20:06 +02:00
Fabien Potencier
3ca1ccbf67 [DoctrineBridge] removed the Xml and Yaml driver as they are now part of Doctrine 2011-10-15 04:25:55 +02:00
Fabien Potencier
e7b2d2d659 merged 2.0 branch 2011-09-04 09:28:37 +02:00
Fabien Potencier
6677dabda5 merged branch jmikola/entity-validator (PR #2076)
Commits
-------

d19f1d7 [Doctrine] Fix UniqueEntityValidator reporting a false positive by ignoring multiple query results

Discussion
----------

[Doctrine] Fix UniqueEntityValidator reporting a false positive by ignoring multiple query results

An entity should only be considered unique if its search criteria returns no matches or a single, identical entity. Multiple results indicates that conflicting entities exist.

Note: the DoctrineMongoDBBundle's unique validator checks identifier values if the object strict-equality check is false. This may be a worthwhile improvement, as it would prevent reporting a validation error for an enttiy which is going to overwrite its conflicting counter-part in the database.

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

by jmikola at 2011/09/01 14:23:27 -0700

This is the Doctrine bridge equivalent for my fix to DoctrineMongoDBBundle: https://github.com/symfony/DoctrineMongoDBBundle/pull/42

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

by fabpot at 2011/09/02 00:13:52 -0700

As this is a bug fix, can you base your PR on the symfony/2.0 branch? Thanks.
2011-09-02 09:43:19 +02:00
Jeremy Mikola
d19f1d7621 [Doctrine] Fix UniqueEntityValidator reporting a false positive by ignoring multiple query results
An entity should only be considered unique if its search criteria returns no matches or a single, identical entity. Multiple results indicates that conflicting entities exist.
2011-09-01 17:20:30 -04:00
Fabien Potencier
bddcb4cc11 fixed a unit test 2011-09-01 11:05:39 +02:00
stloyd
838237dc32 [Tests] Use proper phpunit assertion functions: "assertTrue", "assertFalse", "assertNull" 2011-08-25 15:41:15 +02:00
Benjamin Eberlei
08b4219347 [DoctrineBridge] Issue #1376 - Unique Validator does not work with null values 2011-07-10 11:06:21 +02:00
stloyd
edf4b87dcb Add missing "tearDown" functions, and some missing variable declaration (this saves for me almost 20MB when run all tests)
Force AsseticBundle tests to use TestCase
Fix test for DoctrineBundle to use TestCase
2011-06-16 15:06:36 +02:00
stloyd
2b0c3526d8 Increase code coverage for: YamlParser, Validators, PhpEngine + Helpers, HttpFoundation
Revert failing asserts for UrlValidator

Mark as incomplete instead of commenting them out
2011-06-16 11:43:27 +02:00
Pascal Borreli
f5eaa404c7 [Tests] Fixed typos 2011-06-12 20:52:53 +00:00
Fabien Potencier
17cd08dc6c fixed CS 2011-06-08 19:56:59 +02:00
Fabien Potencier
879242cdf5 moved some Doctrine classes from the bundle to the bridge 2011-06-08 08:41:44 +02:00
Fabien Potencier
fbf36957e6 refactored Doctrine Bridge
* added a RegistryInterface

 * changed all classes to depend on the Registry instead of a specific EntityManager

This is more consistent as the validator already took the registry and this allows
to use any entity manager in Forms.
2011-06-08 08:35:48 +02:00
Fabien Potencier
610583899d Merge remote branch 'CodeMeme/889-EntityChoiceField-grouped-choices'
* CodeMeme/889-EntityChoiceField-grouped-choices:
  Whitespace cleanup
  Fixed EntityChoiceList to support grouped entities Refs #889
  Added test for grouped entity choice list Refs #889
2011-05-27 07:44:35 +02:00
Eric Clemmons
693d0cda15 Whitespace cleanup 2011-05-26 19:00:42 -07:00
Eric Clemmons
d380486756 Added test for grouped entity choice list
Refs #889
2011-05-26 18:58:50 -07:00
Johannes Schmitt
98ed7dd030 fixed some more tests 2011-05-19 23:15:41 +02:00
Johannes Schmitt
6c0b0449a6 Merge remote branch 'origin/master' into annotations
Conflicts:
	UPDATE.md
	src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
	src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
2011-05-19 22:49:59 +02:00
Johannes Schmitt
42fb34b647 fixed tests 2011-05-19 22:46:34 +02:00
Benjamin Eberlei
8ff1d09d36 [Doctrine] Implement suggested changes by Stof, added functional test to verify unique validator works. 2011-05-18 22:57:25 +02:00
Fabien Potencier
4fb1035578 fixed Doctrine EntityType when the identifier is a string 2011-04-28 08:39:14 +02:00
Kris Wallsmith
e726cdd917 changed some skipped tests to incomplete 2011-04-26 07:22:22 -07:00
Bernhard Schussek
54e66c518f [Form] Reorganized code into "form extensions"
The extension classes are now the only constructor argument of the FormFactory class. They replace the existing "type loader" classes.

    new FormFactory(array(
        new CoreExtension($validator, $storage),
        new CsrfExtension($csrfProvider),
        new DoctrineOrmExtension($em),
    ));

Together with a few upcoming commits this mechanism will make

 * extension of the form framework in bundles and
 * usage of the forms outside of Symfony2

much easier.
2011-04-22 17:41:21 +02:00
Bernhard Schussek
a97366fbcb [Form] Split signature of FormFactory::create() into create() and createNamed()
The data can now be passed to all creation methods:

    $form = $factory->create('form', $data);

By default, a form will receive the name of its type ("form" in above example). If you wish to pass a custom name, use createNamed():

    $form = $factory->createNamed('form', 'myform', $data);
2011-04-22 10:42:21 +02:00
Bernhard Schussek
e476231e8a [Form] Removed invalid tests, cleaned up some tests, added test coverage 2011-04-06 15:58:53 +02:00
Bernhard Schussek
a4bbc40ac6 [Form] Cleaned up ChoiceListInterface 2011-04-02 15:41:43 +02:00
Bernhard Schussek
c786fac303 [Form] Sample fix implementation of renderers 2011-03-26 16:03:34 +01:00
Bernhard Schussek
3f390aa271 [Form] Removed EntityType from DefaultTypeLoader 2011-03-24 22:50:39 +01:00
Benjamin Eberlei
ee96ad0e81 [Form] [DoctrineBridge] Move EntityType and DoctrineTypeLoader into Doctrine Bridge 2011-03-24 22:43:00 +01:00