Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
siguici committed Jul 15, 2024
0 parents commit 75e847b
Show file tree
Hide file tree
Showing 21 changed files with 10,000 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true

[*.json]
insert_final_newline = ignore

[*.md]
trim_trailing_whitespace = false

[*.{yml,yaml}]
indent_size = 2
25 changes: 25 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
* text=auto

*.css diff=css
*.html diff=html
*.md diff=markdown
*.php diff=php
*.json linguist-language=JSON-with-Comments
*.neon linguist-language=YAML

*.phar binary
*.gif binary
*.ico binary
*.png binary
*.jpg binary
*.jpeg binary

/src/Program.php export-ignore
/tests/Feat/ExampleTest.php export-ignore
/tests/Unit/ProgramTest.php export-ignore
# CHANGELOG.md export-ignore
# .editorconfig export-ignore
# .gitattributes export-ignore
# .gitignore export-ignore
# /.github export-ignore
# /tests export-ignore
61 changes: 61 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: CI

permissions:
contents: read

on: ['push', 'pull_request']

jobs:
ci:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
php: [8.2, 8.3]
dependencies: [lowest, highest]
experimental: [false]
name: 👷 CI PHP-${{ matrix.php }} ${{ matrix.dependencies }} on ${{ matrix.os }}

steps:
- name: 🚚 Get latest code
uses: actions/checkout@v4

- name: 📂 Cache dependencies
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
restore-keys: |
${{ runner.os }}-dependencies-php-${{ matrix.php }}-composer-
- name: ⚡️ Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: curl, dom, gd, intl, mbstring, openssl, tokenizer, zip
ini-values: error_reporting=E_ALL
tools: composer:v2, php-cs-fixer, phpunit, vimeo/psalm
coverage: pcov

- name: 🍱 Install Composer dependencies
run: composer update --${{ matrix.dependency-version }} --no-interaction --prefer-dist

- name: ✅ Check code lint
run: composer lint

- name: ⚗️ Run static analysis
run: |
composer verify
composer analyse
composer inspect
- name: 🧪 Run unit tests
run: composer test

- name: 🐛 Check all code bugs
run: composer debug
49 changes: 49 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Build
build/
dist/
out/

