Skip to content

Commit

Permalink
Merge pull request #4 from zorachka/chore/docs
Browse files Browse the repository at this point in the history
Add docs
  • Loading branch information
bautrukevich authored Nov 19, 2021
2 parents 7de96f9 + 5b1c42f commit 0fb2110
Show file tree
Hide file tree
Showing 5 changed files with 149 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Contributing

Contributions are **welcome**.

Please read and understand the contribution guide before creating an issue or pull request.

## Etiquette

This project is open source, and as such, the maintainers give their free time to build and maintain the source code
held within. They make the code freely available in the hope that it will be of use to other developers. It would be
extremely unfair for them to suffer abuse or anger for their hard work.

Please be considerate towards maintainers when raising issues or presenting pull requests. Let's show the
world that developers are civilized and selfless people.

It's the duty of the maintainer to ensure that all submissions to the project are of sufficient
quality to benefit the project. Many developers have different skillsets, strengths, and weaknesses. Respect the maintainer's decision, and do not be upset or abusive if your submission is not used.

## Viability

When requesting or submitting new features, first consider whether it might be useful to others. Open
source projects are used by many developers, who may have entirely different needs to your own. Think about
whether or not your feature is likely to be used by other users of the project.

## Procedure

Before filing an issue:

- Attempt to replicate the problem, to ensure that it wasn't a coincidental incident.
- Check to make sure your feature suggestion isn't already present within the project.
- Check the pull requests tab to ensure that the bug doesn't have a fix in progress.
- Check the pull requests tab to ensure that the feature isn't already in progress.

Before submitting a pull request:

- Check the codebase to ensure that your feature doesn't already exist.
- Check the pull requests to ensure that another person hasn't already submitted the feature or fix.

## Requirements

If the project maintainer has any additional requirements, you will find them listed here.

- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](https://pear.php.net/package/PHP_CodeSniffer).

- **Add tests!** - Your patch won't be accepted if it doesn't have tests.

- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date.

- **Consider our release cycle** - We try to follow [SemVer v2.0.0](https://semver.org/). Randomly breaking public APIs is not an option.

- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.

- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](https://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting.

**Happy coding**!
4 changes: 4 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# These are supported funding model platforms

open_collective: zorachka
github: [zorachka]
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
blank_issues_enabled: false
contact_links:
- name: Ask a question
url: https://github.com/zorachka/console/discussions/new?category=q-a
about: Ask the community for help
- name: Request a feature
url: https://github.com/zorachka/console/discussions/new?category=ideas
about: Share ideas for new features
- name: Report a security issue
url: https://github.com/zorachka/console/security/policy
about: Learn how to notify us for sensitive bugs
- name: Report a bug
url: https://github.com/zorachka/console/issues/new
about: Report a reproducable bug
3 changes: 3 additions & 0 deletions .github/SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Security Policy

If you discover any security related issues, please email [email protected] instead of using the issue tracker.
73 changes: 73 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<p align="center">
<a href="https://github.com/zorachka" target="_blank">
<img src="https://avatars0.githubusercontent.com/u/86768962" height="240px">
</a>
<h1 align="center">Zorachka Console</h1>
<br>
</p>

Example of Console Application using [Symfony Console Component](https://github.com/symfony/console/) at core.


[![Latest Version on Packagist](https://img.shields.io/packagist/v/zorachka/console.svg?style=flat-square)](https://packagist.org/packages/zorachka/console)
[![Tests](https://github.com/zorachka/console/actions/workflows/run-tests.yml/badge.svg?branch=main)](https://github.com/zorachka/console/actions/workflows/run-tests.yml)
[![Total Downloads](https://img.shields.io/packagist/dt/zorachka/console.svg?style=flat-square)](https://packagist.org/packages/zorachka/console)
## Installation

You can install the package via composer:

```bash
composer require zorachka/console
```

## Usage

Create a `bin/app.php` file at root of your project with content below:

```php
<?php

declare(strict_types=1);

use Zorachka\Framework\Console\Application;

/**
* Self-called anonymous function that creates its own scope and keeps the global namespace clean.
*/
(function () {
$application = new ConsoleApplication(
appName: 'My Console App',
catchExceptions: false,
commands: [],
);
$application->run();
})();

```

## Testing

```bash
make test
```

## Changelog

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

## Contributing

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

## Security Vulnerabilities

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

## Credits

- [Siarhei Bautrukevich](https://github.com/bautrukevich)
- [All Contributors](../../contributors)

## License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

0 comments on commit 0fb2110

Please sign in to comment.