Change log

6.1.0

6.0.2

6.0.1

6.0

This is the complete change log. You can also read the migration guide for upgrading or the blog article to see what's new.

Improvements:

Fixes:

BC breaks:

Be also aware that internal classes or interfaces may have changed.

5.4.6

5.4.5

Fixup of 5.4.4.

5.4.4

This release was broken because it was tagged against the wrong branch.

5.4.3

5.4.2

5.4.1

Note that PHP-DI was already compliant with PSR-11 because it was implementing container-interop, and container-interop 1.2 extends PSR-11. This new version just makes it more explicit and will allow to drop container-interop support in the next major versions.

5.4

Read the news entry.

New features:

Improvements:

5.3

Read the news entry.

5.2

Read the news entry.

Improvements:

Bugfixes:

5.1

Read the news entry.

Improvements:

Bugfixes:

Internal changes:

5.0

This is the complete change log. You can also read the migration guide for upgrading, or the news article for a nicer introduction to this new version.

Improvements:

BC breaks:

Internal changes in case you were replacing/extending some parts:

4.4

Read the news entry.

4.3

Read the news entry.

4.2.2

4.2.1

But if you can, seriously avoid this (really old) PHP version and upgrade.

4.2

Read the news entry.

Minor BC-break: Optional parameters (that were not configured) were injected, they are now ignored, which is what naturally makes sense since they are optional. Example:

    public function __construct(Bar $bar = null)
    {
        $this->bar = $bar ?: $this->createDefaultBar();
    }

Before 4.2, PHP-DI would try to inject a Bar instance. From 4.2 and onwards, it will inject null.

Of course, you can still explicitly define an injection for the optional parameters and that will work.

All changes:

4.1

Read the news entry.

BC-breaks: None.

4.0

Major changes:

Read the migration guide if you are using 3.x: Migration guide from 3.x to 4.0.

BC-breaks:

Other changes:

3.5.1

3.5

Read the news entry.

3.4

Read the news entry.

3.3

Read the news entry.

3.2

Read the news entry.

Small BC-break: PHP-DI 3.0 and 3.1 injected properties before calling the constructor. This was confusing and not supported for internal classes. From 3.2 and on, properties are injected after calling the constructor.

3.1.1

3.1

Read the news entry.

3.0.6

3.0.5

3.0.4

3.0.3

3.0.2

3.0.1

3.0

Major compatibility breaks with 2.x.

2.1

2.0

Major compatibility breaks with 1.x.

Warning:

1.1

1.0