Skip to content

Commit

Permalink
Merge pull request #29 from sandrokeil/develop
Browse files Browse the repository at this point in the history
make the depth of the configuration array flexible
  • Loading branch information
sandrokeil committed Mar 5, 2016
2 parents bca71ac + 668e186 commit 3af5ade
Show file tree
Hide file tree
Showing 55 changed files with 1,451 additions and 712 deletions.
3 changes: 1 addition & 2 deletions .coveralls.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
coverage_clover: build/logs/clover.xml
json_path: coveralls-upload.json
src_dir: src
json_path: build/logs/coveralls-upload.json
8 changes: 8 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/test export-ignore
/vendor export-ignore
.coveralls.yml export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.travis.yml export-ignore
phpcs.xml.dist export-ignore
phpunit.xml.dist export-ignore
15 changes: 14 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
.buildpath
.DS_Store
.idea
.project
.settings/
.*.sw*
.*.un~
nbproject
tmp/

clover.xml
composer.lock
coveralls-upload.json
phpcs.xml
phpunit.xml
vendor
html
12 changes: 8 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ sudo: false

language: php

branches:
except:
- /^release-.*$/

cache:
directories:
- $HOME/.composer/cache
Expand All @@ -11,12 +15,12 @@ matrix:
fast_finish: true
include:
- php: 5.5
- php: 5.6
env:
- EXECUTE_CS_CHECK=true
- php: 5.6
- php: 7
env:
- EXECUTE_TEST_COVERALLS=true
- php: 7
- php: hhvm

before_install:
Expand All @@ -25,13 +29,13 @@ before_install:
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then composer require --no-update satooshi/php-coveralls:dev-master ; fi

install:
- travis_retry composer install --no-interaction --ignore-platform-reqs --prefer-source
- travis_retry composer install --no-interaction --prefer-source
- composer info -i

script:
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then ./vendor/bin/phpunit ; fi
- if [[ $EXECUTE_TEST_COVERALLS != 'true' ]]; then ./vendor/bin/phpunit --no-coverage ; fi
- if [[ $EXECUTE_CS_CHECK == 'true' ]]; then ./vendor/bin/phpcs --standard=PSR2 ./src/ ./test ./benchmark; fi
- if [[ $EXECUTE_CS_CHECK == 'true' ]]; then ./vendor/bin/phpcs ; fi

after_script:
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then ./vendor/bin/coveralls ; fi
Expand Down
33 changes: 32 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,38 @@
# Interop Config CHANGELOG
# Changelog

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

## 1.0.0 (2015-03-05)

> This release contains BC breaks, but upgrade path is simple.
### Added

