Skip to content

Commit

Permalink
Add fig/log-test for mock logger
Browse files Browse the repository at this point in the history
  • Loading branch information
stloyd committed Jun 20, 2023
1 parent 8e92faf commit 29d7baa
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 4 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
},
"require-dev": {
"aeon-php/calendar": "^1.0",
"fig/log-test": "^1.1",
"jawira/case-converter": "^3.4",
"laminas/laminas-hydrator": "^4.0",
"laravel/serializable-closure": "^1.1",
Expand Down
48 changes: 47 additions & 1 deletion composer.lock

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

8 changes: 6 additions & 2 deletions src/adapter/etl-adapter-logger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ composer require flow-php/etl-adapter-logger:1.x@dev

## Loader - PsrLogger

Load each row into PsrLoggerInterface implementation.
Load each row into PsrLoggerInterface implementation. To get `TestLogger` mock class first run:

```
composer require fig/log-test
```

```php
<?php
Expand Down Expand Up @@ -56,4 +60,4 @@ composer build
```

It's recommended to use [pcov](https://pecl.php.net/package/pcov) for code coverage however you can also use
xdebug by setting `XDEBUG_MODE=coverage` env variable.
xdebug by setting `XDEBUG_MODE=coverage` env variable.
5 changes: 4 additions & 1 deletion src/adapter/etl-adapter-logger/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
"require": {
"php": "~8.1 || ~8.2",
"flow-php/etl": "^0.2 || 1.x-dev",
"psr/log": "^1.1"
"psr/log": "^2.0 || ^3.0"
},
"require-dev": {
"fig/log-test": "^1.1"
},
"config": {
"optimize-autoloader": true,
Expand Down

0 comments on commit 29d7baa

Please sign in to comment.