-
Notifications
You must be signed in to change notification settings - Fork 12
feat: use Doctrine to query a SQLite database #219
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR integrates Doctrine DBAL into MicroSymfony to demonstrate database operations using SQLite, mirroring functionality from an Eloquent feature branch. The implementation adds a user listing feature that displays data from a SQLite database without using the full Doctrine ORM.
Changes:
- Added Doctrine DBAL, DoctrineBundle, and DoctrineMigrationsBundle dependencies
- Created database schema migration for a user table with email, password, pseudo, and timestamp fields
- Implemented a fixture loading command and controller action to display user data
- Updated build tooling (Makefile and Castor) to include fixture loading in test workflows
Reviewed changes
Copilot reviewed 13 out of 19 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| composer.json | Added Doctrine DBAL, DoctrineBundle, DoctrineMigrationsBundle, and ORM packages with audit configuration |
| config/bundles.php | Registered DoctrineBundle and DoctrineMigrationsBundle for all environments |
| config/packages/doctrine.php | Configured Doctrine DBAL with SQLite connection and profiling; includes commented ORM configuration |
| config/packages/doctrine_migrations.php | Configured migrations path and disabled profiler |
| .env | Added DATABASE_URL environment variable for SQLite database connection |
| migrations/Version20241005210212.php | Created user table schema with id, email, password, pseudo, and timestamp columns |
| src/Command/LoadFixturesCommand.php | Implemented command to generate and insert 10 test user records |
| src/Controller/ListUsersAction.php | Created controller action to fetch and display all users from database |
| templates/App/Controller/ListUsersAction.html.twig | Added template to render user data in a table format |
| templates/base.html.twig | Added navigation link to the users list page |
| castor.php | Added loadFixtures task and integrated it into test_all, coverage, and ci tasks |
| Makefile | Added load-fixtures target and made coverage depend on it |
| tests/Integration/Command/LoadFixturesCommandTest.php | Added integration test for the LoadFixturesCommand |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 18 out of 24 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 18 out of 24 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ad99333 to
c006db6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 19 out of 25 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
castor.php:1
- The lint-doctrine task is referenced in the lint target but is not defined in castor.php. This will cause the lint task to fail when executed.
<?php
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 19 out of 25 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 19 out of 25 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 20 out of 26 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 20 out of 26 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 21 out of 27 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
[2026-01-16] Rebased from main (Symfony 8).
The goal of this feature is to use Doctrine DBAL to display the content of a user table of a SQLite database. It is the same feature as in the eloquent feature branch.