Skip to content

Replace deprecated ObjectManager #13131

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions doctrine/event_listeners_subscribers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ a ``postPersist()`` method, which will be called when the event is dispatched::

use AppBundle\Entity\Product;
// for Doctrine < 2.4: use Doctrine\ORM\Event\LifecycleEventArgs;
use Doctrine\Common\Persistence\Event\LifecycleEventArgs;
use Doctrine\Persistence\Event\LifecycleEventArgs;

class SearchIndexer
{
Expand Down Expand Up @@ -151,8 +151,8 @@ interface and have an event method for each event it subscribes to::
use AppBundle\Entity\Product;
use Doctrine\Common\EventSubscriber;
// for Doctrine < 2.4: use Doctrine\ORM\Event\LifecycleEventArgs;
use Doctrine\Common\Persistence\Event\LifecycleEventArgs;
use Doctrine\ORM\Events;
use Doctrine\Persistence\Event\LifecycleEventArgs;

class SearchIndexerSubscriber implements EventSubscriber
{
Expand Down
2 changes: 1 addition & 1 deletion doctrine/mapping_model_classes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ Annotations, XML, Yaml, PHP and StaticPHP. The arguments are:
instead of the ``SymfonyFileLocator``::

use AppBundle\Model;
use Doctrine\Common\Persistence\Mapping\Driver\DefaultFileLocator;
use Doctrine\ORM\Mapping\Driver\XmlDriver;
use Doctrine\Persistence\Mapping\Driver\DefaultFileLocator;

// ...
private function buildMappingCompilerPass()
Expand Down
1 change: 0 additions & 1 deletion form/data_transformers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,6 @@ First, create the custom field type class::
namespace AppBundle\Form;

use AppBundle\Form\DataTransformer\IssueToNumberTransformer;
use Doctrine\Common\Persistence\ObjectManager;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
Expand Down
2 changes: 1 addition & 1 deletion form/unit_testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ make sure the ``FormRegistry`` uses the created instance::
namespace Tests\AppBundle\Form\Type;

use AppBundle\Form\Type\TestedType;
use Doctrine\Common\Persistence\ObjectManager;
use Doctrine\Persistence\ObjectManager;
use Symfony\Component\Form\PreloadedExtension;
use Symfony\Component\Form\Test\TypeTestCase;
// ...
Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/entity.rst
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ or the short alias name (as shown prior).
``em``
~~~~~~

**type**: ``string`` | ``Doctrine\Common\Persistence\ObjectManager`` **default**: the default entity manager
**type**: ``string`` | ``Doctrine\Persistence\ObjectManager`` **default**: the default entity manager

If specified, this entity manager will be used to load the choices
instead of the ``default`` entity manager.
Expand Down
2 changes: 1 addition & 1 deletion service_container/parent_services.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ you may have multiple repository classes which need the
// src/AppBundle/Repository/BaseDoctrineRepository.php
namespace AppBundle\Repository;

use Doctrine\Common\Persistence\ObjectManager;
use Doctrine\Persistence\ObjectManager;
use Psr\Log\LoggerInterface;

// ...
Expand Down
6 changes: 3 additions & 3 deletions testing/database.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Suppose the class you want to test looks like this::
namespace AppBundle\Salary;

use AppBundle\Entity\Employee;
use Doctrine\Common\Persistence\ObjectManager;
use Doctrine\Persistence\ObjectManager;

class SalaryCalculator
{
Expand Down Expand Up @@ -74,8 +74,8 @@ it's easy to pass a mock object within a test::

use AppBundle\Entity\Employee;
use AppBundle\Salary\SalaryCalculator;
use Doctrine\Common\Persistence\ObjectManager;
use Doctrine\Common\Persistence\ObjectRepository;
use Doctrine\Persistence\ObjectManager;
use Doctrine\Persistence\ObjectRepository;
use PHPUnit\Framework\TestCase;

class SalaryCalculatorTest extends TestCase
Expand Down