composer update

This commit is contained in:
2020-12-21 11:01:29 +00:00
parent 064cd2244b
commit e7b3093986
342 changed files with 2055 additions and 23814 deletions

212
composer.lock generated
View File

@@ -1542,16 +1542,16 @@
}, },
{ {
"name": "monolog/monolog", "name": "monolog/monolog",
"version": "1.25.5", "version": "1.26.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/Seldaek/monolog.git", "url": "https://github.com/Seldaek/monolog.git",
"reference": "1817faadd1846cd08be9a49e905dc68823bc38c0" "reference": "2209ddd84e7ef1256b7af205d0717fb62cfc9c33"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/1817faadd1846cd08be9a49e905dc68823bc38c0", "url": "https://api.github.com/repos/Seldaek/monolog/zipball/2209ddd84e7ef1256b7af205d0717fb62cfc9c33",
"reference": "1817faadd1846cd08be9a49e905dc68823bc38c0", "reference": "2209ddd84e7ef1256b7af205d0717fb62cfc9c33",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -1567,7 +1567,7 @@
"graylog2/gelf-php": "~1.0", "graylog2/gelf-php": "~1.0",
"php-amqplib/php-amqplib": "~2.4", "php-amqplib/php-amqplib": "~2.4",
"php-console/php-console": "^3.1.3", "php-console/php-console": "^3.1.3",
"php-parallel-lint/php-parallel-lint": "^1.0", "phpstan/phpstan": "^0.12.59",
"phpunit/phpunit": "~4.5", "phpunit/phpunit": "~4.5",
"ruflin/elastica": ">=0.90 <3.0", "ruflin/elastica": ">=0.90 <3.0",
"sentry/sentry": "^0.13", "sentry/sentry": "^0.13",
@@ -1587,11 +1587,6 @@
"sentry/sentry": "Allow sending log messages to a Sentry server" "sentry/sentry": "Allow sending log messages to a Sentry server"
}, },
"type": "library", "type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
}
},
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"Monolog\\": "src/Monolog" "Monolog\\": "src/Monolog"
@@ -1615,20 +1610,20 @@
"logging", "logging",
"psr-3" "psr-3"
], ],
"time": "2020-07-23T08:35:51+00:00" "time": "2020-12-14T12:56:38+00:00"
}, },
{ {
"name": "nesbot/carbon", "name": "nesbot/carbon",
"version": "2.42.0", "version": "2.43.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/briannesbitt/Carbon.git", "url": "https://github.com/briannesbitt/Carbon.git",
"reference": "d0463779663437392fe42ff339ebc0213bd55498" "reference": "d32c57d8389113742f4a88725a170236470012e2"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/d0463779663437392fe42ff339ebc0213bd55498", "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/d32c57d8389113742f4a88725a170236470012e2",
"reference": "d0463779663437392fe42ff339ebc0213bd55498", "reference": "d32c57d8389113742f4a88725a170236470012e2",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -1694,20 +1689,20 @@
"datetime", "datetime",
"time" "time"
], ],
"time": "2020-11-28T14:25:28+00:00" "time": "2020-12-17T20:55:32+00:00"
}, },
{ {
"name": "nikic/php-parser", "name": "nikic/php-parser",
"version": "v4.10.3", "version": "v4.10.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/nikic/PHP-Parser.git", "url": "https://github.com/nikic/PHP-Parser.git",
"reference": "dbe56d23de8fcb157bbc0cfb3ad7c7de0cfb0984" "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/dbe56d23de8fcb157bbc0cfb3ad7c7de0cfb0984", "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/c6d052fc58cb876152f89f532b95a8d7907e7f0e",
"reference": "dbe56d23de8fcb157bbc0cfb3ad7c7de0cfb0984", "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -1746,7 +1741,7 @@
"parser", "parser",
"php" "php"
], ],
"time": "2020-12-03T17:45:45+00:00" "time": "2020-12-20T10:01:03+00:00"
}, },
{ {
"name": "opis/closure", "name": "opis/closure",
@@ -2375,32 +2370,31 @@
}, },
{ {
"name": "swiftmailer/swiftmailer", "name": "swiftmailer/swiftmailer",
"version": "v6.2.3", "version": "v6.2.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/swiftmailer/swiftmailer.git", "url": "https://github.com/swiftmailer/swiftmailer.git",
"reference": "149cfdf118b169f7840bbe3ef0d4bc795d1780c9" "reference": "56f0ab23f54c4ccbb0d5dcc67ff8552e0c98d59e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/149cfdf118b169f7840bbe3ef0d4bc795d1780c9", "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/56f0ab23f54c4ccbb0d5dcc67ff8552e0c98d59e",
"reference": "149cfdf118b169f7840bbe3ef0d4bc795d1780c9", "reference": "56f0ab23f54c4ccbb0d5dcc67ff8552e0c98d59e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"egulias/email-validator": "~2.0", "egulias/email-validator": "^2.0",
"php": ">=7.0.0", "php": ">=7.0.0",
"symfony/polyfill-iconv": "^1.0", "symfony/polyfill-iconv": "^1.0",
"symfony/polyfill-intl-idn": "^1.10", "symfony/polyfill-intl-idn": "^1.10",
"symfony/polyfill-mbstring": "^1.0" "symfony/polyfill-mbstring": "^1.0"
}, },
"require-dev": { "require-dev": {
"mockery/mockery": "~0.9.1", "mockery/mockery": "^1.0",
"symfony/phpunit-bridge": "^3.4.19|^4.1.8" "symfony/phpunit-bridge": "^4.4|^5.0"
}, },
"suggest": { "suggest": {
"ext-intl": "Needed to support internationalized email addresses", "ext-intl": "Needed to support internationalized email addresses"
"true/punycode": "Needed to support internationalized email addresses, if ext-intl is not installed"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
@@ -2433,20 +2427,20 @@
"mail", "mail",
"mailer" "mailer"
], ],
"time": "2019-11-12T09:31:26+00:00" "time": "2020-12-08T18:02:06+00:00"
}, },
{ {
"name": "symfony/console", "name": "symfony/console",
"version": "v4.4.17", "version": "v4.4.18",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/console.git", "url": "https://github.com/symfony/console.git",
"reference": "c8e37f6928c19816437a4dd7bf16e3bd79941470" "reference": "12e071278e396cc3e1c149857337e9e192deca0b"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/c8e37f6928c19816437a4dd7bf16e3bd79941470", "url": "https://api.github.com/repos/symfony/console/zipball/12e071278e396cc3e1c149857337e9e192deca0b",
"reference": "c8e37f6928c19816437a4dd7bf16e3bd79941470", "reference": "12e071278e396cc3e1c149857337e9e192deca0b",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -2505,20 +2499,20 @@
], ],
"description": "Symfony Console Component", "description": "Symfony Console Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2020-11-28T10:15:42+00:00" "time": "2020-12-18T07:41:31+00:00"
}, },
{ {
"name": "symfony/css-selector", "name": "symfony/css-selector",
"version": "v5.2.0", "version": "v5.2.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/css-selector.git", "url": "https://github.com/symfony/css-selector.git",
"reference": "b8d8eb06b0942e84a69e7acebc3e9c1e6e6e7256" "reference": "f789e7ead4c79e04ca9a6d6162fc629c89bd8054"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/css-selector/zipball/b8d8eb06b0942e84a69e7acebc3e9c1e6e6e7256", "url": "https://api.github.com/repos/symfony/css-selector/zipball/f789e7ead4c79e04ca9a6d6162fc629c89bd8054",
"reference": "b8d8eb06b0942e84a69e7acebc3e9c1e6e6e7256", "reference": "f789e7ead4c79e04ca9a6d6162fc629c89bd8054",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -2553,20 +2547,20 @@
], ],
"description": "Symfony CssSelector Component", "description": "Symfony CssSelector Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2020-10-28T21:31:18+00:00" "time": "2020-12-08T17:02:38+00:00"
}, },
{ {
"name": "symfony/debug", "name": "symfony/debug",
"version": "v4.4.17", "version": "v4.4.18",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/debug.git", "url": "https://github.com/symfony/debug.git",
"reference": "65fe7b49868378319b82da3035fb30801b931c47" "reference": "5dfc7825f3bfe9bb74b23d8b8ce0e0894e32b544"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/debug/zipball/65fe7b49868378319b82da3035fb30801b931c47", "url": "https://api.github.com/repos/symfony/debug/zipball/5dfc7825f3bfe9bb74b23d8b8ce0e0894e32b544",
"reference": "65fe7b49868378319b82da3035fb30801b931c47", "reference": "5dfc7825f3bfe9bb74b23d8b8ce0e0894e32b544",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -2605,7 +2599,7 @@
], ],
"description": "Symfony Debug Component", "description": "Symfony Debug Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2020-10-28T20:42:29+00:00" "time": "2020-12-10T16:34:26+00:00"
}, },
{ {
"name": "symfony/deprecation-contracts", "name": "symfony/deprecation-contracts",
@@ -2659,16 +2653,16 @@
}, },
{ {
"name": "symfony/error-handler", "name": "symfony/error-handler",
"version": "v4.4.17", "version": "v4.4.18",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/error-handler.git", "url": "https://github.com/symfony/error-handler.git",
"reference": "b0887cf8fc692eef2a4cf11cee3c5f5eb93fcfdf" "reference": "ef2f7ddd3b9177bbf8ff2ecd8d0e970ed48da0c3"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/error-handler/zipball/b0887cf8fc692eef2a4cf11cee3c5f5eb93fcfdf", "url": "https://api.github.com/repos/symfony/error-handler/zipball/ef2f7ddd3b9177bbf8ff2ecd8d0e970ed48da0c3",
"reference": "b0887cf8fc692eef2a4cf11cee3c5f5eb93fcfdf", "reference": "ef2f7ddd3b9177bbf8ff2ecd8d0e970ed48da0c3",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -2707,20 +2701,20 @@
], ],
"description": "Symfony ErrorHandler Component", "description": "Symfony ErrorHandler Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2020-10-28T20:42:29+00:00" "time": "2020-12-09T11:15:38+00:00"
}, },
{ {
"name": "symfony/event-dispatcher", "name": "symfony/event-dispatcher",
"version": "v4.4.17", "version": "v4.4.18",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/event-dispatcher.git", "url": "https://github.com/symfony/event-dispatcher.git",
"reference": "f029d6f21eac61ab23198e7aca40e7638e8c8924" "reference": "5d4c874b0eb1c32d40328a09dbc37307a5a910b0"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/f029d6f21eac61ab23198e7aca40e7638e8c8924", "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/5d4c874b0eb1c32d40328a09dbc37307a5a910b0",
"reference": "f029d6f21eac61ab23198e7aca40e7638e8c8924", "reference": "5d4c874b0eb1c32d40328a09dbc37307a5a910b0",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -2773,7 +2767,7 @@
], ],
"description": "Symfony EventDispatcher Component", "description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2020-10-31T22:44:29+00:00" "time": "2020-12-18T07:41:31+00:00"
}, },
{ {
"name": "symfony/event-dispatcher-contracts", "name": "symfony/event-dispatcher-contracts",
@@ -2839,16 +2833,16 @@
}, },
{ {
"name": "symfony/finder", "name": "symfony/finder",
"version": "v4.4.17", "version": "v4.4.18",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/finder.git", "url": "https://github.com/symfony/finder.git",
"reference": "9f1d1d883b79a91ef320c0c6e803494e042ef36e" "reference": "ebd0965f2dc2d4e0f11487c16fbb041e50b5c09b"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/finder/zipball/9f1d1d883b79a91ef320c0c6e803494e042ef36e", "url": "https://api.github.com/repos/symfony/finder/zipball/ebd0965f2dc2d4e0f11487c16fbb041e50b5c09b",
"reference": "9f1d1d883b79a91ef320c0c6e803494e042ef36e", "reference": "ebd0965f2dc2d4e0f11487c16fbb041e50b5c09b",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -2879,7 +2873,7 @@
], ],
"description": "Symfony Finder Component", "description": "Symfony Finder Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2020-11-17T19:45:34+00:00" "time": "2020-12-08T16:59:59+00:00"
}, },
{ {
"name": "symfony/http-client-contracts", "name": "symfony/http-client-contracts",
@@ -2945,22 +2939,23 @@
}, },
{ {
"name": "symfony/http-foundation", "name": "symfony/http-foundation",
"version": "v4.4.17", "version": "v4.4.18",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/http-foundation.git", "url": "https://github.com/symfony/http-foundation.git",
"reference": "9eeb37ec0ff3049c782ca67041648e28ddd75a94" "reference": "5ebda66b51612516bf338d5f87da2f37ff74cf34"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/9eeb37ec0ff3049c782ca67041648e28ddd75a94", "url": "https://api.github.com/repos/symfony/http-foundation/zipball/5ebda66b51612516bf338d5f87da2f37ff74cf34",
"reference": "9eeb37ec0ff3049c782ca67041648e28ddd75a94", "reference": "5ebda66b51612516bf338d5f87da2f37ff74cf34",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=7.1.3", "php": ">=7.1.3",
"symfony/mime": "^4.3|^5.0", "symfony/mime": "^4.3|^5.0",
"symfony/polyfill-mbstring": "~1.1" "symfony/polyfill-mbstring": "~1.1",
"symfony/polyfill-php80": "^1.15"
}, },
"require-dev": { "require-dev": {
"predis/predis": "~1.0", "predis/predis": "~1.0",
@@ -2991,20 +2986,20 @@
], ],
"description": "Symfony HttpFoundation Component", "description": "Symfony HttpFoundation Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2020-11-03T11:58:18+00:00" "time": "2020-12-18T07:41:31+00:00"
}, },
{ {
"name": "symfony/http-kernel", "name": "symfony/http-kernel",
"version": "v4.4.17", "version": "v4.4.18",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/http-kernel.git", "url": "https://github.com/symfony/http-kernel.git",
"reference": "9f5605ee05406d8afa40dc4f2954c6a61de3a984" "reference": "eaff9a43e74513508867ecfa66ef94fbb96ab128"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/9f5605ee05406d8afa40dc4f2954c6a61de3a984", "url": "https://api.github.com/repos/symfony/http-kernel/zipball/eaff9a43e74513508867ecfa66ef94fbb96ab128",
"reference": "9f5605ee05406d8afa40dc4f2954c6a61de3a984", "reference": "eaff9a43e74513508867ecfa66ef94fbb96ab128",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -3078,20 +3073,20 @@
], ],
"description": "Symfony HttpKernel Component", "description": "Symfony HttpKernel Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2020-11-29T09:23:08+00:00" "time": "2020-12-18T13:32:33+00:00"
}, },
{ {
"name": "symfony/mime", "name": "symfony/mime",
"version": "v5.2.0", "version": "v5.2.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/mime.git", "url": "https://github.com/symfony/mime.git",
"reference": "05f667e8fa029568964fd3bec6bc17765b853cc5" "reference": "de97005aef7426ba008c46ba840fc301df577ada"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/mime/zipball/05f667e8fa029568964fd3bec6bc17765b853cc5", "url": "https://api.github.com/repos/symfony/mime/zipball/de97005aef7426ba008c46ba840fc301df577ada",
"reference": "05f667e8fa029568964fd3bec6bc17765b853cc5", "reference": "de97005aef7426ba008c46ba840fc301df577ada",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -3141,7 +3136,7 @@
"mime", "mime",
"mime-type" "mime-type"
], ],
"time": "2020-10-30T14:55:39+00:00" "time": "2020-12-09T18:54:12+00:00"
}, },
{ {
"name": "symfony/polyfill-ctype", "name": "symfony/polyfill-ctype",
@@ -3657,16 +3652,16 @@
}, },
{ {
"name": "symfony/process", "name": "symfony/process",
"version": "v4.4.17", "version": "v4.4.18",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/process.git", "url": "https://github.com/symfony/process.git",
"reference": "ec1482f13d53911a8a32e54ba6f9a3b43a57d943" "reference": "075316ff72233ce3d04a9743414292e834f2cb4a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/process/zipball/ec1482f13d53911a8a32e54ba6f9a3b43a57d943", "url": "https://api.github.com/repos/symfony/process/zipball/075316ff72233ce3d04a9743414292e834f2cb4a",
"reference": "ec1482f13d53911a8a32e54ba6f9a3b43a57d943", "reference": "075316ff72233ce3d04a9743414292e834f2cb4a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -3697,20 +3692,20 @@
], ],
"description": "Symfony Process Component", "description": "Symfony Process Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2020-11-02T15:10:16+00:00" "time": "2020-12-08T16:59:59+00:00"
}, },
{ {
"name": "symfony/routing", "name": "symfony/routing",
"version": "v4.4.17", "version": "v4.4.18",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/routing.git", "url": "https://github.com/symfony/routing.git",
"reference": "08712c5dd5041c03e997e13892f45884faccd868" "reference": "80b042c20b035818daec844723e23b9825134ba0"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/routing/zipball/08712c5dd5041c03e997e13892f45884faccd868", "url": "https://api.github.com/repos/symfony/routing/zipball/80b042c20b035818daec844723e23b9825134ba0",
"reference": "08712c5dd5041c03e997e13892f45884faccd868", "reference": "80b042c20b035818daec844723e23b9825134ba0",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -3768,7 +3763,7 @@
"uri", "uri",
"url" "url"
], ],
"time": "2020-11-24T13:31:32+00:00" "time": "2020-12-08T16:59:59+00:00"
}, },
{ {
"name": "symfony/service-contracts", "name": "symfony/service-contracts",
@@ -3834,16 +3829,16 @@
}, },
{ {
"name": "symfony/translation", "name": "symfony/translation",
"version": "v4.4.17", "version": "v4.4.18",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/translation.git", "url": "https://github.com/symfony/translation.git",
"reference": "84821e6a14a637e817f25d11147388695b6f790a" "reference": "c1001b7d75b3136648f94b245588209d881c6939"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/translation/zipball/84821e6a14a637e817f25d11147388695b6f790a", "url": "https://api.github.com/repos/symfony/translation/zipball/c1001b7d75b3136648f94b245588209d881c6939",
"reference": "84821e6a14a637e817f25d11147388695b6f790a", "reference": "c1001b7d75b3136648f94b245588209d881c6939",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -3901,7 +3896,7 @@
], ],
"description": "Symfony Translation Component", "description": "Symfony Translation Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2020-11-27T06:35:49+00:00" "time": "2020-12-08T16:59:59+00:00"
}, },
{ {
"name": "symfony/translation-contracts", "name": "symfony/translation-contracts",
@@ -3966,16 +3961,16 @@
}, },
{ {
"name": "symfony/var-dumper", "name": "symfony/var-dumper",
"version": "v4.4.17", "version": "v4.4.18",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/var-dumper.git", "url": "https://github.com/symfony/var-dumper.git",
"reference": "65c6f1e848cda840ef7278686c8e30a7cc353c93" "reference": "4f31364bbc8177f2a6dbc125ac3851634ebe2a03"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/65c6f1e848cda840ef7278686c8e30a7cc353c93", "url": "https://api.github.com/repos/symfony/var-dumper/zipball/4f31364bbc8177f2a6dbc125ac3851634ebe2a03",
"reference": "65c6f1e848cda840ef7278686c8e30a7cc353c93", "reference": "4f31364bbc8177f2a6dbc125ac3851634ebe2a03",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -4034,7 +4029,7 @@
"debug", "debug",
"dump" "dump"
], ],
"time": "2020-11-24T09:55:37+00:00" "time": "2020-12-08T16:59:59+00:00"
}, },
{ {
"name": "tijsverkoyen/css-to-inline-styles", "name": "tijsverkoyen/css-to-inline-styles",
@@ -4376,16 +4371,16 @@
}, },
{ {
"name": "fzaninotto/faker", "name": "fzaninotto/faker",
"version": "v1.9.1", "version": "v1.9.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/fzaninotto/Faker.git", "url": "https://github.com/fzaninotto/Faker.git",
"reference": "fc10d778e4b84d5bd315dad194661e091d307c6f" "reference": "848d8125239d7dbf8ab25cb7f054f1a630e68c2e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/fzaninotto/Faker/zipball/fc10d778e4b84d5bd315dad194661e091d307c6f", "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/848d8125239d7dbf8ab25cb7f054f1a630e68c2e",
"reference": "fc10d778e4b84d5bd315dad194661e091d307c6f", "reference": "848d8125239d7dbf8ab25cb7f054f1a630e68c2e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -4422,7 +4417,8 @@
"faker", "faker",
"fixtures" "fixtures"
], ],
"time": "2019-12-12T13:22:17+00:00" "abandoned": true,
"time": "2020-12-11T09:56:16+00:00"
}, },
{ {
"name": "hamcrest/hamcrest-php", "name": "hamcrest/hamcrest-php",
@@ -4898,16 +4894,16 @@
}, },
{ {
"name": "phpspec/prophecy", "name": "phpspec/prophecy",
"version": "1.12.1", "version": "1.12.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpspec/prophecy.git", "url": "https://github.com/phpspec/prophecy.git",
"reference": "8ce87516be71aae9b956f81906aaf0338e0d8a2d" "reference": "245710e971a030f42e08f4912863805570f23d39"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/8ce87516be71aae9b956f81906aaf0338e0d8a2d", "url": "https://api.github.com/repos/phpspec/prophecy/zipball/245710e971a030f42e08f4912863805570f23d39",
"reference": "8ce87516be71aae9b956f81906aaf0338e0d8a2d", "reference": "245710e971a030f42e08f4912863805570f23d39",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -4919,7 +4915,7 @@
}, },
"require-dev": { "require-dev": {
"phpspec/phpspec": "^6.0", "phpspec/phpspec": "^6.0",
"phpunit/phpunit": "^8.0 || ^9.0 <9.3" "phpunit/phpunit": "^8.0 || ^9.0"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
@@ -4957,7 +4953,7 @@
"spy", "spy",
"stub" "stub"
], ],
"time": "2020-09-29T09:10:42+00:00" "time": "2020-12-19T10:15:11+00:00"
}, },
{ {
"name": "phpunit/php-code-coverage", "name": "phpunit/php-code-coverage",

View File

@@ -6,11 +6,11 @@ $vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir); $baseDir = dirname($vendorDir);
return array( return array(
'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
'25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php', '25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php',
'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php', 'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php',
'f598d06aa772fa33d905e87be6398fb1' => $vendorDir . '/symfony/polyfill-intl-idn/bootstrap.php', 'f598d06aa772fa33d905e87be6398fb1' => $vendorDir . '/symfony/polyfill-intl-idn/bootstrap.php',
'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php',
'320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php', '320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
'6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php', '6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php',
'0d59ee240a4cd96ddbb4ff164fccea4d' => $vendorDir . '/symfony/polyfill-php73/bootstrap.php', '0d59ee240a4cd96ddbb4ff164fccea4d' => $vendorDir . '/symfony/polyfill-php73/bootstrap.php',

View File

@@ -7,11 +7,11 @@ namespace Composer\Autoload;
class ComposerStaticInitc3f953f8a7291d41a76e1664339777c9 class ComposerStaticInitc3f953f8a7291d41a76e1664339777c9
{ {
public static $files = array ( public static $files = array (
'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
'25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php', '25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php',
'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php', 'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php',
'f598d06aa772fa33d905e87be6398fb1' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/bootstrap.php', 'f598d06aa772fa33d905e87be6398fb1' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/bootstrap.php',
'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php', '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
'6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php', '6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php',
'0d59ee240a4cd96ddbb4ff164fccea4d' => __DIR__ . '/..' . '/symfony/polyfill-php73/bootstrap.php', '0d59ee240a4cd96ddbb4ff164fccea4d' => __DIR__ . '/..' . '/symfony/polyfill-php73/bootstrap.php',

View File

@@ -783,17 +783,17 @@
}, },
{ {
"name": "fzaninotto/faker", "name": "fzaninotto/faker",
"version": "v1.9.1", "version": "v1.9.2",
"version_normalized": "1.9.1.0", "version_normalized": "1.9.2.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/fzaninotto/Faker.git", "url": "https://github.com/fzaninotto/Faker.git",
"reference": "fc10d778e4b84d5bd315dad194661e091d307c6f" "reference": "848d8125239d7dbf8ab25cb7f054f1a630e68c2e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/fzaninotto/Faker/zipball/fc10d778e4b84d5bd315dad194661e091d307c6f", "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/848d8125239d7dbf8ab25cb7f054f1a630e68c2e",
"reference": "fc10d778e4b84d5bd315dad194661e091d307c6f", "reference": "848d8125239d7dbf8ab25cb7f054f1a630e68c2e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -804,7 +804,7 @@
"phpunit/phpunit": "^4.8.35 || ^5.7", "phpunit/phpunit": "^4.8.35 || ^5.7",
"squizlabs/php_codesniffer": "^2.9.2" "squizlabs/php_codesniffer": "^2.9.2"
}, },
"time": "2019-12-12T13:22:17+00:00", "time": "2020-12-11T09:56:16+00:00",
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
@@ -1933,17 +1933,17 @@
}, },
{ {
"name": "monolog/monolog", "name": "monolog/monolog",
"version": "1.25.5", "version": "1.26.0",
"version_normalized": "1.25.5.0", "version_normalized": "1.26.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/Seldaek/monolog.git", "url": "https://github.com/Seldaek/monolog.git",
"reference": "1817faadd1846cd08be9a49e905dc68823bc38c0" "reference": "2209ddd84e7ef1256b7af205d0717fb62cfc9c33"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/1817faadd1846cd08be9a49e905dc68823bc38c0", "url": "https://api.github.com/repos/Seldaek/monolog/zipball/2209ddd84e7ef1256b7af205d0717fb62cfc9c33",
"reference": "1817faadd1846cd08be9a49e905dc68823bc38c0", "reference": "2209ddd84e7ef1256b7af205d0717fb62cfc9c33",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -1959,7 +1959,7 @@
"graylog2/gelf-php": "~1.0", "graylog2/gelf-php": "~1.0",
"php-amqplib/php-amqplib": "~2.4", "php-amqplib/php-amqplib": "~2.4",
"php-console/php-console": "^3.1.3", "php-console/php-console": "^3.1.3",
"php-parallel-lint/php-parallel-lint": "^1.0", "phpstan/phpstan": "^0.12.59",
"phpunit/phpunit": "~4.5", "phpunit/phpunit": "~4.5",
"ruflin/elastica": ">=0.90 <3.0", "ruflin/elastica": ">=0.90 <3.0",
"sentry/sentry": "^0.13", "sentry/sentry": "^0.13",
@@ -1978,13 +1978,8 @@
"ruflin/elastica": "Allow sending log messages to an Elastic Search server", "ruflin/elastica": "Allow sending log messages to an Elastic Search server",
"sentry/sentry": "Allow sending log messages to a Sentry server" "sentry/sentry": "Allow sending log messages to a Sentry server"
}, },
"time": "2020-07-23T08:35:51+00:00", "time": "2020-12-14T12:56:38+00:00",
"type": "library", "type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
}
},
"installation-source": "dist", "installation-source": "dist",
"autoload": { "autoload": {
"psr-4": { "psr-4": {
@@ -2062,17 +2057,17 @@
}, },
{ {
"name": "nesbot/carbon", "name": "nesbot/carbon",
"version": "2.42.0", "version": "2.43.0",
"version_normalized": "2.42.0.0", "version_normalized": "2.43.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/briannesbitt/Carbon.git", "url": "https://github.com/briannesbitt/Carbon.git",
"reference": "d0463779663437392fe42ff339ebc0213bd55498" "reference": "d32c57d8389113742f4a88725a170236470012e2"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/d0463779663437392fe42ff339ebc0213bd55498", "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/d32c57d8389113742f4a88725a170236470012e2",
"reference": "d0463779663437392fe42ff339ebc0213bd55498", "reference": "d32c57d8389113742f4a88725a170236470012e2",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -2091,7 +2086,7 @@
"phpunit/phpunit": "^7.5 || ^8.0", "phpunit/phpunit": "^7.5 || ^8.0",
"squizlabs/php_codesniffer": "^3.4" "squizlabs/php_codesniffer": "^3.4"
}, },
"time": "2020-11-28T14:25:28+00:00", "time": "2020-12-17T20:55:32+00:00",
"bin": [ "bin": [
"bin/carbon" "bin/carbon"
], ],
@@ -2143,17 +2138,17 @@
}, },
{ {
"name": "nikic/php-parser", "name": "nikic/php-parser",
"version": "v4.10.3", "version": "v4.10.4",
"version_normalized": "4.10.3.0", "version_normalized": "4.10.4.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/nikic/PHP-Parser.git", "url": "https://github.com/nikic/PHP-Parser.git",
"reference": "dbe56d23de8fcb157bbc0cfb3ad7c7de0cfb0984" "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/dbe56d23de8fcb157bbc0cfb3ad7c7de0cfb0984", "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/c6d052fc58cb876152f89f532b95a8d7907e7f0e",
"reference": "dbe56d23de8fcb157bbc0cfb3ad7c7de0cfb0984", "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -2164,7 +2159,7 @@
"ircmaxell/php-yacc": "^0.0.7", "ircmaxell/php-yacc": "^0.0.7",
"phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0"
}, },
"time": "2020-12-03T17:45:45+00:00", "time": "2020-12-20T10:01:03+00:00",
"bin": [ "bin": [
"bin/php-parse" "bin/php-parse"
], ],
@@ -2688,17 +2683,17 @@
}, },
{ {
"name": "phpspec/prophecy", "name": "phpspec/prophecy",
"version": "1.12.1", "version": "1.12.2",
"version_normalized": "1.12.1.0", "version_normalized": "1.12.2.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpspec/prophecy.git", "url": "https://github.com/phpspec/prophecy.git",
"reference": "8ce87516be71aae9b956f81906aaf0338e0d8a2d" "reference": "245710e971a030f42e08f4912863805570f23d39"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/8ce87516be71aae9b956f81906aaf0338e0d8a2d", "url": "https://api.github.com/repos/phpspec/prophecy/zipball/245710e971a030f42e08f4912863805570f23d39",
"reference": "8ce87516be71aae9b956f81906aaf0338e0d8a2d", "reference": "245710e971a030f42e08f4912863805570f23d39",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -2710,9 +2705,9 @@
}, },
"require-dev": { "require-dev": {
"phpspec/phpspec": "^6.0", "phpspec/phpspec": "^6.0",
"phpunit/phpunit": "^8.0 || ^9.0 <9.3" "phpunit/phpunit": "^8.0 || ^9.0"
}, },
"time": "2020-09-29T09:10:42+00:00", "time": "2020-12-19T10:15:11+00:00",
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
@@ -4170,35 +4165,34 @@
}, },
{ {
"name": "swiftmailer/swiftmailer", "name": "swiftmailer/swiftmailer",
"version": "v6.2.3", "version": "v6.2.4",
"version_normalized": "6.2.3.0", "version_normalized": "6.2.4.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/swiftmailer/swiftmailer.git", "url": "https://github.com/swiftmailer/swiftmailer.git",
"reference": "149cfdf118b169f7840bbe3ef0d4bc795d1780c9" "reference": "56f0ab23f54c4ccbb0d5dcc67ff8552e0c98d59e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/149cfdf118b169f7840bbe3ef0d4bc795d1780c9", "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/56f0ab23f54c4ccbb0d5dcc67ff8552e0c98d59e",
"reference": "149cfdf118b169f7840bbe3ef0d4bc795d1780c9", "reference": "56f0ab23f54c4ccbb0d5dcc67ff8552e0c98d59e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"egulias/email-validator": "~2.0", "egulias/email-validator": "^2.0",
"php": ">=7.0.0", "php": ">=7.0.0",
"symfony/polyfill-iconv": "^1.0", "symfony/polyfill-iconv": "^1.0",
"symfony/polyfill-intl-idn": "^1.10", "symfony/polyfill-intl-idn": "^1.10",
"symfony/polyfill-mbstring": "^1.0" "symfony/polyfill-mbstring": "^1.0"
}, },
"require-dev": { "require-dev": {
"mockery/mockery": "~0.9.1", "mockery/mockery": "^1.0",
"symfony/phpunit-bridge": "^3.4.19|^4.1.8" "symfony/phpunit-bridge": "^4.4|^5.0"
}, },
"suggest": { "suggest": {
"ext-intl": "Needed to support internationalized email addresses", "ext-intl": "Needed to support internationalized email addresses"
"true/punycode": "Needed to support internationalized email addresses, if ext-intl is not installed"
}, },
"time": "2019-11-12T09:31:26+00:00", "time": "2020-12-08T18:02:06+00:00",
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
@@ -4234,17 +4228,17 @@
}, },
{ {
"name": "symfony/console", "name": "symfony/console",
"version": "v4.4.17", "version": "v4.4.18",
"version_normalized": "4.4.17.0", "version_normalized": "4.4.18.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/console.git", "url": "https://github.com/symfony/console.git",
"reference": "c8e37f6928c19816437a4dd7bf16e3bd79941470" "reference": "12e071278e396cc3e1c149857337e9e192deca0b"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/c8e37f6928c19816437a4dd7bf16e3bd79941470", "url": "https://api.github.com/repos/symfony/console/zipball/12e071278e396cc3e1c149857337e9e192deca0b",
"reference": "c8e37f6928c19816437a4dd7bf16e3bd79941470", "reference": "12e071278e396cc3e1c149857337e9e192deca0b",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -4278,7 +4272,7 @@
"symfony/lock": "", "symfony/lock": "",
"symfony/process": "" "symfony/process": ""
}, },
"time": "2020-11-28T10:15:42+00:00", "time": "2020-12-18T07:41:31+00:00",
"type": "library", "type": "library",
"installation-source": "dist", "installation-source": "dist",
"autoload": { "autoload": {
@@ -4308,23 +4302,23 @@
}, },
{ {
"name": "symfony/css-selector", "name": "symfony/css-selector",
"version": "v5.2.0", "version": "v5.2.1",
"version_normalized": "5.2.0.0", "version_normalized": "5.2.1.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/css-selector.git", "url": "https://github.com/symfony/css-selector.git",
"reference": "b8d8eb06b0942e84a69e7acebc3e9c1e6e6e7256" "reference": "f789e7ead4c79e04ca9a6d6162fc629c89bd8054"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/css-selector/zipball/b8d8eb06b0942e84a69e7acebc3e9c1e6e6e7256", "url": "https://api.github.com/repos/symfony/css-selector/zipball/f789e7ead4c79e04ca9a6d6162fc629c89bd8054",
"reference": "b8d8eb06b0942e84a69e7acebc3e9c1e6e6e7256", "reference": "f789e7ead4c79e04ca9a6d6162fc629c89bd8054",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=7.2.5" "php": ">=7.2.5"
}, },
"time": "2020-10-28T21:31:18+00:00", "time": "2020-12-08T17:02:38+00:00",
"type": "library", "type": "library",
"installation-source": "dist", "installation-source": "dist",
"autoload": { "autoload": {
@@ -4358,17 +4352,17 @@
}, },
{ {
"name": "symfony/debug", "name": "symfony/debug",
"version": "v4.4.17", "version": "v4.4.18",
"version_normalized": "4.4.17.0", "version_normalized": "4.4.18.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/debug.git", "url": "https://github.com/symfony/debug.git",
"reference": "65fe7b49868378319b82da3035fb30801b931c47" "reference": "5dfc7825f3bfe9bb74b23d8b8ce0e0894e32b544"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/debug/zipball/65fe7b49868378319b82da3035fb30801b931c47", "url": "https://api.github.com/repos/symfony/debug/zipball/5dfc7825f3bfe9bb74b23d8b8ce0e0894e32b544",
"reference": "65fe7b49868378319b82da3035fb30801b931c47", "reference": "5dfc7825f3bfe9bb74b23d8b8ce0e0894e32b544",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -4382,7 +4376,7 @@
"require-dev": { "require-dev": {
"symfony/http-kernel": "^3.4|^4.0|^5.0" "symfony/http-kernel": "^3.4|^4.0|^5.0"
}, },
"time": "2020-10-28T20:42:29+00:00", "time": "2020-12-10T16:34:26+00:00",
"type": "library", "type": "library",
"installation-source": "dist", "installation-source": "dist",
"autoload": { "autoload": {
@@ -4464,17 +4458,17 @@
}, },
{ {
"name": "symfony/error-handler", "name": "symfony/error-handler",
"version": "v4.4.17", "version": "v4.4.18",
"version_normalized": "4.4.17.0", "version_normalized": "4.4.18.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/error-handler.git", "url": "https://github.com/symfony/error-handler.git",
"reference": "b0887cf8fc692eef2a4cf11cee3c5f5eb93fcfdf" "reference": "ef2f7ddd3b9177bbf8ff2ecd8d0e970ed48da0c3"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/error-handler/zipball/b0887cf8fc692eef2a4cf11cee3c5f5eb93fcfdf", "url": "https://api.github.com/repos/symfony/error-handler/zipball/ef2f7ddd3b9177bbf8ff2ecd8d0e970ed48da0c3",
"reference": "b0887cf8fc692eef2a4cf11cee3c5f5eb93fcfdf", "reference": "ef2f7ddd3b9177bbf8ff2ecd8d0e970ed48da0c3",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -4488,7 +4482,7 @@
"symfony/http-kernel": "^4.4|^5.0", "symfony/http-kernel": "^4.4|^5.0",
"symfony/serializer": "^4.4|^5.0" "symfony/serializer": "^4.4|^5.0"
}, },
"time": "2020-10-28T20:42:29+00:00", "time": "2020-12-09T11:15:38+00:00",
"type": "library", "type": "library",
"installation-source": "dist", "installation-source": "dist",
"autoload": { "autoload": {
@@ -4518,17 +4512,17 @@
}, },
{ {
"name": "symfony/event-dispatcher", "name": "symfony/event-dispatcher",
"version": "v4.4.17", "version": "v4.4.18",
"version_normalized": "4.4.17.0", "version_normalized": "4.4.18.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/event-dispatcher.git", "url": "https://github.com/symfony/event-dispatcher.git",
"reference": "f029d6f21eac61ab23198e7aca40e7638e8c8924" "reference": "5d4c874b0eb1c32d40328a09dbc37307a5a910b0"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/f029d6f21eac61ab23198e7aca40e7638e8c8924", "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/5d4c874b0eb1c32d40328a09dbc37307a5a910b0",
"reference": "f029d6f21eac61ab23198e7aca40e7638e8c8924", "reference": "5d4c874b0eb1c32d40328a09dbc37307a5a910b0",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -4556,7 +4550,7 @@
"symfony/dependency-injection": "", "symfony/dependency-injection": "",
"symfony/http-kernel": "" "symfony/http-kernel": ""
}, },
"time": "2020-10-31T22:44:29+00:00", "time": "2020-12-18T07:41:31+00:00",
"type": "library", "type": "library",
"installation-source": "dist", "installation-source": "dist",
"autoload": { "autoload": {
@@ -4650,23 +4644,23 @@
}, },
{ {
"name": "symfony/finder", "name": "symfony/finder",
"version": "v4.4.17", "version": "v4.4.18",
"version_normalized": "4.4.17.0", "version_normalized": "4.4.18.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/finder.git", "url": "https://github.com/symfony/finder.git",
"reference": "9f1d1d883b79a91ef320c0c6e803494e042ef36e" "reference": "ebd0965f2dc2d4e0f11487c16fbb041e50b5c09b"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/finder/zipball/9f1d1d883b79a91ef320c0c6e803494e042ef36e", "url": "https://api.github.com/repos/symfony/finder/zipball/ebd0965f2dc2d4e0f11487c16fbb041e50b5c09b",
"reference": "9f1d1d883b79a91ef320c0c6e803494e042ef36e", "reference": "ebd0965f2dc2d4e0f11487c16fbb041e50b5c09b",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=7.1.3" "php": ">=7.1.3"
}, },
"time": "2020-11-17T19:45:34+00:00", "time": "2020-12-08T16:59:59+00:00",
"type": "library", "type": "library",
"installation-source": "dist", "installation-source": "dist",
"autoload": { "autoload": {
@@ -4760,29 +4754,30 @@
}, },
{ {
"name": "symfony/http-foundation", "name": "symfony/http-foundation",
"version": "v4.4.17", "version": "v4.4.18",
"version_normalized": "4.4.17.0", "version_normalized": "4.4.18.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/http-foundation.git", "url": "https://github.com/symfony/http-foundation.git",
"reference": "9eeb37ec0ff3049c782ca67041648e28ddd75a94" "reference": "5ebda66b51612516bf338d5f87da2f37ff74cf34"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/9eeb37ec0ff3049c782ca67041648e28ddd75a94", "url": "https://api.github.com/repos/symfony/http-foundation/zipball/5ebda66b51612516bf338d5f87da2f37ff74cf34",
"reference": "9eeb37ec0ff3049c782ca67041648e28ddd75a94", "reference": "5ebda66b51612516bf338d5f87da2f37ff74cf34",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=7.1.3", "php": ">=7.1.3",
"symfony/mime": "^4.3|^5.0", "symfony/mime": "^4.3|^5.0",
"symfony/polyfill-mbstring": "~1.1" "symfony/polyfill-mbstring": "~1.1",
"symfony/polyfill-php80": "^1.15"
}, },
"require-dev": { "require-dev": {
"predis/predis": "~1.0", "predis/predis": "~1.0",
"symfony/expression-language": "^3.4|^4.0|^5.0" "symfony/expression-language": "^3.4|^4.0|^5.0"
}, },
"time": "2020-11-03T11:58:18+00:00", "time": "2020-12-18T07:41:31+00:00",
"type": "library", "type": "library",
"installation-source": "dist", "installation-source": "dist",
"autoload": { "autoload": {
@@ -4812,17 +4807,17 @@
}, },
{ {
"name": "symfony/http-kernel", "name": "symfony/http-kernel",
"version": "v4.4.17", "version": "v4.4.18",
"version_normalized": "4.4.17.0", "version_normalized": "4.4.18.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/http-kernel.git", "url": "https://github.com/symfony/http-kernel.git",
"reference": "9f5605ee05406d8afa40dc4f2954c6a61de3a984" "reference": "eaff9a43e74513508867ecfa66ef94fbb96ab128"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/9f5605ee05406d8afa40dc4f2954c6a61de3a984", "url": "https://api.github.com/repos/symfony/http-kernel/zipball/eaff9a43e74513508867ecfa66ef94fbb96ab128",
"reference": "9f5605ee05406d8afa40dc4f2954c6a61de3a984", "reference": "eaff9a43e74513508867ecfa66ef94fbb96ab128",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -4871,7 +4866,7 @@
"symfony/console": "", "symfony/console": "",
"symfony/dependency-injection": "" "symfony/dependency-injection": ""
}, },
"time": "2020-11-29T09:23:08+00:00", "time": "2020-12-18T13:32:33+00:00",
"type": "library", "type": "library",
"installation-source": "dist", "installation-source": "dist",
"autoload": { "autoload": {
@@ -4901,17 +4896,17 @@
}, },
{ {
"name": "symfony/mime", "name": "symfony/mime",
"version": "v5.2.0", "version": "v5.2.1",
"version_normalized": "5.2.0.0", "version_normalized": "5.2.1.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/mime.git", "url": "https://github.com/symfony/mime.git",
"reference": "05f667e8fa029568964fd3bec6bc17765b853cc5" "reference": "de97005aef7426ba008c46ba840fc301df577ada"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/mime/zipball/05f667e8fa029568964fd3bec6bc17765b853cc5", "url": "https://api.github.com/repos/symfony/mime/zipball/de97005aef7426ba008c46ba840fc301df577ada",
"reference": "05f667e8fa029568964fd3bec6bc17765b853cc5", "reference": "de97005aef7426ba008c46ba840fc301df577ada",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -4932,7 +4927,7 @@
"symfony/property-info": "^4.4|^5.1", "symfony/property-info": "^4.4|^5.1",
"symfony/serializer": "^5.2" "symfony/serializer": "^5.2"
}, },
"time": "2020-10-30T14:55:39+00:00", "time": "2020-12-09T18:54:12+00:00",
"type": "library", "type": "library",
"installation-source": "dist", "installation-source": "dist",
"autoload": { "autoload": {
@@ -5494,23 +5489,23 @@
}, },
{ {
"name": "symfony/process", "name": "symfony/process",
"version": "v4.4.17", "version": "v4.4.18",
"version_normalized": "4.4.17.0", "version_normalized": "4.4.18.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/process.git", "url": "https://github.com/symfony/process.git",
"reference": "ec1482f13d53911a8a32e54ba6f9a3b43a57d943" "reference": "075316ff72233ce3d04a9743414292e834f2cb4a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/process/zipball/ec1482f13d53911a8a32e54ba6f9a3b43a57d943", "url": "https://api.github.com/repos/symfony/process/zipball/075316ff72233ce3d04a9743414292e834f2cb4a",
"reference": "ec1482f13d53911a8a32e54ba6f9a3b43a57d943", "reference": "075316ff72233ce3d04a9743414292e834f2cb4a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=7.1.3" "php": ">=7.1.3"
}, },
"time": "2020-11-02T15:10:16+00:00", "time": "2020-12-08T16:59:59+00:00",
"type": "library", "type": "library",
"installation-source": "dist", "installation-source": "dist",
"autoload": { "autoload": {
@@ -5540,17 +5535,17 @@
}, },
{ {
"name": "symfony/routing", "name": "symfony/routing",
"version": "v4.4.17", "version": "v4.4.18",
"version_normalized": "4.4.17.0", "version_normalized": "4.4.18.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/routing.git", "url": "https://github.com/symfony/routing.git",
"reference": "08712c5dd5041c03e997e13892f45884faccd868" "reference": "80b042c20b035818daec844723e23b9825134ba0"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/routing/zipball/08712c5dd5041c03e997e13892f45884faccd868", "url": "https://api.github.com/repos/symfony/routing/zipball/80b042c20b035818daec844723e23b9825134ba0",
"reference": "08712c5dd5041c03e997e13892f45884faccd868", "reference": "80b042c20b035818daec844723e23b9825134ba0",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -5577,7 +5572,7 @@
"symfony/http-foundation": "For using a Symfony Request object", "symfony/http-foundation": "For using a Symfony Request object",
"symfony/yaml": "For using the YAML loader" "symfony/yaml": "For using the YAML loader"
}, },
"time": "2020-11-24T13:31:32+00:00", "time": "2020-12-08T16:59:59+00:00",
"type": "library", "type": "library",
"installation-source": "dist", "installation-source": "dist",
"autoload": { "autoload": {
@@ -5677,17 +5672,17 @@
}, },
{ {
"name": "symfony/translation", "name": "symfony/translation",
"version": "v4.4.17", "version": "v4.4.18",
"version_normalized": "4.4.17.0", "version_normalized": "4.4.18.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/translation.git", "url": "https://github.com/symfony/translation.git",
"reference": "84821e6a14a637e817f25d11147388695b6f790a" "reference": "c1001b7d75b3136648f94b245588209d881c6939"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/translation/zipball/84821e6a14a637e817f25d11147388695b6f790a", "url": "https://api.github.com/repos/symfony/translation/zipball/c1001b7d75b3136648f94b245588209d881c6939",
"reference": "84821e6a14a637e817f25d11147388695b6f790a", "reference": "c1001b7d75b3136648f94b245588209d881c6939",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -5720,7 +5715,7 @@
"symfony/config": "", "symfony/config": "",
"symfony/yaml": "" "symfony/yaml": ""
}, },
"time": "2020-11-27T06:35:49+00:00", "time": "2020-12-08T16:59:59+00:00",
"type": "library", "type": "library",
"installation-source": "dist", "installation-source": "dist",
"autoload": { "autoload": {
@@ -5813,17 +5808,17 @@
}, },
{ {
"name": "symfony/var-dumper", "name": "symfony/var-dumper",
"version": "v4.4.17", "version": "v4.4.18",
"version_normalized": "4.4.17.0", "version_normalized": "4.4.18.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/var-dumper.git", "url": "https://github.com/symfony/var-dumper.git",
"reference": "65c6f1e848cda840ef7278686c8e30a7cc353c93" "reference": "4f31364bbc8177f2a6dbc125ac3851634ebe2a03"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/65c6f1e848cda840ef7278686c8e30a7cc353c93", "url": "https://api.github.com/repos/symfony/var-dumper/zipball/4f31364bbc8177f2a6dbc125ac3851634ebe2a03",
"reference": "65c6f1e848cda840ef7278686c8e30a7cc353c93", "reference": "4f31364bbc8177f2a6dbc125ac3851634ebe2a03",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -5847,7 +5842,7 @@
"ext-intl": "To show region name in time zone dump", "ext-intl": "To show region name in time zone dump",
"symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script" "symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script"
}, },
"time": "2020-11-24T09:55:37+00:00", "time": "2020-12-08T16:59:59+00:00",
"bin": [ "bin": [
"Resources/bin/var-dump-server" "Resources/bin/var-dump-server"
], ],

View File

@@ -289,4 +289,9 @@ class Generator
{ {
$this->seed(); $this->seed();
} }
public function __wakeup()
{
$this->formatters = [];
}
} }

