Download the PHP package se7enxweb/git_manager without Composer

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

Git Manager

Git Manager is an Exponential extension that puts the installation's git checkout and its backups into the administration. An administrator can switch branches, check out a commit, compare the checked out branch with its branch on a remote, fetch, push, manage remotes and submodules, browse the whole commit log, and make, encrypt, download and remove site backups, all from the browser.

It is meant for sites where git is installed on the server but nobody has (or should need) a shell: shared hosting, managed servers, and teams that deploy by switching a branch rather than by typing commands. Everything it does is also available from the command line, for those who do have one.

Contents

Core use cases:

Features

Git Management (Web UI)

Backup & Caption Manager (Web UI)

CLI Tools (requires shell access)

Backup Types

Type Creates Use For
Full Site Backup SQL dump + var/ archive + site files (extensions/, settings/, config.php) Full site restoration from scratch
DB + Files Caption SQL dump + var/ archive Daily backup of database and uploaded files
Database Only SQL dump only Before database changes or migrations
Files Only (var/) var/ archive only Before bulk file changes

Full Site Backup is the most complete option — it produces 3 separate archives covering everything needed to rebuild the site on a new server, excluding the Exponential kernel files (which come from git).

AGPL-Compatible Public Release Dumps

When creating any SQL-based backup (Full Site, DB + Files, or Database Only), you can check the 🔓 AGPL Compatible Release checkbox. This creates an additional sanitized SQL dump file alongside your normal backup, designed for public sharing or distribution to comply with AGPL/GPL license obligations.

What gets sanitized:

Result:

License Files Included: Every caption directory and compressed archive includes a licenses/ folder with:

This ensures anyone receiving your backup archive has the full license terms as required by open source distribution obligations.

Backup Status and Age Warnings

The top of the Backup page says in one block how fresh the backups are. It is taken from the newest backup only: an old backup next to a recent one is no reason for a warning. (Before 2.0.15 the page took the age of the oldest backup, so it kept warning about a backup from months ago however recent the newest was.)

State When Color
none there is no backup red
fresh the newest backup is at most WarnAfterDays old green
ageing older than WarnAfterDays, at most StaleAfterDays orange
stale older than StaleAfterDays red
future every backup is dated more than FutureToleranceMinutes ahead of the server clock orange

The thresholds are in git_manager.ini:

How the age is found:

The texts are chosen from the state alone (GitManagerBackupMessages), the state from the ages (GitManagerBackupFreshness), and the backups are read from the disk by GitManagerBackupCatalogue. bin/php/backup-list.php prints the same status line.

Nothing makes backups on its own: the warning stays until someone creates a backup (on the page or with bin/php/backup-create.php, which a crontab can run; see below).

Best Practice: Create a full caption weekly, and a database-only caption before any CMS upgrades or major content changes.

Using the Backup Manager (Web)

  1. Open Setup → Backup in the admin interface (/git_manager/backup; the address before 2.0.4, /git_manager/dump, redirects there)
  2. Choose one of the four forms under Create a backup
  3. Optionally add a description
  4. Optionally check Encrypt the archives and enter a passphrase
  5. Optionally check the AGPL compatible database dump to create a sanitized SQL dump for public sharing
  6. Click the create button — the backup runs on the server; the page comes back with the result
  7. In Existing backups, download each archive with its Download button (the AGPL compatible dumps too)
  8. Remove a backup with its Remove button, or several with the check boxes and Remove selected

Every form is a POST with the form token of ezformtoken and ends in a redirect to the page, so reloading it repeats nothing; the result is shown once.

Downloads are streamed in pieces with the session closed, so an archive of several gigabytes needs no memory and does not block the user's other pages. A persistent PHP server (Exponential Velocity) keeps a whole response in memory before sending it; there an archive larger than PersistentServerDownloadLimitMB (git_manager.ini, default 128) is marked Too large for this server and refused with a message. Download it through the address served by Apache or PHP-FPM, or copy it from the server.

Tests: php ../../vendor/bin/phpunit in extension/git_manager (or phpunit -c phpunit.xml.dist in a checkout) runs the unit tests of the catalogue, the freshness and the texts. They need no database and make their throwaway backup folders under tests/.tmp (or GIT_MANAGER_TEST_TMP). Run them as the site user as well: two tests about unreadable backups are skipped as root.

Access

The backup page and the downloads need the policy git_manager/backup. Before 2.0.4 this function was called git_manager/dump; roles that grant the old name keep working, and

renames them.

Using the CLI Backup Tools

Run from the Exponential root directory (the folder that holds index.php and extension/):

List all backups:

Create backups:

Scheduled backups: nothing in git_manager makes backups on its own. A crontab line of the site's user makes them regularly, for example a database backup every night:

MaxBackups in git_manager.ini limits how many are kept (the oldest are removed after a full backup).

Inspect a caption:

Delete a caption:

Remotes and submodules (the same checks as the dashboard; git never waits for a password):

Decrypting GPG-Encrypted Backup Files

Encrypted backup files end in .tar.gz.gpg. To decrypt and extract:

Decrypt only (produces .tar.gz):

Decrypt and extract in one step:

