You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -54,31 +54,67 @@ This repository provides a modified file structure for Laravel that follows DDD
54
54
55
55
This starter template includes several added, changed, and removed features:
56
56
57
+
### → Framework Modifications
58
+
57
59
***Added:**
58
60
* Strict types declaration in all PHP files
61
+
* Application dockerization using docker-compose and Makefile — use `make help` to view available commands
62
+
*[spatie/laravel-route-attributes](https://github.com/spatie/laravel-route-attributes) package for route definition using PHP8 style attributes
63
+
64
+
***Changed:**
65
+
* Marked default Laravel classes as `final`
66
+
* Modified file structure to meet DDD principles (as close as possible)
67
+
* Changed config folder files to use default PHP multi-line comment style
68
+
69
+
***Removed:**
70
+
* Dependencies like Laravel Sanctum, Laravel Pint, and Laravel Sail
71
+
* Broadcasting service provider and its routes. It can be added back if required for the project
72
+
* Console routes in favor of Command classes
73
+
* Sanctum migration files
74
+
75
+
### → Development Tools
76
+
77
+
***Added:**
59
78
* Style checker package for custom rule-sets to php-cs-fixer — [wayofdev/php-cs-fixer-config](https://github.com/wayofdev/php-cs-fixer-config)
79
+
*[Phive](https://github.com/phar-io/phive) support for managing PHP tools
80
+
*[ergebnis/composer-normalize](https://github.com/ergebnis/composer-normalize) composer plugin for normalizing composer.json file
81
+
*[maglnet/ComposerRequireChecker](https://github.com/maglnet/ComposerRequireChecker) to check whether a specific composer package uses imported symbols that aren't part of its direct composer dependencies
82
+
* Application dockerization using docker-compose and Makefile — use `make help` to view available commands
83
+
*[docker-php-dev](https://github.com/wayofdev/docker-php-dev) as PHP development environment with XDebug support out of the box
84
+
85
+
### → Testing
86
+
87
+
***Added:**
88
+
* Configured [PHPUnit](https://phpunit.de/index.html) for unit testing.
89
+
* Integrated [Pest PHP](https://pestphp.com) for elegant console support and architecture testing.
90
+
*[Infection](https://github.com/infection/infection) for mutation testing to ensure quality.
91
+
* Mutation test reports are uploaded [Stryker Mutator Dashboard](https://dashboard.stryker-mutator.io).
92
+
93
+
### → Static Analysis
94
+
95
+
***Added:**
60
96
* Static analysis tool — [PHPStan](https://phpstan.org) and it's extensions:
61
97
*[phpstan/extension-installer](https://github.com/phpstan/extension-installer) — automatic installation of PHPStan extensions
62
98
*[phpstan/phpstan-deprecation-rules](https://github.com/phpstan/phpstan-deprecation-rules) — rules for detecting usage of deprecated classes, methods, properties, constants and traits.
63
-
*[nunomaduro/larastan](https://github.com/nunomaduro/larastan) — PHPStan integration with Laravel
64
-
*[Pest](https://pestphp.com) testing framework
65
-
* Github action workflows for:
99
+
*[larastan/larastan](https://github.com/larastan/larastan) for Laravel-specific static analysis.
100
+
*[Psalm](https://github.com/vimeo/psalm) static analysis tool and it's extensions:
101
+
*[psalm/plugin-laravel](https://github.com/psalm/psalm-plugin-laravel) — Psalm plugin for Laravel
102
+
*[psalm/plugin-phpunit](https://github.com/psalm/psalm-plugin-phpunit) — Psalm plugin for PHPUnit
103
+
*[PHP Rector](https://github.com/rectorphp/rector) for automated code upgrades and refactoring, maintaining modern code standards.
104
+
105
+
### → Continuous Integration
106
+
107
+
***Added:**
108
+
* GitHub action workflows for:
66
109
* Continuous integration which includes coding standards checks, unit testing and static analysis
67
110
* Automatic pull-request labeling
68
-
*[Deployer](https://deployer.org) for automatic deployments to staging and production servers with support of [Github Environments](https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment)
69
-
*[ergebnis/composer-normalize](https://github.com/ergebnis/composer-normalize) composer plugin for normalizing composer.json file
70
-
*[roave/securityadvisories](https://github.com/Roave/SecurityAdvisories) package to ensure that application doesn't have installed dependencies with known security vulnerabilities.
71
-
* Application dockerization using docker-compose and Makefile — use `make help` to view available commands
72
111
* Git pre-commit hooks using [pre-commit](https://pre-commit.com) package
73
-
***Changed:**
74
-
* Marked default Laravel classes as `final`
75
-
* Modified file structure to meet DDD principles
76
-
* Changed config folder files to use default PHP multi-line comment style
77
-
***Removed:**
78
-
* Dependencies like Laravel Sanctum, Laravel Pint, and Laravel Sail.
79
-
* Broadcasting service provider and it's routes. It can be added back, if it will be required for project
80
-
* Console routes in favor of Command classes.
81
-
* Sanctum migration files
112
+
113
+
### → Deployments
114
+
115
+
***Added:**
116
+
*[Deployer](https://deployer.org) for automatic deployments to staging and production servers with support of [GitHub Environments](https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment)
117
+
* For more information see [Deployments](#-deployment-to-staging-and-production) section
82
118
83
119
<br>
84
120
@@ -89,14 +125,14 @@ To use this repository, you need to meet the following requirements:
89
125
***macOS** Monterey+ or **Linux**
90
126
* Docker 20.10 or newer
91
127
*[How To Install and Use Docker on Ubuntu 22.04](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-22-04)
92
-
* Installed **dnsmasq** service, running in the system. You can use [ansible-role-dnsmasq](https://github.com/wayofdev/ansible-role-dnsmasq) to install and configure this service.
93
128
***Cloned, configured and running**[docker-shared-services](https://github.com/wayofdev/docker-shared-services) to support system-wide DNS, routing, and TLS support via Traefik.
94
129
95
130
<br>
96
131
97
132
## 💿 Installation
98
133
99
-
> Warning: You should configure, set up, and run the [docker-shared-services](https://github.com/wayofdev/docker-shared-services) repository to ensure system-wide TLS and DNS support.
134
+
> [!Note]
135
+
> You should configure, set up, and run the [docker-shared-services](https://github.com/wayofdev/docker-shared-services) repository to ensure system-wide TLS and DNS support.
100
136
101
137
1.**Clone** repository:
102
138
@@ -144,9 +180,35 @@ To use this repository, you need to meet the following requirements:
144
180
145
181
<br>
146
182
147
-
## 🤝 License
183
+
## 🤖 Deployment to Staging and Production
184
+
185
+
This repository utilizes GitHub Actions for continuous deployment to both staging and production servers. Below is a description.
186
+
187
+
### → Deployment Flow
188
+
189
+
#### Deployment to Staging
190
+
191
+
1.**Push to `develop` branch**: Initiates the deployment process to the staging server. Merge PR against `develop` branch, to trigger `deploy-staging.yml`
192
+
2.**GitHub Actions**: Executes the `deploy-staging.yml` workflow.
193
+
3.**Staging Server**: Receives deployment instructions and acknowledges the deployment.
1.**Merge of `develop` branch into `master`**: Triggers the deployment process to the production server on push event.
198
+
2.**GitHub Actions**: Runs the `create-release.yml` workflow.
199
+
3.**Release Event**: `deploy-release.yml` waits for the event `release: released`.
200
+
4.**GitHub Actions**: Initiates the `deploy-release.yml` workflow.
201
+
5.**Production Server**: Receives deployment instructions and acknowledges the deployment.
202
+
203
+
#### Conditional Deployment Status
204
+
205
+
***Deployment Successful**: Both staging and production servers send a success message back to GitHub Actions. Additionally, a success message is sent to the Slack server.
206
+
207
+
***Deployment Failed**: If an error occurs, a failure message is sent back to GitHub Actions. Additionally, a failure message is sent to the Slack server.
208
+
209
+
#### Diagram
210
+
211
+

150
212
151
213
<br>
152
214
@@ -155,24 +217,49 @@ To use this repository, you need to meet the following requirements:
*[Laravel Skeleton](https://romanzipp.github.io/Laravel-Skeleton/) by [romanzipp](https://github.com/romanzipp)
159
220
160
221
<br>
161
222
162
-
## 🙆🏼♂️ Author Information
223
+
## 🔒 Security Policy
163
224
164
-
This repository was created in **2022** by [lotyp / wayofdev](https://github.com/wayofdev).
225
+
This project has a [security policy](.github/SECURITY.md).
165
226
166
227
<br>
167
228
168
229
## 🙌 Want to Contribute?
169
230
170
-
Thank you for considering contributing to the wayofdev community!
171
-
We are open to all kinds of contributions. If you want to:
231
+
Thank you for considering contributing to the wayofdev community! We are open to all kinds of contributions. If you want to:
172
232
173
-
* 🤔 Suggest a feature
174
-
* 🐛 Report an issue
175
-
* 📖 Improve documentation
233
+
* 🤔 [Suggest a feature](https://github.com/wayofdev/laravel-starter-tpl/issues/new?assignees=&labels=type%3A+enhancement&projects=&template=2-feature-request.yml&title=%5BFeature%5D%3A+)
234
+
* 🐛 [Report an issue](https://github.com/wayofdev/laravel-starter-tpl/issues/new?assignees=&labels=type%3A+documentation%2Ctype%3A+maintenance&projects=&template=1-bug-report.yml&title=%5BBug%5D%3A+)
***Twitter:** Follow our organization [@wayofdev](https://twitter.com/intent/follow?screen_name=wayofdev) and the author [@wlotyp](https://twitter.com/intent/follow?screen_name=wlotyp).
257
+
***Discord:** Join our community on [Discord](https://discord.gg/CE3TcCC5vr).
0 commit comments