Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Require and use kubawerlos/php-cs-fixer-custom-fixers #894

Merged
merged 2 commits into from
Sep 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

For a full diff see [`6.1.0...main`][6.1.0...main].

### Changed

- Required [`kubawerlos/php-cs-fixer-custom-fixers`](https://github.com/kubawerlos/php-cs-fixer-custom-fixers) and enabled the [`PhpCsFixerCustomFixers/phpdoc_array_style`](https://github.com/kubawerlos/php-cs-fixer-custom-fixers/tree/v3.16.2#phpdocarraystylefixer) fixer ([#894]), by [@localheinz]

## [`6.1.0`][6.1.0]

For a full diff see [`6.0.0...6.1.0`][6.0.0...6.1.0].
Expand Down Expand Up @@ -1225,6 +1229,7 @@ For a full diff see [`d899e77...1.0.0`][d899e77...1.0.0].
[#891]: https://github.com/ergebnis/php-cs-fixer-config/pull/891
[#892]: https://github.com/ergebnis/php-cs-fixer-config/pull/892
[#893]: https://github.com/ergebnis/php-cs-fixer-config/pull/893
[#894]: https://github.com/ergebnis/php-cs-fixer-config/pull/894

[@dependabot]: https://github.com/apps/dependabot
[@linuxjuggler]: https://github.com/linuxjuggler
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ This package is inspired by and also replaces [`localheinz/php-cs-fixer-config`]
This package requires and enables custom fixers from the following packages:

- [`erickskrauch/php-cs-fixer-custom-fixers`](https://github.com/erickskrauch/php-cs-fixer-custom-fixers)
- [`kubawerlos/php-cs-fixer-custom-fixers`](https://github.com/kubawerlos/php-cs-fixer-custom-fixers)

## Social

Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"php": "~8.1.0 || ~8.2.0",
"ext-filter": "*",
"erickskrauch/php-cs-fixer-custom-fixers": "~1.2.0",
"friendsofphp/php-cs-fixer": "~3.27.0"
"friendsofphp/php-cs-fixer": "~3.27.0",
"kubawerlos/php-cs-fixer-custom-fixers": "~3.16.2"
},
"require-dev": {
"ergebnis/composer-normalize": "^2.37.0",
Expand Down
48 changes: 47 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion src/RuleSet/Php53.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use Ergebnis\PhpCsFixer\Config\Rules;
use Ergebnis\PhpCsFixer\Config\RuleSet;
use ErickSkrauch\PhpCsFixer;
use PhpCsFixerCustomFixers\Fixer;

final class Php53
{
Expand All @@ -31,7 +32,10 @@ public static function create(): RuleSet
);

return RuleSet::create(
Fixers::fromFixers(new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer()),
Fixers::fromFixers(
new Fixer\PhpdocArrayStyleFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
),
Name::fromString(\sprintf(
'ergebnis (PHP %d.%d)',
$phpVersion->major()->toInt(),
Expand All @@ -40,6 +44,7 @@ public static function create(): RuleSet
$phpVersion,
Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
Expand Down
7 changes: 6 additions & 1 deletion src/RuleSet/Php54.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use Ergebnis\PhpCsFixer\Config\Rules;
use Ergebnis\PhpCsFixer\Config\RuleSet;
use ErickSkrauch\PhpCsFixer;
use PhpCsFixerCustomFixers\Fixer;

final class Php54
{
Expand All @@ -31,7 +32,10 @@ public static function create(): RuleSet
);

return RuleSet::create(
Fixers::fromFixers(new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer()),
Fixers::fromFixers(
new Fixer\PhpdocArrayStyleFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
),
Name::fromString(\sprintf(
'ergebnis (PHP %d.%d)',
$phpVersion->major()->toInt(),
Expand All @@ -40,6 +44,7 @@ public static function create(): RuleSet
$phpVersion,
Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
Expand Down
7 changes: 6 additions & 1 deletion src/RuleSet/Php55.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use Ergebnis\PhpCsFixer\Config\Rules;
use Ergebnis\PhpCsFixer\Config\RuleSet;
use ErickSkrauch\PhpCsFixer;
use PhpCsFixerCustomFixers\Fixer;

final class Php55
{
Expand All @@ -31,7 +32,10 @@ public static function create(): RuleSet
);

return RuleSet::create(
Fixers::fromFixers(new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer()),
Fixers::fromFixers(
new Fixer\PhpdocArrayStyleFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
),
Name::fromString(\sprintf(
'ergebnis (PHP %d.%d)',
$phpVersion->major()->toInt(),
Expand All @@ -40,6 +44,7 @@ public static function create(): RuleSet
$phpVersion,
Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
Expand Down
7 changes: 6 additions & 1 deletion src/RuleSet/Php56.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use Ergebnis\PhpCsFixer\Config\Rules;
use Ergebnis\PhpCsFixer\Config\RuleSet;
use ErickSkrauch\PhpCsFixer;
use PhpCsFixerCustomFixers\Fixer;

final class Php56
{
Expand All @@ -31,7 +32,10 @@ public static function create(): RuleSet
);

return RuleSet::create(
Fixers::fromFixers(new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer()),
Fixers::fromFixers(
new Fixer\PhpdocArrayStyleFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
),
Name::fromString(\sprintf(
'ergebnis (PHP %d.%d)',
$phpVersion->major()->toInt(),
Expand All @@ -40,6 +44,7 @@ public static function create(): RuleSet
$phpVersion,
Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
Expand Down
7 changes: 6 additions & 1 deletion src/RuleSet/Php70.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use Ergebnis\PhpCsFixer\Config\Rules;
use Ergebnis\PhpCsFixer\Config\RuleSet;
use ErickSkrauch\PhpCsFixer;
use PhpCsFixerCustomFixers\Fixer;

final class Php70
{
Expand All @@ -31,7 +32,10 @@ public static function create(): RuleSet
);

return RuleSet::create(
Fixers::fromFixers(new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer()),
Fixers::fromFixers(
new Fixer\PhpdocArrayStyleFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
),
Name::fromString(\sprintf(
'ergebnis (PHP %d.%d)',
$phpVersion->major()->toInt(),
Expand All @@ -40,6 +44,7 @@ public static function create(): RuleSet
$phpVersion,
Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
Expand Down
7 changes: 6 additions & 1 deletion src/RuleSet/Php71.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use Ergebnis\PhpCsFixer\Config\Rules;
use Ergebnis\PhpCsFixer\Config\RuleSet;
use ErickSkrauch\PhpCsFixer;
use PhpCsFixerCustomFixers\Fixer;

final class Php71
{
Expand All @@ -31,7 +32,10 @@ public static function create(): RuleSet
);

return RuleSet::create(
Fixers::fromFixers(new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer()),
Fixers::fromFixers(
new Fixer\PhpdocArrayStyleFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
),
Name::fromString(\sprintf(
'ergebnis (PHP %d.%d)',
$phpVersion->major()->toInt(),
Expand All @@ -40,6 +44,7 @@ public static function create(): RuleSet
$phpVersion,
Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
Expand Down
7 changes: 6 additions & 1 deletion src/RuleSet/Php72.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use Ergebnis\PhpCsFixer\Config\Rules;
use Ergebnis\PhpCsFixer\Config\RuleSet;
use ErickSkrauch\PhpCsFixer;
use PhpCsFixerCustomFixers\Fixer;

final class Php72
{
Expand All @@ -31,7 +32,10 @@ public static function create(): RuleSet
);

return RuleSet::create(
Fixers::fromFixers(new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer()),
Fixers::fromFixers(
new Fixer\PhpdocArrayStyleFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
),
Name::fromString(\sprintf(
'ergebnis (PHP %d.%d)',
$phpVersion->major()->toInt(),
Expand All @@ -40,6 +44,7 @@ public static function create(): RuleSet
$phpVersion,
Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
Expand Down
7 changes: 6 additions & 1 deletion src/RuleSet/Php73.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use Ergebnis\PhpCsFixer\Config\Rules;
use Ergebnis\PhpCsFixer\Config\RuleSet;
use ErickSkrauch\PhpCsFixer;
use PhpCsFixerCustomFixers\Fixer;

final class Php73
{
Expand All @@ -31,7 +32,10 @@ public static function create(): RuleSet
);

return RuleSet::create(
Fixers::fromFixers(new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer()),
Fixers::fromFixers(
new Fixer\PhpdocArrayStyleFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
),
Name::fromString(\sprintf(
'ergebnis (PHP %d.%d)',
$phpVersion->major()->toInt(),
Expand All @@ -40,6 +44,7 @@ public static function create(): RuleSet
$phpVersion,
Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
Expand Down
7 changes: 6 additions & 1 deletion src/RuleSet/Php74.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use Ergebnis\PhpCsFixer\Config\Rules;
use Ergebnis\PhpCsFixer\Config\RuleSet;
use ErickSkrauch\PhpCsFixer;
use PhpCsFixerCustomFixers\Fixer;

final class Php74
{
Expand All @@ -31,7 +32,10 @@ public static function create(): RuleSet
);

return RuleSet::create(
Fixers::fromFixers(new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer()),
Fixers::fromFixers(
new Fixer\PhpdocArrayStyleFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
),
Name::fromString(\sprintf(
'ergebnis (PHP %d.%d)',
$phpVersion->major()->toInt(),
Expand All @@ -40,6 +44,7 @@ public static function create(): RuleSet
$phpVersion,
Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
Expand Down
7 changes: 6 additions & 1 deletion src/RuleSet/Php80.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use Ergebnis\PhpCsFixer\Config\Rules;
use Ergebnis\PhpCsFixer\Config\RuleSet;
use ErickSkrauch\PhpCsFixer;
use PhpCsFixerCustomFixers\Fixer;

final class Php80
{
Expand All @@ -31,7 +32,10 @@ public static function create(): RuleSet
);

return RuleSet::create(
Fixers::fromFixers(new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer()),
Fixers::fromFixers(
new Fixer\PhpdocArrayStyleFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
),
Name::fromString(\sprintf(
'ergebnis (PHP %d.%d)',
$phpVersion->major()->toInt(),
Expand All @@ -40,6 +44,7 @@ public static function create(): RuleSet
$phpVersion,
Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
Expand Down
Loading