Download the PHP package cypresslab/gitelephant-bundle without Composer

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

GitElephantBundle

This is a simple bundle to use the GitElephant library in a Symfony project.

How to install

Method 1 - composer for Symfony 2.1 and above (recommended)

app/AppKernel.php

Is recommended to register this bundle only in development environment for safety reasons.

Method 2 - submodules

You can also manage the two git repositories with git and submodules. It could be a mess if you don't know what you do, but I personally prefer this way

This two commands will clone the two repositories inside your "src" folder. You can use any folder you want in your symfony project. Just remember to update the app/autoload.php file and to activate the bundle in app/AppKernel.php

The namespace for the bundle is "Cypress". You must clone the bundle in a Cypress folder, or it will not work. Your autoload file should point to the folder that contains the Cypress folder

The GitElephant namespace in autoload should point to the "src" folder inside the GitElephant repository

To actually clone the submodules give the command

For more info about git submodules read the dedicated section inside the awesome Pro Git book by Scott Chacon.

How to use

To use the bundle you have to define two parameters in you app/config/config.yml file under cypress_git_elephant section

cypress_git_elephant:
    binary_path: /usr/local/bin/git
    repositories:
        "GitElephant": "/home/matteo/libraries/GitElephant"
        "Bootstrap": "/home/matteo/libraries/Bootstrap"
        # ... other repositories

binary_path: (optional) is the path to your git executable. If you don't provide this GItElephant try to argue the right executable with "which git". Remember that this lib only works on *nix filesystems.

Now, inside your controllers, you can easily access the GitElephant library with dependency injection:

repositories: (at least one is required) is an hash with key: a repository name, value: the repository path

The repository path could also be a bare repository (useful for web servers). But without a checked out copy you won't be able to modify the repository state. You will be able to show the repository, but not, for example, create a new commit

Read the documentation of GitElephant to know what you can do with the Repository class, or watch the demo site build with this bundle, and the relative code.

Web Debug Toolbar

As a bonus, thanks to the GitElephant library, you can have the branch of any repository right inside yuor Symfony2 toolbar.

Add this to your dev configuration file app/config/config_dev.yml

cypress_git_elephant:
    enable_profiler: true
    profiler_repository_path: "%kernel.root_dir%/../"

If you use git with Symfony2, with the above configuration, you can see directly from the browser the branch you are in. Click on the icon and you get a list of the last 10 commits for the branch you are in.

Available console commands

cypress:git:commit

This command is useful to commit (default stage all) all changes in current branch and push to all remotes.

cypress:git:tag

This command is useful to tag current commit and push to all remotes.

cypress:git:merge

This command will merge (default without fast forward) from source (default devel) to destination (default master) branch and push to all remotes.

cypress:git:hit

Combo command to merge without fast forward option from source to destination branch, tag destination branch and push to all remotes.

Example

There is also a demo bundle to see it in action.


All versions of gitelephant-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2.0
symfony/config Version ^4.0|^5.0
symfony/console Version ^4.0|^5.0
symfony/dependency-injection Version ^4.0|^5.0
symfony/framework-bundle Version ^4.0|^5.0
symfony/http-foundation Version ^4.0|^5.0
symfony/http-kernel Version ^4.0|^5.0
cypresslab/gitelephant Version ^4.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 cypresslab/gitelephant-bundle contains the following files

Loading the files please wait ....