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:
@@ -7,7 +7,7 @@
|
||||
*
|
||||
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#attachment
|
||||
*
|
||||
* @package Apus_Theme
|
||||
* @package ROI_Theme
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
@@ -41,7 +41,7 @@ get_header();
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: attachment date */
|
||||
esc_html__( 'Uploaded on %s', 'apus-theme' ),
|
||||
esc_html__( 'Uploaded on %s', 'roi-theme' ),
|
||||
'<span class="date-text">' . esc_html( get_the_date() ) . '</span>'
|
||||
);
|
||||
?>
|
||||
@@ -57,7 +57,7 @@ get_header();
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: file size */
|
||||
esc_html__( 'Size: %s', 'apus-theme' ),
|
||||
esc_html__( 'Size: %s', 'roi-theme' ),
|
||||
esc_html( size_format( $metadata['filesize'] ) )
|
||||
);
|
||||
?>
|
||||
@@ -72,7 +72,7 @@ get_header();
|
||||
<?php
|
||||
printf(
|
||||
/* translators: 1: width, 2: height */
|
||||
esc_html__( 'Dimensions: %1$s × %2$s pixels', 'apus-theme' ),
|
||||
esc_html__( 'Dimensions: %1$s × %2$s pixels', 'roi-theme' ),
|
||||
esc_html( number_format_i18n( $metadata['width'] ) ),
|
||||
esc_html( number_format_i18n( $metadata['height'] ) )
|
||||
);
|
||||
@@ -109,7 +109,7 @@ get_header();
|
||||
<a href="<?php echo esc_url( wp_get_attachment_url() ); ?>"
|
||||
class="btn btn-primary download-link"
|
||||
download>
|
||||
<?php esc_html_e( 'Download Original', 'apus-theme' ); ?>
|
||||
<?php esc_html_e( 'Download Original', 'roi-theme' ); ?>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -120,7 +120,7 @@ get_header();
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: attachment file name */
|
||||
esc_html__( 'File: %s', 'apus-theme' ),
|
||||
esc_html__( 'File: %s', 'roi-theme' ),
|
||||
'<strong>' . esc_html( basename( get_attached_file( get_the_ID() ) ) ) . '</strong>'
|
||||
);
|
||||
?>
|
||||
@@ -130,7 +130,7 @@ get_header();
|
||||
<a href="<?php echo esc_url( wp_get_attachment_url() ); ?>"
|
||||
class="btn btn-primary download-link"
|
||||
download>
|
||||
<?php esc_html_e( 'Download File', 'apus-theme' ); ?>
|
||||
<?php esc_html_e( 'Download File', 'roi-theme' ); ?>
|
||||
</a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
@@ -151,7 +151,7 @@ get_header();
|
||||
// Display page links for paginated content
|
||||
wp_link_pages(
|
||||
array(
|
||||
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'apus-theme' ),
|
||||
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'roi-theme' ),
|
||||
'after' => '</div>',
|
||||
)
|
||||
);
|
||||
@@ -171,7 +171,7 @@ get_header();
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: parent post title */
|
||||
esc_html__( 'View: %s', 'apus-theme' ),
|
||||
esc_html__( 'View: %s', 'roi-theme' ),
|
||||
'<span class="parent-title">' . esc_html( get_the_title( $parent_post ) ) . '</span>'
|
||||
);
|
||||
?>
|
||||
@@ -185,7 +185,7 @@ get_header();
|
||||
sprintf(
|
||||
wp_kses(
|
||||
/* translators: %s: Attachment title. Only visible to screen readers. */
|
||||
__( 'Edit<span class="screen-reader-text"> "%s"</span>', 'apus-theme' ),
|
||||
__( 'Edit<span class="screen-reader-text"> "%s"</span>', 'roi-theme' ),
|
||||
array(
|
||||
'span' => array(
|
||||
'class' => array(),
|
||||
|
||||
Reference in New Issue
Block a user