Download the PHP package digitalist-open-cloud/extratools without Composer

On this page you can find all versions of the php package digitalist-open-cloud/extratools. 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 extratools

Extra Tools (for Matomo)

Some extra cli commands to help with maintaining Matomo. Also providing an phpinfo page in the admin part. Introducing new console commands:

Background

The main reason to doing this plugin was to get automatic installs to work with Matomo, including automatic updates - and version controlled deliveries with configuration in json or yaml.

Known bugs

Adding a site as part of matomo:install is currently broken, but you could just after the command run the site:add command:

Dependencies

Sine version 4.1.0-beta1 we are dependent on PHP 8.1

On host

In composer.json (Matomo root)

From version 5.1.0:

From version 4.1.0-beta1:

Earlier versions:

Install

Git clone the plugin into your plugins folder:

Config

Activate ExtraTools - in UI, or better - in the console:

Set up a db backup path, use the console (use the path you desire):

Or add it manually to config.ini.php:

Commands

archive:list

Gets al list of ongoing or scheduled core archivers, if such exist.

config:get

Gets a section config. @todo - make this more like config:set - so you have more options.

database:backup

Backups the db.

database:create

Creates the db defined i config.ini.php. Adding the --force flag stops the command for asking questions.

database:drop

Drops the db defined i config.ini.php - backup first if needed. Adding the --force flag stops the command for asking questions.

database:import

Imports database dump to database defined in config.ini.php, so if you already have a installation - it overwrites it.

logger:delete

Removes logging entries from the DB, that is the internal logging in Matomo, not visits on sites.

logger:show

Show logging and query entries of logs from the database, output could be exported to CSV.

matomo:install

To use matomo:install, you need ExtraTools to always be enabled, add always_load_commands_from_plugin=ExtraTools to common.config.ini.php.

Here is how we do it in ad docker image build:

Installs Matamo. Wipes the current installation - as default it uses settings in your config.ini.php file - but all values could be overridden with arguments or environment variables.

If you have a license for Matomo Premium plugins, set the environment variable MATOMO_LICENSE with the correct license token. The environment variable is set as a normal environment variable, in shell using export, in a docker-compose file, the environment array etc. If the variable is set, Matomo will have the license key set on install.

segment:admin

Administration of segments, only options right now is to delete or activate a segment, a deleted segment could later be activated again.

segment:list

List all segments, with ID, definition, date created and latest updated.

site:add

Adds a new site to track.

site:delete

Deletes a site with ID provided.

site:list

List sites, with the optional format argument - supported output is text(default), json and yaml.

site:url

Adds one or more URLs to a site.

visits:get

Get all archived visits, for one site or all. For a segment or all segments, for today, or another day etc.

customdimensions:configure-new-dimension

Configure a new custom dimension. BETA.

Requirements

Matomo needs a MySQL/MariaDB host, with a user setup that is allowed to drop that db. The first user is created as a super user and it is need to have one to set up Matomo. If you do not add values in environment variables or options to matomo:install command, it will use the defaults for the user - so important that you change that users password after install. Matomo also creates a first site to track, this also has default values that you could override with environment variables or options.

You could also use a json-file for configuration - like all the above mentioned - and for installing plugins. An example json-file could be found in the docs folder for this plugin.

Environment variables

Supported default environment variables from the official Matomo docker container:

Non-default:

These could be overridden with (historical reasons):

Other environment variables:

Installation preparation

If you have a config.ini.php in the config dir - delete it. Run:

Then follow one of the Examples below.

Example install 1 (recommended)

Example install 2

Example install 3

Using environment variables, docker-compose.yml example.

Order of values

Highest number = takes over. If you have you mysql server settings in environment variables and provide the option --db-username=myuser, the latter is used for the db username.

  1. config.ini.php (created when you install the first time)
  2. Environment variable
  3. Option (matomo:install --db-username=myuser)
  4. File overrides (matom-install --install-file=install.json)

CAUTION!

This plugin comes with no guarantees. But it's free and open source. So, let's make it better!

Version supported

This is tested from version 3.8.1, and should work with the latest stable.

Thank you!

This plugin is based on work done by Ben Evans in https://github.com/nebev/piwik-cli-setup, and also reusing code in Matomo core.

Tests

How to run tests.

PHPstan

Phpunit


All versions of extratools with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
symfony/process Version ^5.4
symfony/yaml Version ~5.4.21
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 digitalist-open-cloud/extratools contains the following files

Loading the files please wait ....