Skip to content

Commit e57fb12

Browse files
committed
Merge branch 'master' into 1.2
2 parents 30cb8cd + f92caa7 commit e57fb12

File tree

19 files changed

+269
-95
lines changed

19 files changed

+269
-95
lines changed

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ php:
66
- 5.5
77

88
env:
9-
- SYMFONY_VERSION=2.2.*
109
- SYMFONY_VERSION=2.3.*
1110
- SYMFONY_VERSION=2.4.*
1211
- SYMFONY_VERSION=dev-master
@@ -15,7 +14,7 @@ before_script:
1514
- composer self-update
1615
- composer require symfony/symfony:${SYMFONY_VERSION} --prefer-source
1716

18-
script: phpunit --coverage-text
17+
script: vendor/bin/phpunit -c phpunit.xml.dist --coverage-text
1918

2019
notifications:
2120
irc: "irc.freenode.org#symfony-cmf"

CHANGELOG.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
Changelog
22
=========
33

4-
* **2013-12-27**: Added XmlSchemaTestCase to test XML schema's
5-
* **2013-11-17**: Added DatabaseTestListener to support database testing
4+
* **2014-06-06**: Updated to PSR-4 autoloading
5+
6+
1.1.0-RC2
7+
---------
8+
9+
* **2014-06-11**: fetch manager by its name
10+
* **2014-04-24**: [DEPRECATE] Deprecated the `sonata_admin` bundle set
11+
* **2014-04-24**: added bundle sets: `sonata_admin_orm` and `sonata_admin_phpcr`
12+
* **2014-04-11**: dropped Symfony 2.2 compatibility
13+
14+
1.1.0-RC1
15+
---------
16+
17+
* **2013-04-07**: [DEPRECATE] Deprecated `LoadBaseData` DataFixture, it will be removed in 2.0
18+
* **2013-04-02**: [DEPRECATE] Deprecated `Content` document, it will be removed in 2.0
19+
* **2013-12-27**: Added `XmlSchemaTestCase` to test XML schema's
20+
* **2013-11-17**: Added `DatabaseTestListener` to support database testing

