Skip to content

Commit 58ed061

Browse files
committed
doc: CHANGELOG.md
1 parent e0f9c01 commit 58ed061

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed

CHANGELOG.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Changelog
2+
3+
## [v0.1.0] - 2025-03-19
4+
5+
🚀 **Initial Release!**
6+
7+
We’re excited to announce the first release of **justcoded/php-cs-fixer**! 🎉
8+
9+
### ✨ Features
10+
11+
- **Preconfigured ECS setup**:
12+
- Includes recommended rules from:
13+
- `symplify/coding-standard`
14+
- `slevomat/coding-standard`
15+
- `php-cs-fixer`
16+
- `php-cs-fixer-custom-fixers`
17+
- `squizlabs/php_codesniffer`
18+
- **Programmatic API**:
19+
- `CodeFixer` service to run checks and fixes via PHP code.
20+
- Supports custom paths and configuration options (e.g., `tty`).
21+
- **Laravel Integration**:
22+
- Provides a Service Provider with out-of-the-box configuration file publishing.
23+
- Registers `CodeFixer` as a scoped singleton within Laravel's service container.
24+
- Default config (`config/php-cs-fixer.php`) includes `tty` setup.
25+
26+
### 🔧 Usage Highlights
27+
28+
#### CLI
29+
30+
```bash
31+
./vendor/bin/ecs check
32+
./vendor/bin/ecs check --fix
33+
```
34+
35+
#### Programmatically
36+
37+
```php
38+
use JustCoded\PhpCsFixer\Services\CodeFixer;
39+
40+
$fixer = new CodeFixer();
41+
$result = $fixer->check(path: 'app/');
42+
```
43+
44+
#### Laravel
45+
46+
```php
47+
app(\JustCoded\PhpCsFixer\Services\CodeFixer::class)->fix(config: ['tty' => true]);
48+
```
49+
50+
### ⚙️ Custom Configuration File Support
51+
52+
You can override the default ECS config by placing your own `ecs.php` file in the project root:
53+
54+
```php
55+
<?php
56+
57+
use Symplify\EasyCodingStandard\Config\ECSConfig;
58+
59+
return static function (ECSConfig $ecsConfig): void {
60+
$ecsConfig->import('vendor/justcoded/php-cs-fixer/config/ecs.php');
61+
62+
// Add your custom rules here
63+
};
64+
```
65+
66+
The package will automatically detect and use your custom config file.
67+
68+
---
69+
70+
Thank you for using **justcoded/php-cs-fixer**! 🙌
71+

0 commit comments

Comments
 (0)