Skip to content

Commit bfc36bc

Browse files
authored
Initial commit
0 parents  commit bfc36bc

21 files changed

+9083
-0
lines changed

.editorconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
indent_style = space
8+
indent_size = 4
9+
trim_trailing_whitespace = true
10+
11+
[*.json]
12+
insert_final_newline = ignore
13+
14+
[*.md]
15+
trim_trailing_whitespace = false
16+
17+
[*.{yml,yaml}]
18+
indent_size = 2

.gitattributes

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
* text=auto
2+
3+
*.css diff=css
4+
*.html diff=html
5+
*.md diff=markdown
6+
*.php diff=php
7+
*.json linguist-language=JSON-with-Comments
8+
*.neon linguist-language=YAML
9+
10+
*.phar binary
11+
*.gif binary
12+
*.ico binary
13+
*.png binary
14+
*.jpg binary
15+
*.jpeg binary
16+
17+
/src/Program.php export-ignore
18+
/tests/Feat/ExampleTest.php export-ignore
19+
/tests/Unit/ProgramTest.php export-ignore
20+
# CHANGELOG.md export-ignore
21+
# .editorconfig export-ignore
22+
# .gitattributes export-ignore
23+
# .gitignore export-ignore
24+
# /.github export-ignore
25+
# /tests export-ignore

.github/workflows/ci.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: CI
2+
3+
permissions:
4+
contents: read
5+
6+
on: ['push', 'pull_request']
7+
8+
jobs:
9+
ci:
10+
runs-on: ${{ matrix.os }}
11+
continue-on-error: ${{ matrix.experimental }}
12+
strategy:
13+
fail-fast: true
14+
matrix:
15+
os: [ubuntu-latest]
16+
php: [8.1, 8.2]
17+
dependencies: [lowest, highest]
18+
experimental: [false]
19+
name: 👷 CI PHP-${{ matrix.php }} ${{ matrix.dependencies }} on ${{ matrix.os }}
20+
21+
steps:
22+
- name: 🚚 Get latest code
23+
uses: actions/checkout@v4
24+
25+
- name: 📂 Cache dependencies
26+
id: composer-cache
27+
run: |
28+
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
29+
- uses: actions/cache@v3
30+
with:
31+
path: ${{ steps.composer-cache.outputs.dir }}
32+
key: ${{ runner.os }}-dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
33+
restore-keys: |
34+
${{ runner.os }}-dependencies-php-${{ matrix.php }}-composer-
35+
36+
- name: ⚡️ Setup PHP
37+
uses: shivammathur/setup-php@v2
38+
with:
39+
php-version: ${{ matrix.php }}
40+
extensions: curl, dom, gd, intl, mbstring, openssl, tokenizer, zip
41+
ini-values: error_reporting=E_ALL
42+
tools: composer:v2, php-cs-fixer, phpunit, vimeo/psalm
43+
coverage: pcov
44+
45+
- name: 🍱 Install Composer dependencies
46+
run: composer update --${{ matrix.dependency-version }} --no-interaction --prefer-dist
47+
48+
- name: ✅ Check code lint
49+
run: composer lint
50+
51+
- name: ⚗️ Run static analysis
52+
run: |
53+
composer analyse
54+
composer inspect
55+
56+
- name: 🧪 Run unit tests
57+
run: composer test
58+
59+
- name: 🐛 Check all code bugs
60+
run: composer debug

