Download the PHP package happyculture/combawa without Composer

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

Combawa

Combawa is a bash script that helps you build your Drupal projects.

It's compatible with Drupal 10 and is meant to be used by developers and CI applications. (See other branches for lower Drupal versions).

You are encouraged to use Combawa as a daily companion to reinstall/update your local installation or CI environment.

Because Combawa is very cool, you can use a Drush command to setup the required environment variables. See below for details.

Installation

If you don't want to use the generated settings.local.php file, you will have to add in your settings.php (or any other settings file) the following snippet:

Recommended

Combawa wrapper as a global command

If you are lazy as we are (you should), it is possible to use a global command combawa instead of vendor/bin/combawa in your projects.
In order to do that, you need to install the Combawa wrapper (https://github.com/Happyculture/combawa-wrapper). It works similarly as the Drush wrapper.

composer global require happyculture/combawa-wrapper

Usage

Conception & philosophy

(Re)Build your project with Combawa

Combawa is the script that will ease your project reinstallation when you want to test your freshly baked feature.

It's designed with an CI context in mind for the local station. When you will start using Combawa, you will initiate a build scenario (we suggest the production scenario) to set default values to the internal options (should my script backup the site before building? Retrieve a fresh reference dump from production...) You can build the project from an installation profile, from existing config or from a reference dump directly retrieved from your production server.

How to use Combawa

Running Combawa to (re)build your project mostly resumes to running this command: ./vendor/bin/combawa.

When you are building a site, the following steps are followed:

Combawa takes the default settings when you run it with no extra arguments. You can override them on the fly (see arguments section below).

Environment specific

Combawa is designed to build your site following an environment specific set of rules.

Said otherwise, you have a solution to compile CSS files in prod and not in dev, drop the DB to each rebuild (but not on prod), enable/disable specific modules in development (Devel, Views UI...) or production (no DBLog or UI...)

The valid environments (option -e) are the following:

When you are targeting a specific environment, you can edit predeploy_actions.sh or postdeploy_actions.sh. Each file is composed of a switch/case per environment but you can specialize those files per project.

Build mode

When you build your projects, you are in two different scenarios:

Each mode (option -m) is using a different build file since you don't run the same commands whether you are installing or updating.

Combawa ships with template files for each mode, you can update them when you need to adjust them to your constraints.

Combawa options

You can use more arguments such as : ./vendor/bin/combawa.sh --env dev --mode install --backup 1 --fetch-db-dump

Here is the list of available arguments:

Environment files

You can generate or manually create environment files to inject Combawa required variables and extra environment infos. The .env file(s) are expected to be located at the repository root level.

We leverage Symfony Dotenv component so the .env file may be overriden by .env.local, .env.$APP_ENV.local or .env.$APP_ENV if defined.

Drush commands

Environment generator

Command drush combawa:generate-environment:

Used once per environment, this command creates two files:

By default the command is interactive. If you want to use it through CLI, you can pass all arguments with there value. If a required value is missing, the command will prompt to collect the missing values. Eg:

See the integrated help using drush combawa:generate-environment --help for arguments values.

Please note that the command will NOT generate the settings.local.php if it already exists to avoid data loss. If you any valid reason, you need to override the existing file (eg: in a Continous Integration context), you can do so by passing the extra argument --force-settings-generation.

Please also be aware that the .env file content will be different if you are in install or update mode. It means that you should retrigger the command when you switch from install to update to fill the extra required information (to fetch the DB dumps mostly).

Script templates generator

Command drush combawa:initialize-build-scripts:

This command generates the build scripts used by Combawa to install/update the project from templates. Once those files are generated, you can customize them to your needs and probably want to version them.

Advanced usages

Pulling changes from production

If some of your users are able to change the configuration on the production environment, you might want to ensure your repository is up-to-date before shipping new features. Those settings being stored in the database, you need to retrieve them on your local environment then export the configuration to your repository.

Run combawa to only replace your local database with your production dump as follow: \ combawa -f 1 -r 1 --stop-after-reimport

You are now in the state where the database has been imported. Run drush config:export -y to export in code and version the config delta from prod.

Troubleshooting

This version is obviously bug free! If you identify an issue, please open an issue.


All versions of combawa with dependencies

PHP Build Version
Package Version
Requires drush/drush Version ^12 || ^13
symfony/dotenv Version ^6.3
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 happyculture/combawa contains the following files

Loading the files please wait ....