Download the PHP package indexnowkit/yii3 without Composer

On this page you can find all versions of the php package indexnowkit/yii3. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package yii3

Yii3 IndexNow package — indexnowkit/yii3

Tell search engines about new, changed and deleted pages the moment an ActiveRecord row is committed. One attribute on the model, one composer require, done.

Packagist Downloads CI Conformance PHPStan PHP Yii

github.com/indexnowkit/php (the php-* repositories are read-only splits)

Who gets notified

Yandex, Bing (and DuckDuckGo via Bing), Naver, Seznam, Yep, Internet Archive, Amazon — every engine in the IndexNow registry. One request to the shared endpoint reaches all of them; name engines explicitly only to reach a single one.

Google: no. Google does not support IndexNow; this package will not pretend otherwise.

Notification, not indexing. IndexNow tells an engine that a URL changed; whether and when the page is crawled and indexed is the engine's decision. See the result in Bing Webmaster Tools (IndexNow Insights) and Yandex.Webmaster (Indexing → Reindex pages); a useful metric is the share of submitted URLs in the index after a few days. Deleted pages: answer 410 (gone for good) or 404 (temporarily); for a move answer 301 and submit both URLs; a soft-404 or a redirect to the home page does harm. Bing's URL Submission API and Google's Indexing API are different protocols and not covered here.

Why this over X

Most IndexNow packages are a thin HTTP client: you collect the URLs, you call it, you read the answer. This family does the part that goes wrong in practice:

Install

An application on yiisoft/app (or any application that loads the yiisoft/config groups params, di, di-web, di-console, params-console, events-web, events-console, routes and bootstrap through its runner) is wired by the package's config/*.php: the container definitions, the key file route, the console commands, the flush after the response and the ActiveRecord observer. Configure it in your params:

The package reads INDEXNOW_KEY, INDEXNOW_PREVIOUS_KEY, INDEXNOW_BASE_URL and INDEXNOW_DRY_RUN from $_ENV, $_SERVER and getenv() (vlucas/phpdotenv of the application template fills $_ENV), and takes the environment name from YII_ENV. The key file route needs yiisoft/router with yiisoft/router-fastroute (the application template has them); URL generation for route: rules goes through the container's UrlGeneratorInterface. The package needs a PSR-18 client (symfony/http-client + nyholm/psr7 as above, or Guzzle): it discovers one, or takes the container id named in http.client. The params merge of your application must be recursive for the block (RecursiveMerge::groups('params', ...) in configuration.php, as the template does); without it the package's defaults still apply to what your block leaves out.

Declare what has a public page

#[IndexNow] is repeatable: one attribute per family of public URLs. #[IndexNowEvents] registers the hooks, and EventsTrait of yiisoft/active-record is what makes the record dispatch events at all. Save the example as src/Model/Post.php under namespace App\Model; — it reads the columns slug, title, body, published, amp (the AMP page exists while it is true) and category_id; Category is a record of your own with its own #[IndexNow] rule (drop the via: 'category' line if you have none). route: names a route of your routes.php (Route::get('/posts/{slug}')->name('post/view')).

Option Meaning
route / params a route name and argument => property, method, "self", dotted.path (self = the primary key)
resolver a UrlResolverInterface class or container id for anything custom
via a relation (or dotted path) whose pages are resubmitted
url / urls a method returning the URL(s), or literal URLs
when / whenFields bool property or method; drafts are skipped and published → draft is sent as a deletion
fields for updates, submit only when one of these properties changed
events, locales, host, name subset of events; current/all/list (router.locales); another host; stable rule id

Accessors read ActiveRecord properties and relations (category.slug, a get<Name>Query() relation) and fall back to methods. via: and any dotted path through a relation need MagicRelationsTrait next to EventsTrait, as in the model above: yiisoft/active-record reads a get<Name>Query() relation by name only through that trait, and without it the rule fails with an error from the core instead of yielding the related pages. A when column that only has a database default is null on a fresh record until loadDefaultValues(): give the typed property a default (public bool $published = true;) as above.

Classes you cannot annotate: 'active_record' => ['models' => [Product::class]] in the params (the class still needs EventsTrait), or $indexNow->observe(Product::class, [new IndexNow(...)]) at runtime.

Full model, typed parameters, inheritance and the semantics table: core attribute reference.

Verify

Run it after every key rotation and after every deployment that touches the configuration.

How it works

Commands

Command Options
indexnow:check --live real probe · --host= one host (repeatable) · --probe-url= page for the probe · --json · --strict · --sample= / --sample-class= (needs indexnowkit/verify)
indexnow:config --json — the effective configuration, keys and DSNs masked
indexnow:submit <urls...> --force ignore debounce · --dry-run · --json
indexnow:submit-record <class> [ids...] --event= · --limit= · --explain · --force · --dry-run · --json
indexnow:explain <class> <id> --event= · --json — rules, when, URLs, key, debounce; sends nothing
indexnow:sitemap [sitemap] --changed-since="1 day" · --allow-foreign-hosts · --force · --dry-run · --json · --no-verify
indexnow:history --host= · --status=ok|pending|failed|skipped · --url= · --since=2h|3d|2026-09-01 · --limit= (default 50) · --json · --purge[=days]
indexnow:status --json
indexnow:key:generate --length · --alphanumeric · --write-env[=FILE] · --force rotate · --no-previous · --yes

