Skip to content

Commit

Permalink
Merge pull request #46 from stefandoorn/test-additional-dependencies
Browse files Browse the repository at this point in the history
Support Sylius v1.2 + Symfony 4.1
  • Loading branch information
stefandoorn authored Jun 17, 2018
2 parents 2fd630f + 2753f19 commit 1f1c00f
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 12 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ php:
- 7.2

env:
- DEPENDENCY_VERSIONS="sylius/sylius:1.0.* symfony/symfony:3.4.*"
- DEPENDENCY_VERSIONS="sylius/sylius:1.2.* symfony/symfony:4.1.*"
- DEPENDENCY_VERSIONS="sylius/sylius:1.2.* symfony/symfony:3.4.*"
- DEPENDENCY_VERSIONS="sylius/sylius:1.1.* symfony/symfony:3.4.*"
- DEPENDENCY_VERSIONS="sylius/sylius:1.0.* symfony/symfony:3.4.*"

cache:
yarn: true
Expand Down
1 change: 1 addition & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<ini name="error_reporting" value="-1" />
<server name="KERNEL_DIR" value="tests/Application/app/" />
<server name="IS_DOCTRINE_ORM_SUPPORTED" value="1"/>
<server name="KERNEL_CLASS" value="AppKernel" />
</php>

<testsuites>
Expand Down
2 changes: 2 additions & 0 deletions src/Resources/config/services/providers/products.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
<services>
<defaults autowire="false" autoconfigure="false" public="false" />

<service id="sylius.sitemap_provider.product" class="SitemapPlugin\Provider\ProductUrlProvider">
<argument type="service" id="sylius.repository.product" />
<argument type="service" id="router" />
Expand Down
2 changes: 2 additions & 0 deletions src/Resources/config/services/providers/static.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
<services>
<defaults autowire="false" autoconfigure="false" public="false" />

<service id="sylius.sitemap_provider.static" class="SitemapPlugin\Provider\StaticUrlProvider">
<argument type="service" id="router" />
<argument type="service" id="sylius.sitemap_url_factory" />
Expand Down
2 changes: 2 additions & 0 deletions src/Resources/config/services/providers/taxons.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
<services>
<defaults autowire="false" autoconfigure="false" public="false" />

<service id="sylius.sitemap_provider.taxon" class="SitemapPlugin\Provider\TaxonUrlProvider">
<argument type="service" id="sylius.repository.taxon" />
<argument type="service" id="router" />
Expand Down
6 changes: 4 additions & 2 deletions src/Resources/config/services/sitemap.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
<services>
<service id="sylius.controller.sitemap" class="SitemapPlugin\Controller\SitemapController">
<defaults autowire="false" autoconfigure="false" public="false" />

<service id="sylius.controller.sitemap" class="SitemapPlugin\Controller\SitemapController" public="true">
<argument type="service" id="sylius.sitemap_renderer"/>
<argument type="service" id="sylius.sitemap_builder" />
</service>
<service id="sylius.controller.sitemap_index" class="SitemapPlugin\Controller\SitemapIndexController">
<service id="sylius.controller.sitemap_index" class="SitemapPlugin\Controller\SitemapIndexController" public="true">
<argument type="service" id="sylius.sitemap_index_renderer"/>
<argument type="service" id="sylius.sitemap_index_builder" />
</service>
Expand Down
12 changes: 4 additions & 8 deletions tests/Application/app/AppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,18 @@ final class AppKernel extends Kernel
*/
public function registerBundles(): array
{
$bundles = array_merge(parent::registerBundles(), [
return array_merge(parent::registerBundles(), [
new \Sylius\Bundle\AdminBundle\SyliusAdminBundle(),
new \Sylius\Bundle\ShopBundle\SyliusShopBundle(),

new \FOS\OAuthServerBundle\FOSOAuthServerBundle(), // Required by SyliusApiBundle
new \Sylius\Bundle\AdminApiBundle\SyliusAdminApiBundle(),

new \Fidry\AliceDataFixtures\Bridge\Symfony\FidryAliceDataFixturesBundle(),
new \Nelmio\Alice\Bridge\Symfony\NelmioAliceBundle(),

new SitemapPlugin(),
]);

if (version_compare(Kernel::VERSION, '1.2', 'lt')) {
$bundles[] = new \Fidry\AliceDataFixtures\Bridge\Symfony\FidryAliceDataFixturesBundle();
$bundles[] = new \Nelmio\Alice\Bridge\Symfony\NelmioAliceBundle();
}

return $bundles;
}

/**
Expand Down
1 change: 0 additions & 1 deletion tests/Application/app/config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ framework:
validation: { enable_annotations: true }
templating: { engines: ["twig"] }
default_locale: "%locale%"
trusted_proxies: ~
session:
storage_id: session.storage.mock_file
test: ~
Expand Down

0 comments on commit 1f1c00f

Please sign in to comment.