Skip to content

Commit eaf3294

Browse files
committed
minor #4643 DX: Update .gitattributes and move ci-integration.sh to root of the project (kubawerlos, keradus)
This PR was merged into the 2.15 branch. Discussion ---------- DX: Update .gitattributes and move ci-integration.sh to root of the project This PR: - adds leading `/` for paths in `.gitattributes` to indicate better they starts from project's root - excludes all hidden paths (row `/.*`) from distribution by assumption hidden path is the one starting with dot - fixes `box.json` to `box.json.dist` in `.gitattributes` - excludes `phpstan.neon` from distribution - moves `ci-integration.sh` from `dev-tool` to root - excludes `dev-tools` from distribution Commits ------- 9756467 DX: .gitattributes - sort entries d77b693 Update .gitattributes and move ci-integration.sh to root of the project
2 parents ac19b3a + 9756467 commit eaf3294

File tree

5 files changed

+22
-27
lines changed

5 files changed

+22
-27
lines changed

.gitattributes

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,26 @@
11
# @TODO 3.0 replace following `tests/... export-ignore` with single `tests/ export-ignore`
2-
tests/**/*Test.php export-ignore
3-
tests/AbstractDoctrineAnnotationFixerTestCase.php export-ignore
4-
tests/Differ/AbstractDifferTestCase.php export-ignore
5-
tests/Fixtures/ export-ignore
6-
tests/Linter/AbstractLinterTestCase.php export-ignore
7-
tests/Report/AbstractReporterTestCase.php export-ignore
8-
tests/Test/AbstractFixerWithAliasedOptionsTestCase.php export-ignore
9-
tests/Test/AbstractTransformerTestCase.php export-ignore
2+
/tests/**/*Test.php export-ignore
3+
/tests/AbstractDoctrineAnnotationFixerTestCase.php export-ignore
4+
/tests/Differ/AbstractDifferTestCase.php export-ignore
5+
/tests/Fixtures/ export-ignore
6+
/tests/Linter/AbstractLinterTestCase.php export-ignore
7+
/tests/Report/AbstractReporterTestCase.php export-ignore
8+
/tests/Test/AbstractFixerWithAliasedOptionsTestCase.php export-ignore
9+
/tests/Test/AbstractTransformerTestCase.php export-ignore
1010

11-
.appveyor.yml export-ignore
12-
.circleci/ export-ignore
13-
.composer-require-checker.json export-ignore
14-
.editorconfig export-ignore
15-
.gitattributes export-ignore
16-
.github/ export-ignore
17-
.gitignore export-ignore
18-
.travis.yml export-ignore
19-
benchmark.sh export-ignore
20-
box.json export-ignore
21-
check_trailing_spaces.sh export-ignore
22-
phpmd.xml export-ignore
23-
phpunit.xml.dist export-ignore
11+
/.* export-ignore
12+
/benchmark.sh export-ignore
13+
/box.json.dist export-ignore
14+
/check_trailing_spaces.sh export-ignore
15+
/dev-tools/ export-ignore
16+
/phpmd.xml export-ignore
17+
/phpstan.neon export-ignore
18+
/phpunit.xml.dist export-ignore
2419

2520
* text=auto eol=lf
26-
*.php text whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent,tabwidth=4 diff=php
2721
*.json text whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent,tabwidth=4
28-
*.yml text whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent,tabwidth=4
2922
*.md text whitespace=blank-at-eol,blank-at-eof
23+
*.php text whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent,tabwidth=4 diff=php
3024
*.rst text whitespace=blank-at-eol,blank-at-eof
31-
tests/Fixtures/**/* -text
25+
*.yml text whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent,tabwidth=4
26+
/tests/Fixtures/**/* -text

box.json.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"KevinGH\\Box\\Compactor\\Php"
88
],
99
"files": [
10-
"dev-tools/ci-integration.sh",
10+
"ci-integration.sh",
1111
"LICENSE"
1212
],
1313
"finder": [

src/Console/Command/HelpCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ public static function getHelpCopy()
285285
),
286286
'%%%CI_INTEGRATION%%%' => implode("\n", array_map(
287287
static function ($line) { return ' $ '.$line; },
288-
\array_slice(file(__DIR__.'/../../../dev-tools/ci-integration.sh', FILE_IGNORE_NEW_LINES), 3)
288+
\array_slice(file(__DIR__.'/../../../ci-integration.sh', FILE_IGNORE_NEW_LINES), 3)
289289
)),
290290
'%%%FIXERS_DETAILS%%%' => self::getFixersHelp(),
291291
]);

tests/Smoke/CiIntegrationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public function testIntegration(
103103
$caseCommands
104104
));
105105

106-
$integrationScript = explode("\n", str_replace('vendor/bin/', './../../../', file_get_contents(__DIR__.'/../../dev-tools/ci-integration.sh')));
106+
$integrationScript = explode("\n", str_replace('vendor/bin/', './../../../', file_get_contents(__DIR__.'/../../ci-integration.sh')));
107107
$steps = [
108108
"COMMIT_RANGE=\"master..{$branchName}\"",
109109
"{$integrationScript[3]}\n{$integrationScript[4]}",

0 commit comments

Comments
 (0)