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

Commit

Permalink
Merge branch 'hotfix/2'
Browse files Browse the repository at this point in the history
Close #2
  • Loading branch information
weierophinney committed Nov 21, 2017
2 parents d934c64 + 9c97a29 commit cb0866b
Show file tree
Hide file tree
Showing 24 changed files with 216 additions and 81 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/docs export-ignore
/test export-ignore
/.coveralls.yml export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.travis.yml export-ignore
/composer.lock export-ignore
/mkdocs.yml export-ignore
/phpcs.xml export-ignore
/phpunit.xml.dist export-ignore
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/clover.xml
/coveralls-upload.json
/phpunit.xml
/vendor/
vendor/
clover.xml
coveralls-upload.json
phpunit.xml
10 changes: 4 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ env:
global:
- COMPOSER_ARGS="--no-interaction"
- COVERAGE_DEPS="satooshi/php-coveralls"
- LEGACY_DEPS="phpunit/phpunit"

matrix:
include:
Expand All @@ -21,6 +20,7 @@ matrix:
- php: 5.6
env:
- DEPS=locked
- LEGACY_DEPS="phpunit/phpunit"
- php: 5.6
env:
- DEPS=latest
Expand All @@ -30,6 +30,7 @@ matrix:
- php: 7.0
env:
- DEPS=locked
- LEGACY_DEPS="phpunit/phpunit"
- php: 7.0
env:
- DEPS=latest
Expand All @@ -39,8 +40,8 @@ matrix:
- php: 7.1
env:
- DEPS=locked
- TEST_COVERAGE=true
- CS_CHECK=true
- TEST_COVERAGE=true
- php: 7.1
env:
- DEPS=latest
Expand All @@ -53,16 +54,13 @@ matrix:
- php: 7.2
env:
- DEPS=latest
allow_failures:
- php: 7.2

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 --ignore-platform-reqs
- if [[ $TRAVIS_PHP_VERSION =~ ^5.6 ]]; then travis_retry composer update $COMPOSER_ARGS --with-dependencies $LEGACY_DEPS ; fi
- if [[ $LEGACY_DEPS != '' ]]; then travis_retry composer update $COMPOSER_ARGS --with-dependencies $LEGACY_DEPS ; fi
- 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
Expand Down
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
# Changelog

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

Versions prior to 0.2.0 were released as the package "webimpress/zend-auradi-config".

## 0.2.0 - 2017-11-21

### Added

- Nothing.

### Changed

- Nothing.
- Renames the package to zendframework/zend-auradi-config.

### Deprecated

Expand Down
6 changes: 5 additions & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2017, Michał Bundyra
Copyright (c) 2017, Zend Technologies USA, Inc.
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
Expand All @@ -11,6 +11,10 @@ are permitted provided that the following conditions are met:
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.

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
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
Expand Down
38 changes: 18 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
# zend-auradi-config

[![Build Status](https://secure.travis-ci.org/webimpress/zend-auradi-config.svg?branch=master)](https://secure.travis-ci.org/webimpress/zend-auradi-config)
[![Coverage Status](https://coveralls.io/repos/github/webimpress/zend-auradi-config/badge.svg?branch=master)](https://coveralls.io/github/webimpress/zend-auradi-config?branch=master)
[![Build Status](https://secure.travis-ci.org/zendframework/zend-auradi-config.svg?branch=master)](https://secure.travis-ci.org/zendframework/zend-auradi-config)
[![Coverage Status](https://coveralls.io/repos/github/zendframework/zend-auradi-config/badge.svg?branch=master)](https://coveralls.io/github/zendframework/zend-auradi-config?branch=master)

This library provides utilities to configure
[PSR-11](http://www.php-fig.org/psr/psr-11/)
a [PSR-11](http://www.php-fig.org/psr/psr-11/) compatible
[Aura.Di container](https://github.com/auraphp/Aura.Di)
using ZendFramework ServiceManager configuration.
using zend-servicemanager configuration.

## Installation

Run the following to install this library:

```bash
$ composer require webimpress/zend-auradi-config
$ composer require zendframework/zend-auradi-config
```

## Configuration

To get configured [PSR-11 Container](http://www.php-fig.org/psr/psr-11/)
Aura.Di Container do the following:
To get a configured Aura.Di container, do the following:

```php
<?php
Expand All @@ -44,16 +43,19 @@ $container = $factory(

The `dependencies` sub associative array can contain the following keys:

- `services`: an associative array that maps a key to a service instance.
- `services`: an associative array that maps a key to a specific service instance.
- `invokables`: an associative array that map a key to a constructor-less
services, or services that do not require arguments to the constructor.
- `factories`: an associative array that map a key to a factory name, or any
callable.
- `aliases`: an associative array that map a key to a service key (or another
alias).
- `delegators`: an associative array that maps service keys to lists of
service; i.e., for services that do not require arguments to the constructor.
The key and service name may be the same; if they are not, the name is treated
as an alias.
- `factories`: an associative array that maps a service name to a factory class
name, or any callable. Factory classes must be instantiable without arguments,
and callable once instantiated (i.e., implement the `__invoke()` method).
- `aliases`: an associative array that maps an alias to a service name (or
another alias).
- `delegators`: an associative array that maps service names to lists of
delegator factory keys, see the
[delegators documentation](https://docs.zendframework.com/zend-servicemanager/delegators/)
[Expressive delegators documentation](https://docs.zendframework.com/zend-servicemanager/delegators/)
for more details.

> Please note, that the whole configuration is available in the `$container`
Expand All @@ -65,12 +67,8 @@ The `dependencies` sub associative array can contain the following keys:
## Using with Expressive
First you have to install the library:
```bash
$ composer require webimpress/zend-auradi-config
```
Replace the contents of `config/container.php` with the following:
Then replace contents of `config/container.php` with the following:
```php
<?php
Expand Down
22 changes: 12 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,28 @@
{
"name": "webimpress/zend-auradi-config",
"description": "PSR-11 Aura.DI container configurator for ZF applications",
"type": "library",
"homepage": "https://github.com/webimpress/zend-auradi-config",
"name": "zendframework/zend-auradi-config",
"description": "PSR-11 Aura.DI container configurator for ZF and Expressive applications",
"license": "BSD-3-Clause",
"keywords": [
"expressive",
"zf",
"zendframework",
"aura di",
"container",
"psr-11"
],
"support": {
"issues": "https://github.com/webimpress/zend-auradi-config/issues",
"source": "https://github.com/webimpress/zend-auradi-config"
},
"config": {
"sort-packages": true
"issues": "https://github.com/zendframework/zend-auradi-config/issues",
"source": "https://github.com/zendframework/zend-auradi-config",
"rss": "https://github.com/zendframework/zend-auradi-config/releases.atom",
"slack": "https://zendframework-slack.herokuapp.com",
"forum": "https://discourse.zendframework.com/c/questions/expressive"
},
"require": {
"php": "^5.6 || ^7.0",
"aura/di": "^3.4"
},
"require-dev": {
"phpunit/phpunit": "^5.7.22 || ^6.3.1",
"phpunit/phpunit": "^5.7.23 || ^6.4.3",
"zendframework/zend-coding-standard": "~1.0.0"
},
"conflict": {
Expand All @@ -39,6 +38,9 @@
"ZendTest\\AuraDi\\Config\\": "test"
}
},
"config": {
"sort-packages": true
},
"scripts": {
"check": [
"@cs-check",
Expand Down
Loading

0 comments on commit cb0866b

Please sign in to comment.