Download the PHP package lukecarrier/moodle-componentmgr without Composer

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

Component Manager

Travis Code Climate Scrutinizer Scrutinizer Coverage Packagist FOSSA Status

Component Manager is a tool to assist with the packaging and management of Moodle-based learning environments.


Key concepts

For the sales pitch, see the presentation and slides.

License

Component Manager is released under the terms of the GPL v3. This is the same license as the core Moodle distribution.

FOSSA Status

Requirements

Installation

Component Manager can be installed in various different ways, each appropriate for different use cases.

Globally, via CGR (recommended)

CGR provides a safe alternative to globally requiring packages by sandboxing individual packages and their dependencies. This approach is recommended for most users.

  1. Globally require CGR with composer global require consolidation/cgr.
  2. Install Component Manager with cgr lukecarrier/moodle-componentmgr.

Globally, via Composer

In this configuration, Component Manager is accessible on the shell (via your preferred $SHELL or Command Prompt), and the same installation is used across all of your projects. This approach is not recommended for Component Manager, as globally requiring packages with dependencies is likely to lead to dependency problems.

  1. Install PHP for your platform.
  2. Install Composer as per their Getting Started guide. We assume that you can launch composer on your shell.
  3. Ensure Composer's global vendor/bin directory is on your PATH:
    • On Linux/Mac, it's probably $HOME/.composer/vendor/bin
    • On Windows, this is usually %APPDATA%\Roaming\Composer\vendor\bin
  4. Install Component Manager globally with composer global require lukecarrier/moodle-componentmgr

Locally, via Composer

In this configuration, Component Manager isn't accessible globally from the shell, so package operations can only be performed by manually adding the bin directory to your PATH or specifying the full path to the componentmgr executable.

Manually (ideal for development)

Component Manager can also be run in-place. This is recommended for performing development within Component Manager itself.

  1. Clone this repository somewhere on your disk.
  2. Ensure our bin directory is on your system PATH.
  3. Run composer install within the repository to obtain the dependencies.

install usage

In this mode, Component Manager is launched from the root directory of a Moodle site. It reads the project and project lock files from the present working directory, then deploys the specified components from the specified package repositories. This mode is designed for use in development environments.

Create a componentmgr.json file in the root of your Moodle project. This file, referred to as the project file or manifest, contains a summary of all of the plugins required for installation of your platform and associated versions.

In order for Component Manager to source your plugins, you'll need to explicitly specify which locations to treat as package repositories. These are declared in the "packageRepositories" section of your project file, indexed by an alias you'll use to refer to them from component entries later. At a minimum, they'll consist of a "type", but additional options might be required for other implementations.

To use the Moodle.org/plugins repository, you'll need the following stanza in your project file:

Other package repositories are available, allowing deployment from corporate version control and distribution systems. At the moment:

You're now ready to start declaring components. Components are declared in the "components" section of your project file, indexed by their frankenstyle component names. Each component object has three keys:

An example to install version 0.4.0 of the local_cpd plugin from the zipped distributions on Moodle.org would look like the following:

Bringing this altogether gives us a componentmgr.json file that looks something like the following:

We're now ready to install our plugins. First, we'll get Component Manager to fetch metadata about all of the available components from our configured package repositories. It'll cache this data to save traffic and time later:

With this data now ready, we can fetch our plugins by switching to the directory containing our Moodle installation and issuing the install command:

Now we can choose to perform the plugins' database upgrades via either the Moodle Notifications page under Site administration, or the handy CLI script:

package usage

In this mode, Component Manager can be launched from any arbitrary location, and it generates a package containing an entire Moodle site. The version of Moodle and related components to deploy is determined from a property in the project file. This mode is designed for use in CI and production environments.

To use Component Manager to package Moodle releases, you'll first need to determine an appropriate expression for your desired Moodle version. You're advised to use a branch here, as Component Manager will pin the exact Moodle version in the project lock file during installation.

You'll then need to choose an installation source:

The support for the different version formats across the different installation sources is as follows:

Version format Behaviour Git Zip
2.7 Latest available release in branch
2.7+ Latest available release in branch with fixes
2.7.10 Specific release version
2.7.10+ Specific release version with fixes
2014051210 Specific release version
2014051210.05 Specific release version with fixes

Bringing this together, you should place the following stanza into your project file:

Packages can be generated in the following formats:

For example, to generate a generic zip ball containing your Moodle site, you can run the following command:

Component lifecycle

Component Manager allows components to run scripts at specific stages of the installation and packaging processes. These are:

To take advantage of this feature, create a componentmgr.comnponent.json in the top level of your repository with the following content:

You can verify that your build steps function as expected without having to perform an installation or package operation with the run-script command:

Development

Milestones are prepared from GitHub issues and maintained using HuBoard.

To get a change into Component Manager:

  1. Fork a new branch off of develop if it's a feature for the next major release, or off master if it's a bug fix.
  2. Make your changes, and commit them. Try to be mindful of commit messages, and don't be afraid of spreading particularly large or complex changes across commits.
  3. Submit a pull request.

Testing

Component Manager is both unit and integration tested.

Integration tests

Integration tests are written in ServerSpec, with Test Kitchen configured to run them in a clean environment using the Docker driver.

To get started, install Kitchen and the necessary dependencies with Bundler:

Then run the tests:

Unit tests

Unit tests are written with PHPUnit. Ensure that Composer development dependencies are installed, then run the tests:

This will generate various coverage and pass/fail reports in the tmp directory.

Note that a portion of the tests for the platform support components will fail on platforms they're not designed for. To exclude them, use PHPUnit's --exclude-group switch on the following groups as appropriate:


All versions of moodle-componentmgr with dependencies

PHP Build Version
Package Version
Requires php Version >= 5.6.0
ext-curl Version *
ext-dom Version *
ext-zip Version *
bramus/monolog-colored-line-formatter Version 2.0.*
composer/ca-bundle Version ^1.0
knplabs/github-api Version ^2.6
php-http/guzzle6-adapter Version ^1.1
php-http/httplug Version ^1.1
psr/log Version 1.0.*
symfony/config Version 3.3.*
symfony/console Version 3.3.*
symfony/dependency-injection Version 3.3.*
symfony/filesystem Version 3.3.*
symfony/http-foundation Version 3.3.*
symfony/monolog-bundle Version ~3.1
symfony/process Version 3.3.*
symfony/yaml Version ^3.1
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 lukecarrier/moodle-componentmgr contains the following files

Loading the files please wait ....