diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..cabfb64 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,13 @@ +image: php56 + +before_script: + - php /composer.phar install --no-progress --no-scripts + - cp app/config/parameters.yml.dist app/config/parameters.yml + +run_tests: + script: + - SYMFONY_DEPRECATIONS_HELPER=weak bin/phpunit -c app/ + +code_styles: + script: + - bin/phpcs --standard=psr2 --extensions=php --warning-severity=0 src/ diff --git a/composer.json b/composer.json index 19f5289..e2ee463 100644 --- a/composer.json +++ b/composer.json @@ -49,7 +49,8 @@ "doctrine/doctrine-fixtures-bundle": "^2.3", "fzaninotto/faker": "^1.5", "symfony/phpunit-bridge": "^3.0", - "phpunit/phpunit": "^5.2 || ^4.8" + "phpunit/phpunit": "^5.2 || ^4.8", + "squizlabs/php_codesniffer": "^2.6" }, "scripts": { "post-install-cmd": [ diff --git a/composer.lock b/composer.lock index 6669f07..cf45564 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "35130a8c9dc716543dfb8a258b02f5ba", - "content-hash": "6940c7b001ee137df87881220f55e33a", + "hash": "1e96115cc59060ec61471d6b746b30ee", + "content-hash": "a71fa02a8ed94925ff9a8d4ba35a03b6", "packages": [ { "name": "dbtlr/php-airbrake", @@ -1008,8 +1008,13 @@ }, "dist": { "type": "zip", +<<<<<<< dc756901b629758298c138eb25fb8790640201d9 "url": "https://api.github.com/repos/FriendsOfSymfony/FOSUserBundle/zipball/d1fccc6335b74beca94525551cacc06b256ed261", "reference": "d1fccc6335b74beca94525551cacc06b256ed261", +======= + "url": "https://api.github.com/repos/FriendsOfSymfony/FOSUserBundle/zipball/88f84f631ee7859c069cf98b475c679e90b16b22", + "reference": "88f84f631ee7859c069cf98b475c679e90b16b22", +>>>>>>> Require squizlabs/php_codesniffer "shasum": "" }, "require": { @@ -5240,6 +5245,84 @@ "description": "This bundle generates code for you", "time": "2016-02-26 04:36:01" }, + { + "name": "squizlabs/php_codesniffer", + "version": "2.6.1", + "source": { + "type": "git", + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "fb72ed32f8418db5e7770be1653e62e0d6f5dd3d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/fb72ed32f8418db5e7770be1653e62e0d6f5dd3d", + "reference": "fb72ed32f8418db5e7770be1653e62e0d6f5dd3d", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "bin": [ + "scripts/phpcs", + "scripts/phpcbf" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "classmap": [ + "CodeSniffer.php", + "CodeSniffer/CLI.php", + "CodeSniffer/Exception.php", + "CodeSniffer/File.php", + "CodeSniffer/Fixer.php", + "CodeSniffer/Report.php", + "CodeSniffer/Reporting.php", + "CodeSniffer/Sniff.php", + "CodeSniffer/Tokens.php", + "CodeSniffer/Reports/", + "CodeSniffer/Tokenizers/", + "CodeSniffer/DocGenerators/", + "CodeSniffer/Standards/AbstractPatternSniff.php", + "CodeSniffer/Standards/AbstractScopeSniff.php", + "CodeSniffer/Standards/AbstractVariableSniff.php", + "CodeSniffer/Standards/IncorrectPatternException.php", + "CodeSniffer/Standards/Generic/Sniffs/", + "CodeSniffer/Standards/MySource/Sniffs/", + "CodeSniffer/Standards/PEAR/Sniffs/", + "CodeSniffer/Standards/PSR1/Sniffs/", + "CodeSniffer/Standards/PSR2/Sniffs/", + "CodeSniffer/Standards/Squiz/Sniffs/", + "CodeSniffer/Standards/Zend/Sniffs/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "lead" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "http://www.squizlabs.com/php-codesniffer", + "keywords": [ + "phpcs", + "standards" + ], + "time": "2016-05-30 22:24:32" + }, { "name": "symfony/phpunit-bridge", "version": "v3.0.3",