File tree Expand file tree Collapse file tree 1 file changed +20
-4
lines changed Expand file tree Collapse file tree 1 file changed +20
-4
lines changed Original file line number Diff line number Diff line change 14
14
atoum \autoloader::get ()
15
15
->addNamespaceAlias ('atoum\config ' , __NAMESPACE__ )
16
16
->addDirectory (__NAMESPACE__ , __DIR__ . DIRECTORY_SEPARATOR . 'classes ' )
17
- ->addDirectory ('Symfony\Component\Config ' , $ vendorDirectory . '/symfony/config/Symfony/Component/Config ' )
18
- ->addDirectory ('Symfony\Component\DependencyInjection ' , $ vendorDirectory . '/symfony/dependency-injection/Symfony/Component/DependencyInjection ' )
19
- ->addDirectory ('Symfony\Component\FileSystem ' , $ vendorDirectory . '/symfony/filesystem/Symfony/Component/FileSystem ' )
20
- ->addDirectory ('Symfony\Component\Yaml ' , $ vendorDirectory . '/symfony/yaml/Symfony/Component/Yaml ' )
21
17
;
18
+
19
+
20
+
21
+ $ components = array (
22
+ 'config ' => 'Config ' ,
23
+ 'dependency-injection ' => 'DependencyInjection ' ,
24
+ 'filesystem ' => 'FileSystem ' ,
25
+ 'yaml ' => 'Yaml ' ,
26
+ );
27
+
28
+ foreach ($ components as $ componentKey => $ componentName ) {
29
+ $ componentDir = $ vendorDirectory . '/symfony/ ' . $ componentKey . '/Symfony/Component/ ' . $ componentName ;
30
+ if (!is_dir ($ componentDir )) {
31
+ $ componentDir = $ vendorDirectory . '/symfony/ ' . $ componentKey ;
32
+ }
33
+ atoum \autoloader::get ()
34
+ ->addDirectory ('Symfony\Component \\' . $ componentName , $ componentDir )
35
+ ;
36
+ }
37
+
You can’t perform that action at this time.
0 commit comments