Skip to content

Instantly share code, notes, and snippets.

@kitzberger
Created February 5, 2019 20:09
Show Gist options
  • Save kitzberger/18228c7b4ae7e0c74387e0df8b06f697 to your computer and use it in GitHub Desktop.
Save kitzberger/18228c7b4ae7e0c74387e0df8b06f697 to your computer and use it in GitHub Desktop.
PHP Compatibility Check
# -------------------------
# PHP-Compatibility
# -------------------------
# Add dev requirements
composer require --dev phpcompatibility/php-compatibility
# List installed configs (should be none)
bin/phpcs --config-show
# Install PHP-Compatibility ruleset
bin/phpcs --config-set installed_paths vendor/phpcompatibility/php-compatibility/
# Run sniffs
bin/phpcs -p --standard=PHPCompatibility --runtime-set testVersion 7.2 html/typo3conf/ext/
# -------------------------
# TYPO3 Sniffs
# -------------------------
composer config repositories.TYPO3SniffPool vcs https://github.com/DanielSiepmann/TYPO3SniffPool.git
composer require --dev typo3-ci/typo3sniffpool:dev-feature/80-phpcs-3-compatibility
# Install TYPO3 Sniffs ruleset
bin/phpcs --config-set installed_paths vendor/typo3-ci/typo3sniffpool/
# Run sniffs
bin/phpcs -p --standard=TYPO3SniffPool html/typo3conf/ext/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment