2017 © Pedro Peláez
 

discovery-configurator configurators

Discovery configurators for the narrowspark framework

image

narrowspark/configurators

Discovery configurators for the narrowspark framework

  • Friday, July 27, 2018
  • by dani33
  • Repository
  • 1 Watchers
  • 0 Stars
  • 22 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Automatic Narrowspark Framework Configurators

, (*1)

Installation

composer require narrowspark/automatic narrowspark/configurators

Configurators

There are several types of tasks, which are called configurators: options, bootstrap and providers., (*2)

providers Configurator, (*3)

Turns on one or more service provider in the Narrowspark app by appending them to the serviceproviders.php file. Its value is an associative array where the key is the service provider class name and the value is an array of environments where it must be used. The supported environments are local, prod, testing and global (which enables the service provider in all environments):, (*4)

{   
    "extra": {
        "automatic": {
            "providers": {
                "Viserio\\Component\\Routing\\Provider\\RoutingServiceProvider": [
                    "global"
                ],
                "Viserio\\Component\\Routing\\Provider\\RoutingDataCollectorServiceProvider": [
                    "testing"
                ]
            }
        }
    }
}

The previous operation is transformed into the following PHP code:, (*5)

// config/serviceproviders.php
return [
    /** > viserio/routing **/
    \Viserio\Component\Routing\Provider\RoutingServiceProvider::class,
    /** viserio/routing < **/
];

// config/testing/serviceproviders.php
return [
    /** > viserio/routing **/
    \Viserio\Component\Routing\Provider\RoutingDataCollectorServiceProvider::class,
    /** viserio/routing < **/
];

options Configurator, (*6)

Adds new config files to the config folder provided from your root composer.json config-dir name., (*7)

Note: the package name is taken to generate the file name., (*8)

This example creates a new view config file in the packages folder and packages/test folder:, (*9)

Note: the first array key is taken as environment key, like global or test in this example., (*10)

{   
    "extra": {
        "automatic": {
            "options": {
                "global": {
                    "viserio": {
                        "view": {
                            "paths": null
                        }
                    }
                },
                "test": {
                    "viserio": {
                        "view": {
                            "paths": [
                                "./views/"
                            ]
                        }
                    }
                }
            }
        }
    }
}

bootstrap Configurator, (*11)

This example creates new bootstrap configs for the console and http kernel: you can choose between http, console and global type to configure your kernel bootstraps, with the possibility to configure bootstraps for your chosen environment., (*12)

Note: generates a new bootstrap.php file to the config folder provided from your root composer.json config-dir name, if the file doesn’t exists., (*13)

Note: the global type will configure both kernels., (*14)

{   
    "extra": {
        "automatic": {
            "bootstrap": {
                "Viserio\\Component\\Foundation\\Bootstrap\\LoadEnvironmentVariables": ["http"]
            }
        }
    }
}

Contributing

If you would like to help take a look at the list of issues and check our Contributing guild., (*15)

Note: please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms., (*16)

Credits

License

The Narrowspark configurators is open-sourced software licensed under the MIT license, (*17)

The Versions

27/07 2018

dev-master

9999999-dev

Discovery configurators for the narrowspark framework

  Sources   Download

MIT

The Requires

  • php ^7.2
  • ext-mbstring *

 

The Development Requires

discovery narrowspark configurators

27/07 2018

v0.1.2

0.1.2.0

Discovery configurators for the narrowspark framework

  Sources   Download

MIT

The Requires

  • php ^7.2
  • ext-mbstring *

 

The Development Requires

discovery narrowspark configurators

08/05 2018