Skip to content

Commit

Permalink
Do not exclude the license files (#269)
Browse files Browse the repository at this point in the history
Closes #266
  • Loading branch information
theofidry authored Aug 6, 2018
1 parent 013b209 commit ea3939e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
1 change: 0 additions & 1 deletion box.json.dist
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
],

"files": ["res/schema.json"],
"files-bin": ["vendor/composer/composer/LICENSE"],
"directories-bin": [".requirement-checker"],

"compression": "GZ",
Expand Down
1 change: 0 additions & 1 deletion src/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -1157,7 +1157,6 @@ function (string $packagePath) use ($basePath): string {
->notName('*.md')
->notName('*.rst')
->notName('/^readme(\..*+)?$/i')
->notName('/^license(\..*+)?$/i')
->notName('/^upgrade(\..*+)?$/i')
->notName('/^contributing(\..*+)?$/i')
->notName('/^changelog(\..*+)?$/i')
Expand Down
4 changes: 3 additions & 1 deletion tests/ConfigurationFileNoConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ public function test_the_blacklist_setting_is_applied_to_all_the_files_found_in_
public function test_it_ignores_the_most_common_non_needed_files_when_guess_the_files_from_the_composer_json_file(): void
{
// Depending on the test machine: the following command might be needed:
// docker run -i --rm -w /opt/box -v "$PWD":/opt/box box_php72 bin/phpunit tests/ConfigurationTest.php --filter test_it_ignores_the_most_common_non_needed_files_when_guess_the_files_from_the_composer_json_file
// docker run -i --rm -w /opt/box -v "$PWD":/opt/box box_php72 bin/phpunit tests/ConfigurationFileNoConfigTest.php --filter test_it_ignores_the_most_common_non_needed_files_when_guess_the_files_from_the_composer_json_file
// Indeed OSX is case insensitive...

touch('main.php~');
Expand Down Expand Up @@ -562,6 +562,8 @@ public function test_it_ignores_the_most_common_non_needed_files_when_guess_the_
'composer.json',
'ConductCommand.php',
'ContributingCommand.php',
'license',
'LICENSE',
'LicenseCommand.php',
'LICENSE_GECKO',
'ReadmeCommand.php',
Expand Down
13 changes: 8 additions & 5 deletions tests/Console/Command/CompileTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public function test_it_can_build_a_PHAR_file(): void
? Setting file permissions to 0755
* Done.
// PHAR: 44 files (100B)
// PHAR: 45 files (100B)
// You can inspect the generated PHAR with the "info" command.
// Memory usage: 5.00MB (peak: 10.00MB), time: 0.00s
Expand Down Expand Up @@ -247,6 +247,7 @@ public function test_it_can_build_a_PHAR_file(): void
'/.box/vendor/composer/autoload_static.php',
'/.box/vendor/composer/installed.json',
'/.box/vendor/composer/semver/',
'/.box/vendor/composer/semver/LICENSE',
'/.box/vendor/composer/semver/src/',
'/.box/vendor/composer/semver/src/Comparator.php',
'/.box/vendor/composer/semver/src/Constraint/',
Expand Down Expand Up @@ -376,7 +377,7 @@ public function test_it_can_build_a_PHAR_without_any_configuration(): void
? No compression
* Done.
// PHAR: 48 files (100B)
// PHAR: 49 files (100B)
// You can inspect the generated PHAR with the "info" command.
// Memory usage: 5.00MB (peak: 10.00MB), time: 0.00s
Expand Down Expand Up @@ -460,6 +461,7 @@ public function test_it_can_build_a_PHAR_without_any_configuration(): void
'/.box/vendor/composer/autoload_static.php',
'/.box/vendor/composer/installed.json',
'/.box/vendor/composer/semver/',
'/.box/vendor/composer/semver/LICENSE',
'/.box/vendor/composer/semver/src/',
'/.box/vendor/composer/semver/src/Comparator.php',
'/.box/vendor/composer/semver/src/Constraint/',
Expand Down Expand Up @@ -823,7 +825,7 @@ public function test_it_can_build_a_PHAR_file_in_verbose_mode(): void
? Setting file permissions to 0755
* Done.
// PHAR: 44 files (100B)
// PHAR: 45 files (100B)
// You can inspect the generated PHAR with the "info" command.
// Memory usage: 5.00MB (peak: 10.00MB), time: 0.00s
Expand Down Expand Up @@ -923,7 +925,7 @@ public function test_it_can_build_a_PHAR_file_in_very_verbose_mode(): void
? Setting file permissions to 0755
* Done.
// PHAR: 44 files (100B)
// PHAR: 45 files (100B)
// You can inspect the generated PHAR with the "info" command.
// Memory usage: 5.00MB (peak: 10.00MB), time: 0.00s
Expand Down Expand Up @@ -1042,7 +1044,7 @@ public function test_it_can_build_a_PHAR_file_in_debug_mode(): void
? Setting file permissions to 0755
* Done.
// PHAR: 44 files (100B)
// PHAR: 45 files (100B)
// You can inspect the generated PHAR with the "info" command.
// Memory usage: 5.00MB (peak: 10.00MB), time: 0.00s
Expand Down Expand Up @@ -1085,6 +1087,7 @@ public function test_it_can_build_a_PHAR_file_in_debug_mode(): void
'.box_dump/.box/vendor/composer/ClassLoader.php',
'.box_dump/.box/vendor/composer/installed.json',
'.box_dump/.box/vendor/composer/LICENSE',
'.box_dump/.box/vendor/composer/semver/LICENSE',
'.box_dump/.box/vendor/composer/semver/src/Comparator.php',
'.box_dump/.box/vendor/composer/semver/src/Constraint/AbstractConstraint.php',
'.box_dump/.box/vendor/composer/semver/src/Constraint/Constraint.php',
Expand Down
1 change: 1 addition & 0 deletions tests/RequirementChecker/RequirementsDumperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public function test_it_dumps_the_requirement_checker_files(
'vendor/composer/ClassLoader.php',
'vendor/composer/installed.json',
'vendor/composer/LICENSE',
'vendor/composer/semver/LICENSE',
'vendor/composer/semver/src/Comparator.php',
'vendor/composer/semver/src/Constraint/AbstractConstraint.php',
'vendor/composer/semver/src/Constraint/Constraint.php',
Expand Down

0 comments on commit ea3939e

Please sign in to comment.