Skip to content

Instantly share code, notes, and snippets.

@hujuice
hujuice / integration-manager-repository-hooks.md
Last active March 9, 2021 00:57
Integration manager repository Git hooks for a PHP project

Here are suggested hooks for integration manager repository, in a composer based PHP project.

The IM has all the developer hooks, more the prepare-commit-msg to intercept unwanted merges.

@hujuice
hujuice / repos.conf
Created December 27, 2017 22:09
Dev repos Apache configuration
# /path/to/repos/apache.conf
## Git HTTP(s) backend (aka Git Smart HTTP) and Gitweb
## ===================================================
## See https://git-scm.com/docs/git-http-backend
## See https://git-scm.com/book/be/v2/Git-on-the-Server-Smart-HTTP
## See https://git-scm.com/docs/gitweb
# Git over https
@hujuice
hujuice / docs.conf
Created December 27, 2017 22:07
Documentation Apache configuration
# /path/to/docs/apache.conf
Alias /docs /path/to/docs
<Directory /path/to/docs>
Options -Indexes +FollowSymLinks
DirectoryIndex guide-README.html
AllowOverride None
Require all granted
</Directory>
@hujuice
hujuice / application.conf
Last active June 23, 2021 05:23
Apache VirtualHost configuration for yii2-app-advanced, one domain
# /path/to/application/apache.conf
# UTF-8 forever!
# ==============================
AddDefaultCharset utf-8
# Main URL rewriting rules
# ==============================
RewriteEngine On
# If $showScriptName is false in UrlManager, do not allow accessing URLs with script name
@hujuice
hujuice / Integration-repository-hooks.md
Last active December 27, 2017 11:42
Integration repository Git hooks for a PHP project
@hujuice
hujuice / Blessed-repository-hooks.md
Last active January 7, 2018 11:49
Blessed repository Git hooks for a PHP project
@hujuice
hujuice / Developer-repository-hooks.md
Last active March 9, 2021 00:57
Devs Git hooks for a PHP project

Here are suggested hooks for a developer repository, in a composer based PHP project.

The pre-commit avoids direct commits in masterbranch and performs quality checks (qa script) on changed files, blocking the poor quality code.

The post-merge install new versions of packages on composer.lock changes and perform a new QA check on incoming code.

The quality checks are based on PHP Mess Detector and PHP CodeSniffer