Skip to content

Commit c3b0ca7

Browse files
authored
Merge pull request #88 from tighten/adc/fix-composer
Move dev dependencies into separate `composer-dev.json`
2 parents e55caf0 + e52443c commit c3b0ca7

File tree

10 files changed

+69
-21
lines changed

10 files changed

+69
-21
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
/.gitignore export-ignore
1111
/banner.png export-ignore
1212
/box.json export-ignore
13+
/composer-dev.json export-ignore
1314
/CONTRIBUTING.md export-ignore
1415
/duster export-ignore
1516
/duster.json export-ignore

.github/workflows/tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ jobs:
3838
- name: Install dependencies
3939
run: composer install
4040

41+
- name: Add dev dependencies
42+
run: composer require --dev nunomaduro/larastan pestphp/pest
43+
4144
- name: Run Duster
4245
run: ./builds/duster lint --using="tlint,phpcodesniffer,phpcsfixer,pint"
4346

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
/composer.lock
2+
/composer-dev.lock
23
/vendor
34
.phpunit.result.cache

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ Before submitting a pull request:
3030

3131
If the project maintainer has any additional requirements, you will find them listed here.
3232

33-
- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](https://github.com/squizlabs/PHP_CodeSniffer).
33+
When working locally you will need to install the dev dependencies.
3434

35-
- **Tlint styles** - Tighten-specific styles. Tlint is built for apps, so there are some settings that might not make sense in a package, but [download Tlint](https://github.com/tightenco/tlint) and run it on your pull requests to see if it suggests any reasonable changes.
36-
37-
- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.
35+
```bash
36+
COMPOSER=composer-dev.json composer install
37+
```

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,6 @@ Create a `pint.json` file in your project root, you can use [Duster's `pint.json
137137

138138
There's a [GitHub Action](https://github.com/tighten/duster-action) you use to clean-up your workflows.
139139

140-
141-
142140
>**Warning** Heads Up! Workflows that commit to your repo will stop any currently running workflows and not trigger another workflow run.
143141
144142
One solution is to run your other workflows after Duster has completed by updating the trigger on those workflows:

RELEASE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
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)
44
2. On your local machine, pull down the latest changes on the `main` branch (`git checkout main && git pull`)
55
3. Update the version in [`config/app.php`](./config/app.php)
6-
4. Remove dev dependencies `composer install --no-dev`
6+
4. Update dependencies and remove dev dependencies by running `composer update`
77
5. Compile the binary with (run on PHP < `8.2`)
88

99
```zsh

builds/duster

-12.1 KB
Binary file not shown.

composer-dev.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"require": {
3+
"php": "^8.0"
4+
},
5+
"require-dev": {
6+
"friendsofphp/php-cs-fixer": "^3.14",
7+
"laravel-zero/framework": "^9.2",
8+
"laravel/pint": "1.5",
9+
"nunomaduro/larastan": "^2.2",
10+
"nunomaduro/termwind": "^1.14",
11+
"pestphp/pest": "^1.21.3",
12+
"rector/rector": "^0.15.10",
13+
"spatie/invade": "^1.1",
14+
"spatie/laravel-ray": "^1.31",
15+
"squizlabs/php_codesniffer": "^3.7",
16+
"tightenco/tlint": "^8.0"
17+
},
18+
"autoload": {
19+
"psr-4": {
20+
"App\\": "app/",
21+
"Database\\Factories\\": "database/factories/",
22+
"Database\\Seeders\\": "database/seeders/"
23+
}
24+
},
25+
"autoload-dev": {
26+
"psr-4": {
27+
"Tests\\": "tests/"
28+
},
29+
"files": [
30+
"./vendor/squizlabs/php_codesniffer/autoload.php"
31+
]
32+
},
33+
"config": {
34+
"preferred-install": {
35+
"laravel/pint": "source",
36+
"*": "dist"
37+
},
38+
"sort-packages": true,
39+
"optimize-autoloader": true,
40+
"allow-plugins": {
41+
"pestphp/pest-plugin": true
42+
},
43+
"platform": {
44+
"php": "8.0.2"
45+
}
46+
},
47+
"minimum-stability": "dev",
48+
"prefer-stable": true,
49+
"bin": ["builds/duster"]
50+
}

composer.json

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@
3030
}
3131
],
3232
"require": {
33-
"php": "^8.0",
33+
"php": "^8.0"
34+
},
35+
"require-dev": {
3436
"friendsofphp/php-cs-fixer": "^3.14",
3537
"laravel-zero/framework": "^9.2",
3638
"laravel/pint": "1.5",
@@ -39,27 +41,20 @@
3941
"squizlabs/php_codesniffer": "^3.7",
4042
"tightenco/tlint": "^8.0"
4143
},
42-
"require-dev": {
43-
"mockery/mockery": "^1.4.4",
44-
"nunomaduro/larastan": "^2.2",
45-
"pestphp/pest": "^1.21.3",
46-
"rector/rector": "^0.15.10",
47-
"spatie/laravel-ray": "^1.31"
48-
},
4944
"autoload": {
5045
"psr-4": {
5146
"App\\": "app/",
5247
"Database\\Factories\\": "database/factories/",
5348
"Database\\Seeders\\": "database/seeders/"
54-
},
55-
"files": [
56-
"./vendor/squizlabs/php_codesniffer/autoload.php"
57-
]
49+
}
5850
},
5951
"autoload-dev": {
6052
"psr-4": {
6153
"Tests\\": "tests/"
62-
}
54+
},
55+
"files": [
56+
"./vendor/squizlabs/php_codesniffer/autoload.php"
57+
]
6358
},
6459
"config": {
6560
"preferred-install": {

config/app.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
|
2727
*/
2828

29-
'version' => '1.0.1',
29+
'version' => '1.0.2',
3030

3131
/*
3232
|--------------------------------------------------------------------------

0 commit comments

Comments
 (0)