Download the PHP package deployecommerce/module-sitemap-generate-cli without Composer

On this page you can find all versions of the php package deployecommerce/module-sitemap-generate-cli. 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 module-sitemap-generate-cli

Sitemap Generate CLI

Generates the sitemaps configured in the Magento admin from the command line, and tells you where each one actually went.

Magento generates sitemaps from Magento\Sitemap\Model\Observer, a cron observer that catches every exception and reduces it to a line on an e-mail almost nobody has configured. A run that produced nothing is therefore indistinguishable from a run that worked. This command does the same generation in the foreground, lets exceptions escape with their class, message and stack trace, and afterwards verifies that the file it named really was written by this run.

Usage

-v additionally prints the system temp directory Magento stages each file in, the filesystem driver backing the target directory, and the number of URLs the item providers returned — an empty provider result is the other way a run looks successful and produces nothing useful.

Exit code is 0 only when every sitemap in scope was verified. Any missing or stale file makes the whole run fail, so this is safe to use as a deployment or monitoring check.

Remote storage

When remote_storage is configured in app/etc/env.php (the aws-s3 driver, for instance), the media directory is backed by a different filesystem driver. Sitemap paths are stored relative to pub, and the default path is under media/, so sitemaps are written to the remote bucket and the local pub/media/sitemap/ copy is never touched. It keeps whatever was last written there before remote storage was switched on, and its timestamp never changes again — which looks exactly like a generation that silently stopped working.

This command handles that in two ways:

The closing line changes wording too. The size and timestamp are read back through the remote driver, so what the command reports is the object existing in the bucket, not an assumption that a write was dispatched:

The storefront serves the remote copy through pub/get.php.

The staleness check

After generating, the command stats the file and compares its modification time against the moment generation started. A file older than that is a leftover, not this run's output, and the run fails.

Remote drivers report the modification time as a date string rather than a Unix timestamp, and their clock is not this server's clock, so there is a 60 second allowance either way. A file whose modification time cannot be read at all is accepted and reported as modified unknown — an unreadable timestamp is not evidence of a failure.

Area code

Sitemap generation reads frontend configuration, so it needs an area. The command claims crontab — the area Magento's own sitemap cron runs under — but only when nothing has claimed one already, because setting an area code twice throws.

Each sitemap is generated inside store emulation for its own store, and emulation is unwound in a finally block so a failed generation still leaves the environment clean before the exception surfaces.

Development

Tests are written with Pest and need no Magento installation. Magento's own packages are pulled from the public Mage-OS mirror, so no Adobe credentials are required. That repositories entry only applies when this package is the root package — Composer ignores it when the module is installed as a dependency.

Licence

MIT. See LICENSE.md.


All versions of module-sitemap-generate-cli with dependencies

PHP Build Version
Package Version
Requires php Version ~8.1.0||~8.2.0||~8.3.0||~8.4.0
magento/framework Version >=103.0.0 <104
magento/module-sitemap Version >=100.4.0 <101
magento/module-store Version >=101.1.0 <102
symfony/console Version ^5.4 || ^6.4 || ^7.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 deployecommerce/module-sitemap-generate-cli contains the following files

Loading the files please wait ...