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

DX: format dot files #6198

Merged
merged 1 commit into from Dec 20, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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