{"id":20095815,"url":"https://github.com/pr00xxy/magento2-dotenv","last_synced_at":"2025-05-06T05:31:19.319Z","repository":{"id":62530927,"uuid":"243606706","full_name":"Pr00xxy/magento2-dotenv","owner":"Pr00xxy","description":"Magento 2 module that adds support for .env (dotenv) file configuration parsing","archived":false,"fork":false,"pushed_at":"2020-08-06T19:29:55.000Z","size":15,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T08:51:15.222Z","etag":null,"topics":["dotenv","env","environment-variables","magento2","magento2-extension","magento2-extension-free","magento2-module","magento2-plugin"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Pr00xxy.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-27T20:08:30.000Z","updated_at":"2022-05-10T10:56:29.000Z","dependencies_parsed_at":"2022-11-02T15:32:01.369Z","dependency_job_id":null,"html_url":"https://github.com/Pr00xxy/magento2-dotenv","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pr00xxy%2Fmagento2-dotenv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pr00xxy%2Fmagento2-dotenv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pr00xxy%2Fmagento2-dotenv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pr00xxy%2Fmagento2-dotenv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pr00xxy","download_url":"https://codeload.github.com/Pr00xxy/magento2-dotenv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252628896,"owners_count":21779101,"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","env","environment-variables","magento2","magento2-extension","magento2-extension-free","magento2-module","magento2-plugin"],"created_at":"2024-11-13T16:56:31.773Z","updated_at":"2025-05-06T05:31:18.251Z","avatar_url":"https://github.com/Pr00xxy.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Magento 2 .env module\n\nAdds support for .env configuration files to Magento 2.\n\nThis module was created because Magento [recommends](https://devdocs.magento.com/guides/v2.3/config-guide/prod/config-reference-var-name.html#how-to-use-environment-variables) injection of variables into $_ENV through the index.php file. I believe that is a stupid suggestion.\n\n## Installation\n\nUse [composer](https://getcomposer.org/) to install this.\n\n```bash\ncomposer require prooxxy/magento2-dotenv\n```\n\n### Alternative installation\n\nIf you don't have the option to use composer it's possible to copy the root of this project into the `app/code/PrOOxxy/DotEnv` folder of your magento installation\n\nMake sure the module is enable before start using\n\n```bash\nphp bin/magento module:enable PrOOxxy_DotEnv\nphp bin/magento setup:upgrade\n```\n\n## Features\n\nThis module does only one thing once installed.\nIt reads and parses any variables that is locate inside \u003cmagento_root\u003e/app/etc/.env\nand injects it into the global `$_ENV` array\n\nIt does this before Magento processes other environments variables.\nIt does override any preexisting variable with the same name.\n\n## Usage\n\n1. Add .env into app/etc\nThe file must have chmod level 0644 or below\n2. Follow the official devdocs [instructions](https://devdocs.magento.com/guides/v2.3/config-guide/deployment/pipeline/example/environment-variables.html#step-4-update-the-production-system) for how to create the env variable format\n3. Add your newly formatted variables into the .env like so e.g\n\n`CONFIG__DEFAULT__SYSTEM__SMTP__HOST=\"8.8.8.8\"`\n\n4. Flush the config cache\n\n```bash\nphp bin/magento cache:flush config\n```\n\n## Compability\n\nMagento 2 Open Source 2.3.x\nMagento 2 Open Source 2.4.x\nMagento 2 Commerce 2.3.x\nMagento 2 Commerce 2.4.x\n\n## License\n[MIT](https://choosealicense.com/licenses/mit/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpr00xxy%2Fmagento2-dotenv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpr00xxy%2Fmagento2-dotenv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpr00xxy%2Fmagento2-dotenv/lists"}