zfcampus / zf-console

Create console applications in PHP
BSD 3-Clause "New" or "Revised" License
64 stars 25 forks source link

replace container-interop/container-interop with psr/container #40

Closed 1ma closed 7 years ago

1ma commented 7 years ago

Abstract

container-interop/container-interop is deprecated since Feb. 13th 2017 in favor of psr/container (PSR-11 spec). This PR replaces one for the other.

My use case

I use Pimple as the DI container to lazy load command handlers. Pimple provides it's own PSR-11 decorator, but it implements PSR-11's interface, not container-interop's, hence it cannot be fed to the Dispatcher class.

Promotion of psr/container to regular dependency

The Dispatcher class -which lives under src- depends on it, so I believe it should not be disguised as a development/suggested depedency (if it's not installed could break production code).

Potential BC breaks?

Since release 1.2.0 of container-interop Interop\Container\ContainerInterface extends Psr\Container\ContainerInterface, so I understand that there should be none: interop containers are also psr-11 containers (but the inverse does not hold).

About the removal of composer.lock

When installing a dependency with composer the composer.lock file is ignored, and most PHP libraries keep it out of the repository because it is just dead weight.

1ma commented 7 years ago

I'm quite puzzled about the failed tests, nor I'm able to reproduce these failures myself. Any help would be appreciated.

michalbundyra commented 7 years ago

@1ma It's more complicated to fix these tests here (will be out of the scope). See my PR #41 I think when #41 will be merged then your PR should work fine

1ma commented 7 years ago

Great! Once your PR is merged into develop I'll rebase mine and see what happens.

michalbundyra commented 7 years ago

@1ma meanwhile you can try on local to make sure all is good :smile:

1ma commented 7 years ago

Myea, success.

weierophinney commented 7 years ago

Thanks, @1ma