All Projects → deprecated-packages → set-config-resolver

deprecated-packages / set-config-resolver

Licence: MIT License
[READ-ONLY] Loads configs to you with CLI --config, -c, --set, -s or sets parameter

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to set-config-resolver

ts-belt
🔧 Fast, modern, and practical utility library for FP in TypeScript.
Stars: ✭ 439 (+778%)
Mutual labels:  option
Config
PHP library for simple configuration management
Stars: ✭ 39 (-22%)
Mutual labels:  config
nvimrc
My Neovim configuration. Supports macOS and Linux.
Stars: ✭ 31 (-38%)
Mutual labels:  config
panzerlop
Configuration Guides for fixing things in Linux, Proton & KDE
Stars: ✭ 23 (-54%)
Mutual labels:  config
unikmer
Toolkit for k-mer with taxonomic information
Stars: ✭ 46 (-8%)
Mutual labels:  set
play-rconf
Remote configuration for Play Framework
Stars: ✭ 17 (-66%)
Mutual labels:  config
okty-config
Configuration repository of the simplest application to create docker projects
Stars: ✭ 13 (-74%)
Mutual labels:  config
haf
A fully typed 🔒, cross-platform, persistent 💾 config ⚙️ solution for your NodeJS projects with a great developer experience!
Stars: ✭ 186 (+272%)
Mutual labels:  config
yaask
Make your yaml configurable with interactive configurations!
Stars: ✭ 15 (-70%)
Mutual labels:  config
renovate-config
My shareable config for @renovateapp
Stars: ✭ 28 (-44%)
Mutual labels:  config
dotfiles
My personal app/env configs and dotfiles.
Stars: ✭ 27 (-46%)
Mutual labels:  config
rails-settings-cached
Global settings for your Rails application.
Stars: ✭ 940 (+1780%)
Mutual labels:  config
curator
Config curator is CLI tool for installing static configuration files.
Stars: ✭ 29 (-42%)
Mutual labels:  config
eslint-define-config
Provide a defineConfig function for .eslintrc.js files
Stars: ✭ 61 (+22%)
Mutual labels:  config
mozitools
Mozi Botnet related tools helping to unpack a sample, decode a configuration and track active Mozi nodes using DHT.
Stars: ✭ 23 (-54%)
Mutual labels:  config
eslint-config-hardcore
The most strict (yet practical) ESLint config. 34 plugins. 1047 rules.
Stars: ✭ 168 (+236%)
Mutual labels:  config
rubric
Linter Config Initializer for Python
Stars: ✭ 21 (-58%)
Mutual labels:  config
ecs-gen
docker-gen for AWS ECS
Stars: ✭ 46 (-8%)
Mutual labels:  config
observable ish
Observable state and events for browser and Flutter.
Stars: ✭ 26 (-48%)
Mutual labels:  set
smallrye-config
SmallRye Config - A Java Configuration library
Stars: ✭ 74 (+48%)
Mutual labels:  config

Set Config Resolver

Downloads total

Install

composer require symplify/set-config-resolver

Load a Config for CLI Application?

Use in CLI entry file bin/<app-name>, e.g. bin/ecs or bin/rector.

use Symfony\Component\Console\Input\ArgvInput;
use Symplify\EasyCodingStandard\Set\EasyCodingStandardSetProvider;
use Symplify\SetConfigResolver\SetAwareConfigResolver;

$configs = [];

// 1. --config CLI option or local fallback
$configResolver = new SetAwareConfigResolver(new EasyCodingStandardSetProvider(...));
$inputConfig = $configResolver->resolveFromInputWithFallback(new ArgvInput(), ['ecs.php']);

if ($inputConfig !== null) {
    $configs[] = $inputConfig;
}

// 2. "parameters > set" in provided PHP configs
$parameterSetsConfigs = $configResolver->resolveFromParameterSetsFromConfigFiles($configs);
if ($parameterSetsConfigs !== []) {
    $configs = array_merge($configs, $parameterSetsConfigs);
}

// Build DI container
$appKernel = new AppKernel('prod', true);
if ($configs !== []) {
    $appKernel->setConfigs($configs);
}

$appKernel->boot();

$container = $appKernel->getContainer();

And use like this:

vendor/bin/your-app --config config/set/the-config.yaml

...or...

vendor/bin/your-app --set the-config

...or with this config:

parameters:
    sets:
        - "the-config"

All are equal :)


Report Issues

In case you are experiencing a bug or want to request a new feature head over to the Symplify monorepo issue tracker

Contribute

The sources of this package are contained in the Symplify monorepo. We welcome contributions for this package on symplify/symplify.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].