Skip to content

2.0.0

Latest

Choose a tag to compare

@spacedmonkey spacedmonkey released this 03 Jan 16:12
· 1 commit to master since this release
113815b

🔄 Breaking Changes

PHP Version Requirements

  • Minimum PHP version increased from 7.0 to 7.4
  • WordPress minimum version updated from 5.5 to 5.9
  • Updated compatibility testing to PHP 8.0-8.4 (with 8.5 experimental support)
  • PHPCS now checks for PHP 7.3+ compatibility

Dependency Changes

  • Replaced tburry/pquery with imangazaliev/didom for better HTML parsing
  • This change provides more robust DOM manipulation and better error handling

🏗️ Code Structure Improvements

Refactored to Object-Oriented Architecture

  • Converted from functional to class-based architecture
  • Added namespace: WP_REST_Blocks
  • Introduced three main classes:
    • Data - Core block data processing and attribute extraction
    • Posts - REST API fields for post types with block editor support
    • Widgets - REST API fields for widgets with block content
  • Added PSR-4 autoloading in composer.json

File Reorganization

  • Renamed files to follow PSR-4 conventions:
    • src/data.phpsrc/Data.php
    • src/posts.phpsrc/Posts.php
    • src/widgets.phpsrc/Widgets.php
  • Added PHP strict types declarations to all new classes

🧪 Testing & Development Infrastructure

Modern Testing Environment

  • Migrated from custom bash scripts to @wordpress/env for local development
  • Added .wp-env.json configuration file
  • Removed deprecated bin/install-wp-tests.sh script
  • Tests now run in Docker containers with proper WordPress setup
  • Added Node.js 20.19.0 as the standard version (.nvmrc)

What's Changed

  • Bump minimatch from 9.0.4 to 9.0.5 by @dependabot[bot] in #84
  • Bump @wordpress/scripts from 27.6.0 to 28.2.0 by @dependabot[bot] in #83
  • Bump braces from 3.0.2 to 3.0.3 by @dependabot[bot] in #81
  • Enhance PHP compatibility and structure for WP_REST_Blocks by @spacedmonkey in #104
  • chore(deps)(deps): bump actions/checkout from 4 to 6 by @dependabot[bot] in #106
  • chore(deps)(deps): bump actions/setup-node from 4 to 6 by @dependabot[bot] in #105
  • chore(deps)(deps-dev): bump qs from 6.14.0 to 6.14.1 by @dependabot[bot] in #107
  • Update composer/installers requirement from ^1.10 to ^2.3 by @dependabot[bot] in #88

Full Changelog: 1.0.2...2.0.0