Skip to content

Releases: phpnomad/wordpress-integration

4.1.0

27 May 19:38

Choose a tag to compare

Wires WordPress to the phpnomad/chrono catalog.

What's new

WordPressClockStrategy now implements the cluster of chrono interfaces that WordPress core functions naturally fulfill:

  • ClockStrategycurrent_datetime()
  • HasTimezonewp_timezone()
  • HasLocaledetermine_locale()
  • CanFormatLocalizedDatewp_date()
  • CanFormatRelativeTimehuman_time_diff() wrapped in __('%s ago') for past instants and __('in %s') for future instants

WordPressInitializer binds the single concrete against all five interfaces via the existing array-binding pattern used by DatabaseDateAdapter.

What's not implemented (deliberately)

Stdlib-backed chrono capabilities (predicates, arithmetic, calendar boundaries, diff, parsing, non-localized format) are left to other integrations or consumer code. WordPress core has no platform-specific implementation for these, so wrapping native PHP behavior here would add no value. Pair with phpnomad/carbon-integration if you want the rest of the catalog covered — its CarbonChronoStrategy consumes the HasTimezone and HasLocale bindings this package provides.

New dependency

  • phpnomad/chrono ^1.0

Tests

WordPressClockStrategyTest covers interface membership, value passthrough, argument delegation to WordPress core functions, return shape, and directional branching in relative(). Full suite: 59 tests, 98 assertions, all green.

4.0.2

16 Apr 04:30
bf38396

Choose a tag to compare

Summary

  • use wpdb->last_error directly when get_results() returns null
  • enrich record-not-found exceptions with the actual query or update identity context
  • improve support visibility for hidden WordPress datastore failures

Included

Why

This patch came out of the Siren obligation investigation. The WordPress query layer was discarding the most useful wpdb error text and throwing unhelpful not-found exceptions in the exact places support needed more context.

4.0.1

31 Mar 15:31

Choose a tag to compare

Allow phpnomad/loader ^2.0 and phpnomad/framework ^3.0 for phpnomad/di v2.0 compatibility.

v4.0.0

31 Mar 11:32

Choose a tag to compare

Breaking Changes

  • TranslationStrategy updated for phpnomad/translate v2.0.0
    • Old: translate(string $translate, ?string $language, $context): string
    • New: translate(string $text, ?string $context = null): string and translatePlural(string $singular, string $plural, int $count, ?string $context = null): string
  • HasLanguage removed from constructor — WordPress manages locale via its own globals
  • Requires phpnomad/translate ^2.0

Bug Fixes

  • Fixed _x() call — was passing domain as context argument instead of the actual context

3.0.2

12 Jan 15:02
f49d08a

Choose a tag to compare

What's Changed

Full Changelog: 3.0.1...3.0.2

Release 3.0.1

23 Dec 18:07

Choose a tag to compare

updates SiteVisited trigger to parse_request, refines REST context detection.

Release 3.0.0

23 Dec 15:28
5f8fff7

Choose a tag to compare

What's Changed

A sore spot in WordPress is background tasks. Yes, it's been solved several times, but to this day, there's still a fair bit of scaffolding that goes just into making it possible to do.

That's why I'm so excited that I've published a new update to PHPNomad's WordPress integration to finally leverage the tasks integration that I've been using for several months in non-WordPress solutions.

This update makes it possible to use PHPNomad to dispatch asynchronous tasks consistently, and reliably in WordPress in exactly the same way it's done outside of WordPress.

This update comes in the 3.0 version of the WordPress integration and up. Behind the scenes it leverages WooCommerce's action scheduler utility, automatically loading it and bundling it into any plugin that you create using PHPNomad.

The power of this comes from the changes that came to the task library in 2.0, which includes a nice decoupled architecture, separating tasks from execution and working much like how event architecture.

Adds support for PHPNomad tasks and action scheduler, drastically improving background task support in WordPress and making asynchronous tasks possible.

Full Changelog: 2.1.0...3.0.0

Release 2.1.0

29 Nov 16:08
1373ffc

Choose a tag to compare

Full Changelog: 2.0.5...2.1.0

2.0.5

14 Apr 23:13

Choose a tag to compare

Adds support for WP CLI commands via PHPNomad console

2.0.3

01 Apr 15:43
d8f5dda

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 2.0.1...2.0.3