Skip to content

Commit

Permalink
Merge pull request #12 from totten/housekeeping
Browse files Browse the repository at this point in the history
Housekeeping
  • Loading branch information
totten authored Feb 8, 2023
2 parents 82d6b8f + 945359e commit 24388fb
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: php-actions/composer@v6
with:
php_extensions: pcntl
- name: PHPUnit Tests
uses: php-actions/phpunit@v3
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
## box.phar requires php72
php-version: '7.4'
tools: composer:v2
extensions: pcntl

- name: Set env
run: |
Expand Down
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"name": "totten/loco",
"description": "Loco is the YAML-based \"local-compose\" process manager",
"require": {
"ext-json": "*",
"ext-posix": "*",
"ext-pcntl": "*",
"marcj/topsort": "^1.1",
"symfony/yaml": "~4.4",
"symfony/finder": "~4.4",
Expand Down
10 changes: 7 additions & 3 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/Loco.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public static function dispatcher() {
*/
public static function filter($eventName, $data) {
$event = new LocoEvent($data);
self::dispatcher()->dispatch($eventName, $event);
self::dispatcher()->dispatch($event, $eventName);
return $event->getArguments();
}

Expand Down
2 changes: 1 addition & 1 deletion tests/LocoFacadeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function testDispatcher() {
Loco::dispatcher()->addListener('my-test', function() use (&$called) {
$called = TRUE;
});
Loco::dispatcher()->dispatch('my-test', new LocoEvent());
Loco::dispatcher()->dispatch(new LocoEvent(), 'my-test');
$this->assertEquals(TRUE, $called);
}

Expand Down

0 comments on commit 24388fb

Please sign in to comment.