View File

@@ -1,3 +1,7 @@
### 1.26.0 (2020-12-14)
* Added $dateFormat and $removeUsedContextFields arguments to PsrLogMessageProcessor (backport from 2.x)
### 1.25.5 (2020-07-23) ### 1.25.5 (2020-07-23)
* Fixed array access on null in RavenHandler * Fixed array access on null in RavenHandler

View File

@@ -26,7 +26,7 @@
"php-amqplib/php-amqplib": "~2.4", "php-amqplib/php-amqplib": "~2.4",
"swiftmailer/swiftmailer": "^5.3|^6.0", "swiftmailer/swiftmailer": "^5.3|^6.0",
"php-console/php-console": "^3.1.3", "php-console/php-console": "^3.1.3",
"php-parallel-lint/php-parallel-lint": "^1.0" "phpstan/phpstan": "^0.12.59"
}, },
"suggest": { "suggest": {
"graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server",
@@ -50,16 +50,9 @@
"provide": { "provide": {
"psr/log-implementation": "1.0.0" "psr/log-implementation": "1.0.0"
}, },
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
}
},
"scripts": { "scripts": {
"test": [ "test": "vendor/bin/phpunit",
"parallel-lint . --exclude vendor --exclude src/Monolog/Handler/FormattableHandlerInterface.php --exclude src/Monolog/Handler/FormattableHandlerTrait.php --exclude src/Monolog/Handler/ProcessableHandlerInterface.php --exclude src/Monolog/Handler/ProcessableHandlerTrait.php", "phpstan": "vendor/bin/phpstan analyse"
"phpunit"
]
}, },
"lock": false "lock": false
} }

