Fase 1: Estructura Base y DI Container - Clean Architecture

COMPLETADO: Fase 1 de la migración a Clean Architecture + POO

## Estructura de Carpetas
- ✓ Estructura completa de 4 capas (Domain, Application, Infrastructure, Presentation)
- ✓ Carpetas de Use Cases (SaveComponent, GetComponent, DeleteComponent, SyncSchema)
- ✓ Estructura de tests (Unit, Integration, E2E)
- ✓ Carpetas de schemas y templates

## Composer y Autoloading
- ✓ PSR-4 autoloading configurado para ROITheme namespace
- ✓ Autoloader optimizado regenerado

## DI Container
- ✓ DIContainer implementado con patrón Singleton
- ✓ Métodos set(), get(), has() para gestión de servicios
- ✓ Getters específicos para ComponentRepository, ValidationService, CacheService
- ✓ Placeholders que serán implementados en Fase 5
- ✓ Prevención de clonación y deserialización

## Interfaces
- ✓ ComponentRepositoryInterface (Domain)
- ✓ ValidationServiceInterface (Application)
- ✓ CacheServiceInterface (Application)
- ✓ Component entity placeholder (Domain)

## Bootstrap
- ✓ functions.php actualizado con carga de Composer autoloader
- ✓ Inicialización del DIContainer
- ✓ Helper function roi_container() disponible globalmente

## Tests
- ✓ 10 tests unitarios para DIContainer (100% cobertura)
- ✓ Total: 13 tests unitarios, 28 assertions
- ✓ Suite de tests pasando correctamente

## Validación
- ✓ Script de validación automatizado (48/48 checks pasados)
- ✓ 100% de validaciones exitosas

La arquitectura base está lista para la Fase 2.

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
FrankZamora
2025-11-17 13:48:24 -06:00
parent b782ebceee
commit de5fff4f5c
149 changed files with 3187 additions and 9554 deletions

18
404.php
View File

@@ -7,7 +7,7 @@
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#404-not-found
*
* @package Apus_Theme
* @package ROI_Theme
* @since 1.0.0
*/
@@ -23,7 +23,7 @@ get_header();
<!-- Error Header -->
<header class="page-header">
<h1 id="error-404-title" class="page-title">
<?php esc_html_e( '404 - Page Not Found', 'apus-theme' ); ?>
<?php esc_html_e( '404 - Page Not Found', 'roi-theme' ); ?>
</h1>
</header><!-- .page-header -->
@@ -31,25 +31,25 @@ get_header();
<div class="page-content">
<p class="error-message">
<?php esc_html_e( 'Oops! The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.', 'apus-theme' ); ?>
<?php esc_html_e( 'Oops! The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.', 'roi-theme' ); ?>
</p>
<!-- Helpful Actions -->
<div class="error-actions">
<h2><?php esc_html_e( 'What can you do?', 'apus-theme' ); ?></h2>
<h2><?php esc_html_e( 'What can you do?', 'roi-theme' ); ?></h2>
<ul class="error-suggestions" role="list">
<li>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>">
<?php esc_html_e( 'Go to the homepage', 'apus-theme' ); ?>
<?php esc_html_e( 'Go to the homepage', 'roi-theme' ); ?>
</a>
</li>
<li>
<?php esc_html_e( 'Check the URL for typos', 'apus-theme' ); ?>
<?php esc_html_e( 'Check the URL for typos', 'roi-theme' ); ?>
</li>
<li>
<?php esc_html_e( 'Use the navigation menu above', 'apus-theme' ); ?>
<?php esc_html_e( 'Use the navigation menu above', 'roi-theme' ); ?>
</li>
</ul>
@@ -65,7 +65,7 @@ get_header();
if ( ! empty( $recent_posts ) ) :
?>
<div class="recent-posts-section">
<h3><?php esc_html_e( 'Recent Posts', 'apus-theme' ); ?></h3>
<h3><?php esc_html_e( 'Recent Posts', 'roi-theme' ); ?></h3>
<ul class="recent-posts-list" role="list">
<?php foreach ( $recent_posts as $recent ) : ?>
<li>
@@ -95,7 +95,7 @@ get_header();
if ( ! empty( $categories ) ) :
?>
<div class="categories-section">
<h3><?php esc_html_e( 'Browse by Category', 'apus-theme' ); ?></h3>
<h3><?php esc_html_e( 'Browse by Category', 'roi-theme' ); ?></h3>
<ul class="categories-list" role="list">
<?php foreach ( $categories as $category ) : ?>
<li>