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

Commit 4a64cde

Browse files
support symfony 3.4, new testing app structure (#216)
1 parent 136af0d commit 4a64cde

Some content is hidden

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

59 files changed

+88
-71
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
tests/Resources/app/cache
2-
tests/Resources/app/logs
1+
tests/Fixtures/App/var
2+
!tests/Fixtures/App/var/.gitempty
33
composer.lock
44
vendor

.travis.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,29 +28,28 @@ cache:
2828
env:
2929
matrix: SYMFONY_VERSION=^3.4@dev
3030
global:
31-
- SYMFONY_DEPRECATIONS_HELPER=24
31+
- SYMFONY_DEPRECATIONS_HELPER=0
3232
- SYMFONY_PHPUNIT_DIR=.phpunit SYMFONY_PHPUNIT_REMOVE="symfony/yaml"
33+
- KERNEL_CLASS=Symfony\Cmf\Bundle\RoutingAutoBundle\Tests\Fixtures\App\Kernel
3334
- SYMFONY_PHPUNIT_VERSION=5.7
3435
- TEST_INSTALLATION=false
3536

3637
matrix:
3738
include:
39+
- php: 7.1
40+
env: DEPS=dev SYMFONY_VERSION=^4@dev
3841
- php: 7.1
3942
env: DEPS=dev SYMFONY_VERSION=^3.4@dev
4043
- php: 7.1
41-
env: DEPS=dev SYMFONY_VERSION=3.3.*
42-
- php: 5.6
4344
env: COMPOSER_FLAGS="--prefer-lowest" SYMFONY_VERSION=2.8.* SYMFONY_DEPRECATIONS_HELPER=weak
44-
- php: 7.0
45-
env: SYMFONY_VERSION=3.1.*
46-
- php: 7.0
47-
env: SYMFONY_VERSION=3.2.*
45+
- php: 7.1
46+
env: SYMFONY_VERSION=3.3.*
4847
- env: TEST_INSTALLATION=true
4948

5049
fast_finish: true
5150
allow_failures:
5251
- php: 7.1
53-
env: DEPS=dev SYMFONY_VERSION=^3.4@dev
52+
env: DEPS=dev SYMFONY_VERSION=^4@dev
5453
- env: TEST_INSTALLATION=true
5554

5655

CHANGELOG.md

Lines changed: 3 additions & 0 deletions

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ ifdef BRANCH
2020
VERSION=dev-${BRANCH}
2121
endif
2222
PACKAGE=symfony-cmf/routing-auto-bundle
23-
23+
export KERNEL_CLASS=Symfony\Cmf\Bundle\RoutingAutoBundle\Tests\Fixtures\App\Kernel
2424
list:
2525
@echo 'test: will run all tests'
2626
@echo 'unit_tests: will run unit tests only'

README.md

Lines changed: 2 additions & 2 deletions

composer.json

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@
1111
],
1212
"require": {
1313
"php": "^5.6|^7.0",
14-
"symfony/framework-bundle": "^2.8|^3.0",
15-
"symfony-cmf/routing-auto": "^2.0.0-RC5",
14+
"symfony/framework-bundle": "^2.8|^3.3",
15+
"symfony-cmf/routing-auto": "^2.0",
1616
"symfony-cmf/routing-bundle": "^1.2.0|^2.0",
1717
"aferrandini/urlizer": "1.0.*",
18-
"phpdocumentor/reflection-docblock": "^3.1, !=3.2.0",
19-
"symfony-cmf/testing": "^2.1@dev"
18+
"phpdocumentor/reflection-docblock": "^3.1, !=3.2.0"
2019
},
2120
"require-dev": {
2221
"symfony/phpunit-bridge": "^3.2",
23-
"symfony/yaml": "^2.8|^3.0",
22+
"symfony/yaml": "^2.8|^3.3",
2423
"matthiasnoback/symfony-dependency-injection-test": "~0.6",
2524
"matthiasnoback/symfony-config-test": "^1.3.1",
26-
"doctrine/phpcr-odm": "^1.3"
25+
"symfony-cmf/testing": "^2.1@dev",
26+
"doctrine/phpcr-odm": "^1.4|^2.0"
2727
},
2828
"suggest": {
2929
"doctrine/phpcr-odm": "To enable support for the PHPCR ODM documents",
@@ -50,5 +50,7 @@
5050
"vendor/symfony-cmf/testing/bin/travis/phpcr_odm_doctrine_dbal.sh",
5151
"SYMFONY_PHPUNIT_REMOVE=\"symfony/yaml\" vendor/bin/simple-phpunit"
5252
]
53-
}
53+
},
54+
"minimum-stability":"dev",
55+
"prefer-stable": true
5456
}

phpunit.xml.dist

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,4 @@
3030
</whitelist>
3131
</filter>
3232

33-
<php>
34-
<server name="KERNEL_DIR" value="tests/Resources/app" />
35-
</php>
36-
3733
</phpunit>

src/Adapter/PhpcrOdmAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ public function compareAutoRouteLocale(AutoRouteInterface $autoRoute, $locale)
215215
{
216216
$autoRouteLocale = $autoRoute->getLocale();
217217

218-
if ($autoRouteLocale === self::TAG_NO_MULTILANG) {
218+
if (self::TAG_NO_MULTILANG === $autoRouteLocale) {
219219
$autoRouteLocale = null;
220220
}
221221

src/DependencyInjection/Compiler/AdapterPass.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,6 @@ public function process(ContainerBuilder $container)
5959

6060
$managerDef = $container->getDefinition('cmf_routing_auto.auto_route_manager');
6161
$container->setAlias('cmf_routing_auto.adapter', $adapterId);
62+
$container->getAlias('cmf_routing_auto.adapter')->setPublic(true);
6263
}
6364
}

src/Resources/config/auto_route.xml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99
</service>
1010

1111
<!-- Auto Route Manager -->
12-
<service id="cmf_routing_auto.auto_route_manager" class="Symfony\Cmf\Component\RoutingAuto\AutoRouteManager">
12+
<service
13+
id="cmf_routing_auto.auto_route_manager"
14+
class="Symfony\Cmf\Component\RoutingAuto\AutoRouteManager"
15+
public="true">
1316
<argument type="service" id="cmf_routing_auto.adapter" />
1417
<argument type="service" id="cmf_routing_auto.uri_generator" />
1518
<argument type="service" id="cmf_routing_auto.defunct_route_handler.delegating" />
@@ -54,12 +57,18 @@
5457
<argument>%cmf_routing_auto.metadata.loader.resources%</argument>
5558
</service>
5659

57-
<service id="cmf_routing_auto.metadata.factory" class="Symfony\Cmf\Component\RoutingAuto\Mapping\MetadataFactory">
60+
<service
61+
id="cmf_routing_auto.metadata.factory"
62+
class="Symfony\Cmf\Component\RoutingAuto\Mapping\MetadataFactory"
63+
public="true">
5864
<factory service="cmf_routing_auto.metadata.factory.builder" method="getMetadataFactory" />
5965
</service>
6066

6167
<!-- Controller -->
62-
<service id="cmf_routing_auto.redirect_controller" class="Symfony\Cmf\Bundle\RoutingAutoBundle\Controller\RedirectController">
68+
<service
69+
id="cmf_routing_auto.redirect_controller"
70+
class="Symfony\Cmf\Bundle\RoutingAutoBundle\Controller\RedirectController"
71+
public="true">
6372
<argument type="service" id="router" />
6473
</service>
6574
</services>

0 commit comments

Comments
 (0)