Download the PHP package lucatume/codeception-setup-local without Composer

On this page you can find all versions of the php package lucatume/codeception-setup-local. 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 codeception-setup-local

Codeception Local Setup commands

Additional commands to make Codeception local setup easy across teams.

Installation

Usage

Both the commands will be available on the codecept CLI tool:

Both commands support the --save-config option; when used the value of any option specified to run the command will be written to the commands-config.yaml file.
On subsequent runs any option that has not a value specified for an option will default to the stored one; this is for options (--option-name format) values only, arguments need to be specified every time the command runs.

search-replace

Simply put this command will replace every instance of a string in a file and either rewrite the result in the same file or output the modified content in a specified output file.
Teams sharing files that are used to set up fixtures can automate the "localization" of these fixture files with the command.
An example might be one where a team shares a database dump used to set up acceptance tests in a distribution format; the database dump needs to be customized for each member of the team replacing some values in it.
The below command will replace all instances of http://site.local with http://localhost:8080 in the dump.sql file.

To avoid manipulating a common source file an optional output file can be specified like this:

The command is file agnostic and will work on any file; the following is a legit use too:

If used in a loop some source files might be missing; in that case the --skip-if-missing option can be used to avoid errors when the source file is missing:

setup

On the same line of team sharing way more complex set up procedures might be required to set up a local, ready to use and customized testing environment.
While embedding shell scripts in the repository is always an option the setup tries to remove some required knowledge relying on a Yaml configuration file.
If ran without specifying the configuration file to use the command will try to look for a setup.yml file in the project root folder:

The configuration file to use can be specified using the optional argument:

A basic local setup configuration file might be the one below:

The console command output will be:

if setup instruction

Any instruction can be conditionally executed using the simple if or unless syntax.
An if condition will make sure the instruction is executed if the specified condition is true; an unless condition will make sure the instruction is executed if the specified condition is false.
The condition syntax in both cases is:

The configuration file below will show the message "Hello world" if the "show" variable has not a value of "no".

Which is equivalent to:

Condition can also be an existence one where the chekc is made on a variable being empty or not:

for loop setup instruction

The message, command and exec support the for argument.
This argument allows the instruction to be executed an arbitrary number of times looping over a user entered or hard-coded variable.
The setup instructions below will create 3 files in the root folder:

the string one,two,three represents an array of comma separated values. The format allows for spaces around commas to improved readability; the setup file below:

will output:

Hello John! Hello Marc! Hello Daniel!

Variables too can be used in the for loop but those must be integer values:

will output, presuming an user input of 4:

Loop run 1 Loop run 2 Loop run 3 Loop run 4

Please note that loops are human-friendly and start at 1 and not 0 as developers are used to.

var

Ask the user for a variable value or store a variable value.
In the first case required fields for the var instructions are:

If the purpose is to store a value for later use then required fields are:

Optional arguments are:

break

If the setup execution should be stopped then the break instruction can be used.
The instruction has two arguments:

An example usage:

message

Displays a message to the user.
Messages can be one line arguments like this:

or multiline arguments to allow specifying a condition:

In the latter case the value argument is required.
Variable values previously obtained can be replaced in a message using the $varName notation:

command

Runs a sub-command registered on the the codecept CLI tool; an example might be the search-replace subcommand above.
The command instruction can be a one liner:

or a multilne instruction if a condition needs to be specified:

Variable values previously obtained can be replaced in a command instruction using the $varName notation:

exec

Runs a script using PHP exec() function.
The exec instruction can be a one liner:

or a multilne instruction if a condition needs to be specified:

Variable values previously obtained can be replaced in an exec instruction using the $varName notation:

setup:scaffold

While a setup command consumable file can be easily created the setup:scaffold command was born to give a quick starting point.
Beint project-agnostic it is meant to be used after the local testing environment has been set up.
The command allows for some options:


All versions of codeception-setup-local with dependencies

PHP Build Version
Package Version
Requires codeception/codeception Version ^2.1
lucatume/wp-browser-commons Version ^1.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 lucatume/codeception-setup-local contains the following files

Loading the files please wait ...