Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

Prepare module for v3 ZF component releases #17

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/test export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.travis.yml export-ignore
phpcs.xml export-ignore
phpunit.xml.dist export-ignore
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
composer.lock
vendor/
phpunit.xml
45 changes: 36 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,60 @@ language: php
cache:
directories:
- $HOME/.composer/cache
- vendor

env:
global:
- COMPOSER_ARGS="--no-interaction --ignore-platform-reqs"

matrix:
fast_finish: true
include:
- php: 5.5
- php: 5.6
env:
- DEPS=lowest
- php: 5.6
env:
- EXECUTE_CS_CHECK=true
- DEPS=locked
- php: 5.6
env:
- EXECUTE_COVERAGE=true
- DEPS=latest
- php: 7
env:
- DEPS=lowest
- php: 7
env:
- DEPS=locked
- CS_CHECK=true
- php: 7
env:
- DEPS=latest
- php: hhvm
env:
- DEPS=lowest
- php: hhvm
env:
- DEPS=locked
- php: hhvm
env:
- DEPS=latest
allow_failures:
- php: 7
- php: hhvm

notifications:
irc: "irc.freenode.org#apigility-dev"
email: false

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

install:
- travis_retry composer install --no-interaction --ignore-platform-reqs --prefer-source
- 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
- travis_retry composer install $COMPOSER_ARGS
- composer show

script:
- ./vendor/bin/phpunit
- if [[ $EXECUTE_CS_CHECK == 'true' ]]; then ./vendor/bin/phpcs ; fi
- composer test
- if [[ $CS_CHECK == 'true' ]]; then composer cs-check ; fi
43 changes: 43 additions & 0 deletions CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Contributor Code of Conduct

The Zend Framework project adheres to [The Code Manifesto](http://codemanifesto.com)
as its guidelines for contributor interactions.

## The Code Manifesto

We want to work in an ecosystem that empowers developers to reach their
potential — one that encourages growth and effective collaboration. A space that
is safe for all.

A space such as this benefits everyone that participates in it. It encourages
new developers to enter our field. It is through discussion and collaboration
that we grow, and through growth that we improve.

In the effort to create such a place, we hold to these values:

1. **Discrimination limits us.** This includes discrimination on the basis of
race, gender, sexual orientation, gender identity, age, nationality, technology
and any other arbitrary exclusion of a group of people.
2. **Boundaries honor us.** Your comfort levels are not everyone’s comfort
levels. Remember that, and if brought to your attention, heed it.
3. **We are our biggest assets.** None of us were born masters of our trade.
Each of us has been helped along the way. Return that favor, when and where
you can.
4. **We are resources for the future.** As an extension of #3, share what you
know. Make yourself a resource to help those that come after you.
5. **Respect defines us.** Treat others as you wish to be treated. Make your
discussions, criticisms and debates from a position of respectfulness. Ask
yourself, is it true? Is it necessary? Is it constructive? Anything less is
unacceptable.
6. **Reactions require grace.** Angry responses are valid, but abusive language
and vindictive actions are toxic. When something happens that offends you,
handle it assertively, but be respectful. Escalate reasonably, and try to
allow the offender an opportunity to explain themselves, and possibly correct
the issue.
7. **Opinions are just that: opinions.** Each and every one of us, due to our
background and upbringing, have varying opinions. The fact of the matter, is
that is perfectly acceptable. Remember this: if you respect your own
opinions, you should respect the opinions of others.
8. **To err is human.** You might not intend it, but mistakes do happen and
contribute to build experience. Tolerate honest mistakes, and don't hesitate
to apologize if you make one yourself.
22 changes: 14 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,25 +50,31 @@ First, use [Composer](https://getcomposer.org) to install all dependencies:
$ composer install
```

To run tests, use the PHPUnit executable installed by Composer:
To run tests:

```console
$ ./vendor/bin/phpunit
$ composer test
```

## CODING STANDARDS

While Apigility uses Zend Framework 2 coding standards, in practice, we check
standards using [php-cs-fixer](https://github.com/fabpot/PHP-CS-Fixer) (which is
installed via Composer with other dependencies). To check for CS issues:
standards against PSR-1/2. To check for CS issues:

```console
$ ./vendor/bin/php-cs-fixer fix . --dry-run
$ composer cs-check
```

This will report CS issues. Alternately, you can have the tool fix them for you
by omitting the `--dry-run` switch:
This will report CS issues. You can also attempt to fix many reported errors
automatically:

```console
$ ./vendor/bin/php-cs-fixer fix .
$ composer cs-fix
```

If you use `cs-fix` to fix issues, make certain you add and commit any files
changed!

## Conduct

Please see our [CONDUCT.md](CONDUCT.md) to understand expected behavior when interacting with others in the project.
19 changes: 10 additions & 9 deletions LICENSE.txt → LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
Copyright (c) 2014, Zend Technologies USA, Inc.
Copyright (c) 2014-2016, Zend Technologies USA, Inc.

All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
- Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
- Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

* Neither the name of Zend Technologies USA, Inc. nor the names of its
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.
- Neither the name of Zend Technologies USA, Inc. nor the names of its
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
Expand Down
85 changes: 0 additions & 85 deletions Module.php

This file was deleted.

25 changes: 15 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ ZF Configuration
Introduction
------------

`zf-configuration` is a module that provides configuration services that provide for the
runtime management and modification of ZF2 application based configuration files.
zf-configuration is a module that provides configuration services that provide for the
runtime management and modification of Zend Framework application configuration files.

Requirements
------------
Expand All @@ -20,14 +20,14 @@ Installation
Run the following `composer` command:

```console
$ composer require "zfcampus/zf-configuration:~1.0-dev"
$ composer require zfcampus/zf-configuration
```

Alternately, manually add the following to your `composer.json`, in the `require` section:

```javascript
"require": {
"zfcampus/zf-configuration": "~1.0-dev"
"zfcampus/zf-configuration": "^1.2"
}
```

Expand All @@ -37,16 +37,21 @@ Finally, add the module name to your project's `config/application.config.php` u
key:

```php
return array(
return [
/* ... */
'modules' => array(
'modules' => [
/* ... */
'ZF\Configuration',
),
],
/* ... */
);
];
```

> ### zf-component-installer
>
> If you use [zf-component-installer](https://github.com/zendframework/zf-component-installer),
> that plugin will install zf-configuration as a module for you.

Configuration
-------------

Expand All @@ -55,10 +60,10 @@ Configuration
The top-level configuration key for user configuration of this module is `zf-configuration`.

```php
'zf-configuration' => array(
'zf-configuration' => [
'config_file' => 'config/autoload/development.php',
'enable_short_array' => false,
),
],
```

#### Key: `enable_short_array`
Expand Down
Loading