Download the PHP package flowpack/neos-asset-usage without Composer

On this page you can find all versions of the php package flowpack/neos-asset-usage. 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 neos-asset-usage

Asset usage tracking for Neos CMS ( <= 8.x)

This package provides a more performant replacement for the asset usage calculation in Neos CMS 5.x, 7.x and 8.x.

In Neos >= 9.0, highly performant asset usage is included in the core, you do NOT need this package anymore then.

Upgrading to Neos 9

  • remove the dependency to flowpack/neos-asset-usage
  • there is no step 2 - that's it 🙂

Neos always calculated the asset usage when the information was requested. This could take quite long depending on the number of nodes and assets in a project.

This package solves the problem by using the registration service of Flowpack.EntityUsage to register a usage if an asset is referenced and unregister when the asset is not referenced by a node anymore. The data is stored in a database table and can be efficiently queried and accessed by the provided service.

Additionally, the package provides a replacement for the AssetUsageInNodePropertiesStrategy of Neos CMS. The core strategy is disabled via AOP.

TLDR

Viewing asset usages in Neos CMS will be super fast when this package is installed.

Using it with Flowpack.Media.Ui will also allow enabling additional features like filtering for unused assets and delete button are disabled if an asset is used.

Compatibility

Neos 5.2, Neos 7.x + Neos 8.x

Installation

Add the package, and the storage as dependency in your site package:

The run composer update in your project root.

Finally you need to run the command to build the initial usage index:

This will store all usages in your database. If you deploy your project on another system you have to make sure that you run this command there.

It is recommended to run the command from time to make sure that no usages are in the database that don't exist anymore or usages are missing. When that happens, it is important that you try to find out where they come from. If you think this happened due to an error in this package, please open an issue with as much information as you can give.

Feature: Exclude node types from usage count

Possible use case: If you are using this package in combination with neos/metadata-contentrepositoryadapter, the metadata entries will be recognized as usage count. You can adjust this behaviour with the following settings.

Example to exclude all metadata node types from usage count:

Example to exclude multiple custom metadata node types:

Related packages

Development goal

This functionality will at some point be integrated into the core of a future Neos CMS version.


All versions of neos-asset-usage with dependencies

PHP Build Version
Package Version
Requires neos/neos Version ^5.2 || ^7.0 || ^8.0 || dev-master
flowpack/entity-usage Version ^1.0 || dev-main || dev-master
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 flowpack/neos-asset-usage contains the following files

Loading the files please wait ...