Skip to content

Commit

Permalink
DX: format dot files
Browse files Browse the repository at this point in the history
  • Loading branch information
kubawerlos committed Dec 20, 2021
1 parent 45bf9e3 commit 22510ea
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .php-cs-fixer.dist.php
Expand Up @@ -23,13 +23,13 @@
EOF;

$finder = PhpCsFixer\Finder::create()
->ignoreDotFiles(false)
->ignoreVCSIgnored(true)
->exclude('tests/Fixtures')
->in(__DIR__)
->append([
__DIR__.'/dev-tools/doc.php',
// __DIR__.'/php-cs-fixer', disabled, as we want to be able to run bootstrap file even on lower PHP version, to show nice message
__FILE__,
])
;

Expand Down
5 changes: 4 additions & 1 deletion .php-cs-fixer.php-highest.php
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

/*
* This file is part of PHP CS Fixer.
*
Expand All @@ -13,10 +15,11 @@
if (PHP_VERSION_ID < 80100 || PHP_VERSION_ID >= 80200) {
fwrite(STDERR, "PHP CS Fixer's config for PHP-HIGHEST can be executed only on highest supported PHP version - 8.1.*.\n");
fwrite(STDERR, "Running it on lower PHP version would prevent calling migration rules.\n");

exit(1);
}

$config = require '.php-cs-fixer.dist.php';
$config = require __DIR__.'/.php-cs-fixer.dist.php';

$config->setRules(array_merge($config->getRules(), [
'@PHP81Migration' => true,
Expand Down
5 changes: 4 additions & 1 deletion .php-cs-fixer.php-lowest.php
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

/*
* This file is part of PHP CS Fixer.
*
Expand All @@ -13,10 +15,11 @@
if (PHP_VERSION_ID < 70205 || PHP_VERSION_ID >= 70300) {
fwrite(STDERR, "PHP CS Fixer's config for PHP-LOWEST can be executed only on lowest supported PHP version - ~7.2.5.\n");
fwrite(STDERR, "Running it on higher PHP version would falsy expect more changes, eg `mixed` type on PHP 8.\n");

exit(1);
}

$config = require '.php-cs-fixer.dist.php';
$config = require __DIR__.'/.php-cs-fixer.dist.php';

$config->getFinder()->notPath([
// @TODO 4.0 change interface to be fully typehinted and remove the exceptions from this list
Expand Down
2 changes: 1 addition & 1 deletion dev-tools/install.sh
Expand Up @@ -20,7 +20,7 @@ cd "$(dirname "$0")"

mkdir -p bin

VERSION_CB="2.21.4"
VERSION_CB="2.21.7"
VERSION_SC="stable"

echo λλλ checkbashisms
Expand Down

0 comments on commit 22510ea

Please sign in to comment.