Skip to content

Commit

Permalink
Merge pull request #327 from perftools/composer-lock
Browse files Browse the repository at this point in the history
  • Loading branch information
glensc committed Sep 15, 2020
2 parents 3f7eb16 + c96f185 commit 71e7097
Show file tree
Hide file tree
Showing 4 changed files with 1,961 additions and 11 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/composer.lock
/composer.phar
/tags
/vendor
Expand Down
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ RUN set -x \
&& pecl install mongodb && docker-php-ext-enable mongodb \
&& docker-php-ext-install pdo pdo_mysql pdo_pgsql \
# https://github.com/docker-library/php/blob/c8c4d223a052220527c6d6f152b89587be0f5a7c/7.3/alpine3.12/fpm/Dockerfile#L166-L172
&& runDeps="$( \
&& runDeps=$( \
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \
| tr ',' '\n' \
| sort -u \
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
)" \
) \
&& apk add --no-cache $runDeps \
&& apk del .build-deps

Expand All @@ -36,7 +36,6 @@ COPY --from=source /app/composer.* ./
COPY --from=source /app/vendor ./vendor

# install in two steps to cache composer run based on composer.* files
RUN composer require --update-no-dev --no-scripts alcaeus/mongo-php-adapter ^1.1
RUN composer install $COMPOSER_FLAGS --no-scripts --no-autoloader

# copy rest of the project. copy in order that is least to most changed
Expand Down
17 changes: 10 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,27 @@
"XHGui\\Test\\": "tests/"
}
},
"config": {
"platform": {
"php": "7.0.0",
"ext-mongodb": "1.3.0"
},
"sort-packages": true
},
"require": {
"php": "^7.0",
"ext-json": "*",
"alcaeus/mongo-php-adapter": "^1.1",
"pimple/pimple": "^3.0",
"slim/slim": "^2.6.3",
"slim/views": "^0.1.0",
"twig/twig": "~1.17",
"pimple/pimple": "^3.0"
"twig/twig": "~1.17"
},
"require-dev": {
"alcaeus/mongo-php-adapter": "^1.1",
"phpunit/phpunit": "^5.7.27 | ^6.5.13"
},
"scripts": {
"test": "phpunit",
"cover": "phpunit --coverage-clover=unittest-coverage.clover"
},
"suggest": {
"ext-mongodb": "Requried to store profiler results in MongoDB",
"alcaeus/mongo-php-adapter": "Required for storing profiler results in MongoDB"
}
}

0 comments on commit 71e7097

Please sign in to comment.