Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ghostwriter committed Sep 28, 2023
0 parents commit 181589b
Show file tree
Hide file tree
Showing 28 changed files with 596 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

[*.md]
trim_trailing_whitespace = false

[*.{yml,yaml}]
indent_size = 2

[docker-compose.yml]
indent_size = 4
28 changes: 28 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Auto detect text files and perform LF normalization
* text=auto
*.md text diff=markdown
*.sh text eol=lf
*.png binary
*.jpg binary
/.github/ export-ignore
/docs/ export-ignore
/fixtures/ export-ignore
/tests/ export-ignore
/.editorconfig export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/ecs.php export-ignore
/infection.json export-ignore
/infection.json.dist export-ignore
/mkdocs.yml export-ignore
/mkdocs.yml.dist export-ignore
/phpbench.json export-ignore
/phpbench.json.dist export-ignore
/phpcs.xml export-ignore
/phpcs.xml.dist export-ignore
/phpunit.xml export-ignore
/phpunit.xml.dist export-ignore
/psalm-baseline.xml export-ignore
/psalm.xml export-ignore
/psalm.xml.dist export-ignore
/rector.php export-ignore
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# <https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners>

* @ghostwriter
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: [ghostwriter]
22 changes: 22 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"

# Maintain dependencies for npm
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"

# Maintain dependencies for Composer
- package-ecosystem: "composer"
directory: "/"
schedule:
interval: "daily"
21 changes: 21 additions & 0 deletions .github/workflows/compliance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Compliance

on:
pull_request:
branches:
- "**"
push:
branches:
- "main"
- "[0-9]+.[0-9]+.x"
- "v[0-9]+"
schedule:
- cron: "0 * * * *" # Runs hourly
workflow_dispatch: # Manually Trigger workflow

jobs:
automation:
uses: ghostwriter/compliance/.github/workflows/automation.yml@v1
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/.cache/
/.phpunit.cache/
/docs/html/
/vendor/
/.env
/.phpcs-cache
/.phpunit.cache
/.phpunit.result.cache
/clover.xml
/coveralls-upload.json
/infection.json
/mkdocs.site.yml
/phpbench.json
/phpcs.xml
/phpunit.xml
/psalm.xml
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## 0.1.0 - 2023-01-01
First version
29 changes: 29 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
BSD 3-Clause License

Copyright (c) 2023, Nathanael Esayeas
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
57 changes: 57 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# wip

