-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'refs/heads/master' into feature/147
- Loading branch information
Showing
210 changed files
with
8,034 additions
and
1,630 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
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,21 @@ | ||
on: | ||
pull_request: null | ||
|
||
name: phpunit | ||
|
||
env: | ||
PERSISTENCE_DRIVER: db | ||
DB_DRIVER: sqlite | ||
|
||
jobs: | ||
phpunit-db: | ||
uses: spiral/gh-actions/.github/workflows/phpunit.yml@master | ||
with: | ||
extensions: >- | ||
['sockets', 'mongodb', 'pgsql', 'pdo_pgsql', 'pdo_mysql'] | ||
os: >- | ||
['ubuntu-latest'] | ||
php: >- | ||
['8.3'] | ||
stability: >- | ||
['prefer-stable'] |
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 |
---|---|---|
|
@@ -8,3 +8,5 @@ protoc-gen-php-grpc* | |
.phpunit.result.cache | ||
.php-cs-fixer.cache | ||
.deptrac.cache | ||
.phpunit.cache | ||
build |
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
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,35 @@ | ||
build: | ||
docker compose up --no-start; | ||
|
||
start: | ||
docker compose up --remove-orphans -d; | ||
|
||
up: build start | ||
|
||
stop: | ||
docker compose stop; | ||
|
||
down: | ||
docker compose down; | ||
|
||
restart: | ||
docker compose restart; | ||
|
||
list: | ||
docker compose ps; | ||
|
||
log-tail: | ||
docker compose logs --tail=50 -f; | ||
|
||
pull-latest: | ||
docker compose pull; | ||
|
||
# ========================= | ||
|
||
bash: | ||
docker compose exec buggregator-server /bin/sh; | ||
|
||
reset-server: | ||
docker compose exec buggregator-server ./rr reset; | ||
|
||
reset: reset-server |
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
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
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
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,76 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Database\Factory; | ||
|
||
use App\Application\Domain\Entity\Json; | ||
use App\Application\Domain\ValueObjects\Uuid; | ||
use Database\Factory\Partials\InspectorType; | ||
use Database\Factory\Partials\MonologType; | ||
use Database\Factory\Partials\ProfilerType; | ||
use Database\Factory\Partials\RayType; | ||
use Database\Factory\Partials\SentryType; | ||
use Database\Factory\Partials\SmtpType; | ||
use Database\Factory\Partials\VarDumperType; | ||
use Modules\Events\Domain\Event; | ||
use Modules\Events\Domain\ValueObject\Timestamp; | ||
use Modules\Projects\Domain\ValueObject\Key; | ||
use Spiral\DatabaseSeeder\Factory\AbstractFactory; | ||
|
||
/** | ||
* @implements AbstractFactory<Event> | ||
*/ | ||
final class EventFactory extends AbstractFactory | ||
{ | ||
use SmtpType, | ||
ProfilerType, | ||
SentryType, | ||
MonologType, | ||
InspectorType, | ||
VarDumperType, | ||
RayType; | ||
|
||
public function entity(): string | ||
{ | ||
return Event::class; | ||
} | ||
|
||
public function definition(): array | ||
{ | ||
return [ | ||
'uuid' => Uuid::generate(), | ||
'type' => $this->faker->randomElement(['sentry', 'monolog', 'var-dump', 'inspector', 'ray', 'profiler']), | ||
'timestamp' => Timestamp::create(), | ||
'project' => null, | ||
]; | ||
} | ||
|
||
|
||
public function makeEntity(array $definition): object | ||
{ | ||
return new Event( | ||
uuid: $definition['uuid'], | ||
type: $definition['type'], | ||
payload: new Json($this->getPayload($definition['type'])), | ||
timestamp: $definition['timestamp'], | ||
project: $definition['project'] | ||
? ($definition['project'] instanceof Key ? $definition['project'] : Key::create($definition['project'])) | ||
: null, | ||
); | ||
} | ||
|
||
public function getPayload(string $type): array | ||
{ | ||
return match ($type) { | ||
'sentry' => self::getSentryPayload(), | ||
'monolog' => self::getMonologPayload(), | ||
'var-dump' => self::getVarDumperPayload(), | ||
'inspector' => self::getInspectorPayload(), | ||
'ray' => self::getRayPayload(), | ||
'profiler' => self::getProfilerPayload(), | ||
'smtp' => self::getSmtpPayload(), | ||
default => ['foo' => 'bar'], | ||
}; | ||
} | ||
} |
Oops, something went wrong.