v0.3.2
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.jsline 1273 fell through to"#"becausedata.meta.urlis never populated —StreamingFormatWriterwritesurlat the fragment top level, not inside themetasub-object, and explicitly filtersurlout ofmeta. Every other URL read-site inscolta.jscarried the|| data.urlfallback; 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 inlinefromString()+ conditionalwithChunkSize()pattern that was duplicated across scolta-wp, scolta-drupal, and scolta-laravel. (#9)MemoryBudget::withChunkSize(int $chunkSize): self: Returns a newMemoryBudgetinstance 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-sizeCLI flags and admin settings. (#9)MemoryBudgetConfignow carries chunk size and accepts arbitrary byte strings:MemoryBudgetConfig::load()acceptschunk_size(integer, optional) and now validatesprofileas either a named profile or a byte string like"256M"rather than requiring one of the three named profiles.toMemoryBudget()delegates toMemoryBudget::fromOptions().toArray()includeschunk_size. All platform adapters that persistMemoryBudgetConfiggain these fields automatically. (#9)MemoryTelemetrynow logs elapsed wall-clock time: Everyemit()call now includeselapsed_sin its PSR-3 context and appends+{elapsed_s}sto the log message. Framework adapters wired to a real logger (e.g.Scolta_WP_CLI_Loggerwith--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 toexportToItems(). YieldsContentItemobjects one at a time without materializing the full result set in RAM. Framework adapters that stream content via a generator MUST use this instead ofexportToItems(). ExistingexportToItems()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.