Skip to content

Commit

Permalink
Rewriting as Laminas Project package
Browse files Browse the repository at this point in the history
  • Loading branch information
weierophinney committed Dec 31, 2019
1 parent f701b0d commit e8fc780
Show file tree
Hide file tree
Showing 74 changed files with 626 additions and 941 deletions.
18 changes: 10 additions & 8 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
/test export-ignore
/vendor export-ignore
.coveralls.yml export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.travis.yml export-ignore
.php_cs export-ignore
phpunit.xml.dist export-ignore
/.coveralls.yml export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.travis.yml export-ignore
/benchmarks/ export-ignore
/doc/ export-ignore
/mkdocs.yml export-ignore
/phpcs.xml export-ignore
/phpunit.xml.dist export-ignore
/test/ export-ignore
25 changes: 8 additions & 17 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
.buildpath
.DS_Store
.idea
.project
.settings/
.*.sw*
.*.un~
nbproject
doc/html/
tmp/
zf-mkdoc-theme/

clover.xml
composer.lock
coveralls-upload.json
phpunit.xml
vendor
/clover.xml
/composer.lock
/coveralls-upload.json
/doc/html/
/laminas-mkdoc-theme.tgz
/laminas-mkdoc-theme/
/phpunit.xml
/vendor/
15 changes: 6 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
sudo: false

language: php

branches:
Expand All @@ -11,15 +9,15 @@ cache:
directories:
- $HOME/.composer/cache
- $HOME/.local
- zf-mkdoc-theme
- laminas-mkdoc-theme

env:
global:
- SITE_URL: https://zendframework.github.io/zend-servicemanager
- SITE_URL: https://docs.laminas.dev/laminas-servicemanager
- GH_USER_NAME: "Matthew Weier O'Phinney"
- GH_USER_EMAIL: matthew@weierophinney.net
- GH_REF: github.com/zendframework/zend-servicemanager.git
- secure: "KoLcNj22t668IhAhm5ej6DNf23waoGrZpQ1kmuq5ptTqsXjFjy/cjOJCvWOeRX62Tl2kjc7co9UeK0f91osZ2Wq7HLb+1bIXX5SrB6SfyPUajCQtCtu0xGgEKZfuQwzLWSYoR3tsaD6vqgMjKwwst10d+AyICjdLNu9dHtdu9HpozZtK3kM9+0FwMOiRqFEND2GY05oVYXOrzgu1xNmE1YEGpjKzqqBNpqFOP4W+OnTMRTQcyrlbFzOFvAip7X3GGw9iUSnSzZTnIOWJgMdah8/eFqhrPO8O73faW+/v3ZTxdwupOEZyg7s3TD6+W9rjmN+TgOZEP484PcSlUc6sXA4QM4iL8xthG3bWk8+CDrsnuQmunrXz7T5xUEHs/7B8NuGJ8yT89fMCYGySERKIfCx17+N9kP/848A/+39LE1NIlTxnaPISfm9WMNG67xsEKyJluC/YataPGl0zZ6/7Q7w1oDYvjhsqooUsxKRD2/psd1zrVDJurDa7Ayv/E21u2dIDtbp6w9Zl+he+kwRItMNhtCdzyShqtuY0V/JRmn2lZY2PsfbICRXXAbQnDveNFYz5tE2K40Qm4RWrdZ4cnaLiNJeukdYKVJCFHtZr9rdx1uVeK78Pf5o3rt4S8S1aat35eMZQunc6s4gmeXU5+wIxwXiyOtkdlL3LztSox9s="
- GH_REF: github.com/laminas/laminas-servicemanager.git
- secure: "KoLcNj22t668IhAhm5ej6DNf23waoGrZpQ1kmuq5ptTqsXjFjy/cjOJCvWOeRX62Tl2kjc7co9UeK0f91osZ2Wq7HLb+1bIXX5SrB6SfyPUajCQtCtu0xGgEKLaminasuQwzLWSYoR3tsaD6vqgMjKwwst10d+AyICjdLNu9dHtdu9HpozZtK3kM9+0FwMOiRqFEND2GY05oVYXOrzgu1xNmE1YEGpjKzqqBNpqFOP4W+OnTMRTQcyrlbFzOFvAip7X3GGw9iUSnSzZTnIOWJgMdah8/eFqhrPO8O73faW+/v3ZTxdwupOEZyg7s3TD6+W9rjmN+TgOZEP484PcSlUc6sXA4QM4iL8xthG3bWk8+CDrsnuQmunrXz7T5xUEHs/7B8NuGJ8yT89fMCYGySERKIfCx17+N9kP/848A/+39LE1NIlTxnaPISfm9WMNG67xsEKyJluC/YataPGl0zZ6/7Q7w1oDYvjhsqooUsxKRD2/psd1zrVDJurDa7Ayv/E21u2dIDtbp6w9Zl+he+kwRItMNhtCdzyShqtuY0V/JRmn2lZY2PsfbICRXXAbQnDveNFYz5tE2K40Qm4RWrdZ4cnaLiNJeukdYKVJCFHtZr9rdx1uVeK78Pf5o3rt4S8S1aat35eMZQunc6s4gmeXU5+wIxwXiyOtkdlL3LztSox9s="

