2725 search results for Doctrine

Pagination

Eventually, this page is going to get super long. By the time we have a thousand mixes, it probably won't even load! We can fix this by adding pagination. Does Doctrine have the ability to paginate results? It does ...

9:19
Detecting the Published State Change

... the normal DataPersisterInterface: Go to "Code"->"Generate" - or Command+N on a Mac - select "Implement Methods" and add the three method that we need: Before we fill in the code, let's immediately inject the doctrine ...

9:08
Update Query Rich vs Anemic Models

... back down in questionVote(), how can we execute an update query to save the new vote count to the database? Well, no surprise, whenever we need to save something in Doctrine, we need the entity manager. Add another ...

7:58
Hey Michel! I think I know this error :). The Doctrine organization has recently been releasing some major versions of libraries, and it's been causing various problems like this. The problem isn't really what Doctrine ...
weaverryan
weaverryan
Read Full Comment
... (id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); //... ``` while the docker-compose file configures a postgresql container: ``` version: '3.7' services: ###> doctrine ...
... ="postgresql://db_user:db_password@127.0.0.1:5432/db_name?serverVersion=13&charset=utf8" ` docker-compose.yml von recipes `version: '3' services: ###> doctrine/doctrine-bundle ### database: image: postgres ...
Tien dat L.
Tien dat L.
Read Full Comment
... 2) `composer outdated` gave this result doctrine/dbal 2.13.8 3.3.4 Powerful PHP database abst... doctrine/doctrine-migrations-bundle 2.2.3 3.2.2 Symfony DoctrineMigrations... doctrine/migrations ...
Hey Farry7, Yes, sure! Docker and Doctrine are completely different things. You can avoid using Docker and connect to your local MySQL DB directly from your application. About Doctrine - yes, some websites even don't ...
... \\FORMATION\\TutoModuleComment\\vendor\\doctrine\\persistence\\src\\Persistence\\Mapping\\MappingException.php", "line": 26, "args": [] }, { "namespace": "Doctrine\\Persistence\\Mapping ...
Is composer missing something? Fatal error: Uncaught PDOException: could not find driver in /home/rgr/development/gitprojects/rest/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractSQLiteDriver.php on line 85 ...
... "symfony/symfony" to "5.1.*" Your requirements could not be resolved to an installable set of packages. Problem 1 - doctrine/data-fixtures 1.4.4 requires doctrine/common ^2.13|^3.0 -> satisfiable by doctrine/common ...
composer require stof/doctrine-extensions-bundle --with-all-dependencies Using version ^1.6 for stof/doctrine-extensions-bundle ./composer.json has been updated Running composer update stof/doctrine-extensions-bundle ...
Jörg daniel F.
Jörg daniel F.
Read Full Comment
85 lines | composer.json
{
// ... lines 2 - 5
"require": {
"php": ">=8.1",
"ext-ctype": "*",
"ext-iconv": "*",
"api-platform/core": "^3.0",
"doctrine/annotations": "^1.0",
"doctrine/doctrine-bundle": "^2.8",
"doctrine/doctrine-migrations-bundle": "^3.2",
"doctrine/orm": "^2.14",
"nelmio/cors-bundle": "^2.2",
"phpdocumentor/reflection-docblock": "^5.3",
"phpstan/phpdoc-parser": "^1.15",
"symfony/asset": "6.2.*",
"symfony/console": "6.2.*",
"symfony/dotenv": "6.2.*",
"symfony/expression-language": "6.2.*",
"symfony/flex": "^2",
"symfony/framework-bundle": "6.2.*",
"symfony/property-access": "6.2.*",
"symfony/property-info": "6.2.*",
"symfony/runtime": "6.2.*",
"symfony/security-bundle": "6.2.*",
"symfony/serializer": "6.2.*",
"symfony/twig-bundle": "6.2.*",
"symfony/validator": "6.2.*",
"symfony/yaml": "6.2.*"
},
// ... lines 33 - 83
}
See Code Block in Script
Interestingly, you can specify the table name with any case in the command: php bin/console doctrine: query: sql " SELECT * FROM ARTICLE" php bin/console doctrine: query: sql " SELECT * FROM article" php bin/console ...
Hi Ryan, I found out that the 'YamlDriver' in 'Doctrine\ORM\Mapping\Driver' still uses Yaml:parse($file) in its loadMappingFile($file) method. Upon adding file_get_contents, all of my yml deprecated logs disappeared ...
Ziad Jammal
Ziad Jammal
Read Full Comment
30 lines | .env
// ... lines 1 - 22
###> doctrine/doctrine-bundle ###
# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
# For an SQLite database, use: "sqlite:///%kernel.project_dir%/var/data.db"
# For a PostgreSQL database, use: "postgresql://db_user:db_password@127.0.0.1:5432/db_name?serverVersion=11&charset=utf8"
# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml
DATABASE_URL=mysql://db_user:db_password@127.0.0.1:3306/db_name?serverVersion=5.7
###< doctrine/doctrine-bundle ###
See Code Block in Script
62 lines | .env
// ... lines 1 - 22
###> doctrine/doctrine-bundle ###
# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
# For an SQLite database, use: "sqlite:///%kernel.project_dir%/var/data.db"
# For a PostgreSQL database, use: "postgresql://db_user:db_password@127.0.0.1:5432/db_name?serverVersion=11&charset=utf8"
# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml
DATABASE_URL=mysql://root:@127.0.0.1:3306/the_spacebar
###< doctrine/doctrine-bundle ###
// ... lines 30 - 62
See Code Block in Script
JOINs

... clause to include WHERE fortune_cookie.fortune = :searchTerm, we first need to JOIN to the fortune_cookie table. And that is what we're going to do in Doctrine... except with a twist. Instead of thinking about joining ...

3:45
Partial Handler Failures Advanced Routing

... It's gone! Before we handle the new command class asynchronously, we need to think about something. If, for some reason, there's a problem removing this ImagePost from the database, Doctrine will throw an exception ...

4:35
Adding a Comment Entity

Hey friends! I mean, hello fellow space-traveling developer... friends. Welcome, to part two of our Doctrine tutorial where we talk all about... relationships. Oh, I love relationships, and there are so many beautiful ...

5:04