Download the PHP package jelix/composer-module-setup without Composer

On this page you can find all versions of the php package jelix/composer-module-setup. 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 composer-module-setup

composer-module-setup

A plugin for Composer to declare automatically jelix modules into a jelix application

For Jelix 1.6.9 and higher.

Authors who provide their modules via Composer, should declare directories containing modules or plugins. It will avoid the developer to declare them into his application.init.php (Jelix 1.7) or in the configuration (Jelix 1.6.9+).

installation

In the composer.json of your application, declare the plugin and authorize the plugin to be executed by Composer.

Declaring modules and plugins into a package

Author who provide their modules via Composer, should declare directories containing modules or plugins. It will avoid the developer to declare them into his application.init.php.

To declare them, he should add information into the extra/jelix object in composer.json:

In this object, he can add three type of information:

For instances, in the repository, if modules are in a "modules/" directory, the author should add these information into his composer.json:

Declaring modules and plugins at the application level

Application developers could declare also their modules and plugins in the same way, in the composer.json of the application:

Enable modules on entrypoints automatically (jelix 1.6 only)

In module packages, you can indicate on which entrypoint the module should be enabled.

app/identifiant1 must be the application id that is indicated into the project.xml file ( id attribute of the <info> element).

In the composer.json of the application, you can also indicate the same informations for each module, when a module does not provide an "autoconfig-access-16" configuration

If the package has already an "autoconfig-access-16" configuration, this modules-autoconfig-access-16 configuration has priority over it.

Indicating the path to the app or the configuration directory

At the application level, the composer.json may content the path to the application directory (the directory containing the project.xml etc), and the path to the var/config directory.

It is useful when the directory containing the composer.json file is not the application directory and/or if the var/config is not in the application directory

So you must set these paths into app-dir and var-config-dir. Path should be relative to the composer.json directory, or can be absolute.

In Jelix 1.7 and higher

In order to use modules declared into a composer.json file, you should include the jelix_app_path.php file into your application.init.php:

This jelix_app_path.php file is generated automatically by the composer-module-setup plugin.

Remember: in Jelix 1.7 and higher, declaring modules and plugins in the modulesPath/pluginsPath parameter in the configuration file is not supported anymore.

In Jelix 1.6.x equal or higher than 1.6.9

The composer plugin declares automatically modules and plugins directory into the localconfig.ini.php file or into the mainconfig.ini.php file, in modulesPath and pluginsPath properties, and also in the modules section.

You can also indicate if you want that the plugin modify localconfig.ini.php or mainconfig.ini.php. By default it is localconfig.ini.php. Indicate the configuration filename into config-file-16:

debugging the plugin

Set an environnement variable JELIX_DEBUG_COMPOSER to true or create an empty file named JELIX_DEBUG_COMPOSER into the vendor directory.

After launching Composer, you will have a file jelix_debug.log into the vendor directory.


All versions of composer-module-setup with dependencies

PHP Build Version
Package Version
Requires composer-plugin-api Version ^2.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 jelix/composer-module-setup contains the following files

Loading the files please wait ....