Skip to content

Commit e47ccf0

Browse files
committed
Integrate Respect/Fluent and FluentGen
FormatterBuilder now extends Fluent's Append with #[FluentNamespace] attribute, replacing the manual __call/__callStatic reflection logic. Mixin generation uses FluentGen via a LintMixinCommand. Mixins moved from src/Mixin/ to src/Mixins/ to match the Validation's output convention.
1 parent ed3f6a2 commit e47ccf0

10 files changed

Lines changed: 1114 additions & 127 deletions

File tree

bin/console

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/usr/bin/env php
2+
<?php
3+
4+
/*
5+
* SPDX-FileCopyrightText: (c) Respect Project Contributors
6+
* SPDX-License-Identifier: ISC
7+
* SPDX-FileContributor: Alexandre Gomes Gaigalas <alganet@gmail.com>
8+
*/
9+
10+
declare(strict_types=1);
11+
12+
require __DIR__ . '/../vendor/autoload.php';
13+
14+
use Respect\StringFormatter\DevTools\Commands\LintMixinCommand;
15+
use Symfony\Component\Console\Application;
16+
17+
return (static function () {
18+
$application = new Application('Respect/StringFormatter', '1.0');
19+
$application->addCommand(new LintMixinCommand());
20+
21+
return $application->run();
22+
})();

composer.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"description": "A powerful and flexible way of formatting and transforming strings",
55
"require": {
66
"php": "^8.5",
7+
"respect/fluent": "^1.0",
78
"respect/stringifier": "^3.0",
89
"symfony/polyfill-mbstring": "^1.33",
910
"symfony/translation-contracts": "^3.6"
@@ -17,7 +18,9 @@
1718
"phpstan/phpstan-deprecation-rules": "^2.0",
1819
"phpstan/phpstan-phpunit": "^2.0",
1920
"phpunit/phpunit": "^12.5",
21+
"respect/fluentgen": "^1.0",
2022
"respect/coding-standard": "^5.0",
23+
"symfony/console": "^6.0|^7.0",
2124
"symfony/translation": "^6.0|^7.0"
2225
},
2326
"license": "ISC",
@@ -30,6 +33,7 @@
3033
"autoload-dev": {
3134
"psr-4": {
3235
"Respect\\StringFormatter\\": ["docs/contributing/templates/php/src"],
36+
"Respect\\StringFormatter\\DevTools\\": "src-dev/",
3337
"Respect\\StringFormatter\\Test\\": ["tests/", "docs/contributing/templates/php/tests"]
3438
}
3539
},

0 commit comments

Comments
 (0)