Test decryption (verify passphrase works without extracting):

Only the person who created the backup knows the passphrase. There is no recovery mechanism — store your passphrase securely (e.g. in a password manager).

Requirements

Installation

With Composer

From the root of the Exponential installation:

The Exponential legacy installer places the package in extension/git_manager.

By hand

  1. Download the latest release from https://github.com/se7enxweb/git_manager/releases (or git clone https://github.com/se7enxweb/git_manager.git).
  2. Copy or move the folder to extension/git_manager in the installation. The folder name must be git_manager.

Activate it

Add the extension to settings/override/site.ini.append.php:

Then regenerate the autoloads and clear the caches, from the installation root:

Sign in to the administration: the Git tab now appears in the top menu, and Setup lists Git Manager and Backup. Give the roles that should use them the policies listed under Permissions (the Administrator role already has every function).

Configuration

All settings are in extension/git_manager/settings/git_manager.ini.append.php. Do not edit that file: override what you need in settings/override/git_manager.ini.append.php (or in a siteaccess). The defaults, with what each one does:

A typical override, for a site that deploys from the production branch of a remote called deploy and keeps ten backups:

The extension also adds itself to menu.ini (the Git tab and the Setup links), module.ini, design.ini (its design and its stylesheet), site.ini (its translations) and audit.ini (the audit event below). Nothing there needs changing.

Using Git Manager

The Git tab

The Git tab of the top menu opens the dashboard (/git_manager/dashboard). In the admin4 design the tab shows the git icon before its name. The same page is linked from Setup → Git Manager.

The dashboard has these cards:

  1. HEAD: the checked out branch, the last commit and its date.
  2. Upstream: the checked out branch against its branch on the remote of [UpstreamSettings]: the commits missing on either side, uncommitted files, links to the commits on the remote's web page, and Fetch now (git fetch --prune of that remote, nothing else). Every fetch is recorded in the audit log as system.git_manager.fetch.
  3. Checkout: choose a local branch, or a branch of a remote, and check it out. This is how a site is deployed: push the work to a branch, then check that branch out here.
  4. Commit: check out one commit by its hash, for example to go back to a known good state.
  5. Remotes: list, add, change and remove remotes, fetch one, and push a branch to one (never forced). Needs the remotes and push functions.
  6. Submodules: list, add, change, update and remove submodules, and check out with submodules updated. Adding, changing and removing stage the change; commit it to keep it. Needs the submodules function.
  7. Log: the commit history page by page (10, 25, 50 or 100 per page), filtered by branch or tag, author, message text and dates. Each commit links to its details (/git_manager/commit_details/<hash>).

The log's page and filters are view parameters, so a filtered view is a link you can share or bookmark:

Every value reaches git as an argument of its own, without a shell, after a check: a branch or tag must be one of the repository's refs, dates must be real days, texts are cut at 200 characters.

The Backup page

Setup → Backup (/git_manager/backup) makes, lists, downloads and removes backups; see Using the Backup Manager (Web) above.

Permissions

The module git_manager has these functions. Give them in User accounts → Roles and policies.

Function Allows
git_manager/git_manager The dashboard and the commit details: checkout of branches and commits, fetch, the log
git_manager/push Pushing a branch to a remote
git_manager/remotes Adding, changing and removing remotes
git_manager/submodules Adding, changing, updating and removing submodules
git_manager/backup The Backup page and the downloads
git_manager/dump The name backup had before 2.0.4; still accepted, see Access

Checking out a branch changes the code the site runs. Give these functions only to people who may deploy.

Upgrading

  1. Replace the extension's folder with the new release (composer update se7enxweb/git_manager, or copy the new files over the old ones).
  2. Regenerate the autoloads and clear the caches:

  3. Read doc/CHANGELOG.md for what changed. From a version before 2.0.4, run bin/php/upgrade-policy-dump-to-backup.php once (see Access).

Known limits

Troubleshooting

Questions and bug reports: https://github.com/se7enxweb/git_manager/issues

Contributing

Pull requests are welcome at https://github.com/se7enxweb/git_manager. The unit tests need no database:

Translations live in translations/<locale>/translation.ts; the extension ships English, German, Spanish (Spain and Mexico), Croatian, Czech, Danish, Dutch, Hebrew, Italian, Latin, Norwegian, Polish, Brazilian Portuguese, Swedish, Turkish and Klingon. New languages are welcome.

License

Git Manager is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License or (at your option) any later version. See LICENSE. It is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY.

The backup archives carry copies of the GPL v2 and the AGPL v3 (see AGPL-Compatible Public Release Dumps); their texts are in doc/.

Credits and history

Serhey Dolgushev wrote Git Manager in 2013 as an extension for eZ Publish, the content management system that preceded Exponential, to switch a site's branch from its administration. 7x has maintained it since, for Exponential: backups and encryption, the AGPL compatible dumps, the Upstream card, remotes and submodules, the paged log, the audit event, the admin4 design and the translations.

See doc/COPYRIGHT.md.


All versions of git_manager with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
se7enxweb/exponential-legacy-installer Version *
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 se7enxweb/git_manager contains the following files

Loading the files please wait ...