sohoa / framework
There is no license information available for the latest version (dev-master) of this package.
dev-master
2015-08-04 18:26 UTC
Requires
- php: >=5.4.0
- hoa/console: ~2.0
- hoa/core: ~2.0
- hoa/dispatcher: ~0.0
- hoa/file: ~0.0
- hoa/http: ~0.0
- hoa/registry: ~2.0
- hoa/router: ~2.0
- hoa/session: ~0.0
- hoa/stringbuffer: ~0.0
- hoa/view: ~2.0
Requires (Dev)
- atoum/atoum: dev-master
Suggests
- hoa/xyl: To use Sohoa\Framework\View\Xyl adapter in your project
This package is not auto-updated.
Last update: 2025-03-24 17:53:00 UTC
README
PHP framework based on Hoa
Convention de codage / PSR1-2 / Git hook:
Sohoa/Framework respecte PSR1 et PSR2 comme convention de codage. Pour faciliter le travail nous utilisons l'outil PHP-CS-Fixer permet de vérifier et corriger automatiquement le code qui ne respecte pas les standards PSR1 et 2. Avec la ligne de commande suivante :
php /path/to/php-cs-fixer.php fix /path/to/the/framework
On peut également ajouter cette vérification en hook de pre-commit pour Git. Il faut pour cela ajouter dans le dossier .git du dépôt local dans le fichier pre-commit
une grande partie du code a été trouvé chez LilaConcepts
Simple vérification thanks to lilaconcepts
#!/bin/sh
PROJECTROOT=`echo $(cd ${0%/*}/../../ && pwd -P)`/
FIXER=php-cs-fixer.phar
if [ ! -e ${PROJECTROOT}${FIXER} ]; then
echo "PHP-CS-Fixer not available, downloading to ${PROJECTROOT}${FIXER}..."
curl -s http://cs.sensiolabs.org/get/$FIXER > ${PROJECTROOT}${FIXER}
echo "Done. First time to check the Coding Standards."
echo ""
fi
RES=`php ${PROJECTROOT}${FIXER} fix $PROJECTROOT --verbose --dry-run`
if [ "$RES" != "" ]; then
echo "Coding standards are not correct, cancelling your commit."
echo ""
echo $RES
echo ""
echo "If you want to fix them run:"
echo ""
echo " php ${PROJECTROOT}${FIXER} fix ${PROJECTROOT} --verbose"
echo ""
exit 1
fi
Tip
Pour commiter sans passer par le hook on peut utiliser la ligne de commande suivante :
git commit -m "message" --no-verify