Download the PHP package piotrpress/composer-setuper without Composer

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

Composer Setuper

This Composer plugin allows realizing full setup process (also interactively) of your project according to defined steps.

Usage example

Take a look at extra.setup section in composer.json file of the WordPress Plugin Template project.

Installation

Setuper can be simply required like a regular dependency package or can be installed like a global plugin.

Project dependency

  1. Add Setuper as project dependency:

  2. Allow plugin execution:

Global dependency

  1. Add command as a global dependency:

  2. Allow plugin execution:

Defining setup

Actions

Actions are setup steps that are firing during the Composer execution process.

You can define actions in composer.json extra property as an array of objects in setup property e.g.:

Setup can also be a PHP callback (defined as a static method) e.g.:

Single action can also be a PHP callback (defined as a static method) e.g.:

NOTE: PHP classes containing defined callbacks must be autoloadable via Composer's autoload functionality.

Events

Actions are triggered by events.

If you don't specify the event for the action, then it'll be assigned to setup script, which you can use in composer.json scripts property e.g.:

You can also run it manually from command line:

Priorities

Actions calls within an event are sorted by priority. By default, the priority of an action is set to 0. Higher value represent higher priorities.

Input / Output actions

The most powerfull and common usage feature of Setuper is interactively communicating with the user due setup process. Setuper can taking users inserted values using insert, secret, select or confirm actions and sets the variables for future reference in other (e.g. filesystem manipulation) actions.

Set

Sets value to variable for future reference.

Parameters

Insert

Sets value to variable passed by the user.

Parameters

NOTE: insert action uses ask() function from Symfony Console component, so for detailed info (e.g. how validating the value) check out the documentation.

Secret

Sets value to variable passed by the user.

Parameters

Select

Sets value to variable passed by the user.

Parameters

Confirm

Sets value to variable passed by the user.

Parameters

Write

Outputs single or multiple lines message to the console.

Parameters

NOTE: write action uses writeln() function from Symfony Console component, so for detailed info (e.g. how to color and style the message) check out the documentation.

Filesystem actions

Directory

Creates a directory.

Parameters

Symlink

Creates a symbolic link.

Parameters

Rename

Renames a file or directory.

Parameters

Copy

Copies a file or directory.

Parameters

Move

Moves a file or directory.

Parameters

Remove

Removes a file or directory.

Parameters

Owner

Changes the owner of a file or directory.

Parameters

Group

Changes the group of a file or directory.

Parameters

Mode

Changes the mode of a file or directory.

Parameters

File content actions

Dump

Dump the content to the file.

Parameters

Append

Append the content to the file.

Parameters

Replace

Replace all occurrences of the pattern with the replacement string in file content.

Parameters

NOTE: Replace action uses preg_replace() and Symfony Finder Component, so for detailed info check out the documentation.

Requirements

License

MIT


All versions of composer-setuper with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
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 piotrpress/composer-setuper contains the following files

Loading the files please wait ....