Browse Source

send exceptions to errbit

main
Aaron Parecki 8 years ago
parent
commit
e6235846dc
4 changed files with 161 additions and 30 deletions
  1. +2
    -1
      composer.json
  2. +143
    -29
      composer.lock
  3. +3
    -0
      config.template.php
  4. +13
    -0
      public/index.php

+ 2
- 1
composer.json View File

@ -13,7 +13,8 @@
"predis/predis": "1.*", "predis/predis": "1.*",
"michelf/php-markdown": "1.6.*", "michelf/php-markdown": "1.6.*",
"camspiers/json-pretty": "1.0.*", "camspiers/json-pretty": "1.0.*",
"monolog/monolog": "1.*"
"monolog/monolog": "1.*",
"emgiezet/errbit-php": "1.1.*"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "*" "phpunit/phpunit": "*"

+ 143
- 29
composer.lock View File

@ -4,8 +4,8 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"hash": "80253bee3fec80ece5c62e69419ed6da",
"content-hash": "033f44c5ec88a9c53103e9a38e3f78c3",
"hash": "3d6f1de70635267d75ea090ffbb4e6a7",
"content-hash": "a14b6b6853bab479528698c9e03944c1",
"packages": [ "packages": [
{ {
"name": "barnabywalters/mf-cleaner", "name": "barnabywalters/mf-cleaner",
@ -83,6 +83,72 @@
"description": "Provides support for json pretty printing", "description": "Provides support for json pretty printing",
"time": "2015-09-17 16:05:48" "time": "2015-09-17 16:05:48"
}, },
{
"name": "emgiezet/errbit-php",
"version": "1.1.0",
"source": {
"type": "git",
"url": "https://github.com/emgiezet/errbitPHP.git",
"reference": "c233c262d359a4890163423bfe8d4488f3fd33b2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/emgiezet/errbitPHP/zipball/c233c262d359a4890163423bfe8d4488f3fd33b2",
"reference": "c233c262d359a4890163423bfe8d4488f3fd33b2",
"shasum": ""
},
"require": {
"php": ">=5.3.2"
},
"replace": {
"flippa-official/errbit-php": "dev-master",
"nodrew/php-airbrake": "dev-master"
},
"require-dev": {
"mockery/mockery": "0.9.4",
"phpunit/phpcov": "2.0.*@dev",
"phpunit/phpunit": "4.*",
"satooshi/php-coveralls": "dev-master"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-0": {
"Errbit\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "emgiezet"
},
{
"name": "flippa"
},
{
"name": "karolsojko"
},
{
"name": "deathowl"
}
],
"description": "errbit/airbrake integration with php with psr-2",
"homepage": "http://github.com/emgiezet/errbitPHP",
"keywords": [
"airbrake",
"errbit",
"errbit php",
"error tracking"
],
"time": "2015-11-04 14:49:04"
},
{ {
"name": "firebase/php-jwt", "name": "firebase/php-jwt",
"version": "v3.0.0", "version": "v3.0.0",
@ -128,16 +194,16 @@
}, },
{ {
"name": "indieauth/client", "name": "indieauth/client",
"version": "0.1.11",
"version": "0.1.13",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/indieweb/indieauth-client-php.git", "url": "https://github.com/indieweb/indieauth-client-php.git",
"reference": "6504ed0d4714084e9955f639d6e5cf4e976f9038"
"reference": "d438bb03db15b4ccc6c63228be16de7870b6ab99"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/indieweb/indieauth-client-php/zipball/6504ed0d4714084e9955f639d6e5cf4e976f9038",
"reference": "6504ed0d4714084e9955f639d6e5cf4e976f9038",
"url": "https://api.github.com/repos/indieweb/indieauth-client-php/zipball/d438bb03db15b4ccc6c63228be16de7870b6ab99",
"reference": "d438bb03db15b4ccc6c63228be16de7870b6ab99",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -163,7 +229,7 @@
} }
], ],
"description": "IndieAuth Client Library", "description": "IndieAuth Client Library",
"time": "2015-08-30 22:29:40"
"time": "2016-02-08 23:56:31"
}, },
{ {
"name": "indieweb/link-rel-parser", "name": "indieweb/link-rel-parser",
@ -1282,22 +1348,24 @@
}, },
{ {
"name": "phpspec/prophecy", "name": "phpspec/prophecy",
"version": "v1.5.0",
"version": "v1.6.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpspec/prophecy.git", "url": "https://github.com/phpspec/prophecy.git",
"reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7"
"reference": "3c91bdf81797d725b14cb62906f9a4ce44235972"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/4745ded9307786b730d7a60df5cb5a6c43cf95f7",
"reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7",
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/3c91bdf81797d725b14cb62906f9a4ce44235972",
"reference": "3c91bdf81797d725b14cb62906f9a4ce44235972",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"doctrine/instantiator": "^1.0.2", "doctrine/instantiator": "^1.0.2",
"php": "^5.3|^7.0",
"phpdocumentor/reflection-docblock": "~2.0", "phpdocumentor/reflection-docblock": "~2.0",
"sebastian/comparator": "~1.1"
"sebastian/comparator": "~1.1",
"sebastian/recursion-context": "~1.0"
}, },
"require-dev": { "require-dev": {
"phpspec/phpspec": "~2.0" "phpspec/phpspec": "~2.0"
@ -1305,7 +1373,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.4.x-dev"
"dev-master": "1.5.x-dev"
} }
}, },
"autoload": { "autoload": {
@ -1338,27 +1406,28 @@
"spy", "spy",
"stub" "stub"
], ],
"time": "2015-08-13 10:07:40"
"time": "2016-02-15 07:46:21"
}, },
{ {
"name": "phpunit/php-code-coverage", "name": "phpunit/php-code-coverage",
"version": "3.1.1",
"version": "3.2.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "92f5c61b5c64159faec5298325ffab0c7e59dcc8"
"reference": "a58f95ae76fe201b571fad3e8370a50c4368678c"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/92f5c61b5c64159faec5298325ffab0c7e59dcc8",
"reference": "92f5c61b5c64159faec5298325ffab0c7e59dcc8",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/a58f95ae76fe201b571fad3e8370a50c4368678c",
"reference": "a58f95ae76fe201b571fad3e8370a50c4368678c",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.6",
"php": "^5.6 || ^7.0",
"phpunit/php-file-iterator": "~1.3", "phpunit/php-file-iterator": "~1.3",
"phpunit/php-text-template": "~1.2", "phpunit/php-text-template": "~1.2",
"phpunit/php-token-stream": "~1.3",
"phpunit/php-token-stream": "^1.4.2",
"sebastian/code-unit-reverse-lookup": "~1.0",
"sebastian/environment": "^1.3.2", "sebastian/environment": "^1.3.2",
"sebastian/version": "~1.0|~2.0" "sebastian/version": "~1.0|~2.0"
}, },
@ -1374,7 +1443,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "3.1.x-dev"
"dev-master": "3.2.x-dev"
} }
}, },
"autoload": { "autoload": {
@ -1400,7 +1469,7 @@
"testing", "testing",
"xunit" "xunit"
], ],
"time": "2016-02-04 13:05:19"
"time": "2016-02-18 07:31:12"
}, },
{ {
"name": "phpunit/php-file-iterator", "name": "phpunit/php-file-iterator",
@ -1582,16 +1651,16 @@
}, },
{ {
"name": "phpunit/phpunit", "name": "phpunit/phpunit",
"version": "5.2.1",
"version": "5.2.9",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git", "url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "40d32454fdad8a08ded0a2aafbc6d0e8f06a6b04"
"reference": "b12b9c37e382c096b93c3f26e7395775f59a5eea"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/40d32454fdad8a08ded0a2aafbc6d0e8f06a6b04",
"reference": "40d32454fdad8a08ded0a2aafbc6d0e8f06a6b04",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b12b9c37e382c096b93c3f26e7395775f59a5eea",
"reference": "b12b9c37e382c096b93c3f26e7395775f59a5eea",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1601,9 +1670,9 @@
"ext-reflection": "*", "ext-reflection": "*",
"ext-spl": "*", "ext-spl": "*",
"myclabs/deep-copy": "~1.3", "myclabs/deep-copy": "~1.3",
"php": ">=5.6",
"php": "^5.6 || ^7.0",
"phpspec/prophecy": "^1.3.1", "phpspec/prophecy": "^1.3.1",
"phpunit/php-code-coverage": "~3.1",
"phpunit/php-code-coverage": "^3.2.1",
"phpunit/php-file-iterator": "~1.4", "phpunit/php-file-iterator": "~1.4",
"phpunit/php-text-template": "~1.2", "phpunit/php-text-template": "~1.2",
"phpunit/php-timer": ">=1.0.6", "phpunit/php-timer": ">=1.0.6",
@ -1652,7 +1721,7 @@
"testing", "testing",
"xunit" "xunit"
], ],
"time": "2016-02-05 17:50:46"
"time": "2016-02-19 11:43:07"
}, },
{ {
"name": "phpunit/phpunit-mock-objects", "name": "phpunit/phpunit-mock-objects",
@ -1710,6 +1779,51 @@
], ],
"time": "2015-12-08 08:47:06" "time": "2015-12-08 08:47:06"
}, },
{
"name": "sebastian/code-unit-reverse-lookup",
"version": "1.0.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
"reference": "c36f5e7cfce482fde5bf8d10d41a53591e0198fe"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/c36f5e7cfce482fde5bf8d10d41a53591e0198fe",
"reference": "c36f5e7cfce482fde5bf8d10d41a53591e0198fe",
"shasum": ""
},
"require": {
"php": ">=5.6"
},
"require-dev": {
"phpunit/phpunit": "~5"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
}
],
"description": "Looks up which function or method a line of code belongs to",
"homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
"time": "2016-02-13 06:45:14"
},
{ {
"name": "sebastian/comparator", "name": "sebastian/comparator",
"version": "1.2.0", "version": "1.2.0",

+ 3
- 0
config.template.php View File

@ -8,6 +8,9 @@ class Config {
public static $clientID = 'http://telegraph.dev/'; public static $clientID = 'http://telegraph.dev/';
public static $defaultAuthorizationEndpoint = 'https://indieauth.com/auth'; public static $defaultAuthorizationEndpoint = 'https://indieauth.com/auth';
public static $errbitKey = '';
public static $errbitHost = '';
public static $db = [ public static $db = [
'host' => '127.0.0.1', 'host' => '127.0.0.1',
'database' => 'telegraph', 'database' => 'telegraph',

+ 13
- 0
public/index.php View File

@ -2,6 +2,19 @@
chdir('..'); chdir('..');
include('vendor/autoload.php'); include('vendor/autoload.php');
use Errbit\Errbit;
if(Config::$errbitHost) {
Errbit::instance()
->configure(array(
'api_key' => Config::$errbitKey,
'host' => Config::$errbitHost,
'port' => 443,
'secure' => true
))
->start();
}
initdb(); initdb();
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;

Loading…
Cancel
Save