File tree 2 files changed +29
-1
lines changed
2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,11 @@ public static function buildFromConfiguration(string $path): SymfonyContainerBui
28
28
29
29
// Load basic service file + custom user configuration
30
30
$ configDir = dirname (__DIR__ , 2 ).$ filesystem ->ensureValidSlashes ('/resources/config ' );
31
- $ loader = LoaderFactory::createLoader ($ container , [$ configDir ]);
31
+ $ configFileDir = dirname ($ path );
32
+ $ loader = LoaderFactory::createLoader (
33
+ $ container ,
34
+ [$ configDir , $ configFileDir ]
35
+ );
32
36
$ loader ->load ('config.yml ' );
33
37
$ loader ->load ('console.yml ' );
34
38
$ loader ->load ('fixer.yml ' );
Original file line number Diff line number Diff line change @@ -37,4 +37,28 @@ function it_should_be_able_to_resolve_env_variable_in_configuration()
37
37
$ process ->getOutput (),
38
38
);
39
39
}
40
+
41
+ /** @test */
42
+ function it_should_be_able_to_resolve_dist_file_imports ()
43
+ {
44
+ $ this ->initializeGitInRootDir ();
45
+ $ this ->initializeComposer ($ this ->rootDir );
46
+
47
+ // grumphp.yml file.
48
+ $ grumphpFile = $ this ->initializeGrumphpConfig (path: $ this ->rootDir , customConfig: [
49
+ 'imports ' => [
50
+ ['resource ' => 'grumphp.yml.dist ' ]
51
+ ],
52
+ ]);
53
+ // grumphp.yml.dist file which is imported, doesn't matter what's in this imported file.
54
+ $ grumphpDistFile = $ this ->initializeGrumphpConfig (path: $ this ->rootDir , fileName: 'grumphp.yml.dist ' );
55
+
56
+ $ this ->installComposer ($ this ->rootDir );
57
+ $ this ->ensureHooksExist ($ this ->rootDir );
58
+
59
+ $ this ->enableValidatePathsTask ($ grumphpFile , $ this ->rootDir );
60
+
61
+ $ this ->commitAll ($ this ->rootDir );
62
+ $ this ->runGrumphp ($ this ->rootDir );
63
+ }
40
64
}
You can’t perform that action at this time.
0 commit comments