composer.json

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,23 @@
1010
],
1111
"minimum-stability": "dev",
1212
"require": {
13-
"symfony/symfony": "~2.1",
13+
"symfony/symfony": "~2.3",
1414
"symfony/monolog-bundle": "~2.1",
1515
"doctrine/common": "~2.4",
1616
"doctrine/doctrine-bundle": "1.*",
17-
"doctrine/phpcr-odm": "1.0.*",
18-
"doctrine/phpcr-bundle": "1.0.*",
17+
"doctrine/phpcr-odm": "1.*",
18+
"doctrine/phpcr-bundle": "1.*",
1919
"doctrine/data-fixtures": "1.0.*",
20-
"jackalope/jackalope": "1.0.*",
21-
"jackalope/jackalope-doctrine-dbal": "1.0.*"
20+
"jackalope/jackalope": "1.*",
21+
"jackalope/jackalope-doctrine-dbal": "1.*"
22+
},
23+
"require-dev": {
24+
"phpunit/phpunit": "3.7.*"
2225
},
2326
"autoload": {
24-
"psr-0": { "Symfony\\Cmf\\Component\\Testing": "src/" }
27+
"psr-4": {
28+
"Symfony\\Cmf\\Component\\Testing\\": "src/"
29+
}
2530
},
2631
"extra": {
2732
"branch-alias": {

resources/.travis.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ php:
55
- 5.4
66

77
env:
8-
- SYMFONY_VERSION=2.1.*
9-
- SYMFONY_VERSION=2.2.*
108
- SYMFONY_VERSION=2.3.*
9+
- SYMFONY_VERSION=2.4.*
10+
- SYMFONY_VERSION=dev-master
1111

1212
before_script:
1313
- ./vendor/symfony-cmf/testing/bin/init-travis/phpcr_odm_doctrine_dbal.sh
@@ -17,3 +17,7 @@ script: phpunit --coverage-text
1717
notifications:
1818
irc: "irc.freenode.org#symfony-cmf"
1919
20+
21+
matrix:
22+
allow_failures:
23+
- env: SYMFONY_VERSION=dev-master

resources/config/default.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@
66
if (preg_match('&/([a-zA-Z]+?)Bundle&', $kernelRootDir, $matches)) {
77
$bundleName = $matches[1].'Bundle';
88
$bundleFQN = 'Symfony\\Cmf\\Bundle\\'.$matches[1].'Bundle';
9-
$container->setParameter('cmf_testing.bundle_name', $bundleName);
10-
$container->setParameter('cmf_testing.bundle_fqn', $bundleFQN);
9+
if (!$container->hasParameter('cmf_testing.bundle_name')) {
10+
$container->setParameter('cmf_testing.bundle_name', $bundleName);
11+
}
12+
if (!$container->hasParameter('cmf_testing.bundle_fqn')) {
13+
$container->setParameter('cmf_testing.bundle_fqn', $bundleFQN);
14+
}
1115
}
1216

1317
$loader->import('dist/parameters.yml');

src/Symfony/Cmf/Component/Testing/DataFixtures/PHPCR/LoadBaseData.php renamed to src/DataFixtures/PHPCR/LoadBaseData.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,24 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony CMF package.
5+
*
6+
* (c) 2011-2014 Symfony CMF
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
313
namespace Symfony\Cmf\Component\Testing\DataFixtures\PHPCR;
414

515
use Doctrine\Common\DataFixtures\FixtureInterface;
616
use Doctrine\Common\Persistence\ObjectManager;
717
use Doctrine\ODM\PHPCR\Document\Generic;
818

19+
/**
20+
* @deprecated Deprecated as of Testing 1.1, will be removed in 2.0
21+
*/
922
class LoadBaseData implements FixtureInterface
1023
{
1124
public function load(ObjectManager $manager)

src/Symfony/Cmf/Component/Testing/Document/Content.php renamed to src/Document/Content.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony CMF package.
5+
*
6+
* (c) 2011-2014 Symfony CMF
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
313
namespace Symfony\Cmf\Component\Testing\Document;
414

515
use Doctrine\ODM\PHPCR\Mapping\Annotations as PHPCRODM;
@@ -9,6 +19,9 @@
919
*
1020
* Very simple, referenceable document.
1121
*
22+
* @deprecated This Document is deprecated as of 1.1 and will be removed in
23+
* 2.0. Move the fixture to your own bundle instead.
24+
*
1225
* @PHPCRODM\Document(referenceable=true)
1326
*/
1427
class Content

src/Symfony/Cmf/Component/Testing/Functional/BaseTestCase.php renamed to src/Functional/BaseTestCase.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony CMF package.
5+
*
6+
* (c) 2011-2014 Symfony CMF
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
313
namespace Symfony\Cmf\Component\Testing\Functional;
414

515
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;

src/Symfony/Cmf/Component/Testing/Functional/DbManager/ORM.php renamed to src/Functional/DbManager/ORM.php

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony CMF package.
5+
*
6+
* (c) 2011-2014 Symfony CMF
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
313
namespace Symfony\Cmf\Component\Testing\Functional\DbManager;
414

515
use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -49,12 +59,13 @@ public function getRegistry()
4959
/**
5060
* Gets the Doctrine ObjectManager
5161
*
62+
* @param null $managerName
5263
* @return ObjectManager
5364
*/
54-
public function getOm()
65+
public function getOm($managerName = null)
5566
{
5667
if (!$this->om) {
57-
$this->om = $this->getRegistry()->getManager();
68+
$this->om = $this->getRegistry()->getManager($managerName);
5869
}
5970

6071
return $this->om;

src/Symfony/Cmf/Component/Testing/Functional/DbManager/PHPCR.php renamed to src/Functional/DbManager/PHPCR.php

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony CMF package.
5+
*
6+
* (c) 2011-2014 Symfony CMF
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
313
namespace Symfony\Cmf\Component\Testing\Functional\DbManager;
414

515
use Doctrine\Common\DataFixtures\Purger\PHPCRPurger;
@@ -25,10 +35,14 @@ public function getRegistry()
2535
return $this->container->get('doctrine_phpcr');
2636
}
2737

28-
public function getOm()
38+
/**
39+
* @param null|string $managerName
40+
* @return DocumentManager
41+
*/
42+
public function getOm($managerName = null)
2943
{
3044
if (!$this->om) {
31-
$this->om = $this->getRegistry()->getManager();
45+
$this->om = $this->getRegistry()->getManager($managerName);
3246
}
3347

3448
return $this->om;

0 commit comments

Comments
 (0)