diff --git a/composer.json b/composer.json index a5c71dc..245da29 100644 --- a/composer.json +++ b/composer.json @@ -12,12 +12,17 @@ ] }, "require": { - "arch/php-internal-api-client": "^0.6.1" + "arch/php-internal-api-client": "^0.6.1", + "paidian/json-rpc": "~1.1" }, "repositories": { "php-internal-api-client": { "type": "vcs", "url": "git@git.int.haowumc.com:arch/php-internal-api-client.git" + }, + "php-json-rpc": { + "type": "vcs", + "url": "git@git.int.haowumc.com:composer/php-json-rpc.git" } } } diff --git a/composer.lock b/composer.lock index 7988657..8182829 100644 --- a/composer.lock +++ b/composer.lock @@ -1,18 +1,18 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "cb24f2da898fb06d105ad5e3b37c9ae5", + "content-hash": "da7df43f2cca475d53124412fd3fdfcb", "packages": [ { "name": "arch/php-internal-api-client", - "version": "v0.6.1", + "version": "v0.6.2", "source": { "type": "git", "url": "git@git.int.haowumc.com:arch/php-internal-api-client.git", - "reference": "6c54737d1300c1b4160de3bc476a16a76e450190" + "reference": "436a0845815e3df2e6a8b41f28958aebc2b66fd0" }, "require": { "guzzlehttp/guzzle": "^6.3", @@ -27,7 +27,7 @@ "src/helpers.php" ] }, - "time": "2018-06-22T12:21:08+00:00" + "time": "2018-06-26T02:50:49+00:00" }, { "name": "doctrine/inflector", @@ -39,7 +39,7 @@ }, "dist": { "type": "zip", - "url": "https://files.phpcomposer.com/files/doctrine/inflector/5527a48b7313d15261292c149e55e26eae771b0a.zip", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/5527a48b7313d15261292c149e55e26eae771b0a", "reference": "5527a48b7313d15261292c149e55e26eae771b0a", "shasum": "" }, @@ -106,7 +106,7 @@ }, "dist": { "type": "zip", - "url": "https://files.phpcomposer.com/files/guzzle/guzzle/407b0cb880ace85c9b63c5f9551db498cb2d50ba.zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba", "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba", "shasum": "" }, @@ -171,7 +171,7 @@ }, "dist": { "type": "zip", - "url": "https://files.phpcomposer.com/files/guzzle/promises/a59da6cf61d80060647ff4d3eb2c03a2bc694646.zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", "shasum": "" }, @@ -214,32 +214,33 @@ }, { "name": "guzzlehttp/psr7", - "version": "1.4.2", + "version": "1.5.2", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c" + "reference": "9f83dded91781a01c63574e387eaa769be769115" }, "dist": { "type": "zip", - "url": "https://files.phpcomposer.com/files/guzzle/psr7/f5b8a8512e2b58b0071a7280e39f14f72e05d87c.zip", - "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/9f83dded91781a01c63574e387eaa769be769115", + "reference": "9f83dded91781a01c63574e387eaa769be769115", "shasum": "" }, "require": { "php": ">=5.4.0", - "psr/http-message": "~1.0" + "psr/http-message": "~1.0", + "ralouphie/getallheaders": "^2.0.5" }, "provide": { "psr/http-message-implementation": "1.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "1.5-dev" } }, "autoload": { @@ -269,37 +270,38 @@ "keywords": [ "http", "message", + "psr-7", "request", "response", "stream", "uri", "url" ], - "time": "2017-03-20T17:10:46+00:00" + "time": "2018-12-04T20:46:45+00:00" }, { "name": "illuminate/contracts", - "version": "v5.6.20", + "version": "v5.7.27", "source": { "type": "git", "url": "https://github.com/illuminate/contracts.git", - "reference": "322ec80498b3bf85bc4025d028e130a9b50242b9" + "reference": "b63324d349a8ae2156fbc2697c1ccc85879b3803" }, "dist": { "type": "zip", - "url": "https://files.phpcomposer.com/files/illuminate/contracts/322ec80498b3bf85bc4025d028e130a9b50242b9.zip", - "reference": "322ec80498b3bf85bc4025d028e130a9b50242b9", + "url": "https://api.github.com/repos/illuminate/contracts/zipball/b63324d349a8ae2156fbc2697c1ccc85879b3803", + "reference": "b63324d349a8ae2156fbc2697c1ccc85879b3803", "shasum": "" }, "require": { "php": "^7.1.3", - "psr/container": "~1.0", - "psr/simple-cache": "~1.0" + "psr/container": "^1.0", + "psr/simple-cache": "^1.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.6-dev" + "dev-master": "5.7-dev" } }, "autoload": { @@ -319,39 +321,39 @@ ], "description": "The Illuminate Contracts package.", "homepage": "https://laravel.com", - "time": "2018-04-07T17:05:26+00:00" + "time": "2019-02-12T07:46:48+00:00" }, { "name": "illuminate/filesystem", - "version": "v5.6.20", + "version": "v5.7.27", "source": { "type": "git", "url": "https://github.com/illuminate/filesystem.git", - "reference": "ad4a3655ad695f5b1f5e155bfda61597e0e9fc8b" + "reference": "ff853e678a93996b1d0a3ddc6fc56c10bae0de30" }, "dist": { "type": "zip", - "url": "https://files.phpcomposer.com/files/illuminate/filesystem/ad4a3655ad695f5b1f5e155bfda61597e0e9fc8b.zip", - "reference": "ad4a3655ad695f5b1f5e155bfda61597e0e9fc8b", + "url": "https://api.github.com/repos/illuminate/filesystem/zipball/ff853e678a93996b1d0a3ddc6fc56c10bae0de30", + "reference": "ff853e678a93996b1d0a3ddc6fc56c10bae0de30", "shasum": "" }, "require": { - "illuminate/contracts": "5.6.*", - "illuminate/support": "5.6.*", + "illuminate/contracts": "5.7.*", + "illuminate/support": "5.7.*", "php": "^7.1.3", - "symfony/finder": "~4.0" + "symfony/finder": "^4.1" }, "suggest": { - "league/flysystem": "Required to use the Flysystem local and FTP drivers (~1.0).", - "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (~1.0).", - "league/flysystem-cached-adapter": "Required to use the Flysystem cache (~1.0).", - "league/flysystem-rackspace": "Required to use the Flysystem Rackspace driver (~1.0).", - "league/flysystem-sftp": "Required to use the Flysystem SFTP driver (~1.0)." + "league/flysystem": "Required to use the Flysystem local and FTP drivers (^1.0).", + "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^1.0).", + "league/flysystem-cached-adapter": "Required to use the Flysystem cache (^1.0).", + "league/flysystem-rackspace": "Required to use the Flysystem Rackspace driver (^1.0).", + "league/flysystem-sftp": "Required to use the Flysystem SFTP driver (^1.0)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.6-dev" + "dev-master": "5.7-dev" } }, "autoload": { @@ -371,33 +373,33 @@ ], "description": "The Illuminate Filesystem package.", "homepage": "https://laravel.com", - "time": "2018-04-25T14:22:57+00:00" + "time": "2019-02-11T13:48:57+00:00" }, { "name": "illuminate/http", - "version": "v5.6.20", + "version": "v5.7.27", "source": { "type": "git", "url": "https://github.com/illuminate/http.git", - "reference": "1c58a1fd0b668c9d7203c6e69ba7391431815e47" + "reference": "279984eed495fc19a5649e4e8f57c5076e406f0a" }, "dist": { "type": "zip", - "url": "https://files.phpcomposer.com/files/illuminate/http/1c58a1fd0b668c9d7203c6e69ba7391431815e47.zip", - "reference": "1c58a1fd0b668c9d7203c6e69ba7391431815e47", + "url": "https://api.github.com/repos/illuminate/http/zipball/279984eed495fc19a5649e4e8f57c5076e406f0a", + "reference": "279984eed495fc19a5649e4e8f57c5076e406f0a", "shasum": "" }, "require": { - "illuminate/session": "5.6.*", - "illuminate/support": "5.6.*", + "illuminate/session": "5.7.*", + "illuminate/support": "5.7.*", "php": "^7.1.3", - "symfony/http-foundation": "~4.0", - "symfony/http-kernel": "~4.0" + "symfony/http-foundation": "^4.1", + "symfony/http-kernel": "^4.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.6-dev" + "dev-master": "5.7-dev" } }, "autoload": { @@ -417,37 +419,37 @@ ], "description": "The Illuminate Http package.", "homepage": "https://laravel.com", - "time": "2018-03-12T13:37:01+00:00" + "time": "2019-02-11T13:48:57+00:00" }, { "name": "illuminate/session", - "version": "v5.6.20", + "version": "v5.7.27", "source": { "type": "git", "url": "https://github.com/illuminate/session.git", - "reference": "90bb5857fb64e269d8d331f02f820555ee471f64" + "reference": "0d1233ea455b9ad50112212022ca3bcff874fa86" }, "dist": { "type": "zip", - "url": "https://files.phpcomposer.com/files/illuminate/session/90bb5857fb64e269d8d331f02f820555ee471f64.zip", - "reference": "90bb5857fb64e269d8d331f02f820555ee471f64", + "url": "https://api.github.com/repos/illuminate/session/zipball/0d1233ea455b9ad50112212022ca3bcff874fa86", + "reference": "0d1233ea455b9ad50112212022ca3bcff874fa86", "shasum": "" }, "require": { - "illuminate/contracts": "5.6.*", - "illuminate/filesystem": "5.6.*", - "illuminate/support": "5.6.*", + "illuminate/contracts": "5.7.*", + "illuminate/filesystem": "5.7.*", + "illuminate/support": "5.7.*", "php": "^7.1.3", - "symfony/finder": "~4.0", - "symfony/http-foundation": "~4.0" + "symfony/finder": "^4.1", + "symfony/http-foundation": "^4.1" }, "suggest": { - "illuminate/console": "Required to use the session:table command (5.6.*)." + "illuminate/console": "Required to use the session:table command (5.7.*)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.6-dev" + "dev-master": "5.7-dev" } }, "autoload": { @@ -467,41 +469,43 @@ ], "description": "The Illuminate Session package.", "homepage": "https://laravel.com", - "time": "2018-03-06T14:29:02+00:00" + "time": "2019-02-11T13:48:57+00:00" }, { "name": "illuminate/support", - "version": "v5.6.20", + "version": "v5.7.27", "source": { "type": "git", "url": "https://github.com/illuminate/support.git", - "reference": "2a97d211c052f6d6ce9756c89d64b855d860d923" + "reference": "3e2810145f37eb89fa11759781ee88ee1c1a5262" }, "dist": { "type": "zip", - "url": "https://files.phpcomposer.com/files/illuminate/support/2a97d211c052f6d6ce9756c89d64b855d860d923.zip", - "reference": "2a97d211c052f6d6ce9756c89d64b855d860d923", + "url": "https://api.github.com/repos/illuminate/support/zipball/3e2810145f37eb89fa11759781ee88ee1c1a5262", + "reference": "3e2810145f37eb89fa11759781ee88ee1c1a5262", "shasum": "" }, "require": { - "doctrine/inflector": "~1.1", + "doctrine/inflector": "^1.1", "ext-mbstring": "*", - "illuminate/contracts": "5.6.*", - "nesbot/carbon": "^1.24.1", + "illuminate/contracts": "5.7.*", + "nesbot/carbon": "^1.26.3", "php": "^7.1.3" }, "conflict": { "tightenco/collect": "<5.5.33" }, "suggest": { - "illuminate/filesystem": "Required to use the composer class (5.6.*).", - "symfony/process": "Required to use the composer class (~4.0).", - "symfony/var-dumper": "Required to use the dd function (~4.0)." + "illuminate/filesystem": "Required to use the composer class (5.7.*).", + "moontoast/math": "Required to use ordered UUIDs (^1.1).", + "ramsey/uuid": "Required to use Str::uuid() (^3.7).", + "symfony/process": "Required to use the composer class (^4.1).", + "symfony/var-dumper": "Required to use the dd function (^4.1)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.6-dev" + "dev-master": "5.7-dev" } }, "autoload": { @@ -524,20 +528,194 @@ ], "description": "The Illuminate Support package.", "homepage": "https://laravel.com", - "time": "2018-05-02T14:59:13+00:00" + "time": "2019-02-12T07:57:07+00:00" }, { - "name": "nesbot/carbon", - "version": "1.27.0", + "name": "influxdb/influxdb-php", + "version": "1.14.7", "source": { "type": "git", - "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "ef81c39b67200dcd7401c24363dcac05ac3a4fe9" + "url": "https://github.com/influxdata/influxdb-php.git", + "reference": "570bd5cdedb9b1c1628dceea5785bc40e08f7e48" }, "dist": { "type": "zip", - "url": "https://files.phpcomposer.com/files/briannesbitt/Carbon/ef81c39b67200dcd7401c24363dcac05ac3a4fe9.zip", - "reference": "ef81c39b67200dcd7401c24363dcac05ac3a4fe9", + "url": "https://api.github.com/repos/influxdata/influxdb-php/zipball/570bd5cdedb9b1c1628dceea5785bc40e08f7e48", + "reference": "570bd5cdedb9b1c1628dceea5785bc40e08f7e48", + "shasum": "" + }, + "require": { + "guzzlehttp/guzzle": "^6.0", + "php": "^5.5 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7" + }, + "suggest": { + "stefanotorresi/influxdb-php-async": "An asyncronous client for InfluxDB, implemented via ReactPHP." + }, + "type": "library", + "autoload": { + "psr-4": { + "InfluxDB\\": "src/InfluxDB" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gianluca Arbezzano", + "email": "gianarb92@gmail.com" + }, + { + "name": "Daniel Martinez", + "email": "danimartcas@hotmail.com" + }, + { + "name": "Stephen Hoogendijk", + "email": "stephen@tca0.nl" + } + ], + "description": "InfluxDB client library for PHP", + "keywords": [ + "client", + "influxdata", + "influxdb", + "influxdb class", + "influxdb client", + "influxdb library", + "time series" + ], + "time": "2018-07-06T10:13:39+00:00" + }, + { + "name": "itxq/api-doc-php", + "version": "v1.1.1", + "source": { + "type": "git", + "url": "https://github.com/itxq/api-doc-php.git", + "reference": "79ac71cf09da49491cfb92722d6f6e13ad8f6482" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/itxq/api-doc-php/zipball/79ac71cf09da49491cfb92722d6f6e13ad8f6482", + "reference": "79ac71cf09da49491cfb92722d6f6e13ad8f6482", + "shasum": "" + }, + "require": { + "php": ">=5.6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "itxq\\apidoc\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "IT小强xqitw.cn", + "email": "360237521@qq.com" + } + ], + "description": "api-doc-php", + "time": "2018-06-24T04:20:25+00:00" + }, + { + "name": "monolog/monolog", + "version": "1.24.0", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/monolog.git", + "reference": "bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266", + "reference": "bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "psr/log": "~1.0" + }, + "provide": { + "psr/log-implementation": "1.0.0" + }, + "require-dev": { + "aws/aws-sdk-php": "^2.4.9 || ^3.0", + "doctrine/couchdb": "~1.0@dev", + "graylog2/gelf-php": "~1.0", + "jakub-onderka/php-parallel-lint": "0.9", + "php-amqplib/php-amqplib": "~2.4", + "php-console/php-console": "^3.1.3", + "phpunit/phpunit": "~4.5", + "phpunit/phpunit-mock-objects": "2.3.0", + "ruflin/elastica": ">=0.90 <3.0", + "sentry/sentry": "^0.13", + "swiftmailer/swiftmailer": "^5.3|^6.0" + }, + "suggest": { + "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", + "doctrine/couchdb": "Allow sending log messages to a CouchDB server", + "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", + "ext-mongo": "Allow sending log messages to a MongoDB server", + "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", + "mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver", + "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", + "php-console/php-console": "Allow sending log messages to Google Chrome", + "rollbar/rollbar": "Allow sending log messages to Rollbar", + "ruflin/elastica": "Allow sending log messages to an Elastic Search server", + "sentry/sentry": "Allow sending log messages to a Sentry server" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Monolog\\": "src/Monolog" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Sends your logs to files, sockets, inboxes, databases and various web services", + "homepage": "http://github.com/Seldaek/monolog", + "keywords": [ + "log", + "logging", + "psr-3" + ], + "time": "2018-11-05T09:00:11+00:00" + }, + { + "name": "nesbot/carbon", + "version": "1.36.2", + "source": { + "type": "git", + "url": "https://github.com/briannesbitt/Carbon.git", + "reference": "cd324b98bc30290f233dd0e75e6ce49f7ab2a6c9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/cd324b98bc30290f233dd0e75e6ce49f7ab2a6c9", + "reference": "cd324b98bc30290f233dd0e75e6ce49f7ab2a6c9", "shasum": "" }, "require": { @@ -545,10 +723,20 @@ "symfony/translation": "~2.6 || ~3.0 || ~4.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "~2", "phpunit/phpunit": "^4.8.35 || ^5.7" }, + "suggest": { + "friendsofphp/php-cs-fixer": "Needed for the `composer phpcs` command. Allow to automatically fix code style.", + "phpstan/phpstan": "Needed for the `composer phpstan` command. Allow to detect potential errors." + }, "type": "library", + "extra": { + "laravel": { + "providers": [ + "Carbon\\Laravel\\ServiceProvider" + ] + } + }, "autoload": { "psr-4": { "": "src/" @@ -572,7 +760,32 @@ "datetime", "time" ], - "time": "2018-04-23T09:02:57+00:00" + "time": "2018-12-28T10:07:33+00:00" + }, + { + "name": "paidian/json-rpc", + "version": "v1.2.1", + "source": { + "type": "git", + "url": "git@git.int.haowumc.com:composer/php-json-rpc.git", + "reference": "198318d9d0ca7f05f39d9d5cd391af57baa96f3d" + }, + "require": { + "guzzlehttp/guzzle": "^6.3", + "illuminate/http": "^5.5", + "illuminate/support": "^5.5", + "influxdb/influxdb-php": "^1.14", + "itxq/api-doc-php": "^1.1", + "monolog/monolog": "^1.24" + }, + "type": "library", + "autoload": { + "psr-4": { + "JsonRpc\\": "src/" + } + }, + "description": "json rpc server/client.", + "time": "2019-02-20T05:55:03+00:00" }, { "name": "psr/container", @@ -584,7 +797,7 @@ }, "dist": { "type": "zip", - "url": "https://files.phpcomposer.com/files/php-fig/container/b7ce3b176482dbbc1245ebf52b181af44c2cf55f.zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", "shasum": "" }, @@ -633,7 +846,7 @@ }, "dist": { "type": "zip", - "url": "https://files.phpcomposer.com/files/php-fig/http-message/f6561bf28d520154e4b0ec72be95418abe6d9363.zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", "shasum": "" }, @@ -675,16 +888,16 @@ }, { "name": "psr/log", - "version": "1.0.2", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" + "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd" }, "dist": { "type": "zip", - "url": "https://files.phpcomposer.com/files/php-fig/log/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d.zip", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", + "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", "shasum": "" }, "require": { @@ -718,7 +931,7 @@ "psr", "psr-3" ], - "time": "2016-10-10T12:19:37+00:00" + "time": "2018-11-20T15:27:04+00:00" }, { "name": "psr/simple-cache", @@ -730,7 +943,7 @@ }, "dist": { "type": "zip", - "url": "https://files.phpcomposer.com/files/php-fig/simple-cache/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b.zip", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", "shasum": "" }, @@ -769,17 +982,125 @@ "time": "2017-10-23T01:57:42+00:00" }, { - "name": "symfony/debug", - "version": "v4.0.9", + "name": "ralouphie/getallheaders", + "version": "2.0.5", "source": { "type": "git", - "url": "https://github.com/symfony/debug.git", - "reference": "e1d57cdb357e5b10f5fdacbb0b86689c0a435e6e" + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa" }, "dist": { "type": "zip", - "url": "https://files.phpcomposer.com/files/symfony/debug/e1d57cdb357e5b10f5fdacbb0b86689c0a435e6e.zip", - "reference": "e1d57cdb357e5b10f5fdacbb0b86689c0a435e6e", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/5601c8a83fbba7ef674a7369456d12f1e0d0eafa", + "reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa", + "shasum": "" + }, + "require": { + "php": ">=5.3" + }, + "require-dev": { + "phpunit/phpunit": "~3.7.0", + "satooshi/php-coveralls": ">=1.0" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "time": "2016-02-11T07:05:27+00:00" + }, + { + "name": "symfony/contracts", + "version": "v1.0.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/contracts.git", + "reference": "1aa7ab2429c3d594dd70689604b5cf7421254cdf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/contracts/zipball/1aa7ab2429c3d594dd70689604b5cf7421254cdf", + "reference": "1aa7ab2429c3d594dd70689604b5cf7421254cdf", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "require-dev": { + "psr/cache": "^1.0", + "psr/container": "^1.0" + }, + "suggest": { + "psr/cache": "When using the Cache contracts", + "psr/container": "When using the Service contracts", + "symfony/cache-contracts-implementation": "", + "symfony/service-contracts-implementation": "", + "symfony/translation-contracts-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\": "" + }, + "exclude-from-classmap": [ + "**/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A set of abstractions extracted out of the Symfony components", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "time": "2018-12-05T08:06:11+00:00" + }, + { + "name": "symfony/debug", + "version": "v4.2.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/debug.git", + "reference": "cf9b2e33f757deb884ce474e06d2647c1c769b65" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/debug/zipball/cf9b2e33f757deb884ce474e06d2647c1c769b65", + "reference": "cf9b2e33f757deb884ce474e06d2647c1c769b65", "shasum": "" }, "require": { @@ -795,7 +1116,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -822,24 +1143,25 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2018-04-30T16:59:37+00:00" + "time": "2019-01-25T14:35:16+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v4.0.9", + "version": "v4.2.3", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "63353a71073faf08f62caab4e6889b06a787f07b" + "reference": "bd09ad265cd50b2b9d09d65ce6aba2d29bc81fe1" }, "dist": { "type": "zip", - "url": "https://files.phpcomposer.com/files/symfony/event-dispatcher/63353a71073faf08f62caab4e6889b06a787f07b.zip", - "reference": "63353a71073faf08f62caab4e6889b06a787f07b", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/bd09ad265cd50b2b9d09d65ce6aba2d29bc81fe1", + "reference": "bd09ad265cd50b2b9d09d65ce6aba2d29bc81fe1", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": "^7.1.3", + "symfony/contracts": "^1.0" }, "conflict": { "symfony/dependency-injection": "<3.4" @@ -858,7 +1180,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -885,20 +1207,20 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2018-04-06T07:35:43+00:00" + "time": "2019-01-16T20:35:37+00:00" }, { "name": "symfony/finder", - "version": "v4.0.9", + "version": "v4.2.3", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "ca27c02b7a3fef4828c998c2ff9ba7aae1641c49" + "reference": "ef71816cbb264988bb57fe6a73f610888b9aa70c" }, "dist": { "type": "zip", - "url": "https://files.phpcomposer.com/files/symfony/finder/ca27c02b7a3fef4828c998c2ff9ba7aae1641c49.zip", - "reference": "ca27c02b7a3fef4828c998c2ff9ba7aae1641c49", + "url": "https://api.github.com/repos/symfony/finder/zipball/ef71816cbb264988bb57fe6a73f610888b9aa70c", + "reference": "ef71816cbb264988bb57fe6a73f610888b9aa70c", "shasum": "" }, "require": { @@ -907,7 +1229,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -934,20 +1256,20 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2018-04-04T05:10:37+00:00" + "time": "2019-01-16T20:35:37+00:00" }, { "name": "symfony/http-foundation", - "version": "v4.0.9", + "version": "v4.2.3", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "014487772c22d893168e5d628a13e882009fea29" + "reference": "8d2318b73e0a1bc75baa699d00ebe2ae8b595a39" }, "dist": { "type": "zip", - "url": "https://files.phpcomposer.com/files/symfony/http-foundation/014487772c22d893168e5d628a13e882009fea29.zip", - "reference": "014487772c22d893168e5d628a13e882009fea29", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/8d2318b73e0a1bc75baa699d00ebe2ae8b595a39", + "reference": "8d2318b73e0a1bc75baa699d00ebe2ae8b595a39", "shasum": "" }, "require": { @@ -955,12 +1277,13 @@ "symfony/polyfill-mbstring": "~1.1" }, "require-dev": { + "predis/predis": "~1.0", "symfony/expression-language": "~3.4|~4.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -987,33 +1310,36 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2018-04-30T01:05:59+00:00" + "time": "2019-01-29T09:49:29+00:00" }, { "name": "symfony/http-kernel", - "version": "v4.0.9", + "version": "v4.2.3", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "8333264b6de323ea27a08627d5396aa564fb9c25" + "reference": "d56b1706abaa771eb6acd894c6787cb88f1dc97d" }, "dist": { "type": "zip", - "url": "https://files.phpcomposer.com/files/symfony/http-kernel/8333264b6de323ea27a08627d5396aa564fb9c25.zip", - "reference": "8333264b6de323ea27a08627d5396aa564fb9c25", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/d56b1706abaa771eb6acd894c6787cb88f1dc97d", + "reference": "d56b1706abaa771eb6acd894c6787cb88f1dc97d", "shasum": "" }, "require": { "php": "^7.1.3", "psr/log": "~1.0", + "symfony/contracts": "^1.0.2", "symfony/debug": "~3.4|~4.0", - "symfony/event-dispatcher": "~3.4|~4.0", - "symfony/http-foundation": "~3.4.4|~4.0.4" + "symfony/event-dispatcher": "~4.1", + "symfony/http-foundation": "^4.1.1", + "symfony/polyfill-ctype": "~1.8" }, "conflict": { "symfony/config": "<3.4", - "symfony/dependency-injection": "<3.4.5|<4.0.5,>=4", - "symfony/var-dumper": "<3.4", + "symfony/dependency-injection": "<4.2", + "symfony/translation": "<4.2", + "symfony/var-dumper": "<4.1.1", "twig/twig": "<1.34|<2.4,>=2" }, "provide": { @@ -1025,7 +1351,7 @@ "symfony/config": "~3.4|~4.0", "symfony/console": "~3.4|~4.0", "symfony/css-selector": "~3.4|~4.0", - "symfony/dependency-injection": "^3.4.5|^4.0.5", + "symfony/dependency-injection": "^4.2", "symfony/dom-crawler": "~3.4|~4.0", "symfony/expression-language": "~3.4|~4.0", "symfony/finder": "~3.4|~4.0", @@ -1033,8 +1359,8 @@ "symfony/routing": "~3.4|~4.0", "symfony/stopwatch": "~3.4|~4.0", "symfony/templating": "~3.4|~4.0", - "symfony/translation": "~3.4|~4.0", - "symfony/var-dumper": "~3.4|~4.0" + "symfony/translation": "~4.2", + "symfony/var-dumper": "^4.1.1" }, "suggest": { "symfony/browser-kit": "", @@ -1046,7 +1372,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -1073,20 +1399,78 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "time": "2018-04-30T19:45:57+00:00" + "time": "2019-02-03T12:47:33+00:00" }, { - "name": "symfony/polyfill-mbstring", - "version": "v1.8.0", + "name": "symfony/polyfill-ctype", + "version": "v1.10.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "3296adf6a6454a050679cde90f95350ad604b171" + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "e3d826245268269cd66f8326bd8bc066687b4a19" }, "dist": { "type": "zip", - "url": "https://files.phpcomposer.com/files/symfony/polyfill-mbstring/3296adf6a6454a050679cde90f95350ad604b171.zip", - "reference": "3296adf6a6454a050679cde90f95350ad604b171", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19", + "reference": "e3d826245268269cd66f8326bd8bc066687b4a19", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + }, + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "time": "2018-08-06T14:22:27+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.10.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "c79c051f5b3a46be09205c73b80b346e4153e494" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/c79c051f5b3a46be09205c73b80b346e4153e494", + "reference": "c79c051f5b3a46be09205c73b80b346e4153e494", "shasum": "" }, "require": { @@ -1098,7 +1482,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.8-dev" + "dev-master": "1.9-dev" } }, "autoload": { @@ -1132,24 +1516,25 @@ "portable", "shim" ], - "time": "2018-04-26T10:06:28+00:00" + "time": "2018-09-21T13:07:52+00:00" }, { "name": "symfony/translation", - "version": "v4.0.9", + "version": "v4.2.3", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "ad3abf08eb3450491d8d76513100ef58194cd13e" + "reference": "23fd7aac70d99a17a8e6473a41fec8fab3331050" }, "dist": { "type": "zip", - "url": "https://files.phpcomposer.com/files/symfony/translation/ad3abf08eb3450491d8d76513100ef58194cd13e.zip", - "reference": "ad3abf08eb3450491d8d76513100ef58194cd13e", + "url": "https://api.github.com/repos/symfony/translation/zipball/23fd7aac70d99a17a8e6473a41fec8fab3331050", + "reference": "23fd7aac70d99a17a8e6473a41fec8fab3331050", "shasum": "" }, "require": { "php": "^7.1.3", + "symfony/contracts": "^1.0.2", "symfony/polyfill-mbstring": "~1.0" }, "conflict": { @@ -1157,9 +1542,13 @@ "symfony/dependency-injection": "<3.4", "symfony/yaml": "<3.4" }, + "provide": { + "symfony/translation-contracts-implementation": "1.0" + }, "require-dev": { "psr/log": "~1.0", "symfony/config": "~3.4|~4.0", + "symfony/console": "~3.4|~4.0", "symfony/dependency-injection": "~3.4|~4.0", "symfony/finder": "~2.8|~3.0|~4.0", "symfony/intl": "~3.4|~4.0", @@ -1173,7 +1562,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -1200,7 +1589,7 @@ ], "description": "Symfony Translation Component", "homepage": "https://symfony.com", - "time": "2018-04-30T01:23:47+00:00" + "time": "2019-01-27T23:11:39+00:00" } ], "packages-dev": [], diff --git a/src/functions.php b/src/functions.php index 87a0c44..0998d64 100644 --- a/src/functions.php +++ b/src/functions.php @@ -1,9 +1,12 @@ 'http://push.in.haowumc.com/api/wechat/', - 'appid' => 'notification', - 'secret' => '123456', +define('RPC_CONFIG',[ + 'app' => env('APP_NAME'), + 'client' => [ + 'auth' => [ + 'base_uri' => 'http://auth.in.haowumc.com', + ], + ], ]); /** @@ -15,12 +18,13 @@ define('CRM_API_CONFIG', [ function chat_text_alert($chat, $text) { - $client = new \PdInternalApi\Client('crm', CRM_API_CONFIG); + $base_client = new \JsonRpc\Client(RPC_CONFIG); + $client = $base_client->endpoint('auth'); try { - $resp = $client->call('work/text', [ - 'chat_id' => $chat, - 'text' => $text, + $resp = $client->call('notify.text', [ + ['chat' => $chat], + $text, ]); } catch (Exception $ex) { var_dump($ex->getMessage()); @@ -32,26 +36,26 @@ function chat_text_alert($chat, $text) /** * 对单个或多个用户发送报警或通知信息,多个用户id使用 | 隔开 - * @param $username * @param $text * @return mixed|null */ function user_text_alert($username, $text) { + $base_client = new \JsonRpc\Client(RPC_CONFIG); + $client = $base_client->endpoint('auth'); - $client = new \PdInternalApi\Client('crm', CRM_API_CONFIG); - + $username = explode('|',$username); try { - $resp = $client->call('work/text', [ - 'username' => $username, - 'text' => $text, + $res = $client->call('notify.text', [ + ['user' => $username], + $text, ]); } catch (Exception $ex) { var_dump($ex->getMessage()); return null; } - return $resp; + return $res; } /** @@ -65,16 +69,16 @@ function user_text_alert($username, $text) */ function chat_card_alert($chat, $title, $desc, $button, $url) { - - $client = new \PdInternalApi\Client('crm', CRM_API_CONFIG); + $base_client = new \JsonRpc\Client(RPC_CONFIG); + $client = $base_client->endpoint('auth'); try { - $resp = $client->call('work/card', [ - 'chat_id' => $chat, - 'title' => $title, - 'desc' => $desc, - 'button' => $button, - 'url' => $url, + $resp = $client->call('notify.card', [ + ['chat' => $chat], + $title, + $desc, + $button, + $url, ]); } catch (Exception $ex) { var_dump($ex->getMessage()); @@ -95,16 +99,86 @@ function chat_card_alert($chat, $title, $desc, $button, $url) */ function user_card_alert($username, $title, $desc, $button, $url) { + $base_client = new \JsonRpc\Client(RPC_CONFIG); + $client = $base_client->endpoint('auth'); - $client = new \PdInternalApi\Client('crm', CRM_API_CONFIG); + $username = explode('|',$username); + try { + $resp = $client->call('notify.card', [ + ['user' => $username], + $title, + $desc, + $button, + $url, + ]); + } catch (Exception $ex) { + var_dump($ex->getMessage()); + return null; + } + + return $resp; +} + +/** + * 对单个或多个用户发送文本卡片,多个用户id使用 | 隔开 + * @param $username + * @param $appid //小程序的appid + * @param $title //标题 + * @param $page //小程序页面路径 + * @param $desc //描述 + * @param $items //消息内容键值对,最多允许10个item + * @param $emphasisFirstItem //是否放大第一个content_item + * @return mixed|null + */ +function user_mp_alert($username, $appid, $title, $page = null, $desc = null,$items = null,$emphasisFirstItem = null) +{ + $base_client = new \JsonRpc\Client(RPC_CONFIG); + $client = $base_client->endpoint('auth'); + + $username = explode('|',$username); + try { + $resp = $client->call('notify.mp', [ + ['user' => $username], + $appid, + $title, + $page, + $desc, + $items, + $emphasisFirstItem + ]); + } catch (Exception $ex) { + var_dump($ex->getMessage()); + return null; + } + + return $resp; +} + +/** + * 对单个或多个用户发送文本卡片,多个用户id使用 | 隔开 + * @param $username + * @param $appid //小程序的appid + * @param $title //标题 + * @param $page //小程序页面路径 + * @param $desc //描述 + * @param $items //消息内容键值对,最多允许10个item + * @param $emphasisFirstItem //是否放大第一个content_item + * @return mixed|null + */ +function tag_mp_alert($tag, $appid, $title, $page = null, $desc = null,$items = null,$emphasisFirstItem = null) +{ + $base_client = new \JsonRpc\Client(RPC_CONFIG); + $client = $base_client->endpoint('auth'); try { - $resp = $client->call('work/card', [ - 'username' => $username, - 'title' => $title, - 'desc' => $desc, - 'button' => $button, - 'url' => $url, + $resp = $client->call('notify.mp', [ + ['tag' => $tag], + $appid, + $title, + $page, + $desc, + $items, + $emphasisFirstItem ]); } catch (Exception $ex) { var_dump($ex->getMessage());