.gitignore

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Build
2+
build/
3+
dist/
4+
out/
5+
6+
# Development
7+
/node_modules/
8+
/vendor/
9+
.yarn/*
10+
!.yarn/releases
11+
Homestead.json
12+
Homestead.yaml
13+
*.local
14+
15+
# Environment
16+
.env
17+
.env.backup
18+
19+
# Cache
20+
*.cache
21+
.mf
22+
.rollup.cache
23+
tsconfig.tsbuildinfo
24+
25+
# Logs
26+
logs/
27+
*.log
28+
npm-debug.log*
29+
yarn-debug.log*
30+
yarn-error.log*
31+
pnpm-debug.log*
32+
lerna-debug.log*
33+
error_log*
34+
35+
# Editor
36+
.vscode/*
37+
!.vscode/extensions.json
38+
.idea/
39+
.DS_Store
40+
*.suo
41+
*.ntvs*
42+
*.njsproj
43+
*.sln
44+
*.sw?
45+
46+
# Tests
47+
/test-results/
48+
/playwright-report/
49+
/playwright/.cache/

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Release Notes for the Sikessem Skeleton
2+
3+
All notable changes to [Skeleton](https://github.com/sikessem/skeleton) will be documented in this file.
4+
5+
## [Unreleased](https://github.com/sikessem/skeleton/compare/v0.0.0...HEAD)
6+
7+
**Full Changelog:** [v0.0.0...v0.x](https://github.com/sikessem/skeleton/compare/v0.0.0...v0.x)

LICENSE.md

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) 2022 [Sigui Kessé Emmanuel](https://sigui.ci/) <[[email protected]](mailto:[email protected])>
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.

README.md

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
<div align="center">
2+
3+
[![sikessem-logo]][sikessem-link]
4+
5+
<br/>
6+
7+
[![php-icon]][php-link]
8+
[![packagist-version-icon]][packagist-version-link]
9+
[![packagist-download-icon]][packagist-download-link]
10+
[![license-icon]][license-link]
11+
[![actions-icon]][actions-link]
12+
[![pr-icon]][pr-link]
13+
[![twitter-icon]][twitter-link]
14+
15+
</div>
16+
17+
[sikessem-logo]: https://github.com/sikessem/art/blob/HEAD/images/sikessem.svg
18+
[sikessem-link]: https://sikessem.github.io "Sikessem"
19+
20+
[php-icon]: https://img.shields.io/badge/PHP-ccc.svg?style=flat&logo=php
21+
[php-link]: https://github.com/sikessem/skeleton/search?l=php "PHP code"
22+
23+
[packagist-version-icon]: https://img.shields.io/packagist/v/sikessem/skeleton
24+
[packagist-version-link]: https://packagist.org/packages/sikessem/skeleton "Skeleton Releases"
25+
26+
[packagist-download-icon]: https://img.shields.io/packagist/dt/sikessem/skeleton
27+
[packagist-download-link]: https://packagist.org/packages/sikessem/skeleton "Skeleton Downloads"
28+
29+
[actions-icon]: https://github.com/sikessem/skeleton/workflows/CI/badge.svg
30+
[actions-link]: https://github.com/sikessem/skeleton/actions "Skeleton status"
31+
32+
[pr-icon]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?color=brightgreen
33+
[pr-link]: https://sikessem.github.io/contributions "PRs welcome!"
34+
35+
[twitter-icon]: https://img.shields.io/twitter/follow/sikessem.svg?label=@sikessem_tweets
36+
[twitter-link]: https://twitter.com/intent/follow?screen_name=sikessem_tweets "Ping Sikessem"
37+
38+
[license-icon]: https://img.shields.io/badge/license-MIT-blue.svg
39+
[license-link]: https://github.com/sikessem/skeleton/blob/HEAD/LICENSE "Skeleton License"
40+
[conduct-link]: https://sikessem.github.io/code-of-conduct "Sikessem's Code of Conduct"
41+
[discuss-link]: https://github.com/orgs/sikessem/discussions "Sikessem's GitHub discussions"
42+
[docs-link]: https://sikessem.github.io/packages/skeleton "Skeleton Documentation"
43+
44+
***
45+
46+
# 📦️ Sikessem Skeleton
47+
48+
Create a new [Sikessem][sikessem-link] project based on this template.
49+
50+
[Read the documentation to learn more][docs-link].
51+
52+
## 📖 Documentation
53+
54+
The full documentation for the Sikessem Skeleton can be found [here][docs-link].
55+
56+
## 👏 Contribution
57+
58+
The main purpose of this repository is to continue evolving Sikessem. We want to make contributing to this project as easy and transparent as possible, and we are grateful to the community for contributing bug fixes and improvements. Read below to learn how you can take part in improving Sikessem.
59+
60+
### [👷 Code of Conduct][conduct-link]
61+
62+
Sikessem has adopted a Code of Conduct that we expect project participants to adhere to.
63+
Please read the [full text][conduct-link] so that you can understand what actions will and will not be tolerated.
64+
65+
### 👥 [Contributing Guide][pr-link]
66+
67+
Read our [**Contributing Guide**][pr-link] to learn about our development process, how to propose bugfixes and improvements, and how to build and test your changes to Sikessem.
68+
69+
### 🔒️ Good First Issues
70+
71+
We have a list of [good first issues][gfi] that contain bugs which have a relatively limited scope. This is a great place to get started, gain experience, and get familiar with our contribution process.
72+
73+
[gfi]: https://github.com/sikessem/skeleton/labels/good%20first%20issue
74+
75+
### 💬 Discussions
76+
77+
Larger discussions and proposals are discussed in [**Sikessem's GitHub discussions**][discuss-link].
78+
79+
## 🔐 Security Reports
80+
81+
If you discover a security vulnerability within [any of Sikessem's projects][sikessem-link], please email [SIGUI Kessé Emmanuel](https://sigui.ci) at [[email protected]](mailto:[email protected]). All security vulnerabilities will be promptly addressed.
82+
83+
## 📄 License
84+
85+
The Sikessem Skeleton is open-sourced software licensed under the [MIT License](https://opensource.org/licenses/MIT) - see the [LICENSE][license-link] file for details.
86+
87+
***
88+
89+
<div align="center"><sub>Made with ❤︎ by <a href="https://twitter.com/intent/follow?screen_name=siguici" style="content:url(https://img.shields.io/twitter/follow/siguici.svg?label=@siguici);margin-bottom:-6px">@siguici</a>.</sub></div>

bootstrap.php

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use Composer\Autoload\ClassLoader;
6+
7+
return (static function (string $root = __DIR__): ClassLoader {
8+
$init_root = $root;
9+
$autoloader = null;
10+
do {
11+
$file = "{$root}/composer.json";
12+
if (is_file($file) && is_readable($file)) {
13+
$data = (string) file_get_contents($file);
14+
$data = (array) json_decode($data, true);
15+
if ($data) {
16+
$autoload_file = "{$root}/".($data['config']['vendor-dir'] ?? 'vendor').'/autoload.php';
17+
if (is_file($autoload_file) && is_readable($autoload_file)) {
18+
$autoload_file = realpath($autoload_file);
19+
if (in_array($autoload_file, get_included_files())) {
20+
throw new RuntimeException("The {$autoload_file} file has already been included.");
21+
}
22+
$autoloader = include_once $autoload_file;
23+
}
24+
}
25+
}
26+
$root = dirname($root);
27+
} while (! isset($autoloader) && dirname($root) !== $root);
28+
29+
if (! $autoloader instanceof ClassLoader) {
30+
\fprintf(
31+
\STDERR,
32+
'No autoload file found between directory %s and its parents',
33+
$init_root
34+
);
35+
exit(1);
36+
}
37+
38+
return $autoloader;
39+
})();

0 commit comments

Comments
 (0)