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

Making a few changes and breaking shit #118

Merged
merged 27 commits into from
Nov 11, 2023
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
55 changes: 21 additions & 34 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,35 +1,22 @@
/.github @JoshuaEstes
/tools @JoshuaEstes
/docs @JoshuaEstes
* @sonsofphp/Members

# Make Documentation Team
docs/ @sonsofphp/Members

# Each project needs a Team
/src/SonsOfPHP/Bard @JoshuaEstes
/src/SonsOfPHP/Bridge/Doctrine/EventSourcing @JoshuaEstes
/src/SonsOfPHP/Bridge/Doctrine/FeatureToggle @JoshuaEstes
/src/SonsOfPHP/Bridge/Doctrine/Money @JoshuaEstes
/src/SonsOfPHP/Bridge/Symfony/Cqrs @JoshuaEstes
/src/SonsOfPHP/Bridge/Symfony/EventSourcing @JoshuaEstes
/src/SonsOfPHP/Bridge/Symfony/Filesystem @JoshuaEstes
/src/SonsOfPHP/Bundle/Cqrs @JoshuaEstes
/src/SonsOfPHP/Bundle/FeatureToggle @JoshuaEstes
/src/SonsOfPHP/Bundle/Filesystem @JoshuaEstes
/src/SonsOfPHP/Component/Autoloader @JoshuaEstes
/src/SonsOfPHP/Component/Cache @JoshuaEstes
/src/SonsOfPHP/Component/Clock @JoshuaEstes
/src/SonsOfPHP/Component/Cqrs @JoshuaEstes
/src/SonsOfPHP/Component/Cvs @JoshuaEstes
/src/SonsOfPHP/Component/EventDispatcher @JoshuaEstes
/src/SonsOfPHP/Component/EventSourcing @JoshuaEstes
/src/SonsOfPHP/Component/FeatureToggle @JoshuaEstes
/src/SonsOfPHP/Component/Faker @JoshuaEstes
/src/SonsOfPHP/Component/Filesystem @JoshuaEstes
/src/SonsOfPHP/Component/HttpClient @JoshuaEstes
/src/SonsOfPHP/Component/HttpFactory @JoshuaEstes
/src/SonsOfPHP/Component/HttpHandler @JoshuaEstes
/src/SonsOfPHP/Component/HttpMessage @JoshuaEstes
/src/SonsOfPHP/Component/Json @JoshuaEstes
/src/SonsOfPHP/Component/Logger @JoshuaEstes
/src/SonsOfPHP/Component/Money @JoshuaEstes
/src/SonsOfPHP/Component/Pdf @JoshuaEstes
/src/SonsOfPHP/Component/PhoneNumber @JoshuaEstes
/src/SonsOfPHP/Component/Queue @JoshuaEstes
/src/SonsOfPHP/Component/Version @JoshuaEstes
/src/SonsOfPHP/Contract/Core @JoshuaEstes

# Each project/component/contract needs a Team
/src/SonsOfPHP/**/Cache @JoshuaEstes
/src/SonsOfPHP/**/Clock @JoshuaEstes
/src/SonsOfPHP/**/Common @JoshuaEstes
/src/SonsOfPHP/**/Cqrs @JoshuaEstes
/src/SonsOfPHP/**/EventDispatcher @JoshuaEstes
/src/SonsOfPHP/**/EventSourcing @JoshuaEstes
/src/SonsOfPHP/**/FeatureToggle @JoshuaEstes
/src/SonsOfPHP/**/Filesystem @JoshuaEstes
/src/SonsOfPHP/**/HttpFactory @JoshuaEstes
/src/SonsOfPHP/**/HttpMessage @JoshuaEstes
/src/SonsOfPHP/**/HttpJson @JoshuaEstes
/src/SonsOfPHP/**/Money @JoshuaEstes
/src/SonsOfPHP/**/Version @JoshuaEstes
6 changes: 5 additions & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ Cache:

