Skip to content

Commit

Permalink
Update PHP dependencies / add composer-dev container (#1675)
Browse files Browse the repository at this point in the history
Updates a number of composer dependences to their latest compatible for PHP7.3

TODO (These require application/test code changes to upgrade)

PHPUnit
Twig
SwiftMailer
Also introduces a new docker service/container called composer-dev

It is used for running composer commands in the environment (PHP w/ dependencies) of our application.

Run make composer-dev and you will be put into a running container with composer files volume mapped for easy editing/committing
  • Loading branch information
megahirt authored Jan 9, 2023
1 parent 073658c commit 2afb440
Show file tree
Hide file tree
Showing 5 changed files with 526 additions and 380 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ build-next:
build-base-php:
docker build -t sillsdev/web-languageforge:base-php -f docker/base-php/Dockerfile .

.PHONY: composer-dev
composer-dev:
docker compose build composer-dev
docker compose run composer-dev

.PHONY: clean
clean:
docker compose down
Expand Down
9 changes: 9 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,15 @@ services:
- ./src/Api:/var/www/src/Api
- ./src/Site:/var/www/src/Site

composer-dev:
build:
dockerfile: docker/composer-dev/Dockerfile
image: composer-dev
container_name: composer-dev
volumes:
- ./src/composer.json:/work/composer.json
- ./src/composer.lock:/work/composer.lock

volumes:
lf-caddy-config:
lf-caddy-data:
Expand Down
10 changes: 10 additions & 0 deletions docker/composer-dev/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM sillsdev/web-languageforge:base-php


WORKDIR /work
ENV COMPOSER_ALLOW_SUPERUSER=1
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* \
&& install-php-extensions @composer
COPY src/composer.json src/composer.lock /work/

CMD ["bash"]
25 changes: 11 additions & 14 deletions src/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,25 @@
}
],
"require": {
"guzzlehttp/guzzle": "~6.0",
"litipk/php-jiffy": "^1.4",
"league/oauth2-client": "^2.2",
"league/oauth2-google": "^2.0",
"league/oauth2-facebook": "^2.0",
"mongodb/mongodb": "^1.0",
"guzzlehttp/guzzle": "^7",
"litipk/php-jiffy": "^1",
"league/oauth2-client": "^2",
"league/oauth2-google": "^2",
"league/oauth2-facebook": "^2",
"mongodb/mongodb": "^1",
"ocramius/lazy-property": "dev-feature/factory",
"ramsey/uuid": "~3.0",
"ramsey/uuid": "^4.2",
"silex/silex": "~1.3.2",
"sillsdev/web-php-utilities": "dev-master",
"swiftmailer/swiftmailer": "v5.0.2",
"swiftmailer/swiftmailer": "^5",
"symfony/security": "^2.7",
"symfony/twig-bridge": "^2.7",
"twig/twig": "^2.0",
"twig/extensions": "~1.3.0",
"firebase/php-jwt": "^5.2",
"twig/twig": "^2",
"firebase/php-jwt": "^6.3",
"silinternational/php-env": "^2.1"
},
"require-dev": {
"phpunit/phpunit": "^8.0",
"phpunit/php-code-coverage": "^7.0",
"squizlabs/php_codesniffer": "^3.4"
"phpunit/phpunit": "^8"
},
"autoload": {
"psr-4": {
Expand Down
Loading

0 comments on commit 2afb440

Please sign in to comment.