Skip to content

Releases: recca0120/wp-reverse-proxy

v0.3.11

Choose a tag to compare

@recca0120 recca0120 released this 16 Jan 15:50

Changes

  • refactor: Rename includes directory to src following PSR-4 convention
    • Update composer.json autoload path
    • Update phpunit.xml.dist coverage directory
    • Update release.yml Strauss updateCallSites parameter

v0.3.10

Choose a tag to compare

@recca0120 recca0120 released this 14 Jan 20:26

Changes

Refactoring

  • Replace Mockery with FakeRouteLoader stub for deterministic testing
  • Standardize test method naming conventions (test_it_* → test_*)
  • Shorten 16 method names exceeding 60 characters
  • Rename 2 vague method names for clarity

Dependencies

  • Remove mockery/mockery dependency (replaced with stubs)

Tests

  • Add CachedFileLoaderTest integration test
  • All 713 tests passing

v0.3.9

Choose a tag to compare

@recca0120 recca0120 released this 14 Jan 16:42
2c3904d

What's Changed

Refactored

  • Use stable identifier for cache key instead of fingerprint (#30)
    • Added getIdentifier() method to RouteLoaderInterface
    • Cache key is now based on stable identifier (md5 of paths/storage class)
    • Fingerprint is used only for cache validation, not as key
    • Prevents orphaned cache entries when source data changes

Files Changed

  • includes/Contracts/RouteLoaderInterface.php - Added getIdentifier() method
  • includes/Routing/FileLoader.php - Implemented stable identifier using md5 of sorted paths
  • includes/WordPress/WordPressLoader.php - Implemented stable identifier using md5 of storage class
  • includes/Routing/CachedRouteLoader.php - Use identifier for cache key, fingerprint for validation

Full Changelog: v0.3.8...v0.3.9

v0.3.8 - Refactor Arr methods and array_reduce

Choose a tag to compare

@recca0120 recca0120 released this 12 Jan 19:54

Changes

  • Remove Arr::flatten (redundant with Arr::merge)
  • Refactor Arr::flatMap to use array_reduce + self::merge
  • Refactor ReverseProxy middleware chain to use array_reduce
  • Improve test coverage for Admin class and RouteCollection
  • Remove unused getStorage() method from RoutesPage

v0.3.7 - Simplify RouteCollection

Choose a tag to compare

@recca0120 recca0120 released this 12 Jan 17:32
2cb3ac6

Changes

  • Add private addRoute() method to unify route addition logic
  • Fix offsetSet() bug - was not injecting cache into middlewares
  • Optimize clearCache() by moving cache null check outside loop
  • Simplify createRoute() by removing unnecessary local variables

v0.3.6 - Fix PHPUnit 8 compatibility

Choose a tag to compare

@recca0120 recca0120 released this 12 Jan 13:00

Fix assertMatchesRegularExpression() compatibility for PHP 7.2 (PHPUnit 8.5)

v0.3.5 - Remove jQuery dependency

Choose a tag to compare

@recca0120 recca0120 released this 12 Jan 12:32
436dac5

Refactoring

Remove jQuery Dependency

  • Replace jQuery with native JavaScript DOM operations
  • Replace jQuery UI Sortable with SortableJS v1.15.6
  • Move all dynamically generated HTML from JavaScript to HTML <template> elements in PHP

Benefits

  • Reduced bundle size (no jQuery/jQuery UI dependencies)
  • Better separation of concerns (HTML in templates, logic in JavaScript)
  • Improved maintainability with modern JavaScript patterns
  • SortableJS provides the same drag-and-drop functionality with smaller footprint

Technical Changes

  • assets/js/admin.js: Rewritten with Vanilla JS
  • assets/js/sortable.min.js: New file (SortableJS v1.15.6)
  • templates/admin/route-form.php: Added 13 HTML templates for dynamic elements
  • includes/WordPress/Admin/Admin.php: Updated script dependencies

v0.3.4 - Import/Export Routes

Choose a tag to compare

@recca0120 recca0120 released this 12 Jan 12:32
28eec58

What's New

Import/Export Routes

  • Export routes to JSON file (admin-managed routes only)
  • Import routes from JSON file with merge/replace modes
  • Traditional Chinese translations for import/export

Improvements

  • Refactored AJAX verification methods to reduce duplicate code

v0.3.3

Choose a tag to compare

@recca0120 recca0120 released this 11 Jan 20:59
  • Exclude pint.json and lefthook.yml from release artifacts
  • Add codecov integration
  • Add badges to README

v0.3.2

Choose a tag to compare

@recca0120 recca0120 released this 11 Jan 17:18

Changes

Refactoring

  • Add Arr::firstWhere() to find item by key/value pair
  • Add Arr::search() to find array key by field/value pair
  • Remove unused Arr::find() and Arr::findKey() methods
  • Simplify Storage find(), update(), and delete() methods
  • Use Str::contains() instead of strpos() in RoutesPage
  • Use Arr::has() instead of array_key_exists() in MiddlewareManager

Docs

  • Update demo GIF to start with WordPress admin panel