-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleaner: added support for more complex ignore masks
- Loading branch information
Showing
15 changed files
with
136 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
require __DIR__ . '/bootstrap.php'; | ||
|
||
use Tester\Assert; | ||
|
||
$io = new IOInterface; | ||
$cleaner = new DG\ComposerCleaner\Cleaner($io, new Filesystem); | ||
$vendorDir = __DIR__ . '/fixtures/vendor'; | ||
|
||
$cleaner->clean($vendorDir, [ | ||
'mpdf/mpdf' => [ | ||
'data/mpdf.css', | ||
'!src/QrCode/data/', | ||
'ttfonts/DejaVuSans.txt', | ||
], | ||
]); | ||
|
||
$toRemove = []; | ||
|
||
foreach ($io->getLog() as $log) { | ||
if (isset($log[1][0]) && substr($log[1][0], 18, 8) === 'Removing') { | ||
$toRemove[] = $log[1][0]; | ||
} | ||
} | ||
|
||
sort($toRemove, SORT_STRING); | ||
|
||
Assert::same([ | ||
'Composer cleaner: Removing ' . $vendorDir . '/mpdf/mpdf/.github', | ||
'Composer cleaner: Removing ' . $vendorDir . '/mpdf/mpdf/CHANGELOG.md', | ||
'Composer cleaner: Removing ' . $vendorDir . '/mpdf/mpdf/data/lang2fonts.css', | ||
'Composer cleaner: Removing ' . $vendorDir . '/mpdf/mpdf/src/QrCode/data', | ||
'Composer cleaner: Removing ' . $vendorDir . '/mpdf/mpdf/ttfonts/Arial.txt', | ||
'Composer cleaner: Removing ' . $vendorDir . '/mpdf/mpdf/ttfonts/license.txt', | ||
], $toRemove); |
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"name": "mpdf/mpdf", | ||
"type": "library", | ||
"autoload": { | ||
"psr-4": { | ||
"Mpdf\\": "src/" | ||
} | ||
} | ||
} |
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[PHP] | ||
extension=json.so |