Skip to content

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

@github-actions

Description

@github-actions

https://api.github.com/vaizard/glued-stor/blob/a2adc5a90e774347c9e4d7ab188342058eaefa34/glued/container.php#L88

        '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');

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions