File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed
Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -18,15 +18,15 @@ class CfHelper
1818 private function __construct ()
1919 {
2020 $ this ->beanLoader = \Arhframe \IocArt \BeanLoader::getInstance ();
21- if (!is_file (__DIR__ . '/../../../../../context/main.yml ' )) {
21+ if (!is_file (__DIR__ . '/../../../../../../ context/main.yml ' )) {
2222 $ yaml = Yaml::parse (__DIR__ . '/../../../context/main.yml ' );
2323 unset($ yaml ['@import ' ]);
2424 $ yaml = Yaml::dump ($ yaml );
2525 file_put_contents (__DIR__ . '/../../../context/main.yml ' , $ yaml );
2626 $ this ->beanLoader ->loadContext (__DIR__ . '/../../../context/main.yml ' );
2727 } else {
2828 $ yaml = Yaml::parse (__DIR__ . '/context/main.yml ' );
29- $ yaml ['@import ' ] = array ('../../../context/main.yml ' );
29+ $ yaml ['@import ' ] = array ('../../../../ context/main.yml ' );
3030 $ yaml = Yaml::dump ($ yaml );
3131 file_put_contents (__DIR__ . '/../../../context/main.yml ' , $ yaml );
3232 $ this ->beanLoader ->loadContext (__DIR__ . '/../../../context/main.yml ' );
Original file line number Diff line number Diff line change @@ -25,14 +25,21 @@ function __construct()
2525
2626 public function loadIniConfig ()
2727 {
28+ $ arrayValues = array ();
2829 try {
29- $ servicePhpIni = null ;
30+
3031 $ servicePhpIni = $ this ->serviceManager ->getService (PhpIniConfigurator::$ servicePhpIniName . '- ' . $ this ->applicationInfo ->getName ());
32+ $ arrayValues = $ servicePhpIni ->getValues ();
3133 } catch (\Exception $ e ) {
32- return ;
34+
35+ }
36+ if (is_file (__DIR__ . '/../../../../../../../composer.json ' )) {
37+ $ composerJson = json_decode (file_get_contents (__DIR__ . '/../../../../../../../composer.json ' ), true );
38+ $ arrayValues = array_merge ($ arrayValues , $ composerJson ['php-ini ' ]);
3339 }
34- foreach ($ servicePhpIni -> getValues () as $ key => $ value ) {
40+ foreach ($ arrayValues as $ key => $ value ) {
3541 ini_set ($ key , $ value );
42+ var_dump ($ key . '= ' . $ value );
3643 }
3744
3845 }
You can’t perform that action at this time.
0 commit comments