-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from vfilipovsky/feat_regions_get
feat: regions list
- Loading branch information
Showing
17 changed files
with
592 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
monolog: | ||
channels: | ||
- deprecation # Deprecations are logged in the dedicated "deprecation" channel when it exists | ||
|
||
when@dev: | ||
monolog: | ||
handlers: | ||
main: | ||
type: stream | ||
path: "%kernel.logs_dir%/%kernel.environment%.log" | ||
level: debug | ||
channels: [ "!event" ] | ||
console: | ||
type: console | ||
level: debug | ||
process_psr_3_messages: false | ||
channels: [ "!event", "!doctrine", "!console" ] | ||
|
||
when@test: | ||
monolog: | ||
handlers: | ||
main: | ||
type: fingers_crossed | ||
action_level: error | ||
handler: nested | ||
excluded_http_codes: [ 404, 405 ] | ||
channels: [ "!event" ] | ||
nested: | ||
type: stream | ||
path: "%kernel.logs_dir%/%kernel.environment%.log" | ||
level: debug | ||
|
||
when@prod: | ||
monolog: | ||
handlers: | ||
main: | ||
type: fingers_crossed | ||
action_level: error | ||
handler: nested | ||
excluded_http_codes: [ 404, 405 ] | ||
buffer_size: 50 # How many messages should be saved? Prevent memory leaks | ||
nested: | ||
type: stream | ||
path: php://stderr | ||
level: debug | ||
formatter: monolog.formatter.json | ||
console: | ||
type: console | ||
process_psr_3_messages: false | ||
channels: [ "!event", "!doctrine" ] | ||
deprecation: | ||
type: stream | ||
channels: [ deprecation ] | ||
path: php://stderr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\Action\Region\Get; | ||
|
||
use App\Repository\RegionRepositoryInterface; | ||
|
||
readonly class GetRegionsAction implements GetRegionsActionInterface | ||
{ | ||
public function __construct(private RegionRepositoryInterface $regionRepository) | ||
{ | ||
} | ||
|
||
public function run(GetRegionsActionRequest $request): GetRegionsActionResponse | ||
{ | ||
return new GetRegionsActionResponse( | ||
$this->regionRepository->list($request->offset, $request->limit, $request->title) | ||
); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\Action\Region\Get; | ||
|
||
interface GetRegionsActionInterface | ||
{ | ||
public function run(GetRegionsActionRequest $request): GetRegionsActionResponse; | ||
} |
Oops, something went wrong.