And visualize quickly the latest commit into your repository by clicking on the Commit ID.
Information displayed :
- Branch : active branch
- Time since last commit : time since last commit at page generation
- less than one hour : minutes + seconds | colored in green, then in red :
- more than one hour : hour(s)
- more than 24h : count in days
- more than 1 month : count in months
Useful for local development but also for a continuous integration (CI) process on a development server.
If no git repository have been initiated, there will be no display into the toolbar.
Information displayed :
- Commit ID : links to the commit URL on your repository (Github, Bitbucket..), base url is to set into repository_commit_url parameter
- Merge : merge IDs if there is
- Author
- Email : email with active link
- Date : full date of latest commit
- Commit message
composer require kendrick/symfony-debug-toolbar-git
In your composer.json :
"require": {
[...]
"kendrick/symfony-debug-toolbar-git": "1.*"
Install or update :
Terminal alias or Command Line Tools Console of PHPStorm
c install
c update
No alias
php composer.phar install
php composer.phar update
Menu : Tools > Composer > Add dependency, then type part of the package name : kendrick/symfony-debug-toolbar-git.
app/AppKernel.php :
if (in_array($this->getEnvironment(), array('dev', 'test'))) {
[...]
$bundles[] = new Kendrick\SymfonyDebugToolbarGit\SymfonyDebugToolbarGit();
# app/config/config_dev.yml
symfony_debug_toolbar_git:
repository_commit_url: " " #default value
repository_local_dir: / #default value
...
#example 1: github repository
repository_local_dir: https://github.com/Rafaelgfirmino/project/commit/
#example 1: gitlab repository
repository_local_dir: https://gitlab.com/rafaelgfirmino/project/commit/
#example 1: bit repository
repository_local_dir: https://bitbucket.org/team/project/commits/
Note: repository_local_dir initial path is app/..
...
# example 1: this is path default = app/../
repository_local_dir: /
#example 2: this is path to src = app/.../src
repository_local_dir: /src
#example 3: this is path to bundle = app/../src/package/bundleName
repository_local_dir: /src/package/bundleName
Note: **Case not exist git directory you will see this message