diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 7e027123b60..00000000000 --- a/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -language: php - -php: - - 7.0 - - 7.1 - - 7.2 - - 7.3 - - 7.4 - -matrix: - fast_finish: true - allow_failures: - - php: nightly - - php: 7.3 - - php: 7.4 - -script: - - '! find . -not \( -path ./.phpstorm.meta.php -prune \) -not \( -path ./lib/PEAR -prune \) -not \( -path ./lib/phpseclib -prune \) -not \( -path ./lib/Zend -prune \) -type f -name "*.php" -exec php -d error_reporting=32767 -l {} \; 2>&1 >&- | grep "^"' - - '! find app/design -type f -name "*.phtml" -exec php -d error_reporting=32767 -l {} \; 2>&1 >&- | grep "^"' diff --git a/captainhook.json b/captainhook.json new file mode 100644 index 00000000000..a40aed3b525 --- /dev/null +++ b/captainhook.json @@ -0,0 +1,41 @@ +{ + "commit-msg": { + "enabled": false, + "actions": [] + }, + "pre-push": { + "enabled": false, + "actions": [] + }, + "pre-commit": { + "enabled": false, + "actions": [ + { + "action": "\\CaptainHook\\App\\Hook\\PHP\\Action\\Linting", + "options": [], + "conditions": [] + }, + { + "action": "vendor/bin/php-cs-fixer fix app --rules=@PSR2", + "options": [], + "conditions": [] + } + ] + }, + "prepare-commit-msg": { + "enabled": false, + "actions": [] + }, + "post-commit": { + "enabled": false, + "actions": [] + }, + "post-merge": { + "enabled": false, + "actions": [] + }, + "post-checkout": { + "enabled": false, + "actions": [] + } +} \ No newline at end of file diff --git a/composer.json b/composer.json index c58a7e77033..94685f0a740 100644 --- a/composer.json +++ b/composer.json @@ -32,5 +32,12 @@ "email": "github-sr@hotmail.com", "role": "Maintainer" } - ] + ], + "require-dev": { + "captainhook/captainhook": "^5.4", + "friendsofphp/php-cs-fixer": "^2.16" + }, + "extra": { + "magento-root-dir": "." + } }