{"id":26085267,"url":"https://github.com/codezero-be/dotenv-updater","last_synced_at":"2025-04-12T02:01:38.856Z","repository":{"id":55478605,"uuid":"231133149","full_name":"codezero-be/dotenv-updater","owner":"codezero-be","description":"⭐️ Update key/value pairs in a .env file in PHP.","archived":false,"fork":false,"pushed_at":"2024-03-28T18:26:06.000Z","size":34,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-25T21:47:14.344Z","etag":null,"topics":["dotenv","editor","env","php","updater"],"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/codezero-be.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"ko_fi":"ivanvermeyen","custom":"https://paypal.me/ivanvermeyen"}},"created_at":"2019-12-31T18:37:21.000Z","updated_at":"2024-07-12T12:45:05.000Z","dependencies_parsed_at":"2024-03-28T16:54:15.612Z","dependency_job_id":"05a29e86-f63f-444b-8263-ebc05f33656b","html_url":"https://github.com/codezero-be/dotenv-updater","commit_stats":{"total_commits":21,"total_committers":2,"mean_commits":10.5,"dds":0.04761904761904767,"last_synced_commit":"80d52756b0d85d1265515b57523f95b05aa5e0c7"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codezero-be%2Fdotenv-updater","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codezero-be%2Fdotenv-updater/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codezero-be%2Fdotenv-updater/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codezero-be%2Fdotenv-updater/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codezero-be","download_url":"https://codeload.github.com/codezero-be/dotenv-updater/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248154999,"owners_count":21056542,"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":["dotenv","editor","env","php","updater"],"created_at":"2025-03-09T05:58:04.377Z","updated_at":"2025-04-12T02:01:38.824Z","avatar_url":"https://github.com/codezero-be.png","language":"PHP","funding_links":["https://ko-fi.com/ivanvermeyen","https://paypal.me/ivanvermeyen","https://ko-fi.com/R6R3UQ8V"],"categories":[],"sub_categories":[],"readme":"# PHP `.env` Updater\n\n[![GitHub release](https://img.shields.io/github/release/codezero-be/dotenv-updater.svg?style=flat-square)](https://github.com/codezero-be/dotenv-updater/releases)\n[![License](https://img.shields.io/packagist/l/codezero/dotenv-updater.svg?style=flat-square)](LICENSE.md)\n[![Build Status](https://img.shields.io/github/actions/workflow/status/codezero-be/dotenv-updater/run-tests.yml?style=flat-square\u0026logo=github\u0026logoColor=white\u0026label=tests)](https://github.com/codezero-be/dotenv-updater/actions)\n[![Code Quality](https://img.shields.io/codacy/grade/6b90492697b14556998607da55510676/master?style=flat-square)](https://app.codacy.com/gh/codezero-be/dotenv-updater)\n[![Total Downloads](https://img.shields.io/packagist/dt/codezero/dotenv-updater.svg?style=flat-square)](https://packagist.org/packages/codezero/dotenv-updater)\n\n[![ko-fi](https://www.ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/R6R3UQ8V)\n\n#### Update key/value pairs in a `.env` file.\n\n## ✅ Requirements\n\n- PHP \u003e= 7.3\n\n## 📦 Install\n\n```bash\ncomposer require codezero/dotenv-updater\n```\n\n## 🛠 Usage\n\nCreate an instance of the `DotEnvUpdater` and pass it the path to the `.env` file:\n\n```php\n$updater = new \\CodeZero\\DotEnvUpdater\\DotEnvUpdater('/path/to/.env');\n```\n\nAdd any new, or overwrite any existing key/value pairs:\n\n```php\n$updater-\u003eset('MY_ENV_KEY', 'Some Value'); // Strings\n$updater-\u003eset('MY_ENV_KEY', 25); // Integers\n$updater-\u003eset('MY_ENV_KEY', true); // Booleans\n$updater-\u003eset('MY_ENV_KEY', null); // NULL values\n$updater-\u003eset('MY_ENV_KEY', ''); // Empty values\n```\n\nRetrieve the value of a key:\n\n```php\n$value = $updater-\u003eget('MY_ENV_KEY');\n```\n\n## 🚧 Testing\n\n```bash\ncomposer test\n```\n\n## ☕️ Credits\n\n- [Ivan Vermeyen](https://byterider.io)\n- [All contributors](../../contributors)\n\n## 🔓 Security\n\nIf you discover any security related issues, please [e-mail me](mailto:ivan@codezero.be) instead of using the issue tracker.\n\n## 📑 Changelog\n\nA complete list of all notable changes to this package can be found on the\n[releases page](https://github.com/codezero-be/dotenv-updater/releases).\n\n## 📜 License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodezero-be%2Fdotenv-updater","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodezero-be%2Fdotenv-updater","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodezero-be%2Fdotenv-updater/lists"}