Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ changes, improvements or alternatives may be given).
Run the tests using the following script:

```shell
make test
vendor/bin/castor test
```

## Manual testing
Expand All @@ -70,7 +70,7 @@ Use [PHP CS fixer](https://cs.symfony.com/) to make your code compliant with
GifExceptionBundle's coding standards:

```shell
make cs
vendor/bin/castor cs
```

## Keeping your fork up-to-date
Expand Down
18 changes: 0 additions & 18 deletions Makefile

This file was deleted.

29 changes: 29 additions & 0 deletions castor.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php

use Castor\Attribute\AsTask;

use function Castor\run;

#[AsTask(description: 'Fix PHP CS')]
function cs(): void
{
run('vendor/bin/php-cs-fixer fix --verbose');
}

#[AsTask(description: 'Test if PHP CS is correct', name: 'cs:dry-run')]
function cs_dry_run(): void
{
run('vendor/bin/php-cs-fixer fix --verbose --dry-run');
}

#[AsTask(description: 'Run the test suite')]
function test(): void
{
run('vendor/bin/simple-phpunit');
}

#[AsTask(description: 'Run static analysis')]
function phpstan(): void
{
run('vendor/bin/phpstan analyse -c phpstan.neon');
}
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"require-dev": {
"doctrine/annotations": "^2.0",
"friendsofphp/php-cs-fixer": "^3.17",
"jolicode/castor": "^0.18",
"phpstan/phpstan": "^1.10",
"spatie/image-optimizer": "^1.8",
"symfony/asset": "^6.4 || ^7.3 || ^8.0",
Expand Down
Loading