From fb76cb0445aa5d9bc6de04d09daba1dc9f912358 Mon Sep 17 00:00:00 2001 From: Kendrick Chan Date: Tue, 11 Feb 2020 20:31:28 +0800 Subject: [PATCH] Replace ObjectManager with EntityManagerInterface #335 --- src/Command/AdjustLongLatCommand.php | 6 +++--- src/Command/ComputeWarrantyExpiryDateCommand.php | 4 ++-- src/Command/CreateCustomerFromWarrantyCommand.php | 4 ++-- src/Command/FulfillOldJobOrderCommand.php | 4 ++-- src/Command/FulfillPendingJobOrderCommand.php | 4 ++-- src/Command/GenerateBatteryCompatibilityCommand.php | 4 ++-- src/Command/GenerateWarrantyFromJobOrderCommand.php | 4 ++-- src/Command/ImportBatteryPriceCommand.php | 4 ++-- src/Command/ImportCMBBatteryDataCommand.php | 4 ++-- src/Command/ImportCMBBatteryTradeInPriceCommand.php | 4 ++-- src/Command/ImportCMBVehicleCompatibilityCommand.php | 4 ++-- src/Command/ImportCustomerCommand.php | 4 ++-- src/Command/ImportLegacyJobOrderCommand.php | 4 ++-- src/Command/ImportOutletsCommand.php | 4 ++-- src/Command/ImportPartnersCommand.php | 4 ++-- src/Command/ImportSAPBatteryCommand.php | 4 ++-- src/Command/ImportVehicleBatteryCommand.php | 4 ++-- src/Command/ImportVehicleCompatibilityCommand.php | 4 ++-- src/Command/MergeDuplicateVehiclesCommand.php | 4 ++-- src/Command/RefreshJobOrderCacheCommand.php | 4 ++-- src/Command/ReportRiderTime.php | 4 ++-- src/Command/SeedRiderSessionsCommand.php | 4 ++-- src/Command/SetCustomerPrivacyPolicyCommand.php | 4 ++-- src/Command/TestRegAPNSCommand.php | 2 -- src/Command/UpdateCustomerVehicleBatteryCommand.php | 4 ++-- src/Command/UpdateCustomerVehicleWarrantyCommand.php | 4 ++-- src/Command/UploadCleanupCommand.php | 4 ++-- src/Command/UserCreateCommand.php | 4 ++-- 28 files changed, 55 insertions(+), 57 deletions(-) diff --git a/src/Command/AdjustLongLatCommand.php b/src/Command/AdjustLongLatCommand.php index b7e26ad1..62405269 100644 --- a/src/Command/AdjustLongLatCommand.php +++ b/src/Command/AdjustLongLatCommand.php @@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\ORM\EntityManagerInterface; use App\Entity\JobOrder; @@ -17,9 +17,9 @@ class AdjustLongLatCommand extends Command { protected $em; - public function __construct(ObjectManager $om) + public function __construct(EntityManagerInterface $em) { - $this->em = $om; + $this->em = $em; parent::__construct(); } diff --git a/src/Command/ComputeWarrantyExpiryDateCommand.php b/src/Command/ComputeWarrantyExpiryDateCommand.php index 383370f7..cffc24ef 100644 --- a/src/Command/ComputeWarrantyExpiryDateCommand.php +++ b/src/Command/ComputeWarrantyExpiryDateCommand.php @@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\ORM\EntityManagerInterface; use App\Entity\Battery; @@ -18,7 +18,7 @@ class ComputeWarrantyExpiryDateCommand extends Command protected $em; protected $wh; - public function __construct(ObjectManager $em, WarrantyHandler $wh) + public function __construct(EntityManagerInterface $em, WarrantyHandler $wh) { $this->em = $em; $this->wh = $wh; diff --git a/src/Command/CreateCustomerFromWarrantyCommand.php b/src/Command/CreateCustomerFromWarrantyCommand.php index 91684217..42b2fe73 100644 --- a/src/Command/CreateCustomerFromWarrantyCommand.php +++ b/src/Command/CreateCustomerFromWarrantyCommand.php @@ -8,7 +8,7 @@ use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Output\OutputInterface; -use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\ORM\EntityManagerInterface; use App\Entity\Warranty; use App\Entity\Customer; @@ -33,7 +33,7 @@ class CreateCustomerFromWarrantyCommand extends Command protected $cvu_mfg_id; protected $cvu_brand_id; - public function __construct(ObjectManager $em, $cvu_mfg_id, $cvu_brand_id) + public function __construct(EntityManagerInterface $em, $cvu_mfg_id, $cvu_brand_id) { $this->em = $em; diff --git a/src/Command/FulfillOldJobOrderCommand.php b/src/Command/FulfillOldJobOrderCommand.php index a0cabd57..2a4132cc 100644 --- a/src/Command/FulfillOldJobOrderCommand.php +++ b/src/Command/FulfillOldJobOrderCommand.php @@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\ORM\EntityManagerInterface; use App\Entity\JobOrder; use App\Entity\JOEvent; @@ -22,7 +22,7 @@ class FulfillOldJobOrderCommand extends Command { protected $em; - public function __construct(ObjectManager $om) + public function __construct(EntityManagerInterface $om) { $this->em = $om; diff --git a/src/Command/FulfillPendingJobOrderCommand.php b/src/Command/FulfillPendingJobOrderCommand.php index 22180186..997dd62e 100644 --- a/src/Command/FulfillPendingJobOrderCommand.php +++ b/src/Command/FulfillPendingJobOrderCommand.php @@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\ORM\EntityManagerInterface; use App\Entity\JobOrder; use App\Entity\JOEvent; @@ -22,7 +22,7 @@ class FulfillPendingJobOrderCommand extends Command { protected $em; - public function __construct(ObjectManager $om) + public function __construct(EntityManagerInterface $om) { $this->em = $om; diff --git a/src/Command/GenerateBatteryCompatibilityCommand.php b/src/Command/GenerateBatteryCompatibilityCommand.php index 57e20076..c4eea3a3 100644 --- a/src/Command/GenerateBatteryCompatibilityCommand.php +++ b/src/Command/GenerateBatteryCompatibilityCommand.php @@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\ORM\EntityManagerInterface; use App\Entity\VehicleManufacturer; use App\Entity\Vehicle; @@ -21,7 +21,7 @@ class GenerateBatteryCompatibilityCommand extends Command protected $em; protected $vmfg_index; - public function __construct(ObjectManager $om) + public function __construct(EntityManagerInterface $om) { $this->em = $om; diff --git a/src/Command/GenerateWarrantyFromJobOrderCommand.php b/src/Command/GenerateWarrantyFromJobOrderCommand.php index 86653d97..1d3f100b 100644 --- a/src/Command/GenerateWarrantyFromJobOrderCommand.php +++ b/src/Command/GenerateWarrantyFromJobOrderCommand.php @@ -10,7 +10,7 @@ use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\ORM\EntityManagerInterface; use App\Entity\JobOrder; use App\Entity\Warranty; @@ -25,7 +25,7 @@ class GenerateWarrantyFromJobOrderCommand extends Command protected $sapbatt_hash; protected $warranties_hash; - public function __construct(ObjectManager $em) + public function __construct(EntityManagerInterface $em) { $this->em = $em; diff --git a/src/Command/ImportBatteryPriceCommand.php b/src/Command/ImportBatteryPriceCommand.php index 02bbbea9..592720bf 100644 --- a/src/Command/ImportBatteryPriceCommand.php +++ b/src/Command/ImportBatteryPriceCommand.php @@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\ORM\EntityManagerInterface; use CrEOF\Spatial\PHP\Types\Geometry\Point; use DateTime; @@ -30,7 +30,7 @@ class ImportBatteryPriceCommand extends Command protected $em; protected $size_index; - public function __construct(ObjectManager $om) + public function __construct(EntityManagerInterface $om) { $this->em = $om; $this->size_index = []; diff --git a/src/Command/ImportCMBBatteryDataCommand.php b/src/Command/ImportCMBBatteryDataCommand.php index 125b150d..7fbee55a 100644 --- a/src/Command/ImportCMBBatteryDataCommand.php +++ b/src/Command/ImportCMBBatteryDataCommand.php @@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\ORM\EntityManagerInterface; use App\Entity\Battery; use App\Entity\BatteryManufacturer; @@ -27,7 +27,7 @@ class ImportCMBBatteryDataCommand extends Command protected $bsize_hash; protected $batt_hash; - public function __construct(ObjectManager $om) + public function __construct(EntityManagerInterface $om) { $this->em = $om; diff --git a/src/Command/ImportCMBBatteryTradeInPriceCommand.php b/src/Command/ImportCMBBatteryTradeInPriceCommand.php index 657b492d..03f594da 100644 --- a/src/Command/ImportCMBBatteryTradeInPriceCommand.php +++ b/src/Command/ImportCMBBatteryTradeInPriceCommand.php @@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\ORM\EntityManagerInterface; use App\Entity\BatterySize; @@ -20,7 +20,7 @@ class ImportCMBBatteryTradeInPriceCommand extends Command protected $bsize_hash; - public function __construct(ObjectManager $om) + public function __construct(EntityManagerInterface $om) { $this->em = $om; diff --git a/src/Command/ImportCMBVehicleCompatibilityCommand.php b/src/Command/ImportCMBVehicleCompatibilityCommand.php index f6910d06..81a5a828 100644 --- a/src/Command/ImportCMBVehicleCompatibilityCommand.php +++ b/src/Command/ImportCMBVehicleCompatibilityCommand.php @@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\ORM\EntityManagerInterface; use App\Entity\BatteryManufacturer; use App\Entity\BatteryModel; @@ -50,7 +50,7 @@ class ImportCMBVehicleCompatibilityCommand extends Command protected $vmanu_hash; protected $vmake_hash; - public function __construct(ObjectManager $om) + public function __construct(EntityManagerInterface $om) { $this->em = $om; diff --git a/src/Command/ImportCustomerCommand.php b/src/Command/ImportCustomerCommand.php index f6babefc..4c0e75e7 100644 --- a/src/Command/ImportCustomerCommand.php +++ b/src/Command/ImportCustomerCommand.php @@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\ORM\EntityManagerInterface; use DateTime; @@ -49,7 +49,7 @@ class ImportCustomerCommand extends Command protected $mfg_index; protected $vehicle_index; - public function __construct(ObjectManager $em) + public function __construct(EntityManagerInterface $em) { $this->em = $em; $this->populateMfgIndex(); diff --git a/src/Command/ImportLegacyJobOrderCommand.php b/src/Command/ImportLegacyJobOrderCommand.php index 7546880b..c0edfc80 100644 --- a/src/Command/ImportLegacyJobOrderCommand.php +++ b/src/Command/ImportLegacyJobOrderCommand.php @@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\ORM\EntityManagerInterface; use App\Entity\Warranty; use App\Entity\Battery; @@ -44,7 +44,7 @@ class ImportLegacyJobOrderCommand extends Command protected $row_max_field_size; protected $data_max_field_size; - public function __construct(ObjectManager $om) + public function __construct(EntityManagerInterface $om) { $this->em = $om; diff --git a/src/Command/ImportOutletsCommand.php b/src/Command/ImportOutletsCommand.php index dbcb5979..2de7a80e 100644 --- a/src/Command/ImportOutletsCommand.php +++ b/src/Command/ImportOutletsCommand.php @@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Validator\Validator\ValidatorInterface; -use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\ORM\EntityManagerInterface; use App\Entity\Outlet; use App\Entity\Hub; @@ -19,7 +19,7 @@ class ImportOutletsCommand extends Command { private $object_manager; - public function __construct(ObjectManager $om, ValidatorInterface $validator) + public function __construct(EntityManagerInterface $om, ValidatorInterface $validator) { $this->object_manager = $om; $this->validator = $validator; diff --git a/src/Command/ImportPartnersCommand.php b/src/Command/ImportPartnersCommand.php index 74e02d5b..e46a5aa2 100644 --- a/src/Command/ImportPartnersCommand.php +++ b/src/Command/ImportPartnersCommand.php @@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\ORM\EntityManagerInterface; use CrEOF\Spatial\PHP\Types\Geometry\Point; use DateTime; @@ -34,7 +34,7 @@ class ImportPartnersCommand extends Command protected $em; - public function __construct(ObjectManager $om) + public function __construct(EntityManagerInterface $om) { $this->em = $om; diff --git a/src/Command/ImportSAPBatteryCommand.php b/src/Command/ImportSAPBatteryCommand.php index fcd54f7d..91c14cba 100644 --- a/src/Command/ImportSAPBatteryCommand.php +++ b/src/Command/ImportSAPBatteryCommand.php @@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Validator\Validator\ValidatorInterface; -use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\ORM\EntityManagerInterface; use App\Entity\SAPBattery; use App\Entity\SAPBatteryBrand; @@ -22,7 +22,7 @@ class ImportSAPBatteryCommand extends Command private $batt_size_hash; private $batt_brand_hash; - public function __construct(ObjectManager $em) + public function __construct(EntityManagerInterface $em) { $this->em = $em; $this->initBatteryHash(); diff --git a/src/Command/ImportVehicleBatteryCommand.php b/src/Command/ImportVehicleBatteryCommand.php index 93c0bd77..73628894 100644 --- a/src/Command/ImportVehicleBatteryCommand.php +++ b/src/Command/ImportVehicleBatteryCommand.php @@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\ORM\EntityManagerInterface; use CrEOF\Spatial\PHP\Types\Geometry\Point; use DateTime; @@ -35,7 +35,7 @@ class ImportVehicleBatteryCommand extends Command protected $batt_index; - public function __construct(ObjectManager $om) + public function __construct(EntityManagerInterface $om) { $this->em = $om; $this->vmfg_index = []; diff --git a/src/Command/ImportVehicleCompatibilityCommand.php b/src/Command/ImportVehicleCompatibilityCommand.php index 29d74417..1c39862c 100644 --- a/src/Command/ImportVehicleCompatibilityCommand.php +++ b/src/Command/ImportVehicleCompatibilityCommand.php @@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\ORM\EntityManagerInterface; use CrEOF\Spatial\PHP\Types\Geometry\Point; use DateTime; @@ -28,7 +28,7 @@ class ImportVehicleCompatibilityCommand extends Command protected $bsize_index; protected $b_index; - public function __construct(ObjectManager $om) + public function __construct(EntityManagerInterface $om) { $this->em = $om; $this->vmfg_index = []; diff --git a/src/Command/MergeDuplicateVehiclesCommand.php b/src/Command/MergeDuplicateVehiclesCommand.php index a0b729cd..93fa94ad 100644 --- a/src/Command/MergeDuplicateVehiclesCommand.php +++ b/src/Command/MergeDuplicateVehiclesCommand.php @@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\ORM\EntityManagerInterface; use App\Entity\Vehicle; @@ -15,7 +15,7 @@ class MergeDuplicateVehiclesCommand extends Command { protected $em; - public function __construct(ObjectManager $om) + public function __construct(EntityManagerInterface $om) { $this->em = $om; diff --git a/src/Command/RefreshJobOrderCacheCommand.php b/src/Command/RefreshJobOrderCacheCommand.php index cdf904d2..0e314c56 100644 --- a/src/Command/RefreshJobOrderCacheCommand.php +++ b/src/Command/RefreshJobOrderCacheCommand.php @@ -8,7 +8,7 @@ use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Doctrine\DBAL\Connection; -use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\ORM\EntityManagerInterface; use App\Service\JobOrderCache; use App\Entity\JobOrder; use App\Ramcar\JOStatus; @@ -21,7 +21,7 @@ class RefreshJobOrderCacheCommand extends Command protected $em; protected $jo_cache; - public function __construct(ObjectManager $om, JobOrderCache $jo_cache) + public function __construct(EntityManagerInterface $om, JobOrderCache $jo_cache) { $this->em = $om; $this->jo_cache = $jo_cache; diff --git a/src/Command/ReportRiderTime.php b/src/Command/ReportRiderTime.php index 77d7f94d..e8825b5b 100644 --- a/src/Command/ReportRiderTime.php +++ b/src/Command/ReportRiderTime.php @@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\ORM\EntityManagerInterface; use DateTime; @@ -21,7 +21,7 @@ class ReportRiderTime extends Command protected $jo_index; protected $filtered_jo_index; - public function __construct(ObjectManager $em) + public function __construct(EntityManagerInterface $em) { $this->em = $em; diff --git a/src/Command/SeedRiderSessionsCommand.php b/src/Command/SeedRiderSessionsCommand.php index c52e0169..cc7dc26d 100644 --- a/src/Command/SeedRiderSessionsCommand.php +++ b/src/Command/SeedRiderSessionsCommand.php @@ -6,7 +6,7 @@ use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\ORM\EntityManagerInterface; use App\Service\RedisClientProvider; @@ -17,7 +17,7 @@ class SeedRiderSessionsCommand extends Command protected $em; protected $redis; - public function __construct(ObjectManager $om, RedisClientProvider $redis) + public function __construct(EntityManagerInterface $om, RedisClientProvider $redis) { $this->em = $om; $this->redis = $redis->getRedisClient(); diff --git a/src/Command/SetCustomerPrivacyPolicyCommand.php b/src/Command/SetCustomerPrivacyPolicyCommand.php index 4132fa91..9cb13f4b 100644 --- a/src/Command/SetCustomerPrivacyPolicyCommand.php +++ b/src/Command/SetCustomerPrivacyPolicyCommand.php @@ -8,7 +8,7 @@ use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\ORM\EntityManagerInterface; use App\Entity\Customer; use App\Entity\PrivacyPolicy; @@ -22,7 +22,7 @@ class SetCustomerPrivacyPolicyCommand extends Command private $policy_third_party_id; private $policy_mobile_id; - public function __construct(ObjectManager $om, $policy_promo, + public function __construct(EntityManagerInterface $om, $policy_promo, $policy_third_party, $policy_mobile) { $this->em = $om; diff --git a/src/Command/TestRegAPNSCommand.php b/src/Command/TestRegAPNSCommand.php index d9615141..52ec7d76 100644 --- a/src/Command/TestRegAPNSCommand.php +++ b/src/Command/TestRegAPNSCommand.php @@ -7,8 +7,6 @@ use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Doctrine\Common\Persistence\ObjectManager; - use App\Service\APNSClient; use DateTime; diff --git a/src/Command/UpdateCustomerVehicleBatteryCommand.php b/src/Command/UpdateCustomerVehicleBatteryCommand.php index f7e09e30..6726c2f0 100644 --- a/src/Command/UpdateCustomerVehicleBatteryCommand.php +++ b/src/Command/UpdateCustomerVehicleBatteryCommand.php @@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\ORM\EntityManagerInterface; use App\Entity\JobOrder; @@ -18,7 +18,7 @@ class UpdateCustomerVehicleBatteryCommand extends Command protected $em; protected $custvehicle_hash; - public function __construct(ObjectManager $om) + public function __construct(EntityManagerInterface $om) { $this->em = $om; $this->custvehicle_hash = []; diff --git a/src/Command/UpdateCustomerVehicleWarrantyCommand.php b/src/Command/UpdateCustomerVehicleWarrantyCommand.php index 89b6e5e0..98fec1cb 100644 --- a/src/Command/UpdateCustomerVehicleWarrantyCommand.php +++ b/src/Command/UpdateCustomerVehicleWarrantyCommand.php @@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\ORM\EntityManagerInterface; use App\Entity\Warranty; use App\Entity\CustomerVehicle; @@ -19,7 +19,7 @@ class UpdateCustomerVehicleWarrantyCommand extends Command protected $em; protected $wh; - public function __construct(ObjectManager $em, WarrantyHandler $wh) + public function __construct(EntityManagerInterface $em, WarrantyHandler $wh) { $this->em = $em; $this->wh = $wh; diff --git a/src/Command/UploadCleanupCommand.php b/src/Command/UploadCleanupCommand.php index 94d22c6e..03831ee9 100644 --- a/src/Command/UploadCleanupCommand.php +++ b/src/Command/UploadCleanupCommand.php @@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Filesystem\Exception\IOExceptionInterface; -use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\ORM\EntityManagerInterface; use App\Entity\Rider; use App\Entity\Battery; @@ -20,7 +20,7 @@ class UploadCleanupCommand extends Command private $encoder_factory; private $object_manager; - public function __construct(ObjectManager $om, Filesystem $fs, FileUploader $uploader) + public function __construct(EntityManagerInterface $om, Filesystem $fs, FileUploader $uploader) { $this->object_manager = $om; $this->filesystem = $fs; diff --git a/src/Command/UserCreateCommand.php b/src/Command/UserCreateCommand.php index f0873dc1..025086af 100644 --- a/src/Command/UserCreateCommand.php +++ b/src/Command/UserCreateCommand.php @@ -8,7 +8,7 @@ use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface; -use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\ORM\EntityManagerInterface; use App\Entity\User; use App\Entity\Role; @@ -18,7 +18,7 @@ class UserCreateCommand extends Command private $encoder_factory; private $object_manager; - public function __construct(EncoderFactoryInterface $ef, ObjectManager $om) + public function __construct(EncoderFactoryInterface $ef, EntityManagerInterface $om) { $this->encoder_factory = $ef; $this->object_manager = $om;