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

zend-di 3.1.0

Compare
Choose a tag to compare
@Ocramius Ocramius released this 23 Oct 20:58
· 54 commits to master since this release
release-3.1.0

Added

  • #34 adds the ability to pass a
    Psr\Log\LoggerInterface instance to the constructor of Zend\Di\CodeGenerator\InjectorGenerator
    (e.g. new InjectorGenerator($config, $resolver, $namespace, $logger))

  • #31 adds the service
    factory Zend\Di\Container\GeneratorFactory for creating a
    Zend\Di\CodeGenerator\InjectorGenerator instance with zend-servicemanager.

  • #38 adds Zend\Di\Resolver\InjectionInterface that defines the
    return type of Zend\Di\Resolver\DependencyResolverInterface::resolveParameters() to prepare a stable interface for
    future releases. This will not affect you unless you have implemented a custom dependency resolver that returns other
    items than Zend\Di\Resolver\TypeInjection or Zend\Di\Resolver\ValueInjection. In this case you need to change the
    returned items to implement this interface.

  • #38 adds parameter and return types to:

    • Zend\Di\CodeGenerator\AutoloadGenerator
    • Zend\Di\CodeGenerator\FactoryGenerator
    • Zend\Di\CodeGenerator\InjectorGenerator

Changed

  • #31 adds the method
    getOutputDirectory() to Zend\Di\CodeGenerator\GeneratorTrait.

  • #31 adds the method
    getNamespace() to Zend\Di\CodeGenerator\InjectorGenerator.

  • #37 removes the use of count()
    in Zend\Di\CodeGenerator\FactoryGenerator::buildParametersCode() to improve performance

  • #38 adds strictness to
    Zend\Di\CodeGenerator\FactoryGenerator::generate():

    • Adds string return type.
    • Adds throw of RuntimeException on failures.
  • #38 removes inheritance of
    Zend\Di\Resolver\AbstractInjection:

    • from Zend\Di\Resolver\ValueInjection
    • from Zend\Di\Resolver\TypeInjection
  • #38 adds implementation of
    Zend\Di\Resolver\InjectionInterface:

    • to Zend\Di\Resolver\ValueInjection
    • to Zend\Di\Resolver\TypeInjection

Deprecated

  • #38 deprecates Zend\Di\Resolver\AbstractInjection.
    in favour of Zend\Di\Resolver\InjectionInterface

  • #38 deprecates Zend\Di\Resolver\TypeInjection::getType
    in favour of __toString().

  • #38 deprecates Zend\Di\Resolver\ValueInjection::getValue()
    in favour of toValue().

Removed

  • #38 removes usage of zend-code

Fixed

  • #36 fixes incorrect
    phpdocs in Zend\Di\Injector.