View File

@@ -0,0 +1,16 @@
parameters:
level: 3
paths:
- src/
# - tests/
ignoreErrors:
- '#zend_monitor_|ZEND_MONITOR_#'
- '#RollbarNotifier#'
- '#Predis\\Client#'
- '#^Cannot call method ltrim\(\) on int\|false.$#'
- '#^Access to an undefined property Raven_Client::\$context.$#'
- '#MongoDB\\(Client|Collection)#'
- '#Gelf\\IMessagePublisher#'

View File

@@ -62,6 +62,7 @@ class ErrorHandler
//Forces the autoloader to run for LogLevel. Fixes an autoload issue at compile-time on PHP5.3. See https://github.com/Seldaek/monolog/pull/929 //Forces the autoloader to run for LogLevel. Fixes an autoload issue at compile-time on PHP5.3. See https://github.com/Seldaek/monolog/pull/929
class_exists('\\Psr\\Log\\LogLevel', true); class_exists('\\Psr\\Log\\LogLevel', true);
/** @phpstan-ignore-next-line */
$handler = new static($logger); $handler = new static($logger);
if ($errorLevelMap !== false) { if ($errorLevelMap !== false) {
$handler->registerErrorHandler($errorLevelMap); $handler->registerErrorHandler($errorLevelMap);

View File

@@ -77,6 +77,7 @@ class DynamoDbHandler extends AbstractProcessingHandler
if ($this->version === 3) { if ($this->version === 3) {
$formatted = $this->marshaler->marshalItem($filtered); $formatted = $this->marshaler->marshalItem($filtered);
} else { } else {
/** @phpstan-ignore-next-line */
$formatted = $this->client->formatAttributes($filtered); $formatted = $this->client->formatAttributes($filtered);
} }

View File

@@ -72,7 +72,7 @@ class FirePHPHandler extends AbstractProcessingHandler
* *
* @see createHeader() * @see createHeader()
* @param array $record * @param array $record
* @return string * @return array
*/ */
protected function createRecordHeader(array $record) protected function createRecordHeader(array $record)
{ {

View File

@@ -27,7 +27,7 @@ use Monolog\Formatter\GelfMessageFormatter;
class GelfHandler extends AbstractProcessingHandler class GelfHandler extends AbstractProcessingHandler
{ {
/** /**
* @var Publisher the publisher object that sends the message to the server * @var Publisher|PublisherInterface|IMessagePublisher the publisher object that sends the message to the server
*/ */
protected $publisher; protected $publisher;

View File

@@ -270,10 +270,10 @@ class HipChatHandler extends SocketHandler
* will be the highest level from the given records. Datetime will be taken * will be the highest level from the given records. Datetime will be taken
* from the first record. * from the first record.
* *
* @param $records * @param array $records
* @return array * @return array
*/ */
private function combineRecords($records) private function combineRecords(array $records)
{ {
$batchRecord = null; $batchRecord = null;
$batchRecords = array(); $batchRecords = array();

View File

@@ -50,7 +50,7 @@ class RavenHandler extends AbstractProcessingHandler
protected $ravenClient; protected $ravenClient;
/** /**
* @var LineFormatter The formatter to use for the logs generated via handleBatch() * @var FormatterInterface The formatter to use for the logs generated via handleBatch()
*/ */
protected $batchFormatter; protected $batchFormatter;

View File

@@ -36,7 +36,7 @@ class RedisHandler extends AbstractProcessingHandler
* @param string $key The key name to push records to * @param string $key The key name to push records to
* @param int $level The minimum logging level at which this handler will be triggered * @param int $level The minimum logging level at which this handler will be triggered
* @param bool $bubble Whether the messages that are handled can bubble up the stack or not * @param bool $bubble Whether the messages that are handled can bubble up the stack or not
* @param int $capSize Number of entries to limit list size to * @param int|false $capSize Number of entries to limit list size to
*/ */
public function __construct($redis, $key, $level = Logger::DEBUG, $bubble = true, $capSize = false) public function __construct($redis, $key, $level = Logger::DEBUG, $bubble = true, $capSize = false)
{ {

View File

@@ -154,7 +154,7 @@ class StreamHandler extends AbstractProcessingHandler
return dirname(substr($stream, 7)); return dirname(substr($stream, 7));
} }
return; return null;
} }
private function createDir() private function createDir()

View File

@@ -522,7 +522,7 @@ class Logger implements LoggerInterface, ResettableInterface
/** /**
* Converts PSR-3 levels to Monolog ones if necessary * Converts PSR-3 levels to Monolog ones if necessary
* *
* @param string|int Level number (monolog) or name (PSR-3) * @param string|int $level Level number (monolog) or name (PSR-3)
* @return int * @return int
*/ */
public static function toMonologLevel($level) public static function toMonologLevel($level)

View File

@@ -22,6 +22,24 @@ use Monolog\Utils;
*/ */
class PsrLogMessageProcessor implements ProcessorInterface class PsrLogMessageProcessor implements ProcessorInterface
{ {
const SIMPLE_DATE = "Y-m-d\TH:i:s.uP";
/** @var string|null */
private $dateFormat;
/** @var bool */
private $removeUsedContextFields;
/**
* @param string|null $dateFormat The format of the timestamp: one supported by DateTime::format
* @param bool $removeUsedContextFields If set to true the fields interpolated into message gets unset
*/
public function __construct($dateFormat = null, $removeUsedContextFields = false)
{
$this->dateFormat = $dateFormat;
$this->removeUsedContextFields = $removeUsedContextFields;
}
/** /**
* @param array $record * @param array $record
* @return array * @return array
@@ -34,12 +52,25 @@ class PsrLogMessageProcessor implements ProcessorInterface
$replacements = array(); $replacements = array();
foreach ($record['context'] as $key => $val) { foreach ($record['context'] as $key => $val) {
$placeholder = '{' . $key . '}';
if (strpos($record['message'], $placeholder) === false) {
continue;
}
if (is_null($val) || is_scalar($val) || (is_object($val) && method_exists($val, "__toString"))) { if (is_null($val) || is_scalar($val) || (is_object($val) && method_exists($val, "__toString"))) {
$replacements['{'.$key.'}'] = $val; $replacements[$placeholder] = $val;
} elseif ($val instanceof \DateTime) {
$replacements[$placeholder] = $val->format($this->dateFormat ?: static::SIMPLE_DATE);
} elseif (is_object($val)) { } elseif (is_object($val)) {
$replacements['{'.$key.'}'] = '[object '.Utils::getClass($val).']'; $replacements[$placeholder] = '[object '.Utils::getClass($val).']';
} elseif (is_array($val)) {
$replacements[$placeholder] = 'array'.Utils::jsonEncode($val, null, true);
} else { } else {
$replacements['{'.$key.'}'] = '['.gettype($val).']'; $replacements[$placeholder] = '['.gettype($val).']';
}
if ($this->removeUsedContextFields) {
unset($record['context'][$key]);
} }
} }

View File

@@ -168,7 +168,7 @@ class Utils
* Function converts the input in place in the passed variable so that it * Function converts the input in place in the passed variable so that it
* can be used as a callback for array_walk_recursive. * can be used as a callback for array_walk_recursive.
* *
* @param mixed &$data Input to check and convert if needed * @param mixed $data Input to check and convert if needed, passed by ref
* @private * @private
*/ */
public static function detectAndCleanUtf8(&$data) public static function detectAndCleanUtf8(&$data)

View File

@@ -49,6 +49,9 @@
} }
}, },
"autoload-dev": { "autoload-dev": {
"files": [
"tests/Laravel/ServiceProvider.php"
],
"psr-4": { "psr-4": {
"Tests\\": "tests/" "Tests\\": "tests/"
} }

View File

@@ -2,7 +2,7 @@
[![Latest Stable Version](https://img.shields.io/packagist/v/nesbot/carbon.svg?style=flat-square)](https://packagist.org/packages/nesbot/carbon) [![Latest Stable Version](https://img.shields.io/packagist/v/nesbot/carbon.svg?style=flat-square)](https://packagist.org/packages/nesbot/carbon)
[![Total Downloads](https://img.shields.io/packagist/dt/nesbot/carbon.svg?style=flat-square)](https://packagist.org/packages/nesbot/carbon) [![Total Downloads](https://img.shields.io/packagist/dt/nesbot/carbon.svg?style=flat-square)](https://packagist.org/packages/nesbot/carbon)
[![Build Status](https://img.shields.io/travis/briannesbitt/Carbon/master.svg?style=flat-square)](https://travis-ci.org/briannesbitt/Carbon) [![GitHub Actions](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fbriannesbitt%2FCarbon%2Fbadge&style=flat-square&label=Build&logo=none)](https://actions-badge.atrox.dev/briannesbitt/Carbon/goto)
[![StyleCI](https://github.styleci.io/repos/5724990/shield?style=flat-square)](https://github.styleci.io/repos/5724990) [![StyleCI](https://github.styleci.io/repos/5724990/shield?style=flat-square)](https://github.styleci.io/repos/5724990)
[![codecov.io](https://img.shields.io/codecov/c/github/briannesbitt/Carbon.svg?style=flat-square)](https://codecov.io/github/briannesbitt/Carbon?branch=master) [![codecov.io](https://img.shields.io/codecov/c/github/briannesbitt/Carbon.svg?style=flat-square)](https://codecov.io/github/briannesbitt/Carbon?branch=master)
[![PHPStan](https://img.shields.io/badge/PHPStan-enabled-44CC11.svg?longCache=true&style=flat-square)](https://github.com/phpstan/phpstan) [![PHPStan](https://img.shields.io/badge/PHPStan-enabled-44CC11.svg?longCache=true&style=flat-square)](https://github.com/phpstan/phpstan)

View File

@@ -583,7 +583,13 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
$interval = new static(0); $interval = new static(0);
$localStrictModeEnabled = $interval->localStrictModeEnabled; $localStrictModeEnabled = $interval->localStrictModeEnabled;
$interval->localStrictModeEnabled = true; $interval->localStrictModeEnabled = true;
$result = $interval->$method(...$parameters);
$result = static::hasMacro($method)
? static::bindMacroContext(null, function () use (&$method, &$parameters, &$interval) {
return $interval->callMacro($method, $parameters);
})
: $interval->$method(...$parameters);
$interval->localStrictModeEnabled = $localStrictModeEnabled; $interval->localStrictModeEnabled = $localStrictModeEnabled;
return $result; return $result;
@@ -596,6 +602,16 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
} }
} }
/**
* Return the current context from inside a macro callee or a new one if static.
*
* @return static
*/
protected static function this()
{
return end(static::$macroContextStack) ?: new static(0);
}
/** /**
* Creates a CarbonInterval from string. * Creates a CarbonInterval from string.
* *
@@ -811,7 +827,7 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
} }
if ($interval instanceof self && is_a($className, self::class, true)) { if ($interval instanceof self && is_a($className, self::class, true)) {
$instance->setStep($interval->getStep()); static::copyStep($interval, $instance);
} }
static::copyNegativeUnits($interval, $instance); static::copyNegativeUnits($interval, $instance);
@@ -819,7 +835,7 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
return $instance; return $instance;
} }
private static function copyNegativeUnits(DateInterval $from, DateInterval $to) private static function copyNegativeUnits(DateInterval $from, DateInterval $to): void
{ {
$to->invert = $from->invert; $to->invert = $from->invert;
@@ -830,6 +846,11 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
} }
} }
private static function copyStep(self $from, self $to): void
{
$to->setStep($from->getStep());
}
/** /**
* Cast the current instance into the given class. * Cast the current instance into the given class.
* *
@@ -1228,10 +1249,10 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
if ($macro instanceof Closure) { if ($macro instanceof Closure) {
$boundMacro = @$macro->bindTo($this, static::class) ?: @$macro->bindTo(null, static::class); $boundMacro = @$macro->bindTo($this, static::class) ?: @$macro->bindTo(null, static::class);
return \call_user_func_array($boundMacro ?: $macro, $parameters); return ($boundMacro ?: $macro)(...$parameters);
} }
return \call_user_func_array($macro, $parameters); return $macro(...$parameters);
} }
/** /**

View File

@@ -174,43 +174,43 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
* *
* @var string * @var string
*/ */
const RECURRENCES_FILTER = 'Carbon\CarbonPeriod::filterRecurrences'; public const RECURRENCES_FILTER = [self::class, 'filterRecurrences'];
const END_DATE_FILTER = 'Carbon\CarbonPeriod::filterEndDate'; public const END_DATE_FILTER = [self::class, 'filterEndDate'];
/** /**
* Special value which can be returned by filters to end iteration. Also a filter. * Special value which can be returned by filters to end iteration. Also a filter.
* *
* @var string * @var string
*/ */
const END_ITERATION = 'Carbon\CarbonPeriod::endIteration'; public const END_ITERATION = [self::class, 'endIteration'];
/** /**
* Exclude start date from iteration. * Exclude start date from iteration.
* *
* @var int * @var int
*/ */
const EXCLUDE_START_DATE = 1; public const EXCLUDE_START_DATE = 1;
/** /**
* Exclude end date from iteration. * Exclude end date from iteration.
* *
* @var int * @var int
*/ */
const EXCLUDE_END_DATE = 2; public const EXCLUDE_END_DATE = 2;
/** /**
* Yield CarbonImmutable instances. * Yield CarbonImmutable instances.
* *
* @var int * @var int
*/ */
const IMMUTABLE = 4; public const IMMUTABLE = 4;
/** /**
* Number of maximum attempts before giving up on finding next valid date. * Number of maximum attempts before giving up on finding next valid date.
* *
* @var int * @var int
*/ */
const NEXT_MAX_ATTEMPTS = 1000; public const NEXT_MAX_ATTEMPTS = 1000;
/** /**
* The registered macros. * The registered macros.
@@ -583,7 +583,15 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
*/ */
public static function __callStatic($method, $parameters) public static function __callStatic($method, $parameters)
{ {
return (new static)->$method(...$parameters); $date = new static();
if (static::hasMacro($method)) {
return static::bindMacroContext(null, function () use (&$method, &$parameters, &$date) {
return $date->callMacro($method, $parameters);
});
}
return $date->$method(...$parameters);
} }
/** /**
@@ -1212,7 +1220,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
*/ */
public function setStartDate($date, $inclusive = null) public function setStartDate($date, $inclusive = null)
{ {
if (!$date = \call_user_func([$this->dateClass, 'make'], $date)) { if (!$date = ([$this->dateClass, 'make'])($date)) {
throw new InvalidPeriodDateException('Invalid start date.'); throw new InvalidPeriodDateException('Invalid start date.');
} }
@@ -1237,7 +1245,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
*/ */
public function setEndDate($date, $inclusive = null) public function setEndDate($date, $inclusive = null)
{ {
if (!\is_null($date) && !$date = \call_user_func([$this->dateClass, 'make'], $date)) { if (!\is_null($date) && !$date = ([$this->dateClass, 'make'])($date)) {
throw new InvalidPeriodDateException('Invalid end date.'); throw new InvalidPeriodDateException('Invalid end date.');
} }
@@ -1330,7 +1338,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
public function rewind() public function rewind()
{ {
$this->key = 0; $this->key = 0;
$this->current = \call_user_func([$this->dateClass, 'make'], $this->startDate); $this->current = ([$this->dateClass, 'make'])($this->startDate);
$settings = $this->getSettings(); $settings = $this->getSettings();
if ($this->hasLocalTranslator()) { if ($this->hasLocalTranslator()) {
@@ -1398,7 +1406,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
*/ */
public function toString() public function toString()
{ {
$translator = \call_user_func([$this->dateClass, 'getTranslator']); $translator = ([$this->dateClass, 'getTranslator'])();
$parts = []; $parts = [];
@@ -1490,11 +1498,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
$result = iterator_to_array($this); $result = iterator_to_array($this);
[ [$this->key, $this->current, $this->validationResult] = $state;
$this->key,
$this->current,
$this->validationResult
] = $state;
return $result; return $result;
} }
@@ -1637,9 +1641,10 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
case 'minute': case 'minute':
case 'seconds': case 'seconds':
case 'second': case 'second':
return $this->setDateInterval(\call_user_func( return $this->setDateInterval((
// Override default P1D when instantiating via fluent setters. // Override default P1D when instantiating via fluent setters.
[$this->isDefaultInterval ? new CarbonInterval('PT0S') : $this->dateInterval, $method], [$this->isDefaultInterval ? new CarbonInterval('PT0S') : $this->dateInterval, $method]
)(
\count($parameters) === 0 ? 1 : $first \count($parameters) === 0 ? 1 : $first
)); ));
} }
@@ -2173,7 +2178,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
} }
return [function ($date) use ($method, $parameters) { return [function ($date) use ($method, $parameters) {
return \call_user_func_array([$date, $method], $parameters); return ([$date, $method])(...$parameters);
}, $method]; }, $method];
} }
@@ -2187,7 +2192,8 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
*/ */
protected function isCarbonPredicateMethod($callable) protected function isCarbonPredicateMethod($callable)
{ {
return \is_string($callable) && substr($callable, 0, 2) === 'is' && (method_exists($this->dateClass, $callable) || \call_user_func([$this->dateClass, 'hasMacro'], $callable)); return \is_string($callable) && substr($callable, 0, 2) === 'is' &&
(method_exists($this->dateClass, $callable) || ([$this->dateClass, 'hasMacro'])($callable));
} }
/** /**
@@ -2313,7 +2319,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
*/ */
protected function prepareForReturn(CarbonInterface $date) protected function prepareForReturn(CarbonInterface $date)
{ {
$date = \call_user_func([$this->dateClass, 'make'], $date); $date = ([$this->dateClass, 'make'])($date);
if ($this->timezone) { if ($this->timezone) {
$date = $date->setTimezone($this->timezone); $date = $date->setTimezone($this->timezone);
@@ -2359,10 +2365,10 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
if ($macro instanceof Closure) { if ($macro instanceof Closure) {
$boundMacro = @$macro->bindTo($this, static::class) ?: @$macro->bindTo(null, static::class); $boundMacro = @$macro->bindTo($this, static::class) ?: @$macro->bindTo(null, static::class);
return \call_user_func_array($boundMacro ?: $macro, $parameters); return ($boundMacro ?: $macro)(...$parameters);
} }
return \call_user_func_array($macro, $parameters); return $macro(...$parameters);
} }
/** /**

View File

@@ -4,7 +4,7 @@ namespace Carbon\Cli;
class Invoker class Invoker
{ {
const CLI_CLASS_NAME = 'Carbon\\Cli'; public const CLI_CLASS_NAME = 'Carbon\\Cli';
protected function runWithCli(string $className, array $parameters): bool protected function runWithCli(string $className, array $parameters): bool
{ {

View File

@@ -35,7 +35,7 @@ trait CarbonTypeConverter
return preg_replace('/\(\d+\)/', "($precision)", $type); return preg_replace('/\(\d+\)/', "($precision)", $type);
} }
list($before, $after) = explode(' ', "$type "); [$before, $after] = explode(' ', "$type ");
return trim("$before($precision) $after"); return trim("$before($precision) $after");
} }

View File

@@ -2295,10 +2295,10 @@ trait Date
if ($macro instanceof Closure) { if ($macro instanceof Closure) {
$boundMacro = @Closure::bind($macro, null, static::class); $boundMacro = @Closure::bind($macro, null, static::class);
return \call_user_func_array($boundMacro ?: $macro, $parameters); return ($boundMacro ?: $macro)(...$parameters);
} }
return \call_user_func_array($macro, $parameters); return $macro(...$parameters);
}); });
} }
@@ -2412,10 +2412,10 @@ trait Date
if ($macro instanceof Closure) { if ($macro instanceof Closure) {
$boundMacro = @$macro->bindTo($this, static::class) ?: @$macro->bindTo(null, static::class); $boundMacro = @$macro->bindTo($this, static::class) ?: @$macro->bindTo(null, static::class);
return \call_user_func_array($boundMacro ?: $macro, $parameters); return ($boundMacro ?: $macro)(...$parameters);
} }
return \call_user_func_array($macro, $parameters); return $macro(...$parameters);
} }
protected function executeCallableWithContext($macro, ...$parameters) protected function executeCallableWithContext($macro, ...$parameters)

View File

@@ -495,8 +495,15 @@ trait Difference
public function floatDiffInDays($date = null, $absolute = true) public function floatDiffInDays($date = null, $absolute = true)
{ {
$hoursDiff = $this->floatDiffInHours($date, $absolute); $hoursDiff = $this->floatDiffInHours($date, $absolute);
$interval = $this->diff($date, $absolute);
return ($hoursDiff < 0 ? -1 : 1) * $this->diffInDays($date) + fmod($hoursDiff, static::HOURS_PER_DAY) / static::HOURS_PER_DAY; if ($interval->y === 0 && $interval->m === 0 && $interval->d === 0) {
return $hoursDiff / static::HOURS_PER_DAY;
}
$daysDiff = (int) $interval->format('%r%a');
return $daysDiff + fmod($hoursDiff, static::HOURS_PER_DAY) / static::HOURS_PER_DAY;
} }
/** /**

View File

@@ -535,7 +535,7 @@ trait Localization
public static function executeWithLocale($locale, $func) public static function executeWithLocale($locale, $func)
{ {
$currentLocale = static::getLocale(); $currentLocale = static::getLocale();
$result = \call_user_func($func, static::setLocale($locale) ? static::getLocale() : false, static::translator()); $result = $func(static::setLocale($locale) ? static::getLocale() : false, static::translator());
static::setLocale($currentLocale); static::setLocale($currentLocale);
return $result; return $result;

View File

@@ -164,6 +164,16 @@ trait Mixin
return $result; return $result;
} }
/**
* Return the current context from inside a macro callee or a null if static.
*
* @return static|null
*/
protected static function context()
{
return end(static::$macroContextStack) ?: null;
}
/** /**
* Return the current context from inside a macro callee or a new one if static. * Return the current context from inside a macro callee or a new one if static.
* *

View File

@@ -92,7 +92,9 @@ trait Rounding
$factor /= $delta; $factor /= $delta;
$fraction *= $delta; $fraction *= $delta;
$arguments[0] += $this->$unit * $factor; $arguments[0] += $this->$unit * $factor;
$changes[$unit] = round($minimum + ($fraction ? $fraction * \call_user_func($function, ($this->$unit - $minimum) / $fraction) : 0)); $changes[$unit] = round(
$minimum + ($fraction ? $fraction * $function(($this->$unit - $minimum) / $fraction) : 0)
);
// Cannot use modulo as it lose double precision // Cannot use modulo as it lose double precision
while ($changes[$unit] >= $delta) { while ($changes[$unit] >= $delta) {
@@ -105,7 +107,9 @@ trait Rounding
[$value, $minimum] = $arguments; [$value, $minimum] = $arguments;
/** @var CarbonInterface $result */ /** @var CarbonInterface $result */
$result = $this->$normalizedUnit(floor(\call_user_func($function, ($value - $minimum) / $precision) * $precision + $minimum)); $result = $this->$normalizedUnit(
floor($function(($value - $minimum) / $precision) * $precision + $minimum)
);
foreach ($changes as $unit => $value) { foreach ($changes as $unit => $value) {
$result = $result->$unit($value); $result = $result->$unit($value);

View File

@@ -149,10 +149,11 @@ trait Serialization
public function jsonSerialize() public function jsonSerialize()
{ {
$serializer = $this->localSerializer ?? static::$serializer; $serializer = $this->localSerializer ?? static::$serializer;
if ($serializer) { if ($serializer) {
return \is_string($serializer) return \is_string($serializer)
? $this->rawFormat($serializer) ? $this->rawFormat($serializer)
: \call_user_func($serializer, $this); : $serializer($this);
} }
return $this->toJSON(); return $this->toJSON();

View File

@@ -0,0 +1,86 @@
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
name: Main
on:
push:
pull_request:
jobs:
tests_70:
runs-on: "ubuntu-latest"
name: "PHP 7.0 Unit Tests"
steps:
- name: "Checkout"
uses: "actions/checkout@v2"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "xdebug"
php-version: "7.0"
tools: composer:v2
- name: "Install dependencies"
run: |
composer require php-coveralls/php-coveralls:^2.2 --dev --no-update
composer update --no-progress --prefer-dist
- name: "Tests"
run: "php vendor/bin/phpunit --coverage-clover build/logs/clover.xml"
- name: Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: "php vendor/bin/php-coveralls"
if: ${{ success() }}
tests:
runs-on: "ubuntu-latest"
name: "PHP ${{ matrix.php-version }} Unit Tests"
strategy:
matrix:
php-version:
- "7.1"
- "7.2"
- "7.3"
- "7.4"
- "8.0"
steps:
- name: "Checkout"
uses: "actions/checkout@v2"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
tools: composer:v2
- name: "Install dependencies"
run: "composer update --no-progress --prefer-dist"
- name: "PHPUnit"
run: "php vendor/bin/phpunit"
test_old_73_80:
runs-on: "ubuntu-latest"
name: "PHP 7.3 Code on PHP 8.0 Integration Tests"
steps:
- name: "Checkout"
uses: "actions/checkout@v2"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "8.0"
tools: composer:v2
- name: "Install PHP 8 dependencies"
run: "composer update --no-progress --prefer-dist"
- name: "Tests"
run: "test_old/run-php-src.sh 7.3.21"
test_old_80_70:
runs-on: "ubuntu-latest"
name: "PHP 8.0 Code on PHP 7.0 Integration Tests"
steps:
- name: "Checkout"
uses: "actions/checkout@v2"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "7.0"
tools: composer:v2
- name: "Install PHP 8 dependencies"
run: "composer update --no-progress --prefer-dist"
- name: "Tests"
run: "test_old/run-php-src.sh 8.0.0"

View File

@@ -1,7 +1,7 @@
PHP Parser PHP Parser
========== ==========
[![Build Status](https://travis-ci.org/nikic/PHP-Parser.svg?branch=master)](https://travis-ci.org/nikic/PHP-Parser) [![Coverage Status](https://coveralls.io/repos/github/nikic/PHP-Parser/badge.svg?branch=master)](https://coveralls.io/github/nikic/PHP-Parser?branch=master) [![Coverage Status](https://coveralls.io/repos/github/nikic/PHP-Parser/badge.svg?branch=master)](https://coveralls.io/github/nikic/PHP-Parser?branch=master)
This is a PHP 5.2 to PHP 8.0 parser written in PHP. Its purpose is to simplify static code analysis and This is a PHP 5.2 to PHP 8.0 parser written in PHP. Its purpose is to simplify static code analysis and
manipulation. manipulation.

View File

@@ -348,10 +348,7 @@ function_declaration_statement:
; ;
class_declaration_statement: class_declaration_statement:
class_entry_type identifier extends_from implements_list '{' class_statement_list '}' optional_attributes class_entry_type identifier extends_from implements_list '{' class_statement_list '}'
{ $$ = Stmt\Class_[$2, ['type' => $1, 'extends' => $3, 'implements' => $4, 'stmts' => $6, 'attrGroups' => []]];
$this->checkClass($$, #2); }
| attributes class_entry_type identifier extends_from implements_list '{' class_statement_list '}'
{ $$ = Stmt\Class_[$3, ['type' => $2, 'extends' => $4, 'implements' => $5, 'stmts' => $7, 'attrGroups' => $1]]; { $$ = Stmt\Class_[$3, ['type' => $2, 'extends' => $4, 'implements' => $5, 'stmts' => $7, 'attrGroups' => $1]];
$this->checkClass($$, #3); } $this->checkClass($$, #3); }
| optional_attributes T_INTERFACE identifier interface_extends_list '{' class_statement_list '}' | optional_attributes T_INTERFACE identifier interface_extends_list '{' class_statement_list '}'
@@ -601,7 +598,7 @@ non_empty_global_var_list:
; ;
global_var: global_var:
simple_variable { $$ = Expr\Variable[$1]; } simple_variable { $$ = $1; }
; ;
static_var_list: static_var_list:
@@ -1007,7 +1004,7 @@ callable_expr:
; ;
callable_variable: callable_variable:
simple_variable { $$ = Expr\Variable[$1]; } simple_variable { $$ = $1; }
| array_object_dereferencable '[' optional_expr ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } | array_object_dereferencable '[' optional_expr ']' { $$ = Expr\ArrayDimFetch[$1, $3]; }
| array_object_dereferencable '{' expr '}' { $$ = Expr\ArrayDimFetch[$1, $3]; } | array_object_dereferencable '{' expr '}' { $$ = Expr\ArrayDimFetch[$1, $3]; }
| function_call { $$ = $1; } | function_call { $$ = $1; }
@@ -1032,15 +1029,15 @@ variable:
; ;
simple_variable: simple_variable:
T_VARIABLE { $$ = parseVar($1); } plain_variable { $$ = $1; }
| '$' '{' expr '}' { $$ = $3; } | '$' '{' expr '}' { $$ = Expr\Variable[$3]; }
| '$' simple_variable { $$ = Expr\Variable[$2]; } | '$' simple_variable { $$ = Expr\Variable[$2]; }
| '$' error { $$ = Expr\Error[]; $this->errorState = 2; } | '$' error { $$ = Expr\Variable[Expr\Error[]]; $this->errorState = 2; }
; ;
static_member_prop_name: static_member_prop_name:
simple_variable simple_variable
{ $var = $1; $$ = \is_string($var) ? Node\VarLikeIdentifier[$var] : $var; } { $var = $1->name; $$ = \is_string($var) ? Node\VarLikeIdentifier[$var] : $var; }
; ;
static_member: static_member:
@@ -1049,7 +1046,7 @@ static_member:
; ;
new_variable: new_variable:
simple_variable { $$ = Expr\Variable[$1]; } simple_variable { $$ = $1; }
| new_variable '[' optional_expr ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } | new_variable '[' optional_expr ']' { $$ = Expr\ArrayDimFetch[$1, $3]; }
| new_variable '{' expr '}' { $$ = Expr\ArrayDimFetch[$1, $3]; } | new_variable '{' expr '}' { $$ = Expr\ArrayDimFetch[$1, $3]; }
| new_variable T_OBJECT_OPERATOR property_name { $$ = Expr\PropertyFetch[$1, $3]; } | new_variable T_OBJECT_OPERATOR property_name { $$ = Expr\PropertyFetch[$1, $3]; }
@@ -1063,13 +1060,13 @@ new_variable:
member_name: member_name:
identifier_ex { $$ = $1; } identifier_ex { $$ = $1; }
| '{' expr '}' { $$ = $2; } | '{' expr '}' { $$ = $2; }
| simple_variable { $$ = Expr\Variable[$1]; } | simple_variable { $$ = $1; }
; ;
property_name: property_name:
identifier { $$ = $1; } identifier { $$ = $1; }
| '{' expr '}' { $$ = $2; } | '{' expr '}' { $$ = $2; }
| simple_variable { $$ = Expr\Variable[$1]; } | simple_variable { $$ = $1; }
| error { $$ = Expr\Error[]; $this->errorState = 2; } | error { $$ = Expr\Error[]; $this->errorState = 2; }
; ;

File diff suppressed because it is too large Load Diff

View File

@@ -219,10 +219,7 @@ abstract class ParserAbstract implements Parser
)); ));
} }
// This is necessary to assign some meaningful attributes to /* empty */ productions. They'll get // Allow productions to access the start attributes of the lookahead token.
// the attributes of the next token, even though they don't contain it themselves.
$this->startAttributeStack[$stackPos+1] = $startAttributes;
$this->endAttributeStack[$stackPos+1] = $endAttributes;
$this->lookaheadStartAttributes = $startAttributes; $this->lookaheadStartAttributes = $startAttributes;
//$this->traceRead($symbol); //$this->traceRead($symbol);
@@ -294,7 +291,8 @@ abstract class ParserAbstract implements Parser
/* Goto - shift nonterminal */ /* Goto - shift nonterminal */
$lastEndAttributes = $this->endAttributeStack[$stackPos]; $lastEndAttributes = $this->endAttributeStack[$stackPos];
$stackPos -= $this->ruleToLength[$rule]; $ruleLength = $this->ruleToLength[$rule];
$stackPos -= $ruleLength;
$nonTerminal = $this->ruleToNonTerminal[$rule]; $nonTerminal = $this->ruleToNonTerminal[$rule];
$idx = $this->gotoBase[$nonTerminal] + $stateStack[$stackPos]; $idx = $this->gotoBase[$nonTerminal] + $stateStack[$stackPos];
if ($idx >= 0 && $idx < $this->gotoTableSize && $this->gotoCheck[$idx] === $nonTerminal) { if ($idx >= 0 && $idx < $this->gotoTableSize && $this->gotoCheck[$idx] === $nonTerminal) {
@@ -307,6 +305,10 @@ abstract class ParserAbstract implements Parser
$stateStack[$stackPos] = $state; $stateStack[$stackPos] = $state;
$this->semStack[$stackPos] = $this->semValue; $this->semStack[$stackPos] = $this->semValue;
$this->endAttributeStack[$stackPos] = $lastEndAttributes; $this->endAttributeStack[$stackPos] = $lastEndAttributes;
if ($ruleLength === 0) {
// Empty productions use the start attributes of the lookahead token.
$this->startAttributeStack[$stackPos] = $this->lookaheadStartAttributes;
}
} else { } else {
/* error */ /* error */
switch ($this->errorState) { switch ($this->errorState) {
@@ -340,6 +342,7 @@ abstract class ParserAbstract implements Parser
// We treat the error symbol as being empty, so we reset the end attributes // We treat the error symbol as being empty, so we reset the end attributes
// to the end attributes of the last non-error symbol // to the end attributes of the last non-error symbol
$this->startAttributeStack[$stackPos] = $this->lookaheadStartAttributes;
$this->endAttributeStack[$stackPos] = $this->endAttributeStack[$stackPos - 1]; $this->endAttributeStack[$stackPos] = $this->endAttributeStack[$stackPos - 1];
$this->endAttributes = $this->endAttributeStack[$stackPos - 1]; $this->endAttributes = $this->endAttributeStack[$stackPos - 1];
break; break;

View File

@@ -0,0 +1,42 @@
name: Build
on:
push:
branches: [master]
pull_request:
release:
types: [created]
jobs:
tests:
runs-on: ubuntu-latest
name: Build and test
strategy:
fail-fast: false
matrix:
php: [7.2, 7.3, 7.4, 8.0]
composer-flags: [ "" ]
include:
- php: 7.2
composer-flags: "--prefer-lowest"
steps:
- uses: actions/checkout@v2
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
coverage: none
- name: Install dependencies
run: COMPOSER_ROOT_VERSION=dev-master composer update ${{ matrix.composer-flags }}
id: end-of-setup
- name: Run tests (phpspec)
run: ./vendor/bin/phpspec run --format=dot
if: always() && steps.end-of-setup.outcome == 'success'
- name: Run tests (phpunit)
run: ./vendor/bin/phpunit
if: always() && steps.end-of-setup.outcome == 'success'

View File

@@ -1,3 +1,8 @@
1.12.2 / 2020/12/19
===================
* [fixed] MethodNotFoundException sometimes thrown with wrong class attached [@ciaranmcnulty]
1.12.1 / 2020/10/29 1.12.1 / 2020/10/29
=================== ===================

View File

@@ -97,7 +97,7 @@ $prophecy->willImplement('SessionHandlerInterface');
``` ```
There are 2 interesting calls - `willExtend` and `willImplement`. The first one tells There are 2 interesting calls - `willExtend` and `willImplement`. The first one tells
object prophecy that our object should extend specific class, the second one says that object prophecy that our object should extend a specific class. The second one says that
it should implement some interface. Obviously, objects in PHP can implement multiple it should implement some interface. Obviously, objects in PHP can implement multiple
interfaces, but extend only one parent class. interfaces, but extend only one parent class.

View File

@@ -27,7 +27,7 @@
"require-dev": { "require-dev": {
"phpspec/phpspec": "^6.0", "phpspec/phpspec": "^6.0",
"phpunit/phpunit": "^8.0 || ^9.0 <9.3" "phpunit/phpunit": "^8.0 || ^9.0"
}, },
"autoload": { "autoload": {

View File

@@ -92,7 +92,7 @@ PHP
$__call->setCode(<<<PHP $__call->setCode(<<<PHP
throw new \Prophecy\Exception\Doubler\MethodNotFoundException( throw new \Prophecy\Exception\Doubler\MethodNotFoundException(
sprintf('Method `%s::%s()` not found.', get_class(\$this), func_get_arg(0)), sprintf('Method `%s::%s()` not found.', get_class(\$this), func_get_arg(0)),
\$this->getProphecy(), func_get_arg(0) get_class(\$this), func_get_arg(0)
); );
PHP PHP
); );

View File

@@ -5,5 +5,7 @@
*.priv -crlf *.priv -crlf
*.txt -crlf *.txt -crlf
# ignore /notes in the git-generated distributed .zip archive # ignore directories in the git-generated distributed .zip archive
/doc/notes export-ignore /doc/notes export-ignore
/tests export-ignore
/phpunit.xml.dist export-ignore

View File

@@ -1,5 +1,6 @@
/.php_cs.cache /.php_cs.cache
/.phpunit /.phpunit
/.phpunit.result.cache
/build/* /build/*
/composer.lock /composer.lock
/phpunit.xml /phpunit.xml

View File

@@ -4,12 +4,17 @@ return PhpCsFixer\Config::create()
->setRules([ ->setRules([
'@Symfony' => true, '@Symfony' => true,
'@Symfony:risky' => true, '@Symfony:risky' => true,
'@PHPUnit75Migration:risky' => true,
'php_unit_dedicate_assert' => ['target' => '5.6'],
'array_syntax' => ['syntax' => 'short'], 'array_syntax' => ['syntax' => 'short'],
'php_unit_fqcn_annotation' => true,
'no_unreachable_default_argument_value' => false, 'no_unreachable_default_argument_value' => false,
'braces' => ['allow_single_line_closure' => true], 'braces' => ['allow_single_line_closure' => true],
'heredoc_to_nowdoc' => false, 'heredoc_to_nowdoc' => false,
'phpdoc_annotation_without_dot' => false, 'ordered_imports' => true,
'ternary_to_null_coalescing' => true, 'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'],
'native_function_invocation' => ['include' => ['@compiler_optimized'], 'scope' => 'all'],
'fopen_flags' => false,
]) ])
->setRiskyAllowed(true) ->setRiskyAllowed(true)
->setFinder(PhpCsFixer\Finder::create()->in(__DIR__)) ->setFinder(PhpCsFixer\Finder::create()->in(__DIR__))

View File

@@ -1,7 +1,5 @@
language: php language: php
sudo: false
before_script: before_script:
- cp tests/acceptance.conf.php.default tests/acceptance.conf.php - cp tests/acceptance.conf.php.default tests/acceptance.conf.php
- cp tests/smoke.conf.php.default tests/smoke.conf.php - cp tests/smoke.conf.php.default tests/smoke.conf.php
@@ -11,7 +9,11 @@ before_script:
- gem install mailcatcher - gem install mailcatcher
- mailcatcher --smtp-port 4456 - mailcatcher --smtp-port 4456
script: SYMFONY_PHPUNIT_VERSION=6.1 ./vendor/bin/simple-phpunit script: ./vendor/bin/simple-phpunit
env:
global:
- SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT=1
matrix: matrix:
include: include:
@@ -19,6 +21,8 @@ matrix:
- php: 7.1 - php: 7.1
- php: 7.2 - php: 7.2
- php: 7.3 - php: 7.3
- php: 7.4
- php: 8.0
fast_finish: true fast_finish: true
cache: cache:

View File

@@ -1,7 +1,14 @@
Changelog Changelog
========= =========
6.2.2 (2019-11-12) 6.2.4 (2020-12-08)
------------------
* Prevent flushing of the bubble queue when event handler raises another event
* Add support for PHP 8
* Code cleanups
6.2.3 (2019-11-12)
------------------ ------------------
* no changes * no changes
@@ -9,7 +16,7 @@ Changelog
6.2.2 (2019-11-12) 6.2.2 (2019-11-12)
------------------ ------------------
* fixed cmopat with PHP 7.4 * fixed compat with PHP 7.4
* fixed error message when connecting to a stream raises an error before connect() * fixed error message when connecting to a stream raises an error before connect()
6.2.1 (2019-04-21) 6.2.1 (2019-04-21)

View File

@@ -1,4 +1,4 @@
Copyright (c) 2013-2018 Fabien Potencier Copyright (c) 2013-2020 Fabien Potencier
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View File

@@ -16,18 +16,17 @@
], ],
"require": { "require": {
"php": ">=7.0.0", "php": ">=7.0.0",
"egulias/email-validator": "~2.0", "egulias/email-validator": "^2.0",
"symfony/polyfill-iconv": "^1.0", "symfony/polyfill-iconv": "^1.0",
"symfony/polyfill-mbstring": "^1.0", "symfony/polyfill-mbstring": "^1.0",
"symfony/polyfill-intl-idn": "^1.10" "symfony/polyfill-intl-idn": "^1.10"
}, },
"require-dev": { "require-dev": {
"mockery/mockery": "~0.9.1", "mockery/mockery": "^1.0",
"symfony/phpunit-bridge": "^3.4.19|^4.1.8" "symfony/phpunit-bridge": "^4.4|^5.0"
}, },
"suggest": { "suggest": {
"ext-intl": "Needed to support internationalized email addresses", "ext-intl": "Needed to support internationalized email addresses"
"true/punycode": "Needed to support internationalized email addresses, if ext-intl is not installed"
}, },
"autoload": { "autoload": {
"files": ["lib/swift_required.php"] "files": ["lib/swift_required.php"]

View File

@@ -1,7 +1,7 @@
Introduction Introduction
============ ============
Swift Mailer is a for sending e-mails from PHP applications. Swift Mailer is a component based library for sending e-mails from PHP applications.
System Requirements System Requirements
------------------- -------------------

View File

@@ -100,7 +100,7 @@ with a strict format, you only need to pass a DateTimeInterface instance to
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+ +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+
| ``Date`` | Specifies the date at which the message was sent | ``getDate()`` / ``setDate()`` | | ``Date`` | Specifies the date at which the message was sent | ``getDate()`` / ``setDate()`` |
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+ +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+
| ``Content-Type`` | Specifies the format of the message (usually text/plain or text/html) | ``getContentType()`` / ``setContentType()`` | | ``Content-Type`` | Specifies the format of the message (usually ``text/plain`` or ``text/html``) | ``getContentType()`` / ``setContentType()`` |
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+ +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+
| ``Content-Transfer-Encoding`` | Specifies the encoding scheme in the message | ``getEncoder()`` / ``setEncoder()`` | | ``Content-Transfer-Encoding`` | Specifies the encoding scheme in the message | ``getEncoder()`` / ``setEncoder()`` |
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+ +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+
@@ -820,7 +820,7 @@ Requesting a Read Receipt
It is possible to request a read-receipt to be sent to an address when the It is possible to request a read-receipt to be sent to an address when the
email is opened. To request a read receipt set the address with email is opened. To request a read receipt set the address with
``setReadReceiptTo()``: ``setReadReceiptTo()``::
$message->setReadReceiptTo('your@address.tld'); $message->setReadReceiptTo('your@address.tld');

View File

@@ -15,7 +15,7 @@
*/ */
abstract class Swift abstract class Swift
{ {
const VERSION = '6.2.3'; const VERSION = '6.2.4';
public static $initialized = false; public static $initialized = false;
public static $inits = []; public static $inits = [];
@@ -56,7 +56,7 @@ abstract class Swift
if (self::$inits && !self::$initialized) { if (self::$inits && !self::$initialized) {
self::$initialized = true; self::$initialized = true;
foreach (self::$inits as $init) { foreach (self::$inits as $init) {
call_user_func($init); \call_user_func($init);
} }
} }
} }

View File

@@ -18,8 +18,8 @@ interface Swift_AddressEncoder
/** /**
* Encodes an email address. * Encodes an email address.
* *
* @throws Swift_AddressEncoderException If the email cannot be represented in * @throws Swift_AddressEncoderException if the email cannot be represented in
* the encoding implemented by this class. * the encoding implemented by this class
*/ */
public function encodeString(string $address): string; public function encodeString(string $address): string;
} }

View File

@@ -26,7 +26,7 @@ class Swift_Attachment extends Swift_Mime_Attachment
*/ */
public function __construct($data = null, $filename = null, $contentType = null) public function __construct($data = null, $filename = null, $contentType = null)
{ {
call_user_func_array( \call_user_func_array(
[$this, 'Swift_Mime_Attachment::__construct'], [$this, 'Swift_Mime_Attachment::__construct'],
Swift_DependencyContainer::getInstance() Swift_DependencyContainer::getInstance()
->createDependenciesFor('mime.attachment') ->createDependenciesFor('mime.attachment')

View File

@@ -52,10 +52,10 @@ class Swift_ByteStream_ArrayByteStream implements Swift_InputByteStream, Swift_O
*/ */
public function __construct($stack = null) public function __construct($stack = null)
{ {
if (is_array($stack)) { if (\is_array($stack)) {
$this->array = $stack; $this->array = $stack;
$this->arraySize = count($stack); $this->arraySize = \count($stack);
} elseif (is_string($stack)) { } elseif (\is_string($stack)) {
$this->write($stack); $this->write($stack);
} else { } else {
$this->array = []; $this->array = [];
@@ -102,7 +102,7 @@ class Swift_ByteStream_ArrayByteStream implements Swift_InputByteStream, Swift_O
foreach ($to_add as $value) { foreach ($to_add as $value) {
$this->array[] = $value; $this->array[] = $value;
} }
$this->arraySize = count($this->array); $this->arraySize = \count($this->array);
foreach ($this->mirrors as $stream) { foreach ($this->mirrors as $stream) {
$stream->write($bytes); $stream->write($bytes);

View File

@@ -81,7 +81,7 @@ class Swift_ByteStream_FileByteStream extends Swift_ByteStream_AbstractFilterabl
// If we read one byte after reaching the end of the file // If we read one byte after reaching the end of the file
// feof() will return false and an empty string is returned // feof() will return false and an empty string is returned
if ('' === $bytes && feof($fp)) { if ((false === $bytes || '' === $bytes) && feof($fp)) {
$this->resetReadHandle(); $this->resetReadHandle();
return false; return false;
@@ -145,9 +145,7 @@ class Swift_ByteStream_FileByteStream extends Swift_ByteStream_AbstractFilterabl
{ {
if (!isset($this->writer)) { if (!isset($this->writer)) {
if (!$this->writer = fopen($this->path, $this->mode)) { if (!$this->writer = fopen($this->path, $this->mode)) {
throw new Swift_IoException( throw new Swift_IoException('Unable to open file for writing ['.$this->path.']');
'Unable to open file for writing ['.$this->path.']'
);
} }
} }
@@ -194,7 +192,7 @@ class Swift_ByteStream_FileByteStream extends Swift_ByteStream_AbstractFilterabl
{ {
if ($tmpFile = fopen('php://temp/maxmemory:4096', 'w+b')) { if ($tmpFile = fopen('php://temp/maxmemory:4096', 'w+b')) {
/* We have opened a php:// Stream Should work without problem */ /* We have opened a php:// Stream Should work without problem */
} elseif (function_exists('sys_get_temp_dir') && is_writable(sys_get_temp_dir()) && ($tmpFile = tmpfile())) { } elseif (\function_exists('sys_get_temp_dir') && is_writable(sys_get_temp_dir()) && ($tmpFile = tmpfile())) {
/* We have opened a tmpfile */ /* We have opened a tmpfile */
} else { } else {
throw new Swift_IoException('Unable to copy the file to make it seekable, sys_temp_dir is not writable, php://memory not available'); throw new Swift_IoException('Unable to copy the file to make it seekable, sys_temp_dir is not writable, php://memory not available');

View File

@@ -45,7 +45,7 @@ class Swift_CharacterReader_GenericFixedWidthReader implements Swift_CharacterRe
*/ */
public function getCharPositions($string, $startOffset, &$currentMap, &$ignoredChars) public function getCharPositions($string, $startOffset, &$currentMap, &$ignoredChars)
{ {
$strlen = strlen($string); $strlen = \strlen($string);
// % and / are CPU intensive, so, maybe find a better way // % and / are CPU intensive, so, maybe find a better way
$ignored = $strlen % $this->width; $ignored = $strlen % $this->width;
$ignoredChars = $ignored ? substr($string, -$ignored) : ''; $ignoredChars = $ignored ? substr($string, -$ignored) : '';

View File

@@ -27,7 +27,7 @@ class Swift_CharacterReader_UsAsciiReader implements Swift_CharacterReader
*/ */
public function getCharPositions($string, $startOffset, &$currentMap, &$ignoredChars) public function getCharPositions($string, $startOffset, &$currentMap, &$ignoredChars)
{ {
$strlen = strlen($string); $strlen = \strlen($string);
$ignoredChars = ''; $ignoredChars = '';
for ($i = 0; $i < $strlen; ++$i) { for ($i = 0; $i < $strlen; ++$i) {
if ($string[$i] > "\x07F") { if ($string[$i] > "\x07F") {
@@ -65,7 +65,7 @@ class Swift_CharacterReader_UsAsciiReader implements Swift_CharacterReader
public function validateByteSequence($bytes, $size) public function validateByteSequence($bytes, $size)
{ {
$byte = reset($bytes); $byte = reset($bytes);
if (1 == count($bytes) && $byte >= 0x00 && $byte <= 0x7F) { if (1 == \count($bytes) && $byte >= 0x00 && $byte <= 0x7F) {
return 0; return 0;
} }

View File

@@ -18,7 +18,7 @@ class Swift_CharacterReader_Utf8Reader implements Swift_CharacterReader
{ {
/** Pre-computed for optimization */ /** Pre-computed for optimization */
private static $length_map = [ private static $length_map = [
// N=0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F, // N=0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x0N 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x0N
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x1N 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x1N
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x2N 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x2N
@@ -34,7 +34,7 @@ class Swift_CharacterReader_Utf8Reader implements Swift_CharacterReader
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // 0xCN 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // 0xCN
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // 0xDN 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // 0xDN
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 0xEN 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 0xEN
4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 0, 0, // 0xFN 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 0, 0, // 0xFN
]; ];
private static $s_length_map = [ private static $s_length_map = [
@@ -88,8 +88,8 @@ class Swift_CharacterReader_Utf8Reader implements Swift_CharacterReader
$currentMap['p'] = $currentMap['i'] = []; $currentMap['p'] = $currentMap['i'] = [];
} }
$strlen = strlen($string); $strlen = \strlen($string);
$charPos = count($currentMap['p']); $charPos = \count($currentMap['p']);
$foundChars = 0; $foundChars = 0;
$invalid = false; $invalid = false;
for ($i = 0; $i < $strlen; ++$i) { for ($i = 0; $i < $strlen; ++$i) {

View File

@@ -44,7 +44,7 @@ class Swift_CharacterReaderFactory_SimpleCharacterReaderFactory implements Swift
public function init() public function init()
{ {
if (count(self::$map) > 0) { if (\count(self::$map) > 0) {
return; return;
} }
@@ -107,7 +107,7 @@ class Swift_CharacterReaderFactory_SimpleCharacterReaderFactory implements Swift
foreach (self::$map as $pattern => $spec) { foreach (self::$map as $pattern => $spec) {
$re = '/^'.$pattern.'$/D'; $re = '/^'.$pattern.'$/D';
if (preg_match($re, $charset)) { if (preg_match($re, $charset)) {
if (!array_key_exists($pattern, self::$loaded)) { if (!\array_key_exists($pattern, self::$loaded)) {
$reflector = new ReflectionClass($spec['class']); $reflector = new ReflectionClass($spec['class']);
if ($reflector->getConstructor()) { if ($reflector->getConstructor()) {
$reader = $reflector->newInstanceArgs($spec['constructor']); $reader = $reflector->newInstanceArgs($spec['constructor']);

View File

@@ -28,8 +28,6 @@ interface Swift_CharacterStream
/** /**
* Set the CharacterReaderFactory for multi charset support. * Set the CharacterReaderFactory for multi charset support.
*
* @param Swift_CharacterReaderFactory $factory
*/ */
public function setCharacterReaderFactory(Swift_CharacterReaderFactory $factory); public function setCharacterReaderFactory(Swift_CharacterReaderFactory $factory);

View File

@@ -86,15 +86,15 @@ class Swift_CharacterStream_ArrayCharacterStream implements Swift_CharacterStrea
$startLength = $this->charReader->getInitialByteSize(); $startLength = $this->charReader->getInitialByteSize();
while (false !== $bytes = $os->read($startLength)) { while (false !== $bytes = $os->read($startLength)) {
$c = []; $c = [];
for ($i = 0, $len = strlen($bytes); $i < $len; ++$i) { for ($i = 0, $len = \strlen($bytes); $i < $len; ++$i) {
$c[] = self::$byteMap[$bytes[$i]]; $c[] = self::$byteMap[$bytes[$i]];
} }
$size = count($c); $size = \count($c);
$need = $this->charReader $need = $this->charReader
->validateByteSequence($c, $size); ->validateByteSequence($c, $size);
if ($need > 0 && if ($need > 0 &&
false !== $bytes = $os->read($need)) { false !== $bytes = $os->read($need)) {
for ($i = 0, $len = strlen($bytes); $i < $len; ++$i) { for ($i = 0, $len = \strlen($bytes); $i < $len; ++$i) {
$c[] = self::$byteMap[$bytes[$i]]; $c[] = self::$byteMap[$bytes[$i]];
} }
} }
@@ -204,7 +204,7 @@ class Swift_CharacterStream_ArrayCharacterStream implements Swift_CharacterStrea
$new = $this->reloadBuffer($fp, 100); $new = $this->reloadBuffer($fp, 100);
if ($new) { if ($new) {
$buffer = array_merge($buf, $new); $buffer = array_merge($buf, $new);
$buf_len = count($buffer); $buf_len = \count($buffer);
$buf_pos = 0; $buf_pos = 0;
} else { } else {
$has_datas = false; $has_datas = false;
@@ -224,7 +224,7 @@ class Swift_CharacterStream_ArrayCharacterStream implements Swift_CharacterStrea
if ($new) { if ($new) {
$buffer = array_merge($buffer, $new); $buffer = array_merge($buffer, $new);
$buf_len = count($buffer); $buf_len = \count($buffer);
} }
} }
for ($i = 0; $i < $need && isset($buffer[$buf_pos]); ++$i) { for ($i = 0; $i < $need && isset($buffer[$buf_pos]); ++$i) {
@@ -268,7 +268,7 @@ class Swift_CharacterStream_ArrayCharacterStream implements Swift_CharacterStrea
{ {
if (!feof($fp) && false !== ($bytes = fread($fp, $len))) { if (!feof($fp) && false !== ($bytes = fread($fp, $len))) {
$buf = []; $buf = [];
for ($i = 0, $len = strlen($bytes); $i < $len; ++$i) { for ($i = 0, $len = \strlen($bytes); $i < $len; ++$i) {
$buf[] = self::$byteMap[$bytes[$i]]; $buf[] = self::$byteMap[$bytes[$i]];
} }
@@ -283,7 +283,7 @@ class Swift_CharacterStream_ArrayCharacterStream implements Swift_CharacterStrea
if (!isset(self::$charMap)) { if (!isset(self::$charMap)) {
self::$charMap = []; self::$charMap = [];
for ($byte = 0; $byte < 256; ++$byte) { for ($byte = 0; $byte < 256; ++$byte) {
self::$charMap[$byte] = chr($byte); self::$charMap[$byte] = \chr($byte);
} }
self::$byteMap = array_flip(self::$charMap); self::$byteMap = array_flip(self::$charMap);
} }

View File

@@ -254,9 +254,9 @@ class Swift_CharacterStream_NgCharacterStream implements Swift_CharacterStream
$this->datas .= $chars; $this->datas .= $chars;
$this->charCount += $this->charReader->getCharPositions(substr($this->datas, $this->datasSize), $this->datasSize, $this->map, $ignored); $this->charCount += $this->charReader->getCharPositions(substr($this->datas, $this->datasSize), $this->datasSize, $this->map, $ignored);
if (false !== $ignored) { if (false !== $ignored) {
$this->datasSize = strlen($this->datas) - strlen($ignored); $this->datasSize = \strlen($this->datas) - \strlen($ignored);
} else { } else {
$this->datasSize = strlen($this->datas); $this->datasSize = \strlen($this->datas);
} }
} }
} }

View File

@@ -83,7 +83,7 @@ class Swift_DependencyContainer
*/ */
public function has($itemName) public function has($itemName)
{ {
return array_key_exists($itemName, $this->store) return \array_key_exists($itemName, $this->store)
&& isset($this->store[$itemName]['lookupType']); && isset($this->store[$itemName]['lookupType']);
} }
@@ -101,9 +101,7 @@ class Swift_DependencyContainer
public function lookup($itemName) public function lookup($itemName)
{ {
if (!$this->has($itemName)) { if (!$this->has($itemName)) {
throw new Swift_DependencyException( throw new Swift_DependencyException('Cannot lookup dependency "'.$itemName.'" since it is not registered.');
'Cannot lookup dependency "'.$itemName.'" since it is not registered.'
);
} }
switch ($this->store[$itemName]['lookupType']) { switch ($this->store[$itemName]['lookupType']) {
@@ -348,9 +346,7 @@ class Swift_DependencyContainer
private function &getEndPoint() private function &getEndPoint()
{ {
if (!isset($this->endPoint)) { if (!isset($this->endPoint)) {
throw new BadMethodCallException( throw new BadMethodCallException('Component must first be registered by calling register()');
'Component must first be registered by calling register()'
);
} }
return $this->endPoint; return $this->endPoint;
@@ -377,7 +373,7 @@ class Swift_DependencyContainer
/** Resolve a single dependency with an collections */ /** Resolve a single dependency with an collections */
private function lookupRecursive($item) private function lookupRecursive($item)
{ {
if (is_array($item)) { if (\is_array($item)) {
$collection = []; $collection = [];
foreach ($item as $k => $v) { foreach ($item as $k => $v) {
$collection[$k] = $this->lookupRecursive($v); $collection[$k] = $this->lookupRecursive($v);

View File

@@ -26,7 +26,7 @@ class Swift_EmbeddedFile extends Swift_Mime_EmbeddedFile
*/ */
public function __construct($data = null, $filename = null, $contentType = null) public function __construct($data = null, $filename = null, $contentType = null)
{ {
call_user_func_array( \call_user_func_array(
[$this, 'Swift_Mime_EmbeddedFile::__construct'], [$this, 'Swift_Mime_EmbeddedFile::__construct'],
Swift_DependencyContainer::getInstance() Swift_DependencyContainer::getInstance()
->createDependenciesFor('mime.embeddedfile') ->createDependenciesFor('mime.embeddedfile')

View File

@@ -135,14 +135,14 @@ class Swift_Encoder_QpEncoder implements Swift_Encoder
protected function getSafeMapShareId() protected function getSafeMapShareId()
{ {
return get_class($this); return static::class;
} }
protected function initSafeMap() protected function initSafeMap()
{ {
foreach (array_merge( foreach (array_merge(
[0x09, 0x20], range(0x21, 0x3C), range(0x3E, 0x7E)) as $byte) { [0x09, 0x20], range(0x21, 0x3C), range(0x3E, 0x7E)) as $byte) {
$this->safeMap[$byte] = chr($byte); $this->safeMap[$byte] = \chr($byte);
} }
} }
@@ -281,7 +281,7 @@ class Swift_Encoder_QpEncoder implements Swift_Encoder
$string = str_replace(["\t=0D=0A", ' =0D=0A', '=0D=0A'], $string = str_replace(["\t=0D=0A", ' =0D=0A', '=0D=0A'],
["=09\r\n", "=20\r\n", "\r\n"], $string ["=09\r\n", "=20\r\n", "\r\n"], $string
); );
switch ($end = ord(substr($string, -1))) { switch ($end = \ord(substr($string, -1))) {
case 0x09: case 0x09:
case 0x20: case 0x20:
$string = substr_replace($string, self::$qpMap[$end], -1); $string = substr_replace($string, self::$qpMap[$end], -1);

View File

@@ -58,8 +58,8 @@ class Swift_Encoder_Rfc2231Encoder implements Swift_Encoder
while (false !== $char = $this->charStream->read(4)) { while (false !== $char = $this->charStream->read(4)) {
$encodedChar = rawurlencode($char); $encodedChar = rawurlencode($char);
if (0 != strlen($currentLine) if (0 != \strlen($currentLine)
&& strlen($currentLine.$encodedChar) > $thisLineLength) { && \strlen($currentLine.$encodedChar) > $thisLineLength) {
$lines[] = ''; $lines[] = '';
$currentLine = &$lines[$lineCount++]; $currentLine = &$lines[$lineCount++];
$thisLineLength = $maxLineLength; $thisLineLength = $maxLineLength;

View File

@@ -17,8 +17,6 @@ interface Swift_Events_CommandListener extends Swift_Events_EventListener
{ {
/** /**
* Invoked immediately following a command being sent. * Invoked immediately following a command being sent.
*
* @param Swift_Events_CommandEvent $evt
*/ */
public function commandSent(Swift_Events_CommandEvent $evt); public function commandSent(Swift_Events_CommandEvent $evt);
} }

View File

@@ -18,7 +18,6 @@ interface Swift_Events_EventDispatcher
/** /**
* Create a new SendEvent for $source and $message. * Create a new SendEvent for $source and $message.
* *
* @param Swift_Transport $source
* @param Swift_Mime_SimpleMessage * @param Swift_Mime_SimpleMessage
* *
* @return Swift_Events_SendEvent * @return Swift_Events_SendEvent
@@ -28,9 +27,8 @@ interface Swift_Events_EventDispatcher
/** /**
* Create a new CommandEvent for $source and $command. * Create a new CommandEvent for $source and $command.
* *
* @param Swift_Transport $source * @param string $command That will be executed
* @param string $command That will be executed * @param array $successCodes That are needed
* @param array $successCodes That are needed
* *
* @return Swift_Events_CommandEvent * @return Swift_Events_CommandEvent
*/ */
@@ -39,9 +37,8 @@ interface Swift_Events_EventDispatcher
/** /**
* Create a new ResponseEvent for $source and $response. * Create a new ResponseEvent for $source and $response.
* *
* @param Swift_Transport $source * @param string $response
* @param string $response * @param bool $valid If the response is valid
* @param bool $valid If the response is valid
* *
* @return Swift_Events_ResponseEvent * @return Swift_Events_ResponseEvent
*/ */
@@ -50,8 +47,6 @@ interface Swift_Events_EventDispatcher
/** /**
* Create a new TransportChangeEvent for $source. * Create a new TransportChangeEvent for $source.
* *
* @param Swift_Transport $source
*
* @return Swift_Events_TransportChangeEvent * @return Swift_Events_TransportChangeEvent
*/ */
public function createTransportChangeEvent(Swift_Transport $source); public function createTransportChangeEvent(Swift_Transport $source);
@@ -59,25 +54,19 @@ interface Swift_Events_EventDispatcher
/** /**
* Create a new TransportExceptionEvent for $source. * Create a new TransportExceptionEvent for $source.
* *
* @param Swift_Transport $source
* @param Swift_TransportException $ex
*
* @return Swift_Events_TransportExceptionEvent * @return Swift_Events_TransportExceptionEvent
*/ */
public function createTransportExceptionEvent(Swift_Transport $source, Swift_TransportException $ex); public function createTransportExceptionEvent(Swift_Transport $source, Swift_TransportException $ex);
/** /**
* Bind an event listener to this dispatcher. * Bind an event listener to this dispatcher.
*
* @param Swift_Events_EventListener $listener
*/ */
public function bindEventListener(Swift_Events_EventListener $listener); public function bindEventListener(Swift_Events_EventListener $listener);
/** /**
* Dispatch the given Event to all suitable listeners. * Dispatch the given Event to all suitable listeners.
* *
* @param Swift_Events_EventObject $evt * @param string $target method
* @param string $target method
*/ */
public function dispatchEvent(Swift_Events_EventObject $evt, $target); public function dispatchEvent(Swift_Events_EventObject $evt, $target);
} }

View File

@@ -17,8 +17,6 @@ interface Swift_Events_ResponseListener extends Swift_Events_EventListener
{ {
/** /**
* Invoked immediately following a response coming back. * Invoked immediately following a response coming back.
*
* @param Swift_Events_ResponseEvent $evt
*/ */
public function responseReceived(Swift_Events_ResponseEvent $evt); public function responseReceived(Swift_Events_ResponseEvent $evt);
} }

View File

@@ -17,15 +17,11 @@ interface Swift_Events_SendListener extends Swift_Events_EventListener
{ {
/** /**
* Invoked immediately before the Message is sent. * Invoked immediately before the Message is sent.
*
* @param Swift_Events_SendEvent $evt
*/ */
public function beforeSendPerformed(Swift_Events_SendEvent $evt); public function beforeSendPerformed(Swift_Events_SendEvent $evt);
/** /**
* Invoked immediately after the Message is sent. * Invoked immediately after the Message is sent.
*
* @param Swift_Events_SendEvent $evt
*/ */
public function sendPerformed(Swift_Events_SendEvent $evt); public function sendPerformed(Swift_Events_SendEvent $evt);
} }

View File

@@ -21,9 +21,6 @@ class Swift_Events_SimpleEventDispatcher implements Swift_Events_EventDispatcher
/** Event listeners bound to this dispatcher */ /** Event listeners bound to this dispatcher */
private $listeners = []; private $listeners = [];
/** Listeners queued to have an Event bubbled up the stack to them */
private $bubbleQueue = [];
/** /**
* Create a new EventDispatcher. * Create a new EventDispatcher.
*/ */
@@ -115,29 +112,31 @@ class Swift_Events_SimpleEventDispatcher implements Swift_Events_EventDispatcher
*/ */
public function dispatchEvent(Swift_Events_EventObject $evt, $target) public function dispatchEvent(Swift_Events_EventObject $evt, $target)
{ {
$this->prepareBubbleQueue($evt); $bubbleQueue = $this->prepareBubbleQueue($evt);
$this->bubble($evt, $target); $this->bubble($bubbleQueue, $evt, $target);
} }
/** Queue listeners on a stack ready for $evt to be bubbled up it */ /** Queue listeners on a stack ready for $evt to be bubbled up it */
private function prepareBubbleQueue(Swift_Events_EventObject $evt) private function prepareBubbleQueue(Swift_Events_EventObject $evt)
{ {
$this->bubbleQueue = []; $bubbleQueue = [];
$evtClass = get_class($evt); $evtClass = \get_class($evt);
foreach ($this->listeners as $listener) { foreach ($this->listeners as $listener) {
if (array_key_exists($evtClass, $this->eventMap) if (\array_key_exists($evtClass, $this->eventMap)
&& ($listener instanceof $this->eventMap[$evtClass])) { && ($listener instanceof $this->eventMap[$evtClass])) {
$this->bubbleQueue[] = $listener; $bubbleQueue[] = $listener;
} }
} }
return $bubbleQueue;
} }
/** Bubble $evt up the stack calling $target() on each listener */ /** Bubble $evt up the stack calling $target() on each listener */
private function bubble(Swift_Events_EventObject $evt, $target) private function bubble(array &$bubbleQueue, Swift_Events_EventObject $evt, $target)
{ {
if (!$evt->bubbleCancelled() && $listener = array_shift($this->bubbleQueue)) { if (!$evt->bubbleCancelled() && $listener = array_shift($bubbleQueue)) {
$listener->$target($evt); $listener->$target($evt);
$this->bubble($evt, $target); $this->bubble($bubbleQueue, $evt, $target);
} }
} }
} }

View File

@@ -17,29 +17,21 @@ interface Swift_Events_TransportChangeListener extends Swift_Events_EventListene
{ {
/** /**
* Invoked just before a Transport is started. * Invoked just before a Transport is started.
*
* @param Swift_Events_TransportChangeEvent $evt
*/ */
public function beforeTransportStarted(Swift_Events_TransportChangeEvent $evt); public function beforeTransportStarted(Swift_Events_TransportChangeEvent $evt);
/** /**
* Invoked immediately after the Transport is started. * Invoked immediately after the Transport is started.
*
* @param Swift_Events_TransportChangeEvent $evt
*/ */
public function transportStarted(Swift_Events_TransportChangeEvent $evt); public function transportStarted(Swift_Events_TransportChangeEvent $evt);
/** /**
* Invoked just before a Transport is stopped. * Invoked just before a Transport is stopped.
*
* @param Swift_Events_TransportChangeEvent $evt
*/ */
public function beforeTransportStopped(Swift_Events_TransportChangeEvent $evt); public function beforeTransportStopped(Swift_Events_TransportChangeEvent $evt);
/** /**
* Invoked immediately after the Transport is stopped. * Invoked immediately after the Transport is stopped.
*
* @param Swift_Events_TransportChangeEvent $evt
*/ */
public function transportStopped(Swift_Events_TransportChangeEvent $evt); public function transportStopped(Swift_Events_TransportChangeEvent $evt);
} }

View File

@@ -17,8 +17,6 @@ interface Swift_Events_TransportExceptionListener extends Swift_Events_EventList
{ {
/** /**
* Invoked as a TransportException is thrown in the Transport system. * Invoked as a TransportException is thrown in the Transport system.
*
* @param Swift_Events_TransportExceptionEvent $evt
*/ */
public function exceptionThrown(Swift_Events_TransportExceptionEvent $evt); public function exceptionThrown(Swift_Events_TransportExceptionEvent $evt);
} }

View File

@@ -22,7 +22,7 @@ class Swift_FailoverTransport extends Swift_Transport_FailoverTransport
*/ */
public function __construct($transports = []) public function __construct($transports = [])
{ {
call_user_func_array( \call_user_func_array(
[$this, 'Swift_Transport_FailoverTransport::__construct'], [$this, 'Swift_Transport_FailoverTransport::__construct'],
Swift_DependencyContainer::getInstance() Swift_DependencyContainer::getInstance()
->createDependenciesFor('transport.failover') ->createDependenciesFor('transport.failover')

View File

@@ -198,7 +198,7 @@ class Swift_FileSpool extends Swift_ConfigurableSpool
// This string MUST stay FS safe, avoid special chars // This string MUST stay FS safe, avoid special chars
$base = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-'; $base = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-';
$ret = ''; $ret = '';
$strlen = strlen($base); $strlen = \strlen($base);
for ($i = 0; $i < $count; ++$i) { for ($i = 0; $i < $count; ++$i) {
$ret .= $base[random_int(0, $strlen - 1)]; $ret .= $base[random_int(0, $strlen - 1)];
} }

View File

@@ -18,8 +18,7 @@ interface Swift_Filterable
/** /**
* Add a new StreamFilter, referenced by $key. * Add a new StreamFilter, referenced by $key.
* *
* @param Swift_StreamFilter $filter * @param string $key
* @param string $key
*/ */
public function addFilter(Swift_StreamFilter $filter, $key); public function addFilter(Swift_StreamFilter $filter, $key);

View File

@@ -38,10 +38,9 @@ interface Swift_KeyCache
* *
* @see MODE_WRITE, MODE_APPEND * @see MODE_WRITE, MODE_APPEND
* *
* @param string $nsKey * @param string $nsKey
* @param string $itemKey * @param string $itemKey
* @param Swift_OutputByteStream $os * @param int $mode
* @param int $mode
*/ */
public function importFromByteStream($nsKey, $itemKey, Swift_OutputByteStream $os, $mode); public function importFromByteStream($nsKey, $itemKey, Swift_OutputByteStream $os, $mode);

View File

@@ -62,10 +62,7 @@ class Swift_KeyCache_ArrayKeyCache implements Swift_KeyCache
$this->contents[$nsKey][$itemKey] .= $string; $this->contents[$nsKey][$itemKey] .= $string;
break; break;
default: default:
throw new Swift_SwiftException( throw new Swift_SwiftException('Invalid mode ['.$mode.'] used to set nsKey='.$nsKey.', itemKey='.$itemKey);
'Invalid mode ['.$mode.'] used to set nsKey='.
$nsKey.', itemKey='.$itemKey
);
} }
} }
@@ -94,10 +91,7 @@ class Swift_KeyCache_ArrayKeyCache implements Swift_KeyCache
} }
break; break;
default: default:
throw new Swift_SwiftException( throw new Swift_SwiftException('Invalid mode ['.$mode.'] used to set nsKey='.$nsKey.', itemKey='.$itemKey);
'Invalid mode ['.$mode.'] used to set nsKey='.
$nsKey.', itemKey='.$itemKey
);
} }
} }
@@ -165,7 +159,7 @@ class Swift_KeyCache_ArrayKeyCache implements Swift_KeyCache
{ {
$this->prepareCache($nsKey); $this->prepareCache($nsKey);
return array_key_exists($itemKey, $this->contents[$nsKey]); return \array_key_exists($itemKey, $this->contents[$nsKey]);
} }
/** /**
@@ -196,7 +190,7 @@ class Swift_KeyCache_ArrayKeyCache implements Swift_KeyCache
*/ */
private function prepareCache($nsKey) private function prepareCache($nsKey)
{ {
if (!array_key_exists($nsKey, $this->contents)) { if (!\array_key_exists($nsKey, $this->contents)) {
$this->contents[$nsKey] = []; $this->contents[$nsKey] = [];
} }
} }

View File

@@ -80,10 +80,7 @@ class Swift_KeyCache_DiskKeyCache implements Swift_KeyCache
$fp = $this->getHandle($nsKey, $itemKey, self::POSITION_END); $fp = $this->getHandle($nsKey, $itemKey, self::POSITION_END);
break; break;
default: default:
throw new Swift_SwiftException( throw new Swift_SwiftException('Invalid mode ['.$mode.'] used to set nsKey='.$nsKey.', itemKey='.$itemKey);
'Invalid mode ['.$mode.'] used to set nsKey='.
$nsKey.', itemKey='.$itemKey
);
break; break;
} }
fwrite($fp, $string); fwrite($fp, $string);
@@ -112,10 +109,7 @@ class Swift_KeyCache_DiskKeyCache implements Swift_KeyCache
$fp = $this->getHandle($nsKey, $itemKey, self::POSITION_END); $fp = $this->getHandle($nsKey, $itemKey, self::POSITION_END);
break; break;
default: default:
throw new Swift_SwiftException( throw new Swift_SwiftException('Invalid mode ['.$mode.'] used to set nsKey='.$nsKey.', itemKey='.$itemKey);
'Invalid mode ['.$mode.'] used to set nsKey='.
$nsKey.', itemKey='.$itemKey
);
break; break;
} }
while (false !== $bytes = $os->read(8192)) { while (false !== $bytes = $os->read(8192)) {
@@ -224,7 +218,7 @@ class Swift_KeyCache_DiskKeyCache implements Swift_KeyCache
*/ */
public function clearAll($nsKey) public function clearAll($nsKey)
{ {
if (array_key_exists($nsKey, $this->keys)) { if (\array_key_exists($nsKey, $this->keys)) {
foreach ($this->keys[$nsKey] as $itemKey => $null) { foreach ($this->keys[$nsKey] as $itemKey => $null) {
$this->clearKey($nsKey, $itemKey); $this->clearKey($nsKey, $itemKey);
} }

View File

@@ -17,8 +17,6 @@ interface Swift_KeyCache_KeyCacheInputStream extends Swift_InputByteStream
{ {
/** /**
* Set the KeyCache to wrap. * Set the KeyCache to wrap.
*
* @param Swift_KeyCache $keyCache
*/ */
public function setKeyCache(Swift_KeyCache $keyCache); public function setKeyCache(Swift_KeyCache $keyCache);
@@ -38,8 +36,6 @@ interface Swift_KeyCache_KeyCacheInputStream extends Swift_InputByteStream
/** /**
* Specify a stream to write through for each write(). * Specify a stream to write through for each write().
*
* @param Swift_InputByteStream $is
*/ */
public function setWriteThroughStream(Swift_InputByteStream $is); public function setWriteThroughStream(Swift_InputByteStream $is);

View File

@@ -22,7 +22,7 @@ class Swift_LoadBalancedTransport extends Swift_Transport_LoadBalancedTransport
*/ */
public function __construct($transports = []) public function __construct($transports = [])
{ {
call_user_func_array( \call_user_func_array(
[$this, 'Swift_Transport_LoadBalancedTransport::__construct'], [$this, 'Swift_Transport_LoadBalancedTransport::__construct'],
Swift_DependencyContainer::getInstance() Swift_DependencyContainer::getInstance()
->createDependenciesFor('transport.loadbalanced') ->createDependenciesFor('transport.loadbalanced')

View File

@@ -42,7 +42,7 @@ class Swift_Message extends Swift_Mime_SimpleMessage
*/ */
public function __construct($subject = null, $body = null, $contentType = null, $charset = null) public function __construct($subject = null, $body = null, $contentType = null, $charset = null)
{ {
call_user_func_array( \call_user_func_array(
[$this, 'Swift_Mime_SimpleMessage::__construct'], [$this, 'Swift_Mime_SimpleMessage::__construct'],
Swift_DependencyContainer::getInstance() Swift_DependencyContainer::getInstance()
->createDependenciesFor('mime.message') ->createDependenciesFor('mime.message')
@@ -212,7 +212,7 @@ class Swift_Message extends Swift_Mime_SimpleMessage
$this->savedMessage = ['headers' => []]; $this->savedMessage = ['headers' => []];
$this->savedMessage['body'] = $this->getBody(); $this->savedMessage['body'] = $this->getBody();
$this->savedMessage['children'] = $this->getChildren(); $this->savedMessage['children'] = $this->getChildren();
if (count($this->savedMessage['children']) > 0 && '' != $this->getBody()) { if (\count($this->savedMessage['children']) > 0 && '' != $this->getBody()) {
$this->setChildren(array_merge([$this->becomeMimePart()], $this->savedMessage['children'])); $this->setChildren(array_merge([$this->becomeMimePart()], $this->savedMessage['children']));
$this->setBody(''); $this->setBody('');
} }

View File

@@ -134,7 +134,7 @@ class Swift_Mime_Attachment extends Swift_Mime_SimpleMimeEntity
if (!isset($contentType)) { if (!isset($contentType)) {
$extension = strtolower(substr($file->getPath(), strrpos($file->getPath(), '.') + 1)); $extension = strtolower(substr($file->getPath(), strrpos($file->getPath(), '.') + 1));
if (array_key_exists($extension, $this->mimeTypes)) { if (\array_key_exists($extension, $this->mimeTypes)) {
$this->setContentType($this->mimeTypes[$extension]); $this->setContentType($this->mimeTypes[$extension]);
} }
} }

View File

@@ -46,7 +46,7 @@ class Swift_Mime_ContentEncoder_Base64ContentEncoder extends Swift_Encoder_Base6
$streamTheseBytes = $base64ReadBufferRemainderBytes.$readBytes; $streamTheseBytes = $base64ReadBufferRemainderBytes.$readBytes;
} }
$base64ReadBufferRemainderBytes = null; $base64ReadBufferRemainderBytes = null;
$bytesLength = strlen($streamTheseBytes); $bytesLength = \strlen($streamTheseBytes);
if (0 === $bytesLength) { // no data left to encode if (0 === $bytesLength) { // no data left to encode
break; break;
@@ -66,7 +66,7 @@ class Swift_Mime_ContentEncoder_Base64ContentEncoder extends Swift_Encoder_Base6
$encodedTransformed = ''; $encodedTransformed = '';
$thisMaxLineLength = $maxLineLength - $remainder - $firstLineOffset; $thisMaxLineLength = $maxLineLength - $remainder - $firstLineOffset;
while ($thisMaxLineLength < strlen($encoded)) { while ($thisMaxLineLength < \strlen($encoded)) {
$encodedTransformed .= substr($encoded, 0, $thisMaxLineLength)."\r\n"; $encodedTransformed .= substr($encoded, 0, $thisMaxLineLength)."\r\n";
$firstLineOffset = 0; $firstLineOffset = 0;
$encoded = substr($encoded, $thisMaxLineLength); $encoded = substr($encoded, $thisMaxLineLength);
@@ -74,7 +74,7 @@ class Swift_Mime_ContentEncoder_Base64ContentEncoder extends Swift_Encoder_Base6
$remainder = 0; $remainder = 0;
} }
if (0 < $remainingLength = strlen($encoded)) { if (0 < $remainingLength = \strlen($encoded)) {
$remainder += $remainingLength; $remainder += $remainingLength;
$encodedTransformed .= $encoded; $encodedTransformed .= $encoded;
$encoded = null; $encoded = null;

View File

@@ -16,16 +16,16 @@
class Swift_Mime_ContentEncoder_NativeQpContentEncoder implements Swift_Mime_ContentEncoder class Swift_Mime_ContentEncoder_NativeQpContentEncoder implements Swift_Mime_ContentEncoder
{ {
/** /**
* @var null|string * @var string|null
*/ */
private $charset; private $charset;
/** /**
* @param null|string $charset * @param string|null $charset
*/ */
public function __construct($charset = null) public function __construct($charset = null)
{ {
$this->charset = $charset ? $charset : 'utf-8'; $this->charset = $charset ?: 'utf-8';
} }
/** /**
@@ -51,8 +51,7 @@ class Swift_Mime_ContentEncoder_NativeQpContentEncoder implements Swift_Mime_Con
public function encodeByteStream(Swift_OutputByteStream $os, Swift_InputByteStream $is, $firstLineOffset = 0, $maxLineLength = 0) public function encodeByteStream(Swift_OutputByteStream $os, Swift_InputByteStream $is, $firstLineOffset = 0, $maxLineLength = 0)
{ {
if ('utf-8' !== $this->charset) { if ('utf-8' !== $this->charset) {
throw new RuntimeException( throw new RuntimeException(sprintf('Charset "%s" not supported. NativeQpContentEncoder only supports "utf-8"', $this->charset));
sprintf('Charset "%s" not supported. NativeQpContentEncoder only supports "utf-8"', $this->charset));
} }
$string = ''; $string = '';
@@ -88,8 +87,7 @@ class Swift_Mime_ContentEncoder_NativeQpContentEncoder implements Swift_Mime_Con
public function encodeString($string, $firstLineOffset = 0, $maxLineLength = 0) public function encodeString($string, $firstLineOffset = 0, $maxLineLength = 0)
{ {
if ('utf-8' !== $this->charset) { if ('utf-8' !== $this->charset) {
throw new RuntimeException( throw new RuntimeException(sprintf('Charset "%s" not supported. NativeQpContentEncoder only supports "utf-8"', $this->charset));
sprintf('Charset "%s" not supported. NativeQpContentEncoder only supports "utf-8"', $this->charset));
} }
return $this->standardize(quoted_printable_encode($string)); return $this->standardize(quoted_printable_encode($string));
@@ -109,7 +107,7 @@ class Swift_Mime_ContentEncoder_NativeQpContentEncoder implements Swift_Mime_Con
// transform =0D=0A to CRLF // transform =0D=0A to CRLF
$string = str_replace(["\t=0D=0A", ' =0D=0A', '=0D=0A'], ["=09\r\n", "=20\r\n", "\r\n"], $string); $string = str_replace(["\t=0D=0A", ' =0D=0A', '=0D=0A'], ["=09\r\n", "=20\r\n", "\r\n"], $string);
switch (ord(substr($string, -1))) { switch (\ord(substr($string, -1))) {
case 0x09: case 0x09:
$string = substr_replace($string, '=09', -1); $string = substr_replace($string, '=09', -1);
break; break;

View File

@@ -37,7 +37,7 @@ class Swift_Mime_ContentEncoder_PlainContentEncoder implements Swift_Mime_Conten
* Creates a new PlainContentEncoder with $name (probably 7bit or 8bit). * Creates a new PlainContentEncoder with $name (probably 7bit or 8bit).
* *
* @param string $name * @param string $name
* @param bool $canonical If canonicalization transformation should be done. * @param bool $canonical if canonicalization transformation should be done
*/ */
public function __construct($name, $canonical = false) public function __construct($name, $canonical = false)
{ {
@@ -84,7 +84,7 @@ class Swift_Mime_ContentEncoder_PlainContentEncoder implements Swift_Mime_Conten
$is->write($wrapped); $is->write($wrapped);
} }
if (strlen($leftOver)) { if (\strlen($leftOver)) {
$is->write($leftOver); $is->write($leftOver);
} }
} }
@@ -134,8 +134,8 @@ class Swift_Mime_ContentEncoder_PlainContentEncoder implements Swift_Mime_Conten
$chunks = preg_split('/(?<=\s)/', $originalLine); $chunks = preg_split('/(?<=\s)/', $originalLine);
foreach ($chunks as $chunk) { foreach ($chunks as $chunk) {
if (0 != strlen($currentLine) if (0 != \strlen($currentLine)
&& strlen($currentLine.$chunk) > $length) { && \strlen($currentLine.$chunk) > $length) {
$lines[] = ''; $lines[] = '';
$currentLine = &$lines[$lineCount++]; $currentLine = &$lines[$lineCount++];
} }

View File

@@ -37,7 +37,7 @@ class Swift_Mime_ContentEncoder_QpContentEncoder extends Swift_Encoder_QpEncoder
protected function getSafeMapShareId() protected function getSafeMapShareId()
{ {
return get_class($this).($this->dotEscape ? '.dotEscape' : ''); return static::class.($this->dotEscape ? '.dotEscape' : '');
} }
protected function initSafeMap() protected function initSafeMap()
@@ -116,7 +116,7 @@ class Swift_Mime_ContentEncoder_QpContentEncoder extends Swift_Encoder_QpEncoder
$lineLen = $size - strrpos($enc, '=0D=0A') - 6; $lineLen = $size - strrpos($enc, '=0D=0A') - 6;
} }
} }
if (strlen($currentLine)) { if (\strlen($currentLine)) {
$is->write($prepend.$this->standardize($currentLine)); $is->write($prepend.$this->standardize($currentLine));
} }
} }

View File

@@ -28,7 +28,7 @@ class Swift_Mime_ContentEncoder_QpContentEncoderProxy implements Swift_Mime_Cont
private $nativeEncoder; private $nativeEncoder;
/** /**
* @var null|string * @var string|null
*/ */
private $charset; private $charset;

View File

@@ -17,8 +17,6 @@ interface Swift_Mime_EncodingObserver
{ {
/** /**
* Notify this observer that the observed entity's ContentEncoder has changed. * Notify this observer that the observed entity's ContentEncoder has changed.
*
* @param Swift_Mime_ContentEncoder $encoder
*/ */
public function encoderChanged(Swift_Mime_ContentEncoder $encoder); public function encoderChanged(Swift_Mime_ContentEncoder $encoder);
} }

View File

@@ -31,7 +31,7 @@ class Swift_Mime_HeaderEncoder_QpHeaderEncoder extends Swift_Encoder_QpEncoder i
range(0x61, 0x7A), range(0x41, 0x5A), range(0x61, 0x7A), range(0x41, 0x5A),
range(0x30, 0x39), [0x20, 0x21, 0x2A, 0x2B, 0x2D, 0x2F] range(0x30, 0x39), [0x20, 0x21, 0x2A, 0x2B, 0x2D, 0x2F]
) as $byte) { ) as $byte) {
$this->safeMap[$byte] = chr($byte); $this->safeMap[$byte] = \chr($byte);
} }
} }

View File

@@ -216,7 +216,7 @@ abstract class Swift_Mime_Headers_AbstractHeader implements Swift_Mime_Header
// ... otherwise it needs encoding // ... otherwise it needs encoding
// Determine space remaining on line if first line // Determine space remaining on line if first line
if ($shorten) { if ($shorten) {
$usedLength = strlen($header->getFieldName().': '); $usedLength = \strlen($header->getFieldName().': ');
} else { } else {
$usedLength = 0; $usedLength = 0;
} }
@@ -271,7 +271,7 @@ abstract class Swift_Mime_Headers_AbstractHeader implements Swift_Mime_Header
} }
if (-1 == $usedLength) { if (-1 == $usedLength) {
$usedLength = strlen($header->getFieldName().': ') + strlen($value); $usedLength = \strlen($header->getFieldName().': ') + \strlen($value);
} }
$value .= $this->getTokenAsEncodedWord($token, $usedLength); $value .= $this->getTokenAsEncodedWord($token, $usedLength);
@@ -313,14 +313,14 @@ abstract class Swift_Mime_Headers_AbstractHeader implements Swift_Mime_Header
if ($this->tokenNeedsEncoding($token)) { if ($this->tokenNeedsEncoding($token)) {
$encodedToken .= $token; $encodedToken .= $token;
} else { } else {
if (strlen($encodedToken) > 0) { if (\strlen($encodedToken) > 0) {
$tokens[] = $encodedToken; $tokens[] = $encodedToken;
$encodedToken = ''; $encodedToken = '';
} }
$tokens[] = $token; $tokens[] = $token;
} }
} }
if (strlen($encodedToken)) { if (\strlen($encodedToken)) {
$tokens[] = $encodedToken; $tokens[] = $encodedToken;
} }
@@ -342,7 +342,7 @@ abstract class Swift_Mime_Headers_AbstractHeader implements Swift_Mime_Header
if (isset($this->lang)) { if (isset($this->lang)) {
$charsetDecl .= '*'.$this->lang; $charsetDecl .= '*'.$this->lang;
} }
$encodingWrapperLength = strlen( $encodingWrapperLength = \strlen(
'=?'.$charsetDecl.'?'.$this->encoder->getName().'??=' '=?'.$charsetDecl.'?'.$this->encoder->getName().'??='
); );
@@ -458,8 +458,8 @@ abstract class Swift_Mime_Headers_AbstractHeader implements Swift_Mime_Header
foreach ($tokens as $i => $token) { foreach ($tokens as $i => $token) {
// Line longer than specified maximum or token was just a new line // Line longer than specified maximum or token was just a new line
if (("\r\n" == $token) || if (("\r\n" == $token) ||
($i > 0 && strlen($currentLine.$token) > $this->lineLength) ($i > 0 && \strlen($currentLine.$token) > $this->lineLength)
&& 0 < strlen($currentLine)) { && 0 < \strlen($currentLine)) {
$headerLines[] = ''; $headerLines[] = '';
$currentLine = &$headerLines[$lineCount++]; $currentLine = &$headerLines[$lineCount++];
} }

View File

@@ -96,7 +96,7 @@ class Swift_Mime_Headers_IdentificationHeader extends Swift_Mime_Headers_Abstrac
*/ */
public function setId($id) public function setId($id)
{ {
$this->setIds(is_array($id) ? $id : [$id]); $this->setIds(\is_array($id) ? $id : [$id]);
} }
/** /**
@@ -108,7 +108,7 @@ class Swift_Mime_Headers_IdentificationHeader extends Swift_Mime_Headers_Abstrac
*/ */
public function getId() public function getId()
{ {
if (count($this->ids) > 0) { if (\count($this->ids) > 0) {
return $this->ids[0]; return $this->ids[0];
} }
} }

View File

@@ -261,7 +261,7 @@ class Swift_Mime_Headers_MailboxHeader extends Swift_Mime_Headers_AbstractHeader
$actualMailboxes = []; $actualMailboxes = [];
foreach ($mailboxes as $key => $value) { foreach ($mailboxes as $key => $value) {
if (is_string($key)) { if (\is_string($key)) {
//key is email addr //key is email addr
$address = $key; $address = $key;
$name = $value; $name = $value;
@@ -347,14 +347,12 @@ class Swift_Mime_Headers_MailboxHeader extends Swift_Mime_Headers_AbstractHeader
* *
* @param string $address * @param string $address
* *
* @throws Swift_RfcComplianceException If invalid. * @throws Swift_RfcComplianceException if invalid
*/ */
private function assertValidAddress($address) private function assertValidAddress($address)
{ {
if (!$this->emailValidator->isValid($address, new RFCValidation())) { if (!$this->emailValidator->isValid($address, new RFCValidation())) {
throw new Swift_RfcComplianceException( throw new Swift_RfcComplianceException('Address in mailbox given ['.$address.'] does not comply with RFC 2822, 3.6.2.');
'Address in mailbox given ['.$address.'] does not comply with RFC 2822, 3.6.2.'
);
} }
} }
} }

View File

@@ -155,7 +155,7 @@ class Swift_Mime_Headers_ParameterizedHeader extends Swift_Mime_Headers_Unstruct
foreach ($this->params as $name => $value) { foreach ($this->params as $name => $value) {
if (null !== $value) { if (null !== $value) {
// Add the semi-colon separator // Add the semi-colon separator
$tokens[count($tokens) - 1] .= ';'; $tokens[\count($tokens) - 1] .= ';';
$tokens = array_merge($tokens, $this->generateTokenLines( $tokens = array_merge($tokens, $this->generateTokenLines(
' '.$this->createParameter($name, $value) ' '.$this->createParameter($name, $value)
)); ));
@@ -179,7 +179,7 @@ class Swift_Mime_Headers_ParameterizedHeader extends Swift_Mime_Headers_Unstruct
$encoded = false; $encoded = false;
// Allow room for parameter name, indices, "=" and DQUOTEs // Allow room for parameter name, indices, "=" and DQUOTEs
$maxValueLength = $this->getMaxLineLength() - strlen($name.'=*N"";') - 1; $maxValueLength = $this->getMaxLineLength() - \strlen($name.'=*N"";') - 1;
$firstLineOffset = 0; $firstLineOffset = 0;
// If it's not already a valid parameter value... // If it's not already a valid parameter value...
@@ -189,15 +189,15 @@ class Swift_Mime_Headers_ParameterizedHeader extends Swift_Mime_Headers_Unstruct
if (!preg_match('/^[\x00-\x08\x0B\x0C\x0E-\x7F]*$/D', $value)) { if (!preg_match('/^[\x00-\x08\x0B\x0C\x0E-\x7F]*$/D', $value)) {
$encoded = true; $encoded = true;
// Allow space for the indices, charset and language // Allow space for the indices, charset and language
$maxValueLength = $this->getMaxLineLength() - strlen($name.'*N*="";') - 1; $maxValueLength = $this->getMaxLineLength() - \strlen($name.'*N*="";') - 1;
$firstLineOffset = strlen( $firstLineOffset = \strlen(
$this->getCharset()."'".$this->getLanguage()."'" $this->getCharset()."'".$this->getLanguage()."'"
); );
} }
} }
// Encode if we need to // Encode if we need to
if ($encoded || strlen($value) > $maxValueLength) { if ($encoded || \strlen($value) > $maxValueLength) {
if (isset($this->paramEncoder)) { if (isset($this->paramEncoder)) {
$value = $this->paramEncoder->encodeString( $value = $this->paramEncoder->encodeString(
$origValue, $firstLineOffset, $maxValueLength, $this->getCharset() $origValue, $firstLineOffset, $maxValueLength, $this->getCharset()
@@ -212,7 +212,7 @@ class Swift_Mime_Headers_ParameterizedHeader extends Swift_Mime_Headers_Unstruct
$valueLines = isset($this->paramEncoder) ? explode("\r\n", $value) : [$value]; $valueLines = isset($this->paramEncoder) ? explode("\r\n", $value) : [$value];
// Need to add indices // Need to add indices
if (count($valueLines) > 1) { if (\count($valueLines) > 1) {
$paramLines = []; $paramLines = [];
foreach ($valueLines as $i => $line) { foreach ($valueLines as $i => $line) {
$paramLines[] = $name.'*'.$i. $paramLines[] = $name.'*'.$i.

View File

@@ -147,9 +147,7 @@ class Swift_Mime_Headers_PathHeader extends Swift_Mime_Headers_AbstractHeader
private function assertValidAddress($address) private function assertValidAddress($address)
{ {
if (!$this->emailValidator->isValid($address, new RFCValidation())) { if (!$this->emailValidator->isValid($address, new RFCValidation())) {
throw new Swift_RfcComplianceException( throw new Swift_RfcComplianceException('Address set in PathHeader does not comply with addr-spec of RFC 2822.');
'Address set in PathHeader does not comply with addr-spec of RFC 2822.'
);
} }
} }
} }

View File

@@ -169,7 +169,7 @@ class Swift_Mime_MimePart extends Swift_Mime_SimpleMimeEntity
protected function fixHeaders() protected function fixHeaders()
{ {
parent::fixHeaders(); parent::fixHeaders();
if (count($this->getChildren())) { if (\count($this->getChildren())) {
$this->setHeaderParameter('Content-Type', 'charset', null); $this->setHeaderParameter('Content-Type', 'charset', null);
$this->setHeaderParameter('Content-Type', 'format', null); $this->setHeaderParameter('Content-Type', 'format', null);
$this->setHeaderParameter('Content-Type', 'delsp', null); $this->setHeaderParameter('Content-Type', 'delsp', null);
@@ -190,7 +190,7 @@ class Swift_Mime_MimePart extends Swift_Mime_SimpleMimeEntity
protected function convertString($string) protected function convertString($string)
{ {
$charset = strtolower($this->getCharset()); $charset = strtolower($this->getCharset());
if (!in_array($charset, ['utf-8', 'iso-8859-1', 'iso-8859-15', ''])) { if (!\in_array($charset, ['utf-8', 'iso-8859-1', 'iso-8859-15', ''])) {
return mb_convert_encoding($string, $charset, 'utf-8'); return mb_convert_encoding($string, $charset, 'utf-8');
} }

View File

@@ -68,8 +68,7 @@ class Swift_Mime_SimpleHeaderFactory implements Swift_Mime_CharsetObserver
/** /**
* Create a new Date header using $dateTime. * Create a new Date header using $dateTime.
* *
* @param string $name * @param string $name
* @param DateTimeInterface|null $dateTime
* *
* @return Swift_Mime_Header * @return Swift_Mime_Header
*/ */

View File

@@ -140,16 +140,16 @@ class Swift_Mime_SimpleHeaderSet implements Swift_Mime_CharsetObserver
{ {
$lowerName = strtolower($name); $lowerName = strtolower($name);
if (!array_key_exists($lowerName, $this->headers)) { if (!\array_key_exists($lowerName, $this->headers)) {
return false; return false;
} }
if (func_num_args() < 2) { if (\func_num_args() < 2) {
// index was not specified, so we only need to check that there is at least one header value set // index was not specified, so we only need to check that there is at least one header value set
return (bool) count($this->headers[$lowerName]); return (bool) \count($this->headers[$lowerName]);
} }
return array_key_exists($index, $this->headers[$lowerName]); return \array_key_exists($index, $this->headers[$lowerName]);
} }
/** /**
@@ -183,7 +183,7 @@ class Swift_Mime_SimpleHeaderSet implements Swift_Mime_CharsetObserver
{ {
$name = strtolower($name); $name = strtolower($name);
if (func_num_args() < 2) { if (\func_num_args() < 2) {
if ($this->has($name)) { if ($this->has($name)) {
$values = array_values($this->headers[$name]); $values = array_values($this->headers[$name]);
@@ -215,7 +215,7 @@ class Swift_Mime_SimpleHeaderSet implements Swift_Mime_CharsetObserver
} }
$lowerName = strtolower($name); $lowerName = strtolower($name);
if (!array_key_exists($lowerName, $this->headers)) { if (!\array_key_exists($lowerName, $this->headers)) {
return []; return [];
} }
@@ -343,7 +343,7 @@ class Swift_Mime_SimpleHeaderSet implements Swift_Mime_CharsetObserver
/** Test if the headers can be sorted */ /** Test if the headers can be sorted */
private function canSort() private function canSort()
{ {
return count($this->order) > 0; return \count($this->order) > 0;
} }
/** uksort() algorithm for Header ordering */ /** uksort() algorithm for Header ordering */
@@ -351,8 +351,8 @@ class Swift_Mime_SimpleHeaderSet implements Swift_Mime_CharsetObserver
{ {
$lowerA = strtolower($a); $lowerA = strtolower($a);
$lowerB = strtolower($b); $lowerB = strtolower($b);
$aPos = array_key_exists($lowerA, $this->order) ? $this->order[$lowerA] : -1; $aPos = \array_key_exists($lowerA, $this->order) ? $this->order[$lowerA] : -1;
$bPos = array_key_exists($lowerB, $this->order) ? $this->order[$lowerB] : -1; $bPos = \array_key_exists($lowerB, $this->order) ? $this->order[$lowerB] : -1;
if (-1 === $aPos && -1 === $bPos) { if (-1 === $aPos && -1 === $bPos) {
// just be sure to be determinist here // just be sure to be determinist here
@@ -371,7 +371,7 @@ class Swift_Mime_SimpleHeaderSet implements Swift_Mime_CharsetObserver
/** Test if the given Header is always displayed */ /** Test if the given Header is always displayed */
private function isDisplayed(Swift_Mime_Header $header) private function isDisplayed(Swift_Mime_Header $header)
{ {
return array_key_exists(strtolower($header->getFieldName()), $this->required); return \array_key_exists(strtolower($header->getFieldName()), $this->required);
} }
/** Notify all Headers of the new charset */ /** Notify all Headers of the new charset */

View File

@@ -152,7 +152,7 @@ class Swift_Mime_SimpleMessage extends Swift_Mime_MimePart
*/ */
public function setSender($address, $name = null) public function setSender($address, $name = null)
{ {
if (!is_array($address) && isset($name)) { if (!\is_array($address) && isset($name)) {
$address = [$address => $name]; $address = [$address => $name];
} }
@@ -206,7 +206,7 @@ class Swift_Mime_SimpleMessage extends Swift_Mime_MimePart
*/ */
public function setFrom($addresses, $name = null) public function setFrom($addresses, $name = null)
{ {
if (!is_array($addresses) && isset($name)) { if (!\is_array($addresses) && isset($name)) {
$addresses = [$addresses => $name]; $addresses = [$addresses => $name];
} }
@@ -260,7 +260,7 @@ class Swift_Mime_SimpleMessage extends Swift_Mime_MimePart
*/ */
public function setReplyTo($addresses, $name = null) public function setReplyTo($addresses, $name = null)
{ {
if (!is_array($addresses) && isset($name)) { if (!\is_array($addresses) && isset($name)) {
$addresses = [$addresses => $name]; $addresses = [$addresses => $name];
} }
@@ -315,7 +315,7 @@ class Swift_Mime_SimpleMessage extends Swift_Mime_MimePart
*/ */
public function setTo($addresses, $name = null) public function setTo($addresses, $name = null)
{ {
if (!is_array($addresses) && isset($name)) { if (!\is_array($addresses) && isset($name)) {
$addresses = [$addresses => $name]; $addresses = [$addresses => $name];
} }
@@ -367,7 +367,7 @@ class Swift_Mime_SimpleMessage extends Swift_Mime_MimePart
*/ */
public function setCc($addresses, $name = null) public function setCc($addresses, $name = null)
{ {
if (!is_array($addresses) && isset($name)) { if (!\is_array($addresses) && isset($name)) {
$addresses = [$addresses => $name]; $addresses = [$addresses => $name];
} }
@@ -419,7 +419,7 @@ class Swift_Mime_SimpleMessage extends Swift_Mime_MimePart
*/ */
public function setBcc($addresses, $name = null) public function setBcc($addresses, $name = null)
{ {
if (!is_array($addresses) && isset($name)) { if (!\is_array($addresses) && isset($name)) {
$addresses = [$addresses => $name]; $addresses = [$addresses => $name];
} }
@@ -568,7 +568,7 @@ class Swift_Mime_SimpleMessage extends Swift_Mime_MimePart
*/ */
public function toString() public function toString()
{ {
if (count($children = $this->getChildren()) > 0 && '' != $this->getBody()) { if (\count($children = $this->getChildren()) > 0 && '' != $this->getBody()) {
$this->setChildren(array_merge([$this->becomeMimePart()], $children)); $this->setChildren(array_merge([$this->becomeMimePart()], $children));
$string = parent::toString(); $string = parent::toString();
$this->setChildren($children); $this->setChildren($children);
@@ -596,7 +596,7 @@ class Swift_Mime_SimpleMessage extends Swift_Mime_MimePart
*/ */
public function toByteStream(Swift_InputByteStream $is) public function toByteStream(Swift_InputByteStream $is)
{ {
if (count($children = $this->getChildren()) > 0 && '' != $this->getBody()) { if (\count($children = $this->getChildren()) > 0 && '' != $this->getBody()) {
$this->setChildren(array_merge([$this->becomeMimePart()], $children)); $this->setChildren(array_merge([$this->becomeMimePart()], $children));
parent::toByteStream($is); parent::toByteStream($is);
$this->setChildren($children); $this->setChildren($children);

View File

@@ -634,7 +634,7 @@ class Swift_Mime_SimpleMimeEntity implements Swift_Mime_CharsetObserver, Swift_M
*/ */
protected function fixHeaders() protected function fixHeaders()
{ {
if (count($this->immediateChildren)) { if (\count($this->immediateChildren)) {
$this->setHeaderParameter('Content-Type', 'boundary', $this->setHeaderParameter('Content-Type', 'boundary',
$this->getBoundary() $this->getBoundary()
); );
@@ -778,7 +778,7 @@ class Swift_Mime_SimpleMimeEntity implements Swift_Mime_CharsetObserver, Swift_M
$sorted = []; $sorted = [];
foreach ($this->immediateChildren as $child) { foreach ($this->immediateChildren as $child) {
$type = $child->getContentType(); $type = $child->getContentType();
$level = array_key_exists($type, $this->alternativePartOrder) ? $this->alternativePartOrder[$type] : max($this->alternativePartOrder) + 1; $level = \array_key_exists($type, $this->alternativePartOrder) ? $this->alternativePartOrder[$type] : max($this->alternativePartOrder) + 1;
if (empty($sorted[$level])) { if (empty($sorted[$level])) {
$sorted[$level] = []; $sorted[$level] = [];

Some files were not shown because too many files have changed in this diff Show More