Download the PHP package turbine-kreuzberg/spryker-sitemap without Composer

On this page you can find all versions of the php package turbine-kreuzberg/spryker-sitemap. 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 spryker-sitemap

spryker-sitemap

Module generates sitemap according to the sitemap protocol.

Installation

composer require turbine-kreuzberg/spryker-sitemap

Setup

To use the provided console commands you will need to register TurbineKreuzberg namespace in your config_default.php.

In ConsoleDependencyProvider you need to add Sitemap consoles that you want to use.

If everything is working properly you should see sitemap section in your

You do not need to register index console if you have only one plugin and you are generating a single sitemap.

Usage

To generate sitemaps for all of your registered plugins you need to run:

if you want to generate sitemap for a single sitemap plugin instead of all of them you can use sitemap:generate with a plugin name. Typical use case is when you have different update frequencies for different sitemaps.

To generate sitemap index you need to run:

Generation of index will assume that all the sitemaps for registered plugins are generated. For now there is no validation.

Sitemap plugins

In order for console commands to do anything you will need to register at least one sitemap plugin in SitemapDependencyProvider. Plugins need to implement \TurbineKreuzberg\Zed\Sitemap\Dependency\Plugin\SitemapPluginInterface

Technical considerations

Sitemap generation can be resource intensive and that is why we can use generators to reduce the memory usage. ORMs should be avoided for bulk operations and Propel provides access to underline PDO and we can utilize PDOStatement::fetch to iterate through database records to save the memory.

Example plugin

In the CategorySitemapPlugin that will call url module to retrieve all the URLs for categories. You can find all the necessary changed in the project corresponding folders.

Configuration

Sitemap module comes with some configuration that you need to be aware of.

Configuration Description
PUBLIC_HOSTNAME Hostname of your site (i.e. www.example.com)
INDEX_FILENAME defaults to sitemap_index.xml
IS_SSL_ENABLED to put https or http in urls (defaults to true)
SITEMAP_FOLDER_PATH folder in which sitemaps are to be generated (defaults to /tmp)

A word about sitemaps

Sitemap standard comes with some limitations that we need to consider. Probably most crucial is that you can have 50k links in one sitemap. If you have more than that you need to create sitemap index and multiple sitemaps. When you create your plugins you need to take that into account.

Sitemap index example

Testing

Checking for code style violations

Sniffing

vendor/bin/phpcs --standard=vendor/spryker/code-sniffer/Spryker/ruleset.xml ./src

Fixing of automatically fixable errors

vendor/bin/phpcbf --standard=vendor/spryker/code-sniffer/Spryker/ruleset.xml ./src

PHPStan

vendor/bin/phpstan

Running tests

vendor/bin/codecept build vendor/bin/codecept run


All versions of spryker-sitemap with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
ext-zlib Version *
ext-simplexml Version *
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 turbine-kreuzberg/spryker-sitemap contains the following files

Loading the files please wait ...