Skip to content

Commit 581f249

Browse files
nasrulhazimgithub-actions[bot]
authored andcommitted
Update CHANGELOG
1 parent 105e3c5 commit 581f249

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

CHANGELOG.md

+56
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,59 @@
22

33
All notable changes to `php-env-key-manager` will be documented in this file.
44

5+
## v1.0.0 - 2024-11-11
6+
7+
### Release v1.0.0 - `cleaniquecoders/php-env-key-manager`
8+
9+
**Full Changelog**: https://github.com/cleaniquecoders/php-env-key-manager/commits/v1.0.0
10+
11+
We are excited to announce the initial release of `cleaniquecoders/php-env-key-manager`! This package provides a framework-agnostic solution for managing environment variables directly in `.env` files. Designed for flexibility and simplicity, it allows developers to easily set, disable, and enable environment keys across any PHP application, with specific integrations for Laravel, Symfony, and CodeIgniter.
12+
13+
##### Key Features
14+
15+
- **Set Key-Value Pairs**: Add or update environment keys in the `.env` file using `setKey`.
16+
- **Enable Keys**: Activate an environment key by uncommenting it in the `.env` file.
17+
- **Disable Keys**: Deactivate an environment key by commenting it out in the `.env` file.
18+
- **Framework Agnostic**: Usable in any PHP project with minimal configuration.
19+
- **Framework-Specific Integrations**:
20+
- **Laravel**: Register as a singleton in `AppServiceProvider` for easy use across the application.
21+
- **Symfony**: Utilize `EnvKeyManager` in Symfony console commands and services.
22+
- **CodeIgniter**: Easily manage `.env` keys within controllers and custom classes.
23+
24+
25+
##### Usage
26+
27+
###### Basic Usage
28+
29+
```php
30+
use CleaniqueCoders\PhpEnvKeyManager\EnvKeyManager;
31+
32+
$envFilePath = __DIR__ . '/.env';
33+
$envManager = new EnvKeyManager($envFilePath);
34+
35+
// Set a key
36+
$envManager->setKey('APP_DEBUG', 'true');
37+
38+
// Disable a key
39+
$envManager->disableKey('APP_DEBUG');
40+
41+
// Enable a key
42+
$envManager->enableKey('APP_DEBUG');
43+
44+
```
45+
##### Installation
46+
47+
Install via Composer:
48+
49+
```bash
50+
composer require cleaniquecoders/php-env-key-manager
51+
52+
```
53+
##### Documentation
54+
55+
For complete usage instructions, refer to the [README](https://github.com/cleaniquecoders/php-env-key-manager#readme).
56+
57+
58+
---
59+
60+
We look forward to your feedback on this initial release!

0 commit comments

Comments
 (0)