matrix:
fast_finish: true
Expand All @@ -38,7 +36,6 @@ matrix:
- php: hhvm

notifications:
irc: "irc.freenode.org#zftalk.dev"
email: false

before_install:
Expand All @@ -53,10 +50,10 @@ script:
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then ./vendor/bin/phpunit --coverage-clover clover.xml ; fi
- if [[ $EXECUTE_TEST_COVERALLS != 'true' ]]; then ./vendor/bin/phpunit ; fi
- if [[ $EXECUTE_CS_CHECK == 'true' ]]; then ./vendor/bin/phpcs ; fi
- if [[ $DEPLOY_DOCS == "true" && "$TRAVIS_TEST_RESULT" == "0" ]]; then wget -O theme-installer.sh "https://raw.githubusercontent.com/zendframework/zf-mkdoc-theme/master/theme-installer.sh" ; chmod 755 theme-installer.sh ; ./theme-installer.sh ; fi
- if [[ $DEPLOY_DOCS == "true" && "$TRAVIS_TEST_RESULT" == "0" ]]; then wget -O theme-installer.sh "https://raw.githubusercontent.com/laminas/laminas-mkdoc-theme/master/theme-installer.sh" ; chmod 755 theme-installer.sh ; ./theme-installer.sh ; fi

after_success:
- if [[ $DEPLOY_DOCS == "true" ]]; then echo "Preparing to build and deploy documentation" ; ./zf-mkdoc-theme/deploy.sh ; echo "Completed deploying documentation" ; fi
- if [[ $DEPLOY_DOCS == "true" ]]; then echo "Preparing to build and deploy documentation" ; ./laminas-mkdoc-theme/deploy.sh ; echo "Completed deploying documentation" ; fi

after_script:
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then ./vendor/bin/coveralls -v ; fi
94 changes: 47 additions & 47 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ All notable changes to this project will be documented in this file, in reverse

### Fixed

