Skip to content

Silver Assist ACF Clone Fields v1.1.1

Choose a tag to compare

@github-actions github-actions released this 09 Nov 17:06
· 105 commits to main since this release

What's New in v1.1.1

Added

  • Comprehensive Test Coverage: Professional-grade test suite with WordPress Test Suite integration

    • 13 new test files covering all plugin components (4,827 lines of test code)
    • Admin component tests: BackupManager, MetaBox, Settings, Ajax, Loader
    • Core component tests: Plugin, Activator
    • Services tests: FieldCloner, FieldDetector
    • All tests use real WordPress environment (no mocks) via WP_UnitTestCase
    • Test coverage improvements:
      • Helpers utility: 53% → ~75%+ coverage (30 new tests)
      • Logger utility: 35% → ~100% coverage (comprehensive coverage)
      • FieldDetector service: 25% → ~70%+ coverage
    • Total test suite: 257 unit tests, 565+ assertions, all tests passing
  • Documentation Enhancements: Comprehensive developer documentation

    • .github/instructions/testing.instructions.md: VS Code custom instructions for WordPress Test Suite (447 lines)
    • .github/instructions/css.instructions.md: WordPress CSS Coding Standards guide (548 lines)
    • tests/README.md: Complete rewrite with WordPress Test Suite documentation (504+ lines)
    • CONTRIBUTING.md: WordPress Test Suite section added (267+ lines)
    • docs/AJAX_API_REFERENCE.md: Translated to English with QUnit testing section
    • .github/copilot-instructions.md: Extensive WordPress Test Suite patterns (300+ lines added)
  • CSS Architecture Enhancement: Modern CSS system with WordPress standards compliance

    • Renamed admin.csssilver-acf-clone-fields.css (plugin-specific naming convention)
    • Implemented 100+ CSS custom properties (CSS variables) organized by category:
      • Colors: Primary (3), Semantic (6), Neutral (11)
      • Spacing: 8px-based system (11 variables)
      • Typography: Font sizes (7), weights (4), line-heights, letter-spacing
      • Components: Border-radius (4), shadows (2), z-index (2), transitions (3), dimensions (8)
    • Variable naming pattern: --silver-acf-{category}-{property}
    • 100% WordPress CSS Coding Standards compliance (property ordering, formatting)
    • Enhanced maintainability and theme customization support
  • Internationalization: POT translation template

    • languages/silver-assist-acf-clone-fields.pot: Generated with WP-CLI (721 lines)
    • Ready for community translations

Changed

  • Test Infrastructure Refactoring

    • tests/Utils/TestCase.php: Refactored to always use WP_UnitTestCase when available
    • tests/bootstrap.php: Enhanced with WordPress Test Suite auto-detection
    • phpunit.xml.dist: Added coverage configuration and test suite organization
    • Integration tests updated for new WordPress Test Suite patterns
  • Build & CI/CD Improvements

    • scripts/run-quality-checks.sh: Enhanced error handling and proper exit codes for CI
    • .github/workflows/dependency-updates.yml: Skip phpunit in dependency checks (faster automated runs)
    • .github/workflows/quality-checks.yml: Added PHP_VERSION environment variable support
  • CSS File References Updated

    • includes/Admin/MetaBox.php: Updated CSS reference to silver-acf-clone-fields.css
    • includes/Admin/Settings.php: Updated CSS reference to silver-acf-clone-fields.css

Fixed

  • Database Schema: Added missing field_count column to acf_field_backups table
  • Test Compatibility: Fixed multiple test failures and WordPress Test Suite integration issues
    • Resolved undefined constant errors in test environment
    • Fixed is_admin() context errors in tests
    • Excluded problematic AJAX tests to prevent PHPUnit hang
    • Set proper admin screen context in BackupManagerTest
    • Improved PHPUnit output visibility and error reporting
  • Backup Table Creation: Use wpSetUpBeforeClass() pattern to prevent MySQL transaction issues
    • Centralized backup table creation in Core\Activator
    • Added proper dbDelta availability checks
    • Fixed test isolation with proper table creation lifecycle
  • CI/CD Workflow Fixes
    • ACF plugin now properly installed in CI test environment
    • PHPCS error handling improved with proper workflow failure detection
    • Quality checks script returns correct exit codes

Removed

  • TODO.md: Test implementation complete, tracking document no longer needed

Technical Details

  • WordPress Test Suite Integration: All tests now use real WordPress environment
    • Factory pattern: static::factory() for creating test fixtures (users, posts, terms)
    • Real WordPress functions: wp_set_current_user(), update_option(), get_post_meta(), etc.
    • Proper test lifecycle: setUp(), tearDown(), wpSetUpBeforeClass(), wpTearDownAfterClass()
    • Database transaction rollback for test isolation
  • Code Quality: 100% WordPress Coding Standards (WPCS) compliance
  • Static Analysis: PHPStan Level 8 compliance maintained
  • Backward Compatibility: All changes are backward compatible with v1.1.0
  • Test Statistics:
    • 34 files changed
    • 8,830 insertions
    • 999 deletions
    • 47 commits focused on testing, documentation, and code quality

Migration Notes

No migration required. This release is fully backward compatible with v1.1.0. The CSS file renaming is handled automatically through updated PHP references.


Installation

  1. Download silver-assist-acf-clone-fields-v1.1.1.zip
  2. Go to WordPress Admin > Plugins > Add New > Upload Plugin
  3. Choose the downloaded ZIP file and click "Install Now"
  4. Activate the plugin
  5. Configure your settings at Settings > ACF Clone Fields

Automatic Updates

This plugin includes automatic update functionality. You'll receive notifications in your WordPress admin when new versions are available.

Requirements

  • PHP 8.2 or higher
  • WordPress 6.5 or higher

Support