-
Notifications
You must be signed in to change notification settings - Fork 12
feature branch: use Doctrine #72
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
base: main
Are you sure you want to change the base?
Conversation
b824659 to
c538040
Compare
ec2fa69 to
f0b7064
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
This PR integrates Doctrine DBAL to display user data from a SQLite database, mirroring functionality from a previous Eloquent implementation. It adds database migrations, fixture loading, and a users list page.
Changes:
- Adds Doctrine DBAL/ORM packages and configures database connection to SQLite
- Creates user table migration and fixtures loading command
- Implements users list controller and template to display database records
Reviewed changes
Copilot reviewed 13 out of 19 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| composer.json | Adds Doctrine dependencies and disables security audit blocking |
| config/bundles.php | Registers Doctrine and Doctrine Migrations bundles |
| config/packages/doctrine.php | Configures Doctrine DBAL/ORM with SQLite connection |
| config/packages/doctrine_migrations.php | Configures migrations path and disables profiler |
| .env | Adds DATABASE_URL configuration for SQLite database |
| migrations/Version20241005210212.php | Creates user table schema with id, email, password, pseudo, and timestamps |
| src/Command/LoadFixturesCommand.php | Implements command to populate user table with test data |
| src/Controller/ListUsersAction.php | Controller to fetch and display all users from database |
| templates/App/Controller/ListUsersAction.html.twig | Template displaying user data in a table |
| templates/base.html.twig | Adds navigation link to users list page |
| Makefile | Adds load-fixtures target and updates coverage to run fixtures |
| castor.php | Adds loadFixures function and integrates it into test/coverage tasks |
| tests/Integration/Command/LoadFixturesCommandTest.php | Integration test for fixtures loading command |
💡 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 13 out of 19 changed files in this pull request and generated 3 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 13 out of 19 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 13 out of 19 changed files in this pull request and generated 3 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 13 out of 19 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| for ($i = 1; $i <= 10; ++$i) { | ||
| $this->connection->insert('user', [ | ||
| 'email' => \sprintf('user%[email protected]', $i), | ||
| 'password' => password_hash(ByteString::fromRandom(32)->toString(), \PASSWORD_DEFAULT), |
Copilot
AI
Jan 16, 2026
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.
The PASSWORD_DEFAULT algorithm constant may change in future PHP versions, which could cause inconsistencies in fixture data across different environments or PHP versions. Consider explicitly specifying PASSWORD_BCRYPT or PASSWORD_ARGON2ID for predictable fixture behavior.
| 'password' => password_hash(ByteString::fromRandom(32)->toString(), \PASSWORD_DEFAULT), | |
| 'password' => password_hash(ByteString::fromRandom(32)->toString(), \PASSWORD_BCRYPT), |
| 'orm' => [ | ||
| 'validate_xml_mapping' => true, | ||
| 'naming_strategy' => 'doctrine.orm.naming_strategy.underscore_number_aware', | ||
| 'auto_mapping' => true, | ||
| 'mappings' => [ | ||
| 'App' => [ | ||
| 'type' => 'attribute', | ||
| 'is_bundle' => false, | ||
| 'dir' => '%kernel.project_dir%/src/Entity', | ||
| 'prefix' => 'App\Entity', | ||
| 'alias' => 'App', | ||
| ], | ||
| ], | ||
| ], |
Copilot
AI
Jan 16, 2026
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.
ORM configuration is present but the PR only uses Doctrine DBAL (as stated in the description and controller implementation). This ORM configuration references a non-existent Entity directory and may cause confusion. Consider removing the ORM configuration or documenting why it's included for future use.
| 'orm' => [ | |
| 'validate_xml_mapping' => true, | |
| 'naming_strategy' => 'doctrine.orm.naming_strategy.underscore_number_aware', | |
| 'auto_mapping' => true, | |
| 'mappings' => [ | |
| 'App' => [ | |
| 'type' => 'attribute', | |
| 'is_bundle' => false, | |
| 'dir' => '%kernel.project_dir%/src/Entity', | |
| 'prefix' => 'App\Entity', | |
| 'alias' => 'App', | |
| ], | |
| ], | |
| ], |
[2026-01-16] Update 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.