Skip to content

[#86] - make:model with a list of schemas: the minors of the review - #114

Merged
niden merged 5 commits into
masterfrom
T86-schema-list-minors
Nov 28, 2026
Merged

niden merged 5 commits into
masterfrom
T86-schema-list-minors

Conversation

@niden

@niden niden commented Nov 28, 2026

Copy link
Copy Markdown
Member

Hello!

In raising this pull request, I confirm the following:

  • I have checked that another pull request for this purpose does not exist
  • I wrote some tests for this PR
  • composer test, composer cs and composer analyze all pass
  • I have created a PR for the documentation about this change, if user facing

The four minors of the review of #86 (PR #112). Stacked on #16 (T16-internal-config).

  • The Note line of the old files ([NFR]: Show the model names: config:show and the old files of a renamed class #71): a table of another schema that gets a new class from models.classes gave no Note line, because oldFiles() made the default class from the name with its schema. It now uses tableOf(). A table of the default schema that has the default class still gives no line.
  • A name in another case: make:model billing.Payments gave a false clash with the listed billing.payments. On MySQL with lower_case_table_names 1 or 2, it is the same table. When the name of the call is not listed, a listed name that differs only in case is that table, and the clash message names the listed name. When the name is listed, a name in another case is another table (PostgreSQL), and the clash stays. On a server that keeps the case, a case typo now gives "not found", not a clash.
  • The clash message: a table with a line in models.classes keeps its class, as the table of the default schema does, so the message does not tell you to add a line for it.
  • The docblocks of ModelCommand, ModelTables and ModelRelations::keyAlias().

Tests: unit, ModelCommandSchemaSqliteTest (the Note line, on the SQLite test adapter), and ModelCommandSchemasTest on MySQL, MariaDB and PostgreSQL (a name in another case; no Note line for the base of the default table). Infection on the changed lines: MSI 100%.

Thanks

…Note of a table of another schema, a name in another case, the clash message for a table with a line, and the docblocks

Assisted-by: Claude Code
…ema, a name in another case, and a table with a line in the clash message

Assisted-by: Claude Code
Assisted-by: Claude Code
…h lower_case_table_names 2 gives it

Assisted-by: Claude Code
@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown

Code Metrics Report

master (7e623ba) #114 (088f22d) +/-
Coverage 99.8% 99.8% +0.0%
Test Execution Time 11s 12s +1s
Details
  |                     | master (7e623ba) | #114 (088f22d) |  +/-  |
  |---------------------|------------------|----------------|-------|
+ | Coverage            |            99.8% |          99.8% | +0.0% |
  |   Files             |               97 |             97 |     0 |
  |   Lines             |             4034 |           4203 |  +169 |
+ |   Covered           |             4027 |           4196 |  +169 |
- | Test Execution Time |              11s |            12s |   +1s |

Code coverage of files in pull request scope (100.0% → 100.0%, patch 100.0%)

Files Coverage +/- Patch Coverage Status
src/Command/Make/ModelCommand.php 100.0% 0.0% 100.0% modified
src/Generator/ModelNames.php 100.0% 0.0% 100.0% modified
src/Generator/ModelRelations.php 100.0% 0.0% - modified
src/Generator/ModelTables.php 100.0% 0.0% - modified

Reported by octocov

Base automatically changed from T16-internal-config to master November 28, 2026 13:01
@niden
niden merged commit 275a4c5 into master Nov 28, 2026
42 checks passed
@niden
niden deleted the T86-schema-list-minors branch November 28, 2026 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant