Download the PHP package concrete5/cli without Composer

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

Unifficial concrete5 Command Line Interface tools

You may also be interested in the official CLI tool, available at https://github.com/concrete5/console


concrete5 wrapper

This repository contains two shell scripts (c5 for POSIX shells, c5.bat for Windows) that you can place in a directory of your path (for example /usr/local/bin for POSIX shells, or C:\Windows\System32 for Windows).

Once you do it, you can run the concrete5 CLI commands by simply invoking c5 from your shells. In order to detect the location of concrete5, the current working directory can be any of the following:

For example, if concrete5 is installed in /var/sites/example/public, c5 will detect concrete5 if the current directory is any of the following locations:

(the same principle applies to Windows)

POSIX-specific details

Running concrete5 as a different user

You can let c5 execute the concrete5 CLI commands as another user by using the C5_SUDOAS environment variable. It requires that the sudo command is available.

For example:

Sourcing the script

Instead of copying the c5 script to a directory of your path, you can also source it (that is, preload it), for example in your shell initialization script (~/.bashrc for bash):

Once you have reloaded your shell, you'll have the c5 function available.

Windows-specific details

At least under Windows 7, the c5 script is recognized when in C:\Windows\System32 but it doesn't necessarily work for the composerpkg script (see below for details about composerpkg)

The first issue is that the script might be locked by the system.

Click on the composerpkg script and bring up the properties screen. At the bottom you should see an option to unlock it if it's locked.

Generally speaking, it is probably better to put both your scripts in a custom folder, make sure neither composerpkg or c5 are locked by the system, and add your custom folder to your path.

For instance:

You can find out how to add a folder to your Path on this page (it's Java specific but the process is the same for any folder)

composer wrapper for package dependencies

When writing packages for concrete5, you may require composer libraries. When using a composer-based concrete5 installation, this is not a problem, since composer will handle flawlessly your dependencies, and create an autoloader for you.

Problems arise when your package is going to be installed without composer, and you need to provide the composer libraries together with your package.

For example, let's assume that you have in your package composer.json file these requirements:

This is totally legal: you are telling composer that your package requires concrete5 version 8.5.1 (or any later 8.x version), and that you need the some_vendor/some_package package. By the way, if you run a composer install because you want to distribute your package, composer will download concrete5 and install it in your vendor directory, which of course you don't want to.

Another problem arises when your package requires (directly or indirectly) a library that's already included in concrete5 vendor directory. That leads to having to having two running copies of the same library (one in the concrete5 vendor directory, and one in your package vendor directory). This is a waste of space, and the actual version being used may be undetermined.

To avoid these problems, you can run the composerpkg command included in this repository (for Windows users, you'll also need the composerpkg.bat file - to be saved in the same directory as the composerpkg file). composerpkg accepts the same arguments accepted by the plain composer command, but when you install/update the dependencies, you won't have duplicated stuff in your vendor directory.

By default, composerpkg will run Composer by invoking the composer command. If you need to customize it, you can use the COMPOSERPKG_BIN environment variable. For example:

You can make composerpkg verbose by setting the COMPOSERPKG_VERBOSE to 1.


All versions of cli with dependencies

PHP Build Version
Package Version
No informations.
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 concrete5/cli contains the following files

Loading the files please wait ....