Skip to content

Releases: ClanCats/Container

v1.3.5

21 Jul 11:32
Compare
Choose a tag to compare

v1.3.4

17 Apr 16:13
76c10d8
Compare
Choose a tag to compare

Features

  • Added function to retrieve a service by name while forcing its type.

Full Changelog: v1.3.3...v1.3.4

v1.3.3

17 Apr 13:51
ca85b0c
Compare
Choose a tag to compare

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

Full Changelog: v1.3.2...v1.3.3

v1.3.2

16 Oct 20:28
279982c
Compare
Choose a tag to compare

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

10 May 09:49
f6edcb7
Compare
Choose a tag to compare

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
}

Full Changelog: v1.3.0...v1.3.1

v1.3.0 Code Quality

22 Apr 11:36
8c0dd1d
Compare
Choose a tag to compare

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

15 Oct 12:59
659bea1
Compare
Choose a tag to compare

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

14 Aug 12:05
1b23681
Compare
Choose a tag to compare

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

07 May 05:56
f705560
Compare
Choose a tag to compare
Syntax highlighting temp solution

v1.1.2

23 Apr 13:14
8beab5c
Compare
Choose a tag to compare
  • Minor fixes
  • PHPUnit 9 compatibility
  • added allParameters method.