Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: refactoring structure to meet DDD #33

Merged
merged 10 commits into from
Aug 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:
uses: shivammathur/[email protected]
with:
php-version: ${{ matrix.php-version }}
extensions: none, ctype, dom, json, mbstring, simplexml, tokenizer, xml, xmlwriter, pdo, curl, fileinfo, pdo_mysql, sockets
extensions: none, ctype, dom, json, mbstring, simplexml, tokenizer, xml, xmlwriter, pdo, curl, fileinfo, pdo_mysql, sockets, decimal
ini-values: error_reporting=E_ALL
coverage: none
tools: phive
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dependency-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
uses: shivammathur/[email protected]
with:
php-version: ${{ matrix.php-version }}
extensions: none, ctype, dom, json, mbstring, simplexml, tokenizer, xml, xmlwriter, pdo, curl, fileinfo, pdo_mysql, sockets
extensions: none, ctype, dom, json, mbstring, simplexml, tokenizer, xml, xmlwriter, pdo, curl, fileinfo, pdo_mysql, sockets, decimal
ini-values: error_reporting=E_ALL
coverage: none
tools: phive
Expand Down Expand Up @@ -109,7 +109,7 @@ jobs:
uses: shivammathur/[email protected]
with:
php-version: ${{ matrix.php-version }}
extensions: none, ctype, dom, json, mbstring, simplexml, tokenizer, xml, xmlwriter, pdo, curl, fileinfo, pdo_mysql, sockets
extensions: none, ctype, dom, json, mbstring, simplexml, tokenizer, xml, xmlwriter, pdo, curl, fileinfo, pdo_mysql, sockets, decimal
ini-values: error_reporting=E_ALL
coverage: none
tools: phive
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/refactoring.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
uses: shivammathur/[email protected]
with:
php-version: ${{ matrix.php-version }}
extensions: none, ctype, dom, json, mbstring, simplexml, tokenizer, xml, xmlwriter, pdo, curl, fileinfo, pdo_mysql, sockets
extensions: none, ctype, dom, json, mbstring, simplexml, tokenizer, xml, xmlwriter, pdo, curl, fileinfo, pdo_mysql, sockets, decimal
ini-values: error_reporting=E_ALL
coverage: none

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/security-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
uses: shivammathur/[email protected]
with:
php-version: ${{ matrix.php-version }}
extensions: none, ctype, dom, json, mbstring, simplexml, tokenizer, xml, xmlwriter, pdo, curl, fileinfo, sockets
extensions: none, ctype, dom, json, mbstring, simplexml, tokenizer, xml, xmlwriter, pdo, curl, fileinfo, sockets, decimal
ini-values: error_reporting=E_ALL
coverage: none

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
uses: shivammathur/[email protected]
with:
php-version: ${{ matrix.php-version }}
extensions: none, ctype, dom, json, mbstring, simplexml, tokenizer, xml, xmlwriter, pdo, curl, fileinfo, pdo_mysql, opcache, pcntl, posix, sockets
extensions: none, ctype, dom, json, mbstring, simplexml, tokenizer, xml, xmlwriter, pdo, curl, fileinfo, pdo_mysql, opcache, pcntl, posix, sockets, decimal
ini-values: error_reporting=E_ALL
coverage: none

Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:
uses: shivammathur/[email protected]
with:
php-version: ${{ matrix.php-version }}
extensions: none, ctype, dom, json, mbstring, simplexml, tokenizer, xml, xmlwriter, pdo, pdo_mysql, curl, fileinfo, opcache, pcntl, posix, sockets
extensions: none, ctype, dom, json, mbstring, simplexml, tokenizer, xml, xmlwriter, pdo, pdo_mysql, curl, fileinfo, opcache, pcntl, posix, sockets, decimal
ini-values: error_reporting=E_ALL
coverage: xdebug

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
uses: shivammathur/[email protected]
with:
php-version: ${{ matrix.php-version }}
extensions: none, ctype, dom, json, mbstring, simplexml, tokenizer, xml, xmlwriter, pdo, pdo_mysql, pdo_sqlite, curl, fileinfo, opcache, pcntl, posix, sockets
extensions: none, ctype, dom, json, mbstring, simplexml, tokenizer, xml, xmlwriter, pdo, pdo_mysql, pdo_sqlite, curl, fileinfo, opcache, pcntl, posix, sockets, decimal
ini-values: error_reporting=E_ALL
coverage: xdebug

Expand Down Expand Up @@ -115,7 +115,7 @@ jobs:
uses: shivammathur/[email protected]
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring, pdo, pdo_sqlite
extensions: mbstring, pdo, pdo_sqlite, decimal
ini-values: error_reporting=E_ALL
coverage: xdebug

