Skip to content

Commit 214f611

Browse files
Initial Commit
0 parents  commit 214f611

20 files changed

+461
-0
lines changed

.gitattributes

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Path-based git attributes
2+
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
3+
4+
# Ignore all test and documentation with "export-ignore".
5+
/.github export-ignore
6+
/.gitattributes export-ignore
7+
/.gitignore export-ignore
8+
/phpunit.xml export-ignore
9+
/art export-ignore
10+
/docs export-ignore
11+
/tests export-ignore
12+
/workbench export-ignore
13+
/.editorconfig export-ignore
14+
/.php_cs.dist.php export-ignore
15+
/psalm.xml export-ignore
16+
/psalm.xml.dist export-ignore
17+
/testbench.yaml export-ignore
18+
/phpstan.neon.dist export-ignore
19+
/phpstan-baseline.neon export-ignore
20+
/UPGRADING.md export-ignore
21+
/CONTRIBUTING.md export-ignore
22+
/README.md export-ignore
23+
/CHANGELOG.md export-ignore
24+
/pint.json export-ignore
25+
/rector.php export-ignore

.github/FUNDING.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
custom:
2+
- https://paypal.me/chikondikamwendo

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!--
2+
- Fill in the form below correctly. This will help the Codelabmw team to understand the PR and also work on it.
3+
-->
4+
5+
### What:
6+
7+
- [ ] Bug Fix
8+
- [ ] New Feature
9+
10+
### Description:
11+
12+
<!-- describe what your PR is solving -->
13+
14+
### Related:
15+
16+
<!-- link to the issue(s) your PR is solving. If it doesn't exist, remove the "Related" section. -->

.github/workflows/lint.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: linter
2+
3+
on:
4+
push:
5+
paths:
6+
- '**.php'
7+
8+
branches:
9+
- master
10+
11+
pull_request:
12+
paths:
13+
- '**.php'
14+
branches:
15+
- master
16+
17+
permissions:
18+
contents: write
19+
20+
jobs:
21+
quality:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- name: Setup PHP
27+
uses: shivammathur/setup-php@v2
28+
with:
29+
php-version: '8.3'
30+
31+
- name: Install Dependencies
32+
run: |
33+
composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
34+
35+
- name: Run Pint
36+
run: composer lint
37+
38+
- name: Commit Changes
39+
uses: stefanzweifel/git-auto-commit-action@v5
40+
with:
41+
commit_message: Fix code style
42+
commit_options: '--no-verify'

.github/workflows/tests.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: tests
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
pull_request:
9+
branches:
10+
- master
11+
12+
jobs:
13+
test:
14+
runs-on: ${{ matrix.os }}
15+
timeout-minutes: 5
16+
strategy:
17+
fail-fast: true
18+
matrix:
19+
os: [ubuntu-latest, windows-latest, macos-latest]
20+
php: [8.3]
21+
stability: [prefer-lowest, prefer-stable]
22+
include:
23+
- php: 8.3
24+
stability: prefer-stable
25+
26+
name: P${{ matrix.php }} - ${{ matrix.stability }} - ${{ matrix.os }}
27+
28+
steps:
29+
- name: Checkout code
30+
uses: actions/checkout@v4
31+
32+
- name: Setup PHP
33+
uses: shivammathur/setup-php@v2
34+
with:
35+
php-version: ${{ matrix.php }}
36+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
37+
coverage: none
38+
39+
- name: Install dependencies
40+
run: |
41+
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
42+
43+
- name: List Installed Dependencies
44+
run: composer show -D
45+
46+
- name: Type Tests
47+
run: composer test:types
48+
49+
- name: Code Quality Tests
50+
run: composer test:refactor
51+
52+
- name: Unit Tests
53+
run: composer test:unit
54+

.gitignore

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Build artifacts
2+
/build
3+
4+
# Package dependencies
5+
/vendor
6+
/composer.lock
7+
8+
# Testing
9+
/.phpunit.cache
10+
.phpactor.json
11+
.phpunit.result.cache
12+
13+
# Logs
14+
npm-debug.log
15+
yarn-error.log
16+
17+
# Secrets
18+
/auth.json
19+
20+
# IDE
21+
/.fleet
22+
/.idea
23+
/.nova
24+
/.vscode
25+
/.zed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](http://keepachangelog.com/)
6+
and this project adheres to [Semantic Versioning](http://semver.org/).

CONTRIBUTING.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# CONTRIBUTING
2+
3+
Contributions are welcome, and are accepted via pull requests.
4+
Please review these guidelines before submitting any pull requests.
5+
6+
## Process
7+
8+
1. Fork the project
9+
1. Create a new branch
10+
1. Code, test, commit and push
11+
1. Open a pull request detailing your changes. Make sure to follow the [template](.github/PULL_REQUEST_TEMPLATE.md)
12+
13+
## Guidelines
14+
15+
* Please ensure the coding style running `composer lint`.
16+
* Send a coherent commit history, making sure each individual commit in your pull request is meaningful.
17+
* You may need to [rebase](https://git-scm.com/book/en/v2/Git-Branching-Rebasing) to avoid merge conflicts.
18+
* Please remember that we follow [SemVer](http://semver.org/).
19+
20+
## Setup
21+
22+
Clone your fork, then install the dev dependencies:
23+
24+
```bash
25+
composer install
26+
```
27+
28+
## Lint
29+
30+
Lint your code:
31+
32+
```bash
33+
composer lint
34+
```
35+
36+
## Tests
37+
38+
Run all tests:
39+
40+
```bash
41+
composer test
42+
```
43+
44+
Check types:
45+
46+
```bash
47+
composer test:types
48+
```
49+
50+
Unit tests:
51+
52+
```bash
53+
composer test:unit
54+
```

License.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) Chikondi Kamwendo <chikondikamwendo@yahoo.com>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<p align="center">
2+
<img src="art/banner.png" width="800" alt="Banner">
3+
</p>
4+
5+
---
6+
7+
Hello World, this is a PHP package skeleton with modern tooling for testing and modern code quality included.
8+
9+
## Changelog
10+
11+
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
12+
13+
## Contributing
14+
15+
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
16+
17+
## License
18+
19+
This package is an open-sourced software licensed under the **[MIT License](LICENSE.md)**

0 commit comments

Comments
 (0)