Download the PHP package moodle/moodle-composer-scaffold without Composer

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

Moodle Composer Scaffolding system

The Moodle Composer Scaffolder is a Composer Plugin intended to simplify and easy the installation of Moodle as a Composer project.

This tooling will:

Files generated

The Moodle configuration

This tooling will guide you through the creation of a configuration file for Moodle which sits alongside your composer.json.

Placeholders

The following placeholders may be provided either in response to interactive prompts, or via the environment variable configuration:

Placeholder Meaning Default
[NAME] The name of the site The base name of the folder that the project is in

Configuration

You can provide a .env file in any of the following locations:

The following parameters are accepted:

Environment key Default Description Placeholders Example
MOODLE_AGREE_LICENSE N Whether you agree to the Moodle GPL License agreement - Y
MOODLE_ADMIN_PASSWORD - The admin password to use when installing your site - password
MOODLE_ADMIN_EMAIL - The email address of the admin user - [email protected]
MOODLE_DB_USERNAME - The username to use for the database server - webdev
MOODLE_DB_PASSWORD - The password to use for the database server - moodle
MOODLE_DB_HOST - The hostname to use for the database server - localhost
MOODLE_DB_NAME [NAME] The name of the database to use [NAME] [NAME]
MOODLE_DB_PREFIX mdl_ The database prefix to use - mdl_
MOODLE_DB_DRIVER - The database driver to use - pgsql
MOODLE_WWWROOT - The URL of the Moodl esite [NAME] https://[NAME].example

Generated files

Moodle Configuration - /config.php

The root /config.php file stores all of the standard Moodle configuration properties.

This is functionally equivalent to the config.php in the standard installation and the values and documentation in config-dist.php apply here.

Note: There is no need to manually include the setup.php file as in the non-Composer installation method.

This file will only be generated if it does not already exist, but will be attempted on every Composer operation, or whenever the composer scaffold or composer configure commands are run.

Moodle Configuration Shim - /moodle/config.php

The scaffolder will create a config.php within the Moodle installation directory.

The purpose of this is to act as a shim for parts of Moodle which manually load the configuration file.

It will be generated on every Composer operation, or whenever the composer scaffold command is run.

Moodle Composer Autoload Shim - /moodle/vendor/autoload.php

The scaffolder will create a /moodle/vendor/autoload.php file which will load the Composer Autoload file from the project root.

This is required because in instances where Moodle is symlinked to the target directory (for example when using a Local Composer repository) the symlink source cannot be determined automatically from Moodle.

It will be generated on every Composer operation, or whenever the composer scaffold command is run.

Moodle Binary Helper - /msh

For versions of Moodle which support Console commands, a helper is created at /msh in the project root to link to the bin/moodle within the project root.

It will be generated on every Composer operation, or whenever the composer scaffold command is run.

Commands

The scaffolder includes several commands which can be manually run if required.

composer scaffold

This command will manually run the scaffold system.

Note: This is automatically called as a post-installation step any time that a package is installed or updated.

composer configure

This command will run the configuration wizard to create an initial manual configuration file.

If a configuration file already exists, it has no effect.

Note: This is automatically called as a post-installation step any time that a package is installed or updated.

References

This plugin was inspired by the Drupal Composer Scaffolder.


All versions of moodle-composer-scaffold with dependencies

PHP Build Version
Package Version
Requires composer-plugin-api Version ^2.0
php Version >=8.2.0
symfony/process Version ^7.4
symfony/dotenv Version ^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 moodle/moodle-composer-scaffold contains the following files

Loading the files please wait ...