Add some debug info to bunq and update the composer file [skip ci]

This commit is contained in:
James Cole 2018-12-20 23:06:47 +01:00
parent b6c23b8eb3
commit cd47b45fce
2 changed files with 72 additions and 62 deletions

View File

@ -141,11 +141,19 @@ class StageImportDataHandler
private function convertPayment(BunqPayment $payment, int $bunqAccountId, LocalAccount $source): array private function convertPayment(BunqPayment $payment, int $bunqAccountId, LocalAccount $source): array
{ {
Log::debug(sprintf('Now at payment with ID #%d', $payment->getId())); Log::debug(sprintf('Now at payment with ID #%d', $payment->getId()));
Log::debug(sprintf('Object dump: %s', print_r($payment, true)));
$type = TransactionType::WITHDRAWAL; $type = TransactionType::WITHDRAWAL;
$counterParty = $payment->getCounterpartyAlias(); $counterParty = $payment->getCounterpartyAlias();
$amount = $payment->getAmount(); $amount = $payment->getAmount();
$paymentId = $payment->getId(); $paymentId = $payment->getId();
// is there meta data to indicate this is a saving or something?
Log::debug(sprintf('Subtype is %s', $payment->getSubType()));
Log::debug(sprintf('Amount is %s %s', $amount->getCurrency(), $amount->getValue())); Log::debug(sprintf('Amount is %s %s', $amount->getCurrency(), $amount->getValue()));
$expected = AccountType::EXPENSE; $expected = AccountType::EXPENSE;
if (1 === bccomp($amount->getValue(), '0')) { if (1 === bccomp($amount->getValue(), '0')) {
@ -171,6 +179,7 @@ class StageImportDataHandler
'user' => $this->importJob->user_id, 'user' => $this->importJob->user_id,
'type' => $type, 'type' => $type,
'date' => $created->format('Y-m-d'), 'date' => $created->format('Y-m-d'),
'timestamp' => $created->toAtomString(),
'description' => $payment->getDescription(), 'description' => $payment->getDescription(),
'piggy_bank_id' => null, 'piggy_bank_id' => null,
'piggy_bank_name' => null, 'piggy_bank_name' => null,

125
composer.lock generated
View File

@ -591,16 +591,16 @@
}, },
{ {
"name": "doctrine/dbal", "name": "doctrine/dbal",
"version": "v2.9.0", "version": "v2.9.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/doctrine/dbal.git", "url": "https://github.com/doctrine/dbal.git",
"reference": "21fdabe2fc01e004e1966f200d900554876bc63c" "reference": "ec74d6e300d78fbc896669c3ca57ef9719adc9c6"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/doctrine/dbal/zipball/21fdabe2fc01e004e1966f200d900554876bc63c", "url": "https://api.github.com/repos/doctrine/dbal/zipball/ec74d6e300d78fbc896669c3ca57ef9719adc9c6",
"reference": "21fdabe2fc01e004e1966f200d900554876bc63c", "reference": "ec74d6e300d78fbc896669c3ca57ef9719adc9c6",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -669,7 +669,7 @@
"php", "php",
"queryobject" "queryobject"
], ],
"time": "2018-12-04T04:39:48+00:00" "time": "2018-12-14T04:51:13+00:00"
}, },
{ {
"name": "doctrine/event-manager", "name": "doctrine/event-manager",
@ -1303,16 +1303,16 @@
}, },
{ {
"name": "laravel/framework", "name": "laravel/framework",
"version": "v5.7.16", "version": "v5.7.19",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/laravel/framework.git", "url": "https://github.com/laravel/framework.git",
"reference": "9acea9e0a356cba7e6a13f8784d5532a82fee92a" "reference": "5c1d1ec7e8563ea31826fd5eb3f6791acf01160c"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/9acea9e0a356cba7e6a13f8784d5532a82fee92a", "url": "https://api.github.com/repos/laravel/framework/zipball/5c1d1ec7e8563ea31826fd5eb3f6791acf01160c",
"reference": "9acea9e0a356cba7e6a13f8784d5532a82fee92a", "reference": "5c1d1ec7e8563ea31826fd5eb3f6791acf01160c",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1445,7 +1445,7 @@
"framework", "framework",
"laravel" "laravel"
], ],
"time": "2018-12-05T14:36:24+00:00" "time": "2018-12-18T14:00:38+00:00"
}, },
{ {
"name": "laravel/nexmo-notification-channel", "name": "laravel/nexmo-notification-channel",
@ -1575,16 +1575,16 @@
}, },
{ {
"name": "laravel/slack-notification-channel", "name": "laravel/slack-notification-channel",
"version": "v1.0.2", "version": "v1.0.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/laravel/slack-notification-channel.git", "url": "https://github.com/laravel/slack-notification-channel.git",
"reference": "0ede60acbbf5f91be2e45d0c0b4d95e2f3837252" "reference": "6e164293b754a95f246faf50ab2bbea3e4923cc9"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/laravel/slack-notification-channel/zipball/0ede60acbbf5f91be2e45d0c0b4d95e2f3837252", "url": "https://api.github.com/repos/laravel/slack-notification-channel/zipball/6e164293b754a95f246faf50ab2bbea3e4923cc9",
"reference": "0ede60acbbf5f91be2e45d0c0b4d95e2f3837252", "reference": "6e164293b754a95f246faf50ab2bbea3e4923cc9",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1628,7 +1628,7 @@
"notifications", "notifications",
"slack" "slack"
], ],
"time": "2018-12-04T12:58:59+00:00" "time": "2018-12-12T13:12:06+00:00"
}, },
{ {
"name": "laravelcollective/html", "name": "laravelcollective/html",
@ -1746,7 +1746,7 @@
{ {
"name": "Luís Otávio Cobucci Oblonczyk", "name": "Luís Otávio Cobucci Oblonczyk",
"email": "lcobucci@gmail.com", "email": "lcobucci@gmail.com",
"role": "Developer" "role": "developer"
} }
], ],
"description": "A simple library to work with JSON Web Token and JSON Web Signature", "description": "A simple library to work with JSON Web Token and JSON Web Signature",
@ -2469,16 +2469,16 @@
}, },
{ {
"name": "nexmo/client", "name": "nexmo/client",
"version": "1.5.2", "version": "1.6.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/Nexmo/nexmo-php.git", "url": "https://github.com/Nexmo/nexmo-php.git",
"reference": "f192c84ec3cc3e2657fc754e0da1a17e39ac5542" "reference": "01809cc1e17a5af275913c49bb5d444eb6cc06d4"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/Nexmo/nexmo-php/zipball/f192c84ec3cc3e2657fc754e0da1a17e39ac5542", "url": "https://api.github.com/repos/Nexmo/nexmo-php/zipball/01809cc1e17a5af275913c49bb5d444eb6cc06d4",
"reference": "f192c84ec3cc3e2657fc754e0da1a17e39ac5542", "reference": "01809cc1e17a5af275913c49bb5d444eb6cc06d4",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2513,20 +2513,20 @@
} }
], ],
"description": "PHP Client for using Nexmo's API.", "description": "PHP Client for using Nexmo's API.",
"time": "2018-11-14T14:12:22+00:00" "time": "2018-12-17T10:47:50+00:00"
}, },
{ {
"name": "opis/closure", "name": "opis/closure",
"version": "3.1.1", "version": "3.1.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/opis/closure.git", "url": "https://github.com/opis/closure.git",
"reference": "d3209e46ad6c69a969b705df0738fd0dbe26ef9e" "reference": "de00c69a2328d3ee5baa71fc584dc643222a574c"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/opis/closure/zipball/d3209e46ad6c69a969b705df0738fd0dbe26ef9e", "url": "https://api.github.com/repos/opis/closure/zipball/de00c69a2328d3ee5baa71fc584dc643222a574c",
"reference": "d3209e46ad6c69a969b705df0738fd0dbe26ef9e", "reference": "de00c69a2328d3ee5baa71fc584dc643222a574c",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2534,7 +2534,7 @@
}, },
"require-dev": { "require-dev": {
"jeremeamia/superclosure": "^2.0", "jeremeamia/superclosure": "^2.0",
"phpunit/phpunit": "^4.0" "phpunit/phpunit": "^4.0|^5.0|^6.0|^7.0"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
@ -2574,7 +2574,7 @@
"serialization", "serialization",
"serialize" "serialize"
], ],
"time": "2018-10-02T13:36:53+00:00" "time": "2018-12-16T21:48:23+00:00"
}, },
{ {
"name": "paragonie/constant_time_encoding", "name": "paragonie/constant_time_encoding",
@ -2851,16 +2851,16 @@
}, },
{ {
"name": "phpseclib/phpseclib", "name": "phpseclib/phpseclib",
"version": "2.0.12", "version": "2.0.13",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpseclib/phpseclib.git", "url": "https://github.com/phpseclib/phpseclib.git",
"reference": "8814dc7841db159daed0b32c2b08fb7e03c6afe7" "reference": "42603ce3f42a27f7e14e54feab95db7b680ad473"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/8814dc7841db159daed0b32c2b08fb7e03c6afe7", "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/42603ce3f42a27f7e14e54feab95db7b680ad473",
"reference": "8814dc7841db159daed0b32c2b08fb7e03c6afe7", "reference": "42603ce3f42a27f7e14e54feab95db7b680ad473",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2939,7 +2939,7 @@
"x.509", "x.509",
"x509" "x509"
], ],
"time": "2018-11-04T05:45:48+00:00" "time": "2018-12-16T17:45:25+00:00"
}, },
{ {
"name": "pragmarx/google2fa", "name": "pragmarx/google2fa",
@ -4686,16 +4686,16 @@
}, },
{ {
"name": "twig/twig", "name": "twig/twig",
"version": "v1.35.4", "version": "v1.36.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/twigphp/Twig.git", "url": "https://github.com/twigphp/Twig.git",
"reference": "7e081e98378a1e78c29cc9eba4aefa5d78a05d2a" "reference": "730c9c4471b5152d23061feb02b03382264c8a15"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/7e081e98378a1e78c29cc9eba4aefa5d78a05d2a", "url": "https://api.github.com/repos/twigphp/Twig/zipball/730c9c4471b5152d23061feb02b03382264c8a15",
"reference": "7e081e98378a1e78c29cc9eba4aefa5d78a05d2a", "reference": "730c9c4471b5152d23061feb02b03382264c8a15",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -4705,12 +4705,12 @@
"require-dev": { "require-dev": {
"psr/container": "^1.0", "psr/container": "^1.0",
"symfony/debug": "^2.7", "symfony/debug": "^2.7",
"symfony/phpunit-bridge": "^3.3" "symfony/phpunit-bridge": "^3.4.19|^4.1.8"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.35-dev" "dev-master": "1.36-dev"
} }
}, },
"autoload": { "autoload": {
@ -4748,7 +4748,7 @@
"keywords": [ "keywords": [
"templating" "templating"
], ],
"time": "2018-07-13T07:12:17+00:00" "time": "2018-12-16T10:34:11+00:00"
}, },
{ {
"name": "vlucas/phpdotenv", "name": "vlucas/phpdotenv",
@ -4868,20 +4868,20 @@
"packages-dev": [ "packages-dev": [
{ {
"name": "barryvdh/laravel-ide-helper", "name": "barryvdh/laravel-ide-helper",
"version": "v2.5.2", "version": "v2.5.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/barryvdh/laravel-ide-helper.git", "url": "https://github.com/barryvdh/laravel-ide-helper.git",
"reference": "981ff45b43e0cf808af0a5a5f40f6369e0e29499" "reference": "3d7f1240896a075aa23b13f82dfcbe165dadeef2"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/barryvdh/laravel-ide-helper/zipball/981ff45b43e0cf808af0a5a5f40f6369e0e29499", "url": "https://api.github.com/repos/barryvdh/laravel-ide-helper/zipball/3d7f1240896a075aa23b13f82dfcbe165dadeef2",
"reference": "981ff45b43e0cf808af0a5a5f40f6369e0e29499", "reference": "3d7f1240896a075aa23b13f82dfcbe165dadeef2",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"barryvdh/reflection-docblock": "^2.0.4", "barryvdh/reflection-docblock": "^2.0.6",
"composer/composer": "^1.6", "composer/composer": "^1.6",
"illuminate/console": "^5.5,<5.8", "illuminate/console": "^5.5,<5.8",
"illuminate/filesystem": "^5.5,<5.8", "illuminate/filesystem": "^5.5,<5.8",
@ -4938,20 +4938,20 @@
"phpstorm", "phpstorm",
"sublime" "sublime"
], ],
"time": "2018-10-06T09:35:51+00:00" "time": "2018-12-19T12:12:05+00:00"
}, },
{ {
"name": "barryvdh/reflection-docblock", "name": "barryvdh/reflection-docblock",
"version": "v2.0.5", "version": "v2.0.6",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/barryvdh/ReflectionDocBlock.git", "url": "https://github.com/barryvdh/ReflectionDocBlock.git",
"reference": "64165bd4ba9a550d11ea57569463b7c722dc6b0a" "reference": "6b69015d83d3daf9004a71a89f26e27d27ef6a16"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/barryvdh/ReflectionDocBlock/zipball/64165bd4ba9a550d11ea57569463b7c722dc6b0a", "url": "https://api.github.com/repos/barryvdh/ReflectionDocBlock/zipball/6b69015d83d3daf9004a71a89f26e27d27ef6a16",
"reference": "64165bd4ba9a550d11ea57569463b7c722dc6b0a", "reference": "6b69015d83d3daf9004a71a89f26e27d27ef6a16",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -4987,7 +4987,7 @@
"email": "mike.vanriel@naenius.com" "email": "mike.vanriel@naenius.com"
} }
], ],
"time": "2018-10-25T19:09:52+00:00" "time": "2018-12-13T10:34:14+00:00"
}, },
{ {
"name": "composer/ca-bundle", "name": "composer/ca-bundle",
@ -6386,16 +6386,16 @@
}, },
{ {
"name": "phpunit/phpunit", "name": "phpunit/phpunit",
"version": "7.5.0", "version": "7.5.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git", "url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "520723129e2b3fc1dc4c0953e43c9d40e1ecb352" "reference": "c23d78776ad415d5506e0679723cb461d71f488f"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/520723129e2b3fc1dc4c0953e43c9d40e1ecb352", "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c23d78776ad415d5506e0679723cb461d71f488f",
"reference": "520723129e2b3fc1dc4c0953e43c9d40e1ecb352", "reference": "c23d78776ad415d5506e0679723cb461d71f488f",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -6466,7 +6466,7 @@
"testing", "testing",
"xunit" "xunit"
], ],
"time": "2018-12-07T07:08:12+00:00" "time": "2018-12-12T07:20:32+00:00"
}, },
{ {
"name": "roave/security-advisories", "name": "roave/security-advisories",
@ -6474,12 +6474,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/Roave/SecurityAdvisories.git", "url": "https://github.com/Roave/SecurityAdvisories.git",
"reference": "1ce3116aa589688c340d408bb8dedb3cc8e392ff" "reference": "3557820049b07ea0fd088e4151ec200f474b58de"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/1ce3116aa589688c340d408bb8dedb3cc8e392ff", "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/3557820049b07ea0fd088e4151ec200f474b58de",
"reference": "1ce3116aa589688c340d408bb8dedb3cc8e392ff", "reference": "3557820049b07ea0fd088e4151ec200f474b58de",
"shasum": "" "shasum": ""
}, },
"conflict": { "conflict": {
@ -6610,15 +6610,16 @@
"symfony/yaml": ">=2,<2.0.22|>=2.1,<2.1.7", "symfony/yaml": ">=2,<2.0.22|>=2.1,<2.1.7",
"tecnickcom/tcpdf": "<6.2.22", "tecnickcom/tcpdf": "<6.2.22",
"thelia/backoffice-default-template": ">=2.1,<2.1.2", "thelia/backoffice-default-template": ">=2.1,<2.1.2",
"thelia/thelia": ">=2.1.0-beta1,<2.1.3|>=2.1,<2.1.2", "thelia/thelia": ">=2.1,<2.1.2|>=2.1.0-beta1,<2.1.3",
"theonedemon/phpwhois": "<=4.2.5", "theonedemon/phpwhois": "<=4.2.5",
"titon/framework": ">=0,<9.9.99", "titon/framework": ">=0,<9.9.99",
"truckersmp/phpwhois": "<=4.3.1", "truckersmp/phpwhois": "<=4.3.1",
"twig/twig": "<1.20", "twig/twig": "<1.20",
"typo3/cms": ">=6.2,<6.2.30|>=7,<7.6.30|>=8,<8.7.17|>=9,<9.3.2", "typo3/cms": ">=6.2,<6.2.30|>=7,<7.6.32|>=8,<8.7.21|>=9,<9.5.2",
"typo3/cms-core": ">=8,<8.7.17|>=9,<9.3.2", "typo3/cms-core": ">=8,<8.7.21|>=9,<9.5.2",
"typo3/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.10|>=3.1,<3.1.7|>=3.2,<3.2.7|>=3.3,<3.3.5", "typo3/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.10|>=3.1,<3.1.7|>=3.2,<3.2.7|>=3.3,<3.3.5",
"typo3/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4", "typo3/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4",
"ua-parser/uap-php": "<3.8",
"wallabag/tcpdf": "<6.2.22", "wallabag/tcpdf": "<6.2.22",
"willdurand/js-translation-bundle": "<2.1.1", "willdurand/js-translation-bundle": "<2.1.1",
"yiisoft/yii": ">=1.1.14,<1.1.15", "yiisoft/yii": ">=1.1.14,<1.1.15",
@ -6667,7 +6668,7 @@
} }
], ],
"description": "Prevents installation of composer packages with known security vulnerabilities: no API, simply require it", "description": "Prevents installation of composer packages with known security vulnerabilities: no API, simply require it",
"time": "2018-12-10T15:00:47+00:00" "time": "2018-12-14T13:12:19+00:00"
}, },
{ {
"name": "sebastian/code-unit-reverse-lookup", "name": "sebastian/code-unit-reverse-lookup",