Skip to content

Commit

Permalink
Merge pull request #169 from tighten/drift/do-not-expand-default-excl…
Browse files Browse the repository at this point in the history
…udes

Do not expand default excludes
  • Loading branch information
driftingly authored Dec 6, 2024
2 parents fc560b2 + 998aa62 commit 687ef98
Show file tree
Hide file tree
Showing 9 changed files with 430 additions and 412 deletions.
2 changes: 1 addition & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Release Instructions

1. Visit the [Duster Releases page](https://github.com/tighten/duster/releases); figure out what your next tag will be (increase the third number if it's a patch or fix; increase the second number if it's adding features)
2. On your local machine, pull down the latest changes on the `2.x` branch (`git checkout 2.x && git pull`)
2. On your local machine, pull down the latest changes on the `3.x` branch (`git checkout 3.x && git pull`)
3. Update the version in [`config/app.php`](./config/app.php)
4. Update dependencies and remove dev dependencies by running `composer update`
5. Compile the binary
Expand Down
35 changes: 23 additions & 12 deletions app/Support/DusterConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,22 @@

class DusterConfig
{
/**
* @var array<int, string>
*/
public static array $defaultExclude = [
'_ide_helper_actions.php',
'_ide_helper_models.php',
'_ide_helper.php',
'.phpstorm.meta.php',
'bootstrap/cache',
'build',
'node_modules',
'storage',
'tests/Pest.php',
'vendor',
];

/**
* @var array<int, string>
*/
Expand Down Expand Up @@ -38,19 +54,14 @@ public static function scopeConfigPaths(array $config): array
{
$config['include'] = static::expandWildcards($config['include'] ?? []);

$filteredExcludes = collect($config['exclude'] ?? [])
->reject(fn ($path) => in_array($path, static::$defaultExclude))
->reject(fn ($path) => Str::contains($path, ['node_modules', 'vendor']))
->toArray();

$config['exclude'] = array_merge(
static::expandWildcards($config['exclude'] ?? []),
[
'_ide_helper_actions.php',
'_ide_helper_models.php',
'_ide_helper.php',
'.phpstorm.meta.php',
'bootstrap/cache',
'build',
'node_modules',
'storage',
'tests/Pest.php',
]
static::expandWildcards($filteredExcludes),
static::$defaultExclude
);

return $config;
Expand Down
Binary file modified builds/duster
Binary file not shown.
4 changes: 2 additions & 2 deletions composer-dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"php": "^8.2.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.64",
"friendsofphp/php-cs-fixer": "^3.65",
"larastan/larastan": "^2.7",
"laravel-zero/framework": "^11.0",
"laravel/pint": "^1.18",
Expand All @@ -14,7 +14,7 @@
"spatie/invade": "^1.1",
"spatie/laravel-ray": "^1.36",
"squizlabs/php_codesniffer": "^3.11",
"tightenco/tlint": "^9.3"
"tightenco/tlint": "^9.4"
},
"autoload": {
"psr-4": {
Expand Down
68 changes: 34 additions & 34 deletions composer-dev.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "685728a7f7d57e1e2200a00a81b49f0d",
"content-hash": "e65cd4f4a635100ba38384958281e8c8",
"packages": [],
"packages-dev": [
{
Expand Down Expand Up @@ -900,16 +900,16 @@
},
{
"name": "friendsofphp/php-cs-fixer",
"version": "v3.64.0",
"version": "v3.65.0",
"source": {
"type": "git",
"url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git",
"reference": "58dd9c931c785a79739310aef5178928305ffa67"
"reference": "79d4f3e77b250a7d8043d76c6af8f0695e8a469f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/58dd9c931c785a79739310aef5178928305ffa67",
"reference": "58dd9c931c785a79739310aef5178928305ffa67",
"url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/79d4f3e77b250a7d8043d76c6af8f0695e8a469f",
"reference": "79d4f3e77b250a7d8043d76c6af8f0695e8a469f",
"shasum": ""
},
"require": {
Expand All @@ -919,7 +919,7 @@
"ext-filter": "*",
"ext-json": "*",
"ext-tokenizer": "*",
"fidry/cpu-core-counter": "^1.0",
"fidry/cpu-core-counter": "^1.2",
"php": "^7.4 || ^8.0",
"react/child-process": "^0.6.5",
"react/event-loop": "^1.0",
Expand All @@ -939,18 +939,18 @@
"symfony/stopwatch": "^5.4 || ^6.0 || ^7.0"
},
"require-dev": {
"facile-it/paraunit": "^1.3 || ^2.3",
"infection/infection": "^0.29.5",
"justinrainbow/json-schema": "^5.2",
"facile-it/paraunit": "^1.3.1 || ^2.4",
"infection/infection": "^0.29.8",
"justinrainbow/json-schema": "^5.3 || ^6.0",
"keradus/cli-executor": "^2.1",
"mikey179/vfsstream": "^1.6.11",
"mikey179/vfsstream": "^1.6.12",
"php-coveralls/php-coveralls": "^2.7",
"php-cs-fixer/accessible-object": "^1.1",
"php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.5",
"php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.5",
"phpunit/phpunit": "^9.6.19 || ^10.5.21 || ^11.2",
"symfony/var-dumper": "^5.4 || ^6.0 || ^7.0",
"symfony/yaml": "^5.4 || ^6.0 || ^7.0"
"phpunit/phpunit": "^9.6.21 || ^10.5.38 || ^11.4.3",
"symfony/var-dumper": "^5.4.47 || ^6.4.15 || ^7.1.8",
"symfony/yaml": "^5.4.45 || ^6.4.13 || ^7.1.6"
},
"suggest": {
"ext-dom": "For handling output formats in XML",
Expand Down Expand Up @@ -991,15 +991,15 @@
],
"support": {
"issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues",
"source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.64.0"
"source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.65.0"
},
"funding": [
{
"url": "https://github.com/keradus",
"type": "github"
}
],
"time": "2024-08-30T23:09:38+00:00"
"time": "2024-11-25T00:39:24+00:00"
},
{
"name": "fruitcake/php-cors",
Expand Down Expand Up @@ -3135,16 +3135,16 @@
},
{
"name": "laravel/pint",
"version": "v1.18.2",
"version": "v1.18.3",
"source": {
"type": "git",
"url": "https://github.com/laravel/pint.git",
"reference": "f55daaf7eb6c2f49ddf6702fb42e3091c64d8a64"
"reference": "cef51821608239040ab841ad6e1c6ae502ae3026"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/pint/zipball/f55daaf7eb6c2f49ddf6702fb42e3091c64d8a64",
"reference": "f55daaf7eb6c2f49ddf6702fb42e3091c64d8a64",
"url": "https://api.github.com/repos/laravel/pint/zipball/cef51821608239040ab841ad6e1c6ae502ae3026",
"reference": "cef51821608239040ab841ad6e1c6ae502ae3026",
"shasum": ""
},
"require": {
Expand All @@ -3155,13 +3155,13 @@
"php": "^8.1.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.64.0",
"illuminate/view": "^10.48.20",
"larastan/larastan": "^2.9.8",
"friendsofphp/php-cs-fixer": "^3.65.0",
"illuminate/view": "^10.48.24",
"larastan/larastan": "^2.9.11",
"laravel-zero/framework": "^10.4.0",
"mockery/mockery": "^1.6.12",
"nunomaduro/termwind": "^1.15.1",
"pestphp/pest": "^2.35.1"
"nunomaduro/termwind": "^1.17.0",
"pestphp/pest": "^2.36.0"
},
"bin": [
"builds/pint"
Expand Down Expand Up @@ -3197,7 +3197,7 @@
"issues": "https://github.com/laravel/pint/issues",
"source": "https://github.com/laravel/pint"
},
"time": "2024-11-20T09:33:46+00:00"
"time": "2024-11-26T15:34:00+00:00"
},
{
"name": "laravel/prompts",
Expand Down Expand Up @@ -10350,16 +10350,16 @@
},
{
"name": "tightenco/tlint",
"version": "v9.3.1",
"version": "v9.4.0",
"source": {
"type": "git",
"url": "https://github.com/tighten/tlint.git",
"reference": "9999dc0c33350222f54a293f4350942540b85c5c"
"reference": "b0175af6bf6722d693843d23db313561c1f28f4c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/tighten/tlint/zipball/9999dc0c33350222f54a293f4350942540b85c5c",
"reference": "9999dc0c33350222f54a293f4350942540b85c5c",
"url": "https://api.github.com/repos/tighten/tlint/zipball/b0175af6bf6722d693843d23db313561c1f28f4c",
"reference": "b0175af6bf6722d693843d23db313561c1f28f4c",
"shasum": ""
},
"require": {
Expand All @@ -10373,7 +10373,7 @@
"phpunit/phpunit": "^9.6",
"spatie/ray": "^1.37",
"symfony/var-dumper": "^6.1",
"tightenco/duster": "^2.0"
"tightenco/duster": "^3.0"
},
"bin": [
"bin/tlint"
Expand All @@ -10399,9 +10399,9 @@
"homepage": "https://github.com/tighten/tlint",
"support": {
"issues": "https://github.com/tighten/tlint/issues",
"source": "https://github.com/tighten/tlint/tree/v9.3.1"
"source": "https://github.com/tighten/tlint/tree/v9.4.0"
},
"time": "2024-04-26T20:21:16+00:00"
"time": "2024-12-06T22:18:52+00:00"
},
{
"name": "vlucas/phpdotenv",
Expand Down Expand Up @@ -10830,13 +10830,13 @@
],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": true,
"prefer-lowest": false,
"platform": {
"php": "^8.2.0"
},
"platform-dev": [],
"platform-dev": {},
"platform-overrides": {
"php": "8.2.0"
},
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@
"php": "^8.2.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.64",
"friendsofphp/php-cs-fixer": "^3.65",
"laravel-zero/framework": "^11.0",
"laravel/pint": "^1.18",
"nunomaduro/termwind": "^2.0",
"spatie/invade": "^1.1",
"squizlabs/php_codesniffer": "^3.11",
"tightenco/tlint": "^9.3"
"tightenco/tlint": "^9.4"
},
"autoload": {
"psr-4": {
Expand Down
Loading

0 comments on commit 687ef98

Please sign in to comment.