Skip to content

Commit

Permalink
📦 new: Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
elie29 committed Feb 20, 2019
0 parents commit 80e2e5b
Show file tree
Hide file tree
Showing 17 changed files with 3,194 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
coverage_clover: clover.xml
json_path: coveralls-upload.json
12 changes: 12 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/.github export-ignore
/.coveralls.yml export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.travis.yml export-ignore
/CODE_OF_CONDUCT.md export-ignore
/CONTRIBUTING.md export-ignore
/composer.lock export-ignore
/phpcs.xml export-ignore
/phpstan.neon export-ignore
/phpunit.xml.dist export-ignore
/tests/ export-ignore
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/vendor/
/.settings/
/.buildpath
/clover.xml
/.project
66 changes: 66 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
sudo: false

language: php

cache:
directories:
- $HOME/.composer/cache

env:
global:
- COMPOSER_ARGS="--no-interaction"
- COVERAGE_DEPS="php-coveralls/php-coveralls"

matrix:
include:
- php: 7.1
env:
- DEPS=lowest
- php: 7.1
env:
- DEPS=locked
- php: 7.1
env:
- DEPS=latest
- php: 7.2
env:
- DEPS=lowest
- php: 7.2
env:
- DEPS=locked
- CS_CHECK=true
- TEST_COVERAGE=true
- php: 7.2
env:
- DEPS=latest
- php: 7.3
env:
- DEPS=lowest
- php: 7.3
env:
- DEPS=locked
- php: 7.3
env:
- DEPS=latest

before_install:
- "if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi"
- "travis_retry composer self-update"

install:
- "travis_retry composer install $COMPOSER_ARGS"
- "if [[ $DEPS == 'latest' ]]; then travis_retry composer update $COMPOSER_ARGS ; fi"
- "if [[ $DEPS == 'lowest' ]]; then travis_retry composer update --prefer-lowest --prefer-stable $COMPOSER_ARGS ; fi"
- "if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry composer require --dev $COMPOSER_ARGS $COVERAGE_DEPS ; fi"
- "stty cols 120 && composer show"

script:
- "if [[ $TEST_COVERAGE == 'true' ]]; then composer test-coverage ; else composer test ; fi"
- "if [[ $CS_CHECK == 'true' ]]; then composer cs-check ; fi"

after_script:
- "if [[ $TEST_COVERAGE == 'true' ]]; then vendor/bin/php-coveralls -v ; fi"

notifications:
email:
on_success: never
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Changelog
=========

All notable changes to this project will be documented in this file, in reverse chronological order by release.

## V0.0.1 - TBD

### Added

- Nothing.

### Changed

- Nothing.

### Deprecated

- Nothing.

### Removed

- Nothing.

### Fixed

- Nothing.
46 changes: 46 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at elie29@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Contributing
-------------

Before you contribute code to **sample**, please make sure it conforms to the PSR2 coding standard (cf.
[Zend Framework coding standard](https://github.com/zendframework/zend-coding-standard)) and that the all unit tests still pass. The easiest way to contribute is to work on a your own fork than submit a pull request.

21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2018 Elie NEHME

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.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Sample Project

[![Build Status](https://travis-ci.org/elie29/sample.svg?branch=master)](https://travis-ci.org/elie29/sample)
[![Coverage Status](https://coveralls.io/repos/github/elie29/sample/badge.svg)](https://coveralls.io/github/elie29/sample)

## Introduction
Sample PHP 7.1 starter

## Text file enconding
- UTF-8

## Code style formatter
- Zend Framework coding standard

## Composer commands
- `test`: Launch unit test
- `test-coverage`: Launch unit test with clover.xml file generation
- `cs-check` : code sniffer check
- `cs-fix`: code sniffer fix
- `phpstan`: Launch PHP Static Analysis Tool
- `check`: Launch `cs-check`, `test` and `phpstan`

5 changes: 5 additions & 0 deletions build/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# exclude everything
*

# exception to the rule
!.gitignore
64 changes: 64 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"name": "elie29/sample",
"description": "Sample description",
"type": "library",
"license": "MIT",
"minimum-stability": "stable",
"keywords": [
"expressive",
"zf",
"zendframework",
"php-di",
"di",
"container",
"psr-11"
],
"authors": [
{
"name": "Elie NEHME",
"email": "elie29@gmail.com"
}
],
"support": {
"issues": "https://github.com/elie29/sample/issues",
"source": "https://github.com/elie29/sample"
},
"require": {
"php": "^7.1"
},
"require-dev": {
"mockery/mockery": "^1.2",
"phpstan/phpstan": "^0.11.2",
"phpstan/phpstan-mockery": "^0.11.0",
"phpunit/phpunit": "^7.5",
"zendframework/zend-coding-standard": "^1.0"
},
"autoload": {
"psr-4": {
"Sample\\": "src"
}
},
"autoload-dev": {
"files": [
"vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest.php"
],
"psr-4": {
"Sample\\": "tests"
}
},
"config": {
"sort-packages": true
},
"scripts": {
"check": [
"@cs-check",
"@test",
"@phpstan"
],
"phpstan": "phpstan analyse src tests --error-format=checkstyle > build/phpstan.xml || true",
"cs-check": "phpcs",
"cs-fix": "phpcbf",
"test": "phpunit",
"test-coverage": "phpunit --coverage-clover clover.xml"
}
}
Loading

0 comments on commit 80e2e5b

Please sign in to comment.