Download the PHP package markwalet/laravel-git-state without Composer
On this page you can find all versions of the php package markwalet/laravel-git-state. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download markwalet/laravel-git-state
More information about markwalet/laravel-git-state
Files in markwalet/laravel-git-state
Package laravel-git-state
Short Description A Laravel package that gives you information about the current git state.
License MIT
Informations about the package laravel-git-state
Laravel Git State
A Laravel package that gives you information about the current git state.
Installation
You can install this package with composer:
Laravel auto-loads service providers for you, so you don't have to register it. If you want to register the service provider manually, add the following line to your config/app.php
file:
Usage
When you want to get information about the current git state, you can inject the MarkWalet\GitState\Drivers\GitDriver
class in your methods:
When injecting a GitDriver like this, you will get an instance of the default driver you configured. If you want to have more control over the driver you are using, you can use the MarkWalet\GitState\GitManager
:
Configuration
The default configuration is defined in git-state.php
. If you want to edit this file you can copy it to your config folder by using the following command:
In this file you can configure different drivers for fetching the current Git state, as well as setting a default configuration.
The supported drivers are: exec
and file
. There is also a fake
implementation for testing purposes.
All versions of laravel-git-state with dependencies
laravel/framework Version ^10.0|^11.0|^12.0
phpoption/phpoption Version >=1.8
webmozart/assert Version ^1.10