Expand Down Expand Up @@ -179,7 +179,7 @@ jobs:
uses: shivammathur/[email protected]
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring, pdo, pdo_sqlite
extensions: mbstring, pdo, pdo_sqlite, decimal
ini-values: error_reporting=E_ALL
coverage: xdebug

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ lint-deps: ## Runs composer-require-checker – checks for dependencies that are
.PHONY: lint-deps

lint-deptrac: ## Runs deptrac – static analysis tool
$(APP_RUNNER) .phive/deptrac analyse --config-file=deptrac.yaml -v --cache-file=.build/.deptrac.cache
$(APP_RUNNER) .phive/deptrac analyse --config-file=deptrac.yaml -vvv --cache-file=.build/.deptrac.cache
.PHONY: lint-deptrac

lint-deptrac-ci: ## Runs deptrac – static analysis tool with github output (CI mode)
Expand Down
2 changes: 1 addition & 1 deletion app/.phive/phars.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
<phive xmlns="https://phar.io/phive">
<phar name="composer-normalize" version="^2.42.0" installed="2.42.0" location="./.phive/composer-normalize" copy="false"/>
<phar name="composer-require-checker" version="^4.11.0" installed="4.11.0" location="./.phive/composer-require-checker" copy="false"/>
<phar name="deptrac" version="^2.0.0" installed="2.0.0" location="./.phive/deptrac" copy="false"/>
<phar name="deptrac" version="^2.0.1" installed="2.0.1" location="./.phive/deptrac" copy="false"/>
</phive>
2 changes: 1 addition & 1 deletion app/.php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

$config = ConfigBuilder::createFromRuleSet(new DefaultSet(['static_lambda' => false]))
->inDir(__DIR__ . '/config')
->inDir(__DIR__ . '/migrations')
->inDir(__DIR__ . '/database')
->inDir(__DIR__ . '/src')
->inDir(__DIR__ . '/tests')
->addFiles([
Expand Down
4 changes: 2 additions & 2 deletions app/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

declare(strict_types=1);

use App\Application\Exception\Handler;
use App\Application\Kernel;
use Bridge\Spiral\Exceptions\Handler;
use Bridge\Spiral\Kernel;

mb_internal_encoding('UTF-8');
error_reporting((E_ALL | E_STRICT) ^ E_DEPRECATED);
Expand Down
6 changes: 5 additions & 1 deletion app/composer-require-checker.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"symbol-whitelist": [
"Spiral\\Debug\\Bootloader\\DumperBootloader",
"Spiral\\Debug\\Middleware\\DumperMiddleware"
"Spiral\\Debug\\Middleware\\DumperMiddleware",
"Spiral\\DatabaseSeeder\\Attribute\\Seeder",
"Spiral\\DatabaseSeeder\\Bootloader\\DatabaseSeederBootloader",
"Spiral\\DatabaseSeeder\\Factory\\AbstractFactory",
"Spiral\\DatabaseSeeder\\Seeder\\AbstractSeeder"
]
}
13 changes: 11 additions & 2 deletions app/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,15 @@
},
"require": {
"php": "^8.3",
"ext-decimal": "*",
"ext-mbstring": "*",
"ext-pdo": "*",
"ext-sockets": "*",
"beberlei/assert": "^3.3",
"cycle/annotated": "^4.1",
"cycle/database": "^2.11",
"cycle/orm": "^2.8",
"eventsauce/eventsauce": "^3.6",
"illuminate/collections": "^9.52",
"monolog/monolog": "^3.7",
"ramsey/uuid": "^4.7",
Expand Down Expand Up @@ -75,6 +78,7 @@
"psalm/plugin-phpunit": "^0.19",
"rector/rector": "^1.2",
"roave/infection-static-analysis-plugin": "^1.35",
"spiral-packages/database-seeder": "^3.2",
"spiral/dumper": "^3.3",
"spiral/testing": "^2.8",
"vimeo/psalm": "^5.23.1",
Expand All @@ -84,7 +88,12 @@
"prefer-stable": true,
"autoload": {
"psr-4": {
"App\\": "src"
"Application\\": "src/Application/",
"Bridge\\Spiral\\": "src/Bridge/Spiral",
"Database\\Factories\\": "database/Factories/",
"Database\\Seeders\\": "database/Seeders/",
"Domain\\": "src/Domain/",
"Infrastructure\\": "src/Infrastructure/"
}
},
"autoload-dev": {
Expand Down Expand Up @@ -144,7 +153,7 @@
"refactor:ci": "rector process --config=rector.php --dry-run --ansi",
"rr:download": "rr get-binary",
"rr:download-protoc": "rr download-protoc-binary",
"stan": "phpstan analyse --memory-limit=2G",
"stan": "phpstan analyse --memory-limit=2G -vv",
"stan:baseline": "phpstan analyse --generate-baseline --memory-limit=2G --allow-empty-baseline",
"stan:ci": "phpstan analyse --memory-limit=2G --error-format=github",
"test": [
Expand Down
Loading
Loading