{"id":31055395,"url":"https://github.com/lav45/yii2-project-configuration","last_synced_at":"2026-03-17T23:07:14.023Z","repository":{"id":57012739,"uuid":"101183252","full_name":"lav45/yii2-project-configuration","owner":"lav45","description":"This extension helps you to easily store and retrieve settings for your project.","archived":false,"fork":false,"pushed_at":"2025-06-21T06:58:05.000Z","size":16,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-29T17:04:00.055Z","etag":null,"topics":["config","configuration","extension","project","yii2"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lav45.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-08-23T13:28:59.000Z","updated_at":"2025-06-21T06:58:08.000Z","dependencies_parsed_at":"2024-12-13T10:34:37.635Z","dependency_job_id":null,"html_url":"https://github.com/lav45/yii2-project-configuration","commit_stats":{"total_commits":11,"total_committers":3,"mean_commits":"3.6666666666666665","dds":0.4545454545454546,"last_synced_commit":"6f06a8125f870d6763768c7e495c522c84ea09ef"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/lav45/yii2-project-configuration","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lav45%2Fyii2-project-configuration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lav45%2Fyii2-project-configuration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lav45%2Fyii2-project-configuration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lav45%2Fyii2-project-configuration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lav45","download_url":"https://codeload.github.com/lav45/yii2-project-configuration/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lav45%2Fyii2-project-configuration/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30513416,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-14T18:06:04.599Z","status":"ssl_error","status_checked_at":"2026-03-14T17:55:05.137Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["config","configuration","extension","project","yii2"],"created_at":"2025-09-15T04:44:08.251Z","updated_at":"2026-03-17T23:07:14.015Z","avatar_url":"https://github.com/lav45.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"yii2-project-configuration\n==========================\n\n[![Latest Stable Version](https://poser.pugx.org/lav45/yii2-project-configuration/v/stable)](https://packagist.org/packages/lav45/yii2-project-configuration)\n[![License](https://poser.pugx.org/lav45/yii2-project-configuration/license)](https://packagist.org/packages/lav45/yii2-project-configuration)\n[![Total Downloads](https://poser.pugx.org/lav45/yii2-project-configuration/downloads)](https://packagist.org/packages/lav45/yii2-project-configuration)\n\nThis extension helps you to easily store and retrieve settings for your project.\n\n\n## Installation\n\nThe preferred way to install this extension through [composer](http://getcomposer.org/download/).\n\nYou can set the console\n\n```\n~$ composer require \"lav45/yii2-project-configuration\" --prefer-dist\n```\n\nor add\n\n```\n\"require\": {\n    \"lav45/yii2-project-configuration\": \"1.0.*\"\n}\n```\n\nin ```require``` section in `composer.json` file.\n\n\n## Using\n\n```php\n// Yii::setAlias('@app_config_path', __DIR__ . '/settings');\n\n$db_name = config('db_name', 'site-db-name');\n$db_host = config('db_host', 'localhost');\n\nreturn [\n    'components' =\u003e [\n        'db' =\u003e [\n            'class' =\u003e 'yii\\db\\Connection',\n            'dsn' =\u003e \"mysql:host={$db_host};dbname={$db_name}\",\n            'username' =\u003e config('db_username', 'root'),\n            'password' =\u003e config('db_password', '****'),\n            'enableSchemaCache' =\u003e true,\n            'charset' =\u003e 'utf8',\n        ],\n    ]\n];\n```\n\n\n## Management\n\nControl is made through a console controller\nWill add it to the console application's configuration file\n\n```php\nreturn [\n    'controllerMap' =\u003e [\n        'config' =\u003e 'lav45\\projectConfiguration\\console\\controllers\\ConfigController'\n    ]\n];\n```\n\n\n### Use console controller\n\n```\n# Set value by key\n~$ yii config db_name site-db\n\n# Display all keys\n~$ yii config\n~\u003e    db_name: site-db\n\n# Show value by key\n~$ yii config db_name\n~\u003e site-db\n\n# Delete key\n~$ yii config/delete db_name\n```\n\n\nYou can configure the component using [Yii::setAlias()](https://github.com/yiisoft/yii2/blob/2.0.12/docs/guide/concept-aliases.md#defining-aliases-) before using the `config()`\n\n| Key              | Default value                 | Description                                          |\n|:-----------------|:------------------------------|:-----------------------------------------------------|\n| @app_config_key  | 'app-config'                  | The key which will be stored settings                |\n| @app_config_path | '/storage'                    | Path where will be stored the file with the settings |\n\n\n## License\n\n**yii2-project-configuration** it is available under a BSD 3-Clause License. Detailed information can be found in the `LICENSE.md`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flav45%2Fyii2-project-configuration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flav45%2Fyii2-project-configuration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flav45%2Fyii2-project-configuration/lists"}