Framework pull: auto-revert use statement changes before update

Class override system: .upstream file handling and restore logic
Php_Fixer: Redirect use statements to correct manifest FQCN
Fix: Only match PHP files in __find_class_fqcn_in_manifest
Complete Php_Fixer use statement redirection implementation (checkpoint 2)
WIP: Php_Fixer use statement redirection for class overrides (checkpoint)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root
2025-12-10 07:04:05 +00:00
parent 0a479ed5a2
commit f02a04f37a
6 changed files with 307 additions and 51 deletions

View File

@@ -94,6 +94,12 @@ class Monoprogenic_CodeQualityRule extends CodeQualityRule_Abstract
// Step 1: Find all classes with Monoprogenic attribute
$monoprogenic_classes = [];
foreach ($files as $file => $file_metadata) {
// Skip .upstream files - they are framework files overridden by rsx/
$extension = $file_metadata['extension'] ?? '';
if ($extension === 'php.upstream') {
continue;
}
if (isset($file_metadata['attributes']['Monoprogenic'])) {
$fqcn = $file_metadata['fqcn'] ?? null;
if ($fqcn) {
@@ -119,6 +125,12 @@ class Monoprogenic_CodeQualityRule extends CodeQualityRule_Abstract
{
// Find all classes that extend from any Monoprogenic class
foreach ($files as $file => $metadata) {
// Skip .upstream files - they are framework files overridden by rsx/
$extension = $metadata['extension'] ?? '';
if ($extension === 'php.upstream') {
continue;
}
$fqcn = $metadata['fqcn'] ?? null;
if (!$fqcn || !class_exists($fqcn)) {
continue;