Repository navigation
T54 crest new db service - #72
Merged
Merged
Conversation
Assisted-by: Claude Code
Assisted-by: Claude Code
Assisted-by: Claude Code
Assisted-by: Claude Code
This comment has been minimized.
This comment has been minimized.
Code Metrics Report
Details | | master (07e236b) | #72 (b03ed8c) | +/- |
|---------------------|------------------|---------------|-------|
+ | Coverage | 99.7% | 99.7% | +0.0% |
| Files | 85 | 86 | +1 |
| Lines | 2861 | 3046 | +185 |
+ | Covered | 2854 | 3039 | +185 |
- | Test Execution Time | 9s | 12s | +3s |Code coverage of files in pull request scope (100.0% → 100.0%, patch 100.0%)
Reported by octocov |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello!
crest newadds a database service #54In raising this pull request, I confirm the following:
composer test,composer csandcomposer analyzeall passnew --database=none|mariadb|mysql|pgsql|sqliteand its question: a server database gets the servicedatabaseindocker-compose.yml(mysql:8.4,mariadb:11.4orpostgres:18, with a health check and a named volume), the PDO extension in the Dockerfile, and the connection values in.env;sqlitegets the filestorage/database.sqlite. Each flavor gets aDbProviderthat registers thedbservice, somake:modelreads the database with no manual step. The service reads each value fromgetenv(), then$_ENV, then a default for PHP on the host. AddedCrest\Generator\Project\DatabaseChoice, the project stubsproject-provider-dbandproject-provider-db-sqlite(ADR and MVC), and the shared project stubsproject-compose-mysql,project-compose-mariadb,project-compose-pgsql,project-env-databaseandproject-env-sqlite.phalcon/phqlto thecomposer.jsonof an MVC project with Phalcon v6 and a database.modelskey to thecrest.phpthatnewandinitwrite for an MVC project.new --camel-casegives'camelCase' => true, andnewasks for it for an MVC project with a database;initwritesfalse.project-compose,project-dockerfile,project-env,project-gitignore,project-composer,project-configandproject-front(ADR and MVC): they have new placeholders. When the project needs one,newstops before it writes a file if a published copy does not have it: publish the stub again. Without a database and without--camel-case, an old copy works as before.new: in a terminal, it asks for the database, so a script that sends answers tonewneeds one more line.Crest\Generator\Project\Answershas a new last argumentdatabase, andCrest\Project\Settingsa new last argumentcamelCase.Thanks