Skip to content

Commit

Permalink
Merge pull request #88 from tighten/adc/fix-composer
Browse files Browse the repository at this point in the history
Move dev dependencies into separate `composer-dev.json`
  • Loading branch information
driftingly authored Mar 10, 2023
2 parents e55caf0 + e52443c commit c3b0ca7
Show file tree
Hide file tree
Showing 10 changed files with 69 additions and 21 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
/.gitignore export-ignore
/banner.png export-ignore
/box.json export-ignore
/composer-dev.json export-ignore
/CONTRIBUTING.md export-ignore
/duster export-ignore
/duster.json export-ignore
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ jobs:
- name: Install dependencies
run: composer install

- name: Add dev dependencies
run: composer require --dev nunomaduro/larastan pestphp/pest

- name: Run Duster
run: ./builds/duster lint --using="tlint,phpcodesniffer,phpcsfixer,pint"

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/composer.lock
/composer-dev.lock
/vendor
.phpunit.result.cache
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ Before submitting a pull request:

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

- **[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).
When working locally you will need to install the dev dependencies.

- **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.

- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.
```bash
COMPOSER=composer-dev.json composer install
```
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,6 @@ Create a `pint.json` file in your project root, you can use [Duster's `pint.json

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



>**Warning** Heads Up! Workflows that commit to your repo will stop any currently running workflows and not trigger another workflow run.
One solution is to run your other workflows after Duster has completed by updating the trigger on those workflows:
Expand Down
2 changes: 1 addition & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
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 `main` branch (`git checkout main && git pull`)
3. Update the version in [`config/app.php`](./config/app.php)
4. Remove dev dependencies `composer install --no-dev`
4. Update dependencies and remove dev dependencies by running `composer update`
5. Compile the binary with (run on PHP < `8.2`)

```zsh
Expand Down
Binary file modified builds/duster
Binary file not shown.
50 changes: 50 additions & 0 deletions composer-dev.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"require": {
"php": "^8.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.14",
"laravel-zero/framework": "^9.2",
"laravel/pint": "1.5",
"nunomaduro/larastan": "^2.2",
"nunomaduro/termwind": "^1.14",
"pestphp/pest": "^1.21.3",
"rector/rector": "^0.15.10",
"spatie/invade": "^1.1",
"spatie/laravel-ray": "^1.31",
"squizlabs/php_codesniffer": "^3.7",
"tightenco/tlint": "^8.0"
},
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
},
"files": [
"./vendor/squizlabs/php_codesniffer/autoload.php"
]
},
"config": {
"preferred-install": {
"laravel/pint": "source",
"*": "dist"
},
"sort-packages": true,
"optimize-autoloader": true,
"allow-plugins": {
"pestphp/pest-plugin": true
},
"platform": {
"php": "8.0.2"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"bin": ["builds/duster"]
}
21 changes: 8 additions & 13 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@
}
],
"require": {
"php": "^8.0",
"php": "^8.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.14",
"laravel-zero/framework": "^9.2",
"laravel/pint": "1.5",
Expand All @@ -39,27 +41,20 @@
"squizlabs/php_codesniffer": "^3.7",
"tightenco/tlint": "^8.0"
},
"require-dev": {
"mockery/mockery": "^1.4.4",
"nunomaduro/larastan": "^2.2",
"pestphp/pest": "^1.21.3",
"rector/rector": "^0.15.10",
"spatie/laravel-ray": "^1.31"
},
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
},
"files": [
"./vendor/squizlabs/php_codesniffer/autoload.php"
]
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"files": [
"./vendor/squizlabs/php_codesniffer/autoload.php"
]
},
"config": {
"preferred-install": {
Expand Down
2 changes: 1 addition & 1 deletion config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
|
*/

'version' => '1.0.1',
'version' => '1.0.2',

/*
|--------------------------------------------------------------------------
Expand Down

0 comments on commit c3b0ca7

Please sign in to comment.