Repository navigation
0.4.0
The "adapter kit" release (docs/spec/16, wave A): what every framework adapter copied is one thing in the core, and
the sitemap reader is its own package. Adapters of this wave: doctrine 0.3.0, symfony-bundle 0.4.0, laravel 0.5.0,
yii2 0.2.0, sitemap 0.1.0. Upgrade the adapter, not the core alone: an adapter of the previous wave imports
classes that moved.
Added
Configknowskey_file.enabled(alias ofserve_key_file, which still wins when both are set),
key_file.cache_max_age(keyFileMaxAge),debounce.store(debounceStore) andhttp.client(httpClient),
infromArray(),fromEnv()(INDEXNOW_KEY_FILE_ENABLED,INDEXNOW_KEY_FILE_CACHE_MAX_AGE,
INDEXNOW_DEBOUNCE_STORE,INDEXNOW_HTTP_CLIENT),with()andOPTIONS(dotted keys only).
Config::keyFileHeaders()is the key file response headers (max-age,Vary: Hostwith ahostsmap);
Config::serveKeyFileFrom(array $raw)is theserve_key_file/key_file.enabledrule over a raw array, for the
adapter code that runs before aConfigexists (a route registered at boot, a check over the raw options).Adapter\ConfigFactory: the raw framework array toConfigpath of every adapter — defaults merged under
the raw values,dispatch: autoresolved by a closure, the mode checked against what the adapter delivers,
base_urlrequired for worker modes, an adapter post-check;build()throws,load()never does (warning on
unknown keys, critical + disabled Config on an invalid value). docs/adapters.md §4.- Factories with one source of the error texts:
Http\TransportFactory::lazy()/psr18(),
Debounce\DebounceStoreFactory::fromConfig(),Dispatch\DispatcherFactory::fromConfig(), andfromConfig()on
Collector,TokenBucket,AttributeUrlResolver,KeyFileResponder.IndexNowKit::create()is built on them. Console\ClassNameResolver(the class argument ofsubmit-<subject>/explain),Check\DebounceStoreCheck(the
debounce line ofcheckover an adapter probe),Url\ArrayResolverLocator(locate:, hint:)(the container-backed
resolver locator of every adapter),Url\RuleAwareUrlResolverInterface(a custom resolverGuardedUrlResolver
guards per rule),IndexNowKit::submitAll()/urlsForAll()(de-duplicated across the set),
CollectorInterface::count().Check\CheckReport::ok()/warning()/error()are public API.
Changed
- Removed: the sitemap reader.
IndexNowKit::sitemap(), the$sitemapparameter of the constructor and of
create(),Console\SitemapRunner,Console\SitemapOptions,Check\SitemapSpoolCheckandSitemap\*moved to
indexnowkit/sitemap(composer require indexnowkit/sitemap; the adapters require it).Console\Vocabulary::$sitemapUrlOptionis gone: the option name
is an argument ofSitemap\Console\SitemapRunner. The core no longer suggestsext-xmlreader/ext-zlib; the
test router serves/large-document.xml[.gz]instead of/sitemap.xml[.gz]. Migration table in the sitemap
package changelog. - Removed:
Result::urlsOf()(deprecated since 0.2.0):Result::retryableUrls()orResult::urlsWhere(). IndexNowKit::create()with adispatchoutsidesync/noneand no$dispatcherthrows
ConfigurationException(it silently usedSyncDispatcherbefore).Config::fromArray()reads booleans withfilter_var: the strings"false"/"0"are false (they were true).ResultRenderer::summary()saysNothing submitted: the source yielded no URL.; transport docblocks speak of
documents, not sitemaps.serve_key_fileis deprecated in favour ofkey_file.enabled(both work; the explicitserve_key_filewins).- Dev tooling: phpstan runs on every CI flavour;
phpstan/*floors are the current releases.