[![Compliance](https://github.com/ghostwriter/wip/actions/workflows/compliance.yml/badge.svg)](https://github.com/ghostwriter/wip/actions/workflows/compliance.yml)
[![Supported PHP Version](https://badgen.net/packagist/php/ghostwriter/wip?color=8892bf)](https://www.php.net/supported-versions)
[![Mutation Coverage](https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fghostwriter%2Fwip%2Fmain)](https://dashboard.stryker-mutator.io/reports/github.com/ghostwriter/wip/main)
[![Code Coverage](https://codecov.io/gh/ghostwriter/wip/branch/main/graph/badge.svg?token=UPDATE_TOKEN)](https://codecov.io/gh/ghostwriter/wip)
[![Type Coverage](https://shepherd.dev/github/ghostwriter/wip/coverage.svg)](https://shepherd.dev/github/ghostwriter/wip)
[![Latest Version on Packagist](https://badgen.net/packagist/v/ghostwriter/wip)](https://packagist.org/packages/ghostwriter/wip)
[![Downloads](https://badgen.net/packagist/dt/ghostwriter/wip?color=blue)](https://packagist.org/packages/ghostwriter/wip)

work in progress

> **Warning**
>
> This project is not finished yet, work in progress.

## Installation

You can install the package via composer:

``` bash
composer require ghostwriter/wip
```

## Usage

```php
// work in progress
```

## Testing

``` bash
composer test
```

## Changelog

Please see [CHANGELOG.md](./CHANGELOG.md) for more information what has changed recently.

## Security

If you discover any security related issues, please email `nathanael.esayeas@protonmail.com` instead of using the issue tracker.

## Support

[[`Become a GitHub Sponsor`](https://github.com/sponsors/ghostwriter)]

## Credits

- [Nathanael Esayeas](https://github.com/ghostwriter)
- [All Contributors](https://github.com/ghostwriter/wip/contributors)

## License

The BSD-3-Clause. Please see [License File](./LICENSE) for more information.
6 changes: 6 additions & 0 deletions bin/console
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env php
<?php

declare(strict_types=1);

require __DIR__ . DIRECTORY_SEPARATOR . 'console.php';
23 changes: 23 additions & 0 deletions bin/console.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env php
<?php

declare(strict_types=1);

namespace Ghostwriter\Wip\Console;

use Ghostwriter\Wip\Foo;
use function sprintf;

/** @var ?string $_composer_autoload_path */
(static function (string $composerAutoloadPath): void {
/** @psalm-suppress UnresolvableInclude */
require $composerAutoloadPath ?: fwrite(
STDERR,
sprintf('[ERROR]Cannot locate "%s"\n please run "composer install"\n', $composerAutoloadPath)
) && exit(1);

/**
* #BlackLivesMatter.
*/
echo (new Foo())->test();
})($_composer_autoload_path);
134 changes: 134 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
{
"name": "ghostwriter/wip",
"description": "Here be dragons",
"license": "BSD-3-Clause",
"type": "library",
"keywords": [
"ghostwriter",
"wip"
],
"authors": [
{
"name": "Nathanael Esayeas",
"email": "nathanael.esayeas@protonmail.com",
"homepage": "https://github.com/ghostwriter",
"role": "Developer"
}
],
"homepage": "https://github.com/ghostwriter/wip",
"support": {
"issues": "https://github.com/ghostwriter/wip/issues",
"forum": "https://github.com/ghostwriter/wip/discussions",
"source": "https://github.com/ghostwriter/wip",
"docs": "https://github.com/ghostwriter/wip",
"rss": "https://github.com/ghostwriter/wip/releases.atom"
},
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/ghostwriter"
}
],
"require": {
"php": ">=8.1",
"ghostwriter/collection": "^1.4",
"ghostwriter/config": "^0.4",
"ghostwriter/container": "^1.6",
"ghostwriter/event-dispatcher": "^1.5",
"ghostwriter/json": "^1.1",
"ghostwriter/option": "^1.5",
"ghostwriter/result": "^1.3"
},
"require-dev": {
"ghostwriter/coding-standard": "dev-main",
"ghostwriter/psalm-plugin": "^0.1"
},
"replace": {},
"minimum-stability": "stable",
"prefer-stable": true,
"autoload": {
"psr-4": {
"Ghostwriter\\Wip\\": "src/"
},
"files": [
"src/constants.php",
"src/functions.php"
]
},
"autoload-dev": {
"psr-4": {
"Ghostwriter\\Wip\\Tests\\": "tests/"
}
},
"bin": [
"bin/console",
"bin/console.php"
],
"config": {
"allow-plugins": {
"infection/extension-installer": true,
"dealerdirect/phpcodesniffer-composer-installer": true
},
"classmap-authoritative": true,
"discard-changes": true,
"optimize-autoloader": true,
"platform": {
"php": "8.1.99"
},
"preferred-install": "dist",
"prepend-autoloader": true,
"process-timeout": 5000,
"sort-packages": true
},
"scripts": {
"cache:clear": [
"rm -fr ./.cache"
],
"check": [
"@composer validate",
"@normalizer",
"@ecs",
"@test",
"@psalm:security",
"@rector:dry-run",
"@psalm:dry-run"
],
"ecs": [
"@ecs:fix",
"@ecs:check"
],
"ecs:check": "vendor/bin/ecs check --clear-cache || true",
"ecs:fix": [
"vendor/bin/ecs check --fix --clear-cache"
],
"infection": [
"@xdebug",
"vendor/bin/infection --verbose"
],
"missing-returntypes": "psalm --alter --issues=MissingReturnType",
"normalizer": "composer normalize --no-check-lock",
"phpunit": "phpunit --colors=always",
"psalm": "@psalm:shepherd",
"psalm:baseline": "psalm --no-cache --no-diff --set-baseline=psalm-baseline.xml",
"psalm:dry-run": "psalm --alter --issues=all --dry-run",
"psalm:missing": "psalm --alter --issues=MissingReturnType",
"psalm:security": "psalm --no-cache --taint-analysis",
"psalm:shepherd": "psalm --no-diff --no-cache --shepherd --stats",
"rector": "vendor/bin/rector process",
"rector:dry-run": "vendor/bin/rector process --dry-run || true",
"test": [
"@xdebug",
"@phpunit",
"@psalm",
"@infection"
],
"test:coverage": [
"@cache:clear",
"@xdebug",
"@phpunit"
],
"xdebug": [
"@putenv XDEBUG_MODE=coverage"
]
}
}
7 changes: 7 additions & 0 deletions config/app.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

declare(strict_types=1);

return [

];
3 changes: 3 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# WIP

here be dragons...

0 comments on commit 181589b

Please sign in to comment.