Category : doctrine

I’m deploying a new version of my Laravel PHP application on a Azure app service plan via the deployment center (via Bitbucket). The application used to deploy without problems but it fails with the following error in my log > IlluminateFoundationComposerScripts::postAutoloadDump > @php artisan package:discover DoctrineDBALDriverPDOException could not find driver at vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18 14| final class ..

Read more

So by default API Platform comes with these Donctrine mappings in Doctrine.yaml: mappings: App: is_bundle: false type: annotation dir: ‘%kernel.project_dir%/src/Entity’ prefix: ‘AppEntity’ alias: App However, I’d like to structure my entities in this way: src/Domain/ Product/Entity/*.php Order/Entity/*.php Address/Entity/*.php Is there a way to automatically load these entities without adding a new map to the config? ..

Read more

I installed a fresh Laravel Homestead development environment (11.*) which ships with MySql 8, when I try to run migrations which have the ->change() method it throws the following error: DoctrineDBALException : An exception occurred while executing ‘ SELECT COLUMN_NAME AS Field, COLUMN_TYPE AS Type, IS_NULLABLE AS `Null`, COLUMN_KEY AS `Key`, COLUMN_DEFAULT AS `Default`, EXTRA ..

Read more

I’m using Laravel with Doctrine. I’m building a webcrawler. I have many Entities, one of my entities have a column with a "unique constraint". So, when the unique constraint is violated on a INSERT, occour a DBAL Exception An exception occurred while executing ‘INSERT…’ SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘(…)’ for key ‘column_name_unique’ ..

Read more

I have tried to insert lead_name,lead_status,lead_description value in db in laravel 6.18.41 version. Controller code(LeadController.php): <?php namespace AppHttpControllers; use AppRepositoryLeadRep as LeadRepo; use IlluminateHttpRequest; use AppHttpControllersBaseController as BaseController; use IlluminateSupportFacadesLog; use SymfonyComponentSerializerSerializer; use SymfonyComponentSerializerNormalizerGetSetMethodNormalizer; use SymfonyComponentSerializerEncoderJsonEncoder; class LeadController extends BaseController { private $leadRepo; public function __construct(LeadRepo $leadRepo) { $this->leadRepo = $leadRepo; } /** * @param ..

Read more

I have a project in Laravel which has model names, fields and messages in Spanish, I am currently using laravel-shift/blueprint to generate all the base code of the application from a yaml file, at the moment of Laravel infer the pluralization of the names for the migrations, controllers, variables etc, it makes them treating the ..

Read more

The problem: In my project (in spanish) in Laravel 6 I created a service provider to add custom pluralizations to my application, for them I created a rule set for Inflector in the Register() method. public function register() { /** * Extender pluralizaci√≥n para palabras irregulares */ Inflector::rules(‘plural’, [ ‘irregular’ => [ "organizacion" => "organizaciones", ..

Read more