Download the PHP package indexnowkit/yii2 without Composer

On this page you can find all versions of the php package indexnowkit/yii2. 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 yii2

Yii2 IndexNow extension — indexnowkit/yii2

Tell search engines about new, changed and deleted pages the moment an ActiveRecord row is committed. One attribute on the model, one component, 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

Yii2 does not read .env by itself: export the variable (export INDEXNOW_KEY=…), put it in the web server or container environment, or load the file with vlucas/phpdotenv before config/*.php runs — getenv('INDEXNOW_KEY') returns false until one of these is done, and check says no key configured. In yii2-app-basic, config/web.php and config/console.php are independent: configure the indexnow component and urlManager (pretty URLs, rules) in both, or check, explain and submit-record see a different setup than the web application. Pretty URLs (urlManager.enablePrettyUrl) are required for the key file route /<key>.txt. The package needs a PSR-18 client (symfony/http-client + nyholm/psr7 as above, or Guzzle); it discovers one, or takes the component/class named in http.client.

Declare what has a public page

#[IndexNow] is repeatable: one attribute per family of public URLs. IndexNowBehavior registers the hooks. Save the example as models/Post.php under namespace app\models; — 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).

Option Meaning
route / params a Yii route (controller/action) and param => attribute, method, "self", dotted.path (self = the primary key)
resolver a UrlResolverInterface class or component 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 attribute or method; drafts are skipped and published → draft is sent as a deletion
fields for updates, submit only when one of these attributes changed
events, locales, host, name subset of events; current/all/list (router.locales); another host; stable rule id

Accessors read ActiveRecord attributes and relations (category.slug) and fall back to methods. A when column that only has a database default is null on a fresh record: call $this->loadDefaultValues() in init() or set the attribute before save().

Classes you cannot annotate: 'active_record' => ['models' => [Product::class]] in the options, or Yii::$app->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 · --probe-url= page for the probe
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= — 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

<class> is an FQCN or a short name under app\models. Ids are space- or comma-separated.

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 options is ignored, sitemapConfig() / sitemapSource() throw a LogicException with the same sentence. Nothing is logged about it.

History

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

Every Result the submitter produces — the flush after the response, the yii2-queue job, 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). php 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); php yii indexnow/status prints the switches, the dispatch mode with the queue component, 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. The submissionStore property of the component 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, custom resolvers, checks: docs/queue.md. Several hosts, www and apex, languages: docs/testing.md.

Operations

Debugging

php yii indexnow/check validates the options, fetches the key file and reports how submissions are wired (queue, cache, pretty URLs, ActiveRecord hooks, sitemap spool); php yii indexnow/explain 'app\models\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 options tree, command names and options, IndexNowComponent methods and properties, ActiveRecord\IndexNowBehavior, Queue\SubmitUrlsJob. 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. Yii 2.0.45+, PHP 8.2–8.5.

Notes for AI assistants

Other frameworks

PHP core, symfony-bundle, doctrine, laravel
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 yii2 with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-json Version *
indexnowkit/console Version ^0.4
indexnowkit/core Version ^0.12
psr/log Version ^2.0 || ^3.0
symfony/console Version ^6.4 || ^7.0 || ^8.0
yiisoft/yii2 Version ^2.0.45
yiisoft/yii2-composer Version ^2.0.10
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/yii2 contains the following files

Loading the files please wait ...