* [#26](https://github.com/sandrokeil/interop-config/pull/26): `dimensions()` method to `RequiresConfig` to make configuration depth flexible

### Deprecated

* Nothing

### Removed

* [#26](https://github.com/sandrokeil/interop-config/pull/26): `vendorName()` and `packageName()` method from `RequiresConfig`, replaced by `dimensions()` method
* It's recommended to remove the methods and use the values directly in `dimensions()` to increase performance

```php
public function dimensions()
{
return [$this->vendorName(), $this->packageName()];
}
```

* [#26](https://github.com/sandrokeil/interop-config/pull/26): `RequiresContainerId` interface is renamed to `RequiresConfigId`
* use the container id as a second argument by `options()` method.

### Fixed

* [#28](https://github.com/sandrokeil/interop-config/pull/28): Throws exception if dimensions are set but default options are available and no mandatory options configured

## 0.3.1 (2015-10-21)

### Added
Expand Down
64 changes: 49 additions & 15 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# CONTRIBUTING
# Contributing

## RESOURCES
Visit [github.com/sandrokeil/interop-config/](https://github.com/sandrokeil/interop-config/ "Project Website") for the project website.

If you wish to contribute to interop-config, please be sure to read to the following resources:
- Make sure you have execute `composer install`
- Be sure you are in the root directory

- Coding Standards: [PSR-0/1/2/4](https://github.com/php-fig/fig-standards/tree/master/accepted)
- Git Guide: [README-GIT.md](README-GIT.md)
## Resources

If you are working on new features, or refactoring an existing
component, please create a proposal. You can do this in on the RFC's
page, https://github.com/sandrokeil/interop-config/wiki/RFCs.
If you wish to contribute to `interop-config`, please be sure to read to the following resources:

## RUNNING TESTS
- Coding Standards: [PSR-0/1/2/4](https://github.com/php-fig/fig-standards/tree/master/accepted)
- Git Guide: [README-GIT.md](https://github.com/sandrokeil/interop-config/blob/master/README-GIT.md)

To run tests:
If you are working on new features, or refactoring an existing component, please create an issue first, so we can discuss
it.

- Make sure you have a execute `composer install`
- Be sure you are in the root directory
- Execute PHPUnit
## Running tests

To run tests execute *phpunit*:

```sh
$ ./vendor/bin/phpunit
Expand All @@ -31,10 +31,44 @@ To do so:
- Edit `TestConfig.php` to enable any specific functionality you want to test, as well as to provide test values to
utilize.

## RUNNING BENCHMARKS
## Running PHPCodeSniffer

To check coding standards execute *phpcs*:

```sh
$ ./vendor/bin/phpcs
```

To auto fix coding standard issues execute:

```sh
$ ./vendor/bin/phpcbf
```

To run benchmarks execute phpbench
## Running benchmarks

To run benchmarks execute *phpbench*:

```sh
$ ./vendor/bin/phpbench run --report=aggregate
```

## Generate documentation

To generate the documentation execute *bookdown*:

```sh
$ ./vendor/bin/bookdown doc/bookdown.json
```

## Composer shortcuts

For every program above there are shortcuts defined in the `composer.json` file.

* `check`: Executes PHPCodeSniffer and PHPUnit
* `cs`: Executes PHPCodeSniffer
* `cs-fix`: Executes PHPCodeSniffer and auto fixes issues
* `test`: Executes PHPUnit
* `test-coverage`: Executes PHPUnit with code coverage
* `docs`: Generates awesome Bookdown.io docs
* `benchmark`: Executes PHPBench
2 changes: 1 addition & 1 deletion LICENSE.txt → LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
New BSD License
===============

Copyright (c) 2015, Sandro Keil
Copyright (c) 2015-2016, Sandro Keil
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
63 changes: 31 additions & 32 deletions README-GIT.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,43 @@
# USING THE GIT REPOSITORY
# Using GIT

## Setup your own public github repository
## Setup your own public GitHub repository

Your first step is to establish a public repository from which i can pull your work into the master repository.
Your first step is to establish a public repository from which you can pull your work into the master repository.

1. Setup a GitHub account (http://github.com/), if you haven't yet
2. Fork the interop-config repository (http://github.com/sandrokeil/interop-config)
1. Setup a [GitHub account](https://github.com/), if you haven't yet
2. Fork the [interop-config repository](https://github.com/sandrokeil/interop-config)
3. Clone your fork locally and enter it (use your own GitHub username in the statement below)

```sh
% git clone [email protected]:<username>/interop-config.git
% cd interop-config
$ git clone [email protected]:[your username]/interop-config.git
$ cd interop-config
```

4. Add a remote to the canonical interop-config repository, so you can keep your fork
up-to-date:
4. Add a remote to the canonical `interop-config` repository, so you can keep your fork up-to-date:

```sh
% git remote add upstream https://github.com/sandrokeil/interop-config.git
% git fetch upstream
$ git remote add upstream https://github.com/sandrokeil/interop-config.git
$ git fetch upstream
```

## Keeping Up-to-Date

Periodically, you should update your fork to match the canonical interop-config repository. we have
added a remote to the interop-config repository, which allows you to do the following:
Periodically, you should update your fork to match the canonical `interop-config` repository. we have
added a remote to the `interop-config` repository, which allows you to do the following:

```sh
% git checkout master
% git pull upstream master
$ git checkout master
$ git pull upstream master
- OPTIONALLY, to keep your remote up-to-date -
% git push origin
$ git push origin
```

If you're tracking other branches -- for example, the "develop" branch, where new feature development occurs --
If you're tracking other branches -- for example, the *develop* branch, where new feature development occurs --
you'll want to do the same operations for that branch; simply substitute "develop" for "master".

## Working on interop-config

When working on interop-config, we recommend you do each new feature or bugfix in a new branch. This simplifies the
When working on `interop-config`, we recommend you do each new feature or bugfix in a new branch. This simplifies the
task of code review as well as of merging your changes into the canonical repository.

A typical work flow will then consist of the following:
Expand All @@ -52,37 +51,37 @@ A typical work flow will then consist of the following:
The mechanics of this process are actually quite trivial. Below, we will create a branch for fixing an issue in the tracker.

```sh
% git checkout -b 3452
$ git checkout -b 3452
Switched to a new branch '3452'
```
... do some work ...

```sh
% git commit
$ git commit
```
... write your log message ...

```sh
% git push origin HEAD:3452
$ git push origin HEAD:3452
Counting objects: 38, done.
Delta compression using up to 2 threads.
Compression objects: 100% (18/18), done.
Writing objects: 100% (20/20), 8.19KiB, done.
Compression objects: 100$ (18/18), done.
Writing objects: 100$ (20/20), 8.19KiB, done.
Total 20 (delta 12), reused 0 (delta 0)
To ssh://[email protected]/sandrokeil/interop-config.git
g5342..9k3532 HEAD -> master
```

You can do the pull request from github. Navigate to your repository, select the branch you just created, and then
select the "Pull Request" button in the upper right. Select the user "sandrokeil" as the recipient.
You can do the pull request from GitHub. Navigate to your repository, select the branch you just created, and then
select the "Pull Request" button in the upper right. Select the user *sandrokeil* as the recipient.

### What branch to issue the pull request against?
### Branch to issue the pull request

Which branch should you issue a pull request against?

- For fixes against the stable release, issue the pull request against the "master" branch.
- For fixes against the stable release, issue the pull request against the *master* branch.
- For new features, or fixes that introduce new elements to the public API
(such as new public methods or properties), issue the pull request against the "develop" branch.
(such as new public methods or properties), issue the pull request against the *develop* branch.

## Branch Cleanup

Expand All @@ -95,22 +94,22 @@ branches.
- Local branch cleanup
```sh
% git branch -d <branchname>
$ git branch -d <branchname>
```
- Remote branch removal
```sh
% git push origin :<branchname>
$ git push origin :<branchname>
```
## FEEDS AND EMAILS
## Feed and emails
RSS feeds may be found at:
`https://github.com/sandrokeil/interop-config/commits/<branch>.atom`
where &lt;branch&gt; is a branch in the repository.
To subscribe to git email notifications, simply watch or fork the interop-config repository on GitHub.
To subscribe to git email notifications, simply watch or fork the `interop-config` repository on GitHub.
Loading

0 comments on commit 3af5ade

Please sign in to comment.