Skip to content

Commit

Permalink
Merge branch 'main' into user_agent
Browse files Browse the repository at this point in the history
* main:
  Housekeeping (#203)
  [EventDispatcher] Adding a few new things and working on docs (#202)
  [Bard] various changes and updates (#201)
  Adding Churn PHP as a tool in the repo (#200)
  Update symfony/phpunit-bridge requirement from ^6 to ^6 || ^7 (#192)
  [Mailer] New Component and Contract (#190)
  [Mailer] New Component and Contract (#189)
  House Keeping (#188)
  [HttpHandler] Component (#187)
  [Container] New Component (#182)
  [Cookie] New Component & Contract (#181)
  • Loading branch information
JoshuaEstes committed Jan 3, 2024
2 parents de5d6ed + 5ad14f5 commit 37a4c9e
Show file tree
Hide file tree
Showing 119 changed files with 3,635 additions and 111 deletions.
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,21 @@ docs/ @JoshuaEstes
# Each component/contract needs a Team
/src/SonsOfPHP/**/Cache @JoshuaEstes
/src/SonsOfPHP/**/Clock @JoshuaEstes
/src/SonsOfPHP/**/Container @JoshuaEstes
/src/SonsOfPHP/**/Cookie @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/**/HttpHandler @JoshuaEstes
/src/SonsOfPHP/**/HttpMessage @JoshuaEstes
/src/SonsOfPHP/**/Json @JoshuaEstes
/src/SonsOfPHP/**/Link @JoshuaEstes
/src/SonsOfPHP/**/Logger @JoshuaEstes
/src/SonsOfPHP/**/Mailer @JoshuaEstes
/src/SonsOfPHP/**/Money @JoshuaEstes
/src/SonsOfPHP/**/Pager @JoshuaEstes
/src/SonsOfPHP/**/Version @JoshuaEstes
16 changes: 16 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ Clock:
- docs/components/clock/*
- src/SonsOfPHP/**/Clock/*

Container:
- docs/components/container/*
- src/SonsOfPHP/**/Container/*

Cookie:
- docs/components/cookie/*
- src/SonsOfPHP/**/Cookie/*

Common:
- docs/components/common/*
- src/SonsOfPHP/**/Common/*
Expand Down Expand Up @@ -38,6 +46,10 @@ HttpFactory:
- docs/components/http-factory/*
- src/SonsOfPHP/**/HttpFactory/*

HttpHandler:
- docs/components/http-handler/*
- src/SonsOfPHP/**/HttpHandler/*

HttpMessage:
- docs/components/http-message/*
- src/SonsOfPHP/**/HttpMessage/*
Expand All @@ -54,6 +66,10 @@ Logger:
- docs/components/logger/*
- src/SonsOfPHP/**/Logger/*

Mailer:
- docs/components/mailer/*
- src/SonsOfPHP/**/Mailer/*

Money:
- docs/components/money/*
- src/SonsOfPHP/**/Money/*
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ composer.phar
packages.json
results.sarif
infection.log
.churn.cache
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ To get the diff between two versions, go to https://github.com/SonsOfPHP/sonsofp
* [PR #134](https://github.com/SonsOfPHP/sonsofphp/pull/134) [Pager] New Component
* [PR #170](https://github.com/SonsOfPHP/sonsofphp/pull/170) [Link] New Component (PSR-13)
* [PR #173](https://github.com/SonsOfPHP/sonsofphp/pull/173) [Money] Twig Bridge
* [PR #181](https://github.com/SonsOfPHP/sonsofphp/pull/181) [Cookie] New Component and Contract
* [PR #182](https://github.com/SonsOfPHP/sonsofphp/pull/182) [Container] New Component (PSR-11)
* [PR #187](https://github.com/SonsOfPHP/sonsofphp/pull/187) [HttpHandler] New Component (PSR-15) and Contract
* [PR #190](https://github.com/SonsOfPHP/sonsofphp/pull/190) [Mailer] New Component and Contract
* [PR #202](https://github.com/SonsOfPHP/sonsofphp/pull/202) [EventDispatcher] Added Stoppable Event Code

## [0.3.8]

Expand Down
46 changes: 42 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ PHP = php
PHP_CS_FIXER = tools/php-cs-fixer/vendor/bin/php-cs-fixer
PHPUNIT = tools/phpunit/vendor/bin/phpunit
PSALM = tools/psalm/vendor/bin/psalm
CHURN = tools/churn/vendor/bin/churn
PSALM_BASELINE_FILE = psalm-baseline.xml
BARD = src/SonsOfPHP/Bard/bin/bard

Expand Down Expand Up @@ -43,6 +44,7 @@ purge: # Purge vendor and lock files
rm -rf src/SonsOfPHP/Bundle/*/vendor/ src/SonsOfPHP/Bundle/*/composer.lock
rm -rf src/SonsOfPHP/Component/*/vendor/ src/SonsOfPHP/Component/*/composer.lock
rm -rf src/SonsOfPHP/Contract/*/vendor/ src/SonsOfPHP/Contract/*/composer.lock
rm -rf src/tools/*/vendor/ src/tools/*/composer.lock

test: phpunit ## Run PHPUnit Tests

Expand All @@ -52,18 +54,33 @@ test-cache: phpunit
test-clock: PHPUNIT_TESTSUITE=clock
test-clock: phpunit

test-container: PHPUNIT_TESTSUITE=container
test-container: phpunit

test-cookie: PHPUNIT_TESTSUITE=cookie
test-cookie: phpunit

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

test-event-dispatcher: PHPUNIT_TESTSUITE=event-dispatcher
test-event-dispatcher: phpunit

test-http-factory: PHPUNIT_TESTSUITE=http-factory
test-http-factory: phpunit

test-http-handler: PHPUNIT_TESTSUITE=http-handler
test-http-handler: phpunit

test-link: PHPUNIT_TESTSUITE=link
test-link: phpunit

test-logger: PHPUNIT_TESTSUITE=logger
test-logger: phpunit

test-mailer: PHPUNIT_TESTSUITE=mailer
test-mailer: phpunit

test-money: PHPUNIT_TESTSUITE=money
test-money: phpunit

Expand Down Expand Up @@ -105,11 +122,17 @@ coverage-cache: coverage
coverage-clock: PHPUNIT_TESTSUITE=clock
coverage-clock: coverage

coverage-container: PHPUNIT_TESTSUITE=container
coverage-container: coverage

coverage-cookie: PHPUNIT_TESTSUITE=cookie
coverage-cookie: coverage

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)
coverage-event-dispatcher: PHPUNIT_TESTSUITE=event-dispatcher
coverage-event-dispatcher: coverage

coverage-event-sourcing:
XDEBUG_MODE=coverage $(PHP) -dxdebug.mode=coverage $(PHPUNIT) --testsuite event-sourcing --coverage-html $(COVERAGE_DIR)
Expand All @@ -123,6 +146,9 @@ coverage-filesystem:
coverage-http-factory:
XDEBUG_MODE=coverage $(PHP) -dxdebug.mode=coverage $(PHPUNIT) --testsuite http-factory --coverage-html $(COVERAGE_DIR)

coverage-http-handler: PHPUNIT_TESTSUITE=http-handler
coverage-http-handler: coverage

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

Expand All @@ -135,6 +161,9 @@ coverage-link: coverage
coverage-logger: PHPUNIT_TESTSUITE=logger
coverage-logger: coverage

coverage-mailer: PHPUNIT_TESTSUITE=mailer
coverage-mailer: coverage

coverage-money: PHPUNIT_TESTSUITE=money
coverage-money: coverage

Expand Down Expand Up @@ -178,9 +207,18 @@ infection:
-dapc.enable_cli=1 \
tools/infection/vendor/bin/infection --debug -vvv --show-mutations

tools-install: psalm-install php-cs-fixer-install phpunit-install
churn: ## Run Churn PHP
$(CHURN)

churn-install:
$(COMPOSER) install --working-dir=tools/churn --no-interaction --prefer-dist --optimize-autoloader

churn-upgrade:
$(COMPOSER) upgrade --working-dir=tools/churn --no-interaction --prefer-dist --optimize-autoloader --with-all-dependencies

tools-install: psalm-install php-cs-fixer-install phpunit-install churn-install

tools-upgrade: psalm-upgrade php-cs-fixer-upgrade phpunit-upgrade
tools-upgrade: psalm-upgrade php-cs-fixer-upgrade phpunit-upgrade churn-upgrade

## Documentation
docs-install: ## Install deps for building docs
Expand Down
28 changes: 28 additions & 0 deletions bard.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@
"path": "src/SonsOfPHP/Bard",
"repository": "[email protected]:SonsOfPHP/bard.git"
},
{
"path": "src/SonsOfPHP/Contract/Mailer",
"repository": "[email protected]:SonsOfPHP/mailer-contract.git"
},
{
"path": "src/SonsOfPHP/Component/Mailer",
"repository": "[email protected]:SonsOfPHP/mailer.git"
},
{
"path": "src/SonsOfPHP/Component/Cache",
"repository": "[email protected]:SonsOfPHP/cache.git"
Expand All @@ -13,6 +21,14 @@
"path": "src/SonsOfPHP/Component/Clock",
"repository": "[email protected]:SonsOfPHP/clock.git"
},
{
"path": "src/SonsOfPHP/Component/Container",
"repository": "[email protected]:SonsOfPHP/container.git"
},
{
"path": "src/SonsOfPHP/Component/Cookie",
"repository": "[email protected]:SonsOfPHP/cookie.git"
},
{
"path": "src/SonsOfPHP/Component/Cqrs",
"repository": "[email protected]:SonsOfPHP/cqrs.git"
Expand Down Expand Up @@ -57,6 +73,14 @@
"path": "src/SonsOfPHP/Component/HttpFactory",
"repository": "[email protected]:SonsOfPHP/http-factory.git"
},
{
"path": "src/SonsOfPHP/Component/HttpHandler",
"repository": "[email protected]:SonsOfPHP/http-handler.git"
},
{
"path": "src/SonsOfPHP/Contract/HttpHandler",
"repository": "[email protected]:SonsOfPHP/http-handler-contract.git"
},
{
"path": "src/SonsOfPHP/Component/HttpMessage",
"repository": "[email protected]:SonsOfPHP/http-message.git"
Expand Down Expand Up @@ -101,6 +125,10 @@
"path": "src/SonsOfPHP/Contract/Common",
"repository": "[email protected]:SonsOfPHP/common-contract.git"
},
{
"path": "src/SonsOfPHP/Contract/Cookie",
"repository": "[email protected]:SonsOfPHP/cookie-contract.git"
},
{
"path": "src/SonsOfPHP/Contract/Cqrs",
"repository": "[email protected]:SonsOfPHP/cqrs-contract.git"
Expand Down
59 changes: 59 additions & 0 deletions churn.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# The maximum number of files to display in the results table.
# Default: 10
filesToShow: 10

# The minimum score a file need to display in the results table.
# Disabled if null.
# Default: 0.1
minScoreToShow: 0

# The command returns an 1 exit code if the highest score is greater than the threshold.
# Disabled if null.
# Default: null
maxScoreThreshold: 0.9

# The number of parallel jobs to use when processing files.
# Default: 10
parallelJobs: 10

# How far back in the VCS history to count the number of commits to a file
# Can be a human readable date like 'One week ago' or a date like '2017-07-12'
# Default: '10 Years ago'
commitsSince: One year ago

# Files to ignore when processing. The full path to the file relative to the root of your project is required.
# Also supports regular expressions.
# Default: All PHP files in the path provided to churn-php are processed.
#filesToIgnore:
# - src/Commands/ChurnCommand.php
# - src/Results/ResultsParser.php
# - src/Foo/Ba*

# File extensions to use when processing.
# Default: php
fileExtensions:
- php

# This list is used only if there is no argument when running churn.
# Default: <empty>
directoriesToScan:
- src/

# List of user-defined hooks.
# They can be referenced by their full qualified class name if churn has access to the autoloader.
# Otherwise the file path can be used as well.
# See below the section about hooks for more details.
# Default: <empty>
#hooks:
# - Namespace\MyHook
# - path/to/my-hook.php

# The version control system used for your project.
# Accepted values: fossil, git, mercurial, subversion, none
# Default: git
vcs: git

# The path of the cache file. It doesn't need to exist before running churn.
# Disabled if null.
# Default: null
cachePath: .churn.cache
Loading

0 comments on commit 37a4c9e

Please sign in to comment.