# Development
/node_modules/
/vendor/
.yarn/*
!.yarn/releases
Homestead.json
Homestead.yaml
*.local

# Environment
.env
.env.backup

# Cache
*.cache
.mf
.rollup.cache
tsconfig.tsbuildinfo

# Logs
logs/
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
error_log*

# Editor
.vscode/*
!.vscode/extensions.json
.idea/
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

# Tests
/test-results/
/playwright-report/
/playwright/.cache/
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Release Notes for the Sikessem Skeleton

All notable changes to [Skeleton](https://github.com/sikessem/skeleton) will be documented in this file.

## [Unreleased](https://github.com/sikessem/skeleton/compare/v0.0.0...HEAD)

**Full Changelog:** [v0.0.0...v0.x](https://github.com/sikessem/skeleton/compare/v0.0.0...v0.x)
21 changes: 21 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# MIT License

Copyright (c) 2022 [Sigui Kessé Emmanuel](https://sigui.ci/) <[contact@sigui.ci](mailto:contact@sigui.ci)>

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.
89 changes: 89 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
<div align="center">

[![sikessem-logo]][sikessem-link]

<br/>

[![php-icon]][php-link]
[![packagist-version-icon]][packagist-version-link]
[![packagist-download-icon]][packagist-download-link]
[![license-icon]][license-link]
[![actions-icon]][actions-link]
[![pr-icon]][pr-link]
[![twitter-icon]][twitter-link]

</div>

[sikessem-logo]: https://github.com/sikessem/art/blob/HEAD/images/sikessem.svg
[sikessem-link]: https://sikessem.github.io "Sikessem"

[php-icon]: https://img.shields.io/badge/PHP-ccc.svg?style=flat&logo=php
[php-link]: https://github.com/sikessem/skeleton/search?l=php "PHP code"

[packagist-version-icon]: https://img.shields.io/packagist/v/sikessem/skeleton
[packagist-version-link]: https://packagist.org/packages/sikessem/skeleton "Skeleton Releases"

[packagist-download-icon]: https://img.shields.io/packagist/dt/sikessem/skeleton
[packagist-download-link]: https://packagist.org/packages/sikessem/skeleton "Skeleton Downloads"

[actions-icon]: https://github.com/sikessem/skeleton/workflows/CI/badge.svg
[actions-link]: https://github.com/sikessem/skeleton/actions "Skeleton status"

[pr-icon]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?color=brightgreen
[pr-link]: https://sikessem.github.io/contributions "PRs welcome!"

[twitter-icon]: https://img.shields.io/twitter/follow/sikessem.svg?label=@sikessem_tweets
[twitter-link]: https://twitter.com/intent/follow?screen_name=sikessem_tweets "Ping Sikessem"

[license-icon]: https://img.shields.io/badge/license-MIT-blue.svg
[license-link]: https://github.com/sikessem/skeleton/blob/HEAD/LICENSE "Skeleton License"
[conduct-link]: https://sikessem.github.io/code-of-conduct "Sikessem's Code of Conduct"
[discuss-link]: https://github.com/orgs/sikessem/discussions "Sikessem's GitHub discussions"
[docs-link]: https://sikessem.github.io/packages/skeleton "Skeleton Documentation"

***

# 📦️ Sikessem Skeleton

Create a new [Sikessem][sikessem-link] project based on this template.

[Read the documentation to learn more][docs-link].

## 📖 Documentation

The full documentation for the Sikessem Skeleton can be found [here][docs-link].

## 👏 Contribution

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.

### [👷 Code of Conduct][conduct-link]

Sikessem has adopted a Code of Conduct that we expect project participants to adhere to.
Please read the [full text][conduct-link] so that you can understand what actions will and will not be tolerated.

### 👥 [Contributing Guide][pr-link]

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.

### 🔒️ Good First Issues

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.

[gfi]: https://github.com/sikessem/skeleton/labels/good%20first%20issue

### 💬 Discussions

Larger discussions and proposals are discussed in [**Sikessem's GitHub discussions**][discuss-link].

## 🔐 Security Reports

If you discover a security vulnerability within [any of Sikessem's projects][sikessem-link], please email [SIGUI Kessé Emmanuel](https://sigui.ci) at [contact@sigui.ci](mailto:contact@sigui.ci). All security vulnerabilities will be promptly addressed.

## 📄 License

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.

***

<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>
39 changes: 39 additions & 0 deletions bootstrap.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php

declare(strict_types=1);

use Composer\Autoload\ClassLoader;

return (static function (string $root = __DIR__): ClassLoader {
$init_root = $root;
$autoloader = null;
do {
$file = "{$root}/composer.json";
if (is_file($file) && is_readable($file)) {
$data = (string) file_get_contents($file);
$data = (array) json_decode($data, true);
if ($data) {
$autoload_file = "{$root}/".($data['config']['vendor-dir'] ?? 'vendor').'/autoload.php';
if (is_file($autoload_file) && is_readable($autoload_file)) {
$autoload_file = realpath($autoload_file);
if (in_array($autoload_file, get_included_files())) {
throw new RuntimeException("The {$autoload_file} file has already been included.");
}
$autoloader = include_once $autoload_file;
}
}
}
$root = dirname($root);
} while (! isset($autoloader) && dirname($root) !== $root);

if (! $autoloader instanceof ClassLoader) {
\fprintf(
\STDERR,
'No autoload file found between directory %s and its parents',
$init_root
);
exit(1);
}

return $autoloader;
})();
Loading

0 comments on commit 75e847b

Please sign in to comment.