From 0a6467602503c422e4175786285e5fc7e8e8cdb2 Mon Sep 17 00:00:00 2001 From: meyerbaptiste Date: Tue, 10 Apr 2018 10:54:38 +0200 Subject: [PATCH 1/2] Remove Brigade on 2.1 --- Dockerfile.coverage | 30 ------------------------------ brigade.js | 39 --------------------------------------- 2 files changed, 69 deletions(-) delete mode 100644 Dockerfile.coverage delete mode 100644 brigade.js diff --git a/Dockerfile.coverage b/Dockerfile.coverage deleted file mode 100644 index cd94f950bc7..00000000000 --- a/Dockerfile.coverage +++ /dev/null @@ -1,30 +0,0 @@ -FROM composer:1.5 -FROM php:rc-alpine - -RUN apk add --no-cache --virtual .persistent-deps \ - git \ - icu-libs \ - zlib - -RUN apk add --no-cache --virtual .build-deps \ - $PHPIZE_DEPS \ - icu-dev \ - zlib-dev \ - curl - -RUN set -xe \ - && docker-php-ext-install \ - intl \ - zip - -COPY --from=0 /usr/bin/composer /usr/bin/composer - -RUN curl -L -o /usr/bin/phpcov https://phar.phpunit.de/phpcov.phar \ - && curl -L -o /usr/bin/coveralls https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar \ - && chmod 755 /usr/bin/phpcov /usr/bin/coveralls - -RUN apk del .build-deps - -RUN echo "memory_limit=-1" > $PHP_INI_DIR/conf.d/memory-limit.ini - -ENV COMPOSER_ALLOW_SUPERUSER 1 diff --git a/brigade.js b/brigade.js deleted file mode 100644 index c99e51efaf3..00000000000 --- a/brigade.js +++ /dev/null @@ -1,39 +0,0 @@ -const { events, Job } = require('brigadier'); - -const coverage = (event, project) => { - console.log(`===> Building ${ project.repo.cloneURL } ${ event.commit }`); - - const job = new Job('coverage', 'cooptilleuls/api-platform-core-brigade-coverage:latest'); - - job.tasks = [ - 'set -xe', - 'cd /src/', - 'mkdir -p build/logs build/cov', - `composer require --dev --no-update 'phpunit/php-code-coverage:^5.2.2'`, - 'composer update --prefer-dist --no-progress --no-suggest --ansi', - 'phpdbg -qrr vendor/bin/phpunit --coverage-php build/cov/coverage-phpunit.cov', - `for f in $(find features -name '*.feature'); do FEATURE=\${f//\\//_} phpdbg -qrr vendor/bin/behat --format=progress --profile coverage $f || exit $?; done`, - 'phpdbg -qrr $(which phpcov) merge --clover build/logs/clover.xml build/cov;', - 'coveralls -v', - ]; - - job.env = { - CI_NAME: 'brigade', - CI_BUILD_NUMBER: event.buildID, - COVERALLS_REPO_TOKEN: project.secrets.coverallsToken, - }; - - const gh = JSON.parse(event.payload); - if (gh.pull_request) { - job.env.CI_PULL_REQUEST = gh.pull_request.number.toString(); - job.env.CI_BRANCH = gh.pull_request.base.ref; - } else if (gh.ref) { - const parts = gh.ref.split('/'); - job.env.CI_BRANCH = parts[parts.length - 1]; - } - - job.run(); -}; - -events.on('push', coverage); -events.on('pull_request', coverage); From c5b8d625165a49702700407e351971d05d1d0363 Mon Sep 17 00:00:00 2001 From: meyerbaptiste Date: Fri, 23 Mar 2018 10:35:05 +0100 Subject: [PATCH 2/2] Fix PHPStan --- phpstan.neon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpstan.neon b/phpstan.neon index 8f4b7b74e80..79eeab6a476 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -7,7 +7,7 @@ parameters: - '#Call to an undefined method Symfony\\Component\\Routing\\Exception\\ExceptionInterface::getCode\(\)#' - '#Call to an undefined method Prophecy\\Prophecy\\ObjectProphecy::[a-zA-Z0-9_]+\(\)#' - '#Access to an undefined property Prophecy\\Prophecy\\ObjectProphecy::\$[a-zA-Z0-9_]+#' - - '#Call to an undefined method PHPUnit_Framework_MockObject_MockObject::[a-zA-Z0-9_]+\(\)#' + - '#Call to an undefined method PHPUnit\\Framework\\MockObject\\MockObject::[a-zA-Z0-9_]+\(\)#' - '#Call to an undefined method Doctrine\\Common\\Persistence\\Mapping\\ClassMetadata::getAssociationMappings\(\)#' # False positives