Skip to content

v0.3.2

Choose a tag to compare

@github-actions github-actions released this 24 Apr 17:09

Scolta PHP 0.3.2

Coordinated release across scolta-core, scolta-php, scolta-wp, scolta-drupal, scolta-laravel.

Fixes a search-result rendering bug that affected every page since the streaming writer landed, and adds a streaming export path that enables the framework packages to drop their pre-load regression.

Fixed

  • Search result URLs rendering as #: scolta.js line 1273 fell through to "#" because data.meta.url is never populated — StreamingFormatWriter writes url at the fragment top level, not inside the meta sub-object, and explicitly filters url out of meta. Every other URL read-site in scolta.js carried the || data.url fallback; line 1273 was missing it. Fixed: data.meta?.url || data.url || "#". Present since the streaming writer landed in 0.3.0. (#7)

Added

  • MemoryBudget::fromOptions(string $memoryBudget, ?int $chunkSize): self: Single factory method for all framework adapters. Accepts a profile name or byte string and an optional chunk size override. Eliminates the inline fromString() + conditional withChunkSize() pattern that was duplicated across scolta-wp, scolta-drupal, and scolta-laravel. (#9)
  • MemoryBudget::withChunkSize(int $chunkSize): self: Returns a new MemoryBudget instance with the chunk size overridden independently of the memory profile. The merge open-file-handle cap is adjusted upward to match when the new chunk size exceeds the profile default. Enables sites to tune chunk size and memory budget as two independent knobs rather than being forced into one of the three named profiles. Available to all framework adapters via --chunk-size CLI flags and admin settings. (#9)
  • MemoryBudgetConfig now carries chunk size and accepts arbitrary byte strings: MemoryBudgetConfig::load() accepts chunk_size (integer, optional) and now validates profile as either a named profile or a byte string like "256M" rather than requiring one of the three named profiles. toMemoryBudget() delegates to MemoryBudget::fromOptions(). toArray() includes chunk_size. All platform adapters that persist MemoryBudgetConfig gain these fields automatically. (#9)
  • MemoryTelemetry now logs elapsed wall-clock time: Every emit() call now includes elapsed_s in its PSR-3 context and appends +{elapsed_s}s to the log message. Framework adapters wired to a real logger (e.g. Scolta_WP_CLI_Logger with --debug) will now show per-phase wall-clock time, making it trivial to distinguish a slow gather step from a slow indexer without a profiler. (#8)
  • ContentExporter::filterItems(iterable $items): \Generator: Generator counterpart to exportToItems(). Yields ContentItem objects one at a time without materializing the full result set in RAM. Framework adapters that stream content via a generator MUST use this instead of exportToItems(). Existing exportToItems() is unchanged. (#7)
  • Recipe catalog fixture (tests/fixtures/recipes/): 20 Pagefind-compatible HTML files representing a multilingual recipe corpus used in README examples. Covers cross-dialect vocabulary pairs (aubergine/eggplant, courgette/zucchini, rocket/arugula, capsicum/bell pepper, coriander/cilantro, scallion/spring onion) and diet/cuisine filter attributes. (#6)

Changed

  • README rewritten with status, running example, and recipe fixtures. (#6)

Installation

composer require tag1/scolta-php ^0.3.2

Verification

After updating, confirm:

  • Search result titles link to real URLs, not #
  • Framework CLIs print chunk-cadence progress throughout indexing runs

Feedback

Issues: https://github.com/tag1consulting/scolta-php/issues

Acknowledgements

Thanks to Hank VanZile for surfacing the 0.3.1 regressions via real-world 44k-page testing.

Full changelog

See CHANGELOG.md at tag v0.3.2.