Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

document in readme that no recursive array_merge is done and that you intentiona... #11

Open
github-actions bot opened this issue May 19, 2023 · 0 comments
Labels

Comments

@github-actions
Copy link

https://api.github.com/vaizard/glued-core/blob/299a51c5d4e34d0e21aca24cb4a22d09e8a48f43/glued/container.php#L80

        'ROOTPATH' => __ROOT__,
        'USERVICE' => basename(__ROOT__)
    ];
    $refs['env'] = array_merge($seed, $_ENV);

    // Load and parse the yaml configs. Replace yaml references with $_ENV and $seed ($_ENV has precedence)
    // TODO replicate foreach below to other microservices.
    // TODO document in readme that no recursive array_merge is done and that you intentionally have to repeat defaults or alternatively use extensions such as 'overwrite' and 'append' to differentate and merge arrays recursively (or not) accordingly
    $files[] = __ROOT__ . '/vendor/vaizard/glued-lib/src/defaults.yaml';
    $files = array_merge($files, glob($refs['env']['DATAPATH'] . '/glued-stor/config/*.yaml'));
    foreach ($files as $file) {
        $yaml = file_get_contents($file);
        $array = $class_sy->parse($yaml, $class_sy::PARSE_CONSTANT);
        $ret = array_merge($ret, $class_ye->expandArrayProperties($array, $refs));
    }

    // Read the routes
    $files = glob($ret['glued']['datapath'] . '/*/cache/routes.yaml');
@github-actions github-actions bot added the todo label May 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

0 participants