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

III-6215 config yml2php #289

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,9 @@
/.default_queries.php
/pkg
/.bundle
# Ignore configuration files
config.php
config.*.php

*.pem
!tests/Http/Authentication/samples/*.pem
11 changes: 3 additions & 8 deletions app/Factory/ConfigFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,15 @@
namespace CultuurNet\UDB3\SearchService\Factory;

use Noodlehaus\Config;
use Noodlehaus\Parser\Yaml;
use Noodlehaus\Parser\Php;

final class ConfigFactory
{
public static function create(string $configDir): Config
{
$configFiles = [
$configDir . '/config.yml',
$configDir . '/facet_mapping_facilities.yml',
$configDir . '/facet_mapping_regions.yml',
$configDir . '/facet_mapping_themes.yml',
$configDir . '/facet_mapping_types.yml',
$configDir . '/features.yml',
$configDir . '/config.php',
];
return Config::load($configFiles, new Yaml());
return Config::load($configFiles, new Php());
}
}
Loading