Download the PHP package coenjacobs/mozart without Composer

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

Mozart Latest Stable Version License

Composes all dependencies as a package inside a WordPress plugin. Load packages through Composer and have them wrapped inside your own namespace. Gone are the days when plugins could load conflicting versions of the same package, resulting in hard to reproduce bugs.

This package requires PHP 8.2 or higher in order to run the tool. You can use the resulting files as a bundle, requiring any PHP version you like, even PHP 5.2.

How it works

Mozart takes your Composer dependencies, copies them into your plugin, and rewrites their namespaces and class names so they can't conflict with other plugins loading the same packages.

For namespaced packages, Mozart prefixes the namespace and updates all references:

For packages using global-scope classes, Mozart adds a prefix to class names:

This happens across the full dependency tree — namespace declarations, use statements, type hints, string references in class_exists() calls, and more. The result is a self-contained copy of your dependencies that won't collide with any other plugin's versions.

Installation

Mozart brings its own dependencies to the table and that potentially introduces its own problems (yes, I realise how meta that is, for a package like this). That's why installing Mozart in isolation, either through the Docker container, the available PHAR file or installing Mozart as a global dependency with Composer is preferred.

See docs/installation.md for all installation methods (Docker, PHAR, Composer).

Configuration

Mozart potentially requires zero configuration. When your project has a PSR-4 autoload entry or a package name in composer.json, Mozart infers everything it needs: the dependency namespace, target directories, classmap prefix, and the generated dependency autoloader. In the default setup, run mozart compose and then include the generated dep_directory/autoload.php from your plugin bootstrap.

If you want to customize the behavior, add an extra.mozart block to your composer.json. Even an empty block is valid — Mozart fills in every setting it can infer:

You can verify the resolved configuration with mozart config.

For full control, you can set every option explicitly:

The core settings and their defaults:

See docs/configuration.md for the full configuration reference with defaults and inference logic.

Supported versions

Version Documentation Latest release
1.3 README.md (in development)
1.2 README.md 1.2.3
1.1 README.md 1.1.6

No longer supported

Version Documentation Latest release
1.0 README.md 1.0.10
0.7 README.md 0.7.1
0.6 README.md 0.6.0

Further reading

Document Description
docs/installation.md All installation methods: Docker, PHAR, Composer
docs/configuration.md Full configuration reference with defaults and inference
docs/usage.md Automating Mozart with Composer scripts and using the generated autoloader
docs/docker.md Docker registries, tag strategy, multi-architecture support
docs/background.md Why Mozart was created and how it compares to PHP-Scoper

All versions of mozart with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
composer/class-map-generator Version ^1.7
league/flysystem Version ^3.0
league/flysystem-local Version ^3.0
netresearch/jsonmapper Version ^4.4 || ^5.0
nikic/php-parser Version ^5.0
symfony/console Version ^6.4 || ^7.4
symfony/finder Version ^6.4 || ^7.4
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 coenjacobs/mozart contains the following files

Loading the files please wait ...