Skip to content

Commit

Permalink
refactor(composer): remove guanguans/ai-commit dependency
Browse files Browse the repository at this point in the history
- Removed guanguans/ai-commit dependency from composer.json
- Updated forward-command to true in bamarni-bin section
  • Loading branch information
guanguans committed May 11, 2024
1 parent bb1531d commit caac119
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 14 deletions.
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@
"ergebnis/license": "^2.4",
"ergebnis/php-cs-fixer-config": "dev-main",
"ergebnis/rector-rules": "^1.0",
"guanguans/ai-commit": "dev-main",
"guanguans/monorepo-builder-worker": "^1.4",
"hyperf/composer-plugin": "^1.0",
"icanhazstring/composer-unused": "^0.8",
Expand Down Expand Up @@ -148,7 +147,7 @@
"extra": {
"bamarni-bin": {
"bin-links": true,
"forward-command": false,
"forward-command": true,
"target-directory": "vendor-bin"
},
"hooks": {
Expand Down
35 changes: 23 additions & 12 deletions tests/Support/HeplersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,32 @@
* @see https://github.com/guanguans/laravel-exception-notify
*/

use Guanguans\LaravelExceptionNotify\CollectorManager;
use Guanguans\LaravelExceptionNotify\ExceptionNotifyManager;
use Guanguans\LaravelExceptionNotify\Exceptions\InvalidArgumentException;

it('can make object', function (): void {
expect(make(ExceptionNotifyManager::class))->toBeInstanceOf(ExceptionNotifyManager::class)
->and(make(CollectorManager::class))->toBeInstanceOf(CollectorManager::class);
})->group(__DIR__, __FILE__);
it('will throw `InvalidArgumentException` when abstract is null', function (): void {
make(null);
})->group(__DIR__, __FILE__)->throws(InvalidArgumentException::class);

it('will throw `InvalidArgumentException` when abstract is empty array', function (): void {
make([]);
})->group(__DIR__, __FILE__)->throws(InvalidArgumentException::class);

it('can explode env', function (): void {
expect(env_explode('ENV_EXPLODE_STRING'))->toBeArray()->toBeTruthy()
->and(env_explode('ENV_EXPLODE_EMPTY'))->toBe([])
->and(env_explode('ENV_EXPLODE_NOT_EXIST'))->toBeNull();
// ->and(env_explode('ENV_EXPLODE_TRUE'))->toBeTrue()
// ->and(env_explode('ENV_EXPLODE_FALSE'))->toBeFalse()
// ->and(env_explode('ENV_EXPLODE_NULL'))->toBeNull()
expect([
env_explode('ENV_EXPLODE_STRING'),
env_explode('ENV_EXPLODE_EMPTY'),
env_explode('ENV_EXPLODE_NOT_EXIST'),
// env_explode('ENV_EXPLODE_FALSE'),
// env_explode('ENV_EXPLODE_NULL'),
// env_explode('ENV_EXPLODE_TRUE'),
])->sequence(
static fn (Pest\Expectation $expectation): Pest\Expectation => $expectation->toBeArray()->toBeTruthy(),
static fn (Pest\Expectation $expectation): Pest\Expectation => $expectation->toBeArray()->toBeFalsy(),
static fn (Pest\Expectation $expectation): Pest\Expectation => $expectation->toBeNull(),
// static fn (Pest\Expectation $expectation): Pest\Expectation => $expectation->toBeFalse(),
// static fn (Pest\Expectation $expectation): Pest\Expectation => $expectation->toBeNull(),
// static fn (Pest\Expectation $expectation): Pest\Expectation => $expectation->toBeTrue(),
);
})->group(__DIR__, __FILE__);

it('can human bytes', function (): void {
Expand Down
5 changes: 5 additions & 0 deletions vendor-bin/ai-commit/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"require-dev": {
"guanguans/ai-commit": "dev-main"
}
}

0 comments on commit caac119

Please sign in to comment.