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:
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
|
||||
*
|
||||
* @package Apus_Theme
|
||||
* @package ROI_Theme
|
||||
* @since 1.0.0
|
||||
*/
|
||||
?>
|
||||
@@ -36,7 +36,7 @@
|
||||
// Posted by author
|
||||
printf(
|
||||
'<span class="byline"> %s <span class="author vcard"><a class="url fn n" href="%s">%s</a></span></span>',
|
||||
esc_html__( 'by', 'apus-theme' ),
|
||||
esc_html__( 'by', 'roi-theme' ),
|
||||
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
|
||||
esc_html( get_the_author() )
|
||||
);
|
||||
@@ -45,9 +45,9 @@
|
||||
if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) :
|
||||
echo '<span class="comments-link">';
|
||||
comments_popup_link(
|
||||
esc_html__( 'Leave a comment', 'apus-theme' ),
|
||||
esc_html__( '1 Comment', 'apus-theme' ),
|
||||
esc_html__( '% Comments', 'apus-theme' )
|
||||
esc_html__( 'Leave a comment', 'roi-theme' ),
|
||||
esc_html__( '1 Comment', 'roi-theme' ),
|
||||
esc_html__( '% Comments', 'roi-theme' )
|
||||
);
|
||||
echo '</span>';
|
||||
endif;
|
||||
@@ -63,11 +63,11 @@
|
||||
<div class="post-thumbnail">
|
||||
<?php
|
||||
if ( is_singular() ) :
|
||||
the_post_thumbnail( 'apus-featured-large', array( 'alt' => the_title_attribute( array( 'echo' => false ) ) ) );
|
||||
the_post_thumbnail( 'roi-featured-large', array( 'alt' => the_title_attribute( array( 'echo' => false ) ) ) );
|
||||
else :
|
||||
?>
|
||||
<a href="<?php the_permalink(); ?>" aria-hidden="true" tabindex="-1">
|
||||
<?php the_post_thumbnail( 'apus-featured-medium', array( 'alt' => the_title_attribute( array( 'echo' => false ) ) ) ); ?>
|
||||
<?php the_post_thumbnail( 'roi-featured-medium', array( 'alt' => the_title_attribute( array( 'echo' => false ) ) ) ); ?>
|
||||
</a>
|
||||
<?php
|
||||
endif;
|
||||
@@ -84,7 +84,7 @@
|
||||
sprintf(
|
||||
wp_kses(
|
||||
/* translators: %s: Name of current post. Only visible to screen readers */
|
||||
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'apus-theme' ),
|
||||
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'roi-theme' ),
|
||||
array(
|
||||
'span' => array(
|
||||
'class' => array(),
|
||||
@@ -98,7 +98,7 @@
|
||||
// Display pagination for multi-page posts
|
||||
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>',
|
||||
)
|
||||
);
|
||||
@@ -112,21 +112,21 @@
|
||||
<footer class="entry-footer">
|
||||
<?php
|
||||
// Display categories
|
||||
$categories_list = get_the_category_list( esc_html__( ', ', 'apus-theme' ) );
|
||||
$categories_list = get_the_category_list( esc_html__( ', ', 'roi-theme' ) );
|
||||
if ( $categories_list ) :
|
||||
printf(
|
||||
'<span class="cat-links">%s %s</span>',
|
||||
esc_html__( 'Categories:', 'apus-theme' ),
|
||||
esc_html__( 'Categories:', 'roi-theme' ),
|
||||
$categories_list // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
);
|
||||
endif;
|
||||
|
||||
// Display tags
|
||||
$tags_list = get_the_tag_list( '', esc_html_x( ', ', 'list item separator', 'apus-theme' ) );
|
||||
$tags_list = get_the_tag_list( '', esc_html_x( ', ', 'list item separator', 'roi-theme' ) );
|
||||
if ( $tags_list ) :
|
||||
printf(
|
||||
'<span class="tags-links">%s %s</span>',
|
||||
esc_html__( 'Tags:', 'apus-theme' ),
|
||||
esc_html__( 'Tags:', 'roi-theme' ),
|
||||
$tags_list // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
);
|
||||
endif;
|
||||
@@ -136,7 +136,7 @@
|
||||
sprintf(
|
||||
wp_kses(
|
||||
/* translators: %s: Name of current post. 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