Skip to content
This repository has been archived by the owner on Jan 1, 2023. It is now read-only.

Commit

Permalink
minor #394 Add symfony 3.0 support (Ener-Getick)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.7-dev branch.

Discussion
----------

Add symfony 3.0 support

This PR adds symfony 3.0 support.

Commits
-------

1482825 Add symfony 3.0 support
  • Loading branch information
stof committed Nov 17, 2015
2 parents 9a2c613 + 1482825 commit 3c58966
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 20 deletions.
5 changes: 1 addition & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ matrix:
fast_finish: true
include:
- php: 5.3
env: COMPOSER_FLAGS="--prefer-lowest"
env: COMPOSER_FLAGS="--prefer-lowest" SYMFONY_DEPRECATIONS_HELPER=weak
# Test against Symfpny LTS versions
- php: 5.6
env: SYMFONY_VERSION=2.3.*
Expand All @@ -27,12 +27,9 @@ matrix:
# Test against dev versions
- php: 5.6
env: DEPENDENCIES=dev
- php: 5.6
env: SYMFONY_VERSION="3.0.x-dev as 2.9" DEPENDENCIES=dev # ensure the version is higher than 2.8 to be installed
allow_failures:
- php: hhvm
- env: DEPENDENCIES=dev
- env: SYMFONY_VERSION="3.0.x-dev as 2.9" DEPENDENCIES=dev

install:
- if [ "$DEPENDENCIES" = "dev" ]; then perl -pi -e 's/^}$/,"minimum-stability":"dev"}/' composer.json; fi;
Expand Down
4 changes: 3 additions & 1 deletion Templating/DynamicAsseticHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ public function __construct(RouterHelper $routerHelper, AssetFactory $factory)

protected function getAssetUrl(AssetInterface $asset, $options = array())
{
return $this->routerHelper->generate('_assetic_'.$options['name']);
return !method_exists($this->routerHelper, 'path')
? $this->routerHelper->generate('_assetic_'.$options['name'])
: $this->routerHelper->path('_assetic_'.$options['name']);
}
}
4 changes: 0 additions & 4 deletions Tests/FunctionalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ public function testTwigRenderDebug()
$kernel = new TestKernel('test', true);
$kernel->boot();
$container = $kernel->getContainer();
$container->enterScope('request');
$container->set('request', new Request());

$content = $container->get('templating')->render('::layout.html.twig');
$crawler = new Crawler($content);
Expand All @@ -67,8 +65,6 @@ public function testPhpRenderDebug()
$kernel = new TestKernel('test', true);
$kernel->boot();
$container = $kernel->getContainer();
$container->enterScope('request');
$container->set('request', new Request());

$content = $container->get('templating')->render('::layout.html.php');
$crawler = new Crawler($content);
Expand Down
4 changes: 2 additions & 2 deletions Tests/Resources/config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ assetic:
inputs:
- css/main.css
- css/more.css
- @widget_css
- "@widget_css"
filters: [ ?yui_css ]
output: css/packed/app.css
widget_css:
inputs: css/widget.sass
filters: sass
filters:
sass:
apply_to: "\.sass$"
apply_to: '\.sass$'
yui_css:
jar: %kernel.root_dir/java/yui-compressor-2.4.6.jar
twig:
Expand Down
18 changes: 9 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@
],
"require": {
"php": ">=5.3.0",
"symfony/framework-bundle": "~2.3",
"symfony/dependency-injection": "~2.3",
"symfony/console": "~2.3",
"symfony/yaml": "~2.3",
"symfony/framework-bundle": "~2.3|~3.0",
"symfony/dependency-injection": "~2.3|~3.0",
"symfony/console": "~2.3|~3.0",
"symfony/yaml": "~2.3|~3.0",
"kriswallsmith/assetic": "~1.3"
},
"require-dev": {
"patchwork/jsqueeze": "~1.0",
"kriswallsmith/spork": "~0.3",
"symfony/twig-bundle": "~2.3",
"symfony/class-loader": "~2.3",
"symfony/dom-crawler": "~2.3",
"symfony/css-selector": "~2.3",
"symfony/phpunit-bridge": "~2.7"
"symfony/twig-bundle": "~2.3|~3.0",
"symfony/class-loader": "~2.3|~3.0",
"symfony/dom-crawler": "~2.3|~3.0",
"symfony/css-selector": "~2.3|~3.0",
"symfony/phpunit-bridge": "~2.7|~3.0"
},
"conflict": {
"twig/twig": "<1.20",
Expand Down

0 comments on commit 3c58966

Please sign in to comment.