Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
/composer.lock
/vendor

# Castor
/castor
/.castor.stub.php

# Temporary
/tests/app/var
/tests/app/public/bundles
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changes between versions

## Unreleased

* Replaced Makefile with Castor task runner
* Added development documentation for Castor

## 1.10.0 (2026-02-03)

* Added support for PHP 8.5
Expand Down
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
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
castor cs
```

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

This file was deleted.

24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,30 @@ Although it would probably make more sense to use the former and push up the opt

It uses [gifsicle](https://www.lcdf.org/gifsicle/) to optimize gifs via the [image-optimizer](https://github.com/psliwa/image-optimizer) library.

## Development

This project uses [Castor](https://castor.jolicode.com/) as a task runner for common development tasks.

To install Castor, download the PHAR (example for Linux AMD64):

```shell
curl -L https://github.com/jolicode/castor/releases/latest/download/castor.linux-amd64.phar -o castor
chmod +x castor
```

> **Note:** For other platforms (macOS, Windows, ARM), see the [Castor installation documentation](https://castor.jolicode.com/getting-started/installation).
> You can either place the `castor` binary in your PATH (e.g., `/usr/local/bin/castor`) or keep it in the project root and run it as `./castor`.

Available tasks:

```shell
castor list # List all available tasks
castor test # Run the test suite
castor cs # Fix PHP coding standards
castor cs:dry-run # Check PHP coding standards
castor phpstan # Run static analysis
```

## Further documentation

You can see the current and past versions using one of the following:
Expand Down
38 changes: 38 additions & 0 deletions castor.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php

/*
* This file is part of the GifExceptionBundle project.
*
* (c) JoliCode <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

use Castor\Attribute\AsTask;

use function Castor\run;

Check failure on line 14 in castor.php

View workflow job for this annotation

GitHub Actions / PHPStan

Used function Castor\run not found.

#[AsTask(description: 'Fix PHP CS')]

Check failure on line 16 in castor.php

View workflow job for this annotation

GitHub Actions / PHPStan

Attribute class Castor\Attribute\AsTask does not exist.
function cs(): void
{
run('vendor/bin/php-cs-fixer fix --verbose');

Check failure on line 19 in castor.php

View workflow job for this annotation

GitHub Actions / PHPStan

Function Castor\run not found.
}

#[AsTask(name: 'cs:dry-run', description: 'Test if PHP CS is correct')]

Check failure on line 22 in castor.php

View workflow job for this annotation

GitHub Actions / PHPStan

Attribute class Castor\Attribute\AsTask does not exist.
function cs_dry_run(): void
{
run('vendor/bin/php-cs-fixer fix --verbose --dry-run');

Check failure on line 25 in castor.php

View workflow job for this annotation

GitHub Actions / PHPStan

Function Castor\run not found.
}

#[AsTask(description: 'Run the test suite')]

Check failure on line 28 in castor.php

View workflow job for this annotation

GitHub Actions / PHPStan

Attribute class Castor\Attribute\AsTask does not exist.
function test(): void
{
run('vendor/bin/simple-phpunit');

Check failure on line 31 in castor.php

View workflow job for this annotation

GitHub Actions / PHPStan

Function Castor\run not found.
}

#[AsTask(description: 'Run static analysis')]

Check failure on line 34 in castor.php

View workflow job for this annotation

GitHub Actions / PHPStan

Attribute class Castor\Attribute\AsTask does not exist.
function phpstan(): void
{
run('vendor/bin/phpstan analyse -c phpstan.neon');

Check failure on line 37 in castor.php

View workflow job for this annotation

GitHub Actions / PHPStan

Function Castor\run not found.
}
Loading