Skip to content

Chained loaders and generic return types

Compare
Choose a tag to compare
@g105b g105b released this 24 Jul 22:35
· 20 commits to master since this release
bdfd2f2

It's now possible to chain the loader functions in ServiceContainer classes. This means that the loader functions can in turn have their own typed parameters automatically injected, just like the go functions in webengine.

An improvement has been made the the use of docblocks - now your IDE will understand that the returned type from Container::get is the type that is requested in the parameter. One day PHP will support generics and we'll not need to depend on doc blocks.

What's Changed

  • build(deps-dev): bump phpstan/phpstan from 1.8.0 to 1.8.1 by @dependabot in #90
  • feature: chained loaders by @g105b in #94
  • feature: implement generic return type by @g105b in #93
  • build(deps-dev): bump phpstan/phpstan from 1.8.1 to 1.8.2 by @dependabot in #91

Full Changelog: v1.1.3...v1.2.0