Skip to content

v0.7.1: Enhanced Testing Infrastructure

Choose a tag to compare

@iampersistent iampersistent released this 12 Aug 18:13
· 23 commits to main since this release

πŸš€ EdgeBinder v0.7.1: Enhanced Testing Infrastructure

This patch release strengthens the EdgeBinder adapter ecosystem with enhanced testing infrastructure and improved code coverage configuration.

✨ Added

Enhanced AbstractAdapterTestSuite

  • NEW: Anonymous class entity tests - Added 3 critical tests for anonymous class entity handling
    • testAnonymousClassEntitiesWithQuery() - Tests basic query operations with anonymous entities
    • testAnonymousClassEntitiesWithFindBindingsFor() - Tests findBindingsFor method with anonymous entities
    • testAnonymousClassEntityTypeExtraction() - Tests edge cases with different anonymous class types
  • Mandatory adapter certification - All adapters must pass these tests to ensure consistent behavior
  • Bug prevention - These tests catch adapter bugs that only manifest with anonymous class entities

πŸ”§ Fixed

Code Coverage Configuration

  • Excluded src/Testing from coverage - Test infrastructure should not be included in coverage metrics
  • Resolved false coverage reports - Codecov no longer reports "uncovered" lines in test suites
  • Cleaner coverage metrics - Coverage now only measures production code, not test infrastructure

🎯 Impact

For Adapter Developers

  • Enhanced certification requirements - New mandatory tests ensure robust anonymous class support
  • Better bug detection - Tests catch edge cases that were previously missed
  • Consistent behavior - All certified adapters handle anonymous entities the same way

For EdgeBinder Users

  • More reliable adapter ecosystem - Stronger testing requirements improve adapter quality
  • Better testing experience - Anonymous class entities (common in tests) work reliably
  • Cleaner metrics - Coverage reports focus on what matters

For Contributors

  • Improved testing tools - Enhanced AbstractAdapterTestSuite provides better coverage
  • Cleaner coverage reports - No more false "uncovered" lines from test infrastructure
  • Better development experience - More accurate metrics and feedback

πŸ” Technical Details

Anonymous Class Entity Support

Anonymous class entities (common in testing) have unpredictable type names like:

class@anonymous /path/to/file.php:42$abc123

The new tests ensure all adapters properly handle:

  • Entity type extraction from anonymous classes
  • Query filtering with unpredictable type names
  • Type matching between stored and queried entities

Coverage Configuration

Updated phpunit.xml to exclude src/Testing/ from coverage collection:

<source>
    <include>
        <directory suffix=".php">src</directory>
    </include>
    <exclude>
        <directory suffix=".php">src/Testing</directory>
    </exclude>
</source>

πŸ“¦ Installation

composer require edgebinder/edgebinder:^0.7.1

πŸ”„ Migration

No breaking changes - This release is fully backward compatible with v0.7.0.

πŸ“Š Test Statistics

  • Total Tests: 94 (was 91)
  • New Anonymous Class Tests: 3 comprehensive test methods
  • Coverage: Now excludes test infrastructure for accurate metrics
  • Adapter Certification: Enhanced requirements for better reliability

Full Changelog: https://github.com/EdgeBinder/edgebinder/blob/v0.7.1/CHANGELOG.md