From b4dcdee8c50e7dcac259b8a2117a32c52934da20 Mon Sep 17 00:00:00 2001 From: Niklas Keller Date: Tue, 28 Jul 2015 15:45:25 +0200 Subject: [PATCH] Initial Commit --- .coveralls.yml | 1 + .editorconfig | 16 ++++++++++++++++ .gitattributes | 9 +++++++++ .gitignore | 4 ++++ .php_cs | 15 +++++++++++++++ .travis.yml | 19 +++++++++++++++++++ CONTRIBUTING.md | 30 ++++++++++++++++++++++++++++++ LICENSE | 21 +++++++++++++++++++++ README.md | 20 ++++++++++++++++++++ composer.json | 26 ++++++++++++++++++++++++++ phpunit.xml | 14 ++++++++++++++ 11 files changed, 175 insertions(+) create mode 100644 .coveralls.yml create mode 100644 .editorconfig create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 .php_cs create mode 100644 .travis.yml create mode 100644 CONTRIBUTING.md create mode 100644 LICENSE create mode 100644 README.md create mode 100644 composer.json create mode 100644 phpunit.xml diff --git a/.coveralls.yml b/.coveralls.yml new file mode 100644 index 0000000..6b74c21 --- /dev/null +++ b/.coveralls.yml @@ -0,0 +1 @@ +src_dir: lib diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..47cfede --- /dev/null +++ b/.editorconfig @@ -0,0 +1,16 @@ +root = true + +[*] +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +indent_style = spaces +charset = utf-8 + +[{.travis.yml}] +indent_style = space +indent_size = 2 + +[{composer.json}] +indent_style = space +indent_size = 2 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..c521702 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,9 @@ +/test export-ignore +/examples export-ignore +/.coveralls.yml export-ignore +/.editorconfig export-ignore +/.gitattributes export-ignore +/.gitignore export-ignore +/.php_cs export-ignore +/.travis.yml export-ignore +/phpunit.xml export-ignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f31187e --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +/coverage/ +/composer.lock +/vendor/ +/.idea/ diff --git a/.php_cs b/.php_cs new file mode 100644 index 0000000..ab38568 --- /dev/null +++ b/.php_cs @@ -0,0 +1,15 @@ +level(Symfony\CS\FixerInterface::NONE_LEVEL) + ->fixers([ + "psr2", + "-braces", + "-psr0", + ]) + ->finder( + Symfony\CS\Finder\DefaultFinder::create() + ->in(__DIR__ . "/lib") + ->in(__DIR__ . "/test") + ) +; diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..6ccbfc4 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,19 @@ +sudo: false + +language: php + +php: + - 5.5 + - 5.6 + - 7 + +before_script: + - composer self-update + - composer install + +script: + - vendor/bin/phpunit --coverage-text --coverage-clover build/logs/clover.xml + - php vendor/bin/php-cs-fixer --diff --dry-run -v fix + +after_script: + - php vendor/bin/coveralls -v diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..cee345a --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,30 @@ +## Submitting useful bug reports + +Please search existing issues first to make sure this is not a duplicate. +Every issue report has a cost for the developers required to field it; be +respectful of others' time and ensure your report isn't spurious prior to +submission. Please adhere to [sound bug reporting principles](http://www.chiark.greenend.org.uk/~sgtatham/bugs.html). + +## Development ideology + +Truths which we believe to be self-evident: + +- **It's an asynchronous world.** Be wary of anything that undermines + async principles. + +- **The answer is not more options.** If you feel compelled to expose + new preferences to the user it's very possible you've made a wrong + turn somewhere. + +- **There are no power users.** The idea that some users "understand" + concepts better than others has proven to be, for the most part, false. + If anything, "power users" are more dangerous than the rest, and we + should avoid exposing dangerous functionality to them. + +## Code style + +The amphp project adheres to the PSR-2 style guide with the exception that +opening braces for classes and methods must appear on the same line as +the declaration: + +https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..87a8244 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 amphp + +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. diff --git a/README.md b/README.md new file mode 100644 index 0000000..827a0ac --- /dev/null +++ b/README.md @@ -0,0 +1,20 @@ +# amphp/cache + +[![Build Status](https://img.shields.io/travis/amphp/template/master.svg?style=flat-square)](https://travis-ci.org/amphp/template) +[![CoverageStatus](https://img.shields.io/coveralls/amphp/template/master.svg?style=flat-square)](https://coveralls.io/github/amphp/template?branch=master) +![Unstable](https://img.shields.io/badge/api-unstable-orange.svg?style=flat-square) +![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square) + + +`amphp/template` is a non-blocking template for use with the [`amp`](https://github.com/amphp/amp) +concurrency framework. + +**Required PHP Version** + +- PHP 5.5+ + +**Installation** + +```bash +$ composer require amphp/template +``` diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..8271d0b --- /dev/null +++ b/composer.json @@ -0,0 +1,26 @@ +{ + "name": "amphp/template", + "license": "MIT", + "authors": [ + { + "name": "...", + "email": "..." + } + ], + "support": { + "issues": "https://github.com/amphp/template/issues" + }, + "require": { + "amphp/amp": "^1" + }, + "require-dev": { + "phpunit/phpunit": "~4.4.0", + "fabpot/php-cs-fixer": "~1.9", + "satooshi/php-coveralls": "dev-master" + }, + "autoload": { + "psr-4": { + "Amp\\Template\\": "lib/" + } + } +} diff --git a/phpunit.xml b/phpunit.xml new file mode 100644 index 0000000..15defc4 --- /dev/null +++ b/phpunit.xml @@ -0,0 +1,14 @@ + + + + + + ./test + + + + + ./lib + + +