Skip to content

Latest commit

 

History

History
62 lines (40 loc) · 1.33 KB

UPGRADE-3.x.md

File metadata and controls

62 lines (40 loc) · 1.33 KB

UPGRADE 3.x

Deprecated unspecified default_formatter configuration node

The default_formatter configuration node will become required.

sonata_formatter:
    default_formatter: my_formatter

Deprecated injecting a logger through the Sonata\FormatterBundle\Formatter\Pool constructor

Providing a logger to a Sonata\FormatterBundle\Formatter\Pool instance should now be done through the setLogger method.

Before:

use Sonata\FormatterBundle\Formatter\Pool;

new Pool($myLogger, 'myFormatter');

After:

$pool = new Pool('myFormatter');
$pool->setLogger($myLogger);

Deprecated unspecified default formatter in Sonata\FormatterBundle\Formatter\Pool constructor

Instantiating the Sonata\FormatterBundle\Formatter\Pool class should be done with a $defaultFormatter argument.

Before:

use Sonata\FormatterBundle\Formatter\Pool;

new Pool();

After:

use Sonata\FormatterBundle\Formatter\Pool;

new Pool('myFormatter');

UPGRADE FROM 3.0 to 3.1

Tests

All files under the Tests directory are now correctly handled as internal test classes. You can't extend them anymore, because they are only loaded when running internal tests. More information can be found in the composer docs.