{"id":15026399,"url":"https://github.com/narrowspark/configurators","last_synced_at":"2025-10-03T23:32:35.618Z","repository":{"id":52417018,"uuid":"131700013","full_name":"narrowspark/configurators","owner":"narrowspark","description":":microscope: Automatic configurators for the narrowspark framework.","archived":true,"fork":false,"pushed_at":"2022-06-26T06:58:50.000Z","size":139,"stargazers_count":2,"open_issues_count":2,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-17T01:12:04.869Z","etag":null,"topics":["automatic","automatic-configurators","narrowspark","narrowspark-framework","php73"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/narrowspark.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-01T10:17:25.000Z","updated_at":"2023-03-01T10:41:14.000Z","dependencies_parsed_at":"2022-08-23T14:20:59.725Z","dependency_job_id":null,"html_url":"https://github.com/narrowspark/configurators","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/narrowspark%2Fconfigurators","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/narrowspark%2Fconfigurators/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/narrowspark%2Fconfigurators/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/narrowspark%2Fconfigurators/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/narrowspark","download_url":"https://codeload.github.com/narrowspark/configurators/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235204448,"owners_count":18952326,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automatic","automatic-configurators","narrowspark","narrowspark-framework","php73"],"created_at":"2024-09-24T20:04:24.628Z","updated_at":"2025-10-03T23:32:30.330Z","avatar_url":"https://github.com/narrowspark.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch2 align=\"center\"\u003eAutomatic Narrowspark Framework Configurators\u003c/h2\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/narrowspark/configurators/releases\"\u003e\u003cimg src=\"https://img.shields.io/packagist/v/narrowspark/configurators.svg?style=flat-square\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://php.net/\"\u003e\u003cimg src=\"https://img.shields.io/badge/php-%5E7.3.0-8892BF.svg?style=flat-square\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://travis-ci.org/narrowspark/configurators\"\u003e\u003cimg src=\"https://img.shields.io/travis/rust-lang/rust/master.svg?style=flat-square\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://codecov.io/gh/narrowspark/configurators\"\u003e\u003cimg src=\"https://img.shields.io/codecov/c/github/narrowspark/configurators/master.svg?style=flat-square\"\u003e\u003c/a\u003e\n    \u003ca href=\"http://opensource.org/licenses/MIT\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nInstallation\n------------\n\n```bash\ncomposer require narrowspark/automatic narrowspark/configurators\n```\n\nConfigurators\n-------------\nThere are several types of tasks, which are called **configurators:**\n`options`, `bootstrap` and `providers`.\n\n`providers` Configurator\n\nTurns on one or more service provider in the Narrowspark app by appending them to the `serviceproviders.php` file.\nIts 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.\nThe supported environments are `local`, `prod`, `testing` and `global` (which enables the `service provider` in all environments):\n\n```json\n{   \n    \"extra\": {\n        \"automatic\": {\n            \"providers\": {\n                \"Viserio\\\\Component\\\\Routing\\\\Provider\\\\RoutingServiceProvider\": [\n                    \"global\"\n                ],\n                \"Viserio\\\\Component\\\\Routing\\\\Provider\\\\RoutingDataCollectorServiceProvider\": [\n                    \"testing\"\n                ]\n            }\n        }\n    }\n}\n```\n\nThe previous operation is transformed into the following PHP code:\n\n```php\n// config/serviceproviders.php\nreturn [\n    /** \u003e viserio/routing **/\n    \\Viserio\\Component\\Routing\\Provider\\RoutingServiceProvider::class,\n    /** viserio/routing \u003c **/\n];\n\n// config/testing/serviceproviders.php\nreturn [\n    /** \u003e viserio/routing **/\n    \\Viserio\\Component\\Routing\\Provider\\RoutingDataCollectorServiceProvider::class,\n    /** viserio/routing \u003c **/\n];\n```\n\n`options` Configurator\n\nAdds new config files to the `config` folder provided from your root composer.json `config-dir` name.\n\n\u003e **Note:** the package name is taken to generate the file name.\n\nThis example creates a new `view` config file in the `packages` folder and `packages/test` folder:\n\n\u003e **Note:** the first array key is taken as environment key, like `global` or `test` in this example.\n\n```json\n{   \n    \"extra\": {\n        \"automatic\": {\n            \"options\": {\n                \"global\": {\n                    \"viserio\": {\n                        \"view\": {\n                            \"paths\": null\n                        }\n                    }\n                },\n                \"test\": {\n                    \"viserio\": {\n                        \"view\": {\n                            \"paths\": [\n                                \"./views/\"\n                            ]\n                        }\n                    }\n                }\n            }\n        }\n    }\n}\n```\n\n`bootstrap` Configurator\n\nThis example creates new `bootstrap` configs for the `console` and `http` kernel:\nyou can choose between `http`, `console` and `global` type to configure your kernel bootstraps, \nwith the possibility to configure bootstraps for your chosen environment.\n\n\u003e **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.\n\n\u003e **Note:** the `global` type will configure both kernels.\n\n```json\n{   \n    \"extra\": {\n        \"automatic\": {\n            \"bootstrap\": {\n                \"Viserio\\\\Component\\\\Foundation\\\\Bootstrap\\\\LoadEnvironmentVariables\": [\"http\"]\n            }\n        }\n    }\n}\n```\n\nContributing\n------------\n\nIf you would like to help take a look at the [list of issues](https://github.com/narrowspark/configurators/issues) and check our [Contributing](CONTRIBUTING.md) guild.\n\n\u003e **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.\n\nCredits\n-------------\n\n- [Daniel Bannert](https://github.com/prisis)\n- [All Contributors](https://github.com/narrowspark/automatic/graphs/contributors)\n\nLicense\n---------------\n\nThe Narrowspark configurators is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT)\n\n[1]: http://github.com/jshttp/mime-db\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnarrowspark%2Fconfigurators","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnarrowspark%2Fconfigurators","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnarrowspark%2Fconfigurators/lists"}