- [#136](https://github.com/zendframework/zend-servicemanager/pull/136) removes
- [zendframework/zend-servicemanager#136](https://github.com/zendframework/zend-servicemanager/pull/136) removes
several imports to classes in subnamespaces within the `ServiceManager`
classfile, removing potential name resolution conflicts that occurred in edge
cases when testing.
Expand All @@ -27,16 +27,16 @@ All notable changes to this project will be documented in this file, in reverse

### Added

- [#103](https://github.com/zendframework/zend-servicemanager/pull/103) Allowing
- [zendframework/zend-servicemanager#103](https://github.com/zendframework/zend-servicemanager/pull/103) Allowing
installation of `ocramius/proxy-manager` `^2.0` together with
`zendframework/zend-servicemanager`.
- [#103](https://github.com/zendframework/zend-servicemanager/pull/103) Disallowing
- [zendframework/zend-servicemanager#103](https://github.com/zendframework/zend-servicemanager/pull/103) Disallowing
test failures when running tests against PHP `7.0.*`.
- [#113](https://github.com/zendframework/zend-servicemanager/pull/113) Improved performance
- [zendframework/zend-servicemanager#113](https://github.com/zendframework/zend-servicemanager/pull/113) Improved performance
when dealing with registering aliases and factories via `ServiceManager#setFactory()` and
`ServiceManager#setAlias()`
- [#120](https://github.com/zendframework/zend-servicemanager/pull/120) The
`zendframework/zend-servicemanager` component now provides a
- [zendframework/zend-servicemanager#120](https://github.com/zendframework/zend-servicemanager/pull/120) The
`laminas/laminas-servicemanager` component now provides a
`container-interop/container-interop-implementation` implementation

### Deprecated
Expand All @@ -49,9 +49,9 @@ All notable changes to this project will be documented in this file, in reverse

### Fixed

- [#97](https://github.com/zendframework/zend-servicemanager/pull/97) Typo corrections
- [zendframework/zend-servicemanager#97](https://github.com/zendframework/zend-servicemanager/pull/97) Typo corrections
in the delegator factories documentation.
- [#98](https://github.com/zendframework/zend-servicemanager/pull/98) Using coveralls ^1.0
- [zendframework/zend-servicemanager#98](https://github.com/zendframework/zend-servicemanager/pull/98) Using coveralls ^1.0
for tracking test code coverage changes.

## 3.0.4 - TBD
Expand All @@ -76,15 +76,15 @@ All notable changes to this project will be documented in this file, in reverse

### Added

- [#89](https://github.com/zendframework/zend-servicemanager/pull/89) adds
- [zendframework/zend-servicemanager#89](https://github.com/zendframework/zend-servicemanager/pull/89) adds
cyclic alias detection to the `ServiceManager`; it now raises a
`Zend\ServiceManager\Exception\CyclicAliasException` when one is detected,
`Laminas\ServiceManager\Exception\CyclicAliasException` when one is detected,
detailing the cycle detected.
- [#95](https://github.com/zendframework/zend-servicemanager/pull/95) adds
- [zendframework/zend-servicemanager#95](https://github.com/zendframework/zend-servicemanager/pull/95) adds
GitHub Pages publication automation, and moves the documentation to
https://zendframework.github.io/zend-servicemanager/
- [#93](https://github.com/zendframework/zend-servicemanager/pull/93) adds
`Zend\ServiceManager\Test\CommonPluginManagerTrait`, which can be used to
https://docs.laminas.dev/laminas-servicemanager/
- [zendframework/zend-servicemanager#93](https://github.com/zendframework/zend-servicemanager/pull/93) adds
`Laminas\ServiceManager\Test\CommonPluginManagerTrait`, which can be used to
validate that a plugin manager instance is ready for version 3.

### Deprecated
Expand All @@ -97,19 +97,19 @@ All notable changes to this project will be documented in this file, in reverse

### Fixed

- [#90](https://github.com/zendframework/zend-servicemanager/pull/90) fixes
- [zendframework/zend-servicemanager#90](https://github.com/zendframework/zend-servicemanager/pull/90) fixes
several examples in the configuration chapter of the documentation, ensuring
that the signatures are correct.
- [#92](https://github.com/zendframework/zend-servicemanager/pull/92) ensures
- [zendframework/zend-servicemanager#92](https://github.com/zendframework/zend-servicemanager/pull/92) ensures
that alias resolution is skipped during configuration if no aliases are
present, and forward-ports the test from [#81](https://github.com/zendframework/zend-servicemanager/pull/81)
present, and forward-ports the test from [zendframework/zend-servicemanager#81](https://github.com/zendframework/zend-servicemanager/pull/81)
to validate v2/v3 compatibility for plugin managers.

## 3.0.2 - 2016-01-24

### Added

- [#64](https://github.com/zendframework/zend-servicemanager/pull/64) performance optimizations
- [zendframework/zend-servicemanager#64](https://github.com/zendframework/zend-servicemanager/pull/64) performance optimizations
when dealing with alias resolution during service manager instantiation

### Deprecated
Expand All @@ -122,14 +122,14 @@ All notable changes to this project will be documented in this file, in reverse

### Fixed

- [#62](https://github.com/zendframework/zend-servicemanager/pull/62)
[#64](https://github.com/zendframework/zend-servicemanager/pull/64) corrected benchmark assets signature
- [#72](https://github.com/zendframework/zend-servicemanager/pull/72) corrected link to the Proxy Pattern Wikipedia
- [zendframework/zend-servicemanager#62](https://github.com/zendframework/zend-servicemanager/pull/62)
[zendframework/zend-servicemanager#64](https://github.com/zendframework/zend-servicemanager/pull/64) corrected benchmark assets signature
- [zendframework/zend-servicemanager#72](https://github.com/zendframework/zend-servicemanager/pull/72) corrected link to the Proxy Pattern Wikipedia
page in the documentation
- [#78](https://github.com/zendframework/zend-servicemanager/issues/78)
[#79](https://github.com/zendframework/zend-servicemanager/pull/79) creation context was not being correctly passed
- [zendframework/zend-servicemanager#78](https://github.com/zendframework/zend-servicemanager/issues/78)
[zendframework/zend-servicemanager#79](https://github.com/zendframework/zend-servicemanager/pull/79) creation context was not being correctly passed
to abstract factories when using plugin managers
- [#82](https://github.com/zendframework/zend-servicemanager/pull/82) corrected migration guide in the DocBlock of
- [zendframework/zend-servicemanager#82](https://github.com/zendframework/zend-servicemanager/pull/82) corrected migration guide in the DocBlock of
the `InitializerInterface`

## 3.0.1 - 2016-01-19
Expand All @@ -144,31 +144,31 @@ All notable changes to this project will be documented in this file, in reverse

### Removed

- [#68](https://github.com/zendframework/zend-servicemanager/pull/68) removes
the dependency on zend-stdlib by inlining the `ArrayUtils::merge()` routine
as a private method of `Zend\ServiceManager\Config`.
- [zendframework/zend-servicemanager#68](https://github.com/zendframework/zend-servicemanager/pull/68) removes
the dependency on laminas-stdlib by inlining the `ArrayUtils::merge()` routine
as a private method of `Laminas\ServiceManager\Config`.

### Fixed

- Nothing.

## 3.0.0 - 2016-01-11

First stable release of version 3 of zend-servicemanager.
First stable release of version 3 of laminas-servicemanager.

Documentation is now available at http://zend-servicemanager.rtfd.org
Documentation is now available at http://laminas-servicemanager.rtfd.org

### Added

- You can now map multiple key names to the same factory. It was previously
possible in ZF2 but it was not enforced by the `FactoryInterface` interface.
possible in Laminas but it was not enforced by the `FactoryInterface` interface.
Now the interface receives the `$requestedName` as the *second* parameter
(previously, it was the third).

Example:

```php
$sm = new \Zend\ServiceManager\ServiceManager([
$sm = new \Laminas\ServiceManager\ServiceManager([
'factories' => [
MyClassA::class => MyFactory::class,
MyClassB::class => MyFactory::class,
Expand All @@ -183,22 +183,22 @@ Documentation is now available at http://zend-servicemanager.rtfd.org
longer need to implement the complete `validate` method.

In versions 2.x, if your plugin manager only allows creating instances that
implement `Zend\Validator\ValidatorInterface`, you needed to write the
implement `Laminas\Validator\ValidatorInterface`, you needed to write the
following code:

```php
class MyPluginManager extends AbstractPluginManager
{
public function validate($instance)
{
if ($instance instanceof \Zend\Validator\ValidatorInterface) {
if ($instance instanceof \Laminas\Validator\ValidatorInterface) {
return;
}

throw new InvalidServiceException(sprintf(
'Plugin manager "%s" expected an instance of type "%s", but "%s" was received',
__CLASS__,
\Zend\Validator\ValidatorInterface::class,
\Laminas\Validator\ValidatorInterface::class,
is_object($instance) ? get_class($instance) : gettype($instance)
));
}
Expand All @@ -208,8 +208,8 @@ Documentation is now available at http://zend-servicemanager.rtfd.org
In version 3, this becomes:

```php
use Zend\ServiceManager\AbstractPluginManager;
use Zend\Validator\ValidatorInterface;
use Laminas\ServiceManager\AbstractPluginManager;
use Laminas\Validator\ValidatorInterface;

class MyPluginManager extends AbstractPluginManager
{
Expand Down Expand Up @@ -241,7 +241,7 @@ Documentation is now available at http://zend-servicemanager.rtfd.org
- Peering has been removed. It was a complex and rarely used feature that was
misunderstood most of the time.

- Integration with `Zend\Di` has been removed. It may be re-integrated later.
- Integration with `Laminas\Di` has been removed. It may be re-integrated later.

- `MutableCreationOptionsInterface` has been removed, as options can now be
passed directly through factories.
Expand All @@ -256,23 +256,23 @@ v3 of the ServiceManager component is a completely rewritten, more efficient
implementation of the service locator pattern. It includes a number of breaking
changes, outlined in this section.

- You no longer need a `Zend\ServiceManager\Config` object to configure the
- You no longer need a `Laminas\ServiceManager\Config` object to configure the
service manager; you can pass the configuration array directly instead.

In version 2.x:

```php
$config = new \Zend\ServiceManager\Config([
$config = new \Laminas\ServiceManager\Config([
'factories' => [...]
]);

$sm = new \Zend\ServiceManager\ServiceManager($config);
$sm = new \Laminas\ServiceManager\ServiceManager($config);
```

In ZF 3.x:
In Laminas 3.x:

```php
$sm = new \Zend\ServiceManager\ServiceManager([
$sm = new \Laminas\ServiceManager\ServiceManager([
'factories' => [...]
]);
```
Expand Down Expand Up @@ -396,7 +396,7 @@ changes, outlined in this section.

### Added

- [#60](https://github.com/zendframework/zend-servicemanager/pull/60) adds
- [zendframework/zend-servicemanager#60](https://github.com/zendframework/zend-servicemanager/pull/60) adds
forward compatibility features for `AbstractPluingManager` and introduces
`InvokableFactory` to help forward migration to version 3.

Expand All @@ -410,19 +410,19 @@ changes, outlined in this section.

### Fixed

- [#46](https://github.com/zendframework/zend-servicemanager/pull/46) updates
- [zendframework/zend-servicemanager#46](https://github.com/zendframework/zend-servicemanager/pull/46) updates
the exception hierarchy to inherit from the container-interop exceptions.
This ensures that all exceptions thrown by the component follow the
recommendations of that project.
- [#52](https://github.com/zendframework/zend-servicemanager/pull/52) fixes
- [zendframework/zend-servicemanager#52](https://github.com/zendframework/zend-servicemanager/pull/52) fixes
the exception message thrown by `ServiceManager::setFactory()` to remove
references to abstract factories.

## 2.6.0 - 2015-07-23

### Added

- [#4](https://github.com/zendframework/zend-servicemanager/pull/4) updates the
- [zendframework/zend-servicemanager#4](https://github.com/zendframework/zend-servicemanager/pull/4) updates the
`ServiceManager` to [implement the container-interop interface](https://github.com/container-interop/container-interop),
allowing interoperability with applications that consume that interface.

Expand All @@ -436,7 +436,7 @@ changes, outlined in this section.

### Fixed

- [#3](https://github.com/zendframework/zend-servicemanager/pull/3) properly updates the
- [zendframework/zend-servicemanager#3](https://github.com/zendframework/zend-servicemanager/pull/3) properly updates the
codebase to PHP 5.5, by taking advantage of the default closure binding
(`$this` in a closure is the invoking object when created within a method). It
also removes several `@requires PHP 5.4.0` annotations.
Loading

0 comments on commit e8fc780

Please sign in to comment.