Releases: ClanCats/Container
v1.3.6
Full Changelog: v1.3.5...v1.3.6
v1.3.5
Full Changelog: v1.3.4...v1.3.5
v1.3.4
Features
- Added function to retrieve a service by name while forcing its type.
Full Changelog: v1.3.3...v1.3.4
v1.3.3
Features
This small release introduces a new function on the container getClassForService
which allows you to reflect on the class name of a service.
What's Changed
- v1.3.3 by @mario-deluna in #10
Full Changelog: v1.3.2...v1.3.3
v1.3.2
This hotfix only changes the import name when scanning a directory for ctn
files.
On windows they would use the windows filesystem directory separator, which is a backslash. The import names should not depend on the platform so we replace the backslashes always with forward ones in import names.
Full Changelog: v1.3.1...v1.3.2
v1.3.1
What's Changed
This release adds support for class names to the container language.
Example
@driver_manager: MyApp\Drivers\Manager
- bind('main', MyApp\Drivers\MainDriver::class)
- bind('second', MyApp\Drivers\AnotherDriver::class)
Class names can be used the same way normal values can be. Internally they are simply converted to a string:
:some_class: Something\Somewhere::class
:or_in_array: {
ClassA::class,
ClassB::class
}
- v1.3.1 by @mario-deluna in #9
Full Changelog: v1.3.0...v1.3.1
v1.3.0 Code Quality
What's Changed
- Fixed error handling displaying incorrect line number when having large comments in file.
- Added support to report the file in which a syntax error occurred.
- Strict type hinting throughout the code.
- Removed support for PHP7.1 til 7.3
- Migrated from Travis.CI to Github Actions
- Added PHPStan including a fix for all issues for lvl8.
Full Changelog: v1.2.2...v1.3.0
v1.2.2 Allow resolver method access
This small update allows you to finally use the resolver methods directly. The resolver methods are generated when a container is compiled. The methods have the the return type their dependency which helps your IDE to help you.
v1.2.1 Added Service Updates
This release introduces the ability to update service definitions after they have been defined.
Service Updates
It is possible to update already defined services with more construction calls and metadata.
This is quite handy to organize large amount of dependencies with a dynamic lookups.
You could for example define your logger in one file.
@logger.main: Acme\Logger
And add observers using a construction call where you need them.
@logger.observers.email_devs: Acme\EmailLogObserver('dev@example.com')
@logger.observers.email_support: Acme\EmailLogObserver('support@example.com')
@logger.main
- addObserver(@logger.observers.email_devs)
- addObserver(@logger.observers.email_support)
The same is also true for metadata.
@controller.homepage: Controller\Homepage
= on: '/homepage'
// also show homepage on root
@controller.homepage
= on: '/'
v1.2.0 Support for service aliases
Syntax highlighting temp solution