Repository navigation
The test suite of this package stays on PHPUnit ^11.5: laravel/framework 12/13 registers its error handler in a way
PHPUnit 12.5 rejects (ErrorHandler::enable(): Argument #1 must be TestCase), so the family-wide ^11.5 || ^12.0 || ^13.0
of audit 0.13 W2 does not apply here until the framework does.
Changed
- The artisan commands are the command classes of the packages;
Console\*Commandof this package is gone (wave
M, spec 19 §2.1 and §4.1 — spec 18 §9 had said artisan commands must extendIlluminate\Console\Command, which is
not so:Illuminate\Console\Application::resolve()takes any symfony/console command).indexnow:check,
indexnow:config,indexnow:submit,indexnow:submit-model,indexnow:explain,indexnow:key:generateand the
three "not installed" stubs areIndexNowKit\Console\Command\*ofindexnowkit/console0.5 (submit-modelis
SubmitSubjectsCommand, named by the vocabulary, registered through aSymfony\Component\Console\Command\LazyCommand
sophp artisannever builds it before it runs),indexnow:sitemapisIndexNowKit\Sitemap\Console\SitemapCommand
(sitemap 0.8),indexnow:historyandindexnow:statusareIndexNowKit\History\Console\HistoryCommand/
StatusCommand(history 0.4) — the same names, arguments, options, exit codes and--jsonas before, the same
classes the Symfony bundle and the Yii3 package register. The class argument staysmodel
(Artisan::call('indexnow:submit-model', ['model' => Post::class])), through theclassArgumentof the two
commands. Each command is a binding of its own:$this->app->extend(CheckCommand::class, …)replaces one, a
command of your own with the same name registered later shadows one. Whatcheckandconfigread is
Console\ConfigSource(aConsole\ConfigSourceInterface, bound). Migration: the twelve classes werefinal,
nobody extended them; code that resolved one from the container resolves the package's class instead (the names
are the same afterIndexNowKit\Console\Command\,…\Sitemap\Console\,…\History\Console\).
Check\ModelSamplerisIndexNowKit\Console\SubjectSampler(the same class four adapters carried);Console\ModelLoader
extendsIndexNowKit\Console\AbstractSubjectLoader(its constructor is unchanged;findOne()/findMany()are what is Eloquent's). Check\RouterCheckis the core'sCheck\LocalesCheck(same coderouter.locales, same texts, one class for the
three adapters that print the line; the classes it reads are the--sample-classvalues, as before). Migration:
the class was listed in docs/bc.md as a stable name; a check registered by hand becomesnew LocalesCheck($locales, $reader, fn () => [Post::class], 'router.locales', 'locale'). Decision §6.4 of spec 19: no wrapper kept.Queue\QueueDispatcheris the push onto the bus around the core'sDispatch\BatchingDispatcher(the constructor
is unchanged);Queue\SubmitUrlsJob::newId()delegates toBatchingDispatcher::newJobId(); the log lines are the
core's ({count} URL(s) queued as job {id},cannot queue {count} URL(s) (job {id}), they are lost: {error}— the
texts this adapter already printed).Url\LaravelRouteUrlResolverdecides the locale expansion, the pinned origin
and the rebase through the core'sUrl\RouteOrigin(the same behaviour, the warning text unchanged).
Check\CacheStoreProbewrites the core'sDebounceStoreCheck::PROBE_KEY(indexnowkit_check, no colon: PSR-16
reserves it) where it readindexnowkit:check.indexnow:statusdescribes the debounce store as
cache (ArrayStore)—<store> (<StoreClass>), the text ofHistory\Adapter\HistoryServices::describeStore()shared
with Yii2 and Yii3 — where it saidcache (array).Config\ConfigFactoryfolds the packages' options through
OptionalPackage::ownedOptions()/ignoredBlocks(). Thephp artisan aboutlines of an absent package come
from the core's predicate.Eloquent\IndexNowObserverresolves through the change handler, not through the facade. Its constructor now
takes aClosure(): ObjectChangeHandlerand aClosure(list<string>): voidsink instead ofIndexNowKit, so the
firstsave()of any model builds the rules, the resolver and the extractor and nothing else: the submitter, the
client, the transport, the throttle and the debounce store are built in the sink, once a save actually produced a
URL. A change handler the container cannot build is oneerrorline per process, never an exception insave().
Migration: an observer built by hand becomesIndexNowObserver::forKit($kit, $logger, $enabled, $router); the
container binding is unchanged, so applications using the trait orIndexNowKit::observe()do nothing.
Url\ObjectChangeHandleris now a binding of its own (built overAttributeReaderInterface,GuardedUrlResolver
andParamExtractor) and is handed to theIndexNowKitbinding, so replacing it changes both.Psr\Clock\ClockInterfaceis a container binding (IndexNowKit\Clock\SystemClockby default, bound only when
the application has not bound one) and reaches the throttle, the debounce store, the submitter and the command
submitter factory. BindingIndexNowKit\Testing\FrozenClockmakes the debounce window and the submission records
ofindexnowkit/historydeterministic in tests (docs/extending.md, docs/testing.md).Queue\SubmitUrlsJobcarries the attempts its batch already spent ($spentAttempts, appended to the
constructor with a default;attempt()is the batch-wide attempt number,triesis what is left of
retry.max_attempts). A partially accepted batch is re-queued as a new job whoseattempts()starts at one again,
so before thisretry.max_attemptsbounded each job instead of the batch, and a steadily shrinking batch could be
retried far more often than configured. Queued jobs from an older version keep running (spentAttemptsdefaults to 0).Check\SampleOptionsandCheck\VerifySampleCheckare removed: they were copies of the core's
IndexNowKit\Check\SampleOptionsandIndexNowKit\Check\SampleGateCheck(core 0.13), which are now bound under
their own class names. Same container mechanics, sameverify.installedlines, same--samplebehaviour.- The
resolver:container lookup no longer wraps the container's exception itself:Url\ArrayResolverLocatordoes
it for every adapter, so any failure (not only aBindingResolutionException) is now the one family text
IndexNow URL resolver "…" cannot be built by the container: ….
Added
- The
router.localesline ofindexnow:check(the core'sCheck\LocalesCheck, see "Changed"): the locales
locales: 'all'expands to, and a warning namingrouter.localeswhen a rule the command can see
(--sample-class=<FQCN>) asks for every locale while the list is empty. At run time the same situation is one
warning per process fromUrl\LaravelRouteUrlResolver, which used to collapse to a single URL without a word. - A service tagged
indexnowkit.checkthat is not aCheck\CheckInterfaceis now aConfigurationExceptionnaming
the tag when the checker is built, instead of a fatal in the middle of the check run.
Fixed
- Fixed: the package was a fatal without
indexnowkit/sitemap,indexnowkit/verifyorindexnowkit/history
(Class "IndexNowKit\Sitemap\Adapter\SitemapServices" not foundwhen the provider registered or the config was
built):Config\ConfigFactory::factory()and the provider asked the packages'*Services::package()whether the
package is installed, and those classes live in the packages. They now ask the core'sAdapter\OptionalPackage::sitemap()
/verify()/history()(core 0.13.0);Sitemap\SitemapServices::package(),Verify\VerifyServices::package()and
History\HistoryServices::package()delegate there too, sooverrideApplicationBindings()in tests is unchanged.
Same texts, same container ids. A new CI job removes the three packages and boots the application with detection
(OptionalPackagesDetectionTest). - Requires
indexnowkit/core ^0.13,indexnowkit/console ^0.5and, when installed,indexnowkit/history ^0.4(the
version cascade of wave L, spec 18: the artisan commands keep parsing over the runners, nothing changes here).