Skip to content

Commit

Permalink
[Mailer] New Component and Contract (#189)
Browse files Browse the repository at this point in the history
## Description



## Checklist
- [ ] Updated CHANGELOG files
- [ ] Updated Documentation
- [ ] Unit Tests Created
- [ ] php-cs-fixer
  • Loading branch information
JoshuaEstes authored Dec 7, 2023
1 parent 13da628 commit e218013
Show file tree
Hide file tree
Showing 17 changed files with 232 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ docs/ @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
4 changes: 4 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,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
8 changes: 8 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 Down
15 changes: 10 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@
"psr/container-implementation": "^1.0 || ^2.0",
"psr/http-server-handler-implementation": "^1.0",
"psr/http-server-middleware-implementation": "^1.0",
"sonsofphp/http-handler-implementation": "0.3.x-dev"
"sonsofphp/http-handler-implementation": "0.3.x-dev",
"sonsofphp/mailer-implementation": "0.3.x-dev"
},
"require": {
"php": ">=8.1",
Expand Down Expand Up @@ -123,11 +124,15 @@
"sonsofphp/cookie-contract": "self.version",
"sonsofphp/container": "self.version",
"sonsofphp/http-handler": "self.version",
"sonsofphp/http-handler-contract": "self.version"
"sonsofphp/http-handler-contract": "self.version",
"sonsofphp/mailer-contract": "self.version",
"sonsofphp/mailer": "self.version"
},
"autoload": {
"psr-4": {
"SonsOfPHP\\Bard\\": "src/SonsOfPHP/Bard/src",
"SonsOfPHP\\Contract\\Mailer\\": "src/SonsOfPHP/Contract/Mailer",
"SonsOfPHP\\Component\\Mailer\\": "src/SonsOfPHP/Component/Mailer",
"SonsOfPHP\\Component\\Cache\\": "src/SonsOfPHP/Component/Cache",
"SonsOfPHP\\Component\\Clock\\": "src/SonsOfPHP/Component/Clock",
"SonsOfPHP\\Component\\Container\\": "src/SonsOfPHP/Component/Container",
Expand Down Expand Up @@ -168,6 +173,7 @@
},
"exclude-from-classmap": [
"src/SonsOfPHP/Bard/Tests",
"src/SonsOfPHP/Component/Mailer/Tests",
"src/SonsOfPHP/Component/Cache/Tests",
"src/SonsOfPHP/Component/Clock/Tests",
"src/SonsOfPHP/Component/Container/Tests",
Expand Down Expand Up @@ -209,8 +215,7 @@
"symfony/error-handler": "^6",
"symfony/messenger": "^5 || ^6",
"phpunit/phpunit": "^10.4",
"psr/simple-cache": "^1.0 || ^2.0 || ^3.0",
"sonsofphp/http-message": "0.3.x-dev"
"psr/simple-cache": "^1.0 || ^2.0 || ^3.0"
},
"autoload-dev": {
"psr-4": {
Expand All @@ -219,4 +224,4 @@
"SonsOfPHP\\Bridge\\Symfony\\Cqrs\\Tests\\": "src/SonsOfPHP/Bridge/Symfony/Cqrs/Tests"
}
}
}
}
11 changes: 11 additions & 0 deletions docs/components/mailer/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: Mailer
---

Simple PHP Mailer

## Installation

```shell
composer require sonsofphp/mailer
```
9 changes: 9 additions & 0 deletions docs/contracts/mailer/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: Mailer Contract
---

## Installation

```shell
composer require sonsofphp/mailer-contract
```
2 changes: 2 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ nav:
- JSON: components/json/index.md
- Link: components/link/index.md
- Logger: components/logger/index.md
- Mailer: components/mailer/index.md
- Money:
- Overview: components/money/index.md
- Currency Providers: components/money/currency-providers.md
Expand All @@ -123,4 +124,5 @@ nav:
- Common: contracts/common/index.md
- Cookie: contracts/cookie/index.md
- Cqrs: contracts/cqrs/index.md
- Mailer: contracts/mailer/index.md
- Pager: contracts/pager/index.md
4 changes: 4 additions & 0 deletions src/SonsOfPHP/Component/Mailer/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/Tests export-ignore
/phpunit.xml.dist export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
3 changes: 3 additions & 0 deletions src/SonsOfPHP/Component/Mailer/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
composer.lock
phpunit.xml
vendor/
19 changes: 19 additions & 0 deletions src/SonsOfPHP/Component/Mailer/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright 2022 to Present Joshua Estes

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
16 changes: 16 additions & 0 deletions src/SonsOfPHP/Component/Mailer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Sons of PHP - Mailer
====================