Clock:
- docs/components/clock/*
- src/SonsOfPHP/Component/Clock/*
- src/SonsOfPHP/**/Clock/*

Common:
- docs/components/common/*
- src/SonsOfPHP/**/Common/*

CQRS:
- docs/components/cqrs/*
Expand Down
13 changes: 4 additions & 9 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
## Description

<!--
Enter description of changes here. Bug fixes, enhancements, etc.
-->

## Checklist

<!--
If anything is not applicable, it can just be marked as complete or removed.
-->
- [ ] Updated the correct CHANGELOG file
- [ ] Updated documentation
## Checklist
- [ ] Updated CHANGELOG files
- [ ] Updated Documentation
- [ ] Unit Tests Created
4 changes: 2 additions & 2 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ jobs:
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- run: make install
- run: php tools/phpunit/vendor/bin/phpunit --coverage-clover coverage.xml
- run: make install phpunit
env:
XDEBUG_MODE: coverage
PHPUNIT_OPTIONS: --coverage-clover coverage.xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
Expand Down
1 change: 1 addition & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@

// Rules
'no_unused_imports' => true,
'ordered_imports' => true,
'php_unit_test_class_requires_covers' => true,
])->setFinder($finder);
50 changes: 30 additions & 20 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ BARD = src/SonsOfPHP/Bard/bin/bard

COVERAGE_DIR = docs/coverage

XDEBUG_MODE ?= off
PHPUNIT_TESTSUITE ?= all
PHPUNIT_OPTIONS ?=

.DEFAULT_GOAL = help
.PHONY = help

Expand Down Expand Up @@ -39,16 +43,27 @@ purge: # Purge vendor and lock files
rm -rf vendor/ src/SonsOfPHP/Component/*/vendor/ src/SonsOfPHP/Component/*/composer.lock
rm -rf vendor/ src/SonsOfPHP/Contract/*/vendor/ src/SonsOfPHP/Contract/*/composer.lock

test: ## Run PHPUnit Tests
XDEBUG_MODE=off \
test: phpunit ## Run PHPUnit Tests

test-cache: PHPUNIT_TESTSUITE=cache
test-cache: phpunit

test-clock: PHPUNIT_TESTSUITE=clock
test-clock: phpunit

test-cqrs: PHPUNIT_TESTSUITE=cqrs
test-cqrs: phpunit

phpunit:
XDEBUG_MODE=$(XDEBUG_MODE) \
$(PHP) \
-dxdebug.mode=off \
-dxdebug.mode=$(XDEBUG_MODE) \
-dapc.enable_cli=1 \
$(PHPUNIT) \
--cache-result \
--order-by=defects

phpunit: test
--order-by=defects \
--testsuite=$(PHPUNIT_TESTSUITE) \
$(PHPUNIT_OPTIONS)

phpunit-install:
XDEBUG_MODE=off $(COMPOSER) install --working-dir=tools/phpunit --no-interaction --prefer-dist --optimize-autoloader
Expand All @@ -61,23 +76,18 @@ lint: lint-php ## Lint files
lint-php: # lint php files
find src -name "*.php" -not -path "src/**/vendor/*" | xargs -I{} $(PHP) -l '{}'

coverage: ## Build Code Coverage Report
XDEBUG_MODE=coverage \
$(PHP) \
-dxdebug.mode=coverage \
-dapc.enable_cli=1 \
$(PHPUNIT) \
--cache-result \
--coverage-html $(COVERAGE_DIR)
coverage: XDEBUG_MODE=coverage
coverage: PHPUNIT_OPTIONS=--coverage-html $(COVERAGE_DIR)
coverage: phpunit ## Build Code Coverage Report

coverage-cache:
XDEBUG_MODE=coverage $(PHP) -dxdebug.mode=coverage $(PHPUNIT) --testsuite cache --coverage-html $(COVERAGE_DIR)
coverage-cache: PHPUNIT_TESTSUITE=cache
coverage-cache: coverage

coverage-clock:
XDEBUG_MODE=coverage $(PHP) -dxdebug.mode=coverage $(PHPUNIT) --testsuite clock --coverage-html $(COVERAGE_DIR)
coverage-clock: PHPUNIT_TESTSUITE=clock
coverage-clock: coverage

coverage-cqrs:
XDEBUG_MODE=coverage $(PHP) -dxdebug.mode=coverage $(PHPUNIT) --testsuite cqrs --coverage-html $(COVERAGE_DIR)
coverage-cqrs: PHPUNIT_TESTSUITE=cqrs
coverage-cqrs: coverage

coverage-event-dispatcher:
XDEBUG_MODE=coverage $(PHP) -dxdebug.mode=coverage $(PHPUNIT) --testsuite event-dispatcher --coverage-html $(COVERAGE_DIR)
Expand Down
28 changes: 26 additions & 2 deletions bard.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,32 @@
"repository": "git@github.com:SonsOfPHP/version.git"
},
{
"path": "src/SonsOfPHP/Contract/Core",
"repository": "git@github.com:SonsOfPHP/core-contract.git"
"path": "src/SonsOfPHP/Contract/Common",
"repository": "git@github.com:SonsOfPHP/common-contract.git"
},
{
"path": "src/SonsOfPHP/Contract/Cqrs",
"repository": "git@github.com:SonsOfPHP/cqrs-contract.git"
},
{
"path": "src/SonsOfPHP/Contract/EventSourcing",
"repository": "git@github.com:SonsOfPHP/event-sourcing-contract.git"
},
{
"path": "src/SonsOfPHP/Contract/FeatureToggle",
"repository": "git@github.com:SonsOfPHP/feature-toggle-contract.git"
},
{
"path": "src/SonsOfPHP/Contract/Filesystem",
"repository": "git@github.com:SonsOfPHP/filesystem-contract.git"
},
{
"path": "src/SonsOfPHP/Contract/Money",
"repository": "git@github.com:SonsOfPHP/money-contract.git"
},
{
"path": "src/SonsOfPHP/Contract/Version",
"repository": "git@github.com:SonsOfPHP/version-contract.git"
}
]
}
62 changes: 40 additions & 22 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,30 +34,36 @@
"provide": {
"psr/event-dispatcher-implementation": "1.0",
"psr/clock-implementation": "1.0",
"psr/http-message-implementation": "^1.0|^2.0",
"psr/http-message-implementation": "^1.0 || ^2.0",
"psr/http-factory-implementation": "^1.0",
"psr/cache-implementation": "^2.0|^3.0",
"psr/simple-cache-implementation": "^1.0|^2.0|^3.0"
"psr/cache-implementation": "^2.0 || ^3.0",
"psr/simple-cache-implementation": "^1.0 || ^2.0 || ^3.0",
"sonsofphp/cqrs-implementation": "0.3.x-dev",
"sonsofphp/event-sourcing-implementation": "0.3.x-dev",
"sonsofphp/feature-toggle-implementation": "0.3.x-dev",
"sonsofphp/filesystem-implementation": "0.3.x-dev",
"sonsofphp/money-implementation": "0.3.x-dev",
"sonsofphp/version-implementation": "0.3.x-dev"
},
"require": {
"php": ">=8.1",
"ext-json": "*",
"psr/event-dispatcher": "^1.0",
"doctrine/dbal": "^3",
"symfony/options-resolver": "^5|^6",
"symfony/uid": "^5|^6",
"symfony/console": "^4|^5|^6",
"symfony/dotenv": "^5|^6",
"symfony/finder": "^5|^6",
"symfony/process": "^5|^6",
"symfony/dependency-injection": "^5|^6",
"symfony/http-kernel": "^5|^6",
"symfony/options-resolver": "^5 || ^6",
"symfony/uid": "^5 || ^6",
"symfony/console": "^4 || ^5 || ^6",
"symfony/dotenv": "^5 || ^6",
"symfony/finder": "^5 || ^6",
"symfony/process": "^5 || ^6",
"symfony/dependency-injection": "^5 || ^6",
"symfony/http-kernel": "^5 || ^6",
"symfony/security-bundle": "^6",
"symfony/messenger": "^5|^6",
"symfony/messenger": "^5 || ^6",
"psr/clock": "^1.0",
"psr/http-message": "^1.0|^2.0",
"psr/http-message": "^1.0 || ^2.0",
"psr/http-factory": "^1.0",
"psr/cache": "^2.0|^3.0",
"psr/cache": "^2.0 || ^3.0",
"psr/simple-cache": "^3.0"
},
"replace": {
Expand All @@ -78,7 +84,14 @@
"sonsofphp/http-message": "self.version",
"sonsofphp/http-factory": "self.version",
"sonsofphp/core-contract": "self.version",
"sonsofphp/cache": "self.version"
"sonsofphp/cache": "self.version",
"sonsofphp/cqrs-contract": "self.version",
"sonsofphp/event-sourcing-contract": "self.version",
"sonsofphp/feature-toggle-contract": "self.version",
"sonsofphp/filesystem-contract": "self.version",
"sonsofphp/money-contract": "self.version",
"sonsofphp/version-contract": "self.version",
"sonsofphp/common-contract": "self.version"
},
"autoload": {
"psr-4": {
Expand All @@ -99,7 +112,13 @@
"SonsOfPHP\\Component\\Json\\": "src/SonsOfPHP/Component/Json",
"SonsOfPHP\\Component\\Money\\": "src/SonsOfPHP/Component/Money",
"SonsOfPHP\\Component\\Version\\": "src/SonsOfPHP/Component/Version",
"SonsOfPHP\\Contract\\Core\\": "src/SonsOfPHP/Contract/Core"
"SonsOfPHP\\Contract\\Common\\": "src/SonsOfPHP/Contract/Common",
"SonsOfPHP\\Contract\\Cqrs\\": "src/SonsOfPHP/Contract/Cqrs",
"SonsOfPHP\\Contract\\EventSourcing\\": "src/SonsOfPHP/Contract/EventSourcing",
"SonsOfPHP\\Contract\\FeatureToggle\\": "src/SonsOfPHP/Contract/FeatureToggle",
"SonsOfPHP\\Contract\\Filesystem\\": "src/SonsOfPHP/Contract/Filesystem",
"SonsOfPHP\\Contract\\Money\\": "src/SonsOfPHP/Contract/Money",
"SonsOfPHP\\Contract\\Version\\": "src/SonsOfPHP/Contract/Version"
},
"exclude-from-classmap": [
"src/SonsOfPHP/Bard/Tests",
Expand All @@ -118,8 +137,7 @@
"src/SonsOfPHP/Component/HttpMessage/Tests",
"src/SonsOfPHP/Component/Json/Tests",
"src/SonsOfPHP/Component/Money/Tests",
"src/SonsOfPHP/Component/Version/Tests",
"src/SonsOfPHP/Contract/Core/Tests"
"src/SonsOfPHP/Component/Version/Tests"
]
},
"extra": {
Expand All @@ -129,13 +147,13 @@
}
},
"require-dev": {
"symfony/http-foundation": "^5|^6",
"symfony/serializer": "^5|^6",
"symfony/http-foundation": "^5 || ^6",
"symfony/serializer": "^5 || ^6",
"symfony/phpunit-bridge": "^6",
"symfony/error-handler": "^6",
"symfony/messenger": "^5|^6",
"symfony/messenger": "^5 || ^6",
"phpunit/phpunit": "^10.4",
"psr/simple-cache": "^1.0|^2.0|^3.0"
"psr/simple-cache": "^1.0 || ^2.0 || ^3.0"
},
"autoload-dev": {
"psr-4": {
Expand Down
63 changes: 0 additions & 63 deletions docs/components/cqrs/command-handlers.md

This file was deleted.

Loading
Loading