Skip to content

Commit b5019c2

Browse files
author
turboatcrazyfactory
authored
Merge pull request #8 from crazyfactory/add_more_loggers
feat: migrate logger logic from ERP to the package
2 parents 8e22680 + 198238c commit b5019c2

31 files changed

Lines changed: 560 additions & 1606 deletions

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@
44
/.idea/
55
/vendor/
66
composer.lock
7+
.composer
8+
*.local.*

.travis.yml

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,35 @@ cache:
44
directories:
55
- $HOME/.composer/cache
66

7+
language: node_js
8+
node_js:
9+
- "8"
10+
711
git:
812
depth: 1
913

10-
language: php
11-
php:
12-
- 7.0
14+
services:
15+
- docker
16+
- docker-compose
1317

14-
env:
15-
matrix:
16-
- PHALCON_VERSION="3.0.x"
17-
- PHALCON_VERSION="3.1.x"
18+
before_install:
19+
- docker --version
20+
- docker-compose --version
21+
- chmod +x ./travis_install.sh && ./travis_install.sh
22+
- travis_retry docker login -u ${DOCKERHUB_USER} -p ${DOCKERHUB_PASSWORD}
23+
- npm i -g @crazyfactory/docker-project-cli
1824

1925
install:
20-
- git clone --depth=1 -q --branch=$PHALCON_VERSION https://github.com/phalcon/cphalcon.git
21-
- cd cphalcon/build; bash install &>/dev/null && phpenv config-add ../tests/_ci/phalcon.ini &> /dev/null && cd ../..
22-
- php --ri phalcon
23-
- composer selfupdate
24-
- travis_retry composer install --prefer-dist
26+
- dopr pull && dopr up -d
27+
- dopr composer install
28+
- scripts/ci-install.sh
2529

2630
script:
27-
- vendor/bin/phpunit
31+
- dopr test
32+
33+
deploy:
34+
provider: script
35+
script: scripts/deploy.sh
36+
skip_cleanup: false
37+
on:
38+
tags: true

composer.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,21 @@
2121
"psr-4": { "CrazyFactory\\PhalconLogger\\Test\\": "tests/" }
2222
},
2323
"suggest": {
24-
"sentry/sentry": "To be able to use the Sentry logging."
24+
"sentry/sentry": "To be able to use the Sentry logging.",
25+
"crazyfactory/slack": "To be able to use Slack logging."
2526
},
2627
"require": {
2728
"php": ">=7.0",
28-
"ext-phalcon": "^3.0"
29+
"ext-phalcon": "^3.0",
30+
"ext-json": "*"
2931
},
3032
"require-dev": {
31-
"sentry/sentry": "^1.6.2",
3233
"phpunit/phpunit": "^5.7.0",
33-
"mockery/mockery": "@stable"
34+
"sentry/sentry": "^2.2",
35+
"crazyfactory/slack": "^2.0.0",
36+
"php-http/guzzle6-adapter": "^2.0",
37+
"mockery/mockery": "@stable",
38+
"phalcon/ide-stubs": "^3.4"
3439
},
3540
"config": {
3641
"optimize-autoloader": true,

docker-project.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"file": [
3+
"./docker/docker-compose.yml",
4+
"./docker/docker-compose.local.yml"
5+
],
6+
"service": "phalcon-loggers-php-fpm",
7+
"actions": {
8+
"bash": {
9+
"service": "@host",
10+
"command": "docker exec -it --user root phalcon-loggers-php-fpm sh"
11+
},
12+
"test": {
13+
"command": "vendor/bin/phpunit %args%"
14+
}
15+
}
16+
}

docker/docker-compose.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: '3'
2+
3+
services:
4+
phalcon-loggers-php-fpm:
5+
image: crazyfactory/shopapi-php-fpm:7.3-dev
6+
container_name: phalcon-loggers-php-fpm
7+
volumes:
8+
- ../:/var/www/project
9+
- ./php-fpm/php-ini-overrides.ini:/usr/local/etc/php/conf.d/z-overrides.ini
10+
- ../.composer:/root/composer
11+
environment:
12+
COMPOSER_ALLOW_SUPERUSER: 1
13+
COMPOSER_HOME: /root/composer
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
upload_max_filesize = 100M
2+
post_max_size = 108M
3+
expose_php = Off
4+
5+
display_errors = on
6+
error_reporting = E_ALL
7+
display_startup_errors = on
8+
log_errors = On
9+
10+
; xdebug
11+
xdebug.remote_enable = 1
12+
xdebug.remote_port = 9000
13+
xdebug.remote_handler = "dbgp"
14+
xdebug.remote_connect_back = 0
15+
xdebug.cli_color = 1
16+
xdebug.idekey = "PHPSTORM"

examples/console.php

Lines changed: 0 additions & 24 deletions
This file was deleted.

examples/default.php

Lines changed: 0 additions & 63 deletions
This file was deleted.

examples/micro.php

Lines changed: 0 additions & 101 deletions
This file was deleted.

0 commit comments

Comments
 (0)