From 4e41f6acd104fcc3a649ab8779f286cd66cb1f77 Mon Sep 17 00:00:00 2001 From: Nikolai Shcherbin Date: Mon, 30 Sep 2024 13:01:45 +0300 Subject: [PATCH] Vendors have been updated --- composer.json | 2 +- composer.lock | 149 +-- vendor/composer/autoload_classmap.php | 13 - vendor/composer/autoload_static.php | 13 - vendor/composer/installed.json | 162 +-- vendor/composer/installed.php | 51 +- vendor/composer/platform_check.php | 4 +- vendor/dg/twitter-php/composer.json | 20 - .../twitter-php/examples/custom-request.php | 24 - vendor/dg/twitter-php/examples/load.php | 27 - vendor/dg/twitter-php/examples/search.php | 25 - vendor/dg/twitter-php/examples/send.php | 13 - vendor/dg/twitter-php/license.md | 27 - vendor/dg/twitter-php/readme.md | 175 --- vendor/dg/twitter-php/src/OAuth.php | 1030 ----------------- vendor/dg/twitter-php/src/Twitter.php | 438 ------- vendor/dg/twitter-php/src/twitter.class.php | 4 - vendor/lcobucci/clock/composer.json | 28 +- vendor/lcobucci/clock/renovate.json | 6 - vendor/lcobucci/clock/src/SystemClock.php | 2 +- vendor/mod.lnk | Bin 1099 -> 0 bytes vendor/p3k/xray/composer.json | 3 +- vendor/p3k/xray/composer.lock | 47 +- vendor/p3k/xray/controllers/Parse.php | 1 - vendor/symfony/dom-crawler/UriResolver.php | 6 +- vendor/symfony/polyfill-ctype/composer.json | 2 +- vendor/symfony/polyfill-mbstring/Mbstring.php | 77 +- .../symfony/polyfill-mbstring/bootstrap.php | 13 + .../symfony/polyfill-mbstring/bootstrap80.php | 14 +- .../symfony/polyfill-mbstring/composer.json | 2 +- vendor/symfony/polyfill-php80/composer.json | 2 +- 31 files changed, 236 insertions(+), 2144 deletions(-) delete mode 100644 vendor/dg/twitter-php/composer.json delete mode 100644 vendor/dg/twitter-php/examples/custom-request.php delete mode 100644 vendor/dg/twitter-php/examples/load.php delete mode 100644 vendor/dg/twitter-php/examples/search.php delete mode 100644 vendor/dg/twitter-php/examples/send.php delete mode 100644 vendor/dg/twitter-php/license.md delete mode 100644 vendor/dg/twitter-php/readme.md delete mode 100644 vendor/dg/twitter-php/src/OAuth.php delete mode 100644 vendor/dg/twitter-php/src/Twitter.php delete mode 100644 vendor/dg/twitter-php/src/twitter.class.php delete mode 100644 vendor/lcobucci/clock/renovate.json delete mode 100644 vendor/mod.lnk diff --git a/composer.json b/composer.json index 7bace54..d3c41fc 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ } }, "require": { - "php": "^8.2", + "php": "^8.3", "guzzlehttp/guzzle": "^7.0", "masterminds/html5": "^2.0", "indieweb/mention-client": "^1.2.1", diff --git a/composer.lock b/composer.lock index abf9dc6..5f218c2 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": "8f6d4e39a21374617083e03497938b03", + "content-hash": "4e17d68bbf51bab54b52051139a805ea", "packages": [ { "name": "cebe/markdown", @@ -70,51 +70,6 @@ }, "time": "2018-03-26T11:24:36+00:00" }, - { - "name": "dg/twitter-php", - "version": "v3.8", - "source": { - "type": "git", - "url": "https://github.com/dg/twitter-php.git", - "reference": "d9370c9759138200a77ca86abcb0c5ddfe857c68" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/dg/twitter-php/zipball/d9370c9759138200a77ca86abcb0c5ddfe857c68", - "reference": "d9370c9759138200a77ca86abcb0c5ddfe857c68", - "shasum": "" - }, - "require": { - "ext-curl": "*", - "php": ">=5.4.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "David Grudl", - "homepage": "https://davidgrudl.com" - } - ], - "description": "Small and easy Twitter library for PHP", - "homepage": "https://github.com/dg/twitter-php", - "keywords": [ - "oauth", - "twitter" - ], - "support": { - "source": "https://github.com/dg/twitter-php/tree/v3.8" - }, - "time": "2019-02-08T16:20:01+00:00" - }, { "name": "ezyang/htmlpurifier", "version": "v4.17.0", @@ -760,34 +715,31 @@ }, { "name": "lcobucci/clock", - "version": "2.3.0", + "version": "2.2.0", "source": { "type": "git", "url": "https://github.com/lcobucci/clock.git", - "reference": "c7aadcd6fd97ed9e199114269c0be3f335e38876" + "reference": "fb533e093fd61321bfcbac08b131ce805fe183d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/lcobucci/clock/zipball/c7aadcd6fd97ed9e199114269c0be3f335e38876", - "reference": "c7aadcd6fd97ed9e199114269c0be3f335e38876", + "url": "https://api.github.com/repos/lcobucci/clock/zipball/fb533e093fd61321bfcbac08b131ce805fe183d3", + "reference": "fb533e093fd61321bfcbac08b131ce805fe183d3", "shasum": "" }, "require": { - "php": "~8.1.0 || ~8.2.0", - "stella-maris/clock": "^0.1.7" - }, - "provide": { - "psr/clock-implementation": "1.0" + "php": "^8.0", + "stella-maris/clock": "^0.1.4" }, "require-dev": { "infection/infection": "^0.26", - "lcobucci/coding-standard": "^9.0", - "phpstan/extension-installer": "^1.2", - "phpstan/phpstan": "^1.9.4", - "phpstan/phpstan-deprecation-rules": "^1.1.1", - "phpstan/phpstan-phpunit": "^1.3.2", - "phpstan/phpstan-strict-rules": "^1.4.4", - "phpunit/phpunit": "^9.5.27" + "lcobucci/coding-standard": "^8.0", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-deprecation-rules": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpstan/phpstan-strict-rules": "^0.12", + "phpunit/phpunit": "^9.5" }, "type": "library", "autoload": { @@ -808,7 +760,7 @@ "description": "Yet another clock abstraction", "support": { "issues": "https://github.com/lcobucci/clock/issues", - "source": "https://github.com/lcobucci/clock/tree/2.3.0" + "source": "https://github.com/lcobucci/clock/tree/2.2.0" }, "funding": [ { @@ -820,7 +772,7 @@ "type": "patreon" } ], - "time": "2022-12-19T14:38:11+00:00" + "time": "2022-04-19T19:34:17+00:00" }, { "name": "lcobucci/jwt", @@ -1275,21 +1227,20 @@ }, { "name": "p3k/xray", - "version": "v1.15.0", + "version": "v1.15.1", "source": { "type": "git", "url": "https://github.com/aaronpk/XRay.git", - "reference": "c530011b2cd7c37c929beaf9fdaf3890c9650f4a" + "reference": "a4cda273d34c56317197511d0f4799f5f00465e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aaronpk/XRay/zipball/c530011b2cd7c37c929beaf9fdaf3890c9650f4a", - "reference": "c530011b2cd7c37c929beaf9fdaf3890c9650f4a", + "url": "https://api.github.com/repos/aaronpk/XRay/zipball/a4cda273d34c56317197511d0f4799f5f00465e9", + "reference": "a4cda273d34c56317197511d0f4799f5f00465e9", "shasum": "" }, "require": { "cebe/markdown": "^1.1.0", - "dg/twitter-php": "^3.0.0", "ezyang/htmlpurifier": "^4.10", "indieweb/link-rel-parser": "^0.1.0", "masterminds/html5": "^2.3", @@ -1321,9 +1272,9 @@ "homepage": "https://github.com/aaronpk/XRay", "support": { "issues": "https://github.com/aaronpk/XRay/issues", - "source": "https://github.com/aaronpk/XRay/tree/v1.15.0" + "source": "https://github.com/aaronpk/XRay/tree/v1.15.1" }, - "time": "2024-08-30T14:29:22+00:00" + "time": "2024-08-31T16:21:43+00:00" }, { "name": "pfefferle/openwebicons", @@ -1795,16 +1746,16 @@ }, { "name": "symfony/dom-crawler", - "version": "v5.4.40", + "version": "v5.4.44", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", - "reference": "2ad469c3e07fdba677b278d0e266071a51aa0dac" + "reference": "4c76e4176a5472c5afe504194d7bbef5cfdd1703" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/2ad469c3e07fdba677b278d0e266071a51aa0dac", - "reference": "2ad469c3e07fdba677b278d0e266071a51aa0dac", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/4c76e4176a5472c5afe504194d7bbef5cfdd1703", + "reference": "4c76e4176a5472c5afe504194d7bbef5cfdd1703", "shasum": "" }, "require": { @@ -1850,7 +1801,7 @@ "description": "Eases DOM navigation for HTML and XML documents", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dom-crawler/tree/v5.4.40" + "source": "https://github.com/symfony/dom-crawler/tree/v5.4.44" }, "funding": [ { @@ -1866,24 +1817,24 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:33:22+00:00" + "time": "2024-09-11T06:50:28+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.30.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "0424dff1c58f028c451efff2045f5d92410bd540" + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/0424dff1c58f028c451efff2045f5d92410bd540", - "reference": "0424dff1c58f028c451efff2045f5d92410bd540", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638", + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "provide": { "ext-ctype": "*" @@ -1929,7 +1880,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.31.0" }, "funding": [ { @@ -1945,24 +1896,24 @@ "type": "tidelift" } ], - "time": "2024-05-31T15:07:36+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.30.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c" + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fd22ab50000ef01661e2a31d850ebaa297f8e03c", - "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341", + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "provide": { "ext-mbstring": "*" @@ -2009,7 +1960,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0" }, "funding": [ { @@ -2025,24 +1976,24 @@ "type": "tidelift" } ], - "time": "2024-06-19T12:30:46+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.30.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "77fa7995ac1b21ab60769b7323d600a991a90433" + "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/77fa7995ac1b21ab60769b7323d600a991a90433", - "reference": "77fa7995ac1b21ab60769b7323d600a991a90433", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", + "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "type": "library", "extra": { @@ -2089,7 +2040,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.31.0" }, "funding": [ { @@ -2105,7 +2056,7 @@ "type": "tidelift" } ], - "time": "2024-05-31T15:07:36+00:00" + "time": "2024-09-09T11:45:10+00:00" } ], "packages-dev": [], @@ -2117,7 +2068,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^8.2" + "php": "^8.3" }, "platform-dev": [], "plugin-api-version": "2.3.0" diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 83ddd34..5490b88 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -10,19 +10,6 @@ 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', 'PhpToken' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/PhpToken.php', 'Stringable' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Stringable.php', - 'Twitter' => $vendorDir . '/dg/twitter-php/src/Twitter.php', - 'TwitterException' => $vendorDir . '/dg/twitter-php/src/Twitter.php', - 'Twitter_OAuthConsumer' => $vendorDir . '/dg/twitter-php/src/OAuth.php', - 'Twitter_OAuthDataStore' => $vendorDir . '/dg/twitter-php/src/OAuth.php', - 'Twitter_OAuthException' => $vendorDir . '/dg/twitter-php/src/OAuth.php', - 'Twitter_OAuthRequest' => $vendorDir . '/dg/twitter-php/src/OAuth.php', - 'Twitter_OAuthServer' => $vendorDir . '/dg/twitter-php/src/OAuth.php', - 'Twitter_OAuthSignatureMethod' => $vendorDir . '/dg/twitter-php/src/OAuth.php', - 'Twitter_OAuthSignatureMethod_HMAC_SHA1' => $vendorDir . '/dg/twitter-php/src/OAuth.php', - 'Twitter_OAuthSignatureMethod_PLAINTEXT' => $vendorDir . '/dg/twitter-php/src/OAuth.php', - 'Twitter_OAuthSignatureMethod_RSA_SHA1' => $vendorDir . '/dg/twitter-php/src/OAuth.php', - 'Twitter_OAuthToken' => $vendorDir . '/dg/twitter-php/src/OAuth.php', - 'Twitter_OAuthUtil' => $vendorDir . '/dg/twitter-php/src/OAuth.php', 'UnhandledMatchError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php', 'ValueError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/ValueError.php', ); diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 9016c3d..442bbec 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -199,19 +199,6 @@ class ComposerStaticInitab3e38c9bd63257d5c8ab767c7dc575e 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', 'PhpToken' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/PhpToken.php', 'Stringable' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Stringable.php', - 'Twitter' => __DIR__ . '/..' . '/dg/twitter-php/src/Twitter.php', - 'TwitterException' => __DIR__ . '/..' . '/dg/twitter-php/src/Twitter.php', - 'Twitter_OAuthConsumer' => __DIR__ . '/..' . '/dg/twitter-php/src/OAuth.php', - 'Twitter_OAuthDataStore' => __DIR__ . '/..' . '/dg/twitter-php/src/OAuth.php', - 'Twitter_OAuthException' => __DIR__ . '/..' . '/dg/twitter-php/src/OAuth.php', - 'Twitter_OAuthRequest' => __DIR__ . '/..' . '/dg/twitter-php/src/OAuth.php', - 'Twitter_OAuthServer' => __DIR__ . '/..' . '/dg/twitter-php/src/OAuth.php', - 'Twitter_OAuthSignatureMethod' => __DIR__ . '/..' . '/dg/twitter-php/src/OAuth.php', - 'Twitter_OAuthSignatureMethod_HMAC_SHA1' => __DIR__ . '/..' . '/dg/twitter-php/src/OAuth.php', - 'Twitter_OAuthSignatureMethod_PLAINTEXT' => __DIR__ . '/..' . '/dg/twitter-php/src/OAuth.php', - 'Twitter_OAuthSignatureMethod_RSA_SHA1' => __DIR__ . '/..' . '/dg/twitter-php/src/OAuth.php', - 'Twitter_OAuthToken' => __DIR__ . '/..' . '/dg/twitter-php/src/OAuth.php', - 'Twitter_OAuthUtil' => __DIR__ . '/..' . '/dg/twitter-php/src/OAuth.php', 'UnhandledMatchError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php', 'ValueError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/ValueError.php', ); diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index a52dac4..43f1ed4 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -67,54 +67,6 @@ }, "install-path": "../cebe/markdown" }, - { - "name": "dg/twitter-php", - "version": "v3.8", - "version_normalized": "3.8.0.0", - "source": { - "type": "git", - "url": "https://github.com/dg/twitter-php.git", - "reference": "d9370c9759138200a77ca86abcb0c5ddfe857c68" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/dg/twitter-php/zipball/d9370c9759138200a77ca86abcb0c5ddfe857c68", - "reference": "d9370c9759138200a77ca86abcb0c5ddfe857c68", - "shasum": "" - }, - "require": { - "ext-curl": "*", - "php": ">=5.4.0" - }, - "time": "2019-02-08T16:20:01+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "David Grudl", - "homepage": "https://davidgrudl.com" - } - ], - "description": "Small and easy Twitter library for PHP", - "homepage": "https://github.com/dg/twitter-php", - "keywords": [ - "oauth", - "twitter" - ], - "support": { - "source": "https://github.com/dg/twitter-php/tree/v3.8" - }, - "install-path": "../dg/twitter-php" - }, { "name": "ezyang/htmlpurifier", "version": "v4.17.0", @@ -787,37 +739,34 @@ }, { "name": "lcobucci/clock", - "version": "2.3.0", - "version_normalized": "2.3.0.0", + "version": "2.2.0", + "version_normalized": "2.2.0.0", "source": { "type": "git", "url": "https://github.com/lcobucci/clock.git", - "reference": "c7aadcd6fd97ed9e199114269c0be3f335e38876" + "reference": "fb533e093fd61321bfcbac08b131ce805fe183d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/lcobucci/clock/zipball/c7aadcd6fd97ed9e199114269c0be3f335e38876", - "reference": "c7aadcd6fd97ed9e199114269c0be3f335e38876", + "url": "https://api.github.com/repos/lcobucci/clock/zipball/fb533e093fd61321bfcbac08b131ce805fe183d3", + "reference": "fb533e093fd61321bfcbac08b131ce805fe183d3", "shasum": "" }, "require": { - "php": "~8.1.0 || ~8.2.0", - "stella-maris/clock": "^0.1.7" - }, - "provide": { - "psr/clock-implementation": "1.0" + "php": "^8.0", + "stella-maris/clock": "^0.1.4" }, "require-dev": { "infection/infection": "^0.26", - "lcobucci/coding-standard": "^9.0", - "phpstan/extension-installer": "^1.2", - "phpstan/phpstan": "^1.9.4", - "phpstan/phpstan-deprecation-rules": "^1.1.1", - "phpstan/phpstan-phpunit": "^1.3.2", - "phpstan/phpstan-strict-rules": "^1.4.4", - "phpunit/phpunit": "^9.5.27" - }, - "time": "2022-12-19T14:38:11+00:00", + "lcobucci/coding-standard": "^8.0", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-deprecation-rules": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpstan/phpstan-strict-rules": "^0.12", + "phpunit/phpunit": "^9.5" + }, + "time": "2022-04-19T19:34:17+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -838,7 +787,7 @@ "description": "Yet another clock abstraction", "support": { "issues": "https://github.com/lcobucci/clock/issues", - "source": "https://github.com/lcobucci/clock/tree/2.3.0" + "source": "https://github.com/lcobucci/clock/tree/2.2.0" }, "funding": [ { @@ -1329,22 +1278,21 @@ }, { "name": "p3k/xray", - "version": "v1.15.0", - "version_normalized": "1.15.0.0", + "version": "v1.15.1", + "version_normalized": "1.15.1.0", "source": { "type": "git", "url": "https://github.com/aaronpk/XRay.git", - "reference": "c530011b2cd7c37c929beaf9fdaf3890c9650f4a" + "reference": "a4cda273d34c56317197511d0f4799f5f00465e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aaronpk/XRay/zipball/c530011b2cd7c37c929beaf9fdaf3890c9650f4a", - "reference": "c530011b2cd7c37c929beaf9fdaf3890c9650f4a", + "url": "https://api.github.com/repos/aaronpk/XRay/zipball/a4cda273d34c56317197511d0f4799f5f00465e9", + "reference": "a4cda273d34c56317197511d0f4799f5f00465e9", "shasum": "" }, "require": { "cebe/markdown": "^1.1.0", - "dg/twitter-php": "^3.0.0", "ezyang/htmlpurifier": "^4.10", "indieweb/link-rel-parser": "^0.1.0", "masterminds/html5": "^2.3", @@ -1358,7 +1306,7 @@ "league/route": "^1.0", "phpunit/phpunit": "^8.0.0|^9.0.0" }, - "time": "2024-08-30T14:29:22+00:00", + "time": "2024-08-31T16:21:43+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -1378,7 +1326,7 @@ "homepage": "https://github.com/aaronpk/XRay", "support": { "issues": "https://github.com/aaronpk/XRay/issues", - "source": "https://github.com/aaronpk/XRay/tree/v1.15.0" + "source": "https://github.com/aaronpk/XRay/tree/v1.15.1" }, "install-path": "../p3k/xray" }, @@ -1879,17 +1827,17 @@ }, { "name": "symfony/dom-crawler", - "version": "v5.4.40", - "version_normalized": "5.4.40.0", + "version": "v5.4.44", + "version_normalized": "5.4.44.0", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", - "reference": "2ad469c3e07fdba677b278d0e266071a51aa0dac" + "reference": "4c76e4176a5472c5afe504194d7bbef5cfdd1703" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/2ad469c3e07fdba677b278d0e266071a51aa0dac", - "reference": "2ad469c3e07fdba677b278d0e266071a51aa0dac", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/4c76e4176a5472c5afe504194d7bbef5cfdd1703", + "reference": "4c76e4176a5472c5afe504194d7bbef5cfdd1703", "shasum": "" }, "require": { @@ -1909,7 +1857,7 @@ "suggest": { "symfony/css-selector": "" }, - "time": "2024-05-31T14:33:22+00:00", + "time": "2024-09-11T06:50:28+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -1937,7 +1885,7 @@ "description": "Eases DOM navigation for HTML and XML documents", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dom-crawler/tree/v5.4.40" + "source": "https://github.com/symfony/dom-crawler/tree/v5.4.44" }, "funding": [ { @@ -1957,21 +1905,21 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.30.0", - "version_normalized": "1.30.0.0", + "version": "v1.31.0", + "version_normalized": "1.31.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "0424dff1c58f028c451efff2045f5d92410bd540" + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/0424dff1c58f028c451efff2045f5d92410bd540", - "reference": "0424dff1c58f028c451efff2045f5d92410bd540", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638", + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "provide": { "ext-ctype": "*" @@ -1979,7 +1927,7 @@ "suggest": { "ext-ctype": "For best performance" }, - "time": "2024-05-31T15:07:36+00:00", + "time": "2024-09-09T11:45:10+00:00", "type": "library", "extra": { "thanks": { @@ -2019,7 +1967,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.31.0" }, "funding": [ { @@ -2039,21 +1987,21 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.30.0", - "version_normalized": "1.30.0.0", + "version": "v1.31.0", + "version_normalized": "1.31.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c" + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fd22ab50000ef01661e2a31d850ebaa297f8e03c", - "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341", + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "provide": { "ext-mbstring": "*" @@ -2061,7 +2009,7 @@ "suggest": { "ext-mbstring": "For best performance" }, - "time": "2024-06-19T12:30:46+00:00", + "time": "2024-09-09T11:45:10+00:00", "type": "library", "extra": { "thanks": { @@ -2102,7 +2050,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0" }, "funding": [ { @@ -2122,23 +2070,23 @@ }, { "name": "symfony/polyfill-php80", - "version": "v1.30.0", - "version_normalized": "1.30.0.0", + "version": "v1.31.0", + "version_normalized": "1.31.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "77fa7995ac1b21ab60769b7323d600a991a90433" + "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/77fa7995ac1b21ab60769b7323d600a991a90433", - "reference": "77fa7995ac1b21ab60769b7323d600a991a90433", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", + "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, - "time": "2024-05-31T15:07:36+00:00", + "time": "2024-09-09T11:45:10+00:00", "type": "library", "extra": { "thanks": { @@ -2185,7 +2133,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.31.0" }, "funding": [ { diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 5baa5b5..cd6d12a 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -19,15 +19,6 @@ 'aliases' => array(), 'dev_requirement' => false, ), - 'dg/twitter-php' => array( - 'pretty_version' => 'v3.8', - 'version' => '3.8.0.0', - 'reference' => 'd9370c9759138200a77ca86abcb0c5ddfe857c68', - 'type' => 'library', - 'install_path' => __DIR__ . '/../dg/twitter-php', - 'aliases' => array(), - 'dev_requirement' => false, - ), 'ezyang/htmlpurifier' => array( 'pretty_version' => 'v4.17.0', 'version' => '4.17.0.0', @@ -110,9 +101,9 @@ 'dev_requirement' => false, ), 'lcobucci/clock' => array( - 'pretty_version' => '2.3.0', - 'version' => '2.3.0.0', - 'reference' => 'c7aadcd6fd97ed9e199114269c0be3f335e38876', + 'pretty_version' => '2.2.0', + 'version' => '2.2.0.0', + 'reference' => 'fb533e093fd61321bfcbac08b131ce805fe183d3', 'type' => 'library', 'install_path' => __DIR__ . '/../lcobucci/clock', 'aliases' => array(), @@ -197,9 +188,9 @@ 'dev_requirement' => false, ), 'p3k/xray' => array( - 'pretty_version' => 'v1.15.0', - 'version' => '1.15.0.0', - 'reference' => 'c530011b2cd7c37c929beaf9fdaf3890c9650f4a', + 'pretty_version' => 'v1.15.1', + 'version' => '1.15.1.0', + 'reference' => 'a4cda273d34c56317197511d0f4799f5f00465e9', 'type' => 'library', 'install_path' => __DIR__ . '/../p3k/xray', 'aliases' => array(), @@ -223,12 +214,6 @@ 'aliases' => array(), 'dev_requirement' => false, ), - 'psr/clock-implementation' => array( - 'dev_requirement' => false, - 'provided' => array( - 0 => '1.0', - ), - ), 'psr/http-client' => array( 'pretty_version' => '1.0.3', 'version' => '1.0.3.0', @@ -322,36 +307,36 @@ 'dev_requirement' => false, ), 'symfony/dom-crawler' => array( - 'pretty_version' => 'v5.4.40', - 'version' => '5.4.40.0', - 'reference' => '2ad469c3e07fdba677b278d0e266071a51aa0dac', + 'pretty_version' => 'v5.4.44', + 'version' => '5.4.44.0', + 'reference' => '4c76e4176a5472c5afe504194d7bbef5cfdd1703', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/dom-crawler', 'aliases' => array(), 'dev_requirement' => false, ), 'symfony/polyfill-ctype' => array( - 'pretty_version' => 'v1.30.0', - 'version' => '1.30.0.0', - 'reference' => '0424dff1c58f028c451efff2045f5d92410bd540', + 'pretty_version' => 'v1.31.0', + 'version' => '1.31.0.0', + 'reference' => 'a3cc8b044a6ea513310cbd48ef7333b384945638', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-ctype', 'aliases' => array(), 'dev_requirement' => false, ), 'symfony/polyfill-mbstring' => array( - 'pretty_version' => 'v1.30.0', - 'version' => '1.30.0.0', - 'reference' => 'fd22ab50000ef01661e2a31d850ebaa297f8e03c', + 'pretty_version' => 'v1.31.0', + 'version' => '1.31.0.0', + 'reference' => '85181ba99b2345b0ef10ce42ecac37612d9fd341', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', 'aliases' => array(), 'dev_requirement' => false, ), 'symfony/polyfill-php80' => array( - 'pretty_version' => 'v1.30.0', - 'version' => '1.30.0.0', - 'reference' => '77fa7995ac1b21ab60769b7323d600a991a90433', + 'pretty_version' => 'v1.31.0', + 'version' => '1.31.0.0', + 'reference' => '60328e362d4c2c802a54fcbf04f9d3fb892b4cf8', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php80', 'aliases' => array(), diff --git a/vendor/composer/platform_check.php b/vendor/composer/platform_check.php index d32d90c..2a8f1c8 100644 --- a/vendor/composer/platform_check.php +++ b/vendor/composer/platform_check.php @@ -4,8 +4,8 @@ $issues = array(); -if (!(PHP_VERSION_ID >= 80200)) { - $issues[] = 'Your Composer dependencies require a PHP version ">= 8.2.0". You are running ' . PHP_VERSION . '.'; +if (!(PHP_VERSION_ID >= 80300)) { + $issues[] = 'Your Composer dependencies require a PHP version ">= 8.3.0". You are running ' . PHP_VERSION . '.'; } if ($issues) { diff --git a/vendor/dg/twitter-php/composer.json b/vendor/dg/twitter-php/composer.json deleted file mode 100644 index 5bcd945..0000000 --- a/vendor/dg/twitter-php/composer.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "dg/twitter-php", - "description": "Small and easy Twitter library for PHP", - "keywords": ["twitter", "oauth"], - "homepage": "https://github.com/dg/twitter-php", - "license": ["BSD-3-Clause"], - "authors": [ - { - "name": "David Grudl", - "homepage": "https://davidgrudl.com" - } - ], - "require": { - "php": ">=5.4.0", - "ext-curl": "*" - }, - "autoload": { - "classmap": ["src/"] - } -} diff --git a/vendor/dg/twitter-php/examples/custom-request.php b/vendor/dg/twitter-php/examples/custom-request.php deleted file mode 100644 index 2393fe3..0000000 --- a/vendor/dg/twitter-php/examples/custom-request.php +++ /dev/null @@ -1,24 +0,0 @@ -request('statuses/retweets_of_me', 'GET'); - -?> - - -Twitter retweets of me - - diff --git a/vendor/dg/twitter-php/examples/load.php b/vendor/dg/twitter-php/examples/load.php deleted file mode 100644 index d762542..0000000 --- a/vendor/dg/twitter-php/examples/load.php +++ /dev/null @@ -1,27 +0,0 @@ -load(Twitter::ME_AND_FRIENDS); - -?> - - -Twitter timeline demo - - diff --git a/vendor/dg/twitter-php/examples/search.php b/vendor/dg/twitter-php/examples/search.php deleted file mode 100644 index e1ba4cd..0000000 --- a/vendor/dg/twitter-php/examples/search.php +++ /dev/null @@ -1,25 +0,0 @@ -search('#nette'); -// or use hashmap: $results = $twitter->search(['q' => '#nette', 'geocode' => '50.088224,15.975611,20km']); - -?> - - -Twitter search demo - - diff --git a/vendor/dg/twitter-php/examples/send.php b/vendor/dg/twitter-php/examples/send.php deleted file mode 100644 index 278a936..0000000 --- a/vendor/dg/twitter-php/examples/send.php +++ /dev/null @@ -1,13 +0,0 @@ -send('I am fine'); // you can add $imagePath or array of image paths as second argument - -} catch (TwitterException $e) { - echo 'Error: ' . $e->getMessage(); -} diff --git a/vendor/dg/twitter-php/license.md b/vendor/dg/twitter-php/license.md deleted file mode 100644 index 3aa00ad..0000000 --- a/vendor/dg/twitter-php/license.md +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2008, Copyright (c) 2008 David Grudl -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * Neither the name of David Grudl nor the names of its - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/dg/twitter-php/readme.md b/vendor/dg/twitter-php/readme.md deleted file mode 100644 index 9730038..0000000 --- a/vendor/dg/twitter-php/readme.md +++ /dev/null @@ -1,175 +0,0 @@ -[Twitter for PHP](https://phpfashion.com/twitter-for-php) [![Buy me a coffee](https://files.nette.org/images/coffee1s.png)](https://nette.org/make-donation?to=twitter-php) -================================ - -[![Downloads this Month](https://img.shields.io/packagist/dm/dg/twitter-php.svg)](https://packagist.org/packages/dg/twitter-php) - -Twitter for PHP is a very small and easy-to-use library for sending -messages to Twitter and receiving status updates. - -If you like this, **[please make a donation now](https://nette.org/make-donation?to=twitter-php)**. Thank you! - -It requires PHP 5.4 or newer with CURL extension and is licensed under the New BSD License. -You can obtain the latest version from our [GitHub repository](https://github.com/dg/twitter-php) -or install it via Composer: - - composer require dg/twitter-php - - -Usage ------ -Sign in to the https://twitter.com and register an application from the https://apps.twitter.com page. Remember -to never reveal your consumer secrets. Click on My Access Token link from the sidebar and retrieve your own access -token. Now you have consumer key, consumer secret, access token and access token secret. - -Create object using application and request/access keys - -```php -$twitter = new Twitter($consumerKey, $consumerSecret, $accessToken, $accessTokenSecret); -``` - -The send() method updates your status. The message must be encoded in UTF-8: - -```php -$twitter->send('I am fine today.'); -``` - -The load() method returns the 20 most recent status updates -posted in the last 24 hours by you: - -```php -$statuses = $twitter->load(Twitter::ME); -``` - -or posted by you and your friends: - -```php -$statuses = $twitter->load(Twitter::ME_AND_FRIENDS); -``` -or most recent mentions for you: - -```php -$statuses = $twitter->load(Twitter::REPLIES); -``` -Extracting the information from the channel is easy: - -```php -foreach ($statuses as $status) { - echo "message: ", Twitter::clickable($status); - echo "posted at " , $status->created_at; - echo "posted by " , $status->user->name; -} -``` - -The static method `Twitter::clickable()` makes links, mentions and hash tags in status clickable. - -The authenticate() method tests if user credentials are valid: - -```php -if (!$twitter->authenticate()) { - die('Invalid name or password'); -} -``` - -The search() method provides searching in twitter statuses: - -```php -$results = $twitter->search('#nette'); -``` - -The returned result is a again array of statuses. - - -Error handling --------------- - -All methods throw a TwitterException on error: - -```php -try { - $statuses = $twitter->load(Twitter::ME); -} catch (TwitterException $e) { - echo "Error: ", $e->getMessage(); -} -``` - -Additional features -------------------- - -The `authenticate()` method tests if user credentials are valid: - -```php -if (!$twitter->authenticate()) { - die('Invalid name or password'); -} -``` - -Other commands --------------- - -You can use all commands defined by [Twitter API 1.1](https://dev.twitter.com/rest/public). -For example [GET statuses/retweets_of_me](https://dev.twitter.com/rest/reference/get/statuses/retweets_of_me) -returns the array of most recent tweets authored by the authenticating user: - -```php -$statuses = $twitter->request('statuses/retweets_of_me', 'GET', ['count' => 20]); -``` - -Changelog ---------- -v3.8 (2/2019) -- Twitter::sendDirectMessage() uses new API -- Twitter::clickable: added support for $status->full_text (#60) - -v3.7 (3/2018) -- minimal required PHP version changed to 5.4 -- Twitter::send() added $options -- Twitter::clickable() now works only with statuses and entites -- fixed coding style - -v3.6 (8/2016) -- added loadUserFollowersList() and sendDirectMessage() -- Twitter::send() allows to upload multiple images -- changed http:// to https:// - -v3.5 (12/2014) -- allows to send message starting with @ and upload file at the same time in PHP >= 5.5 - -v3.4 (11/2014) -- cache expiration can be specified as string -- fixed some bugs - -v3.3 (3/2014) -- Twitter::send($status, $image) can upload image -- added Twitter::follow() - -v3.2 (1/2014) -- Twitter API uses SSL OAuth -- Twitter::clickable() supports media -- added Twitter::loadUserInfoById() and loadUserFollowers() -- fixed Twitter::destroy() - -v3.1 (3/2013) -- Twitter::load() - added third argument $data -- Twitter::clickable() uses entities; pass as parameter status object, not just text -- added Twitter::$httpOptions for custom cURL configuration - -v3.0 (12/2012) -- updated to Twitter API 1.1. Some stuff deprecated by Twitter was removed: - - removed RSS, ATOM and XML support - - removed Twitter::ALL - - Twitter::load() - removed third argument $page - - Twitter::search() requires authentication and returns different structure -- removed shortening URL using http://is.gd -- changed order of Twitter::request() arguments to $resource, $method, $data - -v2.0 (8/2012) -- added support for OAuth authentication protocol -- added Twitter::clickable() which makes links, @usernames and #hashtags clickable -- installable via `composer require dg/twitter-php` - -v1.0 (7/2008) -- initial release - - ------ -(c) David Grudl, 2008, 2016 (https://davidgrudl.com) diff --git a/vendor/dg/twitter-php/src/OAuth.php b/vendor/dg/twitter-php/src/OAuth.php deleted file mode 100644 index 8c8e5df..0000000 --- a/vendor/dg/twitter-php/src/OAuth.php +++ /dev/null @@ -1,1030 +0,0 @@ -key = $key; - $this->secret = $secret; - $this->callback_url = $callback_url; - } - - - public function __toString() - { - return "OAuthConsumer[key=$this->key,secret=$this->secret]"; - } -} - -class Twitter_OAuthToken -{ - // access tokens and request tokens - public $key; - public $secret; - - - /** - * key = the token - * secret = the token secret - */ - public function __construct($key, $secret) - { - $this->key = $key; - $this->secret = $secret; - } - - - /** - * generates the basic string serialization of a token that a server - * would respond to request_token and access_token calls with - */ - public function to_string() - { - return 'oauth_token=' . - Twitter_OAuthUtil::urlencode_rfc3986($this->key) . - '&oauth_token_secret=' . - Twitter_OAuthUtil::urlencode_rfc3986($this->secret); - } - - - public function __toString() - { - return $this->to_string(); - } -} - -/** - * A class for implementing a Signature Method - * See section 9 ("Signing Requests") in the spec - */ -abstract class Twitter_OAuthSignatureMethod -{ - /** - * Needs to return the name of the Signature Method (ie HMAC-SHA1) - * @return string - */ - abstract public function get_name(); - - - /** - * Build up the signature - * NOTE: The output of this function MUST NOT be urlencoded. - * the encoding is handled in OAuthRequest when the final - * request is serialized - * @param Twitter_OAuthRequest $request - * @param Twitter_OAuthConsumer $consumer - * @param Twitter_OAuthToken $token - * @return string - */ - abstract public function build_signature($request, $consumer, $token); - - - /** - * Verifies that a given signature is correct - * @param Twitter_OAuthRequest $request - * @param Twitter_OAuthConsumer $consumer - * @param Twitter_OAuthToken $token - * @param string $signature - * @return bool - */ - public function check_signature($request, $consumer, $token, $signature) - { - $built = $this->build_signature($request, $consumer, $token); - return $built == $signature; - } -} - -/** - * The HMAC-SHA1 signature method uses the HMAC-SHA1 signature algorithm as defined in [RFC2104] - * where the Signature Base String is the text and the key is the concatenated values (each first - * encoded per Parameter Encoding) of the Consumer Secret and Token Secret, separated by an '&' - * character (ASCII code 38) even if empty. - * - Chapter 9.2 ("HMAC-SHA1") - */ -class Twitter_OAuthSignatureMethod_HMAC_SHA1 extends Twitter_OAuthSignatureMethod -{ - public function get_name() - { - return 'HMAC-SHA1'; - } - - - public function build_signature($request, $consumer, $token) - { - $base_string = $request->get_signature_base_string(); - $request->base_string = $base_string; - - $key_parts = [ - $consumer->secret, - ($token) ? $token->secret : '', - ]; - - $key_parts = Twitter_OAuthUtil::urlencode_rfc3986($key_parts); - $key = implode('&', $key_parts); - - return base64_encode(hash_hmac('sha1', $base_string, $key, true)); - } -} - -/** - * The PLAINTEXT method does not provide any security protection and SHOULD only be used - * over a secure channel such as HTTPS. It does not use the Signature Base String. - * - Chapter 9.4 ("PLAINTEXT") - */ -class Twitter_OAuthSignatureMethod_PLAINTEXT extends Twitter_OAuthSignatureMethod -{ - public function get_name() - { - return 'PLAINTEXT'; - } - - - /** - * oauth_signature is set to the concatenated encoded values of the Consumer Secret and - * Token Secret, separated by a '&' character (ASCII code 38), even if either secret is - * empty. The result MUST be encoded again. - * - Chapter 9.4.1 ("Generating Signatures") - * - * Please note that the second encoding MUST NOT happen in the SignatureMethod, as - * OAuthRequest handles this! - */ - public function build_signature($request, $consumer, $token) - { - $key_parts = [ - $consumer->secret, - ($token) ? $token->secret : '', - ]; - - $key_parts = Twitter_OAuthUtil::urlencode_rfc3986($key_parts); - $key = implode('&', $key_parts); - $request->base_string = $key; - - return $key; - } -} - -/** - * The RSA-SHA1 signature method uses the RSASSA-PKCS1-v1_5 signature algorithm as defined in - * [RFC3447] section 8.2 (more simply known as PKCS#1), using SHA-1 as the hash function for - * EMSA-PKCS1-v1_5. It is assumed that the Consumer has provided its RSA public key in a - * verified way to the Service Provider, in a manner which is beyond the scope of this - * specification. - * - Chapter 9.3 ("RSA-SHA1") - */ -abstract class Twitter_OAuthSignatureMethod_RSA_SHA1 extends Twitter_OAuthSignatureMethod -{ - public function get_name() - { - return 'RSA-SHA1'; - } - - - // Up to the SP to implement this lookup of keys. Possible ideas are: - // (1) do a lookup in a table of trusted certs keyed off of consumer - // (2) fetch via http using a url provided by the requester - // (3) some sort of specific discovery code based on request - // - // Either way should return a string representation of the certificate - abstract protected function fetch_public_cert(&$request); - - - // Up to the SP to implement this lookup of keys. Possible ideas are: - // (1) do a lookup in a table of trusted certs keyed off of consumer - // - // Either way should return a string representation of the certificate - abstract protected function fetch_private_cert(&$request); - - - public function build_signature($request, $consumer, $token) - { - $base_string = $request->get_signature_base_string(); - $request->base_string = $base_string; - - // Fetch the private key cert based on the request - $cert = $this->fetch_private_cert($request); - - // Pull the private key ID from the certificate - $privatekeyid = openssl_get_privatekey($cert); - - // Sign using the key - $ok = openssl_sign($base_string, $signature, $privatekeyid); - - // Release the key resource - openssl_free_key($privatekeyid); - - return base64_encode($signature); - } - - - public function check_signature($request, $consumer, $token, $signature) - { - $decoded_sig = base64_decode($signature, true); - - $base_string = $request->get_signature_base_string(); - - // Fetch the public key cert based on the request - $cert = $this->fetch_public_cert($request); - - // Pull the public key ID from the certificate - $publickeyid = openssl_get_publickey($cert); - - // Check the computed signature against the one passed in the query - $ok = openssl_verify($base_string, $decoded_sig, $publickeyid); - - // Release the key resource - openssl_free_key($publickeyid); - - return $ok == 1; - } -} - -class Twitter_OAuthRequest -{ - // for debug purposes - public $base_string; - public static $version = '1.0'; - public static $POST_INPUT = 'php://input'; - protected $parameters; - protected $http_method; - protected $http_url; - - - public function __construct($http_method, $http_url, $parameters = null) - { - $parameters = ($parameters) ? $parameters : []; - $parameters = array_merge(Twitter_OAuthUtil::parse_parameters(parse_url($http_url, PHP_URL_QUERY)), $parameters); - $this->parameters = $parameters; - $this->http_method = $http_method; - $this->http_url = $http_url; - } - - - /** - * attempt to build up a request from what was passed to the server - */ - public static function from_request($http_method = null, $http_url = null, $parameters = null) - { - $scheme = (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != 'on') - ? 'http' - : 'https'; - $http_url = ($http_url) ? $http_url : $scheme . - '://' . $_SERVER['HTTP_HOST'] . - ':' . - $_SERVER['SERVER_PORT'] . - $_SERVER['REQUEST_URI']; - $http_method = ($http_method) ? $http_method : $_SERVER['REQUEST_METHOD']; - - // We weren't handed any parameters, so let's find the ones relevant to - // this request. - // If you run XML-RPC or similar you should use this to provide your own - // parsed parameter-list - if (!$parameters) { - // Find request headers - $request_headers = Twitter_OAuthUtil::get_headers(); - - // Parse the query-string to find GET parameters - $parameters = Twitter_OAuthUtil::parse_parameters($_SERVER['QUERY_STRING']); - - // It's a POST request of the proper content-type, so parse POST - // parameters and add those overriding any duplicates from GET - if ($http_method == 'POST' - && isset($request_headers['Content-Type']) - && strstr($request_headers['Content-Type'], - 'application/x-www-form-urlencoded') - ) { - $post_data = Twitter_OAuthUtil::parse_parameters( - file_get_contents(self::$POST_INPUT) - ); - $parameters = array_merge($parameters, $post_data); - } - - // We have a Authorization-header with OAuth data. Parse the header - // and add those overriding any duplicates from GET or POST - if (isset($request_headers['Authorization']) && substr($request_headers['Authorization'], 0, 6) == 'OAuth ') { - $header_parameters = Twitter_OAuthUtil::split_header( - $request_headers['Authorization'] - ); - $parameters = array_merge($parameters, $header_parameters); - } - } - - return new self($http_method, $http_url, $parameters); - } - - - /** - * pretty much a helper function to set up the request - */ - public static function from_consumer_and_token($consumer, $token, $http_method, $http_url, $parameters = null) - { - $parameters = ($parameters) ? $parameters : []; - $defaults = ['oauth_version' => self::$version, - 'oauth_nonce' => self::generate_nonce(), - 'oauth_timestamp' => self::generate_timestamp(), - 'oauth_consumer_key' => $consumer->key, ]; - if ($token) { - $defaults['oauth_token'] = $token->key; - } - - $parameters = array_merge($defaults, $parameters); - - return new self($http_method, $http_url, $parameters); - } - - - public function set_parameter($name, $value, $allow_duplicates = true) - { - if ($allow_duplicates && isset($this->parameters[$name])) { - // We have already added parameter(s) with this name, so add to the list - if (is_scalar($this->parameters[$name])) { - // This is the first duplicate, so transform scalar (string) - // into an array so we can add the duplicates - $this->parameters[$name] = [$this->parameters[$name]]; - } - - $this->parameters[$name][] = $value; - } else { - $this->parameters[$name] = $value; - } - } - - - public function get_parameter($name) - { - return isset($this->parameters[$name]) ? $this->parameters[$name] : null; - } - - - public function get_parameters() - { - return $this->parameters; - } - - - public function unset_parameter($name) - { - unset($this->parameters[$name]); - } - - - /** - * The request parameters, sorted and concatenated into a normalized string. - * @return string - */ - public function get_signable_parameters() - { - // Grab all parameters - $params = $this->parameters; - - // Remove oauth_signature if present - // Ref: Spec: 9.1.1 ("The oauth_signature parameter MUST be excluded.") - if (isset($params['oauth_signature'])) { - unset($params['oauth_signature']); - } - - return Twitter_OAuthUtil::build_http_query($params); - } - - - /** - * Returns the base string of this request - * - * The base string defined as the method, the url - * and the parameters (normalized), each urlencoded - * and the concated with &. - */ - public function get_signature_base_string() - { - $parts = [ - $this->get_normalized_http_method(), - $this->get_normalized_http_url(), - $this->get_signable_parameters(), - ]; - - $parts = Twitter_OAuthUtil::urlencode_rfc3986($parts); - - return implode('&', $parts); - } - - - /** - * just uppercases the http method - */ - public function get_normalized_http_method() - { - return strtoupper($this->http_method); - } - - - /** - * parses the url and rebuilds it to be - * scheme://host/path - */ - public function get_normalized_http_url() - { - $parts = parse_url($this->http_url); - - $scheme = (isset($parts['scheme'])) ? $parts['scheme'] : 'http'; - $port = (isset($parts['port'])) ? $parts['port'] : (($scheme == 'https') ? '443' : '80'); - $host = (isset($parts['host'])) ? $parts['host'] : ''; - $path = (isset($parts['path'])) ? $parts['path'] : ''; - - if (($scheme == 'https' && $port != '443') - || ($scheme == 'http' && $port != '80')) { - $host = "$host:$port"; - } - return "$scheme://$host$path"; - } - - - /** - * builds a url usable for a GET request - */ - public function to_url() - { - $post_data = $this->to_postdata(); - $out = $this->get_normalized_http_url(); - if ($post_data) { - $out .= '?' . $post_data; - } - return $out; - } - - - /** - * builds the data one would send in a POST request - */ - public function to_postdata() - { - return Twitter_OAuthUtil::build_http_query($this->parameters); - } - - - /** - * builds the Authorization: header - */ - public function to_header($realm = null) - { - $first = true; - if ($realm) { - $out = 'Authorization: OAuth realm="' . Twitter_OAuthUtil::urlencode_rfc3986($realm) . '"'; - $first = false; - } else { - $out = 'Authorization: OAuth'; - } - - $total = []; - foreach ($this->parameters as $k => $v) { - if (substr($k, 0, 5) != 'oauth') { - continue; - } - if (is_array($v)) { - throw new Twitter_OAuthException('Arrays not supported in headers'); - } - $out .= ($first) ? ' ' : ','; - $out .= Twitter_OAuthUtil::urlencode_rfc3986($k) . - '="' . - Twitter_OAuthUtil::urlencode_rfc3986($v) . - '"'; - $first = false; - } - return $out; - } - - - public function __toString() - { - return $this->to_url(); - } - - - public function sign_request($signature_method, $consumer, $token) - { - $this->set_parameter( - 'oauth_signature_method', - $signature_method->get_name(), - false - ); - $signature = $this->build_signature($signature_method, $consumer, $token); - $this->set_parameter('oauth_signature', $signature, false); - } - - - public function build_signature($signature_method, $consumer, $token) - { - $signature = $signature_method->build_signature($this, $consumer, $token); - return $signature; - } - - - /** - * util function: current timestamp - */ - private static function generate_timestamp() - { - return time(); - } - - - /** - * util function: current nonce - */ - private static function generate_nonce() - { - $mt = microtime(); - $rand = mt_rand(); - - return md5($mt . $rand); // md5s look nicer than numbers - } -} - -class Twitter_OAuthServer -{ - protected $timestamp_threshold = 300; // in seconds, five minutes - protected $version = '1.0'; // hi blaine - protected $signature_methods = []; - - protected $data_store; - - - public function __construct($data_store) - { - $this->data_store = $data_store; - } - - - public function add_signature_method($signature_method) - { - $this->signature_methods[$signature_method->get_name()] = - $signature_method; - } - - - // high level functions - - - /** - * process a request_token request - * returns the request token on success - */ - public function fetch_request_token(&$request) - { - $this->get_version($request); - - $consumer = $this->get_consumer($request); - - // no token required for the initial token request - $token = null; - - $this->check_signature($request, $consumer, $token); - - // Rev A change - $callback = $request->get_parameter('oauth_callback'); - $new_token = $this->data_store->new_request_token($consumer, $callback); - - return $new_token; - } - - - /** - * process an access_token request - * returns the access token on success - */ - public function fetch_access_token(&$request) - { - $this->get_version($request); - - $consumer = $this->get_consumer($request); - - // requires authorized request token - $token = $this->get_token($request, $consumer, 'request'); - - $this->check_signature($request, $consumer, $token); - - // Rev A change - $verifier = $request->get_parameter('oauth_verifier'); - $new_token = $this->data_store->new_access_token($token, $consumer, $verifier); - - return $new_token; - } - - - /** - * verify an api call, checks all the parameters - */ - public function verify_request(&$request) - { - $this->get_version($request); - $consumer = $this->get_consumer($request); - $token = $this->get_token($request, $consumer, 'access'); - $this->check_signature($request, $consumer, $token); - return [$consumer, $token]; - } - - - // Internals from here - - - /** - * version 1 - */ - private function get_version(&$request) - { - $version = $request->get_parameter('oauth_version'); - if (!$version) { - // Service Providers MUST assume the protocol version to be 1.0 if this parameter is not present. - // Chapter 7.0 ("Accessing Protected Ressources") - $version = '1.0'; - } - if ($version !== $this->version) { - throw new Twitter_OAuthException("OAuth version '$version' not supported"); - } - return $version; - } - - - /** - * figure out the signature with some defaults - */ - private function get_signature_method($request) - { - $signature_method = $request instanceof Twitter_OAuthRequest - ? $request->get_parameter('oauth_signature_method') - : null; - - if (!$signature_method) { - // According to chapter 7 ("Accessing Protected Ressources") the signature-method - // parameter is required, and we can't just fallback to PLAINTEXT - throw new Twitter_OAuthException('No signature method parameter. This parameter is required'); - } - - if (!in_array($signature_method, - array_keys($this->signature_methods), true)) { - throw new Twitter_OAuthException( - "Signature method '$signature_method' not supported " . - 'try one of the following: ' . - implode(', ', array_keys($this->signature_methods)) - ); - } - return $this->signature_methods[$signature_method]; - } - - - /** - * try to find the consumer for the provided request's consumer key - */ - private function get_consumer($request) - { - $consumer_key = $request instanceof Twitter_OAuthRequest - ? $request->get_parameter('oauth_consumer_key') - : null; - - if (!$consumer_key) { - throw new Twitter_OAuthException('Invalid consumer key'); - } - - $consumer = $this->data_store->lookup_consumer($consumer_key); - if (!$consumer) { - throw new Twitter_OAuthException('Invalid consumer'); - } - - return $consumer; - } - - - /** - * try to find the token for the provided request's token key - */ - private function get_token($request, $consumer, $token_type = 'access') - { - $token_field = $request instanceof Twitter_OAuthRequest - ? $request->get_parameter('oauth_token') - : null; - - $token = $this->data_store->lookup_token( - $consumer, $token_type, $token_field - ); - if (!$token) { - throw new Twitter_OAuthException("Invalid $token_type token: $token_field"); - } - return $token; - } - - - /** - * all-in-one function to check the signature on a request - * should guess the signature method appropriately - */ - private function check_signature($request, $consumer, $token) - { - // this should probably be in a different method - $timestamp = $request instanceof Twitter_OAuthRequest - ? $request->get_parameter('oauth_timestamp') - : null; - $nonce = $request instanceof Twitter_OAuthRequest - ? $request->get_parameter('oauth_nonce') - : null; - - $this->check_timestamp($timestamp); - $this->check_nonce($consumer, $token, $nonce, $timestamp); - - $signature_method = $this->get_signature_method($request); - - $signature = $request->get_parameter('oauth_signature'); - $valid_sig = $signature_method->check_signature( - $request, - $consumer, - $token, - $signature - ); - - if (!$valid_sig) { - throw new Twitter_OAuthException('Invalid signature'); - } - } - - - /** - * check that the timestamp is new enough - */ - private function check_timestamp($timestamp) - { - if (!$timestamp) { - throw new Twitter_OAuthException( - 'Missing timestamp parameter. The parameter is required' - ); - } - - // verify that timestamp is recentish - $now = time(); - if (abs($now - $timestamp) > $this->timestamp_threshold) { - throw new Twitter_OAuthException( - "Expired timestamp, yours $timestamp, ours $now" - ); - } - } - - - /** - * check that the nonce is not repeated - */ - private function check_nonce($consumer, $token, $nonce, $timestamp) - { - if (!$nonce) { - throw new Twitter_OAuthException( - 'Missing nonce parameter. The parameter is required' - ); - } - - // verify that the nonce is uniqueish - $found = $this->data_store->lookup_nonce( - $consumer, - $token, - $nonce, - $timestamp - ); - if ($found) { - throw new Twitter_OAuthException("Nonce already used: $nonce"); - } - } -} - -class Twitter_OAuthDataStore -{ - public function lookup_consumer($consumer_key) - { - // implement me - } - - - public function lookup_token($consumer, $token_type, $token) - { - // implement me - } - - - public function lookup_nonce($consumer, $token, $nonce, $timestamp) - { - // implement me - } - - - public function new_request_token($consumer, $callback = null) - { - // return a new token attached to this consumer - } - - - public function new_access_token($token, $consumer, $verifier = null) - { - // return a new access token attached to this consumer - // for the user associated with this token if the request token - // is authorized - // should also invalidate the request token - } -} - -class Twitter_OAuthUtil -{ - public static function urlencode_rfc3986($input) - { - if (is_array($input)) { - return array_map(['Twitter_OAuthUtil', 'urlencode_rfc3986'], $input); - } else { - if (is_scalar($input)) { - return str_replace( - '+', - ' ', - str_replace('%7E', '~', rawurlencode($input)) - ); - } else { - return ''; - } - } - } - - - // This decode function isn't taking into consideration the above - // modifications to the encoding process. However, this method doesn't - // seem to be used anywhere so leaving it as is. - public static function urldecode_rfc3986($string) - { - return urldecode($string); - } - - - // Utility function for turning the Authorization: header into - // parameters, has to do some unescaping - // Can filter out any non-oauth parameters if needed (default behaviour) - // May 28th, 2010 - method updated to tjerk.meesters for a speed improvement. - // see http://code.google.com/p/oauth/issues/detail?id=163 - public static function split_header($header, $only_allow_oauth_parameters = true) - { - $params = []; - if (preg_match_all('/(' . ($only_allow_oauth_parameters ? 'oauth_' : '') . '[a-z_-]*)=(:?"([^"]*)"|([^,]*))/', $header, $matches)) { - foreach ($matches[1] as $i => $h) { - $params[$h] = self::urldecode_rfc3986(empty($matches[3][$i]) ? $matches[4][$i] : $matches[3][$i]); - } - if (isset($params['realm'])) { - unset($params['realm']); - } - } - return $params; - } - - - // helper to try to sort out headers for people who aren't running apache - public static function get_headers() - { - if (function_exists('apache_request_headers')) { - // we need this to get the actual Authorization: header - // because apache tends to tell us it doesn't exist - $headers = apache_request_headers(); - - // sanitize the output of apache_request_headers because - // we always want the keys to be Cased-Like-This and arh() - // returns the headers in the same case as they are in the - // request - $out = []; - foreach ($headers as $key => $value) { - $key = str_replace( - ' ', - '-', - ucwords(strtolower(str_replace('-', ' ', $key))) - ); - $out[$key] = $value; - } - } else { - // otherwise we don't have apache and are just going to have to hope - // that $_SERVER actually contains what we need - $out = []; - if (isset($_SERVER['CONTENT_TYPE'])) { - $out['Content-Type'] = $_SERVER['CONTENT_TYPE']; - } - if (isset($_ENV['CONTENT_TYPE'])) { - $out['Content-Type'] = $_ENV['CONTENT_TYPE']; - } - - foreach ($_SERVER as $key => $value) { - if (substr($key, 0, 5) == 'HTTP_') { - // this is chaos, basically it is just there to capitalize the first - // letter of every word that is not an initial HTTP and strip HTTP - // code from przemek - $key = str_replace( - ' ', - '-', - ucwords(strtolower(str_replace('_', ' ', substr($key, 5)))) - ); - $out[$key] = $value; - } - } - } - return $out; - } - - - // This function takes a input like a=b&a=c&d=e and returns the parsed - // parameters like this - // ['a' => array('b','c'), 'd' => 'e'] - public static function parse_parameters($input) - { - if (!isset($input) || !$input) { - return []; - } - - $pairs = explode('&', $input); - - $parsed_parameters = []; - foreach ($pairs as $pair) { - $split = explode('=', $pair, 2); - $parameter = self::urldecode_rfc3986($split[0]); - $value = isset($split[1]) ? self::urldecode_rfc3986($split[1]) : ''; - - if (isset($parsed_parameters[$parameter])) { - // We have already recieved parameter(s) with this name, so add to the list - // of parameters with this name - - if (is_scalar($parsed_parameters[$parameter])) { - // This is the first duplicate, so transform scalar (string) into an array - // so we can add the duplicates - $parsed_parameters[$parameter] = [$parsed_parameters[$parameter]]; - } - - $parsed_parameters[$parameter][] = $value; - } else { - $parsed_parameters[$parameter] = $value; - } - } - return $parsed_parameters; - } - - - public static function build_http_query($params) - { - if (!$params) { - return ''; - } - - // Urlencode both keys and values - $keys = self::urlencode_rfc3986(array_keys($params)); - $values = self::urlencode_rfc3986(array_values($params)); - $params = array_combine($keys, $values); - - // Parameters are sorted by name, using lexicographical byte value ordering. - // Ref: Spec: 9.1.1 (1) - uksort($params, 'strcmp'); - - $pairs = []; - foreach ($params as $parameter => $value) { - if (is_array($value)) { - // If two or more parameters share the same name, they are sorted by their value - // Ref: Spec: 9.1.1 (1) - // June 12th, 2010 - changed to sort because of issue 164 by hidetaka - sort($value, SORT_STRING); - foreach ($value as $duplicate_value) { - $pairs[] = $parameter . '=' . $duplicate_value; - } - } else { - $pairs[] = $parameter . '=' . $value; - } - } - // For each parameter, the name is separated from the corresponding value by an '=' character (ASCII code 61) - // Each name-value pair is separated by an '&' character (ASCII code 38) - return implode('&', $pairs); - } -} diff --git a/vendor/dg/twitter-php/src/Twitter.php b/vendor/dg/twitter-php/src/Twitter.php deleted file mode 100644 index a3eaff5..0000000 --- a/vendor/dg/twitter-php/src/Twitter.php +++ /dev/null @@ -1,438 +0,0 @@ - 20, - CURLOPT_SSL_VERIFYPEER => 0, - CURLOPT_USERAGENT => 'Twitter for PHP', - ]; - - /** @var Twitter_OAuthConsumer */ - private $consumer; - - /** @var Twitter_OAuthConsumer */ - private $token; - - - /** - * Creates object using consumer and access keys. - * @param string consumer key - * @param string app secret - * @param string optional access token - * @param string optinal access token secret - * @throws TwitterException when CURL extension is not loaded - */ - public function __construct($consumerKey, $consumerSecret, $accessToken = null, $accessTokenSecret = null) - { - if (!extension_loaded('curl')) { - throw new TwitterException('PHP extension CURL is not loaded.'); - } - - $this->consumer = new Twitter_OAuthConsumer($consumerKey, $consumerSecret); - $this->token = new Twitter_OAuthConsumer($accessToken, $accessTokenSecret); - } - - - /** - * Tests if user credentials are valid. - * @return bool - * @throws TwitterException - */ - public function authenticate() - { - try { - $res = $this->request('account/verify_credentials', 'GET'); - return !empty($res->id); - - } catch (TwitterException $e) { - if ($e->getCode() === 401) { - return false; - } - throw $e; - } - } - - - /** - * Sends message to the Twitter. - * @param string message encoded in UTF-8 - * @param string path to local media file to be uploaded - * @param array additional options to send to statuses/update - * @return stdClass see https://dev.twitter.com/rest/reference/post/statuses/update - * @throws TwitterException - */ - public function send($message, $media = null, $options = []) - { - $mediaIds = []; - foreach ((array) $media as $item) { - $res = $this->request( - 'https://upload.twitter.com/1.1/media/upload.json', - 'POST', - null, - ['media' => $item] - ); - $mediaIds[] = $res->media_id_string; - } - return $this->request( - 'statuses/update', - 'POST', - $options + ['status' => $message, 'media_ids' => implode(',', $mediaIds) ?: null] - ); - } - - - /** - * Sends a direct message to the specified user. - * @return stdClass see https://dev.twitter.com/rest/reference/post/direct_messages/new - * @throws TwitterException - */ - public function sendDirectMessage($username, $message) - { - return $this->request( - 'direct_messages/events/new', - 'JSONPOST', - ['event' => [ - 'type' => 'message_create', - 'message_create' => [ - 'target' => ['recipient_id' => $this->loadUserInfo($username)->id_str], - 'message_data' => ['text' => $message], - ], - ]] - ); - } - - - /** - * Follows a user on Twitter. - * @param string - * @return stdClass see https://dev.twitter.com/rest/reference/post/friendships/create - * @throws TwitterException - */ - public function follow($username) - { - return $this->request('friendships/create', 'POST', ['screen_name' => $username]); - } - - - /** - * Returns the most recent statuses. - * @param int timeline (ME | ME_AND_FRIENDS | REPLIES) and optional (RETWEETS) - * @param int number of statuses to retrieve - * @param array additional options, see https://dev.twitter.com/rest/reference/get/statuses/user_timeline - * @return stdClass[] - * @throws TwitterException - */ - public function load($flags = self::ME, $count = 20, array $data = null) - { - static $timelines = [ - self::ME => 'user_timeline', - self::ME_AND_FRIENDS => 'home_timeline', - self::REPLIES => 'mentions_timeline', - ]; - if (!isset($timelines[$flags & 3])) { - throw new InvalidArgumentException; - } - - return $this->cachedRequest('statuses/' . $timelines[$flags & 3], (array) $data + [ - 'count' => $count, - 'include_rts' => $flags & self::RETWEETS ? 1 : 0, - ]); - } - - - /** - * Returns information of a given user. - * @param string - * @return stdClass see https://dev.twitter.com/rest/reference/get/users/show - * @throws TwitterException - */ - public function loadUserInfo($username) - { - return $this->cachedRequest('users/show', ['screen_name' => $username]); - } - - - /** - * Returns information of a given user by id. - * @param string - * @return stdClass see https://dev.twitter.com/rest/reference/get/users/show - * @throws TwitterException - */ - public function loadUserInfoById($id) - { - return $this->cachedRequest('users/show', ['user_id' => $id]); - } - - - /** - * Returns IDs of followers of a given user. - * @param string - * @return stdClass see https://dev.twitter.com/rest/reference/get/followers/ids - * @throws TwitterException - */ - public function loadUserFollowers($username, $count = 5000, $cursor = -1, $cacheExpiry = null) - { - return $this->cachedRequest('followers/ids', [ - 'screen_name' => $username, - 'count' => $count, - 'cursor' => $cursor, - ], $cacheExpiry); - } - - - /** - * Returns list of followers of a given user. - * @param string - * @return stdClass see https://dev.twitter.com/rest/reference/get/followers/list - * @throws TwitterException - */ - public function loadUserFollowersList($username, $count = 200, $cursor = -1, $cacheExpiry = null) - { - return $this->cachedRequest('followers/list', [ - 'screen_name' => $username, - 'count' => $count, - 'cursor' => $cursor, - ], $cacheExpiry); - } - - - /** - * Destroys status. - * @param int|string id of status to be destroyed - * @return mixed - * @throws TwitterException - */ - public function destroy($id) - { - $res = $this->request("statuses/destroy/$id", 'POST'); - return $res->id ? $res->id : false; - } - - - /** - * Returns tweets that match a specified query. - * @param string|array - * @param bool return complete response? - * @return stdClass see https://dev.twitter.com/rest/reference/get/search/tweets - * @throws TwitterException - */ - public function search($query, $full = false) - { - $res = $this->request('search/tweets', 'GET', is_array($query) ? $query : ['q' => $query]); - return $full ? $res : $res->statuses; - } - - - /** - * Process HTTP request. - * @param string URL or twitter command - * @param string HTTP method GET or POST or JSONPOST - * @param array data - * @param array uploaded files - * @return stdClass|stdClass[] - * @throws TwitterException - */ - public function request($resource, $method, array $data = null, array $files = null) - { - if (!strpos($resource, '://')) { - if (!strpos($resource, '.')) { - $resource .= '.json'; - } - $resource = self::API_URL . $resource; - } - - $hasCURLFile = class_exists('CURLFile', false) && defined('CURLOPT_SAFE_UPLOAD'); - - foreach ((array) $data as $key => $val) { - if ($val === null) { - unset($data[$key]); - } elseif ($files && !$hasCURLFile && substr($val, 0, 1) === '@') { - throw new TwitterException('Due to limitation of cURL it is not possible to send message starting with @ and upload file at the same time in PHP < 5.5'); - } - } - - foreach ((array) $files as $key => $file) { - if (!is_file($file)) { - throw new TwitterException("Cannot read the file $file. Check if file exists on disk and check its permissions."); - } - $data[$key] = $hasCURLFile ? new CURLFile($file) : '@' . $file; - } - - $headers = ['Expect:']; - - if ($method === 'JSONPOST') { - $method = 'POST'; - $data = json_encode($data); - $headers[] = 'Content-Type: application/json'; - - } elseif ($method === 'GET' && $data) { - $resource .= '?' . http_build_query($data, '', '&'); - } - - $request = Twitter_OAuthRequest::from_consumer_and_token($this->consumer, $this->token, $method, $resource); - $request->sign_request(new Twitter_OAuthSignatureMethod_HMAC_SHA1, $this->consumer, $this->token); - $headers[] = $request->to_header(); - - $options = [ - CURLOPT_URL => $resource, - CURLOPT_HEADER => false, - CURLOPT_RETURNTRANSFER => true, - CURLOPT_HTTPHEADER => $headers, - ] + $this->httpOptions; - if ($method === 'POST') { - $options += [ - CURLOPT_POST => true, - CURLOPT_POSTFIELDS => $data, - ]; - if ($hasCURLFile) { - $options[CURLOPT_SAFE_UPLOAD] = true; - } - } - - $curl = curl_init(); - curl_setopt_array($curl, $options); - $result = curl_exec($curl); - if (curl_errno($curl)) { - throw new TwitterException('Server error: ' . curl_error($curl)); - } - - $payload = defined('JSON_BIGINT_AS_STRING') - ? @json_decode($result, false, 128, JSON_BIGINT_AS_STRING) - : @json_decode($result); // intentionally @ - - if ($payload === false) { - throw new TwitterException('Invalid server response'); - } - - $code = curl_getinfo($curl, CURLINFO_HTTP_CODE); - if ($code >= 400) { - throw new TwitterException(isset($payload->errors[0]->message) - ? $payload->errors[0]->message - : "Server error #$code with answer $result", - $code - ); - } - - return $payload; - } - - - /** - * Cached HTTP request. - * @param string URL or twitter command - * @param array - * @param int - * @return stdClass|stdClass[] - */ - public function cachedRequest($resource, array $data = null, $cacheExpire = null) - { - if (!self::$cacheDir) { - return $this->request($resource, 'GET', $data); - } - if ($cacheExpire === null) { - $cacheExpire = self::$cacheExpire; - } - - $cacheFile = self::$cacheDir - . '/twitter.' - . md5($resource . json_encode($data) . serialize([$this->consumer, $this->token])) - . '.json'; - - $cache = @json_decode(@file_get_contents($cacheFile)); // intentionally @ - $expiration = is_string($cacheExpire) ? strtotime($cacheExpire) - time() : $cacheExpire; - if ($cache && @filemtime($cacheFile) + $expiration > time()) { // intentionally @ - return $cache; - } - - try { - $payload = $this->request($resource, 'GET', $data); - file_put_contents($cacheFile, json_encode($payload)); - return $payload; - - } catch (TwitterException $e) { - if ($cache) { - return $cache; - } - throw $e; - } - } - - - /** - * Makes twitter links, @usernames and #hashtags clickable. - * @return string - */ - public static function clickable(stdClass $status) - { - $all = []; - foreach ($status->entities->hashtags as $item) { - $all[$item->indices[0]] = ["https://twitter.com/search?q=%23$item->text", "#$item->text", $item->indices[1]]; - } - foreach ($status->entities->urls as $item) { - if (!isset($item->expanded_url)) { - $all[$item->indices[0]] = [$item->url, $item->url, $item->indices[1]]; - } else { - $all[$item->indices[0]] = [$item->expanded_url, $item->display_url, $item->indices[1]]; - } - } - foreach ($status->entities->user_mentions as $item) { - $all[$item->indices[0]] = ["https://twitter.com/$item->screen_name", "@$item->screen_name", $item->indices[1]]; - } - if (isset($status->entities->media)) { - foreach ($status->entities->media as $item) { - $all[$item->indices[0]] = [$item->url, $item->display_url, $item->indices[1]]; - } - } - - krsort($all); - $s = isset($status->full_text) ? $status->full_text : $status->text; - foreach ($all as $pos => $item) { - $s = iconv_substr($s, 0, $pos, 'UTF-8') - . '' . htmlspecialchars($item[1]) . '' - . iconv_substr($s, $item[2], iconv_strlen($s, 'UTF-8'), 'UTF-8'); - } - return $s; - } -} - - - -/** - * An exception generated by Twitter. - */ -class TwitterException extends Exception -{ -} diff --git a/vendor/dg/twitter-php/src/twitter.class.php b/vendor/dg/twitter-php/src/twitter.class.php deleted file mode 100644 index 35e1b5b..0000000 --- a/vendor/dg/twitter-php/src/twitter.class.php +++ /dev/null @@ -1,4 +0,0 @@ -lcobucci/.github:renovate-config" - ] -} diff --git a/vendor/lcobucci/clock/src/SystemClock.php b/vendor/lcobucci/clock/src/SystemClock.php index 69de81f..437c5f4 100644 --- a/vendor/lcobucci/clock/src/SystemClock.php +++ b/vendor/lcobucci/clock/src/SystemClock.php @@ -10,7 +10,7 @@ final class SystemClock implements Clock { - public function __construct(private readonly DateTimeZone $timezone) + public function __construct(private DateTimeZone $timezone) { } diff --git a/vendor/mod.lnk b/vendor/mod.lnk deleted file mode 100644 index 77f25e35447d47e94d976fe096ec8748770abcf9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1099 zcmah|ZAepL6n-{uXcxT9f7EmP%ef(z%-AOz5XUv_OcU z4-!k$A2}!}>yKv8pCDlvl&*y6pGBD9k0^@Hxx2fO2%eYcoU?c5ecto&UN-Q1y_%aR4Dd+7ZYc;Hf(`-}Cl|cEZ5h7tk{pV8rQ@qs zUbpf6JUoyPM7OK~BPtZm?=^SE45m;hghGYSS@pq{;2YS@1+V0*TQVagFJKE?3e$qu z+@&{3`9OifG~~T3W%%0coLOs@ZWX3Svrfv0ju6jrg(t}uE+d}y=4QaEGKE#9GkaEJ zvc-bL)Q)CaK#E$Q(KlbKhdIg;NbdsTVZI_?SfMtSIG+T#m?DU>$O3iL$PbA0DhB%i<4obawG<6-jR> zuPghdt9Jj^!?YD0=EgA+Q6;HJ0lRMV>|2kz%%^EySe7T+~&o|3N>P@;4J;W3}8_z@HAka1N5AxsjQIMK~;2Nt<9NILIp!ibm?DD7tu=5.4.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "David Grudl", - "homepage": "https://davidgrudl.com" - } - ], - "description": "Small and easy Twitter library for PHP", - "homepage": "https://github.com/dg/twitter-php", - "keywords": [ - "oauth", - "twitter" - ], - "support": { - "source": "https://github.com/dg/twitter-php/tree/v3.8" - }, - "time": "2019-02-08T16:20:01+00:00" - }, { "name": "ezyang/htmlpurifier", "version": "v4.16.0", diff --git a/vendor/p3k/xray/controllers/Parse.php b/vendor/p3k/xray/controllers/Parse.php index 237c2df..421de74 100644 --- a/vendor/p3k/xray/controllers/Parse.php +++ b/vendor/p3k/xray/controllers/Parse.php @@ -98,7 +98,6 @@ public function parse(Request $request, Response $response) { $fetcher = new p3k\XRay\Fetcher($this->http); $fields = [ - 'twitter_api_key','twitter_api_secret','twitter_access_token','twitter_access_token_secret', 'github_access_token', 'token', 'accept', diff --git a/vendor/symfony/dom-crawler/UriResolver.php b/vendor/symfony/dom-crawler/UriResolver.php index 5ff2245..4140dc0 100644 --- a/vendor/symfony/dom-crawler/UriResolver.php +++ b/vendor/symfony/dom-crawler/UriResolver.php @@ -32,8 +32,12 @@ public static function resolve(string $uri, ?string $baseUri): string { $uri = trim($uri); + if (false === ($scheme = parse_url($uri, \PHP_URL_SCHEME)) && '/' === ($uri[0] ?? '')) { + $scheme = parse_url($uri.'#', \PHP_URL_SCHEME); + } + // absolute URL? - if (null !== parse_url($uri, \PHP_URL_SCHEME)) { + if (null !== $scheme) { return $uri; } diff --git a/vendor/symfony/polyfill-ctype/composer.json b/vendor/symfony/polyfill-ctype/composer.json index b222fda..131ca7a 100644 --- a/vendor/symfony/polyfill-ctype/composer.json +++ b/vendor/symfony/polyfill-ctype/composer.json @@ -16,7 +16,7 @@ } ], "require": { - "php": ">=7.1" + "php": ">=7.2" }, "provide": { "ext-ctype": "*" diff --git a/vendor/symfony/polyfill-mbstring/Mbstring.php b/vendor/symfony/polyfill-mbstring/Mbstring.php index 1ad33a8..3d45c9d 100644 --- a/vendor/symfony/polyfill-mbstring/Mbstring.php +++ b/vendor/symfony/polyfill-mbstring/Mbstring.php @@ -50,6 +50,9 @@ * - mb_substr_count - Count the number of substring occurrences * - mb_ucfirst - Make a string's first character uppercase * - mb_lcfirst - Make a string's first character lowercase + * - mb_trim - Strip whitespace (or other characters) from the beginning and end of a string + * - mb_ltrim - Strip whitespace (or other characters) from the beginning of a string + * - mb_rtrim - Strip whitespace (or other characters) from the end of a string * * Not implemented: * - mb_convert_kana - Convert "kana" one from another ("zen-kaku", "han-kaku" and more) @@ -83,12 +86,6 @@ final class Mbstring public static function mb_convert_encoding($s, $toEncoding, $fromEncoding = null) { if (\is_array($s)) { - if (PHP_VERSION_ID < 70200) { - trigger_error('mb_convert_encoding() expects parameter 1 to be string, array given', \E_USER_WARNING); - - return null; - } - $r = []; foreach ($s as $str) { $r[] = self::mb_convert_encoding($str, $toEncoding, $fromEncoding); @@ -427,12 +424,6 @@ public static function mb_encoding_aliases($encoding) public static function mb_check_encoding($var = null, $encoding = null) { - if (\PHP_VERSION_ID < 70200 && \is_array($var)) { - trigger_error('mb_check_encoding() expects parameter 1 to be string, array given', \E_USER_WARNING); - - return null; - } - if (null === $encoding) { if (null === $var) { return false; @@ -980,17 +971,75 @@ private static function getEncoding($encoding) return $encoding; } + public static function mb_trim(string $string, ?string $characters = null, ?string $encoding = null): string + { + return self::mb_internal_trim('{^[%s]+|[%1$s]+$}Du', $string, $characters, $encoding, __FUNCTION__); + } + + public static function mb_ltrim(string $string, ?string $characters = null, ?string $encoding = null): string + { + return self::mb_internal_trim('{^[%s]+}Du', $string, $characters, $encoding, __FUNCTION__); + } + + public static function mb_rtrim(string $string, ?string $characters = null, ?string $encoding = null): string + { + return self::mb_internal_trim('{[%s]+$}D', $string, $characters, $encoding, __FUNCTION__); + } + + private static function mb_internal_trim(string $regex, string $string, ?string $characters, ?string $encoding, string $function): string + { + if (null === $encoding) { + $encoding = self::mb_internal_encoding(); + } else { + self::assertEncoding($encoding, $function.'(): Argument #3 ($encoding) must be a valid encoding, "%s" given'); + } + + if ('' === $characters) { + return null === $encoding ? $string : self::mb_convert_encoding($string, $encoding); + } + + if ('UTF-8' === $encoding) { + $encoding = null; + if (!preg_match('//u', $string)) { + $string = @iconv('UTF-8', 'UTF-8//IGNORE', $string); + } + if (null !== $characters && !preg_match('//u', $characters)) { + $characters = @iconv('UTF-8', 'UTF-8//IGNORE', $characters); + } + } else { + $string = iconv($encoding, 'UTF-8//IGNORE', $string); + + if (null !== $characters) { + $characters = iconv($encoding, 'UTF-8//IGNORE', $characters); + } + } + + if (null === $characters) { + $characters = "\\0 \f\n\r\t\v\u{00A0}\u{1680}\u{2000}\u{2001}\u{2002}\u{2003}\u{2004}\u{2005}\u{2006}\u{2007}\u{2008}\u{2009}\u{200A}\u{2028}\u{2029}\u{202F}\u{205F}\u{3000}\u{0085}\u{180E}"; + } else { + $characters = preg_quote($characters); + } + + $string = preg_replace(sprintf($regex, $characters), '', $string); + + if (null === $encoding) { + return $string; + } + + return iconv('UTF-8', $encoding.'//IGNORE', $string); + } + private static function assertEncoding(string $encoding, string $errorFormat): void { try { $validEncoding = @self::mb_check_encoding('', $encoding); } catch (\ValueError $e) { - throw new \ValueError(\sprintf($errorFormat, $encoding)); + throw new \ValueError(sprintf($errorFormat, $encoding)); } // BC for PHP 7.3 and lower if (!$validEncoding) { - throw new \ValueError(\sprintf($errorFormat, $encoding)); + throw new \ValueError(sprintf($errorFormat, $encoding)); } } } diff --git a/vendor/symfony/polyfill-mbstring/bootstrap.php b/vendor/symfony/polyfill-mbstring/bootstrap.php index 6e4b5fc..ff51ae0 100644 --- a/vendor/symfony/polyfill-mbstring/bootstrap.php +++ b/vendor/symfony/polyfill-mbstring/bootstrap.php @@ -144,6 +144,19 @@ function mb_ucfirst(string $string, ?string $encoding = null): string { return p function mb_lcfirst(string $string, ?string $encoding = null): string { return p\Mbstring::mb_lcfirst($string, $encoding); } } +if (!function_exists('mb_trim')) { + function mb_trim(string $string, ?string $characters = null, ?string $encoding = null): string { return p\Mbstring::mb_trim($string, $characters, $encoding); } +} + +if (!function_exists('mb_ltrim')) { + function mb_ltrim(string $string, ?string $characters = null, ?string $encoding = null): string { return p\Mbstring::mb_ltrim($string, $characters, $encoding); } +} + +if (!function_exists('mb_rtrim')) { + function mb_rtrim(string $string, ?string $characters = null, ?string $encoding = null): string { return p\Mbstring::mb_rtrim($string, $characters, $encoding); } +} + + if (extension_loaded('mbstring')) { return; } diff --git a/vendor/symfony/polyfill-mbstring/bootstrap80.php b/vendor/symfony/polyfill-mbstring/bootstrap80.php index ec2ae42..5be7d20 100644 --- a/vendor/symfony/polyfill-mbstring/bootstrap80.php +++ b/vendor/symfony/polyfill-mbstring/bootstrap80.php @@ -93,7 +93,7 @@ function mb_strrpos(?string $haystack, ?string $needle, ?int $offset = 0, ?strin function mb_strstr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strstr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); } } if (!function_exists('mb_get_info')) { - function mb_get_info(?string $type = 'all'): array|string|int|false { return p\Mbstring::mb_get_info((string) $type); } + function mb_get_info(?string $type = 'all'): array|string|int|false|null { return p\Mbstring::mb_get_info((string) $type); } } if (!function_exists('mb_http_output')) { function mb_http_output(?string $encoding = null): string|bool { return p\Mbstring::mb_http_output($encoding); } @@ -140,6 +140,18 @@ function mb_ucfirst($string, ?string $encoding = null): string { return p\Mbstri function mb_lcfirst($string, ?string $encoding = null): string { return p\Mbstring::mb_lcfirst($string, $encoding); } } +if (!function_exists('mb_trim')) { + function mb_trim(string $string, ?string $characters = null, ?string $encoding = null): string { return p\Mbstring::mb_trim($string, $characters, $encoding); } +} + +if (!function_exists('mb_ltrim')) { + function mb_ltrim(string $string, ?string $characters = null, ?string $encoding = null): string { return p\Mbstring::mb_ltrim($string, $characters, $encoding); } +} + +if (!function_exists('mb_rtrim')) { + function mb_rtrim(string $string, ?string $characters = null, ?string $encoding = null): string { return p\Mbstring::mb_rtrim($string, $characters, $encoding); } +} + if (extension_loaded('mbstring')) { return; } diff --git a/vendor/symfony/polyfill-mbstring/composer.json b/vendor/symfony/polyfill-mbstring/composer.json index bd99d4b..4ed241a 100644 --- a/vendor/symfony/polyfill-mbstring/composer.json +++ b/vendor/symfony/polyfill-mbstring/composer.json @@ -16,7 +16,7 @@ } ], "require": { - "php": ">=7.1" + "php": ">=7.2" }, "provide": { "ext-mbstring": "*" diff --git a/vendor/symfony/polyfill-php80/composer.json b/vendor/symfony/polyfill-php80/composer.json index 46ccde2..a503b03 100644 --- a/vendor/symfony/polyfill-php80/composer.json +++ b/vendor/symfony/polyfill-php80/composer.json @@ -20,7 +20,7 @@ } ], "require": { - "php": ">=7.1" + "php": ">=7.2" }, "autoload": { "psr-4": { "Symfony\\Polyfill\\Php80\\": "" },