<class> is an FQCN or a short name under active_record.namespaces (App\Model, App\Entity by default).

Sitemaps

composer require indexnowkit/sitemap # optional: the indexnow:sitemap command

indexnow:sitemap with no argument reads sitemap.url, else <base_url>/sitemap.xml; a local path works too. Without the package everything else works unchanged: indexnow:sitemap says indexnowkit/sitemap is not installed: composer require indexnowkit/sitemap and exits 1, indexnow:check prints sitemap: not installed (…), a sitemap block in the params is ignored, sitemapConfig() / sitemapSource() throw a LogicException with the same sentence. Nothing is logged about it.

Verify

composer require indexnowkit/verify # optional: one GET before every submission

With 'verify' => ['enabled' => true] every URL is fetched before it is submitted: noindex, robots.txt, a canonical pointing elsewhere, a redirect or an origin error skip it with a logged reason, and indexnow:check --sample=<url> / --sample-class=<class> report what an engine would see. With dispatch: sync the GETs run inside the web request after the response was sent; check warns about it. Without the package a verify block is ignored and check prints verify: not installed (…).

History

composer require indexnowkit/history # optional: what was submitted, when, with what answer

Every Result the submitter produces — the flush after the response, the commands, a URL skipped by indexnowkit/verify — is recorded: normalized URLs, host, engine, status, reason, HTTP code, the error message (never the response body or the key). ./yii indexnow:history lists them newest first (--host, --status, --url, --since, --json); indexnow:history --purge removes what is older than history.retention_days (a cron line); ./yii indexnow:status prints the switches, the dispatch mode, the debounce store, the 403 counter of every host, the last successful submission and the history size (--json for machines). pdo needs the table: the migration is in the package's docs/migrations.md (Schema::sql()); until it exists indexnow:check prints a history.store error and the submitter logs the failure without breaking the flush. psr16 is a ring buffer of history.limit records for one process and small sites. A SubmissionStoreInterface definition of your own in di/ takes precedence over either. Without the package indexnow:history and indexnow:status say indexnowkit/history is not installed: composer require indexnowkit/history and exit 1, indexnow:check prints history: not installed (…), historyConfig() throws a LogicException with the same sentence.

Configuration and docs

Every option, its default and what it does: docs/configuration.md. Commit safety: docs/commit-safety.md. Replacing pieces in the container, custom resolvers, checks, a queue: docs/multi-domain.md. Testing your integration: docs/testing.md.

Operations

Debugging

./yii indexnow:check validates the params, fetches the key file and reports how submissions are wired (dispatch, cache, the route, the ActiveRecord hook, sitemap spool); ./yii indexnow:explain 'App\Model\Post' 1 shows the rules, guards and URLs of one record without sending anything; the indexnow log category at debug tells why a URL was or was not submitted. Symptoms and fixes: docs/troubleshooting.md.

Limitations

Compatibility

Public API: the indexnowkit/yii3 params block, command names and options, the container definitions of config/di.php, IndexNow methods, ActiveRecord\IndexNowEvents. The core's rules apply: bc.md; what this package itself keeps stable: docs/bc.md. Before 1.0 a minor version may break; every break is listed under "Changed" in CHANGELOG.md. yiisoft/active-record ^1.0, yiisoft/db ^2.0, yiisoft/router ^4.0, PHP 8.2–8.5.

Notes for AI assistants

Other frameworks

PHP core, symfony-bundle, doctrine, laravel, yii2
JS/TS @indexnowkit/core, next, prisma (soon)
Python indexnowkit, indexnowkit-django (soon)

MIT. IndexNow is a trademark of its owner; this project is independent and not affiliated with Microsoft, Yandex or indexnow.org.


All versions of yii3 with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-json Version *
indexnowkit/console Version ^0.5
indexnowkit/core Version ^0.13
psr/container Version ^1.1 || ^2.0
psr/event-dispatcher Version ^1.0
psr/http-factory Version ^1.0
psr/http-message Version ^1.1 || ^2.0
psr/http-server-handler Version ^1.0
psr/http-server-middleware Version ^1.0
psr/log Version ^2.0 || ^3.0
psr/simple-cache Version ^1.0 || ^2.0 || ^3.0
symfony/console Version ^6.4 || ^7.0 || ^8.0
yiisoft/active-record Version ^1.0
yiisoft/db Version ^2.0
yiisoft/router Version ^4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package indexnowkit/yii3 contains the following files

Loading the files please wait ...