Skip to content

Commit 1bd125e

Browse files
Merge branch '3.0'
* 3.0: (105 commits) [Console] remove readline support bumped Symfony version to 3.0.3 updated VERSION for 3.0.2 updated CHANGELOG for 3.0.2 [Routing] added a suggestion to add the HttpFoundation component. [FrameworkBundle] fix assets and templating tests [ClassLoader] fix ApcClassLoader tests on HHVM [travis] Add some comments changed operator from and to && [DependencyInjection] Remove unused parameter [Process] Fix transient tests for incremental outputs [Console] Add missing `@require` annotation in test Fix merge [appveyor] Fix failure reporting [symfony#17634] move DebugBundle license file Limit Ldap component version for the 3.0 branch backport GlobTest from 2.7 branch Move licenses according to new best practices [FrameworkBundle] Remove unused code in test [2.3] Fixed an undefined variable in Glob::toRegex ... Conflicts: .travis.yml composer.json src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/assets.php src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/assets.xml src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/assets.yml src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_item.html.twig src/Symfony/Component/Console/CHANGELOG.md src/Symfony/Component/HttpKernel/Kernel.php src/Symfony/Component/PropertyInfo/Tests/PropertyInfoExtractorTest.php src/Symfony/Component/Yaml/Tests/ParserTest.php
2 parents 7c30ed4 + 9617b77 commit 1bd125e

File tree

134 files changed

+969
-414
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+969
-414
lines changed

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ cache:
2929
services: mongodb
3030

3131
before_install:
32+
# Matrix lines for intermediate PHP versions are skipped for pull requests
3233
- if [[ ! $deps && ! $TRAVIS_PHP_VERSION = ${MIN_PHP%.*} && $TRAVIS_PHP_VERSION != hhvm && $TRAVIS_PULL_REQUEST != false ]]; then deps=skip; fi;
34+
# A sigchild-enabled-PHP is used to test the Process component on the lowest PHP matrix line
3335
- if [[ ! $deps && $TRAVIS_PHP_VERSION = ${MIN_PHP%.*} && ! -d php-$MIN_PHP/sapi ]]; then wget http://museum.php.net/php5/php-$MIN_PHP.tar.bz2 -O - | tar -xj; (cd php-$MIN_PHP; ./configure --enable-sigchild --enable-pcntl; make -j2); fi;
3436
- if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then INI_FILE=~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; else INI_FILE=/etc/hhvm/php.ini; fi;
3537
- echo memory_limit = -1 >> $INI_FILE
@@ -49,9 +51,12 @@ before_install:
4951

5052
install:
5153
- if [[ $deps != skip ]]; then COMPONENTS=$(find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist -printf '%h\n'); fi;
54+
# Create local composer packages for each patched components and reference them in composer.json files when cross-testing components
5255
- if [[ $deps != skip && $deps ]]; then php .travis.php $TRAVIS_COMMIT_RANGE $TRAVIS_BRANCH $COMPONENTS; fi;
56+
# For the master branch when deps=high, the version before master is checked out and tested with the locally patched components
5357
- if [[ $deps = high && $TRAVIS_BRANCH = master ]]; then SYMFONY_VERSION=$(git ls-remote --heads | grep -o '/[1-9].*' | tail -n 1 | sed s/.//); else SYMFONY_VERSION=$(cat composer.json | grep '^ *"dev-master". *"[1-9]' | grep -o '[0-9.]*'); fi;
5458
- if [[ $deps = high && $TRAVIS_BRANCH = master ]]; then git fetch origin $SYMFONY_VERSION; git checkout -m FETCH_HEAD; COMPONENTS=$(find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist -printf '%h\n'); fi;
59+
# Legacy tests are skipped when deps=high and when the current branch version has not the same major version number than the next one
5560
- if [[ $deps = high && ${SYMFONY_VERSION%.*} != $(git show $(git ls-remote --heads | grep -FA1 /$SYMFONY_VERSION | tail -n 1):composer.json | grep '^ *"dev-master". *"[1-9]' | grep -o '[0-9]*' | head -n 1) ]]; then LEGACY=,legacy; fi;
5661
- export COMPOSER_ROOT_VERSION=$SYMFONY_VERSION.x-dev;
5762
- if [[ ! $deps ]]; then composer update --prefer-dist; else export SYMFONY_DEPRECATIONS_HELPER=weak; fi;

CHANGELOG-3.0.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,103 @@ in 3.0 minor versions.
77
To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash
88
To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v3.0.0...v3.0.1
99

10+
* 3.0.2 (2016-02-03)
11+
12+
* bug #17658 [FrameworkBundle] fix assets and templating tests (xabbuh)
13+
* bug #17596 [Translation] Add resources from fallback locale to parent catalogue (c960657)
14+
* bug #17605 [FrameworkBundle] remove default null value for asset version (xabbuh)
15+
* bug #17606 [DependencyInjection] pass triggerDeprecationError arg to parent class (xabbuh)
16+
* bug #16956 [DependencyInjection] XmlFileLoader: enforce tags to have a name (xabbuh)
17+
* bug #16265 [BrowserKit] Corrected HTTP_HOST logic (Naktibalda)
18+
* bug #17559 [SecurityBundle] Fix HTTP Digest auth not being passed user checker (SamFleming)
19+
* bug #17554 [DependencyInjection] resolve aliases in factories (xabbuh)
20+
* bug #17555 [DependencyInjection] resolve aliases in factory services (xabbuh)
21+
* bug #17511 [Form] ArrayChoiceList can now deal with a null in choices (issei-m)
22+
* bug #17430 [Serializer] Ensure that groups are strings (dunglas)
23+
* bug #16795 [FrameworkBundle][Validator] Fix apc cache service & config (ogizanagi)
24+
* bug #15272 [FrameworkBundle] Fix template location for PHP templates (jakzal)
25+
* bug #11232 [Routing] Fixes fatal errors with object resources in AnnotationDirectoryLoader::supports (Tischoi)
26+
* bug #17526 Escape the delimiter in Glob::toRegex (javiereguiluz)
27+
* bug #17527 fixed undefined variable (fabpot)
28+
* bug #15706 [framework-bundle] Added support for the `0.0.0.0/0` trusted proxy (zerkms)
29+
* bug #16274 [HttpKernel] Lookup the response even if the lock was released after two second wait (jakzal)
30+
* bug #16954 [TranslationUpdateCommand] fixed undefined resultMessage var. (aitboudad)
31+
* bug #17355 [DoctrineBridge][Validator] >= 2.3 Pass association instead of ID as argument (xavismeh)
32+
* bug #17330 Limit the max height/width of icons in the profiler menu (javiereguiluz)
33+
* bug #17454 Allow absolute URLs to be displayed in the debug toolbar (javiereguiluz)
34+
* bug #16736 [Request] Ignore invalid IP addresses sent by proxies (GromNaN)
35+
* bug #17459 [EventDispatcher] TraceableEventDispatcher resets event listener priorities (c960657)
36+
* bug #17486 [FrameworkBundle] Throw for missing container extensions (kix)
37+
* bug #16961 Overriding profiler position in CSS breaks JS positioning (aschempp)
38+
* bug #16873 Able to load big xml files with DomCrawler (zorn-v)
39+
* bug #16897 [Form] Fix constraints could be null if not set (DZunke)
40+
* bug #16912 [Translation][Writer] avoid calling setBackup if the dumper is not FileDumper (aitboudad)
41+
* bug #17505 sort bundles in config:dump-reference command (xabbuh)
42+
* bug #17506 [FrameworkBundle] enable assets when templates are enabled (xabbuh)
43+
* bug #17514 [Asset] Add defaultNull to version configuration (ewgRa)
44+
* bug #16511 [Asset] Ability to set empty version strategy in packages (ewgRa)
45+
* bug #17457 Display Ajax requests from newest to oldest in the toolbar (javiereguiluz)
46+
* bug #17503 [Asset] CLI: use request context to generate absolute URLs (xabbuh)
47+
* bug #17478 [HttpFoundation] Do not overwrite the Authorization header if it is already set (jakzal)
48+
* bug #17461 [Yaml] tag for dumped PHP objects must be a local one (xabbuh)
49+
* bug #16822 [FrameworkBundle][Validator] Fix apc cache service deprecation (ogizanagi)
50+
* bug #17463 [Form] make tests compatible with Symfony 2.8 and 3.0 (xabbuh)
51+
* bug #17456 [DX] Remove default match from AbstractConfigCommand::findExtension (kix)
52+
* bug #17455 Fixed form types in profiler (javiereguiluz)
53+
* bug #17424 [Process] Update in 2.7 for stream-based output storage (romainneutron)
54+
* bug #17417 Fixed the form profiler when using long form types (javiereguiluz)
55+
* bug #17423 [Process] Use stream based storage to avoid memory issues (romainneutron)
56+
* bug #17041 [FrameworkBundle] Added the assets helper again (dosten)
57+
* bug #17406 [Form] ChoiceType: Fix a notice when 'choices' normalizer is replaced (paradajozsef)
58+
* bug #17433 [FrameworkBundle] Don't log twice with the error handler (nicolas-grekas)
59+
* bug #17418 Fixed Bootstrap form theme form "reset" buttons (javiereguiluz)
60+
* bug #17416 [PropertyInfo] PhpDocExtractor: Fix a notice when the property doesn'… (dunglas)
61+
* bug #17404 fix merge 2.3 into 2.7 for SecureRandom dependency (Tobion)
62+
* bug #17373 [SecurityBundle] fix SecureRandom service constructor args (Tobion)
63+
* bug #17397 Remove remaining calls to non-existing method (paradajozsef)
64+
* bug #17382 [TwigBridge] Use label_format option for checkbox and radio labels (enumag)
65+
* bug #17380 [TwigBridge] Use label_format option for checkbox and radio labels (enumag)
66+
* bug #17377 Fix performance (PHP5) and memory (PHP7) issues when using token_get_all (nicolas-grekas, peteward)
67+
* bug #17389 [Routing] Fixed correct class name in thrown exception (fixes #17388) (robinvdvleuten)
68+
* bug #17358 [ClassLoader] Use symfony/polyfill-apcu (nicolas-grekas)
69+
* bug #17370 [HttpFoundation][Cookie] Cookie DateTimeInterface fix (wildewouter)
70+
* security #17359 do not ship with a custom rng implementation (xabbuh, fabpot)
71+
* bug #17253 [Console] HHVM read input stream bug (mbutkereit)
72+
* bug #17314 Fix max width for multibyte keys in choice question (mheki)
73+
* bug #17326 [Console] Display console application name even when no version set (polc)
74+
* bug #17328 [Serializer] Allow to use proxies in object_to_populate (dunglas)
75+
* bug #17202 [FrameworkBundle] Don't log twice with the error handler (nicolas-grekas)
76+
* bug #17347 Workaround https://bugs.php.net/63206 (nicolas-grekas)
77+
* bug #17340 [HttpFoundation] Fixed Request HTTP_USER_AGENT on 3.X versions (davelima)
78+
* bug #17199 [Serializer] Allow context to contain not serializable data (dunglas, nicolas-grekas)
79+
* bug #17334 [WebProfiler] Fixed sf-minitoolbar height (yceruto)
80+
* bug #17140 [Serializer] Remove normalizer cache in Serializer class (jvasseur)
81+
* bug #17320 [Debug] Fixed erroneous deprecation notice for extended Interfaces (peterrehm)
82+
* bug #17307 [FrameworkBundle] Fix paths with % in it (like urlencoded) (scaytrase)
83+
* bug #17078 [Bridge] [Doctrine] [Validator] Added support \IteratorAggregate for UniqueEntityValidator (Disparity)
84+
* bug #17298 [FrameworkBundle] Use proper class to fetch $versionStrategy property (dosten)
85+
* bug #17287 [HttpKernel] Forcing string comparison on query parameters sort in UriSigner (Tim van Densen)
86+
* bug #17279 [FrameworkBundle] Add case in Kernel directory guess for PHPUnit (tgalopin)
87+
* bug #17278 [FrameworkBundle] Add case in Kernel directory guess for PHPUnit (tgalopin)
88+
* bug #17063 bug #14246 [Filesystem] dumpFile() negates default file permissions (Hidde Boomsma)
89+
* bug #17283 [WebProfilerBundle] Remove loading status from AJAX toolbar after error (kucharovic)
90+
* bug #17275 [PhpUnitBridge] Re-enable the garbage collector (nicolas-grekas)
91+
* bug #17276 [Process] Fix potential race condition (nicolas-grekas)
92+
* bug #17261 [FrameworkBundle] Allow to autowire service_container (dunglas)
93+
* bug #17183 [FrameworkBundle] Set the kernel.name properly after a cache warmup (jakzal)
94+
* bug #17197 [Yaml] cast arrays to objects after parsing has finished (xabbuh)
95+
* bug #17247 Fix toolbar display when nvd3 is loaded on page (Seldaek)
96+
* bug #17159 [Yaml] recognize when a block scalar is left (xabbuh)
97+
* bug #17195 bug #14246 [Filesystem] dumpFile() non atomic (Hidde Boomsma)
98+
* feature #16747 [Form] Improved performance of ChoiceType and its subtypes (webmozart)
99+
* bug #17179 [WebProfiler] Removed an object as route generator argument (iltar)
100+
* bug #17177 [Process] Fix potential race condition leading to transient tests (nicolas-grekas)
101+
* bug #17163 [Form] fix Catchable Fatal Error if choices is not an array (Gladhon, nicolas-grekas)
102+
* bug #17152 [DoctrineBridge] [PropertyInfo] Catch Doctrine\ORM\Mapping\MappingException (dunglas)
103+
* bug #17119 [Form] improve deprecation message for "empty_value" and "choice_list" options. (hhamon)
104+
* bug #17156 [HttpFoundation] add missing symfony/polyfill-php55 dependency (xabbuh)
105+
* bug #17162 [Form] Fix regression on Collection type (hason)
106+
10107
* 3.0.1 (2015-12-26)
11108

12109
* bug #16864 [Yaml] fix indented line handling in folded blocks (xabbuh)

UPGRADE-3.0.md

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -234,13 +234,13 @@ UPGRADE FROM 2.x to 3.0
234234
### Form
235235

236236
* The `getBlockPrefix()` method was added to the `FormTypeInterface` in replacement of
237-
the `getName()` method which has been has been removed.
237+
the `getName()` method which has been removed.
238238

239239
* The `configureOptions()` method was added to the `FormTypeInterface` in replacement
240240
of the `setDefaultOptions()` method which has been removed.
241241

242242
* The `getBlockPrefix()` method was added to the `ResolvedFormTypeInterface` in
243-
replacement of the `getName()` method which has been has been removed.
243+
replacement of the `getName()` method which has been removed.
244244

245245
* The option `options` of the `CollectionType` has been removed in favor
246246
of the `entry_options` option.
@@ -940,9 +940,6 @@ UPGRADE FROM 2.x to 3.0
940940

941941
* The `AbstractVoter` class was removed in favor of the new `Voter` class.
942942

943-
* The `VoterInterface::supportsClass` and `supportsAttribute` methods were
944-
removed from the interface.
945-
946943
* The `Resources/` directory was moved to `Core/Resources/`
947944

948945
* The `key` settings of `anonymous`, `remember_me` and `http_digest` are
@@ -1034,8 +1031,12 @@ UPGRADE FROM 2.x to 3.0
10341031
));
10351032
```
10361033

1037-
* The `AbstractVoter::getSupportedAttributes()` and `AbstractVoter::getSupportedClasses()`
1038-
methods have been removed in favor of `AbstractVoter::supports()`.
1034+
* The `AbstractVoter` class was removed. Instead, extend the new `Voter` class,
1035+
introduced in 2.8, and move your voting logic to the to the `supports($attribute, $subject)`
1036+
and `voteOnAttribute($attribute, $object, TokenInterface $token)` methods.
1037+
1038+
* The `supportsClass` and `supportsAttribute` methods were
1039+
removed from the `VoterInterface` interface.
10391040

10401041
Before:
10411042

@@ -1059,14 +1060,19 @@ UPGRADE FROM 2.x to 3.0
10591060
After:
10601061

10611062
```php
1062-
class MyVoter extends AbstractVoter
1063+
use Symfony\Component\Security\Core\Authorization\Voter\Voter;
1064+
1065+
class MyVoter extends Voter
10631066
{
10641067
protected function supports($attribute, $object)
10651068
{
10661069
return $object instanceof Post && in_array($attribute, array('CREATE', 'EDIT'));
10671070
}
10681071
1069-
// ...
1072+
protected function voteOnAttribute($attribute, $object, TokenInterface $token)
1073+
{
1074+
// Return true or false
1075+
}
10701076
}
10711077
```
10721078

@@ -1103,6 +1109,16 @@ UPGRADE FROM 2.x to 3.0
11031109
* The `supportsAttribute()` and `supportsClass()` methods of classes `AuthenticatedVoter`, `ExpressionVoter`
11041110
and `RoleVoter` have been removed.
11051111

1112+
* The `intention` option was renamed to `csrf_token_id` for all the authentication listeners.
1113+
1114+
* The `csrf_provider` option was renamed to `csrf_token_generator` for all the authentication listeners.
1115+
1116+
### SecurityBundle
1117+
1118+
* The `intention` firewall listener setting was renamed to `csrf_token_id`.
1119+
1120+
* The `csrf_provider` firewall listener setting was renamed to `csrf_token_generator`.
1121+
11061122
### Serializer
11071123

11081124
* The `setCamelizedAttributes()` method of the

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ init:
1414
- SET PHP=1
1515
- SET ANSICON=121x90 (121x90)
1616
- SET SYMFONY_PHPUNIT_SKIPPED_TESTS=phpunit.skipped
17+
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Command Processor" /v DelayedExpansion /t REG_DWORD /d 1 /f
1718

1819
install:
1920
- IF EXIST c:\php (SET PHP=0) ELSE (mkdir c:\php)
@@ -54,7 +55,6 @@ install:
5455

5556
test_script:
5657
- cd c:\projects\symfony
57-
- Setlocal EnableDelayedExpansion
5858
- SET X=0
5959
- copy /Y c:\php\php.ini-min c:\php\php.ini
6060
- php phpunit symfony --exclude-group benchmark,intl-data || SET X=!errorlevel!

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
"twig/twig": "~1.23|~2.0",
2222
"psr/cache": "~1.0",
2323
"psr/log": "~1.0",
24-
"symfony/polyfill-apcu": "~1.0,>=1.0.2",
2524
"symfony/polyfill-intl-icu": "~1.0",
2625
"symfony/polyfill-mbstring": "~1.0",
2726
"symfony/polyfill-php56": "~1.0",
@@ -85,6 +84,7 @@
8584
"monolog/monolog": "~1.11",
8685
"ocramius/proxy-manager": "~0.4|~1.0",
8786
"egulias/email-validator": "~1.2",
87+
"symfony/polyfill-apcu": "~1.1",
8888
"symfony/security-acl": "~2.8|~3.0",
8989
"phpdocumentor/reflection": "^1.0.7"
9090
},

phpunit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if ('phpdbg' === PHP_SAPI) {
2727
$PHP .= ' -qrr';
2828
}
2929

30-
$COMPOSER = file_exists($COMPOSER = __DIR__.'/composer.phar') || ($COMPOSER = rtrim('\\' === DIRECTORY_SEPARATOR ? `where.exe composer.phar` : `which composer.phar`))
30+
$COMPOSER = file_exists($COMPOSER = __DIR__.'/composer.phar') || ($COMPOSER = rtrim('\\' === DIRECTORY_SEPARATOR ? preg_replace('/[\r\n].*/', '', `where.exe composer.phar`) : `which composer.phar`))
3131
? $PHP.' '.ProcessUtils::escapeArgument($COMPOSER)
3232
: 'composer';
3333

src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ protected function setMappingDriverConfig(array $mappingConfig, $mappingName)
153153
*/
154154
protected function getMappingDriverBundleConfigDefaults(array $bundleConfig, \ReflectionClass $bundle, ContainerBuilder $container)
155155
{
156-
$bundleDir = dirname($bundle->getFilename());
156+
$bundleDir = dirname($bundle->getFileName());
157157

158158
if (!$bundleConfig['type']) {
159159
$bundleConfig['type'] = $this->detectMetadataDriver($bundleDir, $container);

src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/DoctrineValidationPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ private function updateValidatorMappingFiles(ContainerBuilder $container, $mappi
6060

6161
foreach ($container->getParameter('kernel.bundles') as $bundle) {
6262
$reflection = new \ReflectionClass($bundle);
63-
if (is_file($file = dirname($reflection->getFilename()).'/'.$validationPath)) {
63+
if (is_file($file = dirname($reflection->getFileName()).'/'.$validationPath)) {
6464
$files[] = realpath($file);
6565
$container->addResource(new FileResource($file));
6666
}

src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class DoctrineExtractorTest extends \PHPUnit_Framework_TestCase
2626
*/
2727
private $extractor;
2828

29-
public function setUp()
29+
protected function setUp()
3030
{
3131
$config = Setup::createAnnotationMetadataConfiguration(array(__DIR__.DIRECTORY_SEPARATOR.'Fixtures'), true);
3232
$entityManager = EntityManager::create(array('driver' => 'pdo_sqlite'), $config);

src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
use Doctrine\Common\Persistence\ObjectManager;
1717
use Doctrine\Common\Persistence\ObjectRepository;
1818
use Symfony\Bridge\Doctrine\Test\DoctrineTestHelper;
19-
use Symfony\Bridge\Doctrine\Tests\Fixtures\CompositeIntIdEntity;
2019
use Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdEntity;
2120
use Symfony\Bridge\Doctrine\Tests\Fixtures\DoubleNameEntity;
2221
use Symfony\Bridge\Doctrine\Tests\Fixtures\AssociationEntity;
@@ -402,8 +401,8 @@ public function testAssociatedEntity()
402401

403402
$this->buildViolation('myMessage')
404403
->atPath('property.path.single')
405-
->setParameter('{{ value }}', 1)
406-
->setInvalidValue(1)
404+
->setParameter('{{ value }}', $entity1)
405+
->setInvalidValue($entity1)
407406
->assertRaised();
408407
}
409408

@@ -427,29 +426,6 @@ public function testAssociatedEntityWithNull()
427426
$this->assertNoViolation();
428427
}
429428

430-
/**
431-
* @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException
432-
* @expectedExceptionMessage Associated entities are not allowed to have more than one identifier field
433-
*/
434-
public function testAssociatedCompositeEntity()
435-
{
436-
$constraint = new UniqueEntity(array(
437-
'message' => 'myMessage',
438-
'fields' => array('composite'),
439-
'em' => self::EM_NAME,
440-
));
441-
442-
$composite = new CompositeIntIdEntity(1, 1, 'test');
443-
$associated = new AssociationEntity();
444-
$associated->composite = $composite;
445-
446-
$this->em->persist($composite);
447-
$this->em->persist($associated);
448-
$this->em->flush();
449-
450-
$this->validator->validate($associated, $constraint);
451-
}
452-
453429
/**
454430
* @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException
455431
* @expectedExceptionMessage Object manager "foo" does not exist.

0 commit comments

Comments
 (0)