Skip to content

Wire IconDriverInterface in, make cache(false) work, read components.test_icons - #174

Merged
imanimanyara merged 5 commits into
mainfrom
refactor/reaudit-core-leftovers
Nov 5, 2026
Merged

imanimanyara merged 5 commits into
mainfrom
refactor/reaudit-core-leftovers

Conversation

@imanimanyara

@imanimanyara imanimanyara commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The core items left after #172 and #173.

  • IconDriverInterface wired in (C-17). The interface described a directory API no driver in use implemented. It now states SvgDriver's real render(IconData …) and load(string $path …); SvgDriver implements it, the provider binds it, and IconRegistry, IconSvgReader and DirectoryIconDriver depend on it. Red: a fake driver implementing the interface could not even be declared before.
  • IconSetBuilder::cache(false) works. It set a flag nothing read. Red: a set with the cache off still served an icon whose file had been deleted. $discoveredIcons and $initialized, written and read by nothing, are removed.
  • components.test_icons is read through ComponentPrefixes::testIconsEnabled(), off whenever components.enabled is, and documented, so icon-browser can read core's key.
  • IchavaServiceProvider::isIchavaQueueCommand() removed: unused since Implement the core re-audit: one pack path, bulk registration, short tag, host safety #172 moved the runtime limits.

Verification

  • vendor/bin/pest: 1076 passed, 10 skipped.

  • PHPStan --debug: no errors. composer pint: passed.

  • The generic Blade snippet follows the registered prefixes. IconBrowserService::generateBladeComponent() wrote <x-ichava::icon> always, so a host with components.short_prefix=null copied a tag that does not render. It now uses ComponentPrefixes::snippetPrefix(): the short prefix while one is set, ichava-core when it is off. Red for the renamed and the off cases.

  • icon-sets.json records visibility (public/private) per catalogued pack, synced by bin/sync-icon-sets.php from the repos API and kept when a response does not state it (F-02). Documented in docs/tools/artisan-commands.md. The catalogue lists public packs only, so private packs are not named in this public repository.

Pest after these: 1086 passed, 10 skipped; PHPStan and pint clean.

The interface described a directory API no driver in use implemented, and
SvgDriver, the driver core runs, implemented nothing. The interface now
states SvgDriver's render() and load(), SvgDriver implements it, the
provider binds it to the SvgDriver singleton, and IconRegistry,
IconSvgReader and DirectoryIconDriver depend on it. A bound fake renders
through the registry; it could not be declared before (C-17).
cache() set a flag nothing read, so a set always cached. get() and all()
now rediscover on every call when it is off, and caching stays on by
default. Two properties nothing wrote or read, $discoveredIcons and
$initialized, are removed.
ComponentPrefixes::testIconsEnabled() answers components.test_icons, off
whenever components.enabled is, so icon-browser can read core's key. The
config and the Blade page say who reads it. isIchavaQueueCommand() lost
its only caller in C-01 and is removed (forward-only).
Copilot AI balanced review requested due to automatic review settings November 5, 2026 12:32

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

The snippet was always <x-ichava::icon>, so with components.short_prefix
off a host copied a tag that does not render. It now uses the short
prefix while one is configured and ichava-core when it is off, through
ComponentPrefixes::snippetPrefix(). Red for the renamed and the off cases.
icon-sets.json gains visibility, public or private, synced by
bin/sync-icon-sets.php from the repos API and kept when a response does
not state it, so consumers read one source for which packs are public
(F-02). Documented under The pack catalogue.
@imanimanyara
imanimanyara merged commit 88f6e5f into main Nov 5, 2026
12 checks passed
@imanimanyara
imanimanyara deleted the refactor/reaudit-core-leftovers branch November 6, 2026 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants