Skip to content

Commit e1bf112

Browse files
committed
Initial commit
Signed-off-by: alexmerlin <[email protected]>
0 parents  commit e1bf112

File tree

153 files changed

+23677
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

153 files changed

+23677
-0
lines changed

.github/workflows/codecov.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
on:
2+
- push
3+
4+
name: Run Codecov checks
5+
6+
jobs:
7+
code-coverage:
8+
name: Code Coverage
9+
10+
runs-on: ${{ matrix.os }}
11+
12+
strategy:
13+
matrix:
14+
os:
15+
- ubuntu-latest
16+
17+
php:
18+
- "8.1"
19+
- "8.2"
20+
- "8.3"
21+
- "8.4"
22+
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v3
26+
27+
- name: Install PHP
28+
uses: shivammathur/setup-php@v2
29+
with:
30+
php-version: "${{ matrix.php }}"
31+
coverage: pcov
32+
ini-values: assert.exception=1, zend.assertions=1, error_reporting=-1, log_errors_max_len=0, display_errors=On
33+
tools: composer:v2, cs2pr
34+
35+
- name: Determine composer cache directory
36+
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
37+
38+
- name: Cache dependencies installed with composer
39+
uses: actions/cache@v3
40+
with:
41+
path: ${{ env.COMPOSER_CACHE_DIR }}
42+
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
43+
restore-keys: |
44+
php${{ matrix.php }}-composer-
45+
- name: Install dependencies with composer
46+
run: composer install --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
47+
48+
- name: Collect code coverage with PHPUnit
49+
run: vendor/bin/phpunit --colors=always --coverage-clover clover.xml
50+
51+
- name: Send code coverage report to Codecov.io
52+
uses: codecov/codecov-action@v3
53+
with:
54+
token: ${{ secrets.CODECOV_TOKEN }}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: "Continuous Integration"
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
tags:
8+
9+
jobs:
10+
ci:
11+
uses: laminas/workflow-continuous-integration/.github/workflows/[email protected]

.github/workflows/docs-build.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: docs-build
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
8+
jobs:
9+
build-deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Build Docs
13+
uses: dotkernel/documentation-theme/github-actions/docs@main
14+
env:
15+
DEPLOY_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
on:
2+
- push
3+
4+
name: Run PHPStan checks
5+
6+
jobs:
7+
mutation:
8+
name: PHPStan ${{ matrix.php }}-${{ matrix.os }}
9+
10+
runs-on: ${{ matrix.os }}
11+
12+
strategy:
13+
matrix:
14+
os:
15+
- ubuntu-latest
16+
17+
php:
18+
- "8.1"
19+
- "8.2"
20+
- "8.3"
21+
- "8.4"
22+
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
27+
- name: Install PHP
28+
uses: shivammathur/setup-php@v2
29+
with:
30+
php-version: "${{ matrix.php }}"
31+
coverage: pcov
32+
ini-values: assert.exception=1, zend.assertions=1, error_reporting=-1, log_errors_max_len=0, display_errors=On
33+
tools: composer:v2, cs2pr
34+
35+
- name: Determine composer cache directory
36+
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
37+
38+
- name: Cache dependencies installed with composer
39+
uses: actions/cache@v4
40+
with:
41+
path: ${{ env.COMPOSER_CACHE_DIR }}
42+
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
43+
restore-keys: |
44+
php${{ matrix.php }}-composer-
45+
46+
- name: Install dependencies with composer
47+
run: composer install --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
48+
49+
- name: Run static analysis with PHPStan
50+
run: vendor/bin/phpstan analyse

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.idea
2+
/vendor/
3+
composer.lock
4+
.phpunit.result.cache
5+
.phpcs-cache

.laminas-ci.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"backwardCompatibilityCheck": true
3+
}

CHANGELOG.md

Whitespace-only changes.

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 DotKernel
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 all
13+
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 THE
21+
SOFTWARE.

OSSMETADATA

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
osslifecycle=active

README.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# dot-maker
2+
3+
Programmatically generate Dotkernel project files and directories.
4+
5+
## Documentation
6+
7+
Documentation is available at: https://docs.dotkernel.org/dot-maker/.
8+
9+
## Badges
10+
11+
![OSS Lifecycle](https://img.shields.io/osslifecycle/dotkernel/dot-maker)
12+
![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-maker/1.0)
13+
14+
[![GitHub issues](https://img.shields.io/github/issues/dotkernel/dot-maker)](https://github.com/dotkernel/dot-maker/issues)
15+
[![GitHub forks](https://img.shields.io/github/forks/dotkernel/dot-maker)](https://github.com/dotkernel/dot-maker/network)
16+
[![GitHub stars](https://img.shields.io/github/stars/dotkernel/dot-maker)](https://github.com/dotkernel/dot-maker/stargazers)
17+
[![GitHub license](https://img.shields.io/github/license/dotkernel/dot-maker)](https://github.com/dotkernel/dot-maker/blob/1.0/LICENSE.md)
18+
19+
[![Build Static](https://github.com/dotkernel/dot-maker/actions/workflows/continuous-integration.yml/badge.svg?branch=1.0)](https://github.com/dotkernel/dot-maker/actions/workflows/continuous-integration.yml)
20+
[![codecov](https://codecov.io/gh/dotkernel/dot-maker/graph/badge.svg?token=KT9UA402B4)](https://codecov.io/gh/dotkernel/dot-maker)
21+
[![PHPStan](https://github.com/dotkernel/dot-maker/actions/workflows/static-analysis.yml/badge.svg?branch=1.0)](https://github.com/dotkernel/dot-maker/actions/workflows/static-analysis.yml)
22+
23+
## Installation
24+
25+
Run the following command in your terminal:
26+
27+
```shell
28+
composer require-dev dotkernel/dot-maker
29+
```
30+
31+
## Setup
32+
33+
Once installed, `dot-maker` is ready for usage, no need for extra configurations.
34+
35+
### (Optional) Add dot-maker to composer.json
36+
37+
Open your project's `composer.json` and locate the `scripts` section.
38+
If it does not exist, create it at the document's root level.
39+
40+
Register a new script by appending `"alias": "dot-maker"` to the `scripts` section, where **alias** can be any string you want; like, for example, **make**.
41+
42+
```json
43+
{
44+
"scripts": {
45+
"make": "dot-maker"
46+
}
47+
}
48+
```
49+
50+
## Usage
51+
52+
Invoke `dot-maker` by executing:
53+
54+
- the bin file in your vendor directory `./vendor/bin/dot-maker`
55+
- the (optional) Composer script created during [Setup](#setup): `composer make`
56+
57+
Follow the instructions on the screen to create a specific Dotkernel project component.

0 commit comments

Comments
 (0)