## Learn More

* [Documentation][docs]
* [Contributing][contributing]
* [Report Issues][issues] and [Submit Pull Requests][pull-requests] in the [Mother Repository][mother-repo]
* Get Help & Support using [Discussions][discussions]

[discussions]: https://github.com/orgs/SonsOfPHP/discussions
[mother-repo]: https://github.com/SonsOfPHP/sonsofphp
[contributing]: https://docs.sonsofphp.com/contributing/
[docs]: https://docs.sonsofphp.com/components/mailer/
[issues]: https://github.com/SonsOfPHP/sonsofphp/issues?q=is%3Aopen+is%3Aissue+label%3AMailer
[pull-requests]: https://github.com/SonsOfPHP/sonsofphp/pulls?q=is%3Aopen+is%3Apr+label%3AMailer
54 changes: 54 additions & 0 deletions src/SonsOfPHP/Component/Mailer/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"name": "sonsofphp/mailer",
"type": "library",
"description": "",
"keywords": [
"mailer"
],
"homepage": "https://github.com/SonsOfPHP/mailer",
"license": "MIT",
"authors": [
{
"name": "Joshua Estes",
"email": "[email protected]"
}
],
"support": {
"issues": "https://github.com/SonsOfPHP/sonsofphp/issues",
"forum": "https://github.com/orgs/SonsOfPHP/discussions",
"docs": "https://docs.sonsofphp.com"
},
"autoload": {
"psr-4": {
"SonsOfPHP\\Component\\Mailer\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": ">=8.1",
"sonsofphp/mailer-contract": "0.3.x-dev"
},
"provide": {
"sonsofphp/mailer-implementation": "0.3.x-dev"
},
"extra": {
"sort-packages": true,
"branch-alias": {
"dev-main": "0.3.x-dev"
}
},
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/JoshuaEstes"
},
{
"type": "tidelift",
"url": "https://tidelift.com/subscription/pkg/packagist-sonsofphp-sonsofphp"
}
]
}
2 changes: 2 additions & 0 deletions src/SonsOfPHP/Contract/Mailer/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/.gitattributes export-ignore
/.gitignore export-ignore
2 changes: 2 additions & 0 deletions src/SonsOfPHP/Contract/Mailer/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
composer.lock
vendor/
19 changes: 19 additions & 0 deletions src/SonsOfPHP/Contract/Mailer/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright 2022 to Present Joshua Estes

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
16 changes: 16 additions & 0 deletions src/SonsOfPHP/Contract/Mailer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Sons of PHP - Mailer Contract
=============================

## Learn More

* [Documentation][docs]
* [Contributing][contributing]
* [Report Issues][issues] and [Submit Pull Requests][pull-requests] in the [Mother Repository][mother-repo]
* Get Help & Support using [Discussions][discussions]

[discussions]: https://github.com/orgs/SonsOfPHP/discussions
[mother-repo]: https://github.com/SonsOfPHP/sonsofphp
[contributing]: https://docs.sonsofphp.com/contributing/
[docs]: https://docs.sonsofphp.com/contracts/mailer/
[issues]: https://github.com/SonsOfPHP/sonsofphp/issues?q=is%3Aopen+is%3Aissue+label%3AMailer
[pull-requests]: https://github.com/SonsOfPHP/sonsofphp/pulls?q=is%3Aopen+is%3Apr+label%3AMailer
52 changes: 52 additions & 0 deletions src/SonsOfPHP/Contract/Mailer/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"name": "sonsofphp/mailer-contract",
"type": "library",
"description": "",
"keywords": [
"abstractions",
"contracts",
"decoupling",
"interfaces",
"interoperability",
"standards"
],
"homepage": "https://github.com/SonsOfPHP/mailer-contract",
"license": "MIT",
"authors": [
{
"name": "Joshua Estes",
"email": "[email protected]"
}
],
"support": {
"issues": "https://github.com/SonsOfPHP/sonsofphp/issues",
"forum": "https://github.com/orgs/SonsOfPHP/discussions",
"docs": "https://docs.sonsofphp.com"
},
"autoload": {
"psr-4": {
"SonsOfPHP\\Contract\\Mailer\\": ""
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": ">=8.1"
},
"extra": {
"sort-packages": true,
"branch-alias": {
"dev-main": "0.3.x-dev"
}
},
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/JoshuaEstes"
},
{
"type": "tidelift",
"url": "https://tidelift.com/subscription/pkg/packagist-sonsofphp-sonsofphp"
}
]
}

0 comments on commit e218013

Please sign in to comment.