Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BREAKING] Upgrading monolog dependency to 2.0 #6

Open
wants to merge 2 commits into
base: v3.0.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ APP_ROOT := /app/monitoring
all: dev nodev

dev:
@docker-compose -p ${COMPONENT} -f ops/docker/docker-compose.yml up
@docker-compose -p ${COMPONENT} -f ops/docker/docker-compose.yml up --remove-orphans --force-recreate

nodev:
@docker-compose -p ${COMPONENT} -f ops/docker/docker-compose.yml rm -fa > /dev/null
@docker-compose -p ${COMPONENT} -f ops/docker/docker-compose.yml kill
@docker-compose -p ${COMPONENT} -f ops/docker/docker-compose.yml rm -f
ifeq ($(IMAGES),true)
@docker rmi ${COMPONENT}_${CONTAINER}
endif
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "pluggit/monitoring",
"description": "Monitoring abstraction layer",
"require": {
"php": "^5.5|^7.0",
"php": "^7.2",
"psr/log": "^1.0"
},
"require-dev": {
Expand All @@ -12,7 +12,7 @@
"squizlabs/php_codesniffer": "2.*",
"henrikbjorn/phpspec-code-coverage": "2.*",
"phpunit/php-code-coverage": "^2.2",
"monolog/monolog": "^1.23"
"monolog/monolog": "^2.0"
},
"license": "MIT",
"autoload": {
Expand Down
1,138 changes: 815 additions & 323 deletions composer.lock

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions ops/docker/55/Dockerfile

This file was deleted.

2 changes: 0 additions & 2 deletions ops/docker/56/Dockerfile

This file was deleted.

2 changes: 0 additions & 2 deletions ops/docker/7/Dockerfile

This file was deleted.

10 changes: 10 additions & 0 deletions ops/docker/72/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM php:7.2-alpine

RUN apk add --no-cache --virtual .deps \
git \
make \
bash

RUN docker-php-ext-install sockets

RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composer
10 changes: 10 additions & 0 deletions ops/docker/74/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM php:7.4-alpine

RUN apk add --no-cache --virtual .deps \
git \
make \
bash

RUN docker-php-ext-install sockets

RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composer
26 changes: 9 additions & 17 deletions ops/docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,15 @@
version: '2'

services:
php7:
build: ./7
php72:
build: ./72
volumes:
- ../../:/app/monitoring
working_dir: /app/monitoring
command: make test

php56:
build: ./56
volumes:
- ../../:/app/monitoring
working_dir: /app/monitoring
command: make test

php55:
build: ./55
volumes:
- ../../:/app/monitoring
working_dir: /app/monitoring
command: make test
command: [bash, -c, "composer install && make test"]
php74:
build: ./74
volumes:
- ../../:/app/monitoring
working_dir: /app/monitoring
command: [bash, -c, "composer install && make test"]
2 changes: 1 addition & 1 deletion src/Integrations/MonitoringMetricHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function __construct(Monitor $monitor, $metric, $level = Logger::DEBUG, $
*
* @return void
*/
protected function write(array $record)
protected function write(array $record): void
{
$this->monitor->increment($this->metric, [
'channel' => $record['channel'],
Expand Down