File tree 5 files changed +23
-12
lines changed
5 files changed +23
-12
lines changed Original file line number Diff line number Diff line change @@ -5,15 +5,20 @@ sudo: false
5
5
php :
6
6
- 7.0
7
7
- 7.1
8
+ - 7.2
8
9
- nightly
9
10
10
11
matrix :
11
12
fast_finish : true
12
13
include :
13
14
- php : 7.0
14
15
env : COMPOSER_FLAGS="--prefer-lowest" SYMFONY_DEPRECATIONS_HELPER=weak
16
+ # Test LTS versions
15
17
- php : 7.1
16
- env : DEPENDENCIES=dev SYMFONY_DEPRECATIONS_HELPER=weak
18
+ env : DEPENDENCIES="dunglas/symfony-lock:^3"
19
+ # Test unstable versions
20
+ - php : 7.2
21
+ env : STABILITY="dev"
17
22
allow_failures :
18
23
- php : nightly
19
24
22
27
- $HOME/.composer/cache/files
23
28
24
29
before_install :
25
- - if [ "$DEPENDENCIES" = "dev" ]; then perl -pi -e 's/^}$/,"minimum-stability":"dev"}/' composer.json; fi;
30
+ - if ! [ -z "$STABILITY" ]; then composer config minimum-stability ${STABILITY}; fi;
31
+ - if ! [ -v "$DEPENDENCIES" ]; then composer require --no-update ${DEPENDENCIES}; fi;
26
32
27
- install : composer update $COMPOSER_FLAGS
33
+ install : composer update $COMPOSER_FLAGS --prefer-dist --no-interaction
28
34
29
35
script : phpunit -v
Original file line number Diff line number Diff line change 11
11
],
12
12
"require" : {
13
13
"php" : " ^7.0" ,
14
- "symfony/asset" : " ^3.2" ,
15
- "symfony/cache" : " ^3.2" ,
16
- "symfony/config" : " ^3.2" ,
17
- "symfony/dependency-injection" : " ^3.2" ,
18
- "symfony/finder" : " ^3.2" ,
19
- "symfony/framework-bundle" : " ^3.2" ,
20
- "symfony/http-kernel" : " ^3.2"
14
+ "symfony/asset" : " ^3.2 || ^4.0 " ,
15
+ "symfony/cache" : " ^3.2 || ^4.0 " ,
16
+ "symfony/config" : " ^3.2 || ^4.0 " ,
17
+ "symfony/dependency-injection" : " ^3.2 || ^4.0 " ,
18
+ "symfony/finder" : " ^3.2 || ^4.0 " ,
19
+ "symfony/framework-bundle" : " ^3.2 || ^4.0 " ,
20
+ "symfony/http-kernel" : " ^3.2 || ^4.0 "
21
21
},
22
22
"require-dev" : {
23
- "symfony/phpunit-bridge" : " ^3.2 "
23
+ "symfony/phpunit-bridge" : " ^4.0 "
24
24
},
25
25
"autoload" : {
26
26
"psr-4" : {
Original file line number Diff line number Diff line change 5
5
use Symfony \Component \Finder \Finder ;
6
6
use Symfony \Component \Finder \SplFileInfo ;
7
7
8
+ /**
9
+ * @internal
10
+ */
8
11
class AssetFinder
9
12
{
10
13
private $ webRoot ;
Original file line number Diff line number Diff line change 4
4
5
5
use Symfony \Component \Config \Definition \Builder \TreeBuilder ;
6
6
use Symfony \Component \Config \Definition \ConfigurationInterface ;
7
+ use Symfony \Flex \Recipe ;
7
8
8
9
class Configuration implements ConfigurationInterface
9
10
{
@@ -16,7 +17,7 @@ public function getConfigTreeBuilder()
16
17
$ rootNode = $ treeBuilder ->root ('incenteev_hashed_asset ' );
17
18
18
19
$ rootNode ->children ()
19
- ->scalarNode ('web_root ' )->defaultValue ('%kernel.root_dir%/../web ' )->end ()
20
+ ->scalarNode ('web_root ' )->defaultValue (\class_exists (Recipe::class) ? ' %kernel.project_dir%/public ' : '%kernel.root_dir%/../web ' )->end ()
20
21
->scalarNode ('version_format ' )->defaultValue ('%%s?%%s ' )->end ()
21
22
;
22
23
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ public function __construct(string $webRoot)
10
10
{
11
11
$ this ->webRoot = $ webRoot ;
12
12
}
13
+
13
14
public function computeHash (string $ path ): string
14
15
{
15
16
$ fullPath = $ this ->webRoot .'/ ' .ltrim ($ path , '/ ' );
You can’t perform that action at this time.
0 commit comments