diff --git a/composer.json b/composer.json index 8360ee9..5fd7b2d 100644 --- a/composer.json +++ b/composer.json @@ -6,14 +6,14 @@ "license": "MIT", "require": { "php": ">=5.6", - "cakephp/cakephp": "^3.6", + "cakephp/cakephp": "3.4.*", "mobiledetect/mobiledetectlib": "2.*", "cakephp/migrations": "~1.0", "cakephp/plugin-installer": "~1.0", "mdanter/ecc": "^0.5.0", "nesbot/carbon": "~1.18", - "endroid/qrcode": "^2.2.2", - "predis/predis": "^1.1.1" + "predis/predis": "^1.1.1", + "endroid/qr-code": "^3.5" }, "require-dev": { "psy/psysh": "@stable", diff --git a/composer.lock b/composer.lock index 5ed47a4..911fd35 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "d6441e245d73b6c3db3a627313143bff", + "content-hash": "e64d13561bc0e6896ed8629290b55669", "packages": [ { "name": "aura/intl", @@ -54,32 +54,35 @@ }, { "name": "bacon/bacon-qr-code", - "version": "1.0.3", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/Bacon/BaconQrCode.git", - "reference": "5a91b62b9d37cee635bbf8d553f4546057250bee" + "reference": "eaac909da3ccc32b748a65b127acd8918f58d9b0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Bacon/BaconQrCode/zipball/5a91b62b9d37cee635bbf8d553f4546057250bee", - "reference": "5a91b62b9d37cee635bbf8d553f4546057250bee", + "url": "https://api.github.com/repos/Bacon/BaconQrCode/zipball/eaac909da3ccc32b748a65b127acd8918f58d9b0", + "reference": "eaac909da3ccc32b748a65b127acd8918f58d9b0", "shasum": "" }, "require": { + "dasprid/enum": "^1.0", "ext-iconv": "*", - "php": "^5.4|^7.0" + "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "^4.8" + "phly/keep-a-changelog": "^1.4", + "phpunit/phpunit": "^6.4", + "squizlabs/php_codesniffer": "^3.1" }, "suggest": { - "ext-gd": "to generate QR code images" + "ext-imagick": "to generate QR code images" }, "type": "library", "autoload": { - "psr-0": { - "BaconQrCode": "src/" + "psr-4": { + "BaconQrCode\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -114,7 +117,7 @@ }, "require": { "aura/intl": "^3.0.0", - "cakephp/chronos": "^1.0.1", + "cakephp/chronos": "^1.0.0", "ext-intl": "*", "ext-mbstring": "*", "php": ">=5.6.0", @@ -142,7 +145,7 @@ }, "require-dev": { "cakephp/cakephp-codesniffer": "^3.0", - "phpunit/phpunit": "^5.7.14|^6.0" + "phpunit/phpunit": "^5.7|^6.0" }, "suggest": { "ext-curl": "To enable more efficient network calls in Http\\Client.", @@ -152,7 +155,7 @@ "type": "library", "autoload": { "psr-4": { - "Cake\\": "src/" + "Cake\\": "src" }, "files": [ "src/Core/functions.php", @@ -184,7 +187,7 @@ "rapid-development", "validation" ], - "time": "2018-12-18T02:39:37+00:00" + "time": "2018-05-21T01:19:34+00:00" }, { "name": "cakephp/chronos", @@ -245,29 +248,29 @@ }, { "name": "cakephp/migrations", - "version": "1.8.1", + "version": "1.7.2", "source": { "type": "git", "url": "https://github.com/cakephp/migrations.git", - "reference": "cd65daa9fae933bc0ccc69d5b5d92460375da9e2" + "reference": "a5612adfd2efa8c90d29cb3b0c969de872a99eda" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cakephp/migrations/zipball/cd65daa9fae933bc0ccc69d5b5d92460375da9e2", - "reference": "cd65daa9fae933bc0ccc69d5b5d92460375da9e2", + "url": "https://api.github.com/repos/cakephp/migrations/zipball/a5612adfd2efa8c90d29cb3b0c969de872a99eda", + "reference": "a5612adfd2efa8c90d29cb3b0c969de872a99eda", "shasum": "" }, "require": { - "cakephp/cache": "^3.6.0", - "cakephp/orm": "^3.6.0", - "php": ">=5.6.0", + "cakephp/cache": "~3.2", + "cakephp/orm": "~3.2", + "php": ">=5.5.9", "robmorgan/phinx": "0.8.1" }, "require-dev": { - "cakephp/bake": "^1.7.0", - "cakephp/cakephp": "^3.6.0", + "cakephp/bake": "@stable", + "cakephp/cakephp": "~3.2", "cakephp/cakephp-codesniffer": "^3.0", - "phpunit/phpunit": "^5.7.14" + "phpunit/phpunit": "~4.1" }, "suggest": { "cakephp/bake": "Required if you want to generate migrations." @@ -294,7 +297,7 @@ "cakephp", "migrations" ], - "time": "2018-04-16T01:35:59+00:00" + "time": "2017-12-12T21:01:38+00:00" }, { "name": "cakephp/plugin-installer", @@ -338,43 +341,123 @@ "time": "2017-12-24T21:09:29+00:00" }, { - "name": "endroid/qrcode", - "version": "2.5.1", + "name": "dasprid/enum", + "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/endroid/qr-code.git", - "reference": "6062677d3404e0ded40647b8f62ec55ff9722eb7" + "url": "https://github.com/DASPRiD/Enum.git", + "reference": "631ef6e638e9494b0310837fa531bedd908fc22b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/endroid/qr-code/zipball/6062677d3404e0ded40647b8f62ec55ff9722eb7", - "reference": "6062677d3404e0ded40647b8f62ec55ff9722eb7", + "url": "https://api.github.com/repos/DASPRiD/Enum/zipball/631ef6e638e9494b0310837fa531bedd908fc22b", + "reference": "631ef6e638e9494b0310837fa531bedd908fc22b", + "shasum": "" + }, + "require-dev": { + "phpunit/phpunit": "^6.4", + "squizlabs/php_codesniffer": "^3.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "DASPRiD\\Enum\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Ben Scholzen 'DASPRiD'", + "email": "mail@dasprids.de", + "homepage": "https://dasprids.de/" + } + ], + "description": "PHP 7.1 enum implementation", + "keywords": [ + "enum", + "map" + ], + "time": "2017-10-25T22:45:27+00:00" + }, + { + "name": "endroid/installer", + "version": "1.0.8", + "source": { + "type": "git", + "url": "https://github.com/endroid/installer.git", + "reference": "b41b44ae2e410609be3b7f080b626dfc9ff4822a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/endroid/installer/zipball/b41b44ae2e410609be3b7f080b626dfc9ff4822a", + "reference": "b41b44ae2e410609be3b7f080b626dfc9ff4822a", "shasum": "" }, "require": { - "bacon/bacon-qr-code": "^1.0.3", - "ext-gd": "*", - "khanamiryan/qrcode-detector-decoder": "1", - "myclabs/php-enum": "^1.5", - "php": ">=5.6", - "symfony/options-resolver": "^2.7", - "symfony/property-access": "^2.7" + "composer-plugin-api": "^1.1", + "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "^5.7", - "symfony/asset": "^2.7", - "symfony/browser-kit": "^2.7", - "symfony/finder": "^2.7", - "symfony/framework-bundle": "^2.7", - "symfony/http-kernel": "^2.7", - "symfony/templating": "^2.7", - "symfony/twig-bundle": "^2.7", - "symfony/yaml": "^2.7" + "phpunit/phpunit": "^5.7|^6.0" }, - "type": "symfony-bundle", + "type": "composer-plugin", "extra": { "branch-alias": { - "dev-master": "2.x-dev" + "dev-master": "1.x-dev" + }, + "class": "Endroid\\Installer\\Installer" + }, + "autoload": { + "psr-4": { + "Endroid\\Installer\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jeroen van den Enden", + "email": "info@endroid.nl" + } + ], + "time": "2018-11-30T13:00:41+00:00" + }, + { + "name": "endroid/qr-code", + "version": "3.5.0", + "source": { + "type": "git", + "url": "https://github.com/endroid/qr-code.git", + "reference": "0095706c3bf2389f15f6c097bab4a00a48fc5ff7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/endroid/qr-code/zipball/0095706c3bf2389f15f6c097bab4a00a48fc5ff7", + "reference": "0095706c3bf2389f15f6c097bab4a00a48fc5ff7", + "shasum": "" + }, + "require": { + "bacon/bacon-qr-code": "^2.0", + "endroid/installer": "^1.0.3", + "ext-gd": "*", + "khanamiryan/qrcode-detector-decoder": "^1.0.2", + "myclabs/php-enum": "^1.5", + "php": ">=7.1", + "symfony/options-resolver": "^2.7|^3.0|^4.0", + "symfony/property-access": "^2.7|^3.0|^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7|^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" } }, "autoload": { @@ -389,23 +472,20 @@ "authors": [ { "name": "Jeroen van den Enden", - "email": "info@endroid.nl", - "homepage": "http://endroid.nl/" + "email": "info@endroid.nl" } ], "description": "Endroid QR Code", - "homepage": "https://github.com/endroid/QrCode", + "homepage": "https://github.com/endroid/qr-code", "keywords": [ "bundle", "code", "endroid", - "flex", + "php", "qr", - "qrcode", - "symfony" + "qrcode" ], - "abandoned": "endroid/qr-code", - "time": "2018-05-09T20:26:30+00:00" + "time": "2018-12-01T12:34:40+00:00" }, { "name": "fgrosse/phpasn1", @@ -478,16 +558,16 @@ }, { "name": "khanamiryan/qrcode-detector-decoder", - "version": "1", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/khanamiryan/php-qrcode-detector-decoder.git", - "reference": "96d5f80680b04803c4f1b69d6e01735e876b80c7" + "reference": "a75482d3bc804e3f6702332bfda6cccbb0dfaa76" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/khanamiryan/php-qrcode-detector-decoder/zipball/96d5f80680b04803c4f1b69d6e01735e876b80c7", - "reference": "96d5f80680b04803c4f1b69d6e01735e876b80c7", + "url": "https://api.github.com/repos/khanamiryan/php-qrcode-detector-decoder/zipball/a75482d3bc804e3f6702332bfda6cccbb0dfaa76", + "reference": "a75482d3bc804e3f6702332bfda6cccbb0dfaa76", "shasum": "" }, "require": { @@ -498,11 +578,11 @@ }, "type": "library", "autoload": { - "classmap": [ - "lib/" - ], + "psr-4": { + "Zxing\\": "lib/" + }, "files": [ - "lib/common/customFunctions.php" + "lib/Common/customFunctions.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -518,13 +598,13 @@ } ], "description": "QR code decoder / reader", - "homepage": "https://github.com/khanamiryan/php-qrcode-detector-decoder", + "homepage": "https://github.com/khanamiryan/php-qrcode-detector-decoder/", "keywords": [ "barcode", "qr", "zxing" ], - "time": "2017-01-13T09:11:46+00:00" + "time": "2018-04-26T11:41:33+00:00" }, { "name": "mdanter/ecc", @@ -750,7 +830,7 @@ "datetime", "time" ], - "time": "2018-12-28T10:07:33+00:00" + "time": "2018-11-22T18:23:02+00:00" }, { "name": "predis/predis", @@ -899,54 +979,6 @@ ], "time": "2018-11-20T15:27:04+00:00" }, - { - "name": "psr/simple-cache", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/simple-cache.git", - "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", - "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\SimpleCache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interfaces for simple caching", - "keywords": [ - "cache", - "caching", - "psr", - "psr-16", - "simple-cache" - ], - "time": "2017-10-23T01:57:42+00:00" - }, { "name": "robmorgan/phinx", "version": "v0.8.1", @@ -1212,7 +1244,7 @@ "interoperability", "standards" ], - "time": "2018-12-05T08:06:11+00:00" + "time": "2018-11-24T09:35:08+00:00" }, { "name": "symfony/debug", @@ -1321,26 +1353,84 @@ "time": "2018-11-11T19:52:12+00:00" }, { - "name": "symfony/options-resolver", - "version": "v2.8.49", + "name": "symfony/inflector", + "version": "v4.2.0", "source": { "type": "git", - "url": "https://github.com/symfony/options-resolver.git", - "reference": "7aaab725bb58f0e18aa12c61bdadd4793ab4c32b" + "url": "https://github.com/symfony/inflector.git", + "reference": "f9a637c0359f74404d44cf0da0a3ce53bae0787e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/7aaab725bb58f0e18aa12c61bdadd4793ab4c32b", - "reference": "7aaab725bb58f0e18aa12c61bdadd4793ab4c32b", + "url": "https://api.github.com/repos/symfony/inflector/zipball/f9a637c0359f74404d44cf0da0a3ce53bae0787e", + "reference": "f9a637c0359f74404d44cf0da0a3ce53bae0787e", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": "^7.1.3", + "symfony/polyfill-ctype": "~1.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-master": "4.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Inflector\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Inflector Component", + "homepage": "https://symfony.com", + "keywords": [ + "inflection", + "pluralize", + "singularize", + "string", + "symfony", + "words" + ], + "time": "2018-11-11T19:52:12+00:00" + }, + { + "name": "symfony/options-resolver", + "version": "v4.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/options-resolver.git", + "reference": "a9c38e8a3da2c03b3e71fdffa6efb0bda51390ba" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/a9c38e8a3da2c03b3e71fdffa6efb0bda51390ba", + "reference": "a9c38e8a3da2c03b3e71fdffa6efb0bda51390ba", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" } }, "autoload": { @@ -1372,7 +1462,7 @@ "configuration", "options" ], - "time": "2018-11-11T11:18:13+00:00" + "time": "2018-11-11T19:52:12+00:00" }, { "name": "symfony/polyfill-ctype", @@ -1493,26 +1583,32 @@ }, { "name": "symfony/property-access", - "version": "v2.8.49", + "version": "v4.2.0", "source": { "type": "git", "url": "https://github.com/symfony/property-access.git", - "reference": "c8f10191183be9bb0d5a1b8364d3891f1bde07b6" + "reference": "b6df4e1849f389468edb36e2e59877d4a8170723" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/property-access/zipball/c8f10191183be9bb0d5a1b8364d3891f1bde07b6", - "reference": "c8f10191183be9bb0d5a1b8364d3891f1bde07b6", + "url": "https://api.github.com/repos/symfony/property-access/zipball/b6df4e1849f389468edb36e2e59877d4a8170723", + "reference": "b6df4e1849f389468edb36e2e59877d4a8170723", "shasum": "" }, "require": { - "php": ">=5.3.9", - "symfony/polyfill-ctype": "~1.8" + "php": "^7.1.3", + "symfony/inflector": "~3.4|~4.0" + }, + "require-dev": { + "symfony/cache": "~3.4|~4.0" + }, + "suggest": { + "psr/cache-implementation": "To cache access methods." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -1550,7 +1646,7 @@ "property path", "reflection" ], - "time": "2018-11-11T11:18:13+00:00" + "time": "2018-11-29T14:48:32+00:00" }, { "name": "symfony/translation", @@ -1623,7 +1719,7 @@ ], "description": "Symfony Translation Component", "homepage": "https://symfony.com", - "time": "2018-12-06T10:45:32+00:00" + "time": "2018-11-27T07:20:32+00:00" }, { "name": "symfony/yaml", @@ -1750,177 +1846,6 @@ } ], "packages-dev": [ - { - "name": "ajgl/breakpoint-twig-extension", - "version": "0.3.2", - "source": { - "type": "git", - "url": "https://github.com/ajgarlag/AjglBreakpointTwigExtension.git", - "reference": "bb419d13775d8fb5cd03b31012eaf496b31b444f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ajgarlag/AjglBreakpointTwigExtension/zipball/bb419d13775d8fb5cd03b31012eaf496b31b444f", - "reference": "bb419d13775d8fb5cd03b31012eaf496b31b444f", - "shasum": "" - }, - "require": { - "php": ">=5.6", - "twig/twig": "^1.14|^2.0" - }, - "require-dev": { - "symfony/framework-bundle": "^2.7|^3.2|^4.1", - "symfony/phpunit-bridge": "^3.4|^4.1", - "symfony/twig-bundle": "^2.7|^3.2|^4.1" - }, - "suggest": { - "ext-xdebug": "The Xdebug extension is required for the breakpoint to work", - "symfony/framework-bundle": "The framework bundle to integrate the extension into Symfony", - "symfony/twig-bundle": "The twig bundle to integrate the extension into Symfony" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Ajgl\\Twig\\Extension\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Antonio J. García Lagar", - "email": "aj@garcialagar.es", - "homepage": "http://aj.garcialagar.es", - "role": "developer" - } - ], - "description": "Twig extension to set breakpoints", - "homepage": "https://github.com/ajgarlag/AjglBreakpointTwigExtension", - "keywords": [ - "Xdebug", - "breakpoint", - "twig" - ], - "time": "2018-12-10T08:22:36+00:00" - }, - { - "name": "aptoma/twig-markdown", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/aptoma/twig-markdown.git", - "reference": "64a9c5c7418c08faf91c4410b34bdb65fb25c23d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/aptoma/twig-markdown/zipball/64a9c5c7418c08faf91c4410b34bdb65fb25c23d", - "reference": "64a9c5c7418c08faf91c4410b34bdb65fb25c23d", - "shasum": "" - }, - "require": { - "twig/twig": "~1.12" - }, - "require-dev": { - "codeclimate/php-test-reporter": "dev-master", - "erusev/parsedown": "^1.6", - "knplabs/github-api": "~1.2", - "league/commonmark": "~0.5", - "michelf/php-markdown": "~1", - "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "~0.6" - }, - "suggest": { - "knplabs/github-api": "Needed for using GitHub's Markdown engine provided through their API.", - "michelf/php-markdown": "Original Markdown engine with MarkdownExtra." - }, - "type": "library", - "autoload": { - "psr-0": { - "Aptoma": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Joris Berthelot", - "email": "joris@berthelot.tel" - }, - { - "name": "Gunnar Lium", - "email": "gunnar@aptoma.com" - } - ], - "description": "Twig extension to work with Markdown content", - "keywords": [ - "markdown", - "twig" - ], - "time": "2015-10-23T20:27:08+00:00" - }, - { - "name": "asm89/twig-cache-extension", - "version": "1.3.2", - "source": { - "type": "git", - "url": "https://github.com/asm89/twig-cache-extension.git", - "reference": "630ea7abdc3fc62ba6786c02590a1560e449cf55" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/asm89/twig-cache-extension/zipball/630ea7abdc3fc62ba6786c02590a1560e449cf55", - "reference": "630ea7abdc3fc62ba6786c02590a1560e449cf55", - "shasum": "" - }, - "require": { - "php": ">=5.3.2", - "twig/twig": "^1.0|^2.0" - }, - "require-dev": { - "doctrine/cache": "~1.0" - }, - "suggest": { - "psr/cache-implementation": "To make use of PSR-6 cache implementation via PsrCacheAdapter." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, - "autoload": { - "psr-4": { - "": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Alexander", - "email": "iam.asm89@gmail.com" - } - ], - "description": "Cache fragments of templates directly within Twig.", - "homepage": "https://github.com/asm89/twig-cache-extension", - "keywords": [ - "cache", - "extension", - "twig" - ], - "time": "2017-01-10T22:04:15+00:00" - }, { "name": "cakephp/bake", "version": "1.9.1", @@ -1943,7 +1868,7 @@ }, "require-dev": { "cakephp/cakephp-codesniffer": "^3.0", - "phpunit/phpunit": "^5.7.14|^6.0" + "phpunit/phpunit": "~5.7 | ~6.0" }, "type": "cakephp-plugin", "autoload": { @@ -1961,7 +1886,7 @@ "homepage": "https://github.com/cakephp/bake/graphs/contributors" } ], - "description": "Bake plugin for CakePHP 3", + "description": "Bake plugin for CakePHP 3.0", "homepage": "https://github.com/cakephp/bake", "keywords": [ "bake", @@ -1993,10 +1918,10 @@ }, "require-dev": { "cakephp/cakephp-codesniffer": "^3.0", - "phpunit/phpunit": "^5.7.14|^6.0" + "phpunit/phpunit": "^5.7|^6.0" }, "suggest": { - "ext-pdo_sqlite": "DebugKit needs to store panel data in a database. SQLite is simple and easy to use." + "ext-sqlite": "DebugKit needs to store panel data in a database. SQLite is simple and easy to use." }, "type": "cakephp-plugin", "autoload": { @@ -2453,66 +2378,6 @@ "description": "Highlight PHP code in terminal", "time": "2018-09-29T18:48:56+00:00" }, - { - "name": "jasny/twig-extensions", - "version": "v1.2.0", - "source": { - "type": "git", - "url": "https://github.com/jasny/twig-extensions.git", - "reference": "30bdf3a3903c021544f36332c9d5d4d563527da4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/jasny/twig-extensions/zipball/30bdf3a3903c021544f36332c9d5d4d563527da4", - "reference": "30bdf3a3903c021544f36332c9d5d4d563527da4", - "shasum": "" - }, - "require": { - "php": ">=7.0.0 | >=5.6.0", - "twig/twig": "^2.0 | ^1.12" - }, - "require-dev": { - "ext-intl": "*", - "ext-pcre": "*", - "jasny/php-code-quality": "^2.1", - "phpunit/phpunit": "^5.0" - }, - "suggest": { - "ext-intl": "Required for the use of the LocalDate Twig extension", - "ext-pcre": "Required for the use of the PCRE Twig extension" - }, - "type": "library", - "autoload": { - "psr-4": { - "Jasny\\Twig\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Arnold Daniels", - "email": "arnold@jasny.net", - "homepage": "http://www.jasny.net" - } - ], - "description": "A set of useful Twig filters", - "homepage": "http://github.com/jasny/twig-extensions#README", - "keywords": [ - "PCRE", - "array", - "date", - "datetime", - "preg", - "regex", - "templating", - "text", - "time" - ], - "time": "2017-09-13T07:38:01+00:00" - }, { "name": "jdorn/sql-formatter", "version": "v1.2.17", @@ -3074,171 +2939,6 @@ "dump" ], "time": "2018-11-25T12:50:42+00:00" - }, - { - "name": "twig/twig", - "version": "v1.36.0", - "source": { - "type": "git", - "url": "https://github.com/twigphp/Twig.git", - "reference": "730c9c4471b5152d23061feb02b03382264c8a15" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/730c9c4471b5152d23061feb02b03382264c8a15", - "reference": "730c9c4471b5152d23061feb02b03382264c8a15", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "symfony/polyfill-ctype": "^1.8" - }, - "require-dev": { - "psr/container": "^1.0", - "symfony/debug": "^2.7", - "symfony/phpunit-bridge": "^3.4.19|^4.1.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.36-dev" - } - }, - "autoload": { - "psr-0": { - "Twig_": "lib/" - }, - "psr-4": { - "Twig\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" - }, - { - "name": "Armin Ronacher", - "email": "armin.ronacher@active-4.com", - "role": "Project Founder" - }, - { - "name": "Twig Team", - "homepage": "https://twig.symfony.com/contributors", - "role": "Contributors" - } - ], - "description": "Twig, the flexible, fast, and secure template language for PHP", - "homepage": "https://twig.symfony.com", - "keywords": [ - "templating" - ], - "time": "2018-12-16T10:34:11+00:00" - }, - { - "name": "umpirsky/twig-php-function", - "version": "v0.1", - "source": { - "type": "git", - "url": "https://github.com/umpirsky/twig-php-function.git", - "reference": "53b4b1eb0c5eacbd7d66c504b7d809c79b4bedbc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/umpirsky/twig-php-function/zipball/53b4b1eb0c5eacbd7d66c504b7d809c79b4bedbc", - "reference": "53b4b1eb0c5eacbd7d66c504b7d809c79b4bedbc", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "twig/twig": "~1.12" - }, - "require-dev": { - "phpspec/phpspec": "~2.0", - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "autoload": { - "psr-0": { - "Umpirsky\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Saša Stamenković", - "email": "umpirsky@gmail.com" - } - ], - "description": "Call (almost) any PHP function from your Twig templates.", - "time": "2016-03-12T16:36:32+00:00" - }, - { - "name": "wyrihaximus/twig-view", - "version": "4.3.8", - "source": { - "type": "git", - "url": "https://github.com/WyriHaximus/TwigView.git", - "reference": "a5ec66690aa045d6eda17ab1c8a5baf0efdcfa45" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/WyriHaximus/TwigView/zipball/a5ec66690aa045d6eda17ab1c8a5baf0efdcfa45", - "reference": "a5ec66690aa045d6eda17ab1c8a5baf0efdcfa45", - "shasum": "" - }, - "require": { - "ajgl/breakpoint-twig-extension": "^0.3.0", - "aptoma/twig-markdown": "^2.0", - "asm89/twig-cache-extension": "^1.0", - "cakephp/cakephp": "^3.6", - "jasny/twig-extensions": "^1.0", - "php": "^5.6 || ^7.0", - "twig/twig": "^1.27", - "umpirsky/twig-php-function": "0.1" - }, - "require-dev": { - "cakephp/bake": "^1.5", - "cakephp/debug_kit": "^3.0", - "phake/phake": "^1.0.4", - "phpunit/phpunit": "^5.7.14", - "squizlabs/php_codesniffer": "^1.5.6", - "wyrihaximus/phpunit-class-reflection-helpers": "dev-master" - }, - "type": "cakephp-plugin", - "autoload": { - "psr-4": { - "WyriHaximus\\TwigView\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Cees-Jan Kiewiet", - "email": "ceesjank@gmail.com", - "homepage": "http://wyrihaximus.net/" - } - ], - "description": "Twig powered View for CakePHP3", - "keywords": [ - "cakephp", - "cakephp3", - "twig", - "view" - ], - "time": "2018-12-17T21:08:25+00:00" } ], "aliases": [], diff --git a/sql/lbryexplorer.ddl.sql b/sql/lbryexplorer.ddl.sql index 9285f44..24e9498 100644 --- a/sql/lbryexplorer.ddl.sql +++ b/sql/lbryexplorer.ddl.sql @@ -74,7 +74,7 @@ CREATE TABLE `Addresses` `TotalReceived` DECIMAL(18,8) DEFAULT 0 NOT NULL, `TotalSent` DECIMAL(18,8) DEFAULT 0 NOT NULL, `Balance` DECIMAL(18,8) AS (`TotalReceived` - `TotalSent`) PERSISTENT, - `Tag` VARCHAR(30) NOT NULL, + `Tag` VARCHAR(30), `TagUrl` VARCHAR(200), `Created` DATETIME NOT NULL, `Modified` DATETIME NOT NULL, diff --git a/src/Controller/MainController.php b/src/Controller/MainController.php index 2974c1a..4fb6b9f 100644 --- a/src/Controller/MainController.php +++ b/src/Controller/MainController.php @@ -13,6 +13,7 @@ use Cake\Log\Log; use Endroid\QrCode\ErrorCorrectionLevel; use Endroid\QrCode\LabelAlignment; use Endroid\QrCode\QrCode; +use Endroid\QrCode\Response\QrCodeResponse; class MainController extends AppController { @@ -21,6 +22,8 @@ class MainController extends AppController { const lbcPriceKey = 'lbc.price'; + const txOutSetInfo = 'lbrcrd.tosi'; + const bittrexMarketUrl = 'https://bittrex.com/api/v1.1/public/getticker?market=BTC-LBC'; const blockchainTickerUrl = 'https://blockchain.info/ticker'; @@ -277,7 +280,7 @@ class MainController extends AppController { } } } - + public function blocks($height = null) { $this->loadModel('Blocks'); $this->loadModel('Outputs'); @@ -338,7 +341,7 @@ class MainController extends AppController { $this->loadModel('Outputs'); $this->loadModel('Addresses'); $this->loadModel('Claims'); - + $sourceAddress = $this->request->query('address'); $tx = $this->Transactions->find()->where(['Transactions.hash' => $hash])->first(); @@ -403,7 +406,7 @@ class MainController extends AppController { $priceRate = $priceInfo->price; } } - + $lbryAddresses = ['rFLUohPG4tP3gZHYoyhvADCtrDMiaYb7Qd', 'r9PGXsejVJb9ZfMf3QVdDEJCzxkd9JLxzL', 'r9srwX7DEN7Mex3a8oR1mKSqQmLBizoJvi', 'bRo4FEeqqxY7nWFANsZsuKEWByEgkvz8Qt', 'bU2XUzckfpdEuQNemKvhPT1gexQ3GG3SC2', 'bay3VA6YTQBL4WLobbG7CthmoGeUKXuXkD', 'bLPbiXBp6Vr3NSnsHzDsLNzoy5o36re9Cz', 'bMvUBo1h5WS46ThHtmfmXftz3z33VHL7wc', 'bVUrbCK8hcZ5XWti7b9eNxKEBxzc1rr393', 'bZja2VyhAC84a9hMwT8dwTU6rDRXowrjxH', 'bMvUBo1h5WS46ThHtmfmXftz3z33VHL7wc', 'bMgqQqYfwzWWYBk5o5dBMXtCndVAoeqy6h', 'bMvUBo1h5WS46ThHtmfmXftz3z33VHL7wc']; $totalBalance = 0; $maxBalance = 0; @@ -451,13 +454,6 @@ class MainController extends AppController { $recentTxs = []; $tagRequestAmount = 0; - // Check for pending tag request - //$this->loadModel('TagAddressRequests'); - //$pending = $this->TagAddressRequests->find()->where(['Address' => $addr, 'IsVerified <>' => 1])->first(); - //if (!$pending) { - // $tagRequestAmount = '25.' . rand(11111111, 99999999); - //} - $address = $this->Addresses->find()->where(['address' => $addr])->first(); if (!$address) { if (strlen($addr) === 34) { @@ -512,7 +508,6 @@ class MainController extends AppController { $this->set('offset', $offset); $this->set('canTag', $canTag); - $this->set('tagRequestAmount', $tagRequestAmount); $this->set('address', $address); $this->set('totalReceived', $totalRecvAmount); $this->set('totalSent', $totalSentAmount); @@ -535,15 +530,15 @@ class MainController extends AppController { $qrCode->setSize(300); // Set advanced options - $qrCode - ->setWriterByName('png') - ->setMargin(10) - ->setEncoding('UTF-8') - ->setErrorCorrectionLevel(ErrorCorrectionLevel::LOW) - ->setForegroundColor(['r' => 0, 'g' => 0, 'b' => 0]) - ->setBackgroundColor(['r' => 255, 'g' => 255, 'b' => 255]) - ->setLogoWidth(150) - ->setValidateResult(false); + $qrCode->setWriterByName('png'); + $qrCode->setMargin(10); + $qrCode->setEncoding('UTF-8'); + $qrCode->setErrorCorrectionLevel(new ErrorCorrectionLevel(ErrorCorrectionLevel::LOW)); + $qrCode->setForegroundColor(['r' => 0, 'g' => 0, 'b' => 0, 'a' => 0]); + $qrCode->setBackgroundColor(['r' => 255, 'g' => 255, 'b' => 255, 'a' => 0]); + $qrCode->setLogoWidth(150); + $qrCode->setValidateResult(false); + header('Content-Type: '.$qrCode->getContentType()); echo $qrCode->writeString(); @@ -613,7 +608,7 @@ class MainController extends AppController { $this->_jsonResponse(['success' => true, 'blocks' => $blocks]); } - + public function apirealtimetx() { // Load 10 transactions $this->autoRender = false; @@ -622,6 +617,49 @@ class MainController extends AppController { $this->_jsonResponse(['success' => true, 'txs' => $txs]); } + + protected function _gettxoutsetinfo() { + $now = new \DateTime('now', new \DateTimeZone('UTC')); + $txOutSetInfo = new \stdClass(); + $txOutSetInfo->time = $now->format('c'); + + $shouldRefreshSet = false; + if (!$this->redis) { + $shouldRefreshSet = true; + } else { + if (!$this->redis->exists(self::txOutSetInfo)) { + $shouldRefreshSet = true; + } else { + $txOutSetInfo = json_decode($this->redis->get(self::txOutSetInfo)); + $lastTOSIDt = new \DateTime($txOutSetInfo->time); + $diff = $now->diff($lastTOSIDt); + $diffMinutes = $diff->i; + if ($diffMinutes >= 15 || $txOutSetInfo->set == 'N/A') { + $shouldRefreshSet = true; + } + } + } + + if ($shouldRefreshSet) { + + $req = ['method' => 'gettxoutsetinfo', 'params' => []]; + try { + $res = json_decode(self::curl_json_post(self::$rpcurl, json_encode($req))); + if (!isset($res->result)) { + $txOutSetInfo->tosi = 'N/A'; + } + $txOutSetInfo->tosi = $res->result; + } catch (\Exception $e) { + $txOutSetInfo->tosi = 'N/A'; + } + $txOutSetInfo->time = $now->format('c'); + if ($this->redis) { + $this->redis->set(self::txOutSetInfo, json_encode($txOutSetInfo)); + } + } + + return (isset($txOutSetInfo->tosi)) ? $txOutSetInfo->tosi : 'N/A'; + } public function apistatus() { $this->autoRender = false; @@ -900,6 +938,4 @@ class MainController extends AppController { // Close any open file handle return $response; } -} - -?> +} \ No newline at end of file diff --git a/webroot/js/mining-inflation-chart.js b/webroot/js/mining-inflation-chart.js index e43411c..6d53677 100644 --- a/webroot/js/mining-inflation-chart.js +++ b/webroot/js/mining-inflation-chart.js @@ -85,7 +85,6 @@ function buildChartData(blockData) { inflationRate = ((supply - lastYearSupply) / lastYearSupply) * 100; if(i % skip == 0) { // Only push 1/ of all blocks to optimize data loading chartData.push({ - date: new Date(blockTime * 1000), date: new Date(blockTime * 1000), AvailableSupply: supply, RewardLBC: reward, @@ -99,7 +98,7 @@ function buildChartData(blockData) { function loadChartData() { var api_url = "https://chainquery.lbry.io/api/sql?query="; - var query = "SELECT id, block_time FROM block"; + var query = "SELECT height, block_time FROM block WHERE confirmations > 0 ORDER BY height"; var url = api_url + query; var loadProgress = $('.mining-inflation-chart-container .load-progress'); $.ajax({