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

Update to use PSR-11 for plugin managers #36

Merged
merged 17 commits into from
Feb 16, 2017
Merged
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
5 changes: 5 additions & 0 deletions .docheader
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/**
* @see https://github.com/zendframework/zend-config for the canonical source repository
* @copyright Copyright (c) %regexp:(20\d{2}-)?20\d{2}% Zend Technologies USA Inc. (http://www.zend.com)
* @license https://github.com/zendframework/zend-config/blob/master/LICENSE.md New BSD License
*/
11 changes: 6 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ cache:
env:
global:
- COMPOSER_ARGS="--no-interaction"
- COVERAGE_DEPS="satooshi/php-coveralls:^1.0"
- LEGACY_DEPS="phpunit/phpunit"
- SITE_URL="https://zendframework.github.io/zend-config"
- GH_USER_NAME="Matthew Weier O'Phinney"
- GH_USER_EMAIL="matthew@weierophinney.net"
Expand Down Expand Up @@ -68,18 +70,17 @@ before_install:
- travis_retry composer self-update

install:
- if [[ $TRAVIS_PHP_VERSION =~ ^5.6 && -d vendor/composer ]]; then travis_retry composer update $COMPOSER_ARGS --with-dependencies phpunit/phpunit ; fi
- if [[ $TRAVIS_PHP_VERSION =~ ^5.6 && ! -d vendor/composer ]]; then travis_retry composer update $COMPOSER_ARGS --ignore-platform-reqs --with-dependencies phpunit/phpunit ; fi
- if [[ $TRAVIS_PHP_VERSION =~ ^5.6 && $DEPS == 'locked' ]]; then travis_retry composer update $COMPOSER_ARGS --with-dependencies phpunit/phpunit ; fi
- 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 [[ $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
- if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry composer require --dev $COMPOSER_ARGS satooshi/php-coveralls:^1.0 ; fi
- if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry composer require --dev $COMPOSER_ARGS $COVERAGE_DEPS ; fi
- composer show

script:
- if [[ $TEST_COVERAGE == 'true' ]]; then composer test-coverage ; else composer test ; fi
- if [[ $CHECK_CS == 'true' ]]; then composer cs-check ; fi
- if [[ $CHECK_CS == 'true' ]]; then composer license-check ; fi
- if [[ $DEPLOY_DOCS == "true" && "$TRAVIS_TEST_RESULT" == "0" ]]; then travis_retry curl -sSL https://raw.githubusercontent.com/zendframework/zf-mkdoc-theme/master/theme-installer.sh | bash ; fi

after_script:
Expand Down
45 changes: 42 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,58 @@

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

## 2.7.0 - TBD
## 3.0.0 - TBD

### Added

- Nothing.
- [#36](https://github.com/zendframework/zend-config/pull/36) adds support for
[PSR-11](http://www.php-fig.org/psr/psr-11/).

- [#36](https://github.com/zendframework/zend-config/pull/36) adds the class
`Zend\Config\StandaloneReaderPluginManager` for managing config reader plugins.
This implementation implements the PSR-11 `ContainerInterface`, and uses a
hard-coded list of reader plugins.

- [#36](https://github.com/zendframework/zend-config/pull/36) adds the class
`Zend\Config\StandaloneWriterPluginManager` for managing config writer plugins.
This implementation implements the PSR-11 `ContainerInterface`, and uses a
hard-coded list of writer plugins.

### Changes

- [#36](https://github.com/zendframework/zend-config/pull/36) updates the
`Zend\Config\Factory::getReaderPluginManager()` method to lazy-load a
`StandaloneReaderPluginManager` by default, instead of a
`ReaderPluginManager`, allowing usage out-of-the-box without requiring
zend-servicemanager.

- [#36](https://github.com/zendframework/zend-config/pull/36) updates the
`Zend\Config\Factory::setReaderPluginManager()` method to typehint against
`Psr\Container\ContainerInterface` instead of `ReaderPluginManager`. If you
were extending and overriding that method, you will need to update your
signature.

- [#36](https://github.com/zendframework/zend-config/pull/36) updates the
`Zend\Config\Factory::getWriterPluginManager()` method to lazy-load a
`StandaloneWriterPluginManager` by default, instead of a
`WriterPluginManager`, allowing usage out-of-the-box without requiring
zend-servicemanager.

- [#36](https://github.com/zendframework/zend-config/pull/36) updates the
`Zend\Config\Factory::setWriterPluginManager()` method to typehint against
`Psr\Container\ContainerInterface` instead of `WriterPluginManager`. If you
were extending and overriding that method, you will need to update your
signature.

### Deprecated

- Nothing.

### Removed

- Nothing.
- [#36](https://github.com/zendframework/zend-config/pull/36) removes usage of
zend-json as a JSON de/serializer in the JSON writer and reader; the
component now requires ext/json is installed to use these features.

### Fixed

Expand Down
29 changes: 18 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,25 @@
},
"require": {
"php": "^5.6 || ^7.0",
"zendframework/zend-stdlib": "^2.7 || ^3.0"
"ext-json": "*",
"zendframework/zend-stdlib": "^2.7.7 || ^3.1",
"psr/container": "^1.0"
},
"require-dev": {
"zendframework/zend-filter": "^2.6",
"zendframework/zend-i18n": "^2.6",
"zendframework/zend-json": "^2.6.1",
"zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3",
"phpunit/phpunit": "^5.7 || ^6.0",
"zendframework/zend-coding-standard": "~1.0.0"
"zendframework/zend-coding-standard": "~1.0.0",
"zendframework/zend-filter": "^2.7.1",
"zendframework/zend-i18n": "^2.7.3",
"zendframework/zend-servicemanager": "^2.7.8 || ^3.2.1",
"malukenho/docheader": "^0.1.5",
"phpunit/phpunit": "^5.7 || ^6.0"
},
"conflict": {
"container-interop/container-interop": "<1.2.0"
},
"suggest": {
"zendframework/zend-filter": "Zend\\Filter component",
"zendframework/zend-i18n": "Zend\\I18n component",
"zendframework/zend-json": "Zend\\Json to use the Json reader or writer classes",
"zendframework/zend-servicemanager": "Zend\\ServiceManager for use with the Config Factory to retrieve reader and writer instances"
"zendframework/zend-filter": "^2.7.1; install if you want to use the Filter processor",
"zendframework/zend-i18n": "^2.7.3; install if you want to use the Translator processor",
"zendframework/zend-servicemanager": "^2.7.8 || ^3.2.1; if you need an extensible plugin manager for use with the Config Factory"
},
"minimum-stability": "dev",
"prefer-stable": true,
Expand All @@ -45,11 +49,14 @@
},
"scripts": {
"check": [
"@license-check",
"@cs-check",
"@test"
],
"cs-check": "phpcs",
"cs-fix": "phpcbf",
"license-check": "docheader check src/",
"license-check-all": "docheader check src/ test/",
"test": "phpunit --colors=always",
"test-coverage": "phpunit --colors=always --coverage-clover clover.xml",
"upload-coverage": "coveralls -v"
Expand Down
Loading