Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
hollodotme committed Nov 20, 2016
0 parents commit 6445dff
Show file tree
Hide file tree
Showing 16 changed files with 367 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
service_name: travis-ci
coverage_clover: build/logs/clover.xml
json_path: build/logs/coveralls-upload.json
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.idea/

# vagrant
.vagrant/
vagrant

# composer
vendor/

# locally generated docs
build/api/
build/phpdox/
build/logs/
26 changes: 26 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
44 changes: 44 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -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
```
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -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.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.

29 changes: 29 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
VAGRANTFILE_API_VERSION = "2"

$script = <<SCRIPT
curl -sS 'https://getcomposer.org/installer' | php -- --install-dir=/usr/local/bin --filename=composer
chmod +x /usr/local/bin/composer
SCRIPT

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

# box-config
config.vm.box = "devops007"
config.vm.box_url = "http://box.3wolt.de/devops007/"
config.vm.box_check_update = true
config.vm.box_version = "~> 1.2.1"

# network-config
config.vm.network "public_network", type: "dhcp"
config.vm.boot_timeout = 600

# SSH-config
config.ssh.username = "root"
config.ssh.insert_key = true

# hostname
config.vm.hostname = "SessionFormsBridge"

config.vm.provision "shell", inline: $script

end
24 changes: 24 additions & 0 deletions build/phpdox.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8" ?>
<phpdox xmlns="http://xml.phpdox.net/config">
<project name="SessionFormsBridge" source="../src" workdir="phpdox">
<collector publiconly="false">
<include mask="*.php"/>
<exclude mask="*autoload.php"/>
</collector>

<generator output=".">
<enrich base="logs">
<source type="build"/>
<source type="git"/>
<source type="phploc"/>
<source type="checkstyle"/>
<source type="pmd"/>
<source type="phpunit"/>
</enrich>

<build engine="html" enabled="true" output="api">
<file extension="html"/>
</build>
</generator>
</project>
</phpdox>
27 changes: 27 additions & 0 deletions build/phpmd.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0"?>

<ruleset name="SessionFormsBridge"
xmlns="http://pmd.sf.net/ruleset/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
<description>SessionFormsBridge ruleset</description>

<rule ref="rulesets/codesize.xml/CyclomaticComplexity"/>
<rule ref="rulesets/codesize.xml/NPathComplexity"/>
<rule ref="rulesets/codesize.xml/ExcessiveClassComplexity"/>
<rule ref="rulesets/codesize.xml/ExcessiveClassLength"/>
<rule ref="rulesets/codesize.xml/ExcessiveMethodLength"/>
<rule ref="rulesets/codesize.xml/ExcessiveParameterList"/>

<rule ref="rulesets/design.xml/EvalExpression"/>
<rule ref="rulesets/design.xml/ExitExpression"/>
<rule ref="rulesets/design.xml/GotoStatement"/>

<rule ref="rulesets/naming.xml/ConstructorWithNameAsEnclosingClass"/>

<rule ref="rulesets/unusedcode.xml/UnusedFormalParameter"/>
<rule ref="rulesets/unusedcode.xml/UnusedLocalVariable"/>
<rule ref="rulesets/unusedcode.xml/UnusedPrivateField"/>
<rule ref="rulesets/unusedcode.xml/UnusedPrivateMethod"/>
</ruleset>
29 changes: 29 additions & 0 deletions build/phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<phpunit
bootstrap="../tests/Unit/bootstrap.php"
verbose="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutTestSize="true"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true">
<testsuites>
<testsuite name="SessionFormsBridge">
<directory suffix="Test.php">../tests/Unit</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">../src</directory>
</whitelist>
<blacklist>
<directory suffix=".php">../tests/Unit</directory>
<directory>../tests/Unit/Fixtures</directory>
<directory>../vendor</directory>
</blacklist>
</filter>
<logging>
<log type="coverage-html" target="logs/coverage"/>
<log type="coverage-clover" target="logs/clover.xml"/>
</logging>
</phpunit>
55 changes: 55 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"name": "icehawk/session-forms-bridge",
"description": "A bridge implementation to combine the IceHawk components Session and Forms.",
"minimum-stability": "dev",
"prefer-stable": true,
"license": "MIT",
"authors": [
{
"name": "hollodotme"
}
],
"support": {
"source": "https://github.com/icehawk/session-forms-bridge"
},
"require": {
"php": ">=7.0"
},
"require-dev": {
"tm/tooly-composer-script": "^1.0"
},
"autoload": {
"psr-4": {
"IceHawk\\Bridges\\SessionForms\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"IceHawk\\Bridges\\SessionForms\\Tests\\": "tests/"
}
},
"scripts": {
"post-install-cmd": "Tooly\\ScriptHandler::installPharTools",
"post-update-cmd": "Tooly\\ScriptHandler::installPharTools"
},
"extra": {
"tools": {
"phpunit": {
"url": "https://phar.phpunit.de/phpunit.phar",
"only-dev": true
},
"phpmetrics": {
"url": "https://github.com/phpmetrics/PhpMetrics/raw/master/build/phpmetrics.phar",
"only-dev": true
},
"phpdox": {
"url": "https://github.com/theseer/phpdox/releases/download/0.8.1.1/phpdox-0.8.1.1.phar",
"only-dev": true
},
"coveralls": {
"url": "https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar",
"only-dev": true
}
}
}
}
23 changes: 23 additions & 0 deletions src/Exceptions/SessionFormsBridgeException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php declare(strict_types=1);
/**
* Copyright (c) 2016 Holger Woltersdorf & 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.
*/

namespace IceHawk\Bridges\SessionForms\Exceptions;

/**
* Class SessionFormsBridgeException
* @package IceHawk\Bridges\SessionForms\Exceptions
*/
class SessionFormsBridgeException extends \Exception
{

}
23 changes: 23 additions & 0 deletions src/SessionFormsBridge.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php declare(strict_types=1);
/**
* Copyright (c) 2016 Holger Woltersdorf & 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.
*/

namespace IceHawk\Bridges\SessionForms;

/**
* Class SessionFormsBridge
* @package IceHawk\Bridges\SessionForms
*/
class SessionFormsBridge
{

}
23 changes: 23 additions & 0 deletions tests/Unit/SessionFormsBridgeTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php declare(strict_types=1);
/**
* Copyright (c) 2016 Holger Woltersdorf & 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.
*/

namespace IceHawk\Bridges\SessionForms\Tests\Unit;

/**
* Class SessionFormsBridgeTest
* @package IceHawk\Bridges\SessionForms\Tests\Unit
*/
class SessionFormsBridgeTest extends \PHPUnit_Framework_TestCase
{

}
7 changes: 7 additions & 0 deletions tests/Unit/bootstrap.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php
/**
* Autoload script for phpunit
* @author hollodotme
*/

require(__DIR__ . '/../../vendor/autoload.php');

0 comments on commit 6445dff

Please sign in to comment.