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

Commit 741c1f0

Browse files
committed
Initial commit
1 parent 9ae9969 commit 741c1f0

19 files changed

+2828
-5
lines changed

.coveralls.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
coverage_clover: clover.xml
2+
json_path: coveralls-upload.json

.docheader

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/**
2+
* @see https://github.com/zendframework/zend-config-aggregator-modulemanager for the canonical source repository
3+
* @copyright Copyright (c) %regexp:(20\d{2}-)?20\d{2}% Zend Technologies USA Inc. (http://www.zend.com)
4+
* @license https://github.com/zendframework/zend-config-aggregator-modulemanager/blob/master/LICENSE.md
5+
* New BSD License
6+
*/

.gitattributes

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/.coveralls.yml export-ignore
2+
/.docheader export-ignore
3+
/.gitattributes export-ignore
4+
/.gitignore export-ignore
5+
/.travis.yml export-ignore
6+
/composer.lock export-ignore
7+
/docs/ export-ignore
8+
/mkdocs.yml export-ignore
9+
/phpcs.xml export-ignore
10+
/phpunit.xml.dist export-ignore
11+
/test/ export-ignore

.gitignore

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
composer.phar
1+
/clover.xml
2+
/coveralls-upload.json
3+
/docs/html/
4+
/phpunit.xml
25
/vendor/
3-
4-
# Commit your application's lock file http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file
5-
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
6-
# composer.lock
6+
/zf-mkdoc-theme.tgz
7+
/zf-mkdoc-theme/

.travis.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
sudo: false
2+
3+
language: php
4+
5+
branches:
6+
except:
7+
- /^release-.*$/
8+
- /^ghgfk-.*$/
9+
10+
cache:
11+
directories:
12+
- $HOME/.composer/cache
13+
- $HOME/.local
14+
- zf-mkdoc-theme
15+
16+
services:
17+
- mongodb
18+
19+
env:
20+
global:
21+
- SITE_URL="https://zendframework.github.io/zend-cache-mongo"
22+
- GH_USER_NAME="Matthew Weier O'Phinney"
23+
- GH_USER_EMAIL="matthew@weierophinney.net"
24+
- GH_REF="github.com/zendframework/zend-cache-mongo.git"
25+
- secure: "ZYYlfFWTde5MCn6twsm/+s+mx4bLEaVFFG+tuaeiz7nCx+z495D6FxruzBbY1zheX9rNo9qReDo0Tyfn2wrUH8SJYbR9iKDqB95GPDDPW+I23Mw3Uuddr8XqbtabTJVqEQg6iAu7IIQG4TvFFmdq/g26jWim8Cngg/5zZh4Q2GuLSjIKRJBpLe7mSTjQVqaApS/a8wmvPJiSoqxWmY8Botc88ZXMmkRDPQoqEdZOeS4i029cGMXUnzGj7Vl7qwfol6Yj/R441Hd84Vt8P8BOdRyW0tjmllXLXJUYFKCcP5fEqIujbU68FwJMidCPzBcXv2N0klW43ViVwdJD6gBgZStwOyENGeEw1VcbZ6JReMa68F1mtqLhBhZtF8WRUI8+TYMYmLPGMVTcets4P3nIB18uX1CittwGDD2y2OL8MDvuIuaSQFoj/PdUb+BC/DvvmtPGnF6MLTAUjqNlxYbmzopufDEtivWHsqeyxHZj0L0HD5KkMslD9wnngfi+lcQ5e3iFQe/H5vQKE0BfooukxErIXk00cwwMoMjFY4v95CS0BKFhA4HMclKpGEA94CH4STxwyD2Nz/z6iGPqkZuzqDLOKhLr2FsY7bFbvEdNu57G3PGahtYJtc31lcnwKf2t1ALGcG9LS0/ezJSzqx659hWL0B5qgHjCNDnAyKJcNxM="
26+
27+
matrix:
28+
include:
29+
- php: 5.6
30+
env:
31+
- DEPS=lowest
32+
- CHECK_CS=true
33+
#- DEPLOY_DOCS="$(if [[ $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST == 'false' ]]; then echo -n 'true' ; else echo -n 'false' ; fi)"
34+
#- PATH="$HOME/.local/bin:$PATH"
35+
- php: 5.6
36+
env:
37+
- DEPS=latest
38+
- TEST_COVERAGE=true
39+
40+
notifications:
41+
irc: "irc.freenode.org#zftalk.dev"
42+
email: false
43+
44+
before_install:
45+
- if [[ $TRAVIS_PHP_VERSION != "hhvm" && $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini ; fi
46+
- if [[ $TRAVIS_PHP_VERSION != 'hhvm' ]]; then phpenv config-add .ci/mongo.ini ; fi
47+
48+
install:
49+
- if [[ $DEPS == 'latest' ]]; then travis_retry composer update ; fi
50+
- if [[ $DEPS == 'lowest' ]]; then travis_retry composer update --prefer-lowest --prefer-stable ; fi
51+
- if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry composer require --dev satooshi/php-coveralls:^1.0 ; fi
52+
- travis_retry composer install
53+
- composer show
54+
55+
script:
56+
- if [[ $TEST_COVERAGE == 'true' ]]; then
57+
composer run-script test -- --colors=always --coverage-clover clover.xml ;
58+
else
59+
composer run-script test -- --colors=always ;
60+
fi
61+
- if [[ $CHECK_CS == 'true' ]]; then composer cs-check ; fi
62+
- if [[ $DEPLOY_DOCS == "true" && "$TRAVIS_TEST_RESULT" == "0" ]]; then
63+
travis_retry curl -sSL https://raw.githubusercontent.com/zendframework/zf-mkdoc-theme/master/theme-installer.sh | bash ;
64+
fi
65+
66+
after_script:
67+
- if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry ./vendor/bin/coveralls -v -x clover.xml ; fi
68+
69+
after_success:
70+
- if [[ $DEPLOY_DOCS == "true" ]]; then ./zf-mkdoc-theme/deploy.sh ; fi

CHANGELOG.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file, in reverse chronological order by release.
4+
5+
## 1.0.0 - TBD
6+
7+
### Added
8+
9+
- Nothing.
10+
11+
### Changed
12+
13+
- Nothing.
14+
15+
### Deprecated
16+
17+
- Nothing.
18+
19+
### Removed
20+
21+
- Nothing.
22+
23+
### Fixed
24+
25+
- Nothing.
26+

LICENSE.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Copyright (c) 2018, Zend Technologies USA, Inc.
2+
All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without modification,
5+
are permitted provided that the following conditions are met:
6+
7+
- Redistributions of source code must retain the above copyright notice, this
8+
list of conditions and the following disclaimer.
9+
10+
- Redistributions in binary form must reproduce the above copyright notice, this
11+
list of conditions and the following disclaimer in the documentation and/or
12+
other materials provided with the distribution.
13+
14+
- Neither the name of Zend Technologies USA, Inc. nor the names of its
15+
contributors may be used to endorse or promote products derived from this
16+
software without specific prior written permission.
17+
18+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
22+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
25+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# zend-config-aggregator-modulemanager
2+
3+
[![Build Status](https://secure.travis-ci.org/zendframework/zend-config-aggregator-modulemanager.svg?branch=master)](https://secure.travis-ci.org/zendframework/zend-config-aggregator-modulemanager)
4+
[![Coverage Status](https://coveralls.io/repos/github/zendframework/zend-config-aggregator-modulemanager/badge.svg?branch=master)](https://coveralls.io/github/zendframework/zend-config-aggregator-modulemanager?branch=master)
5+
6+
Provides an extension to the `zendframework/zend-config-aggregator` so `zendframework/zend-mvc`
7+
modules can be parsed into the new config structure, e.g. for `zendframework/zend-expressive`
8+
or other projects.
9+
10+
## Usage
11+
12+
```php
13+
use Zend\ConfigAggregator\ConfigAggregator;
14+
use Zend\ConfigAggregator\ModuleManager\ZendModuleProvider;
15+
use My\Zend\MvcModule\Module as MyZendMvcModule;
16+
17+
namespace My\Zend\MvcModule
18+
{
19+
class Module
20+
{
21+
public function getConfig()
22+
{
23+
return [
24+
'service_manager' => [
25+
'invokables' => [
26+
Service\MyService::class => Service\MyService::class,
27+
],
28+
],
29+
];
30+
}
31+
}
32+
}
33+
34+
namespace My\Zend\MvcModule\Service {
35+
class MyService
36+
{
37+
}
38+
}
39+
40+
$aggregator = new ConfigAggregator([
41+
new ZendModuleProvider(new MyZendMvcModule()),
42+
]);
43+
44+
var_dump($aggregator->getMergedConfig());
45+
```
46+
47+
Using this provider, the Module class is being parsed for `zendframework/zend-modulemanager` interfaces or methods.
48+
Just the same way as `zendframework/zend-mvc` does. Therefore, the output of the example would be:
49+
50+
```php
51+
array(1) {
52+
'dependencies' =>
53+
array(1) {
54+
'invokables' =>
55+
array(1) {
56+
'My\Zend\MvcModule\Service\MyService' =>
57+
string(35) "My\Zend\MvcModule\Service\MyService"
58+
}
59+
}
60+
}
61+
```
62+
63+
For more details, please refer to the [documentation](https://docs.zendframework.com/zend-config-aggregator-modulemanager/).
64+
65+
-----
66+
67+
- File issues at https://github.com/zendframework/zend-config-aggregator-modulemanager/issues
68+
- Documentation is at https://docs.zendframework.com/zend-config-aggregator-modulemanager/

composer.json

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"name": "zendframework/zend-config-aggregator-modulemanager",
3+
"description": "zendframework/zend-modulemanager adapter for zendframework/zend-config-aggregator to provide zendframework/zend-mvc Module configuration which do not provide a ConfigProvider",
4+
"license": "BSD-3-Clause",
5+
"authors": [
6+
{
7+
"name": "Maximilian Bösing",
8+
"email": "max@boesing.email"
9+
}
10+
],
11+
"require": {
12+
"php": "^5.6 || 7.0",
13+
"zendframework/zend-config-aggregator": "^1.1",
14+
"zendframework/zend-modulemanager": "^2.8"
15+
},
16+
"require-dev": {
17+
"malukenho/docheader": "^0.1.7",
18+
"phpunit/phpunit": "5.7.21 || 6.3",
19+
"zendframework/zend-coding-standard": "~1.0.0",
20+
"zendframework/zend-config": "^3.1",
21+
"zendframework/zend-servicemanager": "^3.3"
22+
},
23+
"autoload": {
24+
"psr-4": {
25+
"Zend\\ConfigAggregator\\ModuleManager\\": "src/"
26+
}
27+
},
28+
"autoload-dev": {
29+
"psr-4": {
30+
"ZendTest\\ConfigAggregator\\ModuleManager\\": "test/"
31+
}
32+
},
33+
"config": {
34+
"sort-packages": true
35+
},
36+
"extra": {
37+
"branch-alias": {
38+
"dev-master": "1.0.x-dev"
39+
}
40+
},
41+
"scripts": {
42+
"check": [
43+
"@cs-check",
44+
"@test"
45+
],
46+
"cs-check": "phpcs",
47+
"cs-fix": "phpcbf",
48+
"test": "phpunit --colors=always",
49+
"test-coverage": "phpunit --colors=always --coverage-clover clover.xml"
50+
}
51+
}

0 commit comments

Comments
 (0)