fix(ticket): register the ticket schema inside the users sections array
/users/ticket loaded in the SPA but the form never did: the console showed "未知的设置分组: ticket" from /settings/schema/users/ticket. The ticket section was composed one array level too high in SchemaUsers::build() — as a sibling of 'sections' rather than inside it — so SchemaProvider::get_sections(), which reads only $schema['sections'], never saw it and the REST handler 404'd. Every other axis was wired correctly: the route, the menu entry, users/ticket.js and SchemaUsersTicket itself. That is why only this page failed while sibling /users/* pages worked. Move the entry inside sections. The contract test could not catch this because it asserted only that the compose call appears somewhere in the file. Replace it with a bracket-balanced scan that locates the sections array bounds and asserts the compose call falls inside, so nesting mistakes are visible. Also update the two ticket contract tests that still read the trait from src/Ticket/TicketRepository-traits/, its pre-flattening path. They assert on the trait's contents, so they were silently skipping the very file the earlier fatal was about. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
ffd8d7d1b7
commit
d32bdc0581
4 files changed
+27
-5
No files matched your search
@@ -611,8 +611,8 @@ class SchemaUsers {
|
||||
]],
|
||||
],
|
||||
],
|
||||
'ticket' => Users\SchemaUsersTicket::build(),
|
||||
],
|
||||
'ticket' => Users\SchemaUsersTicket::build(),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user