Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit 1d335d0

Browse files
authored
Merge pull request #38 from symfony-cmf/include-puli
Use included puli-light
2 parents b743f1e + 316f7f1 commit 1d335d0

File tree

12 files changed

+41
-34
lines changed

12 files changed

+41
-34
lines changed

.travis.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
language: php
22

33
php:
4-
- 5.5
5-
- 5.6
64
- 7.0
75
- hhvm
86

@@ -11,32 +9,34 @@ sudo: false
119
cache:
1210
directories:
1311
- $HOME/.composer/cache/files
12+
- .phpunit
1413

1514
env:
16-
- SYMFONY_VERSION=2.7.*
15+
matrix: SYMFONY_VERSION=3.2.*
16+
global: SYMFONY_PHPUNIT_DIR=.phpunit SYMFONY_PHPUNIT_REMOVE="symfony/yaml"
1717

1818
matrix:
1919
include:
2020
- php: 5.6
21-
env: SYMFONY_VERSION=2.7.* SYMFONY_DEPRECATIONS_HELPER=weak
22-
- php: 5.6
23-
env: SYMFONY_VERSION=2.8.*
24-
- php: 5.6
25-
env: SYMFONY_VERSION=3.0.*
26-
allow_failures:
27-
- env: SYMFONY_VERSION=2.8.*
28-
- env: SYMFONY_VERSION=3.0.*
21+
env: SYMFONY_VERSION=2.8.* COMPOSER_FLAGS="--prefer-lowest" SYMFONY_DEPRECATIONS_HELPER=weak
22+
- php: 7.1
23+
env: SYMFONY_VERSION=3.3.* DEPS=dev
24+
- php: 7.1
25+
env: SYMFONY_VERSION=3.1.*
2926
fast_finish: true
3027

3128
before_install:
3229
- if [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then echo "memory_limit = -1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi
30+
- phpenv config-rm xdebug.ini || true
3331
- composer self-update
32+
- if [ "$DEPS" = "dev" ]; then perl -pi -e 's/^}$/,"minimum-stability":"dev"}/' composer.json; fi
33+
- if [ "$SYMFONY_VERSION" != "" ]; then composer require symfony/symfony:${SYMFONY_VERSION} --no-update; fi
3434

35-
install: composer require symfony/symfony:${SYMFONY_VERSION} --prefer-dist
35+
install: composer update --prefer-dist $COMPOSER_FLAGS
3636

3737
before_script: vendor/symfony-cmf/testing/bin/travis/phpcr_odm_doctrine_dbal.sh
3838

39-
script: phpunit --coverage-text
39+
script: vendor/bin/simple-phpunit
4040

4141
notifications:
4242
irc: "irc.freenode.org#symfony-cmf"

CmfResourceBundle.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class CmfResourceBundle extends Bundle
2323
public function build(ContainerBuilder $container)
2424
{
2525
$extension = $container->getExtension('cmf_resource');
26-
$extension->addRepositoryFactory('filesystem', new FilesystemFactory());
26+
//$extension->addRepositoryFactory('filesystem', new FilesystemFactory());
2727
$extension->addRepositoryFactory('doctrine_phpcr', new DoctrinePhpcrFactory());
2828
$extension->addRepositoryFactory('doctrine_phpcr_odm', new DoctrinePhpcrOdmFactory());
2929

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ provide the context with which to resolve the documents.
2727

2828
## Requirements
2929

30-
* Symfony 2.2.x
30+
* Symfony 2.8+
3131
* See also the `require` section of [composer.json](composer.json)
3232

3333
## Documentation

Registry/RepositoryRegistry.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace Symfony\Cmf\Bundle\ResourceBundle\Registry;
1313

1414
use Symfony\Cmf\Component\Resource\RepositoryRegistryInterface;
15-
use Puli\Repository\Api\ResourceRepository;
15+
use Symfony\Cmf\Component\Resource\Puli\Api\ResourceRepository;
1616
use Symfony\Component\DependencyInjection\ContainerInterface;
1717

1818
/**

Tests/Functional/FilesystemRepositoryTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ class FilesystemRepositoryTest extends BaseTestCase
1717
{
1818
public function setUp()
1919
{
20+
$this->markTestSkipped('Puli Filesystem is not available.');
2021
$this->repositoryRegistry = $this->getContainer()->get('cmf_resource.registry');
2122
}
2223

Tests/Resources/app/config/resource.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ cmf_resource:
1212
type: doctrine_phpcr_odm
1313
basepath: /cmf/articles
1414

15-
my_filesystem:
16-
type: filesystem
17-
base_dir: %kernel.root_dir%/../filesystem
15+
# my_filesystem:
16+
# type: filesystem
17+
# base_dir: %kernel.root_dir%/../filesystem

Tests/Unit/DependencyInjection/CmfResourceExtensionTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111

1212
namespace Symfony\Cmf\Bundle\ResourceBundle\Tests\Unit\DependencyInjection;
1313

14+
use Prophecy\Argument;
1415
use Symfony\Cmf\Bundle\ResourceBundle\DependencyInjection\CmfResourceExtension;
15-
use Symfony\Component\DependencyInjection\ContainerBuilder;
1616
use Symfony\Cmf\Bundle\ResourceBundle\DependencyInjection\Repository\Factory\RepositoryFactoryInterface;
17+
use Symfony\Cmf\Component\Resource\Puli\Api\ResourceRepository;
1718
use Symfony\Component\DependencyInjection\Definition;
18-
use Prophecy\Argument;
19-
use Symfony\Component\OptionsResolver\OptionsResolver;
19+
use Symfony\Component\DependencyInjection\ContainerBuilder;
2020
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
21+
use Symfony\Component\OptionsResolver\OptionsResolver;
2122
use Symfony\Component\OptionsResolver\Exception\MissingOptionsException;
22-
use Puli\Repository\Api\ResourceRepository;
2323

2424
class CmfResourceExtensionTest extends \PHPUnit_Framework_TestCase
2525
{

Tests/Unit/DependencyInjection/Repository/Factory/FactoryTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ abstract class FactoryTestCase extends \PHPUnit_Framework_TestCase
1818
{
1919
protected $resolver;
2020

21-
public function setUp()
21+
protected function setUp()
2222
{
2323
$this->resolver = new OptionsResolver();
2424
}

Tests/Unit/DependencyInjection/Repository/Factory/FilesystemFactoryTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616

1717
class FilesystemFactoryTest extends FactoryTestCase
1818
{
19+
protected function setUp()
20+
{
21+
$this->markTestSkipped('Puli Filesystem is not available.');
22+
}
23+
1924
/**
2025
* It should add a repository to the container.
2126
* It should configure the base dir.

Tests/Unit/Registry/RepositoryRegistryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Symfony\Cmf\Bundle\ResourceBundle\Tests\Unit\Registry;
1313

14-
use Puli\Repository\Api\ResourceRepository;
14+
use Symfony\Cmf\Component\Resource\Puli\Api\ResourceRepository;
1515
use Symfony\Cmf\Bundle\ResourceBundle\Registry\RepositoryRegistry;
1616
use Symfony\Component\DependencyInjection\ContainerBuilder;
1717

0 commit comments

Comments
 (0)