From 6445dff5fb1e10ee4551df9ffe1654c3b07572cb Mon Sep 17 00:00:00 2001 From: Holger Woltersdorf Date: Sun, 20 Nov 2016 22:06:53 +0100 Subject: [PATCH] Initial commit --- .coveralls.yml | 3 + .gitignore | 13 +++++ .travis.yml | 26 +++++++++ CHANGELOG.md | 9 +++ CONTRIBUTING.md | 44 +++++++++++++++ LICENSE | 21 +++++++ README.md | 11 ++++ Vagrantfile | 29 ++++++++++ build/phpdox.xml | 24 ++++++++ build/phpmd.xml | 27 +++++++++ build/phpunit.xml | 29 ++++++++++ composer.json | 55 +++++++++++++++++++ .../SessionFormsBridgeException.php | 23 ++++++++ src/SessionFormsBridge.php | 23 ++++++++ tests/Unit/SessionFormsBridgeTest.php | 23 ++++++++ tests/Unit/bootstrap.php | 7 +++ 16 files changed, 367 insertions(+) create mode 100644 .coveralls.yml create mode 100644 .gitignore create mode 100644 .travis.yml create mode 100644 CHANGELOG.md create mode 100644 CONTRIBUTING.md create mode 100644 LICENSE create mode 100644 README.md create mode 100644 Vagrantfile create mode 100644 build/phpdox.xml create mode 100644 build/phpmd.xml create mode 100644 build/phpunit.xml create mode 100644 composer.json create mode 100644 src/Exceptions/SessionFormsBridgeException.php create mode 100644 src/SessionFormsBridge.php create mode 100644 tests/Unit/SessionFormsBridgeTest.php create mode 100644 tests/Unit/bootstrap.php diff --git a/.coveralls.yml b/.coveralls.yml new file mode 100644 index 0000000..3b85ca4 --- /dev/null +++ b/.coveralls.yml @@ -0,0 +1,3 @@ +service_name: travis-ci +coverage_clover: build/logs/clover.xml +json_path: build/logs/coveralls-upload.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3c69697 --- /dev/null +++ b/.gitignore @@ -0,0 +1,13 @@ +.idea/ + +# vagrant +.vagrant/ +vagrant + +# composer +vendor/ + +# locally generated docs +build/api/ +build/phpdox/ +build/logs/ diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..b3f0f5a --- /dev/null +++ b/.travis.yml @@ -0,0 +1,26 @@ +language: php + +php: + - 7.0 + +branches: + only: + - master + - development + - /^feature\/.+$/ + - /^issue\/.+$/ + +before_script: + - composer self-update + - mkdir -p vendor/bin + - composer install -o --prefer-dist --no-interaction + - mkdir build/logs + +script: + - php vendor/bin/phpunit.phar -c build/ + +after_success: + - travis_retry php vendor/bin/coveralls.phar -v --exclude-no-stmt + +notifications: + slack: fortune-globe:PoLjMJuARdFicBIEPzdNrZ96 diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..1921c46 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,9 @@ +# Change Log + +All notable changes to this project will be documented in this file. +This project adheres to [Semantic Versioning](http://semver.org/) and [Keep a CHANGELOG](http://keepachangelog.com). + +## [Unreleased] + + +[Unreleased](https://github.com/icehawk/session-forms-bridge/blob/master) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..e5a158a --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,44 @@ +# Contributing + +Contributions are **welcome** and will be fully **credited**. + +We accept contributions via pull requests on [GitHub](https://github.com/icehawk/session-forms-bridge). + +## Issues + +- Please report issues here on [GitHub](https://github.com/icehawk/session-forms-bridge) + +## Pull Requests + +- **Add tests!** - Your patch will not be accepted if it does not have tests. + +- **Document any change in behaviour** - Make sure the documentation in `README.md` and the `CHANGELOG.md` is kept up-to-date. + +- **Consider our release cycle** - We follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option. + +- **Create topic branches** - Do not ask us to pull from your master branch. + +- **One pull request per feature** - If you want to do more than one thing, please 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 before submitting. + + +## Running tests + +```bash +$ php vendor/bin/phpunit.phar -c build/ +``` + +This includes a code coverage report in HTML and Clover XML. + +## Analyze code + +```bash +$ php vendor/bin/phpmetrics.phar --report-html=build/logs/phpmetrics src/ +``` + +## Create API documentation + +```bash +$ php vendor/bin/phpdox.phar -f build/phpdox.xml +``` diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..a32eab9 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Holger Woltersdorf and contributors + +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..377d53c --- /dev/null +++ b/README.md @@ -0,0 +1,11 @@ +[![Build Status](https://travis-ci.org/icehawk/session-forms-bridge.svg?branch=master)](https://travis-ci.org/icehawk/session-forms-bridge) +[![Coverage Status](https://coveralls.io/repos/github/icehawk/session-forms-bridge/badge.svg?branch=master)](https://coveralls.io/github/icehawk/session-forms-bridge?branch=master) +[![Latest Stable Version](https://poser.pugx.org/icehawk/session-forms-bridge/v/stable)](https://packagist.org/packages/icehawk/session-forms-bridge) +[![Total Downloads](https://poser.pugx.org/icehawk/session-forms-bridge/downloads)](https://packagist.org/packages/icehawk/session-forms-bridge) +[![Latest Unstable Version](https://poser.pugx.org/icehawk/session-forms-bridge/v/unstable)](https://packagist.org/packages/icehawk/session-forms-bridge) +[![License](https://poser.pugx.org/icehawk/session-forms-bridge/license)](https://packagist.org/packages/icehawk/session-forms-bridge) + +# IceHawk\SessionFormsBridge + +A bridge implementation to combine the IceHawk components Session and Forms. + diff --git a/Vagrantfile b/Vagrantfile new file mode 100644 index 0000000..ceb0b07 --- /dev/null +++ b/Vagrantfile @@ -0,0 +1,29 @@ +VAGRANTFILE_API_VERSION = "2" + +$script = <