Version Description
- 2018-10-16 =
- Added: email notifications to administrators when new subscribers subscribe
Download this release
Release Info
| Developer | wysija |
| Plugin | |
| Version | 3.11.4 |
| Comparing to | |
| See all releases | |
Code changes from version 3.11.3 to 3.11.4
- assets/css/{admin.90fe3283.css → admin.e15169a5.css} +31 -0
- assets/css/manifest.json +1 -1
- assets/img/in_app_announcements/new-subscriber-notification.png +0 -0
- assets/js/{admin.eaab3da3.js → admin.f5731029.js} +122 -26
- assets/js/{admin_vendor.eaab3da3.js → admin_vendor.f5731029.js} +267 -267
- assets/js/{form_editor.eaab3da3.js → form_editor.f5731029.js} +10 -10
- assets/js/{mailpoet.eaab3da3.js → mailpoet.f5731029.js} +25 -25
- assets/js/manifest.json +7 -7
- assets/js/{mp2migrator.8768b2f6.js → mp2migrator.3d80df09.js} +2 -2
- assets/js/{newsletter_editor.eaab3da3.js → newsletter_editor.f5731029.js} +58 -58
- assets/js/{vendor.eaab3da3.js → vendor.f5731029.js} +0 -0
- lang/mailpoet-ca.mo +0 -0
- lang/mailpoet-da_DK.mo +0 -0
- lang/mailpoet-de_DE.mo +0 -0
- lang/mailpoet-es_ES.mo +0 -0
- lang/mailpoet-fa_IR.mo +0 -0
- lang/mailpoet-fr_CA.mo +0 -0
- lang/mailpoet-fr_FR.mo +0 -0
- lang/mailpoet-it_IT.mo +0 -0
- lang/mailpoet-ja.mo +0 -0
- lang/mailpoet-nl_NL.mo +0 -0
- lang/mailpoet-pl_PL.mo +0 -0
- lang/mailpoet-pt_BR.mo +0 -0
- lang/mailpoet-pt_PT.mo +0 -0
- lang/mailpoet-ru_RU.mo +0 -0
- lang/mailpoet-sq.mo +0 -0
- lang/mailpoet-sv_SE.mo +0 -0
- lang/mailpoet-tr_TR.mo +0 -0
- lang/mailpoet-zh_CN.mo +0 -0
- lang/mailpoet.pot +203 -128
- lib/API/MP/v1/API.php +14 -1
- lib/Analytics/Reporter.php +2 -0
- lib/Config/Capabilities.php +11 -7
- lib/Config/Menu.php +2 -1
- lib/Config/Migrator.php +1 -1
- lib/Config/Populator.php +11 -1
- lib/Form/Widget.php +1 -1
- lib/Models/Setting.php +2 -0
- lib/Models/Subscriber.php +7 -68
- lib/Subscribers/ConfirmationEmailMailer.php +91 -0
- lib/Subscribers/NewSubscriberNotificationMailer.php +121 -0
- lib/Subscription/Pages.php +16 -4
- lib/Util/ConflictResolver.php +3 -1
- lib/Util/Helpers.php +8 -0
- lib/Util/Notices/DiscountsAnnouncement.php +44 -0
- lib/Util/Notices/PHPVersionWarnings.php +1 -2
- lib/Util/Notices/PermanentNotices.php +7 -0
- mailpoet.php +2 -2
- readme.txt +4 -1
- vendor/autoload.php +1 -1
- vendor/bin/security-checker +2 -1
- vendor/cerdic/css-tidy/class.csstidy.php +42 -12
- vendor/cerdic/css-tidy/class.csstidy_optimise.php +363 -28
- vendor/cerdic/css-tidy/class.csstidy_print.php +7 -0
- vendor/cerdic/css-tidy/data.inc.php +5 -2
- vendor/cerdic/css-tidy/lang.inc.php +4 -2
- vendor/composer/ClassLoader.php +3 -3
- vendor/composer/autoload_classmap.php +8 -9
- vendor/composer/autoload_namespaces.php +0 -1
- vendor/composer/autoload_psr4.php +1 -0
- vendor/composer/autoload_real.php +7 -7
- vendor/composer/autoload_static.php +19 -19
- vendor/composer/installed.json +412 -410
- vendor/nesbot/carbon/src/Carbon/Lang/ru.php +7 -7
- vendor/nesbot/carbon/src/JsonSerializable.php +15 -13
- vendor/sensiolabs/security-checker/SensioLabs/Security/Command/SecurityCheckerCommand.php +11 -27
- vendor/sensiolabs/security-checker/SensioLabs/Security/Crawler.php +180 -0
- vendor/sensiolabs/security-checker/SensioLabs/Security/Crawler/BaseCrawler.php +0 -106
- vendor/sensiolabs/security-checker/SensioLabs/Security/Crawler/CrawlerInterface.php +0 -31
- vendor/sensiolabs/security-checker/SensioLabs/Security/Crawler/CurlCrawler.php +0 -98
- vendor/sensiolabs/security-checker/SensioLabs/Security/Crawler/DefaultCrawler.php +0 -49
- vendor/sensiolabs/security-checker/SensioLabs/Security/Crawler/FileGetContentsCrawler.php +0 -89
- vendor/sensiolabs/security-checker/SensioLabs/Security/Formatters/FormatterInterface.php +0 -26
- vendor/sensiolabs/security-checker/SensioLabs/Security/Formatters/JsonFormatter.php +0 -33
- vendor/sensiolabs/security-checker/SensioLabs/Security/Formatters/SimpleFormatter.php +0 -68
- vendor/sensiolabs/security-checker/SensioLabs/Security/Formatters/TextFormatter.php +0 -60
- vendor/sensiolabs/security-checker/SensioLabs/Security/Resources/security.sensiolabs.org.crt +0 -25
- vendor/sensiolabs/security-checker/SensioLabs/Security/Result.php +41 -0
- vendor/sensiolabs/security-checker/SensioLabs/Security/SecurityChecker.php +21 -25
- vendor/sensiolabs/security-checker/box.json +1 -1
- vendor/sensiolabs/security-checker/composer.json +3 -2
- vendor/sensiolabs/security-checker/security-checker +2 -1
- vendor/symfony/console/Application.php +166 -78
- vendor/symfony/console/Command/Command.php +36 -21
- vendor/symfony/console/Command/HelpCommand.php +1 -1
- vendor/symfony/console/Command/ListCommand.php +2 -2
- vendor/symfony/console/Command/LockableTrait.php +20 -11
- vendor/symfony/console/CommandLoader/CommandLoaderInterface.php +37 -0
- vendor/symfony/console/CommandLoader/ContainerCommandLoader.php +55 -0
- vendor/symfony/console/CommandLoader/FactoryCommandLoader.php +62 -0
- vendor/{sensiolabs/security-checker/SensioLabs/Security/Crawler → symfony/console/CommandLoader}/index.php +0 -0
- vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php +63 -13
- vendor/symfony/console/Descriptor/Descriptor.php +2 -2
- vendor/symfony/console/Descriptor/DescriptorInterface.php +1 -1
- vendor/symfony/console/Descriptor/JsonDescriptor.php +1 -1
- vendor/symfony/console/Descriptor/MarkdownDescriptor.php +3 -3
- vendor/symfony/console/Descriptor/TextDescriptor.php +8 -8
- vendor/symfony/console/Descriptor/XmlDescriptor.php +3 -3
- vendor/symfony/console/Event/ConsoleErrorEvent.php +2 -2
- vendor/symfony/console/EventListener/ErrorListener.php +2 -2
- vendor/symfony/console/Formatter/OutputFormatter.php +4 -4
- vendor/symfony/console/Formatter/OutputFormatterStyle.php +8 -24
- vendor/symfony/console/Formatter/OutputFormatterStyleStack.php +2 -2
- vendor/symfony/console/Helper/DebugFormatterHelper.php +1 -1
- vendor/symfony/console/Helper/DescriptorHelper.php +1 -1
- vendor/symfony/console/Helper/FormatterHelper.php +1 -1
- vendor/symfony/console/Helper/Helper.php +3 -3
- vendor/symfony/console/Helper/HelperSet.php +1 -1
- vendor/symfony/console/Helper/InputAwareHelper.php +1 -1
- vendor/symfony/console/Helper/ProcessHelper.php +2 -5
- vendor/symfony/console/Helper/ProgressBar.php +2 -2
- vendor/symfony/console/Helper/ProgressIndicator.php +3 -3
- vendor/symfony/console/Helper/QuestionHelper.php +13 -13
- vendor/symfony/console/Helper/SymfonyQuestionHelper.php +7 -3
- vendor/symfony/console/Helper/Table.php +29 -21
- vendor/symfony/console/Helper/TableCell.php +1 -1
- vendor/symfony/console/Helper/TableStyle.php +1 -1
- vendor/symfony/console/Input/ArgvInput.php +24 -16
- vendor/symfony/console/Input/ArrayInput.php +9 -9
- vendor/symfony/console/Input/Input.php +1 -1
- vendor/symfony/console/Input/InputArgument.php +8 -8
- vendor/symfony/console/Input/InputDefinition.php +7 -7
- vendor/symfony/console/Input/InputInterface.php +12 -6
- vendor/symfony/console/Input/InputOption.php +11 -11
- vendor/symfony/console/Input/StringInput.php +4 -4
- vendor/symfony/console/Logger/ConsoleLogger.php +17 -7
- vendor/symfony/console/Output/ConsoleOutput.php +1 -1
- vendor/symfony/console/Output/Output.php +1 -1
- vendor/symfony/console/Output/OutputInterface.php +2 -2
- vendor/symfony/console/Output/StreamOutput.php +26 -9
- vendor/symfony/console/Question/ChoiceQuestion.php +1 -1
- vendor/symfony/console/Question/ConfirmationQuestion.php +1 -1
- vendor/symfony/console/Question/Question.php +9 -9
- vendor/symfony/console/Style/OutputStyle.php +1 -1
- vendor/symfony/console/Style/SymfonyStyle.php +6 -6
- vendor/symfony/console/Terminal.php +5 -5
- vendor/symfony/console/Tester/CommandTester.php +1 -1
- vendor/symfony/console/Tests/ApplicationTest.php +237 -14
- vendor/symfony/console/Tests/Command/CommandTest.php +6 -6
- vendor/symfony/console/Tests/Command/HelpCommandTest.php +2 -2
- vendor/symfony/console/Tests/Command/ListCommandTest.php +1 -1
- vendor/symfony/console/Tests/Command/LockableTraitTest.php +11 -3
- vendor/symfony/console/Tests/CommandLoader/ContainerCommandLoaderTest.php +61 -0
- vendor/symfony/console/Tests/CommandLoader/FactoryCommandLoaderTest.php +60 -0
- vendor/{sensiolabs/security-checker/SensioLabs/Security/Formatters → symfony/console/Tests/CommandLoader}/index.php +0 -0
- vendor/symfony/console/Tests/DependencyInjection/AddConsoleCommandPassTest.php +143 -4
- vendor/symfony/console/Tests/EventListener/ErrorListenerTest.php +3 -3
- vendor/symfony/console/Tests/Fixtures/Foo6Command.php +0 -1
- vendor/symfony/console/Tests/Fixtures/FooSameCaseLowercaseCommand.php +11 -0
- vendor/symfony/console/Tests/Fixtures/FooSameCaseUppercaseCommand.php +11 -0
- vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_8.php +1 -1
- vendor/symfony/console/Tests/Formatter/OutputFormatterStyleStackTest.php +1 -1
- vendor/symfony/console/Tests/Helper/HelperSetTest.php +1 -1
- vendor/symfony/console/Tests/Helper/ProcessHelperTest.php +3 -4
- vendor/symfony/console/Tests/Helper/ProgressBarTest.php +1 -1
- vendor/symfony/console/Tests/Helper/QuestionHelperTest.php +29 -6
- vendor/symfony/console/Tests/Helper/SymfonyQuestionHelperTest.php +13 -1
- vendor/symfony/console/Tests/Helper/TableTest.php +56 -4
- vendor/symfony/console/Tests/Input/ArgvInputTest.php +63 -13
- vendor/symfony/console/Tests/Input/ArrayInputTest.php +6 -3
- vendor/symfony/console/Tests/Input/InputDefinitionTest.php +1 -1
- vendor/symfony/console/Tests/Input/InputTest.php +1 -1
- vendor/symfony/console/Tests/Logger/ConsoleLoggerTest.php +2 -4
- vendor/symfony/console/Tests/Output/OutputTest.php +1 -1
- vendor/symfony/console/Tests/Style/SymfonyStyleTest.php +3 -3
- vendor/symfony/console/Tests/Tester/CommandTesterTest.php +3 -3
- vendor/symfony/console/composer.json +11 -10
- vendor/symfony/debug/DebugClassLoader.php +184 -159
- vendor/symfony/debug/Tests/DebugClassLoaderTest.php +24 -11
- vendor/symfony/debug/Tests/FatalErrorHandler/UndefinedMethodFatalErrorHandlerTest.php +4 -4
- vendor/symfony/debug/Tests/Fixtures/ExtendedFinalMethod.php +2 -0
- vendor/symfony/debug/Tests/Fixtures/FinalMethod.php +7 -0
- vendor/symfony/debug/Tests/Fixtures/FinalMethod2Trait.php +10 -0
- vendor/symfony/debug/Tests/Fixtures/TraitWithInternalMethod.php +13 -0
- vendor/symfony/debug/Tests/phpt/debug_class_loader.phpt +1 -0
- vendor/symfony/debug/Tests/phpt/decorate_exception_hander.phpt +3 -3
- vendor/symfony/polyfill-mbstring/Mbstring.php +8 -10
- vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php +5 -0
- vendor/symfony/polyfill-mbstring/composer.json +1 -1
- vendor/symfony/translation/Catalogue/AbstractOperation.php +14 -15
- vendor/symfony/translation/Dumper/CsvFileDumper.php +1 -1
- {vendor/sensiolabs/security-checker/SensioLabs/Security/Resources → views/emails}/index.php +0 -0
- views/emails/newSubscriberNotification.html +24 -0
- views/emails/newSubscriberNotification.txt +18 -0
- views/form/editor.html +7 -0
- views/premium.html +10 -1
- views/settings.html +19 -1
- views/settings/basics.html +42 -0
assets/css/{admin.90fe3283.css → admin.e15169a5.css}
RENAMED
|
@@ -4459,6 +4459,12 @@ tr.introjs-showElement > th {
|
|
| 4459 |
.mailpoet_drag_and_drop_tutorial video {
|
| 4460 |
margin-top: 20px;
|
| 4461 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4462 |
@-moz-keyframes mailpoet_in_app_dot_pulse {
|
| 4463 |
0% {
|
| 4464 |
-moz-box-shadow: 0 0 0 0 rgba(255,83,1,0.4);
|
|
@@ -4527,3 +4533,28 @@ tr.introjs-showElement > th {
|
|
| 4527 |
box-shadow: 0 0 0 0 rgba(255,83,1,0);
|
| 4528 |
}
|
| 4529 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4459 |
.mailpoet_drag_and_drop_tutorial video {
|
| 4460 |
margin-top: 20px;
|
| 4461 |
}
|
| 4462 |
+
.new_subscriber_notification_announcement {
|
| 4463 |
+
text-align: center;
|
| 4464 |
+
}
|
| 4465 |
+
.new_subscriber_notification_announcement h2 {
|
| 4466 |
+
font-size: 28px;
|
| 4467 |
+
}
|
| 4468 |
@-moz-keyframes mailpoet_in_app_dot_pulse {
|
| 4469 |
0% {
|
| 4470 |
-moz-box-shadow: 0 0 0 0 rgba(255,83,1,0.4);
|
| 4533 |
box-shadow: 0 0 0 0 rgba(255,83,1,0);
|
| 4534 |
}
|
| 4535 |
}
|
| 4536 |
+
.mailpoet-discount-container {
|
| 4537 |
+
margin: 15px;
|
| 4538 |
+
padding: 20px;
|
| 4539 |
+
background: #fff;
|
| 4540 |
+
border: 1px solid #ff5301;
|
| 4541 |
+
text-align: center;
|
| 4542 |
+
}
|
| 4543 |
+
.mailpoet-discount-container h1 {
|
| 4544 |
+
margin: 0;
|
| 4545 |
+
line-height: 1.2em;
|
| 4546 |
+
font-size: 2.8em;
|
| 4547 |
+
font-weight: 400;
|
| 4548 |
+
}
|
| 4549 |
+
.mailpoet-discount-container p {
|
| 4550 |
+
line-height: 1.2em;
|
| 4551 |
+
font-size: 1.2em;
|
| 4552 |
+
}
|
| 4553 |
+
.mailpoet-discount-container a {
|
| 4554 |
+
display: inline-block;
|
| 4555 |
+
padding: 10px 30px;
|
| 4556 |
+
background: #ff5301;
|
| 4557 |
+
border: 1px solid #cc4200;
|
| 4558 |
+
color: #fff;
|
| 4559 |
+
text-decoration: none;
|
| 4560 |
+
}
|
assets/css/manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"admin-global.css": "admin-global.673373a1.css",
|
| 3 |
-
"admin.css": "admin.
|
| 4 |
"importExport.css": "importExport.b3745466.css",
|
| 5 |
"newsletter_editor.css": "newsletter_editor.4555a028.css",
|
| 6 |
"public.css": "public.cae357df.css",
|
| 1 |
{
|
| 2 |
"admin-global.css": "admin-global.673373a1.css",
|
| 3 |
+
"admin.css": "admin.e15169a5.css",
|
| 4 |
"importExport.css": "importExport.b3745466.css",
|
| 5 |
"newsletter_editor.css": "newsletter_editor.4555a028.css",
|
| 6 |
"public.css": "public.cae357df.css",
|
assets/img/in_app_announcements/new-subscriber-notification.png
ADDED
|
Binary file
|
assets/js/{admin.eaab3da3.js → admin.f5731029.js}
RENAMED
|
@@ -3154,7 +3154,7 @@ module.exports = {
|
|
| 3154 |
/***/ 39:
|
| 3155 |
/***/ (function(module, exports, __webpack_require__) {
|
| 3156 |
|
| 3157 |
-
/* WEBPACK VAR INJECTION */(function(global) {module.exports = global["Backbone"] = __webpack_require__(
|
| 3158 |
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
|
| 3159 |
|
| 3160 |
/***/ }),
|
|
@@ -5935,7 +5935,7 @@ function objectToString(o) {
|
|
| 5935 |
|
| 5936 |
/***/ }),
|
| 5937 |
|
| 5938 |
-
/***/
|
| 5939 |
/***/ (function(module, exports, __webpack_require__) {
|
| 5940 |
|
| 5941 |
"use strict";
|
|
@@ -5954,7 +5954,7 @@ var _mailpoet = __webpack_require__(3);
|
|
| 5954 |
|
| 5955 |
var _mailpoet2 = _interopRequireDefault(_mailpoet);
|
| 5956 |
|
| 5957 |
-
var _html2canvas = __webpack_require__(
|
| 5958 |
|
| 5959 |
var _html2canvas2 = _interopRequireDefault(_html2canvas);
|
| 5960 |
|
|
@@ -6038,15 +6038,15 @@ var fromNewsletter = exports.fromNewsletter = function fromNewsletter(data) {
|
|
| 6038 |
|
| 6039 |
/***/ }),
|
| 6040 |
|
| 6041 |
-
/***/
|
| 6042 |
/***/ (function(module, exports, __webpack_require__) {
|
| 6043 |
|
| 6044 |
-
/* WEBPACK VAR INJECTION */(function(global) {module.exports = global["html2canvas"] = __webpack_require__(
|
| 6045 |
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
|
| 6046 |
|
| 6047 |
/***/ }),
|
| 6048 |
|
| 6049 |
-
/***/
|
| 6050 |
/***/ (function(module, exports, __webpack_require__) {
|
| 6051 |
|
| 6052 |
/*!
|
|
@@ -13326,7 +13326,7 @@ var formatCounterValue = function formatCounterValue(counter, glue, format) {
|
|
| 13326 |
|
| 13327 |
/***/ }),
|
| 13328 |
|
| 13329 |
-
/***/
|
| 13330 |
/***/ (function(module, exports, __webpack_require__) {
|
| 13331 |
|
| 13332 |
/* WEBPACK VAR INJECTION */(function(global) {var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// Backbone.js 1.3.3
|
|
@@ -15255,7 +15255,7 @@ var formatCounterValue = function formatCounterValue(counter, glue, format) {
|
|
| 15255 |
|
| 15256 |
/***/ }),
|
| 15257 |
|
| 15258 |
-
/***/
|
| 15259 |
/***/ (function(module, exports, __webpack_require__) {
|
| 15260 |
|
| 15261 |
"use strict";
|
|
@@ -15346,7 +15346,7 @@ var _propTypes = __webpack_require__(12);
|
|
| 15346 |
|
| 15347 |
var _propTypes2 = _interopRequireDefault(_propTypes);
|
| 15348 |
|
| 15349 |
-
var _reactDom = __webpack_require__(
|
| 15350 |
|
| 15351 |
var ReactConfirmAlert = (function (_Component) {
|
| 15352 |
_inherits(ReactConfirmAlert, _Component);
|
|
@@ -15516,7 +15516,7 @@ var _select = __webpack_require__(466);
|
|
| 15516 |
|
| 15517 |
var _select2 = _interopRequireDefault(_select);
|
| 15518 |
|
| 15519 |
-
var _common = __webpack_require__(
|
| 15520 |
|
| 15521 |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
| 15522 |
|
|
@@ -16237,7 +16237,8 @@ __webpack_require__(665);
|
|
| 16237 |
__webpack_require__(666);
|
| 16238 |
__webpack_require__(669);
|
| 16239 |
__webpack_require__(670);
|
| 16240 |
-
|
|
|
|
| 16241 |
|
| 16242 |
|
| 16243 |
/***/ }),
|
|
@@ -16252,7 +16253,7 @@ var _react = __webpack_require__(2);
|
|
| 16252 |
|
| 16253 |
var _react2 = _interopRequireDefault(_react);
|
| 16254 |
|
| 16255 |
-
var _reactDom = __webpack_require__(
|
| 16256 |
|
| 16257 |
var _reactDom2 = _interopRequireDefault(_reactDom);
|
| 16258 |
|
|
@@ -16326,7 +16327,7 @@ var _listing = __webpack_require__(62);
|
|
| 16326 |
|
| 16327 |
var _listing2 = _interopRequireDefault(_listing);
|
| 16328 |
|
| 16329 |
-
var _selection = __webpack_require__(
|
| 16330 |
|
| 16331 |
var _selection2 = _interopRequireDefault(_selection);
|
| 16332 |
|
|
@@ -16936,7 +16937,7 @@ var _react = __webpack_require__(2);
|
|
| 16936 |
|
| 16937 |
var _react2 = _interopRequireDefault(_react);
|
| 16938 |
|
| 16939 |
-
var _reactDom = __webpack_require__(
|
| 16940 |
|
| 16941 |
var _reactDom2 = _interopRequireDefault(_reactDom);
|
| 16942 |
|
|
@@ -18330,7 +18331,7 @@ var _jquery = __webpack_require__(9);
|
|
| 18330 |
|
| 18331 |
var _jquery2 = _interopRequireDefault(_jquery);
|
| 18332 |
|
| 18333 |
-
var _thumbnail = __webpack_require__(
|
| 18334 |
|
| 18335 |
var _wpJsHooks = __webpack_require__(33);
|
| 18336 |
|
|
@@ -19271,7 +19272,7 @@ var _wpJsHooks = __webpack_require__(33);
|
|
| 19271 |
|
| 19272 |
var _wpJsHooks2 = _interopRequireDefault(_wpJsHooks);
|
| 19273 |
|
| 19274 |
-
var _scheduling = __webpack_require__(
|
| 19275 |
|
| 19276 |
var _scheduling2 = _interopRequireDefault(_scheduling);
|
| 19277 |
|
|
@@ -19563,7 +19564,7 @@ var _breadcrumb = __webpack_require__(58);
|
|
| 19563 |
|
| 19564 |
var _breadcrumb2 = _interopRequireDefault(_breadcrumb);
|
| 19565 |
|
| 19566 |
-
var _scheduling = __webpack_require__(
|
| 19567 |
|
| 19568 |
var _scheduling2 = _interopRequireDefault(_scheduling);
|
| 19569 |
|
|
@@ -20363,7 +20364,7 @@ var _mailpoet = __webpack_require__(3);
|
|
| 20363 |
|
| 20364 |
var _mailpoet2 = _interopRequireDefault(_mailpoet);
|
| 20365 |
|
| 20366 |
-
var _common = __webpack_require__(
|
| 20367 |
|
| 20368 |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
| 20369 |
|
|
@@ -20854,7 +20855,7 @@ var _react = __webpack_require__(2);
|
|
| 20854 |
|
| 20855 |
var _react2 = _interopRequireDefault(_react);
|
| 20856 |
|
| 20857 |
-
var _reactDom = __webpack_require__(
|
| 20858 |
|
| 20859 |
var _reactDom2 = _interopRequireDefault(_reactDom);
|
| 20860 |
|
|
@@ -21331,7 +21332,7 @@ var _react = __webpack_require__(2);
|
|
| 21331 |
|
| 21332 |
var _react2 = _interopRequireDefault(_react);
|
| 21333 |
|
| 21334 |
-
var _reactDom = __webpack_require__(
|
| 21335 |
|
| 21336 |
var _reactDom2 = _interopRequireDefault(_reactDom);
|
| 21337 |
|
|
@@ -21709,7 +21710,7 @@ var _react = __webpack_require__(2);
|
|
| 21709 |
|
| 21710 |
var _react2 = _interopRequireDefault(_react);
|
| 21711 |
|
| 21712 |
-
var _reactDom = __webpack_require__(
|
| 21713 |
|
| 21714 |
var _reactDom2 = _interopRequireDefault(_reactDom);
|
| 21715 |
|
|
@@ -21785,7 +21786,7 @@ var _queue_status = __webpack_require__(659);
|
|
| 21785 |
|
| 21786 |
var _queue_status2 = _interopRequireDefault(_queue_status);
|
| 21787 |
|
| 21788 |
-
var _tabs = __webpack_require__(
|
| 21789 |
|
| 21790 |
var _tabs2 = _interopRequireDefault(_tabs);
|
| 21791 |
|
|
@@ -22310,7 +22311,7 @@ var _underscore = __webpack_require__(7);
|
|
| 22310 |
|
| 22311 |
var _underscore2 = _interopRequireDefault(_underscore);
|
| 22312 |
|
| 22313 |
-
var _tabs = __webpack_require__(
|
| 22314 |
|
| 22315 |
var _tabs2 = _interopRequireDefault(_tabs);
|
| 22316 |
|
|
@@ -22380,7 +22381,7 @@ var _mailpoet = __webpack_require__(3);
|
|
| 22380 |
|
| 22381 |
var _mailpoet2 = _interopRequireDefault(_mailpoet);
|
| 22382 |
|
| 22383 |
-
var _tabs = __webpack_require__(
|
| 22384 |
|
| 22385 |
var _tabs2 = _interopRequireDefault(_tabs);
|
| 22386 |
|
|
@@ -22490,7 +22491,7 @@ module.exports = KnowledgeBase;
|
|
| 22490 |
"use strict";
|
| 22491 |
|
| 22492 |
|
| 22493 |
-
var _intro = __webpack_require__(
|
| 22494 |
|
| 22495 |
var _intro2 = _interopRequireDefault(_intro);
|
| 22496 |
|
|
@@ -24081,7 +24082,7 @@ var _react = __webpack_require__(2);
|
|
| 24081 |
|
| 24082 |
var _react2 = _interopRequireDefault(_react);
|
| 24083 |
|
| 24084 |
-
var _reactDom = __webpack_require__(
|
| 24085 |
|
| 24086 |
var _reactDom2 = _interopRequireDefault(_reactDom);
|
| 24087 |
|
|
@@ -24817,6 +24818,101 @@ WelcomeWizardWooCommerceStep.propTypes = {
|
|
| 24817 |
/***/ 679:
|
| 24818 |
/***/ (function(module, exports, __webpack_require__) {
|
| 24819 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24820 |
"use strict";
|
| 24821 |
/* WEBPACK VAR INJECTION */(function(setImmediate) {
|
| 24822 |
|
| 3154 |
/***/ 39:
|
| 3155 |
/***/ (function(module, exports, __webpack_require__) {
|
| 3156 |
|
| 3157 |
+
/* WEBPACK VAR INJECTION */(function(global) {module.exports = global["Backbone"] = __webpack_require__(475);
|
| 3158 |
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
|
| 3159 |
|
| 3160 |
/***/ }),
|
| 5935 |
|
| 5936 |
/***/ }),
|
| 5937 |
|
| 5938 |
+
/***/ 472:
|
| 5939 |
/***/ (function(module, exports, __webpack_require__) {
|
| 5940 |
|
| 5941 |
"use strict";
|
| 5954 |
|
| 5955 |
var _mailpoet2 = _interopRequireDefault(_mailpoet);
|
| 5956 |
|
| 5957 |
+
var _html2canvas = __webpack_require__(473);
|
| 5958 |
|
| 5959 |
var _html2canvas2 = _interopRequireDefault(_html2canvas);
|
| 5960 |
|
| 6038 |
|
| 6039 |
/***/ }),
|
| 6040 |
|
| 6041 |
+
/***/ 473:
|
| 6042 |
/***/ (function(module, exports, __webpack_require__) {
|
| 6043 |
|
| 6044 |
+
/* WEBPACK VAR INJECTION */(function(global) {module.exports = global["html2canvas"] = __webpack_require__(474);
|
| 6045 |
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
|
| 6046 |
|
| 6047 |
/***/ }),
|
| 6048 |
|
| 6049 |
+
/***/ 474:
|
| 6050 |
/***/ (function(module, exports, __webpack_require__) {
|
| 6051 |
|
| 6052 |
/*!
|
| 13326 |
|
| 13327 |
/***/ }),
|
| 13328 |
|
| 13329 |
+
/***/ 475:
|
| 13330 |
/***/ (function(module, exports, __webpack_require__) {
|
| 13331 |
|
| 13332 |
/* WEBPACK VAR INJECTION */(function(global) {var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// Backbone.js 1.3.3
|
| 15255 |
|
| 15256 |
/***/ }),
|
| 15257 |
|
| 15258 |
+
/***/ 476:
|
| 15259 |
/***/ (function(module, exports, __webpack_require__) {
|
| 15260 |
|
| 15261 |
"use strict";
|
| 15346 |
|
| 15347 |
var _propTypes2 = _interopRequireDefault(_propTypes);
|
| 15348 |
|
| 15349 |
+
var _reactDom = __webpack_require__(28);
|
| 15350 |
|
| 15351 |
var ReactConfirmAlert = (function (_Component) {
|
| 15352 |
_inherits(ReactConfirmAlert, _Component);
|
| 15516 |
|
| 15517 |
var _select2 = _interopRequireDefault(_select);
|
| 15518 |
|
| 15519 |
+
var _common = __webpack_require__(469);
|
| 15520 |
|
| 15521 |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
| 15522 |
|
| 16237 |
__webpack_require__(666);
|
| 16238 |
__webpack_require__(669);
|
| 16239 |
__webpack_require__(670);
|
| 16240 |
+
__webpack_require__(679);
|
| 16241 |
+
module.exports = __webpack_require__(681);
|
| 16242 |
|
| 16243 |
|
| 16244 |
/***/ }),
|
| 16253 |
|
| 16254 |
var _react2 = _interopRequireDefault(_react);
|
| 16255 |
|
| 16256 |
+
var _reactDom = __webpack_require__(28);
|
| 16257 |
|
| 16258 |
var _reactDom2 = _interopRequireDefault(_reactDom);
|
| 16259 |
|
| 16327 |
|
| 16328 |
var _listing2 = _interopRequireDefault(_listing);
|
| 16329 |
|
| 16330 |
+
var _selection = __webpack_require__(499);
|
| 16331 |
|
| 16332 |
var _selection2 = _interopRequireDefault(_selection);
|
| 16333 |
|
| 16937 |
|
| 16938 |
var _react2 = _interopRequireDefault(_react);
|
| 16939 |
|
| 16940 |
+
var _reactDom = __webpack_require__(28);
|
| 16941 |
|
| 16942 |
var _reactDom2 = _interopRequireDefault(_reactDom);
|
| 16943 |
|
| 18331 |
|
| 18332 |
var _jquery2 = _interopRequireDefault(_jquery);
|
| 18333 |
|
| 18334 |
+
var _thumbnail = __webpack_require__(472);
|
| 18335 |
|
| 18336 |
var _wpJsHooks = __webpack_require__(33);
|
| 18337 |
|
| 19272 |
|
| 19273 |
var _wpJsHooks2 = _interopRequireDefault(_wpJsHooks);
|
| 19274 |
|
| 19275 |
+
var _scheduling = __webpack_require__(468);
|
| 19276 |
|
| 19277 |
var _scheduling2 = _interopRequireDefault(_scheduling);
|
| 19278 |
|
| 19564 |
|
| 19565 |
var _breadcrumb2 = _interopRequireDefault(_breadcrumb);
|
| 19566 |
|
| 19567 |
+
var _scheduling = __webpack_require__(468);
|
| 19568 |
|
| 19569 |
var _scheduling2 = _interopRequireDefault(_scheduling);
|
| 19570 |
|
| 20364 |
|
| 20365 |
var _mailpoet2 = _interopRequireDefault(_mailpoet);
|
| 20366 |
|
| 20367 |
+
var _common = __webpack_require__(469);
|
| 20368 |
|
| 20369 |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
| 20370 |
|
| 20855 |
|
| 20856 |
var _react2 = _interopRequireDefault(_react);
|
| 20857 |
|
| 20858 |
+
var _reactDom = __webpack_require__(28);
|
| 20859 |
|
| 20860 |
var _reactDom2 = _interopRequireDefault(_reactDom);
|
| 20861 |
|
| 21332 |
|
| 21333 |
var _react2 = _interopRequireDefault(_react);
|
| 21334 |
|
| 21335 |
+
var _reactDom = __webpack_require__(28);
|
| 21336 |
|
| 21337 |
var _reactDom2 = _interopRequireDefault(_reactDom);
|
| 21338 |
|
| 21710 |
|
| 21711 |
var _react2 = _interopRequireDefault(_react);
|
| 21712 |
|
| 21713 |
+
var _reactDom = __webpack_require__(28);
|
| 21714 |
|
| 21715 |
var _reactDom2 = _interopRequireDefault(_reactDom);
|
| 21716 |
|
| 21786 |
|
| 21787 |
var _queue_status2 = _interopRequireDefault(_queue_status);
|
| 21788 |
|
| 21789 |
+
var _tabs = __webpack_require__(476);
|
| 21790 |
|
| 21791 |
var _tabs2 = _interopRequireDefault(_tabs);
|
| 21792 |
|
| 22311 |
|
| 22312 |
var _underscore2 = _interopRequireDefault(_underscore);
|
| 22313 |
|
| 22314 |
+
var _tabs = __webpack_require__(476);
|
| 22315 |
|
| 22316 |
var _tabs2 = _interopRequireDefault(_tabs);
|
| 22317 |
|
| 22381 |
|
| 22382 |
var _mailpoet2 = _interopRequireDefault(_mailpoet);
|
| 22383 |
|
| 22384 |
+
var _tabs = __webpack_require__(476);
|
| 22385 |
|
| 22386 |
var _tabs2 = _interopRequireDefault(_tabs);
|
| 22387 |
|
| 22491 |
"use strict";
|
| 22492 |
|
| 22493 |
|
| 22494 |
+
var _intro = __webpack_require__(500);
|
| 22495 |
|
| 22496 |
var _intro2 = _interopRequireDefault(_intro);
|
| 22497 |
|
| 24082 |
|
| 24083 |
var _react2 = _interopRequireDefault(_react);
|
| 24084 |
|
| 24085 |
+
var _reactDom = __webpack_require__(28);
|
| 24086 |
|
| 24087 |
var _reactDom2 = _interopRequireDefault(_reactDom);
|
| 24088 |
|
| 24818 |
/***/ 679:
|
| 24819 |
/***/ (function(module, exports, __webpack_require__) {
|
| 24820 |
|
| 24821 |
+
"use strict";
|
| 24822 |
+
|
| 24823 |
+
|
| 24824 |
+
var _reactDom = __webpack_require__(28);
|
| 24825 |
+
|
| 24826 |
+
var _reactDom2 = _interopRequireDefault(_reactDom);
|
| 24827 |
+
|
| 24828 |
+
var _react = __webpack_require__(2);
|
| 24829 |
+
|
| 24830 |
+
var _react2 = _interopRequireDefault(_react);
|
| 24831 |
+
|
| 24832 |
+
var _new_subscriber_announcement = __webpack_require__(680);
|
| 24833 |
+
|
| 24834 |
+
var _new_subscriber_announcement2 = _interopRequireDefault(_new_subscriber_announcement);
|
| 24835 |
+
|
| 24836 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
| 24837 |
+
|
| 24838 |
+
var container = document.getElementById('new_subscriber_announcement');
|
| 24839 |
+
|
| 24840 |
+
_reactDom2.default.render(_react2.default.createElement(_new_subscriber_announcement2.default, {
|
| 24841 |
+
installedAt: window.mailpoet_installed_at,
|
| 24842 |
+
imageUrl: window.mailpoet_new_subscriber_announcement_image
|
| 24843 |
+
}), container);
|
| 24844 |
+
|
| 24845 |
+
/***/ }),
|
| 24846 |
+
|
| 24847 |
+
/***/ 680:
|
| 24848 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 24849 |
+
|
| 24850 |
+
"use strict";
|
| 24851 |
+
|
| 24852 |
+
|
| 24853 |
+
var _react = __webpack_require__(2);
|
| 24854 |
+
|
| 24855 |
+
var _react2 = _interopRequireDefault(_react);
|
| 24856 |
+
|
| 24857 |
+
var _propTypes = __webpack_require__(12);
|
| 24858 |
+
|
| 24859 |
+
var _propTypes2 = _interopRequireDefault(_propTypes);
|
| 24860 |
+
|
| 24861 |
+
var _mailpoet = __webpack_require__(3);
|
| 24862 |
+
|
| 24863 |
+
var _mailpoet2 = _interopRequireDefault(_mailpoet);
|
| 24864 |
+
|
| 24865 |
+
var _moment = __webpack_require__(0);
|
| 24866 |
+
|
| 24867 |
+
var _moment2 = _interopRequireDefault(_moment);
|
| 24868 |
+
|
| 24869 |
+
var _in_app_announcement = __webpack_require__(467);
|
| 24870 |
+
|
| 24871 |
+
var _in_app_announcement2 = _interopRequireDefault(_in_app_announcement);
|
| 24872 |
+
|
| 24873 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
| 24874 |
+
|
| 24875 |
+
var NewSubscriberNotificationAnnouncement = function NewSubscriberNotificationAnnouncement(props) {
|
| 24876 |
+
return _react2.default.createElement(
|
| 24877 |
+
_in_app_announcement2.default,
|
| 24878 |
+
{
|
| 24879 |
+
validUntil: (0, _moment2.default)(props.installedAt).add(3, 'months').toDate(),
|
| 24880 |
+
height: '700px',
|
| 24881 |
+
showOnlyOnceSlug: 'new_subscriber_notification',
|
| 24882 |
+
showToNewUser: false
|
| 24883 |
+
},
|
| 24884 |
+
_react2.default.createElement(
|
| 24885 |
+
'div',
|
| 24886 |
+
{ className: 'new_subscriber_notification_announcement' },
|
| 24887 |
+
_react2.default.createElement(
|
| 24888 |
+
'h1',
|
| 24889 |
+
null,
|
| 24890 |
+
_mailpoet2.default.I18n.t('announcementHeader')
|
| 24891 |
+
),
|
| 24892 |
+
_react2.default.createElement('img', { src: props.imageUrl, width: '600px', height: '460px', alt: '' }),
|
| 24893 |
+
_react2.default.createElement(
|
| 24894 |
+
'p',
|
| 24895 |
+
null,
|
| 24896 |
+
_mailpoet2.default.I18n.t('announcementParagraph1'),
|
| 24897 |
+
_react2.default.createElement('br', null),
|
| 24898 |
+
_mailpoet2.default.I18n.t('announcementParagraph2')
|
| 24899 |
+
)
|
| 24900 |
+
)
|
| 24901 |
+
);
|
| 24902 |
+
};
|
| 24903 |
+
|
| 24904 |
+
NewSubscriberNotificationAnnouncement.propTypes = {
|
| 24905 |
+
installedAt: _propTypes2.default.string.isRequired,
|
| 24906 |
+
imageUrl: _propTypes2.default.string.isRequired
|
| 24907 |
+
};
|
| 24908 |
+
|
| 24909 |
+
module.exports = NewSubscriberNotificationAnnouncement;
|
| 24910 |
+
|
| 24911 |
+
/***/ }),
|
| 24912 |
+
|
| 24913 |
+
/***/ 681:
|
| 24914 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 24915 |
+
|
| 24916 |
"use strict";
|
| 24917 |
/* WEBPACK VAR INJECTION */(function(setImmediate) {
|
| 24918 |
|
assets/js/{admin_vendor.eaab3da3.js → admin_vendor.f5731029.js}
RENAMED
|
@@ -5403,7 +5403,7 @@ module.exports = emptyFunction;
|
|
| 5403 |
|
| 5404 |
|
| 5405 |
|
| 5406 |
-
var _prodInvariant = __webpack_require__(
|
| 5407 |
|
| 5408 |
var ReactCurrentOwner = __webpack_require__(20);
|
| 5409 |
|
|
@@ -6341,7 +6341,7 @@ function getPooledWarningPropertyDefinition(propName, getVal) {
|
|
| 6341 |
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
| 6342 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Router__ = __webpack_require__(563);
|
| 6343 |
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Router", function() { return __WEBPACK_IMPORTED_MODULE_0__Router__["a"]; });
|
| 6344 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Link__ = __webpack_require__(
|
| 6345 |
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Link", function() { return __WEBPACK_IMPORTED_MODULE_1__Link__["a"]; });
|
| 6346 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__IndexLink__ = __webpack_require__(570);
|
| 6347 |
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "IndexLink", function() { return __WEBPACK_IMPORTED_MODULE_2__IndexLink__["a"]; });
|
|
@@ -6351,7 +6351,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
|
| 6351 |
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "IndexRedirect", function() { return __WEBPACK_IMPORTED_MODULE_4__IndexRedirect__["a"]; });
|
| 6352 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__IndexRoute__ = __webpack_require__(573);
|
| 6353 |
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "IndexRoute", function() { return __WEBPACK_IMPORTED_MODULE_5__IndexRoute__["a"]; });
|
| 6354 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Redirect__ = __webpack_require__(
|
| 6355 |
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Redirect", function() { return __WEBPACK_IMPORTED_MODULE_6__Redirect__["a"]; });
|
| 6356 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Route__ = __webpack_require__(574);
|
| 6357 |
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Route", function() { return __WEBPACK_IMPORTED_MODULE_7__Route__["a"]; });
|
|
@@ -6364,7 +6364,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
|
| 6364 |
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "routerShape", function() { return __WEBPACK_IMPORTED_MODULE_10__PropTypes__["b"]; });
|
| 6365 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__match__ = __webpack_require__(575);
|
| 6366 |
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "match", function() { return __WEBPACK_IMPORTED_MODULE_11__match__["a"]; });
|
| 6367 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__useRouterHistory__ = __webpack_require__(
|
| 6368 |
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "useRouterHistory", function() { return __WEBPACK_IMPORTED_MODULE_12__useRouterHistory__["a"]; });
|
| 6369 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__PatternUtils__ = __webpack_require__(100);
|
| 6370 |
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "formatPattern", function() { return __WEBPACK_IMPORTED_MODULE_13__PatternUtils__["a"]; });
|
|
@@ -6374,7 +6374,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
|
| 6374 |
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "browserHistory", function() { return __WEBPACK_IMPORTED_MODULE_15__browserHistory__["a"]; });
|
| 6375 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__hashHistory__ = __webpack_require__(578);
|
| 6376 |
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "hashHistory", function() { return __WEBPACK_IMPORTED_MODULE_16__hashHistory__["a"]; });
|
| 6377 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__createMemoryHistory__ = __webpack_require__(
|
| 6378 |
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "createMemoryHistory", function() { return __WEBPACK_IMPORTED_MODULE_17__createMemoryHistory__["a"]; });
|
| 6379 |
/* components */
|
| 6380 |
|
|
@@ -6677,6 +6677,14 @@ module.exports = DOMProperty;
|
|
| 6677 |
/* 28 */
|
| 6678 |
/***/ (function(module, exports, __webpack_require__) {
|
| 6679 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6680 |
"use strict";
|
| 6681 |
/**
|
| 6682 |
* Copyright (c) 2013-present, Facebook, Inc.
|
|
@@ -6718,7 +6726,7 @@ function reactProdInvariant(code) {
|
|
| 6718 |
module.exports = reactProdInvariant;
|
| 6719 |
|
| 6720 |
/***/ }),
|
| 6721 |
-
/*
|
| 6722 |
/***/ (function(module, exports, __webpack_require__) {
|
| 6723 |
|
| 6724 |
"use strict";
|
|
@@ -7064,14 +7072,6 @@ ReactElement.isValidElement = function (object) {
|
|
| 7064 |
module.exports = ReactElement;
|
| 7065 |
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
| 7066 |
|
| 7067 |
-
/***/ }),
|
| 7068 |
-
/* 30 */
|
| 7069 |
-
/***/ (function(module, exports, __webpack_require__) {
|
| 7070 |
-
|
| 7071 |
-
/* WEBPACK VAR INJECTION */(function(global) {if(!global["MailPoetLib"]) global["MailPoetLib"] = {};
|
| 7072 |
-
module.exports = global["MailPoetLib"]["ReactDOM"] = __webpack_require__(317);
|
| 7073 |
-
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
|
| 7074 |
-
|
| 7075 |
/***/ }),
|
| 7076 |
/* 31 */
|
| 7077 |
/***/ (function(module, exports, __webpack_require__) {
|
|
@@ -7216,7 +7216,7 @@ var ReactComponent = __webpack_require__(66);
|
|
| 7216 |
var ReactPureComponent = __webpack_require__(306);
|
| 7217 |
var ReactClass = __webpack_require__(307);
|
| 7218 |
var ReactDOMFactories = __webpack_require__(308);
|
| 7219 |
-
var ReactElement = __webpack_require__(
|
| 7220 |
var ReactPropTypes = __webpack_require__(310);
|
| 7221 |
var ReactVersion = __webpack_require__(311);
|
| 7222 |
|
|
@@ -9771,7 +9771,7 @@ module.exports = getIteratorFn;
|
|
| 9771 |
|
| 9772 |
|
| 9773 |
|
| 9774 |
-
var _prodInvariant = __webpack_require__(
|
| 9775 |
|
| 9776 |
var ReactNoopUpdateQueue = __webpack_require__(67);
|
| 9777 |
|
|
@@ -26237,7 +26237,7 @@ module.exports = REACT_ELEMENT_TYPE;
|
|
| 26237 |
|
| 26238 |
var ReactCurrentOwner = __webpack_require__(20);
|
| 26239 |
var ReactComponentTreeHook = __webpack_require__(16);
|
| 26240 |
-
var ReactElement = __webpack_require__(
|
| 26241 |
|
| 26242 |
var checkReactTypeSpec = __webpack_require__(309);
|
| 26243 |
|
|
@@ -35874,7 +35874,7 @@ module.exports = __webpack_require__(34);
|
|
| 35874 |
|
| 35875 |
|
| 35876 |
var PooledClass = __webpack_require__(303);
|
| 35877 |
-
var ReactElement = __webpack_require__(
|
| 35878 |
|
| 35879 |
var emptyFunction = __webpack_require__(15);
|
| 35880 |
var traverseAllChildren = __webpack_require__(304);
|
|
@@ -36070,7 +36070,7 @@ module.exports = ReactChildren;
|
|
| 36070 |
|
| 36071 |
|
| 36072 |
|
| 36073 |
-
var _prodInvariant = __webpack_require__(
|
| 36074 |
|
| 36075 |
var invariant = __webpack_require__(4);
|
| 36076 |
|
|
@@ -36187,7 +36187,7 @@ module.exports = PooledClass;
|
|
| 36187 |
|
| 36188 |
|
| 36189 |
|
| 36190 |
-
var _prodInvariant = __webpack_require__(
|
| 36191 |
|
| 36192 |
var ReactCurrentOwner = __webpack_require__(20);
|
| 36193 |
var REACT_ELEMENT_TYPE = __webpack_require__(229);
|
|
@@ -36480,11 +36480,11 @@ module.exports = ReactPureComponent;
|
|
| 36480 |
|
| 36481 |
|
| 36482 |
|
| 36483 |
-
var _prodInvariant = __webpack_require__(
|
| 36484 |
_assign = __webpack_require__(10);
|
| 36485 |
|
| 36486 |
var ReactComponent = __webpack_require__(66);
|
| 36487 |
-
var ReactElement = __webpack_require__(
|
| 36488 |
var ReactPropTypeLocationNames = __webpack_require__(68);
|
| 36489 |
var ReactNoopUpdateQueue = __webpack_require__(67);
|
| 36490 |
|
|
@@ -37203,7 +37203,7 @@ module.exports = ReactClass;
|
|
| 37203 |
|
| 37204 |
|
| 37205 |
|
| 37206 |
-
var ReactElement = __webpack_require__(
|
| 37207 |
|
| 37208 |
/**
|
| 37209 |
* Create a factory that creates HTML tag elements.
|
|
@@ -37379,7 +37379,7 @@ module.exports = ReactDOMFactories;
|
|
| 37379 |
|
| 37380 |
|
| 37381 |
|
| 37382 |
-
var _prodInvariant = __webpack_require__(
|
| 37383 |
|
| 37384 |
var ReactPropTypeLocationNames = __webpack_require__(68);
|
| 37385 |
var ReactPropTypesSecret = __webpack_require__(231);
|
|
@@ -37472,7 +37472,7 @@ module.exports = checkReactTypeSpec;
|
|
| 37472 |
|
| 37473 |
|
| 37474 |
|
| 37475 |
-
var ReactElement = __webpack_require__(
|
| 37476 |
var ReactPropTypeLocationNames = __webpack_require__(68);
|
| 37477 |
var ReactPropTypesSecret = __webpack_require__(231);
|
| 37478 |
|
|
@@ -37930,9 +37930,9 @@ module.exports = '15.4.2';
|
|
| 37930 |
*/
|
| 37931 |
|
| 37932 |
|
| 37933 |
-
var _prodInvariant = __webpack_require__(
|
| 37934 |
|
| 37935 |
-
var ReactElement = __webpack_require__(
|
| 37936 |
|
| 37937 |
var invariant = __webpack_require__(4);
|
| 37938 |
|
|
@@ -37988,7 +37988,7 @@ var _propTypes = __webpack_require__(12);
|
|
| 37988 |
|
| 37989 |
var _propTypes2 = _interopRequireDefault(_propTypes);
|
| 37990 |
|
| 37991 |
-
var _reactDom = __webpack_require__(
|
| 37992 |
|
| 37993 |
var _reactDom2 = _interopRequireDefault(_reactDom);
|
| 37994 |
|
|
@@ -50707,7 +50707,7 @@ var _LocationUtils = __webpack_require__(98);
|
|
| 50707 |
|
| 50708 |
var _DOMUtils = __webpack_require__(288);
|
| 50709 |
|
| 50710 |
-
var _DOMStateStorage = __webpack_require__(
|
| 50711 |
|
| 50712 |
var _PathUtils = __webpack_require__(61);
|
| 50713 |
|
|
@@ -51272,6 +51272,159 @@ module.exports = FormFieldSelect;
|
|
| 51272 |
"use strict";
|
| 51273 |
|
| 51274 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51275 |
var _underscore = __webpack_require__(7);
|
| 51276 |
|
| 51277 |
var _underscore2 = _interopRequireDefault(_underscore);
|
|
@@ -51288,11 +51441,11 @@ var _select = __webpack_require__(466);
|
|
| 51288 |
|
| 51289 |
var _select2 = _interopRequireDefault(_select);
|
| 51290 |
|
| 51291 |
-
var _text = __webpack_require__(
|
| 51292 |
|
| 51293 |
var _text2 = _interopRequireDefault(_text);
|
| 51294 |
|
| 51295 |
-
var _common = __webpack_require__(
|
| 51296 |
|
| 51297 |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
| 51298 |
|
|
@@ -51445,7 +51598,7 @@ var WelcomeScheduling = _react2.default.createClass({
|
|
| 51445 |
module.exports = WelcomeScheduling;
|
| 51446 |
|
| 51447 |
/***/ }),
|
| 51448 |
-
/*
|
| 51449 |
/***/ (function(module, exports, __webpack_require__) {
|
| 51450 |
|
| 51451 |
"use strict";
|
|
@@ -51456,7 +51609,7 @@ module.exports = global["MailPoetLib"]["NewsletterSchedulingCommonOptions"] = __
|
|
| 51456 |
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
|
| 51457 |
|
| 51458 |
/***/ }),
|
| 51459 |
-
/*
|
| 51460 |
/***/ (function(module, exports, __webpack_require__) {
|
| 51461 |
|
| 51462 |
"use strict";
|
|
@@ -51507,7 +51660,7 @@ module.exports = exports['default'];
|
|
| 51507 |
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
| 51508 |
|
| 51509 |
/***/ }),
|
| 51510 |
-
/*
|
| 51511 |
/***/ (function(module, exports, __webpack_require__) {
|
| 51512 |
|
| 51513 |
"use strict";
|
|
@@ -51538,12 +51691,12 @@ module.exports = exports['default'];
|
|
| 51538 |
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
| 51539 |
|
| 51540 |
/***/ }),
|
| 51541 |
-
/* 471 */,
|
| 51542 |
/* 472 */,
|
| 51543 |
/* 473 */,
|
| 51544 |
/* 474 */,
|
| 51545 |
/* 475 */,
|
| 51546 |
-
/* 476
|
|
|
|
| 51547 |
/***/ (function(module, exports, __webpack_require__) {
|
| 51548 |
|
| 51549 |
"use strict";
|
|
@@ -51834,7 +51987,7 @@ module.exports = exports['default'];
|
|
| 51834 |
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
| 51835 |
|
| 51836 |
/***/ }),
|
| 51837 |
-
/*
|
| 51838 |
/***/ (function(module, exports, __webpack_require__) {
|
| 51839 |
|
| 51840 |
"use strict";
|
|
@@ -51847,7 +52000,7 @@ function isPromise(obj) {
|
|
| 51847 |
}
|
| 51848 |
|
| 51849 |
/***/ }),
|
| 51850 |
-
/*
|
| 51851 |
/***/ (function(module, exports, __webpack_require__) {
|
| 51852 |
|
| 51853 |
"use strict";
|
|
@@ -51881,7 +52034,7 @@ function assignRouterState(router, _ref) {
|
|
| 51881 |
}
|
| 51882 |
|
| 51883 |
/***/ }),
|
| 51884 |
-
/*
|
| 51885 |
/***/ (function(module, exports, __webpack_require__) {
|
| 51886 |
|
| 51887 |
"use strict";
|
|
@@ -52035,7 +52188,7 @@ module.exports = exports['default'];
|
|
| 52035 |
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
| 52036 |
|
| 52037 |
/***/ }),
|
| 52038 |
-
/*
|
| 52039 |
/***/ (function(module, exports, __webpack_require__) {
|
| 52040 |
|
| 52041 |
"use strict";
|
|
@@ -52092,7 +52245,7 @@ module.exports = function hoistNonReactStatics(targetComponent, sourceComponent,
|
|
| 52092 |
|
| 52093 |
|
| 52094 |
/***/ }),
|
| 52095 |
-
/*
|
| 52096 |
/***/ (function(module, exports, __webpack_require__) {
|
| 52097 |
|
| 52098 |
"use strict";
|
|
@@ -52198,7 +52351,7 @@ module.exports = exports['default'];
|
|
| 52198 |
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
| 52199 |
|
| 52200 |
/***/ }),
|
| 52201 |
-
/*
|
| 52202 |
/***/ (function(module, exports, __webpack_require__) {
|
| 52203 |
|
| 52204 |
"use strict";
|
|
@@ -52215,7 +52368,7 @@ var _useBasename = __webpack_require__(287);
|
|
| 52215 |
|
| 52216 |
var _useBasename2 = _interopRequireDefault(_useBasename);
|
| 52217 |
|
| 52218 |
-
var _createMemoryHistory = __webpack_require__(
|
| 52219 |
|
| 52220 |
var _createMemoryHistory2 = _interopRequireDefault(_createMemoryHistory);
|
| 52221 |
|
|
@@ -52235,7 +52388,7 @@ function createMemoryHistory(options) {
|
|
| 52235 |
module.exports = exports['default'];
|
| 52236 |
|
| 52237 |
/***/ }),
|
| 52238 |
-
/*
|
| 52239 |
/***/ (function(module, exports, __webpack_require__) {
|
| 52240 |
|
| 52241 |
"use strict";
|
|
@@ -52382,7 +52535,7 @@ exports.default = createMemoryHistory;
|
|
| 52382 |
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
| 52383 |
|
| 52384 |
/***/ }),
|
| 52385 |
-
/*
|
| 52386 |
/***/ (function(module, exports, __webpack_require__) {
|
| 52387 |
|
| 52388 |
"use strict";
|
|
@@ -52410,7 +52563,7 @@ function useRouterHistory(createHistory) {
|
|
| 52410 |
module.exports = exports['default'];
|
| 52411 |
|
| 52412 |
/***/ }),
|
| 52413 |
-
/*
|
| 52414 |
/***/ (function(module, exports, __webpack_require__) {
|
| 52415 |
|
| 52416 |
"use strict";
|
|
@@ -52510,7 +52663,7 @@ exports.default = createBrowserHistory;
|
|
| 52510 |
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
| 52511 |
|
| 52512 |
/***/ }),
|
| 52513 |
-
/*
|
| 52514 |
/***/ (function(module, exports, __webpack_require__) {
|
| 52515 |
|
| 52516 |
"use strict";
|
|
@@ -52602,7 +52755,7 @@ var readState = exports.readState = function readState(key) {
|
|
| 52602 |
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
| 52603 |
|
| 52604 |
/***/ }),
|
| 52605 |
-
/*
|
| 52606 |
/***/ (function(module, exports, __webpack_require__) {
|
| 52607 |
|
| 52608 |
"use strict";
|
|
@@ -52611,7 +52764,7 @@ var readState = exports.readState = function readState(key) {
|
|
| 52611 |
exports.__esModule = true;
|
| 52612 |
exports.default = createRouterHistory;
|
| 52613 |
|
| 52614 |
-
var _useRouterHistory = __webpack_require__(
|
| 52615 |
|
| 52616 |
var _useRouterHistory2 = _interopRequireDefault(_useRouterHistory);
|
| 52617 |
|
|
@@ -52627,7 +52780,7 @@ function createRouterHistory(createHistory) {
|
|
| 52627 |
module.exports = exports['default'];
|
| 52628 |
|
| 52629 |
/***/ }),
|
| 52630 |
-
/*
|
| 52631 |
/***/ (function(module, exports, __webpack_require__) {
|
| 52632 |
|
| 52633 |
"use strict";
|
|
@@ -52781,7 +52934,7 @@ exports.default = createHashHistory;
|
|
| 52781 |
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
| 52782 |
|
| 52783 |
/***/ }),
|
| 52784 |
-
/*
|
| 52785 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
| 52786 |
|
| 52787 |
"use strict";
|
|
@@ -53053,7 +53206,7 @@ function createTransitionManager(history, routes) {
|
|
| 53053 |
/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(1)))
|
| 53054 |
|
| 53055 |
/***/ }),
|
| 53056 |
-
/*
|
| 53057 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
| 53058 |
|
| 53059 |
"use strict";
|
|
@@ -53063,7 +53216,7 @@ function isPromise(obj) {
|
|
| 53063 |
}
|
| 53064 |
|
| 53065 |
/***/ }),
|
| 53066 |
-
/*
|
| 53067 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
| 53068 |
|
| 53069 |
"use strict";
|
|
@@ -53093,7 +53246,7 @@ function assignRouterState(router, _ref) {
|
|
| 53093 |
}
|
| 53094 |
|
| 53095 |
/***/ }),
|
| 53096 |
-
/*
|
| 53097 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
| 53098 |
|
| 53099 |
"use strict";
|
|
@@ -53239,7 +53392,7 @@ var Link = __WEBPACK_IMPORTED_MODULE_1_create_react_class___default()({
|
|
| 53239 |
/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(1)))
|
| 53240 |
|
| 53241 |
/***/ }),
|
| 53242 |
-
/*
|
| 53243 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
| 53244 |
|
| 53245 |
"use strict";
|
|
@@ -53338,7 +53491,7 @@ var Redirect = __WEBPACK_IMPORTED_MODULE_0_create_react_class___default()({
|
|
| 53338 |
/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(1)))
|
| 53339 |
|
| 53340 |
/***/ }),
|
| 53341 |
-
/*
|
| 53342 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
| 53343 |
|
| 53344 |
"use strict";
|
|
@@ -53347,7 +53500,7 @@ var Redirect = __WEBPACK_IMPORTED_MODULE_0_create_react_class___default()({
|
|
| 53347 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__);
|
| 53348 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__ = __webpack_require__(287);
|
| 53349 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__);
|
| 53350 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory__ = __webpack_require__(
|
| 53351 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory__);
|
| 53352 |
|
| 53353 |
|
|
@@ -53366,7 +53519,7 @@ function createMemoryHistory(options) {
|
|
| 53366 |
}
|
| 53367 |
|
| 53368 |
/***/ }),
|
| 53369 |
-
/*
|
| 53370 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
| 53371 |
|
| 53372 |
"use strict";
|
|
@@ -53386,12 +53539,12 @@ function useRouterHistory(createHistory) {
|
|
| 53386 |
}
|
| 53387 |
|
| 53388 |
/***/ }),
|
| 53389 |
-
/*
|
| 53390 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
| 53391 |
|
| 53392 |
"use strict";
|
| 53393 |
/* harmony export (immutable) */ __webpack_exports__["a"] = createRouterHistory;
|
| 53394 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__useRouterHistory__ = __webpack_require__(
|
| 53395 |
|
| 53396 |
|
| 53397 |
var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
|
|
@@ -53403,7 +53556,7 @@ function createRouterHistory(createHistory) {
|
|
| 53403 |
}
|
| 53404 |
|
| 53405 |
/***/ }),
|
| 53406 |
-
/*
|
| 53407 |
/***/ (function(module, exports, __webpack_require__) {
|
| 53408 |
|
| 53409 |
"use strict";
|
|
@@ -53414,7 +53567,7 @@ module.exports = global["MailPoetLib"]["FormFieldText"] = __webpack_require__(58
|
|
| 53414 |
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
|
| 53415 |
|
| 53416 |
/***/ }),
|
| 53417 |
-
/*
|
| 53418 |
/***/ (function(module, exports, __webpack_require__) {
|
| 53419 |
|
| 53420 |
"use strict";
|
|
@@ -53425,7 +53578,7 @@ module.exports = global["MailPoetLib"]["FormFieldSelection"] = __webpack_require
|
|
| 53425 |
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
|
| 53426 |
|
| 53427 |
/***/ }),
|
| 53428 |
-
/*
|
| 53429 |
/***/ (function(module, exports, __webpack_require__) {
|
| 53430 |
|
| 53431 |
/**
|
|
@@ -55955,7 +56108,7 @@ module.exports = global["MailPoetLib"]["FormFieldSelection"] = __webpack_require
|
|
| 55955 |
|
| 55956 |
|
| 55957 |
/***/ }),
|
| 55958 |
-
/*
|
| 55959 |
/***/ (function(module, exports, __webpack_require__) {
|
| 55960 |
|
| 55961 |
"use strict";
|
|
@@ -55965,159 +56118,6 @@ if (!global["MailPoetLib"]) global["MailPoetLib"] = {};
|
|
| 55965 |
module.exports = global["MailPoetLib"]["StatsBadge"] = __webpack_require__(593);
|
| 55966 |
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
|
| 55967 |
|
| 55968 |
-
/***/ }),
|
| 55969 |
-
/* 501 */
|
| 55970 |
-
/***/ (function(module, exports, __webpack_require__) {
|
| 55971 |
-
|
| 55972 |
-
"use strict";
|
| 55973 |
-
|
| 55974 |
-
|
| 55975 |
-
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
| 55976 |
-
|
| 55977 |
-
var _react = __webpack_require__(2);
|
| 55978 |
-
|
| 55979 |
-
var _react2 = _interopRequireDefault(_react);
|
| 55980 |
-
|
| 55981 |
-
var _mailpoet = __webpack_require__(3);
|
| 55982 |
-
|
| 55983 |
-
var _mailpoet2 = _interopRequireDefault(_mailpoet);
|
| 55984 |
-
|
| 55985 |
-
var _in_app_announcement_dot = __webpack_require__(599);
|
| 55986 |
-
|
| 55987 |
-
var _in_app_announcement_dot2 = _interopRequireDefault(_in_app_announcement_dot);
|
| 55988 |
-
|
| 55989 |
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
| 55990 |
-
|
| 55991 |
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
| 55992 |
-
|
| 55993 |
-
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
| 55994 |
-
|
| 55995 |
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
| 55996 |
-
|
| 55997 |
-
var InAppAnnouncement = function (_React$Component) {
|
| 55998 |
-
_inherits(InAppAnnouncement, _React$Component);
|
| 55999 |
-
|
| 56000 |
-
function InAppAnnouncement(props) {
|
| 56001 |
-
_classCallCheck(this, InAppAnnouncement);
|
| 56002 |
-
|
| 56003 |
-
var _this = _possibleConstructorReturn(this, (InAppAnnouncement.__proto__ || Object.getPrototypeOf(InAppAnnouncement)).call(this, props));
|
| 56004 |
-
|
| 56005 |
-
_this.saveDisplayed = _this.saveDisplayed.bind(_this);
|
| 56006 |
-
|
| 56007 |
-
_this.state = {
|
| 56008 |
-
announcementsSettings: window.mailpoet_in_app_announcements || null
|
| 56009 |
-
};
|
| 56010 |
-
return _this;
|
| 56011 |
-
}
|
| 56012 |
-
|
| 56013 |
-
_createClass(InAppAnnouncement, [{
|
| 56014 |
-
key: 'saveDisplayed',
|
| 56015 |
-
value: function saveDisplayed() {
|
| 56016 |
-
var _this2 = this;
|
| 56017 |
-
|
| 56018 |
-
var settings = Object.assign({}, this.state.announcementsSettings);
|
| 56019 |
-
settings.displayed.push(this.props.showOnlyOnceSlug);
|
| 56020 |
-
return _mailpoet2.default.Ajax.post({
|
| 56021 |
-
api_version: window.mailpoet_api_version,
|
| 56022 |
-
endpoint: 'settings',
|
| 56023 |
-
action: 'set',
|
| 56024 |
-
data: { in_app_announcements: settings }
|
| 56025 |
-
}).always(function () {
|
| 56026 |
-
return _this2.setState({ announcementsSettings: settings });
|
| 56027 |
-
});
|
| 56028 |
-
}
|
| 56029 |
-
}, {
|
| 56030 |
-
key: 'render',
|
| 56031 |
-
value: function render() {
|
| 56032 |
-
var _this3 = this;
|
| 56033 |
-
|
| 56034 |
-
if (this.props.showToNewUser !== null && window.mailpoet_is_new_user !== this.props.showToNewUser) {
|
| 56035 |
-
return null;
|
| 56036 |
-
}
|
| 56037 |
-
|
| 56038 |
-
if (this.props.validUntil !== null && this.props.validUntil < new Date()) {
|
| 56039 |
-
return null;
|
| 56040 |
-
}
|
| 56041 |
-
|
| 56042 |
-
if (this.props.showToPremiumUser !== null && window.mailpoet_premium_active !== this.props.showToPremiumUser) {
|
| 56043 |
-
return null;
|
| 56044 |
-
}
|
| 56045 |
-
|
| 56046 |
-
if (this.props.showOnlyOnceSlug && this.state.announcementsSettings.displayed.includes(this.props.showOnlyOnceSlug)) {
|
| 56047 |
-
return null;
|
| 56048 |
-
}
|
| 56049 |
-
|
| 56050 |
-
return _react2.default.createElement(
|
| 56051 |
-
_in_app_announcement_dot2.default,
|
| 56052 |
-
{
|
| 56053 |
-
className: this.props.className,
|
| 56054 |
-
width: this.props.width,
|
| 56055 |
-
height: this.props.height,
|
| 56056 |
-
onUserTrigger: function onUserTrigger() {
|
| 56057 |
-
if (!_this3.props.showOnlyOnceSlug) {
|
| 56058 |
-
return;
|
| 56059 |
-
}
|
| 56060 |
-
_this3.saveDisplayed();
|
| 56061 |
-
}
|
| 56062 |
-
},
|
| 56063 |
-
this.props.children
|
| 56064 |
-
);
|
| 56065 |
-
}
|
| 56066 |
-
}]);
|
| 56067 |
-
|
| 56068 |
-
return InAppAnnouncement;
|
| 56069 |
-
}(_react2.default.Component);
|
| 56070 |
-
|
| 56071 |
-
var validateBooleanWithWindowDependency = function validateBooleanWithWindowDependency(props, propName, componentName, windowProperty) {
|
| 56072 |
-
var propValue = props[propName];
|
| 56073 |
-
if (propValue !== null && propValue !== true && propValue !== false) {
|
| 56074 |
-
return new Error('Invalid property in ' + componentName + '. newUser must be of type boolean');
|
| 56075 |
-
}
|
| 56076 |
-
if (propValue !== null && typeof window[windowProperty] === 'undefined') {
|
| 56077 |
-
return new Error('Missing data for evaluation of ' + componentName + ' display condition. ' + propName + ' requires window.' + windowProperty);
|
| 56078 |
-
}
|
| 56079 |
-
return null;
|
| 56080 |
-
};
|
| 56081 |
-
|
| 56082 |
-
InAppAnnouncement.propTypes = {
|
| 56083 |
-
width: _react2.default.PropTypes.string,
|
| 56084 |
-
height: _react2.default.PropTypes.string,
|
| 56085 |
-
className: _react2.default.PropTypes.string,
|
| 56086 |
-
children: _react2.default.PropTypes.element.isRequired,
|
| 56087 |
-
validUntil: _react2.default.PropTypes.instanceOf(Date),
|
| 56088 |
-
showToNewUser: function showToNewUser(props, propName, componentName) {
|
| 56089 |
-
return validateBooleanWithWindowDependency(props, propName, componentName, 'mailpoet_is_new_user');
|
| 56090 |
-
},
|
| 56091 |
-
showToPremiumUser: function showToPremiumUser(props, propName, componentName) {
|
| 56092 |
-
return validateBooleanWithWindowDependency(props, propName, componentName, 'mailpoet_premium_active');
|
| 56093 |
-
},
|
| 56094 |
-
showOnlyOnceSlug: function showOnlyOnceSlug(props, propName, componentName) {
|
| 56095 |
-
var propValue = props[propName];
|
| 56096 |
-
if (propValue !== null && typeof propValue !== 'string') {
|
| 56097 |
-
return new Error('Invalid property in ' + componentName + '. ' + propName + ' must be of type string');
|
| 56098 |
-
}
|
| 56099 |
-
if (propValue === null) {
|
| 56100 |
-
return null;
|
| 56101 |
-
}
|
| 56102 |
-
if (typeof window.mailpoet_in_app_announcements === 'undefined') {
|
| 56103 |
-
return new Error('Missing data for evaluation of ' + componentName + ' display condition. ' + propName + ' requires window.mailpoet_in_app_announcements');
|
| 56104 |
-
}
|
| 56105 |
-
return null;
|
| 56106 |
-
}
|
| 56107 |
-
};
|
| 56108 |
-
|
| 56109 |
-
InAppAnnouncement.defaultProps = {
|
| 56110 |
-
width: '900px',
|
| 56111 |
-
height: '600px',
|
| 56112 |
-
className: null,
|
| 56113 |
-
validUntil: null,
|
| 56114 |
-
showToNewUser: null,
|
| 56115 |
-
showToPremiumUser: null,
|
| 56116 |
-
showOnlyOnceSlug: null
|
| 56117 |
-
};
|
| 56118 |
-
|
| 56119 |
-
module.exports = InAppAnnouncement;
|
| 56120 |
-
|
| 56121 |
/***/ }),
|
| 56122 |
/* 502 */
|
| 56123 |
/***/ (function(module, exports, __webpack_require__) {
|
|
@@ -56287,7 +56287,7 @@ var _createLocation2 = __webpack_require__(507);
|
|
| 56287 |
|
| 56288 |
var _createLocation3 = _interopRequireDefault(_createLocation2);
|
| 56289 |
|
| 56290 |
-
var _runTransitionHook = __webpack_require__(
|
| 56291 |
|
| 56292 |
var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook);
|
| 56293 |
|
|
@@ -56551,7 +56551,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'd
|
|
| 56551 |
|
| 56552 |
var _Actions = __webpack_require__(101);
|
| 56553 |
|
| 56554 |
-
var _parsePath = __webpack_require__(
|
| 56555 |
|
| 56556 |
var _parsePath2 = _interopRequireDefault(_parsePath);
|
| 56557 |
|
|
@@ -56736,11 +56736,11 @@ var _qs = __webpack_require__(620);
|
|
| 56736 |
|
| 56737 |
var _qs2 = _interopRequireDefault(_qs);
|
| 56738 |
|
| 56739 |
-
var _runTransitionHook = __webpack_require__(
|
| 56740 |
|
| 56741 |
var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook);
|
| 56742 |
|
| 56743 |
-
var _parsePath = __webpack_require__(
|
| 56744 |
|
| 56745 |
var _parsePath2 = _interopRequireDefault(_parsePath);
|
| 56746 |
|
|
@@ -57059,20 +57059,20 @@ exports.isBuffer = function (obj) {
|
|
| 57059 |
/***/ (function(module, exports, __webpack_require__) {
|
| 57060 |
|
| 57061 |
__webpack_require__(2);
|
| 57062 |
-
__webpack_require__(
|
| 57063 |
__webpack_require__(533);
|
| 57064 |
__webpack_require__(93);
|
| 57065 |
__webpack_require__(62);
|
| 57066 |
__webpack_require__(289);
|
| 57067 |
-
__webpack_require__(499);
|
| 57068 |
__webpack_require__(500);
|
|
|
|
| 57069 |
__webpack_require__(58);
|
| 57070 |
__webpack_require__(274);
|
| 57071 |
__webpack_require__(275);
|
| 57072 |
__webpack_require__(276);
|
| 57073 |
__webpack_require__(502);
|
| 57074 |
__webpack_require__(503);
|
| 57075 |
-
__webpack_require__(
|
| 57076 |
__webpack_require__(608);
|
| 57077 |
__webpack_require__(94);
|
| 57078 |
module.exports = __webpack_require__(19);
|
|
@@ -57133,7 +57133,7 @@ var _Router2 = __webpack_require__(535);
|
|
| 57133 |
|
| 57134 |
var _Router3 = _interopRequireDefault(_Router2);
|
| 57135 |
|
| 57136 |
-
var _Link2 = __webpack_require__(
|
| 57137 |
|
| 57138 |
var _Link3 = _interopRequireDefault(_Link2);
|
| 57139 |
|
|
@@ -57153,7 +57153,7 @@ var _IndexRoute2 = __webpack_require__(546);
|
|
| 57153 |
|
| 57154 |
var _IndexRoute3 = _interopRequireDefault(_IndexRoute2);
|
| 57155 |
|
| 57156 |
-
var _Redirect2 = __webpack_require__(
|
| 57157 |
|
| 57158 |
var _Redirect3 = _interopRequireDefault(_Redirect2);
|
| 57159 |
|
|
@@ -57169,7 +57169,7 @@ var _match2 = __webpack_require__(548);
|
|
| 57169 |
|
| 57170 |
var _match3 = _interopRequireDefault(_match2);
|
| 57171 |
|
| 57172 |
-
var _useRouterHistory2 = __webpack_require__(
|
| 57173 |
|
| 57174 |
var _useRouterHistory3 = _interopRequireDefault(_useRouterHistory2);
|
| 57175 |
|
|
@@ -57185,7 +57185,7 @@ var _hashHistory2 = __webpack_require__(555);
|
|
| 57185 |
|
| 57186 |
var _hashHistory3 = _interopRequireDefault(_hashHistory2);
|
| 57187 |
|
| 57188 |
-
var _createMemoryHistory2 = __webpack_require__(
|
| 57189 |
|
| 57190 |
var _createMemoryHistory3 = _interopRequireDefault(_createMemoryHistory2);
|
| 57191 |
|
|
@@ -57242,7 +57242,7 @@ var _createReactClass2 = _interopRequireDefault(_createReactClass);
|
|
| 57242 |
|
| 57243 |
var _propTypes = __webpack_require__(12);
|
| 57244 |
|
| 57245 |
-
var _createTransitionManager2 = __webpack_require__(
|
| 57246 |
|
| 57247 |
var _createTransitionManager3 = _interopRequireDefault(_createTransitionManager2);
|
| 57248 |
|
|
@@ -57254,7 +57254,7 @@ var _RouterContext2 = _interopRequireDefault(_RouterContext);
|
|
| 57254 |
|
| 57255 |
var _RouteUtils = __webpack_require__(60);
|
| 57256 |
|
| 57257 |
-
var _RouterUtils = __webpack_require__(
|
| 57258 |
|
| 57259 |
var _routerWarning = __webpack_require__(97);
|
| 57260 |
|
|
@@ -58697,7 +58697,7 @@ exports.__esModule = true;
|
|
| 58697 |
|
| 58698 |
var _AsyncUtils = __webpack_require__(455);
|
| 58699 |
|
| 58700 |
-
var _PromiseUtils = __webpack_require__(
|
| 58701 |
|
| 58702 |
function getComponentsForRoute(nextState, route, callback) {
|
| 58703 |
if (route.component || route.components) {
|
|
@@ -58747,7 +58747,7 @@ exports.default = matchRoutes;
|
|
| 58747 |
|
| 58748 |
var _AsyncUtils = __webpack_require__(455);
|
| 58749 |
|
| 58750 |
-
var _PromiseUtils = __webpack_require__(
|
| 58751 |
|
| 58752 |
var _PatternUtils = __webpack_require__(96);
|
| 58753 |
|
|
@@ -59045,7 +59045,7 @@ var _createReactClass = __webpack_require__(26);
|
|
| 59045 |
|
| 59046 |
var _createReactClass2 = _interopRequireDefault(_createReactClass);
|
| 59047 |
|
| 59048 |
-
var _Link = __webpack_require__(
|
| 59049 |
|
| 59050 |
var _Link2 = _interopRequireDefault(_Link);
|
| 59051 |
|
|
@@ -59090,7 +59090,7 @@ var _createReactClass = __webpack_require__(26);
|
|
| 59090 |
|
| 59091 |
var _createReactClass2 = _interopRequireDefault(_createReactClass);
|
| 59092 |
|
| 59093 |
-
var _hoistNonReactStatics = __webpack_require__(
|
| 59094 |
|
| 59095 |
var _hoistNonReactStatics2 = _interopRequireDefault(_hoistNonReactStatics);
|
| 59096 |
|
|
@@ -59175,7 +59175,7 @@ var _invariant = __webpack_require__(14);
|
|
| 59175 |
|
| 59176 |
var _invariant2 = _interopRequireDefault(_invariant);
|
| 59177 |
|
| 59178 |
-
var _Redirect = __webpack_require__(
|
| 59179 |
|
| 59180 |
var _Redirect2 = _interopRequireDefault(_Redirect);
|
| 59181 |
|
|
@@ -59363,17 +59363,17 @@ var _invariant = __webpack_require__(14);
|
|
| 59363 |
|
| 59364 |
var _invariant2 = _interopRequireDefault(_invariant);
|
| 59365 |
|
| 59366 |
-
var _createMemoryHistory = __webpack_require__(
|
| 59367 |
|
| 59368 |
var _createMemoryHistory2 = _interopRequireDefault(_createMemoryHistory);
|
| 59369 |
|
| 59370 |
-
var _createTransitionManager = __webpack_require__(
|
| 59371 |
|
| 59372 |
var _createTransitionManager2 = _interopRequireDefault(_createTransitionManager);
|
| 59373 |
|
| 59374 |
var _RouteUtils = __webpack_require__(60);
|
| 59375 |
|
| 59376 |
-
var _RouterUtils = __webpack_require__(
|
| 59377 |
|
| 59378 |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
| 59379 |
|
|
@@ -59785,11 +59785,11 @@ module.exports = exports['default'];
|
|
| 59785 |
|
| 59786 |
exports.__esModule = true;
|
| 59787 |
|
| 59788 |
-
var _createBrowserHistory = __webpack_require__(
|
| 59789 |
|
| 59790 |
var _createBrowserHistory2 = _interopRequireDefault(_createBrowserHistory);
|
| 59791 |
|
| 59792 |
-
var _createRouterHistory = __webpack_require__(
|
| 59793 |
|
| 59794 |
var _createRouterHistory2 = _interopRequireDefault(_createRouterHistory);
|
| 59795 |
|
|
@@ -59850,11 +59850,11 @@ var replaceLocation = exports.replaceLocation = function replaceLocation(locatio
|
|
| 59850 |
|
| 59851 |
exports.__esModule = true;
|
| 59852 |
|
| 59853 |
-
var _createHashHistory = __webpack_require__(
|
| 59854 |
|
| 59855 |
var _createHashHistory2 = _interopRequireDefault(_createHashHistory);
|
| 59856 |
|
| 59857 |
-
var _createRouterHistory = __webpack_require__(
|
| 59858 |
|
| 59859 |
var _createRouterHistory2 = _interopRequireDefault(_createRouterHistory);
|
| 59860 |
|
|
@@ -59896,7 +59896,7 @@ var _LocationUtils = __webpack_require__(98);
|
|
| 59896 |
|
| 59897 |
var _DOMUtils = __webpack_require__(288);
|
| 59898 |
|
| 59899 |
-
var _DOMStateStorage = __webpack_require__(
|
| 59900 |
|
| 59901 |
var _PathUtils = __webpack_require__(61);
|
| 59902 |
|
|
@@ -61851,11 +61851,11 @@ module.exports = Listing;
|
|
| 61851 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_create_react_class__);
|
| 61852 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(12);
|
| 61853 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__);
|
| 61854 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__createTransitionManager__ = __webpack_require__(
|
| 61855 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__ = __webpack_require__(273);
|
| 61856 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__RouterContext__ = __webpack_require__(463);
|
| 61857 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__RouteUtils__ = __webpack_require__(63);
|
| 61858 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__RouterUtils__ = __webpack_require__(
|
| 61859 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__routerWarning__ = __webpack_require__(99);
|
| 61860 |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
| 61861 |
|
|
@@ -62409,7 +62409,7 @@ function isActive(_ref, indexOnly, currentLocation, routes, params) {
|
|
| 62409 |
|
| 62410 |
"use strict";
|
| 62411 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__ = __webpack_require__(462);
|
| 62412 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__PromiseUtils__ = __webpack_require__(
|
| 62413 |
|
| 62414 |
|
| 62415 |
|
|
@@ -62452,7 +62452,7 @@ function getComponents(nextState, callback) {
|
|
| 62452 |
"use strict";
|
| 62453 |
/* WEBPACK VAR INJECTION */(function(process) {/* harmony export (immutable) */ __webpack_exports__["a"] = matchRoutes;
|
| 62454 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__ = __webpack_require__(462);
|
| 62455 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__PromiseUtils__ = __webpack_require__(
|
| 62456 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__PatternUtils__ = __webpack_require__(100);
|
| 62457 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__routerWarning__ = __webpack_require__(99);
|
| 62458 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouteUtils__ = __webpack_require__(63);
|
|
@@ -62735,7 +62735,7 @@ function getRouteParams(route, params) {
|
|
| 62735 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
|
| 62736 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_create_react_class__ = __webpack_require__(26);
|
| 62737 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_create_react_class___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_create_react_class__);
|
| 62738 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Link__ = __webpack_require__(
|
| 62739 |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
| 62740 |
|
| 62741 |
|
|
@@ -62767,7 +62767,7 @@ var IndexLink = __WEBPACK_IMPORTED_MODULE_1_create_react_class___default()({
|
|
| 62767 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);
|
| 62768 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class__ = __webpack_require__(26);
|
| 62769 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_create_react_class__);
|
| 62770 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics__ = __webpack_require__(
|
| 62771 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics__);
|
| 62772 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ContextUtils__ = __webpack_require__(464);
|
| 62773 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__PropTypes__ = __webpack_require__(465);
|
|
@@ -62843,7 +62843,7 @@ function withRouter(WrappedComponent, options) {
|
|
| 62843 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__routerWarning__ = __webpack_require__(99);
|
| 62844 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant__ = __webpack_require__(14);
|
| 62845 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_invariant__);
|
| 62846 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Redirect__ = __webpack_require__(
|
| 62847 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__ = __webpack_require__(273);
|
| 62848 |
|
| 62849 |
|
|
@@ -63007,10 +63007,10 @@ var Route = __WEBPACK_IMPORTED_MODULE_0_create_react_class___default()({
|
|
| 63007 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_Actions___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_Actions__);
|
| 63008 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(14);
|
| 63009 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__);
|
| 63010 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__createMemoryHistory__ = __webpack_require__(
|
| 63011 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__createTransitionManager__ = __webpack_require__(
|
| 63012 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouteUtils__ = __webpack_require__(63);
|
| 63013 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__RouterUtils__ = __webpack_require__(
|
| 63014 |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
| 63015 |
|
| 63016 |
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
|
@@ -63125,9 +63125,9 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
|
|
| 63125 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
| 63126 |
|
| 63127 |
"use strict";
|
| 63128 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory__ = __webpack_require__(
|
| 63129 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory__);
|
| 63130 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createRouterHistory__ = __webpack_require__(
|
| 63131 |
|
| 63132 |
|
| 63133 |
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_1__createRouterHistory__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory___default.a));
|
|
@@ -63137,9 +63137,9 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
|
|
| 63137 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
| 63138 |
|
| 63139 |
"use strict";
|
| 63140 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory__ = __webpack_require__(
|
| 63141 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory__);
|
| 63142 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createRouterHistory__ = __webpack_require__(
|
| 63143 |
|
| 63144 |
|
| 63145 |
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_1__createRouterHistory__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory___default.a));
|
|
@@ -64296,7 +64296,7 @@ var _react = __webpack_require__(2);
|
|
| 64296 |
|
| 64297 |
var _react2 = _interopRequireDefault(_react);
|
| 64298 |
|
| 64299 |
-
var _text = __webpack_require__(
|
| 64300 |
|
| 64301 |
var _text2 = _interopRequireDefault(_text);
|
| 64302 |
|
|
@@ -64316,7 +64316,7 @@ var _checkbox = __webpack_require__(590);
|
|
| 64316 |
|
| 64317 |
var _checkbox2 = _interopRequireDefault(_checkbox);
|
| 64318 |
|
| 64319 |
-
var _selection = __webpack_require__(
|
| 64320 |
|
| 64321 |
var _selection2 = _interopRequireDefault(_selection);
|
| 64322 |
|
|
@@ -64717,7 +64717,7 @@ var _underscore = __webpack_require__(7);
|
|
| 64717 |
|
| 64718 |
var _underscore2 = _interopRequireDefault(_underscore);
|
| 64719 |
|
| 64720 |
-
__webpack_require__(
|
| 64721 |
|
| 64722 |
__webpack_require__(290);
|
| 64723 |
|
|
@@ -65719,7 +65719,7 @@ var _react = __webpack_require__(2);
|
|
| 65719 |
|
| 65720 |
var _react2 = _interopRequireDefault(_react);
|
| 65721 |
|
| 65722 |
-
var _reactDom = __webpack_require__(
|
| 65723 |
|
| 65724 |
var _reactDom2 = _interopRequireDefault(_reactDom);
|
| 65725 |
|
|
@@ -65753,7 +65753,7 @@ var _wpJsHooks = __webpack_require__(33);
|
|
| 65753 |
|
| 65754 |
var _wpJsHooks2 = _interopRequireDefault(_wpJsHooks);
|
| 65755 |
|
| 65756 |
-
var _stats = __webpack_require__(
|
| 65757 |
|
| 65758 |
var _stats2 = _interopRequireDefault(_stats);
|
| 65759 |
|
|
@@ -66291,7 +66291,7 @@ var _mailpoet = __webpack_require__(3);
|
|
| 66291 |
|
| 66292 |
var _mailpoet2 = _interopRequireDefault(_mailpoet);
|
| 66293 |
|
| 66294 |
-
var _in_app_announcement = __webpack_require__(
|
| 66295 |
|
| 66296 |
var _in_app_announcement2 = _interopRequireDefault(_in_app_announcement);
|
| 66297 |
|
|
@@ -67021,7 +67021,7 @@ var _react = __webpack_require__(2);
|
|
| 67021 |
|
| 67022 |
var _react2 = _interopRequireDefault(_react);
|
| 67023 |
|
| 67024 |
-
var _reactDom = __webpack_require__(
|
| 67025 |
|
| 67026 |
var _reactDom2 = _interopRequireDefault(_reactDom);
|
| 67027 |
|
|
@@ -67133,7 +67133,7 @@ var _mailpoet = __webpack_require__(3);
|
|
| 67133 |
|
| 67134 |
var _mailpoet2 = _interopRequireDefault(_mailpoet);
|
| 67135 |
|
| 67136 |
-
var _in_app_announcement = __webpack_require__(
|
| 67137 |
|
| 67138 |
var _in_app_announcement2 = _interopRequireDefault(_in_app_announcement);
|
| 67139 |
|
|
@@ -68045,7 +68045,7 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in ob
|
|
| 68045 |
|
| 68046 |
var _ExecutionEnvironment = __webpack_require__(277);
|
| 68047 |
|
| 68048 |
-
var _runTransitionHook = __webpack_require__(
|
| 68049 |
|
| 68050 |
var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook);
|
| 68051 |
|
|
@@ -68053,7 +68053,7 @@ var _extractPath = __webpack_require__(508);
|
|
| 68053 |
|
| 68054 |
var _extractPath2 = _interopRequireDefault(_extractPath);
|
| 68055 |
|
| 68056 |
-
var _parsePath = __webpack_require__(
|
| 68057 |
|
| 68058 |
var _parsePath2 = _interopRequireDefault(_parsePath);
|
| 68059 |
|
| 5403 |
|
| 5404 |
|
| 5405 |
|
| 5406 |
+
var _prodInvariant = __webpack_require__(29);
|
| 5407 |
|
| 5408 |
var ReactCurrentOwner = __webpack_require__(20);
|
| 5409 |
|
| 6341 |
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
| 6342 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Router__ = __webpack_require__(563);
|
| 6343 |
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Router", function() { return __WEBPACK_IMPORTED_MODULE_0__Router__["a"]; });
|
| 6344 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Link__ = __webpack_require__(493);
|
| 6345 |
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Link", function() { return __WEBPACK_IMPORTED_MODULE_1__Link__["a"]; });
|
| 6346 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__IndexLink__ = __webpack_require__(570);
|
| 6347 |
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "IndexLink", function() { return __WEBPACK_IMPORTED_MODULE_2__IndexLink__["a"]; });
|
| 6351 |
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "IndexRedirect", function() { return __WEBPACK_IMPORTED_MODULE_4__IndexRedirect__["a"]; });
|
| 6352 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__IndexRoute__ = __webpack_require__(573);
|
| 6353 |
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "IndexRoute", function() { return __WEBPACK_IMPORTED_MODULE_5__IndexRoute__["a"]; });
|
| 6354 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Redirect__ = __webpack_require__(494);
|
| 6355 |
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Redirect", function() { return __WEBPACK_IMPORTED_MODULE_6__Redirect__["a"]; });
|
| 6356 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Route__ = __webpack_require__(574);
|
| 6357 |
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Route", function() { return __WEBPACK_IMPORTED_MODULE_7__Route__["a"]; });
|
| 6364 |
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "routerShape", function() { return __WEBPACK_IMPORTED_MODULE_10__PropTypes__["b"]; });
|
| 6365 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__match__ = __webpack_require__(575);
|
| 6366 |
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "match", function() { return __WEBPACK_IMPORTED_MODULE_11__match__["a"]; });
|
| 6367 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__useRouterHistory__ = __webpack_require__(496);
|
| 6368 |
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "useRouterHistory", function() { return __WEBPACK_IMPORTED_MODULE_12__useRouterHistory__["a"]; });
|
| 6369 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__PatternUtils__ = __webpack_require__(100);
|
| 6370 |
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "formatPattern", function() { return __WEBPACK_IMPORTED_MODULE_13__PatternUtils__["a"]; });
|
| 6374 |
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "browserHistory", function() { return __WEBPACK_IMPORTED_MODULE_15__browserHistory__["a"]; });
|
| 6375 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__hashHistory__ = __webpack_require__(578);
|
| 6376 |
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "hashHistory", function() { return __WEBPACK_IMPORTED_MODULE_16__hashHistory__["a"]; });
|
| 6377 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__createMemoryHistory__ = __webpack_require__(495);
|
| 6378 |
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "createMemoryHistory", function() { return __WEBPACK_IMPORTED_MODULE_17__createMemoryHistory__["a"]; });
|
| 6379 |
/* components */
|
| 6380 |
|
| 6677 |
/* 28 */
|
| 6678 |
/***/ (function(module, exports, __webpack_require__) {
|
| 6679 |
|
| 6680 |
+
/* WEBPACK VAR INJECTION */(function(global) {if(!global["MailPoetLib"]) global["MailPoetLib"] = {};
|
| 6681 |
+
module.exports = global["MailPoetLib"]["ReactDOM"] = __webpack_require__(317);
|
| 6682 |
+
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
|
| 6683 |
+
|
| 6684 |
+
/***/ }),
|
| 6685 |
+
/* 29 */
|
| 6686 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 6687 |
+
|
| 6688 |
"use strict";
|
| 6689 |
/**
|
| 6690 |
* Copyright (c) 2013-present, Facebook, Inc.
|
| 6726 |
module.exports = reactProdInvariant;
|
| 6727 |
|
| 6728 |
/***/ }),
|
| 6729 |
+
/* 30 */
|
| 6730 |
/***/ (function(module, exports, __webpack_require__) {
|
| 6731 |
|
| 6732 |
"use strict";
|
| 7072 |
module.exports = ReactElement;
|
| 7073 |
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
| 7074 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7075 |
/***/ }),
|
| 7076 |
/* 31 */
|
| 7077 |
/***/ (function(module, exports, __webpack_require__) {
|
| 7216 |
var ReactPureComponent = __webpack_require__(306);
|
| 7217 |
var ReactClass = __webpack_require__(307);
|
| 7218 |
var ReactDOMFactories = __webpack_require__(308);
|
| 7219 |
+
var ReactElement = __webpack_require__(30);
|
| 7220 |
var ReactPropTypes = __webpack_require__(310);
|
| 7221 |
var ReactVersion = __webpack_require__(311);
|
| 7222 |
|
| 9771 |
|
| 9772 |
|
| 9773 |
|
| 9774 |
+
var _prodInvariant = __webpack_require__(29);
|
| 9775 |
|
| 9776 |
var ReactNoopUpdateQueue = __webpack_require__(67);
|
| 9777 |
|
| 26237 |
|
| 26238 |
var ReactCurrentOwner = __webpack_require__(20);
|
| 26239 |
var ReactComponentTreeHook = __webpack_require__(16);
|
| 26240 |
+
var ReactElement = __webpack_require__(30);
|
| 26241 |
|
| 26242 |
var checkReactTypeSpec = __webpack_require__(309);
|
| 26243 |
|
| 35874 |
|
| 35875 |
|
| 35876 |
var PooledClass = __webpack_require__(303);
|
| 35877 |
+
var ReactElement = __webpack_require__(30);
|
| 35878 |
|
| 35879 |
var emptyFunction = __webpack_require__(15);
|
| 35880 |
var traverseAllChildren = __webpack_require__(304);
|
| 36070 |
|
| 36071 |
|
| 36072 |
|
| 36073 |
+
var _prodInvariant = __webpack_require__(29);
|
| 36074 |
|
| 36075 |
var invariant = __webpack_require__(4);
|
| 36076 |
|
| 36187 |
|
| 36188 |
|
| 36189 |
|
| 36190 |
+
var _prodInvariant = __webpack_require__(29);
|
| 36191 |
|
| 36192 |
var ReactCurrentOwner = __webpack_require__(20);
|
| 36193 |
var REACT_ELEMENT_TYPE = __webpack_require__(229);
|
| 36480 |
|
| 36481 |
|
| 36482 |
|
| 36483 |
+
var _prodInvariant = __webpack_require__(29),
|
| 36484 |
_assign = __webpack_require__(10);
|
| 36485 |
|
| 36486 |
var ReactComponent = __webpack_require__(66);
|
| 36487 |
+
var ReactElement = __webpack_require__(30);
|
| 36488 |
var ReactPropTypeLocationNames = __webpack_require__(68);
|
| 36489 |
var ReactNoopUpdateQueue = __webpack_require__(67);
|
| 36490 |
|
| 37203 |
|
| 37204 |
|
| 37205 |
|
| 37206 |
+
var ReactElement = __webpack_require__(30);
|
| 37207 |
|
| 37208 |
/**
|
| 37209 |
* Create a factory that creates HTML tag elements.
|
| 37379 |
|
| 37380 |
|
| 37381 |
|
| 37382 |
+
var _prodInvariant = __webpack_require__(29);
|
| 37383 |
|
| 37384 |
var ReactPropTypeLocationNames = __webpack_require__(68);
|
| 37385 |
var ReactPropTypesSecret = __webpack_require__(231);
|
| 37472 |
|
| 37473 |
|
| 37474 |
|
| 37475 |
+
var ReactElement = __webpack_require__(30);
|
| 37476 |
var ReactPropTypeLocationNames = __webpack_require__(68);
|
| 37477 |
var ReactPropTypesSecret = __webpack_require__(231);
|
| 37478 |
|
| 37930 |
*/
|
| 37931 |
|
| 37932 |
|
| 37933 |
+
var _prodInvariant = __webpack_require__(29);
|
| 37934 |
|
| 37935 |
+
var ReactElement = __webpack_require__(30);
|
| 37936 |
|
| 37937 |
var invariant = __webpack_require__(4);
|
| 37938 |
|
| 37988 |
|
| 37989 |
var _propTypes2 = _interopRequireDefault(_propTypes);
|
| 37990 |
|
| 37991 |
+
var _reactDom = __webpack_require__(28);
|
| 37992 |
|
| 37993 |
var _reactDom2 = _interopRequireDefault(_reactDom);
|
| 37994 |
|
| 50707 |
|
| 50708 |
var _DOMUtils = __webpack_require__(288);
|
| 50709 |
|
| 50710 |
+
var _DOMStateStorage = __webpack_require__(487);
|
| 50711 |
|
| 50712 |
var _PathUtils = __webpack_require__(61);
|
| 50713 |
|
| 51272 |
"use strict";
|
| 51273 |
|
| 51274 |
|
| 51275 |
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
| 51276 |
+
|
| 51277 |
+
var _react = __webpack_require__(2);
|
| 51278 |
+
|
| 51279 |
+
var _react2 = _interopRequireDefault(_react);
|
| 51280 |
+
|
| 51281 |
+
var _mailpoet = __webpack_require__(3);
|
| 51282 |
+
|
| 51283 |
+
var _mailpoet2 = _interopRequireDefault(_mailpoet);
|
| 51284 |
+
|
| 51285 |
+
var _in_app_announcement_dot = __webpack_require__(599);
|
| 51286 |
+
|
| 51287 |
+
var _in_app_announcement_dot2 = _interopRequireDefault(_in_app_announcement_dot);
|
| 51288 |
+
|
| 51289 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
| 51290 |
+
|
| 51291 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
| 51292 |
+
|
| 51293 |
+
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
| 51294 |
+
|
| 51295 |
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
| 51296 |
+
|
| 51297 |
+
var InAppAnnouncement = function (_React$Component) {
|
| 51298 |
+
_inherits(InAppAnnouncement, _React$Component);
|
| 51299 |
+
|
| 51300 |
+
function InAppAnnouncement(props) {
|
| 51301 |
+
_classCallCheck(this, InAppAnnouncement);
|
| 51302 |
+
|
| 51303 |
+
var _this = _possibleConstructorReturn(this, (InAppAnnouncement.__proto__ || Object.getPrototypeOf(InAppAnnouncement)).call(this, props));
|
| 51304 |
+
|
| 51305 |
+
_this.saveDisplayed = _this.saveDisplayed.bind(_this);
|
| 51306 |
+
|
| 51307 |
+
_this.state = {
|
| 51308 |
+
announcementsSettings: window.mailpoet_in_app_announcements || null
|
| 51309 |
+
};
|
| 51310 |
+
return _this;
|
| 51311 |
+
}
|
| 51312 |
+
|
| 51313 |
+
_createClass(InAppAnnouncement, [{
|
| 51314 |
+
key: 'saveDisplayed',
|
| 51315 |
+
value: function saveDisplayed() {
|
| 51316 |
+
var _this2 = this;
|
| 51317 |
+
|
| 51318 |
+
var settings = Object.assign({}, this.state.announcementsSettings);
|
| 51319 |
+
settings.displayed.push(this.props.showOnlyOnceSlug);
|
| 51320 |
+
return _mailpoet2.default.Ajax.post({
|
| 51321 |
+
api_version: window.mailpoet_api_version,
|
| 51322 |
+
endpoint: 'settings',
|
| 51323 |
+
action: 'set',
|
| 51324 |
+
data: { in_app_announcements: settings }
|
| 51325 |
+
}).always(function () {
|
| 51326 |
+
return _this2.setState({ announcementsSettings: settings });
|
| 51327 |
+
});
|
| 51328 |
+
}
|
| 51329 |
+
}, {
|
| 51330 |
+
key: 'render',
|
| 51331 |
+
value: function render() {
|
| 51332 |
+
var _this3 = this;
|
| 51333 |
+
|
| 51334 |
+
if (this.props.showToNewUser !== null && window.mailpoet_is_new_user !== this.props.showToNewUser) {
|
| 51335 |
+
return null;
|
| 51336 |
+
}
|
| 51337 |
+
|
| 51338 |
+
if (this.props.validUntil !== null && this.props.validUntil < new Date()) {
|
| 51339 |
+
return null;
|
| 51340 |
+
}
|
| 51341 |
+
|
| 51342 |
+
if (this.props.showToPremiumUser !== null && window.mailpoet_premium_active !== this.props.showToPremiumUser) {
|
| 51343 |
+
return null;
|
| 51344 |
+
}
|
| 51345 |
+
|
| 51346 |
+
if (this.props.showOnlyOnceSlug && this.state.announcementsSettings.displayed.includes(this.props.showOnlyOnceSlug)) {
|
| 51347 |
+
return null;
|
| 51348 |
+
}
|
| 51349 |
+
|
| 51350 |
+
return _react2.default.createElement(
|
| 51351 |
+
_in_app_announcement_dot2.default,
|
| 51352 |
+
{
|
| 51353 |
+
className: this.props.className,
|
| 51354 |
+
width: this.props.width,
|
| 51355 |
+
height: this.props.height,
|
| 51356 |
+
onUserTrigger: function onUserTrigger() {
|
| 51357 |
+
if (!_this3.props.showOnlyOnceSlug) {
|
| 51358 |
+
return;
|
| 51359 |
+
}
|
| 51360 |
+
_this3.saveDisplayed();
|
| 51361 |
+
}
|
| 51362 |
+
},
|
| 51363 |
+
this.props.children
|
| 51364 |
+
);
|
| 51365 |
+
}
|
| 51366 |
+
}]);
|
| 51367 |
+
|
| 51368 |
+
return InAppAnnouncement;
|
| 51369 |
+
}(_react2.default.Component);
|
| 51370 |
+
|
| 51371 |
+
var validateBooleanWithWindowDependency = function validateBooleanWithWindowDependency(props, propName, componentName, windowProperty) {
|
| 51372 |
+
var propValue = props[propName];
|
| 51373 |
+
if (propValue !== null && propValue !== true && propValue !== false) {
|
| 51374 |
+
return new Error('Invalid property in ' + componentName + '. newUser must be of type boolean');
|
| 51375 |
+
}
|
| 51376 |
+
if (propValue !== null && typeof window[windowProperty] === 'undefined') {
|
| 51377 |
+
return new Error('Missing data for evaluation of ' + componentName + ' display condition. ' + propName + ' requires window.' + windowProperty);
|
| 51378 |
+
}
|
| 51379 |
+
return null;
|
| 51380 |
+
};
|
| 51381 |
+
|
| 51382 |
+
InAppAnnouncement.propTypes = {
|
| 51383 |
+
width: _react2.default.PropTypes.string,
|
| 51384 |
+
height: _react2.default.PropTypes.string,
|
| 51385 |
+
className: _react2.default.PropTypes.string,
|
| 51386 |
+
children: _react2.default.PropTypes.element.isRequired,
|
| 51387 |
+
validUntil: _react2.default.PropTypes.instanceOf(Date),
|
| 51388 |
+
showToNewUser: function showToNewUser(props, propName, componentName) {
|
| 51389 |
+
return validateBooleanWithWindowDependency(props, propName, componentName, 'mailpoet_is_new_user');
|
| 51390 |
+
},
|
| 51391 |
+
showToPremiumUser: function showToPremiumUser(props, propName, componentName) {
|
| 51392 |
+
return validateBooleanWithWindowDependency(props, propName, componentName, 'mailpoet_premium_active');
|
| 51393 |
+
},
|
| 51394 |
+
showOnlyOnceSlug: function showOnlyOnceSlug(props, propName, componentName) {
|
| 51395 |
+
var propValue = props[propName];
|
| 51396 |
+
if (propValue !== null && typeof propValue !== 'string') {
|
| 51397 |
+
return new Error('Invalid property in ' + componentName + '. ' + propName + ' must be of type string');
|
| 51398 |
+
}
|
| 51399 |
+
if (propValue === null) {
|
| 51400 |
+
return null;
|
| 51401 |
+
}
|
| 51402 |
+
if (typeof window.mailpoet_in_app_announcements === 'undefined') {
|
| 51403 |
+
return new Error('Missing data for evaluation of ' + componentName + ' display condition. ' + propName + ' requires window.mailpoet_in_app_announcements');
|
| 51404 |
+
}
|
| 51405 |
+
return null;
|
| 51406 |
+
}
|
| 51407 |
+
};
|
| 51408 |
+
|
| 51409 |
+
InAppAnnouncement.defaultProps = {
|
| 51410 |
+
width: '900px',
|
| 51411 |
+
height: '600px',
|
| 51412 |
+
className: null,
|
| 51413 |
+
validUntil: null,
|
| 51414 |
+
showToNewUser: null,
|
| 51415 |
+
showToPremiumUser: null,
|
| 51416 |
+
showOnlyOnceSlug: null
|
| 51417 |
+
};
|
| 51418 |
+
|
| 51419 |
+
module.exports = InAppAnnouncement;
|
| 51420 |
+
|
| 51421 |
+
/***/ }),
|
| 51422 |
+
/* 468 */
|
| 51423 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 51424 |
+
|
| 51425 |
+
"use strict";
|
| 51426 |
+
|
| 51427 |
+
|
| 51428 |
var _underscore = __webpack_require__(7);
|
| 51429 |
|
| 51430 |
var _underscore2 = _interopRequireDefault(_underscore);
|
| 51441 |
|
| 51442 |
var _select2 = _interopRequireDefault(_select);
|
| 51443 |
|
| 51444 |
+
var _text = __webpack_require__(498);
|
| 51445 |
|
| 51446 |
var _text2 = _interopRequireDefault(_text);
|
| 51447 |
|
| 51448 |
+
var _common = __webpack_require__(469);
|
| 51449 |
|
| 51450 |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
| 51451 |
|
| 51598 |
module.exports = WelcomeScheduling;
|
| 51599 |
|
| 51600 |
/***/ }),
|
| 51601 |
+
/* 469 */
|
| 51602 |
/***/ (function(module, exports, __webpack_require__) {
|
| 51603 |
|
| 51604 |
"use strict";
|
| 51609 |
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
|
| 51610 |
|
| 51611 |
/***/ }),
|
| 51612 |
+
/* 470 */
|
| 51613 |
/***/ (function(module, exports, __webpack_require__) {
|
| 51614 |
|
| 51615 |
"use strict";
|
| 51660 |
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
| 51661 |
|
| 51662 |
/***/ }),
|
| 51663 |
+
/* 471 */
|
| 51664 |
/***/ (function(module, exports, __webpack_require__) {
|
| 51665 |
|
| 51666 |
"use strict";
|
| 51691 |
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
| 51692 |
|
| 51693 |
/***/ }),
|
|
|
|
| 51694 |
/* 472 */,
|
| 51695 |
/* 473 */,
|
| 51696 |
/* 474 */,
|
| 51697 |
/* 475 */,
|
| 51698 |
+
/* 476 */,
|
| 51699 |
+
/* 477 */
|
| 51700 |
/***/ (function(module, exports, __webpack_require__) {
|
| 51701 |
|
| 51702 |
"use strict";
|
| 51987 |
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
| 51988 |
|
| 51989 |
/***/ }),
|
| 51990 |
+
/* 478 */
|
| 51991 |
/***/ (function(module, exports, __webpack_require__) {
|
| 51992 |
|
| 51993 |
"use strict";
|
| 52000 |
}
|
| 52001 |
|
| 52002 |
/***/ }),
|
| 52003 |
+
/* 479 */
|
| 52004 |
/***/ (function(module, exports, __webpack_require__) {
|
| 52005 |
|
| 52006 |
"use strict";
|
| 52034 |
}
|
| 52035 |
|
| 52036 |
/***/ }),
|
| 52037 |
+
/* 480 */
|
| 52038 |
/***/ (function(module, exports, __webpack_require__) {
|
| 52039 |
|
| 52040 |
"use strict";
|
| 52188 |
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
| 52189 |
|
| 52190 |
/***/ }),
|
| 52191 |
+
/* 481 */
|
| 52192 |
/***/ (function(module, exports, __webpack_require__) {
|
| 52193 |
|
| 52194 |
"use strict";
|
| 52245 |
|
| 52246 |
|
| 52247 |
/***/ }),
|
| 52248 |
+
/* 482 */
|
| 52249 |
/***/ (function(module, exports, __webpack_require__) {
|
| 52250 |
|
| 52251 |
"use strict";
|
| 52351 |
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
| 52352 |
|
| 52353 |
/***/ }),
|
| 52354 |
+
/* 483 */
|
| 52355 |
/***/ (function(module, exports, __webpack_require__) {
|
| 52356 |
|
| 52357 |
"use strict";
|
| 52368 |
|
| 52369 |
var _useBasename2 = _interopRequireDefault(_useBasename);
|
| 52370 |
|
| 52371 |
+
var _createMemoryHistory = __webpack_require__(484);
|
| 52372 |
|
| 52373 |
var _createMemoryHistory2 = _interopRequireDefault(_createMemoryHistory);
|
| 52374 |
|
| 52388 |
module.exports = exports['default'];
|
| 52389 |
|
| 52390 |
/***/ }),
|
| 52391 |
+
/* 484 */
|
| 52392 |
/***/ (function(module, exports, __webpack_require__) {
|
| 52393 |
|
| 52394 |
"use strict";
|
| 52535 |
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
| 52536 |
|
| 52537 |
/***/ }),
|
| 52538 |
+
/* 485 */
|
| 52539 |
/***/ (function(module, exports, __webpack_require__) {
|
| 52540 |
|
| 52541 |
"use strict";
|
| 52563 |
module.exports = exports['default'];
|
| 52564 |
|
| 52565 |
/***/ }),
|
| 52566 |
+
/* 486 */
|
| 52567 |
/***/ (function(module, exports, __webpack_require__) {
|
| 52568 |
|
| 52569 |
"use strict";
|
| 52663 |
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
| 52664 |
|
| 52665 |
/***/ }),
|
| 52666 |
+
/* 487 */
|
| 52667 |
/***/ (function(module, exports, __webpack_require__) {
|
| 52668 |
|
| 52669 |
"use strict";
|
| 52755 |
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
| 52756 |
|
| 52757 |
/***/ }),
|
| 52758 |
+
/* 488 */
|
| 52759 |
/***/ (function(module, exports, __webpack_require__) {
|
| 52760 |
|
| 52761 |
"use strict";
|
| 52764 |
exports.__esModule = true;
|
| 52765 |
exports.default = createRouterHistory;
|
| 52766 |
|
| 52767 |
+
var _useRouterHistory = __webpack_require__(485);
|
| 52768 |
|
| 52769 |
var _useRouterHistory2 = _interopRequireDefault(_useRouterHistory);
|
| 52770 |
|
| 52780 |
module.exports = exports['default'];
|
| 52781 |
|
| 52782 |
/***/ }),
|
| 52783 |
+
/* 489 */
|
| 52784 |
/***/ (function(module, exports, __webpack_require__) {
|
| 52785 |
|
| 52786 |
"use strict";
|
| 52934 |
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
| 52935 |
|
| 52936 |
/***/ }),
|
| 52937 |
+
/* 490 */
|
| 52938 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
| 52939 |
|
| 52940 |
"use strict";
|
| 53206 |
/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(1)))
|
| 53207 |
|
| 53208 |
/***/ }),
|
| 53209 |
+
/* 491 */
|
| 53210 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
| 53211 |
|
| 53212 |
"use strict";
|
| 53216 |
}
|
| 53217 |
|
| 53218 |
/***/ }),
|
| 53219 |
+
/* 492 */
|
| 53220 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
| 53221 |
|
| 53222 |
"use strict";
|
| 53246 |
}
|
| 53247 |
|
| 53248 |
/***/ }),
|
| 53249 |
+
/* 493 */
|
| 53250 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
| 53251 |
|
| 53252 |
"use strict";
|
| 53392 |
/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(1)))
|
| 53393 |
|
| 53394 |
/***/ }),
|
| 53395 |
+
/* 494 */
|
| 53396 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
| 53397 |
|
| 53398 |
"use strict";
|
| 53491 |
/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(1)))
|
| 53492 |
|
| 53493 |
/***/ }),
|
| 53494 |
+
/* 495 */
|
| 53495 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
| 53496 |
|
| 53497 |
"use strict";
|
| 53500 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__);
|
| 53501 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__ = __webpack_require__(287);
|
| 53502 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__);
|
| 53503 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory__ = __webpack_require__(484);
|
| 53504 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory__);
|
| 53505 |
|
| 53506 |
|
| 53519 |
}
|
| 53520 |
|
| 53521 |
/***/ }),
|
| 53522 |
+
/* 496 */
|
| 53523 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
| 53524 |
|
| 53525 |
"use strict";
|
| 53539 |
}
|
| 53540 |
|
| 53541 |
/***/ }),
|
| 53542 |
+
/* 497 */
|
| 53543 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
| 53544 |
|
| 53545 |
"use strict";
|
| 53546 |
/* harmony export (immutable) */ __webpack_exports__["a"] = createRouterHistory;
|
| 53547 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__useRouterHistory__ = __webpack_require__(496);
|
| 53548 |
|
| 53549 |
|
| 53550 |
var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
|
| 53556 |
}
|
| 53557 |
|
| 53558 |
/***/ }),
|
| 53559 |
+
/* 498 */
|
| 53560 |
/***/ (function(module, exports, __webpack_require__) {
|
| 53561 |
|
| 53562 |
"use strict";
|
| 53567 |
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
|
| 53568 |
|
| 53569 |
/***/ }),
|
| 53570 |
+
/* 499 */
|
| 53571 |
/***/ (function(module, exports, __webpack_require__) {
|
| 53572 |
|
| 53573 |
"use strict";
|
| 53578 |
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
|
| 53579 |
|
| 53580 |
/***/ }),
|
| 53581 |
+
/* 500 */
|
| 53582 |
/***/ (function(module, exports, __webpack_require__) {
|
| 53583 |
|
| 53584 |
/**
|
| 56108 |
|
| 56109 |
|
| 56110 |
/***/ }),
|
| 56111 |
+
/* 501 */
|
| 56112 |
/***/ (function(module, exports, __webpack_require__) {
|
| 56113 |
|
| 56114 |
"use strict";
|
| 56118 |
module.exports = global["MailPoetLib"]["StatsBadge"] = __webpack_require__(593);
|
| 56119 |
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
|
| 56120 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56121 |
/***/ }),
|
| 56122 |
/* 502 */
|
| 56123 |
/***/ (function(module, exports, __webpack_require__) {
|
| 56287 |
|
| 56288 |
var _createLocation3 = _interopRequireDefault(_createLocation2);
|
| 56289 |
|
| 56290 |
+
var _runTransitionHook = __webpack_require__(471);
|
| 56291 |
|
| 56292 |
var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook);
|
| 56293 |
|
| 56551 |
|
| 56552 |
var _Actions = __webpack_require__(101);
|
| 56553 |
|
| 56554 |
+
var _parsePath = __webpack_require__(470);
|
| 56555 |
|
| 56556 |
var _parsePath2 = _interopRequireDefault(_parsePath);
|
| 56557 |
|
| 56736 |
|
| 56737 |
var _qs2 = _interopRequireDefault(_qs);
|
| 56738 |
|
| 56739 |
+
var _runTransitionHook = __webpack_require__(471);
|
| 56740 |
|
| 56741 |
var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook);
|
| 56742 |
|
| 56743 |
+
var _parsePath = __webpack_require__(470);
|
| 56744 |
|
| 56745 |
var _parsePath2 = _interopRequireDefault(_parsePath);
|
| 56746 |
|
| 57059 |
/***/ (function(module, exports, __webpack_require__) {
|
| 57060 |
|
| 57061 |
__webpack_require__(2);
|
| 57062 |
+
__webpack_require__(28);
|
| 57063 |
__webpack_require__(533);
|
| 57064 |
__webpack_require__(93);
|
| 57065 |
__webpack_require__(62);
|
| 57066 |
__webpack_require__(289);
|
|
|
|
| 57067 |
__webpack_require__(500);
|
| 57068 |
+
__webpack_require__(501);
|
| 57069 |
__webpack_require__(58);
|
| 57070 |
__webpack_require__(274);
|
| 57071 |
__webpack_require__(275);
|
| 57072 |
__webpack_require__(276);
|
| 57073 |
__webpack_require__(502);
|
| 57074 |
__webpack_require__(503);
|
| 57075 |
+
__webpack_require__(468);
|
| 57076 |
__webpack_require__(608);
|
| 57077 |
__webpack_require__(94);
|
| 57078 |
module.exports = __webpack_require__(19);
|
| 57133 |
|
| 57134 |
var _Router3 = _interopRequireDefault(_Router2);
|
| 57135 |
|
| 57136 |
+
var _Link2 = __webpack_require__(480);
|
| 57137 |
|
| 57138 |
var _Link3 = _interopRequireDefault(_Link2);
|
| 57139 |
|
| 57153 |
|
| 57154 |
var _IndexRoute3 = _interopRequireDefault(_IndexRoute2);
|
| 57155 |
|
| 57156 |
+
var _Redirect2 = __webpack_require__(482);
|
| 57157 |
|
| 57158 |
var _Redirect3 = _interopRequireDefault(_Redirect2);
|
| 57159 |
|
| 57169 |
|
| 57170 |
var _match3 = _interopRequireDefault(_match2);
|
| 57171 |
|
| 57172 |
+
var _useRouterHistory2 = __webpack_require__(485);
|
| 57173 |
|
| 57174 |
var _useRouterHistory3 = _interopRequireDefault(_useRouterHistory2);
|
| 57175 |
|
| 57185 |
|
| 57186 |
var _hashHistory3 = _interopRequireDefault(_hashHistory2);
|
| 57187 |
|
| 57188 |
+
var _createMemoryHistory2 = __webpack_require__(483);
|
| 57189 |
|
| 57190 |
var _createMemoryHistory3 = _interopRequireDefault(_createMemoryHistory2);
|
| 57191 |
|
| 57242 |
|
| 57243 |
var _propTypes = __webpack_require__(12);
|
| 57244 |
|
| 57245 |
+
var _createTransitionManager2 = __webpack_require__(477);
|
| 57246 |
|
| 57247 |
var _createTransitionManager3 = _interopRequireDefault(_createTransitionManager2);
|
| 57248 |
|
| 57254 |
|
| 57255 |
var _RouteUtils = __webpack_require__(60);
|
| 57256 |
|
| 57257 |
+
var _RouterUtils = __webpack_require__(479);
|
| 57258 |
|
| 57259 |
var _routerWarning = __webpack_require__(97);
|
| 57260 |
|
| 58697 |
|
| 58698 |
var _AsyncUtils = __webpack_require__(455);
|
| 58699 |
|
| 58700 |
+
var _PromiseUtils = __webpack_require__(478);
|
| 58701 |
|
| 58702 |
function getComponentsForRoute(nextState, route, callback) {
|
| 58703 |
if (route.component || route.components) {
|
| 58747 |
|
| 58748 |
var _AsyncUtils = __webpack_require__(455);
|
| 58749 |
|
| 58750 |
+
var _PromiseUtils = __webpack_require__(478);
|
| 58751 |
|
| 58752 |
var _PatternUtils = __webpack_require__(96);
|
| 58753 |
|
| 59045 |
|
| 59046 |
var _createReactClass2 = _interopRequireDefault(_createReactClass);
|
| 59047 |
|
| 59048 |
+
var _Link = __webpack_require__(480);
|
| 59049 |
|
| 59050 |
var _Link2 = _interopRequireDefault(_Link);
|
| 59051 |
|
| 59090 |
|
| 59091 |
var _createReactClass2 = _interopRequireDefault(_createReactClass);
|
| 59092 |
|
| 59093 |
+
var _hoistNonReactStatics = __webpack_require__(481);
|
| 59094 |
|
| 59095 |
var _hoistNonReactStatics2 = _interopRequireDefault(_hoistNonReactStatics);
|
| 59096 |
|
| 59175 |
|
| 59176 |
var _invariant2 = _interopRequireDefault(_invariant);
|
| 59177 |
|
| 59178 |
+
var _Redirect = __webpack_require__(482);
|
| 59179 |
|
| 59180 |
var _Redirect2 = _interopRequireDefault(_Redirect);
|
| 59181 |
|
| 59363 |
|
| 59364 |
var _invariant2 = _interopRequireDefault(_invariant);
|
| 59365 |
|
| 59366 |
+
var _createMemoryHistory = __webpack_require__(483);
|
| 59367 |
|
| 59368 |
var _createMemoryHistory2 = _interopRequireDefault(_createMemoryHistory);
|
| 59369 |
|
| 59370 |
+
var _createTransitionManager = __webpack_require__(477);
|
| 59371 |
|
| 59372 |
var _createTransitionManager2 = _interopRequireDefault(_createTransitionManager);
|
| 59373 |
|
| 59374 |
var _RouteUtils = __webpack_require__(60);
|
| 59375 |
|
| 59376 |
+
var _RouterUtils = __webpack_require__(479);
|
| 59377 |
|
| 59378 |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
| 59379 |
|
| 59785 |
|
| 59786 |
exports.__esModule = true;
|
| 59787 |
|
| 59788 |
+
var _createBrowserHistory = __webpack_require__(486);
|
| 59789 |
|
| 59790 |
var _createBrowserHistory2 = _interopRequireDefault(_createBrowserHistory);
|
| 59791 |
|
| 59792 |
+
var _createRouterHistory = __webpack_require__(488);
|
| 59793 |
|
| 59794 |
var _createRouterHistory2 = _interopRequireDefault(_createRouterHistory);
|
| 59795 |
|
| 59850 |
|
| 59851 |
exports.__esModule = true;
|
| 59852 |
|
| 59853 |
+
var _createHashHistory = __webpack_require__(489);
|
| 59854 |
|
| 59855 |
var _createHashHistory2 = _interopRequireDefault(_createHashHistory);
|
| 59856 |
|
| 59857 |
+
var _createRouterHistory = __webpack_require__(488);
|
| 59858 |
|
| 59859 |
var _createRouterHistory2 = _interopRequireDefault(_createRouterHistory);
|
| 59860 |
|
| 59896 |
|
| 59897 |
var _DOMUtils = __webpack_require__(288);
|
| 59898 |
|
| 59899 |
+
var _DOMStateStorage = __webpack_require__(487);
|
| 59900 |
|
| 59901 |
var _PathUtils = __webpack_require__(61);
|
| 59902 |
|
| 61851 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_create_react_class__);
|
| 61852 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(12);
|
| 61853 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__);
|
| 61854 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__createTransitionManager__ = __webpack_require__(490);
|
| 61855 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__ = __webpack_require__(273);
|
| 61856 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__RouterContext__ = __webpack_require__(463);
|
| 61857 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__RouteUtils__ = __webpack_require__(63);
|
| 61858 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__RouterUtils__ = __webpack_require__(492);
|
| 61859 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__routerWarning__ = __webpack_require__(99);
|
| 61860 |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
| 61861 |
|
| 62409 |
|
| 62410 |
"use strict";
|
| 62411 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__ = __webpack_require__(462);
|
| 62412 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__PromiseUtils__ = __webpack_require__(491);
|
| 62413 |
|
| 62414 |
|
| 62415 |
|
| 62452 |
"use strict";
|
| 62453 |
/* WEBPACK VAR INJECTION */(function(process) {/* harmony export (immutable) */ __webpack_exports__["a"] = matchRoutes;
|
| 62454 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__ = __webpack_require__(462);
|
| 62455 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__PromiseUtils__ = __webpack_require__(491);
|
| 62456 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__PatternUtils__ = __webpack_require__(100);
|
| 62457 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__routerWarning__ = __webpack_require__(99);
|
| 62458 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouteUtils__ = __webpack_require__(63);
|
| 62735 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
|
| 62736 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_create_react_class__ = __webpack_require__(26);
|
| 62737 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_create_react_class___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_create_react_class__);
|
| 62738 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Link__ = __webpack_require__(493);
|
| 62739 |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
| 62740 |
|
| 62741 |
|
| 62767 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);
|
| 62768 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class__ = __webpack_require__(26);
|
| 62769 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_create_react_class__);
|
| 62770 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics__ = __webpack_require__(481);
|
| 62771 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics__);
|
| 62772 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ContextUtils__ = __webpack_require__(464);
|
| 62773 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__PropTypes__ = __webpack_require__(465);
|
| 62843 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__routerWarning__ = __webpack_require__(99);
|
| 62844 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant__ = __webpack_require__(14);
|
| 62845 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_invariant__);
|
| 62846 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Redirect__ = __webpack_require__(494);
|
| 62847 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__ = __webpack_require__(273);
|
| 62848 |
|
| 62849 |
|
| 63007 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_Actions___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_Actions__);
|
| 63008 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(14);
|
| 63009 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__);
|
| 63010 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__createMemoryHistory__ = __webpack_require__(495);
|
| 63011 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__createTransitionManager__ = __webpack_require__(490);
|
| 63012 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouteUtils__ = __webpack_require__(63);
|
| 63013 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__RouterUtils__ = __webpack_require__(492);
|
| 63014 |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
| 63015 |
|
| 63016 |
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
| 63125 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
| 63126 |
|
| 63127 |
"use strict";
|
| 63128 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory__ = __webpack_require__(486);
|
| 63129 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory__);
|
| 63130 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createRouterHistory__ = __webpack_require__(497);
|
| 63131 |
|
| 63132 |
|
| 63133 |
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_1__createRouterHistory__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory___default.a));
|
| 63137 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
| 63138 |
|
| 63139 |
"use strict";
|
| 63140 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory__ = __webpack_require__(489);
|
| 63141 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory__);
|
| 63142 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createRouterHistory__ = __webpack_require__(497);
|
| 63143 |
|
| 63144 |
|
| 63145 |
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_1__createRouterHistory__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory___default.a));
|
| 64296 |
|
| 64297 |
var _react2 = _interopRequireDefault(_react);
|
| 64298 |
|
| 64299 |
+
var _text = __webpack_require__(498);
|
| 64300 |
|
| 64301 |
var _text2 = _interopRequireDefault(_text);
|
| 64302 |
|
| 64316 |
|
| 64317 |
var _checkbox2 = _interopRequireDefault(_checkbox);
|
| 64318 |
|
| 64319 |
+
var _selection = __webpack_require__(499);
|
| 64320 |
|
| 64321 |
var _selection2 = _interopRequireDefault(_selection);
|
| 64322 |
|
| 64717 |
|
| 64718 |
var _underscore2 = _interopRequireDefault(_underscore);
|
| 64719 |
|
| 64720 |
+
__webpack_require__(28);
|
| 64721 |
|
| 64722 |
__webpack_require__(290);
|
| 64723 |
|
| 65719 |
|
| 65720 |
var _react2 = _interopRequireDefault(_react);
|
| 65721 |
|
| 65722 |
+
var _reactDom = __webpack_require__(28);
|
| 65723 |
|
| 65724 |
var _reactDom2 = _interopRequireDefault(_reactDom);
|
| 65725 |
|
| 65753 |
|
| 65754 |
var _wpJsHooks2 = _interopRequireDefault(_wpJsHooks);
|
| 65755 |
|
| 65756 |
+
var _stats = __webpack_require__(501);
|
| 65757 |
|
| 65758 |
var _stats2 = _interopRequireDefault(_stats);
|
| 65759 |
|
| 66291 |
|
| 66292 |
var _mailpoet2 = _interopRequireDefault(_mailpoet);
|
| 66293 |
|
| 66294 |
+
var _in_app_announcement = __webpack_require__(467);
|
| 66295 |
|
| 66296 |
var _in_app_announcement2 = _interopRequireDefault(_in_app_announcement);
|
| 66297 |
|
| 67021 |
|
| 67022 |
var _react2 = _interopRequireDefault(_react);
|
| 67023 |
|
| 67024 |
+
var _reactDom = __webpack_require__(28);
|
| 67025 |
|
| 67026 |
var _reactDom2 = _interopRequireDefault(_reactDom);
|
| 67027 |
|
| 67133 |
|
| 67134 |
var _mailpoet2 = _interopRequireDefault(_mailpoet);
|
| 67135 |
|
| 67136 |
+
var _in_app_announcement = __webpack_require__(467);
|
| 67137 |
|
| 67138 |
var _in_app_announcement2 = _interopRequireDefault(_in_app_announcement);
|
| 67139 |
|
| 68045 |
|
| 68046 |
var _ExecutionEnvironment = __webpack_require__(277);
|
| 68047 |
|
| 68048 |
+
var _runTransitionHook = __webpack_require__(471);
|
| 68049 |
|
| 68050 |
var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook);
|
| 68051 |
|
| 68053 |
|
| 68054 |
var _extractPath2 = _interopRequireDefault(_extractPath);
|
| 68055 |
|
| 68056 |
+
var _parsePath = __webpack_require__(470);
|
| 68057 |
|
| 68058 |
var _parsePath2 = _interopRequireDefault(_parsePath);
|
| 68059 |
|
assets/js/{form_editor.eaab3da3.js → form_editor.f5731029.js}
RENAMED
|
@@ -3,30 +3,30 @@ webpackJsonp([4],{
|
|
| 3 |
/***/ 516:
|
| 4 |
/***/ (function(module, exports, __webpack_require__) {
|
| 5 |
|
| 6 |
-
/* WEBPACK VAR INJECTION */(function(global) {module.exports = global["CodeMirror"] = __webpack_require__(
|
| 7 |
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
|
| 8 |
|
| 9 |
/***/ }),
|
| 10 |
|
| 11 |
-
/***/
|
| 12 |
/***/ (function(module, exports, __webpack_require__) {
|
| 13 |
|
| 14 |
-
__webpack_require__(
|
| 15 |
__webpack_require__(516);
|
| 16 |
-
module.exports = __webpack_require__(
|
| 17 |
|
| 18 |
|
| 19 |
/***/ }),
|
| 20 |
|
| 21 |
-
/***/
|
| 22 |
/***/ (function(module, exports, __webpack_require__) {
|
| 23 |
|
| 24 |
-
/* WEBPACK VAR INJECTION */(function(global) {module.exports = global["WysijaForm"] = __webpack_require__(
|
| 25 |
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
|
| 26 |
|
| 27 |
/***/ }),
|
| 28 |
|
| 29 |
-
/***/
|
| 30 |
/***/ (function(module, exports, __webpack_require__) {
|
| 31 |
|
| 32 |
"use strict";
|
|
@@ -1188,7 +1188,7 @@ module.exports = WysijaForm;
|
|
| 1188 |
|
| 1189 |
/***/ }),
|
| 1190 |
|
| 1191 |
-
/***/
|
| 1192 |
/***/ (function(module, exports, __webpack_require__) {
|
| 1193 |
|
| 1194 |
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
@@ -10872,7 +10872,7 @@ return CodeMirror$1;
|
|
| 10872 |
|
| 10873 |
/***/ }),
|
| 10874 |
|
| 10875 |
-
/***/
|
| 10876 |
/***/ (function(module, exports, __webpack_require__) {
|
| 10877 |
|
| 10878 |
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
@@ -11711,4 +11711,4 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
|
|
| 11711 |
|
| 11712 |
/***/ })
|
| 11713 |
|
| 11714 |
-
},[
|
| 3 |
/***/ 516:
|
| 4 |
/***/ (function(module, exports, __webpack_require__) {
|
| 5 |
|
| 6 |
+
/* WEBPACK VAR INJECTION */(function(global) {module.exports = global["CodeMirror"] = __webpack_require__(685);
|
| 7 |
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
|
| 8 |
|
| 9 |
/***/ }),
|
| 10 |
|
| 11 |
+
/***/ 682:
|
| 12 |
/***/ (function(module, exports, __webpack_require__) {
|
| 13 |
|
| 14 |
+
__webpack_require__(683);
|
| 15 |
__webpack_require__(516);
|
| 16 |
+
module.exports = __webpack_require__(686);
|
| 17 |
|
| 18 |
|
| 19 |
/***/ }),
|
| 20 |
|
| 21 |
+
/***/ 683:
|
| 22 |
/***/ (function(module, exports, __webpack_require__) {
|
| 23 |
|
| 24 |
+
/* WEBPACK VAR INJECTION */(function(global) {module.exports = global["WysijaForm"] = __webpack_require__(684);
|
| 25 |
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
|
| 26 |
|
| 27 |
/***/ }),
|
| 28 |
|
| 29 |
+
/***/ 684:
|
| 30 |
/***/ (function(module, exports, __webpack_require__) {
|
| 31 |
|
| 32 |
"use strict";
|
| 1188 |
|
| 1189 |
/***/ }),
|
| 1190 |
|
| 1191 |
+
/***/ 685:
|
| 1192 |
/***/ (function(module, exports, __webpack_require__) {
|
| 1193 |
|
| 1194 |
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
| 10872 |
|
| 10873 |
/***/ }),
|
| 10874 |
|
| 10875 |
+
/***/ 686:
|
| 10876 |
/***/ (function(module, exports, __webpack_require__) {
|
| 10877 |
|
| 10878 |
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
| 11711 |
|
| 11712 |
/***/ })
|
| 11713 |
|
| 11714 |
+
},[682]);
|
assets/js/{mailpoet.eaab3da3.js → mailpoet.f5731029.js}
RENAMED
|
@@ -5345,7 +5345,7 @@ module.exports = emptyFunction;
|
|
| 5345 |
|
| 5346 |
|
| 5347 |
|
| 5348 |
-
var _prodInvariant = __webpack_require__(
|
| 5349 |
|
| 5350 |
var ReactCurrentOwner = __webpack_require__(20);
|
| 5351 |
|
|
@@ -6525,6 +6525,14 @@ module.exports = DOMProperty;
|
|
| 6525 |
/* 28 */
|
| 6526 |
/***/ (function(module, exports, __webpack_require__) {
|
| 6527 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6528 |
"use strict";
|
| 6529 |
/**
|
| 6530 |
* Copyright (c) 2013-present, Facebook, Inc.
|
|
@@ -6566,7 +6574,7 @@ function reactProdInvariant(code) {
|
|
| 6566 |
module.exports = reactProdInvariant;
|
| 6567 |
|
| 6568 |
/***/ }),
|
| 6569 |
-
/*
|
| 6570 |
/***/ (function(module, exports, __webpack_require__) {
|
| 6571 |
|
| 6572 |
"use strict";
|
|
@@ -6912,14 +6920,6 @@ ReactElement.isValidElement = function (object) {
|
|
| 6912 |
module.exports = ReactElement;
|
| 6913 |
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
| 6914 |
|
| 6915 |
-
/***/ }),
|
| 6916 |
-
/* 30 */
|
| 6917 |
-
/***/ (function(module, exports, __webpack_require__) {
|
| 6918 |
-
|
| 6919 |
-
/* WEBPACK VAR INJECTION */(function(global) {if(!global["MailPoetLib"]) global["MailPoetLib"] = {};
|
| 6920 |
-
module.exports = global["MailPoetLib"]["ReactDOM"] = __webpack_require__(317);
|
| 6921 |
-
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
|
| 6922 |
-
|
| 6923 |
/***/ }),
|
| 6924 |
/* 31 */
|
| 6925 |
/***/ (function(module, exports, __webpack_require__) {
|
|
@@ -7193,7 +7193,7 @@ var ReactComponent = __webpack_require__(66);
|
|
| 7193 |
var ReactPureComponent = __webpack_require__(306);
|
| 7194 |
var ReactClass = __webpack_require__(307);
|
| 7195 |
var ReactDOMFactories = __webpack_require__(308);
|
| 7196 |
-
var ReactElement = __webpack_require__(
|
| 7197 |
var ReactPropTypes = __webpack_require__(310);
|
| 7198 |
var ReactVersion = __webpack_require__(311);
|
| 7199 |
|
|
@@ -10000,7 +10000,7 @@ module.exports = getIteratorFn;
|
|
| 10000 |
|
| 10001 |
|
| 10002 |
|
| 10003 |
-
var _prodInvariant = __webpack_require__(
|
| 10004 |
|
| 10005 |
var ReactNoopUpdateQueue = __webpack_require__(67);
|
| 10006 |
|
|
@@ -28529,7 +28529,7 @@ module.exports = REACT_ELEMENT_TYPE;
|
|
| 28529 |
|
| 28530 |
var ReactCurrentOwner = __webpack_require__(20);
|
| 28531 |
var ReactComponentTreeHook = __webpack_require__(16);
|
| 28532 |
-
var ReactElement = __webpack_require__(
|
| 28533 |
|
| 28534 |
var checkReactTypeSpec = __webpack_require__(309);
|
| 28535 |
|
|
@@ -35648,7 +35648,7 @@ module.exports = __webpack_require__(34);
|
|
| 35648 |
|
| 35649 |
|
| 35650 |
var PooledClass = __webpack_require__(303);
|
| 35651 |
-
var ReactElement = __webpack_require__(
|
| 35652 |
|
| 35653 |
var emptyFunction = __webpack_require__(15);
|
| 35654 |
var traverseAllChildren = __webpack_require__(304);
|
|
@@ -35844,7 +35844,7 @@ module.exports = ReactChildren;
|
|
| 35844 |
|
| 35845 |
|
| 35846 |
|
| 35847 |
-
var _prodInvariant = __webpack_require__(
|
| 35848 |
|
| 35849 |
var invariant = __webpack_require__(4);
|
| 35850 |
|
|
@@ -35961,7 +35961,7 @@ module.exports = PooledClass;
|
|
| 35961 |
|
| 35962 |
|
| 35963 |
|
| 35964 |
-
var _prodInvariant = __webpack_require__(
|
| 35965 |
|
| 35966 |
var ReactCurrentOwner = __webpack_require__(20);
|
| 35967 |
var REACT_ELEMENT_TYPE = __webpack_require__(229);
|
|
@@ -36254,11 +36254,11 @@ module.exports = ReactPureComponent;
|
|
| 36254 |
|
| 36255 |
|
| 36256 |
|
| 36257 |
-
var _prodInvariant = __webpack_require__(
|
| 36258 |
_assign = __webpack_require__(10);
|
| 36259 |
|
| 36260 |
var ReactComponent = __webpack_require__(66);
|
| 36261 |
-
var ReactElement = __webpack_require__(
|
| 36262 |
var ReactPropTypeLocationNames = __webpack_require__(68);
|
| 36263 |
var ReactNoopUpdateQueue = __webpack_require__(67);
|
| 36264 |
|
|
@@ -36977,7 +36977,7 @@ module.exports = ReactClass;
|
|
| 36977 |
|
| 36978 |
|
| 36979 |
|
| 36980 |
-
var ReactElement = __webpack_require__(
|
| 36981 |
|
| 36982 |
/**
|
| 36983 |
* Create a factory that creates HTML tag elements.
|
|
@@ -37153,7 +37153,7 @@ module.exports = ReactDOMFactories;
|
|
| 37153 |
|
| 37154 |
|
| 37155 |
|
| 37156 |
-
var _prodInvariant = __webpack_require__(
|
| 37157 |
|
| 37158 |
var ReactPropTypeLocationNames = __webpack_require__(68);
|
| 37159 |
var ReactPropTypesSecret = __webpack_require__(231);
|
|
@@ -37246,7 +37246,7 @@ module.exports = checkReactTypeSpec;
|
|
| 37246 |
|
| 37247 |
|
| 37248 |
|
| 37249 |
-
var ReactElement = __webpack_require__(
|
| 37250 |
var ReactPropTypeLocationNames = __webpack_require__(68);
|
| 37251 |
var ReactPropTypesSecret = __webpack_require__(231);
|
| 37252 |
|
|
@@ -37704,9 +37704,9 @@ module.exports = '15.4.2';
|
|
| 37704 |
*/
|
| 37705 |
|
| 37706 |
|
| 37707 |
-
var _prodInvariant = __webpack_require__(
|
| 37708 |
|
| 37709 |
-
var ReactElement = __webpack_require__(
|
| 37710 |
|
| 37711 |
var invariant = __webpack_require__(4);
|
| 37712 |
|
|
@@ -37762,7 +37762,7 @@ var _propTypes = __webpack_require__(12);
|
|
| 37762 |
|
| 37763 |
var _propTypes2 = _interopRequireDefault(_propTypes);
|
| 37764 |
|
| 37765 |
-
var _reactDom = __webpack_require__(
|
| 37766 |
|
| 37767 |
var _reactDom2 = _interopRequireDefault(_reactDom);
|
| 37768 |
|
|
@@ -55414,7 +55414,7 @@ function cacheEvent(forced, name, data) {
|
|
| 55414 |
/* 530 */
|
| 55415 |
/***/ (function(module, exports, __webpack_require__) {
|
| 55416 |
|
| 55417 |
-
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(3), __webpack_require__(2), __webpack_require__(
|
| 55418 |
'use strict';
|
| 55419 |
|
| 55420 |
var MailPoet = mp;
|
| 5345 |
|
| 5346 |
|
| 5347 |
|
| 5348 |
+
var _prodInvariant = __webpack_require__(29);
|
| 5349 |
|
| 5350 |
var ReactCurrentOwner = __webpack_require__(20);
|
| 5351 |
|
| 6525 |
/* 28 */
|
| 6526 |
/***/ (function(module, exports, __webpack_require__) {
|
| 6527 |
|
| 6528 |
+
/* WEBPACK VAR INJECTION */(function(global) {if(!global["MailPoetLib"]) global["MailPoetLib"] = {};
|
| 6529 |
+
module.exports = global["MailPoetLib"]["ReactDOM"] = __webpack_require__(317);
|
| 6530 |
+
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
|
| 6531 |
+
|
| 6532 |
+
/***/ }),
|
| 6533 |
+
/* 29 */
|
| 6534 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 6535 |
+
|
| 6536 |
"use strict";
|
| 6537 |
/**
|
| 6538 |
* Copyright (c) 2013-present, Facebook, Inc.
|
| 6574 |
module.exports = reactProdInvariant;
|
| 6575 |
|
| 6576 |
/***/ }),
|
| 6577 |
+
/* 30 */
|
| 6578 |
/***/ (function(module, exports, __webpack_require__) {
|
| 6579 |
|
| 6580 |
"use strict";
|
| 6920 |
module.exports = ReactElement;
|
| 6921 |
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
| 6922 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6923 |
/***/ }),
|
| 6924 |
/* 31 */
|
| 6925 |
/***/ (function(module, exports, __webpack_require__) {
|
| 7193 |
var ReactPureComponent = __webpack_require__(306);
|
| 7194 |
var ReactClass = __webpack_require__(307);
|
| 7195 |
var ReactDOMFactories = __webpack_require__(308);
|
| 7196 |
+
var ReactElement = __webpack_require__(30);
|
| 7197 |
var ReactPropTypes = __webpack_require__(310);
|
| 7198 |
var ReactVersion = __webpack_require__(311);
|
| 7199 |
|
| 10000 |
|
| 10001 |
|
| 10002 |
|
| 10003 |
+
var _prodInvariant = __webpack_require__(29);
|
| 10004 |
|
| 10005 |
var ReactNoopUpdateQueue = __webpack_require__(67);
|
| 10006 |
|
| 28529 |
|
| 28530 |
var ReactCurrentOwner = __webpack_require__(20);
|
| 28531 |
var ReactComponentTreeHook = __webpack_require__(16);
|
| 28532 |
+
var ReactElement = __webpack_require__(30);
|
| 28533 |
|
| 28534 |
var checkReactTypeSpec = __webpack_require__(309);
|
| 28535 |
|
| 35648 |
|
| 35649 |
|
| 35650 |
var PooledClass = __webpack_require__(303);
|
| 35651 |
+
var ReactElement = __webpack_require__(30);
|
| 35652 |
|
| 35653 |
var emptyFunction = __webpack_require__(15);
|
| 35654 |
var traverseAllChildren = __webpack_require__(304);
|
| 35844 |
|
| 35845 |
|
| 35846 |
|
| 35847 |
+
var _prodInvariant = __webpack_require__(29);
|
| 35848 |
|
| 35849 |
var invariant = __webpack_require__(4);
|
| 35850 |
|
| 35961 |
|
| 35962 |
|
| 35963 |
|
| 35964 |
+
var _prodInvariant = __webpack_require__(29);
|
| 35965 |
|
| 35966 |
var ReactCurrentOwner = __webpack_require__(20);
|
| 35967 |
var REACT_ELEMENT_TYPE = __webpack_require__(229);
|
| 36254 |
|
| 36255 |
|
| 36256 |
|
| 36257 |
+
var _prodInvariant = __webpack_require__(29),
|
| 36258 |
_assign = __webpack_require__(10);
|
| 36259 |
|
| 36260 |
var ReactComponent = __webpack_require__(66);
|
| 36261 |
+
var ReactElement = __webpack_require__(30);
|
| 36262 |
var ReactPropTypeLocationNames = __webpack_require__(68);
|
| 36263 |
var ReactNoopUpdateQueue = __webpack_require__(67);
|
| 36264 |
|
| 36977 |
|
| 36978 |
|
| 36979 |
|
| 36980 |
+
var ReactElement = __webpack_require__(30);
|
| 36981 |
|
| 36982 |
/**
|
| 36983 |
* Create a factory that creates HTML tag elements.
|
| 37153 |
|
| 37154 |
|
| 37155 |
|
| 37156 |
+
var _prodInvariant = __webpack_require__(29);
|
| 37157 |
|
| 37158 |
var ReactPropTypeLocationNames = __webpack_require__(68);
|
| 37159 |
var ReactPropTypesSecret = __webpack_require__(231);
|
| 37246 |
|
| 37247 |
|
| 37248 |
|
| 37249 |
+
var ReactElement = __webpack_require__(30);
|
| 37250 |
var ReactPropTypeLocationNames = __webpack_require__(68);
|
| 37251 |
var ReactPropTypesSecret = __webpack_require__(231);
|
| 37252 |
|
| 37704 |
*/
|
| 37705 |
|
| 37706 |
|
| 37707 |
+
var _prodInvariant = __webpack_require__(29);
|
| 37708 |
|
| 37709 |
+
var ReactElement = __webpack_require__(30);
|
| 37710 |
|
| 37711 |
var invariant = __webpack_require__(4);
|
| 37712 |
|
| 37762 |
|
| 37763 |
var _propTypes2 = _interopRequireDefault(_propTypes);
|
| 37764 |
|
| 37765 |
+
var _reactDom = __webpack_require__(28);
|
| 37766 |
|
| 37767 |
var _reactDom2 = _interopRequireDefault(_reactDom);
|
| 37768 |
|
| 55414 |
/* 530 */
|
| 55415 |
/***/ (function(module, exports, __webpack_require__) {
|
| 55416 |
|
| 55417 |
+
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(3), __webpack_require__(2), __webpack_require__(28), __webpack_require__(228)], __WEBPACK_AMD_DEFINE_RESULT__ = (function helpTooltip(mp, React, ReactDOM, TooltipComponent) {
|
| 55418 |
'use strict';
|
| 55419 |
|
| 55420 |
var MailPoet = mp;
|
assets/js/manifest.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
{
|
| 2 |
-
"mp2migrator.js": "mp2migrator.
|
| 3 |
"public.js": "public.8a5f8230.js",
|
| 4 |
-
"admin.js": "admin.
|
| 5 |
-
"admin_vendor.js": "admin_vendor.
|
| 6 |
-
"form_editor.js": "form_editor.
|
| 7 |
-
"mailpoet.js": "mailpoet.
|
| 8 |
-
"newsletter_editor.js": "newsletter_editor.
|
| 9 |
-
"vendor.js": "vendor.
|
| 10 |
}
|
| 1 |
{
|
| 2 |
+
"mp2migrator.js": "mp2migrator.3d80df09.js",
|
| 3 |
"public.js": "public.8a5f8230.js",
|
| 4 |
+
"admin.js": "admin.f5731029.js",
|
| 5 |
+
"admin_vendor.js": "admin_vendor.f5731029.js",
|
| 6 |
+
"form_editor.js": "form_editor.f5731029.js",
|
| 7 |
+
"mailpoet.js": "mailpoet.f5731029.js",
|
| 8 |
+
"newsletter_editor.js": "newsletter_editor.f5731029.js",
|
| 9 |
+
"vendor.js": "vendor.f5731029.js"
|
| 10 |
}
|
assets/js/{mp2migrator.8768b2f6.js → mp2migrator.3d80df09.js}
RENAMED
|
@@ -109,9 +109,9 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* eslint-disabl
|
|
| 109 |
jQuery('#logger').html('');
|
| 110 |
result.split('\n').forEach(function (resultRow) {
|
| 111 |
var row = resultRow;
|
| 112 |
-
if (row.substr(0, 7) === '[ERROR]' || row.substr(0, 9) === '[WARNING]' || row === MailPoet.I18n.t('import_stopped_by_user')) {
|
| 113 |
row = '<span class="error_msg">' + row + '</span>'; // Mark the errors in red
|
| 114 |
-
} else if (row === MailPoet.I18n.t('import_complete')) { // Test if the import is complete
|
| 115 |
jQuery('#import-actions').hide();
|
| 116 |
jQuery('#upgrade-completed').show();
|
| 117 |
}
|
| 109 |
jQuery('#logger').html('');
|
| 110 |
result.split('\n').forEach(function (resultRow) {
|
| 111 |
var row = resultRow;
|
| 112 |
+
if (row.substr(0, 7) === '[ERROR]' || row.substr(0, 9) === '[WARNING]' || row.toLowerCase() === MailPoet.I18n.t('import_stopped_by_user').toLowerCase()) {
|
| 113 |
row = '<span class="error_msg">' + row + '</span>'; // Mark the errors in red
|
| 114 |
+
} else if (row.toLowerCase() === MailPoet.I18n.t('import_complete').toLowerCase()) { // Test if the import is complete
|
| 115 |
jQuery('#import-actions').hide();
|
| 116 |
jQuery('#upgrade-completed').show();
|
| 117 |
}
|
assets/js/{newsletter_editor.eaab3da3.js → newsletter_editor.f5731029.js}
RENAMED
|
@@ -18628,7 +18628,7 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
|
|
| 18628 |
/***/ 39:
|
| 18629 |
/***/ (function(module, exports, __webpack_require__) {
|
| 18630 |
|
| 18631 |
-
/* WEBPACK VAR INJECTION */(function(global) {module.exports = global["Backbone"] = __webpack_require__(
|
| 18632 |
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
|
| 18633 |
|
| 18634 |
/***/ }),
|
|
@@ -19000,7 +19000,7 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
|
| 19000 |
|
| 19001 |
/***/ }),
|
| 19002 |
|
| 19003 |
-
/***/
|
| 19004 |
/***/ (function(module, exports, __webpack_require__) {
|
| 19005 |
|
| 19006 |
"use strict";
|
|
@@ -19019,7 +19019,7 @@ var _mailpoet = __webpack_require__(3);
|
|
| 19019 |
|
| 19020 |
var _mailpoet2 = _interopRequireDefault(_mailpoet);
|
| 19021 |
|
| 19022 |
-
var _html2canvas = __webpack_require__(
|
| 19023 |
|
| 19024 |
var _html2canvas2 = _interopRequireDefault(_html2canvas);
|
| 19025 |
|
|
@@ -19103,15 +19103,15 @@ var fromNewsletter = exports.fromNewsletter = function fromNewsletter(data) {
|
|
| 19103 |
|
| 19104 |
/***/ }),
|
| 19105 |
|
| 19106 |
-
/***/
|
| 19107 |
/***/ (function(module, exports, __webpack_require__) {
|
| 19108 |
|
| 19109 |
-
/* WEBPACK VAR INJECTION */(function(global) {module.exports = global["html2canvas"] = __webpack_require__(
|
| 19110 |
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
|
| 19111 |
|
| 19112 |
/***/ }),
|
| 19113 |
|
| 19114 |
-
/***/
|
| 19115 |
/***/ (function(module, exports, __webpack_require__) {
|
| 19116 |
|
| 19117 |
/*!
|
|
@@ -26391,7 +26391,7 @@ var formatCounterValue = function formatCounterValue(counter, glue, format) {
|
|
| 26391 |
|
| 26392 |
/***/ }),
|
| 26393 |
|
| 26394 |
-
/***/
|
| 26395 |
/***/ (function(module, exports, __webpack_require__) {
|
| 26396 |
|
| 26397 |
/* WEBPACK VAR INJECTION */(function(global) {var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// Backbone.js 1.3.3
|
|
@@ -31060,7 +31060,7 @@ var saveAs = saveAs || (function(view) {
|
|
| 31060 |
|
| 31061 |
if (typeof module !== "undefined" && module.exports) {
|
| 31062 |
module.exports.saveAs = saveAs;
|
| 31063 |
-
} else if (("function" !== "undefined" && __webpack_require__(
|
| 31064 |
!(__WEBPACK_AMD_DEFINE_RESULT__ = (function() {
|
| 31065 |
return saveAs;
|
| 31066 |
}).call(exports, __webpack_require__, exports, module),
|
|
@@ -31493,7 +31493,7 @@ module.exports = Backbone.SuperModel;
|
|
| 31493 |
|
| 31494 |
/***/ }),
|
| 31495 |
|
| 31496 |
-
/***/
|
| 31497 |
/***/ (function(module, exports, __webpack_require__) {
|
| 31498 |
|
| 31499 |
__webpack_require__(7);
|
|
@@ -31504,21 +31504,19 @@ __webpack_require__(294);
|
|
| 31504 |
__webpack_require__(293);
|
| 31505 |
__webpack_require__(290);
|
| 31506 |
__webpack_require__(517);
|
| 31507 |
-
__webpack_require__(
|
| 31508 |
__webpack_require__(518);
|
| 31509 |
__webpack_require__(519);
|
| 31510 |
-
__webpack_require__(688);
|
| 31511 |
-
__webpack_require__(23);
|
| 31512 |
-
__webpack_require__(689);
|
| 31513 |
__webpack_require__(690);
|
|
|
|
| 31514 |
__webpack_require__(691);
|
| 31515 |
__webpack_require__(692);
|
| 31516 |
__webpack_require__(693);
|
| 31517 |
__webpack_require__(694);
|
| 31518 |
-
__webpack_require__(103);
|
| 31519 |
-
__webpack_require__(47);
|
| 31520 |
__webpack_require__(695);
|
| 31521 |
__webpack_require__(696);
|
|
|
|
|
|
|
| 31522 |
__webpack_require__(697);
|
| 31523 |
__webpack_require__(698);
|
| 31524 |
__webpack_require__(699);
|
|
@@ -31527,24 +31525,26 @@ __webpack_require__(701);
|
|
| 31527 |
__webpack_require__(702);
|
| 31528 |
__webpack_require__(703);
|
| 31529 |
__webpack_require__(704);
|
| 31530 |
-
__webpack_require__(40);
|
| 31531 |
__webpack_require__(705);
|
| 31532 |
-
__webpack_require__(295);
|
| 31533 |
__webpack_require__(706);
|
| 31534 |
-
__webpack_require__(
|
| 31535 |
__webpack_require__(707);
|
|
|
|
| 31536 |
__webpack_require__(708);
|
|
|
|
| 31537 |
__webpack_require__(709);
|
| 31538 |
__webpack_require__(710);
|
| 31539 |
__webpack_require__(711);
|
| 31540 |
__webpack_require__(712);
|
| 31541 |
__webpack_require__(713);
|
| 31542 |
-
|
|
|
|
|
|
|
| 31543 |
|
| 31544 |
|
| 31545 |
/***/ }),
|
| 31546 |
|
| 31547 |
-
/***/
|
| 31548 |
/***/ (function(module, exports) {
|
| 31549 |
|
| 31550 |
// Generated by CoffeeScript 1.9.2
|
|
@@ -31815,7 +31815,7 @@ module.exports = __webpack_require__(714);
|
|
| 31815 |
|
| 31816 |
/***/ }),
|
| 31817 |
|
| 31818 |
-
/***/
|
| 31819 |
/***/ (function(module, exports) {
|
| 31820 |
|
| 31821 |
module.exports = function() {
|
|
@@ -31825,7 +31825,7 @@ module.exports = function() {
|
|
| 31825 |
|
| 31826 |
/***/ }),
|
| 31827 |
|
| 31828 |
-
/***/
|
| 31829 |
/***/ (function(module, exports, __webpack_require__) {
|
| 31830 |
|
| 31831 |
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*** IMPORTS FROM imports-loader ***/
|
|
@@ -35725,7 +35725,7 @@ will produce an inaccurate conversion value. The same issue exists with the cx/c
|
|
| 35725 |
|
| 35726 |
/***/ }),
|
| 35727 |
|
| 35728 |
-
/***/
|
| 35729 |
/***/ (function(module, exports, __webpack_require__) {
|
| 35730 |
|
| 35731 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
|
@@ -35776,7 +35776,7 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_
|
|
| 35776 |
|
| 35777 |
/***/ }),
|
| 35778 |
|
| 35779 |
-
/***/
|
| 35780 |
/***/ (function(module, exports, __webpack_require__) {
|
| 35781 |
|
| 35782 |
"use strict";
|
|
@@ -35877,7 +35877,7 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
|
|
| 35877 |
|
| 35878 |
/***/ }),
|
| 35879 |
|
| 35880 |
-
/***/
|
| 35881 |
/***/ (function(module, exports, __webpack_require__) {
|
| 35882 |
|
| 35883 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* eslint-disable func-names */
|
|
@@ -36274,7 +36274,7 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* eslint-disabl
|
|
| 36274 |
|
| 36275 |
/***/ }),
|
| 36276 |
|
| 36277 |
-
/***/
|
| 36278 |
/***/ (function(module, exports, __webpack_require__) {
|
| 36279 |
|
| 36280 |
"use strict";
|
|
@@ -36389,7 +36389,7 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
|
|
| 36389 |
|
| 36390 |
/***/ }),
|
| 36391 |
|
| 36392 |
-
/***/
|
| 36393 |
/***/ (function(module, exports, __webpack_require__) {
|
| 36394 |
|
| 36395 |
"use strict";
|
|
@@ -36443,7 +36443,7 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
|
|
| 36443 |
|
| 36444 |
/***/ }),
|
| 36445 |
|
| 36446 |
-
/***/
|
| 36447 |
/***/ (function(module, exports, __webpack_require__) {
|
| 36448 |
|
| 36449 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* eslint-disable func-names */
|
|
@@ -36457,7 +36457,7 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* eslint-disabl
|
|
| 36457 |
__webpack_require__(9),
|
| 36458 |
__webpack_require__(518),
|
| 36459 |
__webpack_require__(519),
|
| 36460 |
-
__webpack_require__(
|
| 36461 |
__webpack_require__(7),
|
| 36462 |
__webpack_require__(9)
|
| 36463 |
], __WEBPACK_AMD_DEFINE_RESULT__ = (function (
|
|
@@ -36816,7 +36816,7 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* eslint-disabl
|
|
| 36816 |
|
| 36817 |
/***/ }),
|
| 36818 |
|
| 36819 |
-
/***/
|
| 36820 |
/***/ (function(module, exports, __webpack_require__) {
|
| 36821 |
|
| 36822 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
|
@@ -36871,7 +36871,7 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
|
| 36871 |
|
| 36872 |
/***/ }),
|
| 36873 |
|
| 36874 |
-
/***/
|
| 36875 |
/***/ (function(module, exports, __webpack_require__) {
|
| 36876 |
|
| 36877 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* eslint-disable func-names */
|
|
@@ -37364,7 +37364,7 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* eslint-disabl
|
|
| 37364 |
|
| 37365 |
/***/ }),
|
| 37366 |
|
| 37367 |
-
/***/
|
| 37368 |
/***/ (function(module, exports, __webpack_require__) {
|
| 37369 |
|
| 37370 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
|
@@ -37521,7 +37521,15 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
|
| 37521 |
|
| 37522 |
/***/ }),
|
| 37523 |
|
| 37524 |
-
/***/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37525 |
/***/ (function(module, exports, __webpack_require__) {
|
| 37526 |
|
| 37527 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
|
@@ -37555,7 +37563,7 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
|
| 37555 |
|
| 37556 |
/***/ }),
|
| 37557 |
|
| 37558 |
-
/***/
|
| 37559 |
/***/ (function(module, exports, __webpack_require__) {
|
| 37560 |
|
| 37561 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
|
@@ -37589,15 +37597,7 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
|
| 37589 |
|
| 37590 |
/***/ }),
|
| 37591 |
|
| 37592 |
-
/***/
|
| 37593 |
-
/***/ (function(module, exports, __webpack_require__) {
|
| 37594 |
-
|
| 37595 |
-
/* WEBPACK VAR INJECTION */(function(global) {module.exports = global["_"] = __webpack_require__(104);
|
| 37596 |
-
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
|
| 37597 |
-
|
| 37598 |
-
/***/ }),
|
| 37599 |
-
|
| 37600 |
-
/***/ 700:
|
| 37601 |
/***/ (function(module, exports, __webpack_require__) {
|
| 37602 |
|
| 37603 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* eslint-disable func-names */
|
|
@@ -37918,7 +37918,7 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* eslint-disabl
|
|
| 37918 |
|
| 37919 |
/***/ }),
|
| 37920 |
|
| 37921 |
-
/***/
|
| 37922 |
/***/ (function(module, exports, __webpack_require__) {
|
| 37923 |
|
| 37924 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
|
@@ -38006,7 +38006,7 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
|
| 38006 |
|
| 38007 |
/***/ }),
|
| 38008 |
|
| 38009 |
-
/***/
|
| 38010 |
/***/ (function(module, exports, __webpack_require__) {
|
| 38011 |
|
| 38012 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
|
@@ -38055,7 +38055,7 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
|
| 38055 |
|
| 38056 |
/***/ }),
|
| 38057 |
|
| 38058 |
-
/***/
|
| 38059 |
/***/ (function(module, exports, __webpack_require__) {
|
| 38060 |
|
| 38061 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
|
@@ -38095,7 +38095,7 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
|
| 38095 |
|
| 38096 |
/***/ }),
|
| 38097 |
|
| 38098 |
-
/***/
|
| 38099 |
/***/ (function(module, exports, __webpack_require__) {
|
| 38100 |
|
| 38101 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
|
@@ -38193,7 +38193,7 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
|
| 38193 |
|
| 38194 |
/***/ }),
|
| 38195 |
|
| 38196 |
-
/***/
|
| 38197 |
/***/ (function(module, exports, __webpack_require__) {
|
| 38198 |
|
| 38199 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* eslint-disable func-names */
|
|
@@ -38583,7 +38583,7 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* eslint-disabl
|
|
| 38583 |
|
| 38584 |
/***/ }),
|
| 38585 |
|
| 38586 |
-
/***/
|
| 38587 |
/***/ (function(module, exports, __webpack_require__) {
|
| 38588 |
|
| 38589 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* eslint-disable func-names */
|
|
@@ -38758,7 +38758,7 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* eslint-disabl
|
|
| 38758 |
|
| 38759 |
/***/ }),
|
| 38760 |
|
| 38761 |
-
/***/
|
| 38762 |
/***/ (function(module, exports, __webpack_require__) {
|
| 38763 |
|
| 38764 |
"use strict";
|
|
@@ -38879,7 +38879,7 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
|
|
| 38879 |
|
| 38880 |
/***/ }),
|
| 38881 |
|
| 38882 |
-
/***/
|
| 38883 |
/***/ (function(module, exports, __webpack_require__) {
|
| 38884 |
|
| 38885 |
"use strict";
|
|
@@ -38991,7 +38991,7 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
|
|
| 38991 |
|
| 38992 |
/***/ }),
|
| 38993 |
|
| 38994 |
-
/***/
|
| 38995 |
/***/ (function(module, exports, __webpack_require__) {
|
| 38996 |
|
| 38997 |
"use strict";
|
|
@@ -39129,7 +39129,7 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
|
|
| 39129 |
|
| 39130 |
/***/ }),
|
| 39131 |
|
| 39132 |
-
/***/
|
| 39133 |
/***/ (function(module, exports, __webpack_require__) {
|
| 39134 |
|
| 39135 |
"use strict";
|
|
@@ -39267,7 +39267,7 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
|
|
| 39267 |
|
| 39268 |
/***/ }),
|
| 39269 |
|
| 39270 |
-
/***/
|
| 39271 |
/***/ (function(module, exports, __webpack_require__) {
|
| 39272 |
|
| 39273 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* eslint-disable func-names */
|
|
@@ -39673,7 +39673,7 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* eslint-disabl
|
|
| 39673 |
|
| 39674 |
/***/ }),
|
| 39675 |
|
| 39676 |
-
/***/
|
| 39677 |
/***/ (function(module, exports, __webpack_require__) {
|
| 39678 |
|
| 39679 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* eslint-disable func-names */
|
|
@@ -40081,7 +40081,7 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* eslint-disabl
|
|
| 40081 |
|
| 40082 |
/***/ }),
|
| 40083 |
|
| 40084 |
-
/***/
|
| 40085 |
/***/ (function(module, exports, __webpack_require__) {
|
| 40086 |
|
| 40087 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* eslint-disable func-names */
|
|
@@ -40702,7 +40702,7 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* eslint-disabl
|
|
| 40702 |
|
| 40703 |
/***/ }),
|
| 40704 |
|
| 40705 |
-
/***/
|
| 40706 |
/***/ (function(module, exports, __webpack_require__) {
|
| 40707 |
|
| 40708 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* eslint-disable func-names */
|
|
@@ -41022,4 +41022,4 @@ module.exports = jQuery;
|
|
| 41022 |
|
| 41023 |
/***/ })
|
| 41024 |
|
| 41025 |
-
},[
|
| 18628 |
/***/ 39:
|
| 18629 |
/***/ (function(module, exports, __webpack_require__) {
|
| 18630 |
|
| 18631 |
+
/* WEBPACK VAR INJECTION */(function(global) {module.exports = global["Backbone"] = __webpack_require__(475);
|
| 18632 |
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
|
| 18633 |
|
| 18634 |
/***/ }),
|
| 19000 |
|
| 19001 |
/***/ }),
|
| 19002 |
|
| 19003 |
+
/***/ 472:
|
| 19004 |
/***/ (function(module, exports, __webpack_require__) {
|
| 19005 |
|
| 19006 |
"use strict";
|
| 19019 |
|
| 19020 |
var _mailpoet2 = _interopRequireDefault(_mailpoet);
|
| 19021 |
|
| 19022 |
+
var _html2canvas = __webpack_require__(473);
|
| 19023 |
|
| 19024 |
var _html2canvas2 = _interopRequireDefault(_html2canvas);
|
| 19025 |
|
| 19103 |
|
| 19104 |
/***/ }),
|
| 19105 |
|
| 19106 |
+
/***/ 473:
|
| 19107 |
/***/ (function(module, exports, __webpack_require__) {
|
| 19108 |
|
| 19109 |
+
/* WEBPACK VAR INJECTION */(function(global) {module.exports = global["html2canvas"] = __webpack_require__(474);
|
| 19110 |
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
|
| 19111 |
|
| 19112 |
/***/ }),
|
| 19113 |
|
| 19114 |
+
/***/ 474:
|
| 19115 |
/***/ (function(module, exports, __webpack_require__) {
|
| 19116 |
|
| 19117 |
/*!
|
| 26391 |
|
| 26392 |
/***/ }),
|
| 26393 |
|
| 26394 |
+
/***/ 475:
|
| 26395 |
/***/ (function(module, exports, __webpack_require__) {
|
| 26396 |
|
| 26397 |
/* WEBPACK VAR INJECTION */(function(global) {var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// Backbone.js 1.3.3
|
| 31060 |
|
| 31061 |
if (typeof module !== "undefined" && module.exports) {
|
| 31062 |
module.exports.saveAs = saveAs;
|
| 31063 |
+
} else if (("function" !== "undefined" && __webpack_require__(689) !== null) && (__webpack_require__(86) !== null)) {
|
| 31064 |
!(__WEBPACK_AMD_DEFINE_RESULT__ = (function() {
|
| 31065 |
return saveAs;
|
| 31066 |
}).call(exports, __webpack_require__, exports, module),
|
| 31493 |
|
| 31494 |
/***/ }),
|
| 31495 |
|
| 31496 |
+
/***/ 687:
|
| 31497 |
/***/ (function(module, exports, __webpack_require__) {
|
| 31498 |
|
| 31499 |
__webpack_require__(7);
|
| 31504 |
__webpack_require__(293);
|
| 31505 |
__webpack_require__(290);
|
| 31506 |
__webpack_require__(517);
|
| 31507 |
+
__webpack_require__(688);
|
| 31508 |
__webpack_require__(518);
|
| 31509 |
__webpack_require__(519);
|
|
|
|
|
|
|
|
|
|
| 31510 |
__webpack_require__(690);
|
| 31511 |
+
__webpack_require__(23);
|
| 31512 |
__webpack_require__(691);
|
| 31513 |
__webpack_require__(692);
|
| 31514 |
__webpack_require__(693);
|
| 31515 |
__webpack_require__(694);
|
|
|
|
|
|
|
| 31516 |
__webpack_require__(695);
|
| 31517 |
__webpack_require__(696);
|
| 31518 |
+
__webpack_require__(103);
|
| 31519 |
+
__webpack_require__(47);
|
| 31520 |
__webpack_require__(697);
|
| 31521 |
__webpack_require__(698);
|
| 31522 |
__webpack_require__(699);
|
| 31525 |
__webpack_require__(702);
|
| 31526 |
__webpack_require__(703);
|
| 31527 |
__webpack_require__(704);
|
|
|
|
| 31528 |
__webpack_require__(705);
|
|
|
|
| 31529 |
__webpack_require__(706);
|
| 31530 |
+
__webpack_require__(40);
|
| 31531 |
__webpack_require__(707);
|
| 31532 |
+
__webpack_require__(295);
|
| 31533 |
__webpack_require__(708);
|
| 31534 |
+
__webpack_require__(296);
|
| 31535 |
__webpack_require__(709);
|
| 31536 |
__webpack_require__(710);
|
| 31537 |
__webpack_require__(711);
|
| 31538 |
__webpack_require__(712);
|
| 31539 |
__webpack_require__(713);
|
| 31540 |
+
__webpack_require__(714);
|
| 31541 |
+
__webpack_require__(715);
|
| 31542 |
+
module.exports = __webpack_require__(716);
|
| 31543 |
|
| 31544 |
|
| 31545 |
/***/ }),
|
| 31546 |
|
| 31547 |
+
/***/ 688:
|
| 31548 |
/***/ (function(module, exports) {
|
| 31549 |
|
| 31550 |
// Generated by CoffeeScript 1.9.2
|
| 31815 |
|
| 31816 |
/***/ }),
|
| 31817 |
|
| 31818 |
+
/***/ 689:
|
| 31819 |
/***/ (function(module, exports) {
|
| 31820 |
|
| 31821 |
module.exports = function() {
|
| 31825 |
|
| 31826 |
/***/ }),
|
| 31827 |
|
| 31828 |
+
/***/ 690:
|
| 31829 |
/***/ (function(module, exports, __webpack_require__) {
|
| 31830 |
|
| 31831 |
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*** IMPORTS FROM imports-loader ***/
|
| 35725 |
|
| 35726 |
/***/ }),
|
| 35727 |
|
| 35728 |
+
/***/ 691:
|
| 35729 |
/***/ (function(module, exports, __webpack_require__) {
|
| 35730 |
|
| 35731 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 35776 |
|
| 35777 |
/***/ }),
|
| 35778 |
|
| 35779 |
+
/***/ 692:
|
| 35780 |
/***/ (function(module, exports, __webpack_require__) {
|
| 35781 |
|
| 35782 |
"use strict";
|
| 35877 |
|
| 35878 |
/***/ }),
|
| 35879 |
|
| 35880 |
+
/***/ 693:
|
| 35881 |
/***/ (function(module, exports, __webpack_require__) {
|
| 35882 |
|
| 35883 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* eslint-disable func-names */
|
| 36274 |
|
| 36275 |
/***/ }),
|
| 36276 |
|
| 36277 |
+
/***/ 694:
|
| 36278 |
/***/ (function(module, exports, __webpack_require__) {
|
| 36279 |
|
| 36280 |
"use strict";
|
| 36389 |
|
| 36390 |
/***/ }),
|
| 36391 |
|
| 36392 |
+
/***/ 695:
|
| 36393 |
/***/ (function(module, exports, __webpack_require__) {
|
| 36394 |
|
| 36395 |
"use strict";
|
| 36443 |
|
| 36444 |
/***/ }),
|
| 36445 |
|
| 36446 |
+
/***/ 696:
|
| 36447 |
/***/ (function(module, exports, __webpack_require__) {
|
| 36448 |
|
| 36449 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* eslint-disable func-names */
|
| 36457 |
__webpack_require__(9),
|
| 36458 |
__webpack_require__(518),
|
| 36459 |
__webpack_require__(519),
|
| 36460 |
+
__webpack_require__(472),
|
| 36461 |
__webpack_require__(7),
|
| 36462 |
__webpack_require__(9)
|
| 36463 |
], __WEBPACK_AMD_DEFINE_RESULT__ = (function (
|
| 36816 |
|
| 36817 |
/***/ }),
|
| 36818 |
|
| 36819 |
+
/***/ 697:
|
| 36820 |
/***/ (function(module, exports, __webpack_require__) {
|
| 36821 |
|
| 36822 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
| 36871 |
|
| 36872 |
/***/ }),
|
| 36873 |
|
| 36874 |
+
/***/ 698:
|
| 36875 |
/***/ (function(module, exports, __webpack_require__) {
|
| 36876 |
|
| 36877 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* eslint-disable func-names */
|
| 37364 |
|
| 37365 |
/***/ }),
|
| 37366 |
|
| 37367 |
+
/***/ 699:
|
| 37368 |
/***/ (function(module, exports, __webpack_require__) {
|
| 37369 |
|
| 37370 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
| 37521 |
|
| 37522 |
/***/ }),
|
| 37523 |
|
| 37524 |
+
/***/ 7:
|
| 37525 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 37526 |
+
|
| 37527 |
+
/* WEBPACK VAR INJECTION */(function(global) {module.exports = global["_"] = __webpack_require__(104);
|
| 37528 |
+
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
|
| 37529 |
+
|
| 37530 |
+
/***/ }),
|
| 37531 |
+
|
| 37532 |
+
/***/ 700:
|
| 37533 |
/***/ (function(module, exports, __webpack_require__) {
|
| 37534 |
|
| 37535 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
| 37563 |
|
| 37564 |
/***/ }),
|
| 37565 |
|
| 37566 |
+
/***/ 701:
|
| 37567 |
/***/ (function(module, exports, __webpack_require__) {
|
| 37568 |
|
| 37569 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
| 37597 |
|
| 37598 |
/***/ }),
|
| 37599 |
|
| 37600 |
+
/***/ 702:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37601 |
/***/ (function(module, exports, __webpack_require__) {
|
| 37602 |
|
| 37603 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* eslint-disable func-names */
|
| 37918 |
|
| 37919 |
/***/ }),
|
| 37920 |
|
| 37921 |
+
/***/ 703:
|
| 37922 |
/***/ (function(module, exports, __webpack_require__) {
|
| 37923 |
|
| 37924 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
| 38006 |
|
| 38007 |
/***/ }),
|
| 38008 |
|
| 38009 |
+
/***/ 704:
|
| 38010 |
/***/ (function(module, exports, __webpack_require__) {
|
| 38011 |
|
| 38012 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
| 38055 |
|
| 38056 |
/***/ }),
|
| 38057 |
|
| 38058 |
+
/***/ 705:
|
| 38059 |
/***/ (function(module, exports, __webpack_require__) {
|
| 38060 |
|
| 38061 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
| 38095 |
|
| 38096 |
/***/ }),
|
| 38097 |
|
| 38098 |
+
/***/ 706:
|
| 38099 |
/***/ (function(module, exports, __webpack_require__) {
|
| 38100 |
|
| 38101 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
| 38193 |
|
| 38194 |
/***/ }),
|
| 38195 |
|
| 38196 |
+
/***/ 707:
|
| 38197 |
/***/ (function(module, exports, __webpack_require__) {
|
| 38198 |
|
| 38199 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* eslint-disable func-names */
|
| 38583 |
|
| 38584 |
/***/ }),
|
| 38585 |
|
| 38586 |
+
/***/ 708:
|
| 38587 |
/***/ (function(module, exports, __webpack_require__) {
|
| 38588 |
|
| 38589 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* eslint-disable func-names */
|
| 38758 |
|
| 38759 |
/***/ }),
|
| 38760 |
|
| 38761 |
+
/***/ 709:
|
| 38762 |
/***/ (function(module, exports, __webpack_require__) {
|
| 38763 |
|
| 38764 |
"use strict";
|
| 38879 |
|
| 38880 |
/***/ }),
|
| 38881 |
|
| 38882 |
+
/***/ 710:
|
| 38883 |
/***/ (function(module, exports, __webpack_require__) {
|
| 38884 |
|
| 38885 |
"use strict";
|
| 38991 |
|
| 38992 |
/***/ }),
|
| 38993 |
|
| 38994 |
+
/***/ 711:
|
| 38995 |
/***/ (function(module, exports, __webpack_require__) {
|
| 38996 |
|
| 38997 |
"use strict";
|
| 39129 |
|
| 39130 |
/***/ }),
|
| 39131 |
|
| 39132 |
+
/***/ 712:
|
| 39133 |
/***/ (function(module, exports, __webpack_require__) {
|
| 39134 |
|
| 39135 |
"use strict";
|
| 39267 |
|
| 39268 |
/***/ }),
|
| 39269 |
|
| 39270 |
+
/***/ 713:
|
| 39271 |
/***/ (function(module, exports, __webpack_require__) {
|
| 39272 |
|
| 39273 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* eslint-disable func-names */
|
| 39673 |
|
| 39674 |
/***/ }),
|
| 39675 |
|
| 39676 |
+
/***/ 714:
|
| 39677 |
/***/ (function(module, exports, __webpack_require__) {
|
| 39678 |
|
| 39679 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* eslint-disable func-names */
|
| 40081 |
|
| 40082 |
/***/ }),
|
| 40083 |
|
| 40084 |
+
/***/ 715:
|
| 40085 |
/***/ (function(module, exports, __webpack_require__) {
|
| 40086 |
|
| 40087 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* eslint-disable func-names */
|
| 40702 |
|
| 40703 |
/***/ }),
|
| 40704 |
|
| 40705 |
+
/***/ 716:
|
| 40706 |
/***/ (function(module, exports, __webpack_require__) {
|
| 40707 |
|
| 40708 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* eslint-disable func-names */
|
| 41022 |
|
| 41023 |
/***/ })
|
| 41024 |
|
| 41025 |
+
},[687]);
|
assets/js/{vendor.eaab3da3.js → vendor.f5731029.js}
RENAMED
|
File without changes
|
lang/mailpoet-ca.mo
CHANGED
|
Binary file
|
lang/mailpoet-da_DK.mo
CHANGED
|
Binary file
|
lang/mailpoet-de_DE.mo
CHANGED
|
Binary file
|
lang/mailpoet-es_ES.mo
CHANGED
|
Binary file
|
lang/mailpoet-fa_IR.mo
CHANGED
|
Binary file
|
lang/mailpoet-fr_CA.mo
CHANGED
|
Binary file
|
lang/mailpoet-fr_FR.mo
CHANGED
|
Binary file
|
lang/mailpoet-it_IT.mo
CHANGED
|
Binary file
|
lang/mailpoet-ja.mo
CHANGED
|
Binary file
|
lang/mailpoet-nl_NL.mo
CHANGED
|
Binary file
|
lang/mailpoet-pl_PL.mo
CHANGED
|
Binary file
|
lang/mailpoet-pt_BR.mo
CHANGED
|
Binary file
|
lang/mailpoet-pt_PT.mo
CHANGED
|
Binary file
|
lang/mailpoet-ru_RU.mo
CHANGED
|
Binary file
|
lang/mailpoet-sq.mo
CHANGED
|
Binary file
|
lang/mailpoet-sv_SE.mo
CHANGED
|
Binary file
|
lang/mailpoet-tr_TR.mo
CHANGED
|
Binary file
|
lang/mailpoet-zh_CN.mo
CHANGED
|
Binary file
|
lang/mailpoet.pot
CHANGED
|
@@ -4,7 +4,7 @@ msgid ""
|
|
| 4 |
msgstr ""
|
| 5 |
"Project-Id-Version: \n"
|
| 6 |
"Report-Msgid-Bugs-To: http://support.mailpoet.com/\n"
|
| 7 |
-
"POT-Creation-Date: 2018-10-
|
| 8 |
"MIME-Version: 1.0\n"
|
| 9 |
"Content-Type: text/plain; charset=utf-8\n"
|
| 10 |
"Content-Transfer-Encoding: 8bit\n"
|
|
@@ -75,7 +75,7 @@ msgid "New form"
|
|
| 75 |
msgstr ""
|
| 76 |
|
| 77 |
#: lib/API/JSON/v1/Forms.php:70 lib/API/JSON/v1/Forms.php:74
|
| 78 |
-
#: lib/API/MP/v1/API.php:
|
| 79 |
#: lib/Subscribers/ImportExport/ImportExportFactory.php:44
|
| 80 |
#: lib/Subscribers/ImportExport/PersonalDataExporters/SubscriberExporter.php:40
|
| 81 |
#: views/help.html:64 views/newsletter/editor.html:963
|
|
@@ -132,8 +132,8 @@ msgstr ""
|
|
| 132 |
|
| 133 |
#: lib/API/JSON/v1/Segments.php:24 lib/API/JSON/v1/Segments.php:75
|
| 134 |
#: lib/API/JSON/v1/Segments.php:91 lib/API/JSON/v1/Segments.php:107
|
| 135 |
-
#: lib/API/JSON/v1/Segments.php:121 lib/API/MP/v1/API.php:
|
| 136 |
-
#: lib/API/MP/v1/API.php:
|
| 137 |
msgid "This list does not exist."
|
| 138 |
msgstr ""
|
| 139 |
|
|
@@ -213,7 +213,7 @@ msgstr ""
|
|
| 213 |
|
| 214 |
#: lib/API/JSON/v1/Subscribers.php:37 lib/API/JSON/v1/Subscribers.php:222
|
| 215 |
#: lib/API/JSON/v1/Subscribers.php:238 lib/API/JSON/v1/Subscribers.php:254
|
| 216 |
-
#: lib/API/MP/v1/API.php:
|
| 217 |
msgid "This subscriber does not exist."
|
| 218 |
msgstr ""
|
| 219 |
|
|
@@ -241,43 +241,43 @@ msgstr ""
|
|
| 241 |
msgid "You need to wait %d seconds before subscribing again."
|
| 242 |
msgstr ""
|
| 243 |
|
| 244 |
-
#: lib/API/MP/v1/API.php:
|
| 245 |
#: lib/Subscribers/ImportExport/ImportExportFactory.php:45
|
| 246 |
-
#: lib/Subscription/Pages.php:
|
| 247 |
-
#: views/form/editor.html:
|
| 248 |
msgid "First name"
|
| 249 |
msgstr ""
|
| 250 |
|
| 251 |
-
#: lib/API/MP/v1/API.php:
|
| 252 |
#: lib/Subscribers/ImportExport/ImportExportFactory.php:46
|
| 253 |
-
#: lib/Subscription/Pages.php:
|
| 254 |
-
#: views/form/editor.html:
|
| 255 |
msgid "Last name"
|
| 256 |
msgstr ""
|
| 257 |
|
| 258 |
-
#: lib/API/MP/v1/API.php:
|
| 259 |
msgid "At least one segment ID is required."
|
| 260 |
msgstr ""
|
| 261 |
|
| 262 |
-
#: lib/API/MP/v1/API.php:
|
| 263 |
msgid "List with ID %s does not exist."
|
| 264 |
msgid_plural "Lists with IDs %s do not exist."
|
| 265 |
msgstr[0] ""
|
| 266 |
msgstr[1] ""
|
| 267 |
|
| 268 |
-
#: lib/API/MP/v1/API.php:
|
| 269 |
msgid "Subscriber email address is required."
|
| 270 |
msgstr ""
|
| 271 |
|
| 272 |
-
#: lib/API/MP/v1/API.php:
|
| 273 |
msgid "This subscriber already exists."
|
| 274 |
msgstr ""
|
| 275 |
|
| 276 |
-
#: lib/API/MP/v1/API.php:
|
| 277 |
msgid "List name is required."
|
| 278 |
msgstr ""
|
| 279 |
|
| 280 |
-
#: lib/API/MP/v1/API.php:
|
| 281 |
msgid "This list already exists."
|
| 282 |
msgstr ""
|
| 283 |
|
|
@@ -305,8 +305,8 @@ msgstr ""
|
|
| 305 |
msgid "Manage segments"
|
| 306 |
msgstr ""
|
| 307 |
|
| 308 |
-
#: lib/Config/Capabilities.php:67 lib/Config/Menu.php:
|
| 309 |
-
#: lib/Config/PrivacyPolicy.php:11 views/premium.html:
|
| 310 |
msgid "MailPoet"
|
| 311 |
msgstr ""
|
| 312 |
|
|
@@ -478,72 +478,72 @@ msgstr ""
|
|
| 478 |
msgid "Migration"
|
| 479 |
msgstr ""
|
| 480 |
|
| 481 |
-
#: lib/Config/Menu.php:
|
| 482 |
msgid "In any WordPress role"
|
| 483 |
msgstr ""
|
| 484 |
|
| 485 |
-
#: lib/Config/Menu.php:
|
| 486 |
msgid "WooCommerce"
|
| 487 |
msgstr ""
|
| 488 |
|
| 489 |
-
#: lib/Config/Menu.php:
|
| 490 |
msgid ""
|
| 491 |
"Automatically send an email when there is a new WooCommerce product, order "
|
| 492 |
"and some other action takes place."
|
| 493 |
msgstr ""
|
| 494 |
|
| 495 |
-
#: lib/Config/Menu.php:
|
| 496 |
msgid "Abandoned Shopping Cart"
|
| 497 |
msgstr ""
|
| 498 |
|
| 499 |
-
#: lib/Config/Menu.php:
|
| 500 |
msgid ""
|
| 501 |
"Send an email to logged-in visitors who have items in their shopping carts "
|
| 502 |
"but left your website without checking out. Can convert up to 5% of "
|
| 503 |
"abandoned carts."
|
| 504 |
msgstr ""
|
| 505 |
|
| 506 |
-
#: lib/Config/Menu.php:
|
| 507 |
msgid "Must-have"
|
| 508 |
msgstr ""
|
| 509 |
|
| 510 |
-
#: lib/Config/Menu.php:
|
| 511 |
msgid "Big Spender"
|
| 512 |
msgstr ""
|
| 513 |
|
| 514 |
-
#: lib/Config/Menu.php:
|
| 515 |
msgid ""
|
| 516 |
"Let MailPoet send an email to customers who have spent a certain amount to "
|
| 517 |
"thank them, possibly with a coupon."
|
| 518 |
msgstr ""
|
| 519 |
|
| 520 |
-
#: lib/Config/Menu.php:
|
| 521 |
msgid "Smart to have"
|
| 522 |
msgstr ""
|
| 523 |
|
| 524 |
-
#: lib/Config/Menu.php:
|
| 525 |
msgid "First Purchase"
|
| 526 |
msgstr ""
|
| 527 |
|
| 528 |
-
#: lib/Config/Menu.php:
|
| 529 |
msgid "Let MailPoet send an email to customers who make their first purchase."
|
| 530 |
msgstr ""
|
| 531 |
|
| 532 |
-
#: lib/Config/Menu.php:
|
| 533 |
msgid "Purchased In This Category"
|
| 534 |
msgstr ""
|
| 535 |
|
| 536 |
-
#: lib/Config/Menu.php:
|
| 537 |
msgid ""
|
| 538 |
"Let MailPoet send an email to customers who purchase a product from a "
|
| 539 |
"specific category."
|
| 540 |
msgstr ""
|
| 541 |
|
| 542 |
-
#: lib/Config/Menu.php:
|
| 543 |
msgid "Purchased This Product"
|
| 544 |
msgstr ""
|
| 545 |
|
| 546 |
-
#: lib/Config/Menu.php:
|
| 547 |
msgid "Let MailPoet send an email to customers who purchase a specific product."
|
| 548 |
msgstr ""
|
| 549 |
|
|
@@ -574,11 +574,11 @@ msgid ""
|
|
| 574 |
"might work within a MultiSite environment, we don’t support it."
|
| 575 |
msgstr ""
|
| 576 |
|
| 577 |
-
#: lib/Config/Populator.php:
|
| 578 |
msgid "My First List"
|
| 579 |
msgstr ""
|
| 580 |
|
| 581 |
-
#: lib/Config/Populator.php:
|
| 582 |
msgid "This list is automatically created when you install MailPoet."
|
| 583 |
msgstr ""
|
| 584 |
|
|
@@ -1432,7 +1432,7 @@ msgstr ""
|
|
| 1432 |
|
| 1433 |
#: lib/Models/CustomField.php:20 lib/Models/Form.php:13
|
| 1434 |
#: lib/Models/NewsletterOptionField.php:12 lib/Models/NewsletterTemplate.php:16
|
| 1435 |
-
#: lib/Models/Segment.php:15 lib/Models/Setting.php:
|
| 1436 |
#: views/form/templates/settings/field_form.hbs:53
|
| 1437 |
#: views/subscribers/importExport/import/step2.html:134
|
| 1438 |
msgid "Please specify a name."
|
|
@@ -1444,12 +1444,12 @@ msgid "Please specify a type."
|
|
| 1444 |
msgstr ""
|
| 1445 |
|
| 1446 |
#: lib/Models/Form.php:93 lib/Models/Newsletter.php:732
|
| 1447 |
-
#: lib/Models/Segment.php:133 lib/Models/Subscriber.php:
|
| 1448 |
msgid "All"
|
| 1449 |
msgstr ""
|
| 1450 |
|
| 1451 |
#: lib/Models/Form.php:98 lib/Models/Newsletter.php:803
|
| 1452 |
-
#: lib/Models/Segment.php:138 lib/Models/Subscriber.php:
|
| 1453 |
#: views/newsletters.html:91 views/segments.html:50
|
| 1454 |
#: views/subscribers/subscribers.html:38
|
| 1455 |
msgid "Trash"
|
|
@@ -1464,7 +1464,7 @@ msgstr ""
|
|
| 1464 |
msgid "Deleted list"
|
| 1465 |
msgstr ""
|
| 1466 |
|
| 1467 |
-
#: lib/Models/Newsletter.php:628 lib/Models/Subscriber.php:
|
| 1468 |
msgid "All Lists"
|
| 1469 |
msgstr ""
|
| 1470 |
|
|
@@ -1518,11 +1518,11 @@ msgstr ""
|
|
| 1518 |
msgid "Rendered newsletter body is invalid!"
|
| 1519 |
msgstr ""
|
| 1520 |
|
| 1521 |
-
#: lib/Models/Setting.php:
|
| 1522 |
msgid "Confirm your subscription to %1$s"
|
| 1523 |
msgstr ""
|
| 1524 |
|
| 1525 |
-
#: lib/Models/Setting.php:
|
| 1526 |
msgid ""
|
| 1527 |
"Hello!\n"
|
| 1528 |
"\n"
|
|
@@ -1538,34 +1538,34 @@ msgid ""
|
|
| 1538 |
"The Team"
|
| 1539 |
msgstr ""
|
| 1540 |
|
| 1541 |
-
#: lib/Models/Subscriber.php:
|
| 1542 |
msgid "Please enter your email address"
|
| 1543 |
msgstr ""
|
| 1544 |
|
| 1545 |
-
#: lib/Models/Subscriber.php:
|
| 1546 |
msgid "Your email address is invalid!"
|
| 1547 |
msgstr ""
|
| 1548 |
|
| 1549 |
-
#: lib/Models/Subscriber.php:
|
| 1550 |
msgid "Subscribers without a list (%s)"
|
| 1551 |
msgstr ""
|
| 1552 |
|
| 1553 |
-
#: lib/Models/Subscriber.php:
|
| 1554 |
#: views/segments.html:30 views/subscribers/subscribers.html:57
|
| 1555 |
msgid "Subscribed"
|
| 1556 |
msgstr ""
|
| 1557 |
|
| 1558 |
-
#: lib/Models/Subscriber.php:
|
| 1559 |
#: views/subscribers/subscribers.html:56
|
| 1560 |
msgid "Unconfirmed"
|
| 1561 |
msgstr ""
|
| 1562 |
|
| 1563 |
-
#: lib/Models/Subscriber.php:
|
| 1564 |
#: views/segments.html:32 views/subscribers/subscribers.html:58
|
| 1565 |
msgid "Unsubscribed"
|
| 1566 |
msgstr ""
|
| 1567 |
|
| 1568 |
-
#: lib/Models/Subscriber.php:
|
| 1569 |
#: views/segments.html:33 views/subscribers/subscribers.html:59
|
| 1570 |
msgid "Bounced"
|
| 1571 |
msgstr ""
|
|
@@ -1690,7 +1690,7 @@ msgid "Invalid router endpoint action"
|
|
| 1690 |
msgstr ""
|
| 1691 |
|
| 1692 |
#: lib/Settings/Pages.php:12 lib/Settings/Pages.php:13
|
| 1693 |
-
#: lib/Settings/Pages.php:37 lib/Subscription/Pages.php:
|
| 1694 |
msgid "MailPoet Page"
|
| 1695 |
msgstr ""
|
| 1696 |
|
|
@@ -1832,10 +1832,10 @@ msgstr ""
|
|
| 1832 |
#: views/newsletter/templates/blocks/posts/settingsDisplayOptions.hbs:151
|
| 1833 |
#: views/newsletter/templates/blocks/posts/settingsDisplayOptions.hbs:177
|
| 1834 |
#: views/newsletter/templates/blocks/posts/settingsDisplayOptions.hbs:239
|
| 1835 |
-
#: views/premium.html:
|
| 1836 |
#: views/settings/advanced.html:193 views/settings/advanced.html:233
|
| 1837 |
-
#: views/settings/
|
| 1838 |
-
#: views/settings/signup.html:46
|
| 1839 |
#: views/subscribers/importExport/import/step2.html:67
|
| 1840 |
msgid "No"
|
| 1841 |
msgstr ""
|
|
@@ -1865,7 +1865,7 @@ msgid "MailPoet Mailing Lists"
|
|
| 1865 |
msgstr ""
|
| 1866 |
|
| 1867 |
#: lib/Subscribers/ImportExport/PersonalDataExporters/SubscriberExporter.php:44
|
| 1868 |
-
#: lib/Subscription/Pages.php:
|
| 1869 |
#: views/subscribers/subscribers.html:55 views/subscribers/subscribers.html:67
|
| 1870 |
msgid "Status"
|
| 1871 |
msgstr ""
|
|
@@ -1910,73 +1910,77 @@ msgstr ""
|
|
| 1910 |
msgid "Unknown"
|
| 1911 |
msgstr ""
|
| 1912 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1913 |
#: lib/Subscription/Comment.php:23 lib/Subscription/Registration.php:11
|
| 1914 |
msgid "Yes, please add me to your mailing list."
|
| 1915 |
msgstr ""
|
| 1916 |
|
| 1917 |
-
#: lib/Subscription/Pages.php:
|
| 1918 |
msgid "Hmmm... we don't have a record of you."
|
| 1919 |
msgstr ""
|
| 1920 |
|
| 1921 |
-
#: lib/Subscription/Pages.php:
|
| 1922 |
msgid ""
|
| 1923 |
"Your email address doesn't appear in our lists anymore. Sign up again or "
|
| 1924 |
"contact us if this appears to be a mistake."
|
| 1925 |
msgstr ""
|
| 1926 |
|
| 1927 |
-
#: lib/Subscription/Pages.php:
|
| 1928 |
msgid "You have subscribed to: %s"
|
| 1929 |
msgstr ""
|
| 1930 |
|
| 1931 |
-
#: lib/Subscription/Pages.php:
|
| 1932 |
msgid "You are now subscribed!"
|
| 1933 |
msgstr ""
|
| 1934 |
|
| 1935 |
-
#: lib/Subscription/Pages.php:
|
| 1936 |
msgid "Manage your subscription"
|
| 1937 |
msgstr ""
|
| 1938 |
|
| 1939 |
-
#: lib/Subscription/Pages.php:
|
| 1940 |
msgid "You are now unsubscribed."
|
| 1941 |
msgstr ""
|
| 1942 |
|
| 1943 |
-
#: lib/Subscription/Pages.php:
|
| 1944 |
msgid "Yup, we've added you to our email list. You'll hear from us shortly."
|
| 1945 |
msgstr ""
|
| 1946 |
|
| 1947 |
-
#: lib/Subscription/Pages.php:
|
| 1948 |
msgid "Subscription management form is only available to mailing lists subscribers."
|
| 1949 |
msgstr ""
|
| 1950 |
|
| 1951 |
-
#: lib/Subscription/Pages.php:
|
| 1952 |
msgid "Your lists"
|
| 1953 |
msgstr ""
|
| 1954 |
|
| 1955 |
-
#: lib/Subscription/Pages.php:
|
| 1956 |
-
#: views/form/editor.html:
|
| 1957 |
#: views/segments.html:56 views/subscribers/subscribers.html:98
|
| 1958 |
msgid "Save"
|
| 1959 |
msgstr ""
|
| 1960 |
|
| 1961 |
-
#: lib/Subscription/Pages.php:
|
| 1962 |
msgid "[link]Edit your profile[/link] to update your email."
|
| 1963 |
msgstr ""
|
| 1964 |
|
| 1965 |
-
#: lib/Subscription/Pages.php:
|
| 1966 |
msgid "[link]Log in to your account[/link] to update your email."
|
| 1967 |
msgstr ""
|
| 1968 |
|
| 1969 |
-
#: lib/Subscription/Pages.php:
|
| 1970 |
msgid ""
|
| 1971 |
"Need to change your email address? Unsubscribe here, then simply sign up "
|
| 1972 |
"again."
|
| 1973 |
msgstr ""
|
| 1974 |
|
| 1975 |
-
#: lib/Subscription/Pages.php:
|
| 1976 |
msgid "Accidentally unsubscribed?"
|
| 1977 |
msgstr ""
|
| 1978 |
|
| 1979 |
-
#: lib/Subscription/Pages.php:
|
| 1980 |
msgid ""
|
| 1981 |
"Link to subscription management page is only available to mailing lists "
|
| 1982 |
"subscribers."
|
|
@@ -2004,7 +2008,15 @@ msgid ""
|
|
| 2004 |
"this [link]checklist[/link]."
|
| 2005 |
msgstr ""
|
| 2006 |
|
| 2007 |
-
#: lib/Util/Notices/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2008 |
msgid ""
|
| 2009 |
"Your website is running on PHP %s. MailPoet requires version 5.6. Please "
|
| 2010 |
"consider upgrading your site's PHP version. [link]Your host can help "
|
|
@@ -2044,6 +2056,22 @@ msgstr ""
|
|
| 2044 |
msgid "Close this window and deactivate MailPoet"
|
| 2045 |
msgstr ""
|
| 2046 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2047 |
#: views/form/editor.html:5
|
| 2048 |
msgid "Form"
|
| 2049 |
msgstr ""
|
|
@@ -2115,66 +2143,72 @@ msgstr ""
|
|
| 2115 |
msgid "Preview"
|
| 2116 |
msgstr ""
|
| 2117 |
|
| 2118 |
-
#: views/form/editor.html:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2119 |
#: views/newsletter/templates/blocks/divider/widget.hbs:4
|
| 2120 |
msgid "Divider"
|
| 2121 |
msgstr ""
|
| 2122 |
|
| 2123 |
-
#: views/form/editor.html:
|
| 2124 |
msgid "List selection"
|
| 2125 |
msgstr ""
|
| 2126 |
|
| 2127 |
-
#: views/form/editor.html:
|
| 2128 |
msgid "Select list(s):"
|
| 2129 |
msgstr ""
|
| 2130 |
|
| 2131 |
-
#: views/form/editor.html:
|
| 2132 |
msgid "Custom text or HTML"
|
| 2133 |
msgstr ""
|
| 2134 |
|
| 2135 |
-
#: views/form/editor.html:
|
| 2136 |
msgid ""
|
| 2137 |
"Subscribe to our newsletter and join [mailpoet_subscribers_count] other "
|
| 2138 |
"subscribers."
|
| 2139 |
msgstr ""
|
| 2140 |
|
| 2141 |
-
#: views/form/editor.html:
|
| 2142 |
msgid "Edit name"
|
| 2143 |
msgstr ""
|
| 2144 |
|
| 2145 |
-
#: views/form/editor.html:
|
| 2146 |
msgid "The form name was successfully updated!"
|
| 2147 |
msgstr ""
|
| 2148 |
|
| 2149 |
-
#: views/form/editor.html:
|
| 2150 |
msgid "Form preview"
|
| 2151 |
msgstr ""
|
| 2152 |
|
| 2153 |
-
#: views/form/editor.html:
|
| 2154 |
msgid "Saved! The changes are now active in your widget."
|
| 2155 |
msgstr ""
|
| 2156 |
|
| 2157 |
-
#: views/form/editor.html:
|
| 2158 |
msgid "Saved! Add this form to %1$sa widget%2$s."
|
| 2159 |
msgstr ""
|
| 2160 |
|
| 2161 |
-
#: views/form/editor.html:
|
| 2162 |
msgid "Add new field"
|
| 2163 |
msgstr ""
|
| 2164 |
|
| 2165 |
-
#: views/form/editor.html:
|
| 2166 |
msgid "Edit field"
|
| 2167 |
msgstr ""
|
| 2168 |
|
| 2169 |
-
#: views/form/editor.html:
|
| 2170 |
msgid "This field will be deleted for all your subscribers. Are you sure?"
|
| 2171 |
msgstr ""
|
| 2172 |
|
| 2173 |
-
#: views/form/editor.html:
|
| 2174 |
msgid "Removed custom field %$1s"
|
| 2175 |
msgstr ""
|
| 2176 |
|
| 2177 |
-
#: views/form/editor.html:
|
| 2178 |
msgid "Edit field settings"
|
| 2179 |
msgstr ""
|
| 2180 |
|
|
@@ -2212,9 +2246,10 @@ msgstr ""
|
|
| 2212 |
#: views/newsletter/templates/blocks/automatedLatestContentLayout/settings.hbs:293
|
| 2213 |
#: views/newsletter/templates/blocks/posts/settingsDisplayOptions.hbs:79
|
| 2214 |
#: views/newsletter/templates/blocks/posts/settingsDisplayOptions.hbs:233
|
| 2215 |
-
#: views/premium.html:
|
| 2216 |
#: views/settings/advanced.html:182 views/settings/advanced.html:222
|
| 2217 |
-
#: views/settings/
|
|
|
|
| 2218 |
#: views/subscribers/importExport/import/step2.html:63
|
| 2219 |
msgid "Yes"
|
| 2220 |
msgstr ""
|
|
@@ -3211,7 +3246,7 @@ msgstr ""
|
|
| 3211 |
#: views/newsletter/templates/blocks/automatedLatestContent/settings.hbs:154
|
| 3212 |
#: views/newsletter/templates/blocks/automatedLatestContentLayout/settings.hbs:166
|
| 3213 |
#: views/newsletter/templates/blocks/posts/settingsDisplayOptions.hbs:123
|
| 3214 |
-
#: views/premium.html:
|
| 3215 |
msgid "None"
|
| 3216 |
msgstr ""
|
| 3217 |
|
|
@@ -4415,30 +4450,42 @@ msgid ""
|
|
| 4415 |
"the extra touch."
|
| 4416 |
msgstr ""
|
| 4417 |
|
| 4418 |
-
#: views/premium.html:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4419 |
msgid "What is MailPoet Premium?"
|
| 4420 |
msgstr ""
|
| 4421 |
|
| 4422 |
-
#: views/premium.html:
|
| 4423 |
msgid "Check out the brief video below. Or, keep reading!"
|
| 4424 |
msgstr ""
|
| 4425 |
|
| 4426 |
-
#: views/premium.html:
|
| 4427 |
msgid "Insightful Statistics"
|
| 4428 |
msgstr ""
|
| 4429 |
|
| 4430 |
-
#: views/premium.html:
|
| 4431 |
msgid ""
|
| 4432 |
"Which links get the most clicks? Which subscribers opened your emails? With "
|
| 4433 |
"MailPoet's stats program, it's easy to find out. Need even more details? "
|
| 4434 |
"Integrating with Google Analytics is as easy as 1-2-3."
|
| 4435 |
msgstr ""
|
| 4436 |
|
| 4437 |
-
#: views/premium.html:
|
| 4438 |
msgid "Hello Inbox, Goodbye Spambox!"
|
| 4439 |
msgstr ""
|
| 4440 |
|
| 4441 |
-
#: views/premium.html:
|
| 4442 |
msgid ""
|
| 4443 |
"Having issues with reaching your subscribers? Always ending up in the spam "
|
| 4444 |
"box? Don't panic! You're not alone - over a quarter of our plugin users "
|
|
@@ -4446,75 +4493,75 @@ msgid ""
|
|
| 4446 |
"host. Instead, try using the new MailPoet Sending Service."
|
| 4447 |
msgstr ""
|
| 4448 |
|
| 4449 |
-
#: views/premium.html:
|
| 4450 |
msgid "Web host"
|
| 4451 |
msgstr ""
|
| 4452 |
|
| 4453 |
-
#: views/premium.html:
|
| 4454 |
msgid "Third party"
|
| 4455 |
msgstr ""
|
| 4456 |
|
| 4457 |
-
#: views/premium.html:
|
| 4458 |
msgid "Speed"
|
| 4459 |
msgstr ""
|
| 4460 |
|
| 4461 |
-
#: views/premium.html:
|
| 4462 |
msgid "50,000 / hour"
|
| 4463 |
msgstr ""
|
| 4464 |
|
| 4465 |
-
#: views/premium.html:
|
| 4466 |
msgid "300 / hour"
|
| 4467 |
msgstr ""
|
| 4468 |
|
| 4469 |
-
#: views/premium.html:
|
| 4470 |
msgid "2,000 / hour"
|
| 4471 |
msgstr ""
|
| 4472 |
|
| 4473 |
-
#: views/premium.html:
|
| 4474 |
msgid "Daily email limits"
|
| 4475 |
msgstr ""
|
| 4476 |
|
| 4477 |
-
#: views/premium.html:
|
| 4478 |
msgid "Depends"
|
| 4479 |
msgstr ""
|
| 4480 |
|
| 4481 |
-
#: views/premium.html:
|
| 4482 |
msgid "Personal deliverability support"
|
| 4483 |
msgstr ""
|
| 4484 |
|
| 4485 |
-
#: views/premium.html:
|
| 4486 |
msgid "Yes!"
|
| 4487 |
msgstr ""
|
| 4488 |
|
| 4489 |
-
#: views/premium.html:
|
| 4490 |
msgid "SPF and DKIM Signatures"
|
| 4491 |
msgstr ""
|
| 4492 |
|
| 4493 |
-
#: views/premium.html:
|
| 4494 |
msgid "No need!"
|
| 4495 |
msgstr ""
|
| 4496 |
|
| 4497 |
-
#: views/premium.html:
|
| 4498 |
msgid "Update your DNS"
|
| 4499 |
msgstr ""
|
| 4500 |
|
| 4501 |
-
#: views/premium.html:
|
| 4502 |
msgid "Double opt-in"
|
| 4503 |
msgstr ""
|
| 4504 |
|
| 4505 |
-
#: views/premium.html:
|
| 4506 |
msgid "Enforced"
|
| 4507 |
msgstr ""
|
| 4508 |
|
| 4509 |
-
#: views/premium.html:
|
| 4510 |
msgid "Not enforced"
|
| 4511 |
msgstr ""
|
| 4512 |
|
| 4513 |
-
#: views/premium.html:
|
| 4514 |
msgid "View full comparison table"
|
| 4515 |
msgstr ""
|
| 4516 |
|
| 4517 |
-
#: views/premium.html:
|
| 4518 |
msgid ""
|
| 4519 |
"Spammers are ineligible to use the MailPoet Sending Service. We reserve the "
|
| 4520 |
"right to cancel any sending plan if we detect more than 5% hard bounces. "
|
|
@@ -4522,36 +4569,36 @@ msgid ""
|
|
| 4522 |
"MailPoet[/link]."
|
| 4523 |
msgstr ""
|
| 4524 |
|
| 4525 |
-
#: views/premium.html:
|
| 4526 |
msgid "We’re Here to Help!"
|
| 4527 |
msgstr ""
|
| 4528 |
|
| 4529 |
-
#: views/premium.html:
|
| 4530 |
msgid ""
|
| 4531 |
"We pride ourselves on giving nearly round-the-clock support. Our remote "
|
| 4532 |
"team spans several continents, hemispheres, and time-zones! If you’ve got a "
|
| 4533 |
"problem, we will help you fix it!"
|
| 4534 |
msgstr ""
|
| 4535 |
|
| 4536 |
-
#: views/premium.html:
|
| 4537 |
msgid "Get Started for Just $10"
|
| 4538 |
msgstr ""
|
| 4539 |
|
| 4540 |
-
#: views/premium.html:
|
| 4541 |
msgid ""
|
| 4542 |
"Our plans start at just $10 per month. Plus, if you pay annually, you’ll "
|
| 4543 |
"get two months for free!"
|
| 4544 |
msgstr ""
|
| 4545 |
|
| 4546 |
-
#: views/premium.html:
|
| 4547 |
msgid "Purchase Now"
|
| 4548 |
msgstr ""
|
| 4549 |
|
| 4550 |
-
#: views/premium.html:
|
| 4551 |
msgid "Already a Premium customer? [link]Add your Key in the Settings page[/link]."
|
| 4552 |
msgstr ""
|
| 4553 |
|
| 4554 |
-
#: views/premium.html:
|
| 4555 |
msgid ""
|
| 4556 |
"Don't need to use our sending service? Not a problem; we understand. You "
|
| 4557 |
"can also [link]buy the Premium[/link] features separately. Prices start at "
|
|
@@ -4865,8 +4912,8 @@ msgstr ""
|
|
| 4865 |
msgid "Subscribers can choose from these lists:"
|
| 4866 |
msgstr ""
|
| 4867 |
|
| 4868 |
-
#: views/settings/basics.html:250 views/settings/basics.html:
|
| 4869 |
-
#: views/settings/basics.html:
|
| 4870 |
msgid "Leave this field empty to display all lists"
|
| 4871 |
msgstr ""
|
| 4872 |
|
|
@@ -4886,19 +4933,33 @@ msgid ""
|
|
| 4886 |
"on to a WordPress page: [mailpoet_manage text=\"Manage your subscription\"]"
|
| 4887 |
msgstr ""
|
| 4888 |
|
| 4889 |
-
#: views/settings/basics.html:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4890 |
msgid "Archive page shortcode"
|
| 4891 |
msgstr ""
|
| 4892 |
|
| 4893 |
-
#: views/settings/basics.html:
|
| 4894 |
msgid "Paste this shortcode on a page to display a list of past newsletters."
|
| 4895 |
msgstr ""
|
| 4896 |
|
| 4897 |
-
#: views/settings/basics.html:
|
| 4898 |
msgid "Shortcode to display total number of subscribers"
|
| 4899 |
msgstr ""
|
| 4900 |
|
| 4901 |
-
#: views/settings/basics.html:
|
| 4902 |
msgid ""
|
| 4903 |
"Paste this shortcode on a post or page to display the total number of "
|
| 4904 |
"confirmed subscribers."
|
|
@@ -5292,16 +5353,30 @@ msgstr ""
|
|
| 5292 |
msgid "Invalid email addresses: "
|
| 5293 |
msgstr ""
|
| 5294 |
|
| 5295 |
-
#: views/settings.html:
|
| 5296 |
msgid "Settings saved"
|
| 5297 |
msgstr ""
|
| 5298 |
|
| 5299 |
-
#: views/settings.html:
|
| 5300 |
msgid ""
|
| 5301 |
"Are you sure? All of your MailPoet data will be permanently erased "
|
| 5302 |
"(newsletters, statistics, subscribers, etc.)."
|
| 5303 |
msgstr ""
|
| 5304 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5305 |
#: views/subscribers/importExport/export.html:7
|
| 5306 |
#: views/subscribers/importExport/import.html:8
|
| 5307 |
msgid "Back to Subscribers"
|
| 4 |
msgstr ""
|
| 5 |
"Project-Id-Version: \n"
|
| 6 |
"Report-Msgid-Bugs-To: http://support.mailpoet.com/\n"
|
| 7 |
+
"POT-Creation-Date: 2018-10-16 10:18:43+00:00\n"
|
| 8 |
"MIME-Version: 1.0\n"
|
| 9 |
"Content-Type: text/plain; charset=utf-8\n"
|
| 10 |
"Content-Transfer-Encoding: 8bit\n"
|
| 75 |
msgstr ""
|
| 76 |
|
| 77 |
#: lib/API/JSON/v1/Forms.php:70 lib/API/JSON/v1/Forms.php:74
|
| 78 |
+
#: lib/API/MP/v1/API.php:22
|
| 79 |
#: lib/Subscribers/ImportExport/ImportExportFactory.php:44
|
| 80 |
#: lib/Subscribers/ImportExport/PersonalDataExporters/SubscriberExporter.php:40
|
| 81 |
#: views/help.html:64 views/newsletter/editor.html:963
|
| 132 |
|
| 133 |
#: lib/API/JSON/v1/Segments.php:24 lib/API/JSON/v1/Segments.php:75
|
| 134 |
#: lib/API/JSON/v1/Segments.php:91 lib/API/JSON/v1/Segments.php:107
|
| 135 |
+
#: lib/API/JSON/v1/Segments.php:121 lib/API/MP/v1/API.php:65
|
| 136 |
+
#: lib/API/MP/v1/API.php:116
|
| 137 |
msgid "This list does not exist."
|
| 138 |
msgstr ""
|
| 139 |
|
| 213 |
|
| 214 |
#: lib/API/JSON/v1/Subscribers.php:37 lib/API/JSON/v1/Subscribers.php:222
|
| 215 |
#: lib/API/JSON/v1/Subscribers.php:238 lib/API/JSON/v1/Subscribers.php:254
|
| 216 |
+
#: lib/API/MP/v1/API.php:59 lib/API/MP/v1/API.php:110 lib/API/MP/v1/API.php:252
|
| 217 |
msgid "This subscriber does not exist."
|
| 218 |
msgstr ""
|
| 219 |
|
| 241 |
msgid "You need to wait %d seconds before subscribing again."
|
| 242 |
msgstr ""
|
| 243 |
|
| 244 |
+
#: lib/API/MP/v1/API.php:26
|
| 245 |
#: lib/Subscribers/ImportExport/ImportExportFactory.php:45
|
| 246 |
+
#: lib/Subscription/Pages.php:295 views/form/editor.html:232
|
| 247 |
+
#: views/form/editor.html:235 views/subscribers/subscribers.html:53
|
| 248 |
msgid "First name"
|
| 249 |
msgstr ""
|
| 250 |
|
| 251 |
+
#: lib/API/MP/v1/API.php:30
|
| 252 |
#: lib/Subscribers/ImportExport/ImportExportFactory.php:46
|
| 253 |
+
#: lib/Subscription/Pages.php:304 views/form/editor.html:241
|
| 254 |
+
#: views/form/editor.html:244 views/subscribers/subscribers.html:54
|
| 255 |
msgid "Last name"
|
| 256 |
msgstr ""
|
| 257 |
|
| 258 |
+
#: lib/API/MP/v1/API.php:53 lib/API/MP/v1/API.php:104
|
| 259 |
msgid "At least one segment ID is required."
|
| 260 |
msgstr ""
|
| 261 |
|
| 262 |
+
#: lib/API/MP/v1/API.php:82 lib/API/MP/v1/API.php:133
|
| 263 |
msgid "List with ID %s does not exist."
|
| 264 |
msgid_plural "Lists with IDs %s do not exist."
|
| 265 |
msgstr[0] ""
|
| 266 |
msgstr[1] ""
|
| 267 |
|
| 268 |
+
#: lib/API/MP/v1/API.php:155
|
| 269 |
msgid "Subscriber email address is required."
|
| 270 |
msgstr ""
|
| 271 |
|
| 272 |
+
#: lib/API/MP/v1/API.php:162
|
| 273 |
msgid "This subscriber already exists."
|
| 274 |
msgstr ""
|
| 275 |
|
| 276 |
+
#: lib/API/MP/v1/API.php:221
|
| 277 |
msgid "List name is required."
|
| 278 |
msgstr ""
|
| 279 |
|
| 280 |
+
#: lib/API/MP/v1/API.php:228
|
| 281 |
msgid "This list already exists."
|
| 282 |
msgstr ""
|
| 283 |
|
| 305 |
msgid "Manage segments"
|
| 306 |
msgstr ""
|
| 307 |
|
| 308 |
+
#: lib/Config/Capabilities.php:67 lib/Config/Menu.php:704
|
| 309 |
+
#: lib/Config/PrivacyPolicy.php:11 views/premium.html:50
|
| 310 |
msgid "MailPoet"
|
| 311 |
msgstr ""
|
| 312 |
|
| 478 |
msgid "Migration"
|
| 479 |
msgstr ""
|
| 480 |
|
| 481 |
+
#: lib/Config/Menu.php:567
|
| 482 |
msgid "In any WordPress role"
|
| 483 |
msgstr ""
|
| 484 |
|
| 485 |
+
#: lib/Config/Menu.php:586
|
| 486 |
msgid "WooCommerce"
|
| 487 |
msgstr ""
|
| 488 |
|
| 489 |
+
#: lib/Config/Menu.php:587
|
| 490 |
msgid ""
|
| 491 |
"Automatically send an email when there is a new WooCommerce product, order "
|
| 492 |
"and some other action takes place."
|
| 493 |
msgstr ""
|
| 494 |
|
| 495 |
+
#: lib/Config/Menu.php:591
|
| 496 |
msgid "Abandoned Shopping Cart"
|
| 497 |
msgstr ""
|
| 498 |
|
| 499 |
+
#: lib/Config/Menu.php:592
|
| 500 |
msgid ""
|
| 501 |
"Send an email to logged-in visitors who have items in their shopping carts "
|
| 502 |
"but left your website without checking out. Can convert up to 5% of "
|
| 503 |
"abandoned carts."
|
| 504 |
msgstr ""
|
| 505 |
|
| 506 |
+
#: lib/Config/Menu.php:595 lib/Config/Menu.php:614
|
| 507 |
msgid "Must-have"
|
| 508 |
msgstr ""
|
| 509 |
|
| 510 |
+
#: lib/Config/Menu.php:601
|
| 511 |
msgid "Big Spender"
|
| 512 |
msgstr ""
|
| 513 |
|
| 514 |
+
#: lib/Config/Menu.php:602
|
| 515 |
msgid ""
|
| 516 |
"Let MailPoet send an email to customers who have spent a certain amount to "
|
| 517 |
"thank them, possibly with a coupon."
|
| 518 |
msgstr ""
|
| 519 |
|
| 520 |
+
#: lib/Config/Menu.php:605
|
| 521 |
msgid "Smart to have"
|
| 522 |
msgstr ""
|
| 523 |
|
| 524 |
+
#: lib/Config/Menu.php:611
|
| 525 |
msgid "First Purchase"
|
| 526 |
msgstr ""
|
| 527 |
|
| 528 |
+
#: lib/Config/Menu.php:612
|
| 529 |
msgid "Let MailPoet send an email to customers who make their first purchase."
|
| 530 |
msgstr ""
|
| 531 |
|
| 532 |
+
#: lib/Config/Menu.php:620
|
| 533 |
msgid "Purchased In This Category"
|
| 534 |
msgstr ""
|
| 535 |
|
| 536 |
+
#: lib/Config/Menu.php:621
|
| 537 |
msgid ""
|
| 538 |
"Let MailPoet send an email to customers who purchase a product from a "
|
| 539 |
"specific category."
|
| 540 |
msgstr ""
|
| 541 |
|
| 542 |
+
#: lib/Config/Menu.php:626
|
| 543 |
msgid "Purchased This Product"
|
| 544 |
msgstr ""
|
| 545 |
|
| 546 |
+
#: lib/Config/Menu.php:627
|
| 547 |
msgid "Let MailPoet send an email to customers who purchase a specific product."
|
| 548 |
msgstr ""
|
| 549 |
|
| 574 |
"might work within a MultiSite environment, we don’t support it."
|
| 575 |
msgstr ""
|
| 576 |
|
| 577 |
+
#: lib/Config/Populator.php:198
|
| 578 |
msgid "My First List"
|
| 579 |
msgstr ""
|
| 580 |
|
| 581 |
+
#: lib/Config/Populator.php:200
|
| 582 |
msgid "This list is automatically created when you install MailPoet."
|
| 583 |
msgstr ""
|
| 584 |
|
| 1432 |
|
| 1433 |
#: lib/Models/CustomField.php:20 lib/Models/Form.php:13
|
| 1434 |
#: lib/Models/NewsletterOptionField.php:12 lib/Models/NewsletterTemplate.php:16
|
| 1435 |
+
#: lib/Models/Segment.php:15 lib/Models/Setting.php:23
|
| 1436 |
#: views/form/templates/settings/field_form.hbs:53
|
| 1437 |
#: views/subscribers/importExport/import/step2.html:134
|
| 1438 |
msgid "Please specify a name."
|
| 1444 |
msgstr ""
|
| 1445 |
|
| 1446 |
#: lib/Models/Form.php:93 lib/Models/Newsletter.php:732
|
| 1447 |
+
#: lib/Models/Segment.php:133 lib/Models/Subscriber.php:276
|
| 1448 |
msgid "All"
|
| 1449 |
msgstr ""
|
| 1450 |
|
| 1451 |
#: lib/Models/Form.php:98 lib/Models/Newsletter.php:803
|
| 1452 |
+
#: lib/Models/Segment.php:138 lib/Models/Subscriber.php:301 views/forms.html:71
|
| 1453 |
#: views/newsletters.html:91 views/segments.html:50
|
| 1454 |
#: views/subscribers/subscribers.html:38
|
| 1455 |
msgid "Trash"
|
| 1464 |
msgid "Deleted list"
|
| 1465 |
msgstr ""
|
| 1466 |
|
| 1467 |
+
#: lib/Models/Newsletter.php:628 lib/Models/Subscriber.php:212
|
| 1468 |
msgid "All Lists"
|
| 1469 |
msgstr ""
|
| 1470 |
|
| 1518 |
msgid "Rendered newsletter body is invalid!"
|
| 1519 |
msgstr ""
|
| 1520 |
|
| 1521 |
+
#: lib/Models/Setting.php:49
|
| 1522 |
msgid "Confirm your subscription to %1$s"
|
| 1523 |
msgstr ""
|
| 1524 |
|
| 1525 |
+
#: lib/Models/Setting.php:50
|
| 1526 |
msgid ""
|
| 1527 |
"Hello!\n"
|
| 1528 |
"\n"
|
| 1538 |
"The Team"
|
| 1539 |
msgstr ""
|
| 1540 |
|
| 1541 |
+
#: lib/Models/Subscriber.php:26
|
| 1542 |
msgid "Please enter your email address"
|
| 1543 |
msgstr ""
|
| 1544 |
|
| 1545 |
+
#: lib/Models/Subscriber.php:27
|
| 1546 |
msgid "Your email address is invalid!"
|
| 1547 |
msgstr ""
|
| 1548 |
|
| 1549 |
+
#: lib/Models/Subscriber.php:220
|
| 1550 |
msgid "Subscribers without a list (%s)"
|
| 1551 |
msgstr ""
|
| 1552 |
|
| 1553 |
+
#: lib/Models/Subscriber.php:281 lib/Subscription/Pages.php:318
|
| 1554 |
#: views/segments.html:30 views/subscribers/subscribers.html:57
|
| 1555 |
msgid "Subscribed"
|
| 1556 |
msgstr ""
|
| 1557 |
|
| 1558 |
+
#: lib/Models/Subscriber.php:286 views/segments.html:31
|
| 1559 |
#: views/subscribers/subscribers.html:56
|
| 1560 |
msgid "Unconfirmed"
|
| 1561 |
msgstr ""
|
| 1562 |
|
| 1563 |
+
#: lib/Models/Subscriber.php:291 lib/Subscription/Pages.php:326
|
| 1564 |
#: views/segments.html:32 views/subscribers/subscribers.html:58
|
| 1565 |
msgid "Unsubscribed"
|
| 1566 |
msgstr ""
|
| 1567 |
|
| 1568 |
+
#: lib/Models/Subscriber.php:296 lib/Subscription/Pages.php:334
|
| 1569 |
#: views/segments.html:33 views/subscribers/subscribers.html:59
|
| 1570 |
msgid "Bounced"
|
| 1571 |
msgstr ""
|
| 1690 |
msgstr ""
|
| 1691 |
|
| 1692 |
#: lib/Settings/Pages.php:12 lib/Settings/Pages.php:13
|
| 1693 |
+
#: lib/Settings/Pages.php:37 lib/Subscription/Pages.php:124
|
| 1694 |
msgid "MailPoet Page"
|
| 1695 |
msgstr ""
|
| 1696 |
|
| 1832 |
#: views/newsletter/templates/blocks/posts/settingsDisplayOptions.hbs:151
|
| 1833 |
#: views/newsletter/templates/blocks/posts/settingsDisplayOptions.hbs:177
|
| 1834 |
#: views/newsletter/templates/blocks/posts/settingsDisplayOptions.hbs:239
|
| 1835 |
+
#: views/premium.html:71 views/premium.html:72 views/settings/advanced.html:153
|
| 1836 |
#: views/settings/advanced.html:193 views/settings/advanced.html:233
|
| 1837 |
+
#: views/settings/basics.html:332 views/settings/mta.html:539
|
| 1838 |
+
#: views/settings/mta.html:593 views/settings/signup.html:46
|
| 1839 |
#: views/subscribers/importExport/import/step2.html:67
|
| 1840 |
msgid "No"
|
| 1841 |
msgstr ""
|
| 1865 |
msgstr ""
|
| 1866 |
|
| 1867 |
#: lib/Subscribers/ImportExport/PersonalDataExporters/SubscriberExporter.php:44
|
| 1868 |
+
#: lib/Subscription/Pages.php:314 views/help.html:44 views/newsletters.html:75
|
| 1869 |
#: views/subscribers/subscribers.html:55 views/subscribers/subscribers.html:67
|
| 1870 |
msgid "Status"
|
| 1871 |
msgstr ""
|
| 1910 |
msgid "Unknown"
|
| 1911 |
msgstr ""
|
| 1912 |
|
| 1913 |
+
#: lib/Subscribers/NewSubscriberNotificationMailer.php:101
|
| 1914 |
+
msgid "New subscriber to %s"
|
| 1915 |
+
msgstr ""
|
| 1916 |
+
|
| 1917 |
#: lib/Subscription/Comment.php:23 lib/Subscription/Registration.php:11
|
| 1918 |
msgid "Yes, please add me to your mailing list."
|
| 1919 |
msgstr ""
|
| 1920 |
|
| 1921 |
+
#: lib/Subscription/Pages.php:120
|
| 1922 |
msgid "Hmmm... we don't have a record of you."
|
| 1923 |
msgstr ""
|
| 1924 |
|
| 1925 |
+
#: lib/Subscription/Pages.php:150
|
| 1926 |
msgid ""
|
| 1927 |
"Your email address doesn't appear in our lists anymore. Sign up again or "
|
| 1928 |
"contact us if this appears to be a mistake."
|
| 1929 |
msgstr ""
|
| 1930 |
|
| 1931 |
+
#: lib/Subscription/Pages.php:194 lib/Subscription/Pages.php:206
|
| 1932 |
msgid "You have subscribed to: %s"
|
| 1933 |
msgstr ""
|
| 1934 |
|
| 1935 |
+
#: lib/Subscription/Pages.php:203
|
| 1936 |
msgid "You are now subscribed!"
|
| 1937 |
msgstr ""
|
| 1938 |
|
| 1939 |
+
#: lib/Subscription/Pages.php:216 lib/Subscription/Pages.php:435
|
| 1940 |
msgid "Manage your subscription"
|
| 1941 |
msgstr ""
|
| 1942 |
|
| 1943 |
+
#: lib/Subscription/Pages.php:222
|
| 1944 |
msgid "You are now unsubscribed."
|
| 1945 |
msgstr ""
|
| 1946 |
|
| 1947 |
+
#: lib/Subscription/Pages.php:228
|
| 1948 |
msgid "Yup, we've added you to our email list. You'll hear from us shortly."
|
| 1949 |
msgstr ""
|
| 1950 |
|
| 1951 |
+
#: lib/Subscription/Pages.php:245
|
| 1952 |
msgid "Subscription management form is only available to mailing lists subscribers."
|
| 1953 |
msgstr ""
|
| 1954 |
|
| 1955 |
+
#: lib/Subscription/Pages.php:357
|
| 1956 |
msgid "Your lists"
|
| 1957 |
msgstr ""
|
| 1958 |
|
| 1959 |
+
#: lib/Subscription/Pages.php:365 views/form/editor.html:35
|
| 1960 |
+
#: views/form/editor.html:389 views/newsletter/templates/components/save.hbs:3
|
| 1961 |
#: views/segments.html:56 views/subscribers/subscribers.html:98
|
| 1962 |
msgid "Save"
|
| 1963 |
msgstr ""
|
| 1964 |
|
| 1965 |
+
#: lib/Subscription/Pages.php:395
|
| 1966 |
msgid "[link]Edit your profile[/link] to update your email."
|
| 1967 |
msgstr ""
|
| 1968 |
|
| 1969 |
+
#: lib/Subscription/Pages.php:401
|
| 1970 |
msgid "[link]Log in to your account[/link] to update your email."
|
| 1971 |
msgstr ""
|
| 1972 |
|
| 1973 |
+
#: lib/Subscription/Pages.php:407
|
| 1974 |
msgid ""
|
| 1975 |
"Need to change your email address? Unsubscribe here, then simply sign up "
|
| 1976 |
"again."
|
| 1977 |
msgstr ""
|
| 1978 |
|
| 1979 |
+
#: lib/Subscription/Pages.php:421
|
| 1980 |
msgid "Accidentally unsubscribed?"
|
| 1981 |
msgstr ""
|
| 1982 |
|
| 1983 |
+
#: lib/Subscription/Pages.php:429
|
| 1984 |
msgid ""
|
| 1985 |
"Link to subscription management page is only available to mailing lists "
|
| 1986 |
"subscribers."
|
| 2008 |
"this [link]checklist[/link]."
|
| 2009 |
msgstr ""
|
| 2010 |
|
| 2011 |
+
#: lib/Util/Notices/DiscountsAnnouncement.php:29
|
| 2012 |
+
msgid ""
|
| 2013 |
+
"<h3>Save on MailPoet Premium for a limited time. Discounts up to 40%</h3>\n"
|
| 2014 |
+
" <p>Our annual sale is a good opportunity to get more detailed "
|
| 2015 |
+
"stats & great email deliverability. Don’t miss out!</p>\n"
|
| 2016 |
+
" [link]Visit the MailPoet Premium page[/link]."
|
| 2017 |
+
msgstr ""
|
| 2018 |
+
|
| 2019 |
+
#: lib/Util/Notices/PHPVersionWarnings.php:24
|
| 2020 |
msgid ""
|
| 2021 |
"Your website is running on PHP %s. MailPoet requires version 5.6. Please "
|
| 2022 |
"consider upgrading your site's PHP version. [link]Your host can help "
|
| 2056 |
msgid "Close this window and deactivate MailPoet"
|
| 2057 |
msgstr ""
|
| 2058 |
|
| 2059 |
+
#: views/emails/newSubscriberNotification.html:1
|
| 2060 |
+
msgid "Howdy,"
|
| 2061 |
+
msgstr ""
|
| 2062 |
+
|
| 2063 |
+
#: views/emails/newSubscriberNotification.html:3
|
| 2064 |
+
msgid "The subscriber %$1s has just subscribed to your list %$2s!"
|
| 2065 |
+
msgstr ""
|
| 2066 |
+
|
| 2067 |
+
#: views/emails/newSubscriberNotification.html:7
|
| 2068 |
+
msgid "Cheers,"
|
| 2069 |
+
msgstr ""
|
| 2070 |
+
|
| 2071 |
+
#: views/emails/newSubscriberNotification.html:9
|
| 2072 |
+
msgid "The MailPoet Plugin"
|
| 2073 |
+
msgstr ""
|
| 2074 |
+
|
| 2075 |
#: views/form/editor.html:5
|
| 2076 |
msgid "Form"
|
| 2077 |
msgstr ""
|
| 2143 |
msgid "Preview"
|
| 2144 |
msgstr ""
|
| 2145 |
|
| 2146 |
+
#: views/form/editor.html:199
|
| 2147 |
+
msgid ""
|
| 2148 |
+
"<strong>Tip:</strong> read our [link]GDPR guide[/link] to make sure your "
|
| 2149 |
+
"form follows the privacy directive of the European Union."
|
| 2150 |
+
msgstr ""
|
| 2151 |
+
|
| 2152 |
+
#: views/form/editor.html:225
|
| 2153 |
#: views/newsletter/templates/blocks/divider/widget.hbs:4
|
| 2154 |
msgid "Divider"
|
| 2155 |
msgstr ""
|
| 2156 |
|
| 2157 |
+
#: views/form/editor.html:250
|
| 2158 |
msgid "List selection"
|
| 2159 |
msgstr ""
|
| 2160 |
|
| 2161 |
+
#: views/form/editor.html:253
|
| 2162 |
msgid "Select list(s):"
|
| 2163 |
msgstr ""
|
| 2164 |
|
| 2165 |
+
#: views/form/editor.html:259
|
| 2166 |
msgid "Custom text or HTML"
|
| 2167 |
msgstr ""
|
| 2168 |
|
| 2169 |
+
#: views/form/editor.html:262
|
| 2170 |
msgid ""
|
| 2171 |
"Subscribe to our newsletter and join [mailpoet_subscribers_count] other "
|
| 2172 |
"subscribers."
|
| 2173 |
msgstr ""
|
| 2174 |
|
| 2175 |
+
#: views/form/editor.html:407
|
| 2176 |
msgid "Edit name"
|
| 2177 |
msgstr ""
|
| 2178 |
|
| 2179 |
+
#: views/form/editor.html:421
|
| 2180 |
msgid "The form name was successfully updated!"
|
| 2181 |
msgstr ""
|
| 2182 |
|
| 2183 |
+
#: views/form/editor.html:469
|
| 2184 |
msgid "Form preview"
|
| 2185 |
msgstr ""
|
| 2186 |
|
| 2187 |
+
#: views/form/editor.html:516
|
| 2188 |
msgid "Saved! The changes are now active in your widget."
|
| 2189 |
msgstr ""
|
| 2190 |
|
| 2191 |
+
#: views/form/editor.html:518
|
| 2192 |
msgid "Saved! Add this form to %1$sa widget%2$s."
|
| 2193 |
msgstr ""
|
| 2194 |
|
| 2195 |
+
#: views/form/editor.html:600 views/subscribers/importExport/import.html:48
|
| 2196 |
msgid "Add new field"
|
| 2197 |
msgstr ""
|
| 2198 |
|
| 2199 |
+
#: views/form/editor.html:620 views/form/templates/toolbar/fields.hbs:14
|
| 2200 |
msgid "Edit field"
|
| 2201 |
msgstr ""
|
| 2202 |
|
| 2203 |
+
#: views/form/editor.html:642
|
| 2204 |
msgid "This field will be deleted for all your subscribers. Are you sure?"
|
| 2205 |
msgstr ""
|
| 2206 |
|
| 2207 |
+
#: views/form/editor.html:660
|
| 2208 |
msgid "Removed custom field %$1s"
|
| 2209 |
msgstr ""
|
| 2210 |
|
| 2211 |
+
#: views/form/editor.html:746
|
| 2212 |
msgid "Edit field settings"
|
| 2213 |
msgstr ""
|
| 2214 |
|
| 2246 |
#: views/newsletter/templates/blocks/automatedLatestContentLayout/settings.hbs:293
|
| 2247 |
#: views/newsletter/templates/blocks/posts/settingsDisplayOptions.hbs:79
|
| 2248 |
#: views/newsletter/templates/blocks/posts/settingsDisplayOptions.hbs:233
|
| 2249 |
+
#: views/premium.html:65 views/settings/advanced.html:141
|
| 2250 |
#: views/settings/advanced.html:182 views/settings/advanced.html:222
|
| 2251 |
+
#: views/settings/basics.html:321 views/settings/mta.html:582
|
| 2252 |
+
#: views/settings/signup.html:34
|
| 2253 |
#: views/subscribers/importExport/import/step2.html:63
|
| 2254 |
msgid "Yes"
|
| 2255 |
msgstr ""
|
| 3246 |
#: views/newsletter/templates/blocks/automatedLatestContent/settings.hbs:154
|
| 3247 |
#: views/newsletter/templates/blocks/automatedLatestContentLayout/settings.hbs:166
|
| 3248 |
#: views/newsletter/templates/blocks/posts/settingsDisplayOptions.hbs:123
|
| 3249 |
+
#: views/premium.html:64
|
| 3250 |
msgid "None"
|
| 3251 |
msgstr ""
|
| 3252 |
|
| 4450 |
"the extra touch."
|
| 4451 |
msgstr ""
|
| 4452 |
|
| 4453 |
+
#: views/premium.html:8
|
| 4454 |
+
msgid "Discounts up to 40% for a limited time"
|
| 4455 |
+
msgstr ""
|
| 4456 |
+
|
| 4457 |
+
#: views/premium.html:9
|
| 4458 |
+
msgid "Don’t miss out on our only sale of the year which ends on November 30."
|
| 4459 |
+
msgstr ""
|
| 4460 |
+
|
| 4461 |
+
#: views/premium.html:10
|
| 4462 |
+
msgid "There’s never been a better time to change gears."
|
| 4463 |
+
msgstr ""
|
| 4464 |
+
|
| 4465 |
+
#: views/premium.html:15
|
| 4466 |
msgid "What is MailPoet Premium?"
|
| 4467 |
msgstr ""
|
| 4468 |
|
| 4469 |
+
#: views/premium.html:17
|
| 4470 |
msgid "Check out the brief video below. Or, keep reading!"
|
| 4471 |
msgstr ""
|
| 4472 |
|
| 4473 |
+
#: views/premium.html:29
|
| 4474 |
msgid "Insightful Statistics"
|
| 4475 |
msgstr ""
|
| 4476 |
|
| 4477 |
+
#: views/premium.html:32
|
| 4478 |
msgid ""
|
| 4479 |
"Which links get the most clicks? Which subscribers opened your emails? With "
|
| 4480 |
"MailPoet's stats program, it's easy to find out. Need even more details? "
|
| 4481 |
"Integrating with Google Analytics is as easy as 1-2-3."
|
| 4482 |
msgstr ""
|
| 4483 |
|
| 4484 |
+
#: views/premium.html:42
|
| 4485 |
msgid "Hello Inbox, Goodbye Spambox!"
|
| 4486 |
msgstr ""
|
| 4487 |
|
| 4488 |
+
#: views/premium.html:45
|
| 4489 |
msgid ""
|
| 4490 |
"Having issues with reaching your subscribers? Always ending up in the spam "
|
| 4491 |
"box? Don't panic! You're not alone - over a quarter of our plugin users "
|
| 4493 |
"host. Instead, try using the new MailPoet Sending Service."
|
| 4494 |
msgstr ""
|
| 4495 |
|
| 4496 |
+
#: views/premium.html:51
|
| 4497 |
msgid "Web host"
|
| 4498 |
msgstr ""
|
| 4499 |
|
| 4500 |
+
#: views/premium.html:52
|
| 4501 |
msgid "Third party"
|
| 4502 |
msgstr ""
|
| 4503 |
|
| 4504 |
+
#: views/premium.html:57
|
| 4505 |
msgid "Speed"
|
| 4506 |
msgstr ""
|
| 4507 |
|
| 4508 |
+
#: views/premium.html:58
|
| 4509 |
msgid "50,000 / hour"
|
| 4510 |
msgstr ""
|
| 4511 |
|
| 4512 |
+
#: views/premium.html:59
|
| 4513 |
msgid "300 / hour"
|
| 4514 |
msgstr ""
|
| 4515 |
|
| 4516 |
+
#: views/premium.html:60
|
| 4517 |
msgid "2,000 / hour"
|
| 4518 |
msgstr ""
|
| 4519 |
|
| 4520 |
+
#: views/premium.html:63
|
| 4521 |
msgid "Daily email limits"
|
| 4522 |
msgstr ""
|
| 4523 |
|
| 4524 |
+
#: views/premium.html:66 views/premium.html:78 views/premium.html:84
|
| 4525 |
msgid "Depends"
|
| 4526 |
msgstr ""
|
| 4527 |
|
| 4528 |
+
#: views/premium.html:69
|
| 4529 |
msgid "Personal deliverability support"
|
| 4530 |
msgstr ""
|
| 4531 |
|
| 4532 |
+
#: views/premium.html:70
|
| 4533 |
msgid "Yes!"
|
| 4534 |
msgstr ""
|
| 4535 |
|
| 4536 |
+
#: views/premium.html:75
|
| 4537 |
msgid "SPF and DKIM Signatures"
|
| 4538 |
msgstr ""
|
| 4539 |
|
| 4540 |
+
#: views/premium.html:76
|
| 4541 |
msgid "No need!"
|
| 4542 |
msgstr ""
|
| 4543 |
|
| 4544 |
+
#: views/premium.html:77
|
| 4545 |
msgid "Update your DNS"
|
| 4546 |
msgstr ""
|
| 4547 |
|
| 4548 |
+
#: views/premium.html:81
|
| 4549 |
msgid "Double opt-in"
|
| 4550 |
msgstr ""
|
| 4551 |
|
| 4552 |
+
#: views/premium.html:82
|
| 4553 |
msgid "Enforced"
|
| 4554 |
msgstr ""
|
| 4555 |
|
| 4556 |
+
#: views/premium.html:83
|
| 4557 |
msgid "Not enforced"
|
| 4558 |
msgstr ""
|
| 4559 |
|
| 4560 |
+
#: views/premium.html:93
|
| 4561 |
msgid "View full comparison table"
|
| 4562 |
msgstr ""
|
| 4563 |
|
| 4564 |
+
#: views/premium.html:100
|
| 4565 |
msgid ""
|
| 4566 |
"Spammers are ineligible to use the MailPoet Sending Service. We reserve the "
|
| 4567 |
"right to cancel any sending plan if we detect more than 5% hard bounces. "
|
| 4569 |
"MailPoet[/link]."
|
| 4570 |
msgstr ""
|
| 4571 |
|
| 4572 |
+
#: views/premium.html:109
|
| 4573 |
msgid "We’re Here to Help!"
|
| 4574 |
msgstr ""
|
| 4575 |
|
| 4576 |
+
#: views/premium.html:115
|
| 4577 |
msgid ""
|
| 4578 |
"We pride ourselves on giving nearly round-the-clock support. Our remote "
|
| 4579 |
"team spans several continents, hemispheres, and time-zones! If you’ve got a "
|
| 4580 |
"problem, we will help you fix it!"
|
| 4581 |
msgstr ""
|
| 4582 |
|
| 4583 |
+
#: views/premium.html:120
|
| 4584 |
msgid "Get Started for Just $10"
|
| 4585 |
msgstr ""
|
| 4586 |
|
| 4587 |
+
#: views/premium.html:123
|
| 4588 |
msgid ""
|
| 4589 |
"Our plans start at just $10 per month. Plus, if you pay annually, you’ll "
|
| 4590 |
"get two months for free!"
|
| 4591 |
msgstr ""
|
| 4592 |
|
| 4593 |
+
#: views/premium.html:131
|
| 4594 |
msgid "Purchase Now"
|
| 4595 |
msgstr ""
|
| 4596 |
|
| 4597 |
+
#: views/premium.html:135
|
| 4598 |
msgid "Already a Premium customer? [link]Add your Key in the Settings page[/link]."
|
| 4599 |
msgstr ""
|
| 4600 |
|
| 4601 |
+
#: views/premium.html:139
|
| 4602 |
msgid ""
|
| 4603 |
"Don't need to use our sending service? Not a problem; we understand. You "
|
| 4604 |
"can also [link]buy the Premium[/link] features separately. Prices start at "
|
| 4912 |
msgid "Subscribers can choose from these lists:"
|
| 4913 |
msgstr ""
|
| 4914 |
|
| 4915 |
+
#: views/settings/basics.html:250 views/settings/basics.html:370
|
| 4916 |
+
#: views/settings/basics.html:406
|
| 4917 |
msgid "Leave this field empty to display all lists"
|
| 4918 |
msgstr ""
|
| 4919 |
|
| 4933 |
"on to a WordPress page: [mailpoet_manage text=\"Manage your subscription\"]"
|
| 4934 |
msgstr ""
|
| 4935 |
|
| 4936 |
+
#: views/settings/basics.html:307
|
| 4937 |
+
msgid "New subscriber notifications"
|
| 4938 |
+
msgstr ""
|
| 4939 |
+
|
| 4940 |
+
#: views/settings/basics.html:310
|
| 4941 |
+
msgid ""
|
| 4942 |
+
"Enter the email address that should receive notifications when someone "
|
| 4943 |
+
"subscribes."
|
| 4944 |
+
msgstr ""
|
| 4945 |
+
|
| 4946 |
+
#: views/settings/basics.html:342
|
| 4947 |
+
msgid "Please fill the email address."
|
| 4948 |
+
msgstr ""
|
| 4949 |
+
|
| 4950 |
+
#: views/settings/basics.html:348
|
| 4951 |
msgid "Archive page shortcode"
|
| 4952 |
msgstr ""
|
| 4953 |
|
| 4954 |
+
#: views/settings/basics.html:351
|
| 4955 |
msgid "Paste this shortcode on a page to display a list of past newsletters."
|
| 4956 |
msgstr ""
|
| 4957 |
|
| 4958 |
+
#: views/settings/basics.html:384
|
| 4959 |
msgid "Shortcode to display total number of subscribers"
|
| 4960 |
msgstr ""
|
| 4961 |
|
| 4962 |
+
#: views/settings/basics.html:387
|
| 4963 |
msgid ""
|
| 4964 |
"Paste this shortcode on a post or page to display the total number of "
|
| 4965 |
"confirmed subscribers."
|
| 5353 |
msgid "Invalid email addresses: "
|
| 5354 |
msgstr ""
|
| 5355 |
|
| 5356 |
+
#: views/settings.html:130
|
| 5357 |
msgid "Settings saved"
|
| 5358 |
msgstr ""
|
| 5359 |
|
| 5360 |
+
#: views/settings.html:212
|
| 5361 |
msgid ""
|
| 5362 |
"Are you sure? All of your MailPoet data will be permanently erased "
|
| 5363 |
"(newsletters, statistics, subscribers, etc.)."
|
| 5364 |
msgstr ""
|
| 5365 |
|
| 5366 |
+
#: views/settings.html:213
|
| 5367 |
+
msgid "Get notified when someone subscribes"
|
| 5368 |
+
msgstr ""
|
| 5369 |
+
|
| 5370 |
+
#: views/settings.html:214
|
| 5371 |
+
msgid ""
|
| 5372 |
+
"It’s been a popular feature request from our users, we hope you get lots of "
|
| 5373 |
+
"emails about all your new subscribers!"
|
| 5374 |
+
msgstr ""
|
| 5375 |
+
|
| 5376 |
+
#: views/settings.html:215
|
| 5377 |
+
msgid "(You can turn this feature off if it’s too many emails.)"
|
| 5378 |
+
msgstr ""
|
| 5379 |
+
|
| 5380 |
#: views/subscribers/importExport/export.html:7
|
| 5381 |
#: views/subscribers/importExport/import.html:8
|
| 5382 |
msgid "Back to Subscribers"
|
lib/API/MP/v1/API.php
CHANGED
|
@@ -7,6 +7,8 @@ use MailPoet\Models\Subscriber;
|
|
| 7 |
use MailPoet\Models\SubscriberSegment;
|
| 8 |
use MailPoet\Newsletter\Scheduler\Scheduler;
|
| 9 |
use MailPoet\Subscribers\RequiredCustomFieldValidator;
|
|
|
|
|
|
|
| 10 |
use MailPoet\Subscribers\Source;
|
| 11 |
use MailPoet\Tasks\Sending;
|
| 12 |
|
|
@@ -145,6 +147,7 @@ class API {
|
|
| 145 |
function addSubscriber(array $subscriber, $segments = array(), $options = array()) {
|
| 146 |
$send_confirmation_email = (isset($options['send_confirmation_email']) && $options['send_confirmation_email'] === false) ? false : true;
|
| 147 |
$schedule_welcome_email = (isset($options['schedule_welcome_email']) && $options['schedule_welcome_email'] === false) ? false : true;
|
|
|
|
| 148 |
|
| 149 |
// throw exception when subscriber email is missing
|
| 150 |
if(empty($subscriber['email'])) {
|
|
@@ -203,6 +206,10 @@ class API {
|
|
| 203 |
if($schedule_welcome_email && $new_subscriber->status === Subscriber::STATUS_SUBSCRIBED) {
|
| 204 |
$this->_scheduleWelcomeNotification($new_subscriber, $segments);
|
| 205 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 206 |
}
|
| 207 |
return $new_subscriber->withCustomFields()->withSubscriptions()->asArray();
|
| 208 |
}
|
|
@@ -248,7 +255,8 @@ class API {
|
|
| 248 |
}
|
| 249 |
|
| 250 |
protected function _sendConfirmationEmail(Subscriber $subscriber) {
|
| 251 |
-
|
|
|
|
| 252 |
}
|
| 253 |
|
| 254 |
protected function _scheduleWelcomeNotification(Subscriber $subscriber, array $segments) {
|
|
@@ -264,4 +272,9 @@ class API {
|
|
| 264 |
}
|
| 265 |
return $result;
|
| 266 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 267 |
}
|
| 7 |
use MailPoet\Models\SubscriberSegment;
|
| 8 |
use MailPoet\Newsletter\Scheduler\Scheduler;
|
| 9 |
use MailPoet\Subscribers\RequiredCustomFieldValidator;
|
| 10 |
+
use MailPoet\Subscribers\ConfirmationEmailMailer;
|
| 11 |
+
use MailPoet\Subscribers\NewSubscriberNotificationMailer;
|
| 12 |
use MailPoet\Subscribers\Source;
|
| 13 |
use MailPoet\Tasks\Sending;
|
| 14 |
|
| 147 |
function addSubscriber(array $subscriber, $segments = array(), $options = array()) {
|
| 148 |
$send_confirmation_email = (isset($options['send_confirmation_email']) && $options['send_confirmation_email'] === false) ? false : true;
|
| 149 |
$schedule_welcome_email = (isset($options['schedule_welcome_email']) && $options['schedule_welcome_email'] === false) ? false : true;
|
| 150 |
+
$skip_subscriber_notification = (isset($options['skip_subscriber_notification']) && $options['skip_subscriber_notification'] === true) ? true : false;
|
| 151 |
|
| 152 |
// throw exception when subscriber email is missing
|
| 153 |
if(empty($subscriber['email'])) {
|
| 206 |
if($schedule_welcome_email && $new_subscriber->status === Subscriber::STATUS_SUBSCRIBED) {
|
| 207 |
$this->_scheduleWelcomeNotification($new_subscriber, $segments);
|
| 208 |
}
|
| 209 |
+
|
| 210 |
+
if(!$skip_subscriber_notification) {
|
| 211 |
+
$this->sendSubscriberNotification($new_subscriber, $segments);
|
| 212 |
+
}
|
| 213 |
}
|
| 214 |
return $new_subscriber->withCustomFields()->withSubscriptions()->asArray();
|
| 215 |
}
|
| 255 |
}
|
| 256 |
|
| 257 |
protected function _sendConfirmationEmail(Subscriber $subscriber) {
|
| 258 |
+
$sender = new ConfirmationEmailMailer();
|
| 259 |
+
return $sender->sendConfirmationEmail($subscriber);
|
| 260 |
}
|
| 261 |
|
| 262 |
protected function _scheduleWelcomeNotification(Subscriber $subscriber, array $segments) {
|
| 272 |
}
|
| 273 |
return $result;
|
| 274 |
}
|
| 275 |
+
|
| 276 |
+
private function sendSubscriberNotification(Subscriber $subscriber, array $segment_ids) {
|
| 277 |
+
$sender = new NewSubscriberNotificationMailer();
|
| 278 |
+
$sender->send($subscriber, Segment::whereIn('id', $segment_ids)->findMany());
|
| 279 |
+
}
|
| 280 |
}
|
lib/Analytics/Reporter.php
CHANGED
|
@@ -9,6 +9,7 @@ use MailPoet\Models\Segment;
|
|
| 9 |
use MailPoet\Models\Setting;
|
| 10 |
use MailPoet\Models\Subscriber;
|
| 11 |
use MailPoet\Settings\Pages;
|
|
|
|
| 12 |
|
| 13 |
class Reporter {
|
| 14 |
|
|
@@ -47,6 +48,7 @@ class Reporter {
|
|
| 47 |
'Newsletter task scheduler (cron)' => $isCronTriggerMethodWP ? 'visitors' : 'script',
|
| 48 |
'Open and click tracking' => (boolean)Setting::getValue('tracking.enabled', false),
|
| 49 |
'Premium key valid' => $checker->isPremiumKeyValid(),
|
|
|
|
| 50 |
'Number of standard newsletters sent in last 3 months' => $newsletters['sent_newsletters'],
|
| 51 |
'Number of active post notifications' => $newsletters['notifications_count'],
|
| 52 |
'Number of active welcome emails' => $newsletters['welcome_newsletters_count'],
|
| 9 |
use MailPoet\Models\Setting;
|
| 10 |
use MailPoet\Models\Subscriber;
|
| 11 |
use MailPoet\Settings\Pages;
|
| 12 |
+
use MailPoet\Subscribers\NewSubscriberNotificationMailer;
|
| 13 |
|
| 14 |
class Reporter {
|
| 15 |
|
| 48 |
'Newsletter task scheduler (cron)' => $isCronTriggerMethodWP ? 'visitors' : 'script',
|
| 49 |
'Open and click tracking' => (boolean)Setting::getValue('tracking.enabled', false),
|
| 50 |
'Premium key valid' => $checker->isPremiumKeyValid(),
|
| 51 |
+
'New subscriber notifications' => NewSubscriberNotificationMailer::isDisabled(Setting::getValue(NewSubscriberNotificationMailer::SETTINGS_KEY)),
|
| 52 |
'Number of standard newsletters sent in last 3 months' => $newsletters['sent_newsletters'],
|
| 53 |
'Number of active post notifications' => $newsletters['notifications_count'],
|
| 54 |
'Number of active welcome emails' => $newsletters['welcome_newsletters_count'],
|
lib/Config/Capabilities.php
CHANGED
|
@@ -75,13 +75,17 @@ class Capabilities {
|
|
| 75 |
function registerMembersCapabilities() {
|
| 76 |
$permissions = AccessControl::getPermissionLabels();
|
| 77 |
foreach($permissions as $name => $label) {
|
| 78 |
-
|
| 79 |
-
$name,
|
| 80 |
-
array(
|
| 81 |
-
'label' => $label,
|
| 82 |
-
'group' => self::MEMBERS_CAP_GROUP_NAME
|
| 83 |
-
)
|
| 84 |
-
);
|
| 85 |
}
|
| 86 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
}
|
| 75 |
function registerMembersCapabilities() {
|
| 76 |
$permissions = AccessControl::getPermissionLabels();
|
| 77 |
foreach($permissions as $name => $label) {
|
| 78 |
+
$this->registerMembersCapability($name, $label);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 79 |
}
|
| 80 |
}
|
| 81 |
+
|
| 82 |
+
function registerMembersCapability($name, $label) {
|
| 83 |
+
members_register_cap(
|
| 84 |
+
$name,
|
| 85 |
+
array(
|
| 86 |
+
'label' => $label,
|
| 87 |
+
'group' => self::MEMBERS_CAP_GROUP_NAME
|
| 88 |
+
)
|
| 89 |
+
);
|
| 90 |
+
}
|
| 91 |
}
|
lib/Config/Menu.php
CHANGED
|
@@ -391,7 +391,8 @@ class Menu {
|
|
| 391 |
function premium() {
|
| 392 |
$data = array(
|
| 393 |
'subscriber_count' => Subscriber::getTotalSubscribers(),
|
| 394 |
-
'sub_menu' => self::MAIN_PAGE_SLUG
|
|
|
|
| 395 |
);
|
| 396 |
|
| 397 |
$this->displayPage('premium.html', $data);
|
| 391 |
function premium() {
|
| 392 |
$data = array(
|
| 393 |
'subscriber_count' => Subscriber::getTotalSubscribers(),
|
| 394 |
+
'sub_menu' => self::MAIN_PAGE_SLUG,
|
| 395 |
+
'display_discount' => time() <= strtotime('2018-11-30 23:59:59')
|
| 396 |
);
|
| 397 |
|
| 398 |
$this->displayPage('premium.html', $data);
|
lib/Config/Migrator.php
CHANGED
|
@@ -131,7 +131,7 @@ class Migrator {
|
|
| 131 |
'task_id int(11) unsigned NOT NULL,',
|
| 132 |
'subscriber_id int(11) unsigned NOT NULL,',
|
| 133 |
'processed int(1) NOT NULL,',
|
| 134 |
-
'failed int(1) NOT NULL,',
|
| 135 |
'error text NULL,',
|
| 136 |
'created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,',
|
| 137 |
'PRIMARY KEY (task_id, subscriber_id),',
|
| 131 |
'task_id int(11) unsigned NOT NULL,',
|
| 132 |
'subscriber_id int(11) unsigned NOT NULL,',
|
| 133 |
'processed int(1) NOT NULL,',
|
| 134 |
+
'failed int(1) NOT NULL DEFAULT 0,',
|
| 135 |
'error text NULL,',
|
| 136 |
'created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,',
|
| 137 |
'PRIMARY KEY (task_id, subscriber_id),',
|
lib/Config/Populator.php
CHANGED
|
@@ -11,6 +11,7 @@ use MailPoet\Models\Subscriber;
|
|
| 11 |
use MailPoet\Segments\WP;
|
| 12 |
use MailPoet\Models\Setting;
|
| 13 |
use MailPoet\Settings\Pages;
|
|
|
|
| 14 |
use MailPoet\Subscribers\Source;
|
| 15 |
use MailPoet\Util\Helpers;
|
| 16 |
|
|
@@ -170,13 +171,22 @@ class Populator {
|
|
| 170 |
));
|
| 171 |
}
|
| 172 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 173 |
// reset mailer log
|
| 174 |
MailerLog::resetMailerLog();
|
| 175 |
}
|
| 176 |
|
| 177 |
private function createDefaultSegments() {
|
| 178 |
// WP Users segment
|
| 179 |
-
|
| 180 |
|
| 181 |
// Synchronize WP Users
|
| 182 |
WP::synchronizeUsers();
|
| 11 |
use MailPoet\Segments\WP;
|
| 12 |
use MailPoet\Models\Setting;
|
| 13 |
use MailPoet\Settings\Pages;
|
| 14 |
+
use MailPoet\Subscribers\NewSubscriberNotificationMailer;
|
| 15 |
use MailPoet\Subscribers\Source;
|
| 16 |
use MailPoet\Util\Helpers;
|
| 17 |
|
| 171 |
));
|
| 172 |
}
|
| 173 |
|
| 174 |
+
$subscriber_email_notification = Setting::getValue(NewSubscriberNotificationMailer::SETTINGS_KEY);
|
| 175 |
+
if(empty($subscriber_email_notification)) {
|
| 176 |
+
$sender = Setting::getValue('sender', []);
|
| 177 |
+
Setting::setValue('subscriber_email_notification', [
|
| 178 |
+
'enabled' => true,
|
| 179 |
+
'address' => isset($sender['address'])? $sender['address'] : null,
|
| 180 |
+
]);
|
| 181 |
+
}
|
| 182 |
+
|
| 183 |
// reset mailer log
|
| 184 |
MailerLog::resetMailerLog();
|
| 185 |
}
|
| 186 |
|
| 187 |
private function createDefaultSegments() {
|
| 188 |
// WP Users segment
|
| 189 |
+
Segment::getWPSegment();
|
| 190 |
|
| 191 |
// Synchronize WP Users
|
| 192 |
WP::synchronizeUsers();
|
lib/Form/Widget.php
CHANGED
|
@@ -209,7 +209,7 @@ EOL;
|
|
| 209 |
<?php
|
| 210 |
foreach($forms as $form) {
|
| 211 |
$is_selected = ($selected_form === (int)$form['id']) ? 'selected="selected"' : '';
|
| 212 |
-
|
| 213 |
<option value="<?php echo (int)$form['id']; ?>" <?php echo $is_selected; ?>><?php echo esc_html($form['name']); ?></option>
|
| 214 |
<?php } ?>
|
| 215 |
</select>
|
| 209 |
<?php
|
| 210 |
foreach($forms as $form) {
|
| 211 |
$is_selected = ($selected_form === (int)$form['id']) ? 'selected="selected"' : '';
|
| 212 |
+
?>
|
| 213 |
<option value="<?php echo (int)$form['id']; ?>" <?php echo $is_selected; ?>><?php echo esc_html($form['name']); ?></option>
|
| 214 |
<?php } ?>
|
| 215 |
</select>
|
lib/Models/Setting.php
CHANGED
|
@@ -2,6 +2,7 @@
|
|
| 2 |
namespace MailPoet\Models;
|
| 3 |
|
| 4 |
use MailPoet\Cron\CronTrigger;
|
|
|
|
| 5 |
|
| 6 |
if(!defined('ABSPATH')) exit;
|
| 7 |
|
|
@@ -106,6 +107,7 @@ class Setting extends Model {
|
|
| 106 |
}
|
| 107 |
|
| 108 |
public static function setValue($key, $value) {
|
|
|
|
| 109 |
$keys = explode('.', $key);
|
| 110 |
|
| 111 |
if(count($keys) === 1) {
|
| 2 |
namespace MailPoet\Models;
|
| 3 |
|
| 4 |
use MailPoet\Cron\CronTrigger;
|
| 5 |
+
use MailPoet\Util\Helpers;
|
| 6 |
|
| 7 |
if(!defined('ABSPATH')) exit;
|
| 8 |
|
| 107 |
}
|
| 108 |
|
| 109 |
public static function setValue($key, $value) {
|
| 110 |
+
$value = Helpers::recursiveTrim($value);
|
| 111 |
$keys = explode('.', $key);
|
| 112 |
|
| 113 |
if(count($keys) === 1) {
|
lib/Models/Subscriber.php
CHANGED
|
@@ -2,6 +2,8 @@
|
|
| 2 |
namespace MailPoet\Models;
|
| 3 |
use MailPoet\Mailer\Mailer;
|
| 4 |
use MailPoet\Newsletter\Scheduler\Scheduler;
|
|
|
|
|
|
|
| 5 |
use MailPoet\Subscribers\Source;
|
| 6 |
use MailPoet\Util\Helpers;
|
| 7 |
use MailPoet\Subscription;
|
|
@@ -82,71 +84,6 @@ class Subscriber extends Model {
|
|
| 82 |
return self::where('wp_user_id', $wp_user->ID)->findOne();
|
| 83 |
}
|
| 84 |
|
| 85 |
-
function sendConfirmationEmail() {
|
| 86 |
-
$signup_confirmation = Setting::getValue('signup_confirmation');
|
| 87 |
-
|
| 88 |
-
if((bool)$signup_confirmation['enabled'] === false) {
|
| 89 |
-
return false;
|
| 90 |
-
}
|
| 91 |
-
|
| 92 |
-
$segments = $this->segments()->findMany();
|
| 93 |
-
$segment_names = array_map(function($segment) {
|
| 94 |
-
return $segment->name;
|
| 95 |
-
}, $segments);
|
| 96 |
-
|
| 97 |
-
$body = nl2br($signup_confirmation['body']);
|
| 98 |
-
|
| 99 |
-
// replace list of segments shortcode
|
| 100 |
-
$body = str_replace(
|
| 101 |
-
'[lists_to_confirm]',
|
| 102 |
-
'<strong>'.join(', ', $segment_names).'</strong>',
|
| 103 |
-
$body
|
| 104 |
-
);
|
| 105 |
-
|
| 106 |
-
// replace activation link
|
| 107 |
-
$body = Helpers::replaceLinkTags(
|
| 108 |
-
$body,
|
| 109 |
-
Subscription\Url::getConfirmationUrl($this),
|
| 110 |
-
array('target' => '_blank'),
|
| 111 |
-
'activation_link'
|
| 112 |
-
);
|
| 113 |
-
|
| 114 |
-
// build email data
|
| 115 |
-
$email = array(
|
| 116 |
-
'subject' => $signup_confirmation['subject'],
|
| 117 |
-
'body' => array(
|
| 118 |
-
'html' => $body,
|
| 119 |
-
'text' => $body
|
| 120 |
-
)
|
| 121 |
-
);
|
| 122 |
-
|
| 123 |
-
// convert subscriber to array
|
| 124 |
-
$subscriber = $this->asArray();
|
| 125 |
-
|
| 126 |
-
// set from
|
| 127 |
-
$from = (
|
| 128 |
-
!empty($signup_confirmation['from'])
|
| 129 |
-
&& !empty($signup_confirmation['from']['address'])
|
| 130 |
-
) ? $signup_confirmation['from']
|
| 131 |
-
: false;
|
| 132 |
-
|
| 133 |
-
// set reply to
|
| 134 |
-
$reply_to = (
|
| 135 |
-
!empty($signup_confirmation['reply_to'])
|
| 136 |
-
&& !empty($signup_confirmation['reply_to']['address'])
|
| 137 |
-
) ? $signup_confirmation['reply_to']
|
| 138 |
-
: false;
|
| 139 |
-
|
| 140 |
-
// send email
|
| 141 |
-
try {
|
| 142 |
-
$mailer = new Mailer(false, $from, $reply_to);
|
| 143 |
-
return $mailer->send($email, $subscriber);
|
| 144 |
-
} catch(\Exception $e) {
|
| 145 |
-
$this->setError($e->getMessage());
|
| 146 |
-
return false;
|
| 147 |
-
}
|
| 148 |
-
}
|
| 149 |
-
|
| 150 |
static function generateToken($email = null) {
|
| 151 |
if($email !== null) {
|
| 152 |
$auth_key = '';
|
|
@@ -215,11 +152,13 @@ class Subscriber extends Model {
|
|
| 215 |
// link subscriber to segments
|
| 216 |
SubscriberSegment::subscribeToSegments($subscriber, $segment_ids);
|
| 217 |
|
| 218 |
-
|
| 219 |
-
$
|
| 220 |
|
| 221 |
-
// welcome email
|
| 222 |
if($subscriber->status === self::STATUS_SUBSCRIBED) {
|
|
|
|
|
|
|
|
|
|
| 223 |
Scheduler::scheduleSubscriberWelcomeNotification(
|
| 224 |
$subscriber->id,
|
| 225 |
$segment_ids
|
| 2 |
namespace MailPoet\Models;
|
| 3 |
use MailPoet\Mailer\Mailer;
|
| 4 |
use MailPoet\Newsletter\Scheduler\Scheduler;
|
| 5 |
+
use MailPoet\Subscribers\ConfirmationEmailMailer;
|
| 6 |
+
use MailPoet\Subscribers\NewSubscriberNotificationMailer;
|
| 7 |
use MailPoet\Subscribers\Source;
|
| 8 |
use MailPoet\Util\Helpers;
|
| 9 |
use MailPoet\Subscription;
|
| 84 |
return self::where('wp_user_id', $wp_user->ID)->findOne();
|
| 85 |
}
|
| 86 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
static function generateToken($email = null) {
|
| 88 |
if($email !== null) {
|
| 89 |
$auth_key = '';
|
| 152 |
// link subscriber to segments
|
| 153 |
SubscriberSegment::subscribeToSegments($subscriber, $segment_ids);
|
| 154 |
|
| 155 |
+
$sender = new ConfirmationEmailMailer();
|
| 156 |
+
$sender->sendConfirmationEmail($subscriber);
|
| 157 |
|
|
|
|
| 158 |
if($subscriber->status === self::STATUS_SUBSCRIBED) {
|
| 159 |
+
$sender = new NewSubscriberNotificationMailer();
|
| 160 |
+
$sender->send($subscriber, Segment::whereIn('id', $segment_ids)->findMany());
|
| 161 |
+
|
| 162 |
Scheduler::scheduleSubscriberWelcomeNotification(
|
| 163 |
$subscriber->id,
|
| 164 |
$segment_ids
|
lib/Subscribers/ConfirmationEmailMailer.php
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
namespace MailPoet\Subscribers;
|
| 4 |
+
|
| 5 |
+
use MailPoet\Mailer\Mailer;
|
| 6 |
+
use MailPoet\Models\Setting;
|
| 7 |
+
use MailPoet\Models\Subscriber;
|
| 8 |
+
use MailPoet\Subscription\Url;
|
| 9 |
+
use MailPoet\Util\Helpers;
|
| 10 |
+
|
| 11 |
+
class ConfirmationEmailMailer {
|
| 12 |
+
|
| 13 |
+
/** @var Mailer */
|
| 14 |
+
private $mailer;
|
| 15 |
+
|
| 16 |
+
/**
|
| 17 |
+
* @param Mailer|null $mailer
|
| 18 |
+
*/
|
| 19 |
+
function __construct($mailer = null) {
|
| 20 |
+
if($mailer) {
|
| 21 |
+
$this->mailer = $mailer;
|
| 22 |
+
}
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
function sendConfirmationEmail(Subscriber $subscriber) {
|
| 26 |
+
$signup_confirmation = Setting::getValue('signup_confirmation');
|
| 27 |
+
|
| 28 |
+
if((bool)$signup_confirmation['enabled'] === false) {
|
| 29 |
+
return false;
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
$segments = $subscriber->segments()->findMany();
|
| 33 |
+
$segment_names = array_map(function($segment) {
|
| 34 |
+
return $segment->name;
|
| 35 |
+
}, $segments);
|
| 36 |
+
|
| 37 |
+
$body = nl2br($signup_confirmation['body']);
|
| 38 |
+
|
| 39 |
+
// replace list of segments shortcode
|
| 40 |
+
$body = str_replace(
|
| 41 |
+
'[lists_to_confirm]',
|
| 42 |
+
'<strong>'.join(', ', $segment_names).'</strong>',
|
| 43 |
+
$body
|
| 44 |
+
);
|
| 45 |
+
|
| 46 |
+
// replace activation link
|
| 47 |
+
$body = Helpers::replaceLinkTags(
|
| 48 |
+
$body,
|
| 49 |
+
Url::getConfirmationUrl($subscriber),
|
| 50 |
+
array('target' => '_blank'),
|
| 51 |
+
'activation_link'
|
| 52 |
+
);
|
| 53 |
+
|
| 54 |
+
// build email data
|
| 55 |
+
$email = array(
|
| 56 |
+
'subject' => $signup_confirmation['subject'],
|
| 57 |
+
'body' => array(
|
| 58 |
+
'html' => $body,
|
| 59 |
+
'text' => $body
|
| 60 |
+
)
|
| 61 |
+
);
|
| 62 |
+
|
| 63 |
+
// set from
|
| 64 |
+
$from = (
|
| 65 |
+
!empty($signup_confirmation['from'])
|
| 66 |
+
&& !empty($signup_confirmation['from']['address'])
|
| 67 |
+
) ? $signup_confirmation['from']
|
| 68 |
+
: false;
|
| 69 |
+
|
| 70 |
+
// set reply to
|
| 71 |
+
$reply_to = (
|
| 72 |
+
!empty($signup_confirmation['reply_to'])
|
| 73 |
+
&& !empty($signup_confirmation['reply_to']['address'])
|
| 74 |
+
) ? $signup_confirmation['reply_to']
|
| 75 |
+
: false;
|
| 76 |
+
|
| 77 |
+
// send email
|
| 78 |
+
try {
|
| 79 |
+
if(!$this->mailer) {
|
| 80 |
+
$this->mailer = new Mailer(false, $from, $reply_to);
|
| 81 |
+
}
|
| 82 |
+
$this->mailer->getSenderNameAndAddress($from);
|
| 83 |
+
$this->mailer->getReplyToNameAndAddress($reply_to);
|
| 84 |
+
return $this->mailer->send($email, $subscriber);
|
| 85 |
+
} catch(\Exception $e) {
|
| 86 |
+
$subscriber->setError($e->getMessage());
|
| 87 |
+
return false;
|
| 88 |
+
}
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
}
|
lib/Subscribers/NewSubscriberNotificationMailer.php
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
namespace MailPoet\Subscribers;
|
| 4 |
+
|
| 5 |
+
use MailPoet\Config\Renderer;
|
| 6 |
+
use MailPoet\Models\Segment;
|
| 7 |
+
use MailPoet\Models\Setting;
|
| 8 |
+
use MailPoet\Models\Subscriber;
|
| 9 |
+
|
| 10 |
+
class NewSubscriberNotificationMailer {
|
| 11 |
+
|
| 12 |
+
const SENDER_EMAIL_PREFIX = 'wordpress@';
|
| 13 |
+
const SETTINGS_KEY = 'subscriber_email_notification';
|
| 14 |
+
|
| 15 |
+
/** @var Renderer */
|
| 16 |
+
private $renderer;
|
| 17 |
+
|
| 18 |
+
/** @var \MailPoet\Mailer\Mailer */
|
| 19 |
+
private $mailer;
|
| 20 |
+
|
| 21 |
+
/**
|
| 22 |
+
* @param \MailPoet\Mailer\Mailer|null $mailer
|
| 23 |
+
* @param Renderer|null $renderer
|
| 24 |
+
*/
|
| 25 |
+
function __construct($mailer = null, $renderer = null) {
|
| 26 |
+
if($renderer) {
|
| 27 |
+
$this->renderer = $renderer;
|
| 28 |
+
} else {
|
| 29 |
+
$caching = ! WP_DEBUG;
|
| 30 |
+
$debugging = WP_DEBUG;
|
| 31 |
+
$this->renderer = new Renderer($caching, $debugging);
|
| 32 |
+
}
|
| 33 |
+
if($mailer) {
|
| 34 |
+
$this->mailer = $mailer;
|
| 35 |
+
} else {
|
| 36 |
+
$this->mailer = new \MailPoet\Mailer\Mailer(false, $this->constructSenderEmail());
|
| 37 |
+
}
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
/**
|
| 41 |
+
* @param Subscriber $subscriber
|
| 42 |
+
* @param Segment[] $segments
|
| 43 |
+
*
|
| 44 |
+
* @throws \Exception
|
| 45 |
+
*/
|
| 46 |
+
function send(Subscriber $subscriber, array $segments) {
|
| 47 |
+
$settings = Setting::getValue(NewSubscriberNotificationMailer::SETTINGS_KEY);
|
| 48 |
+
if($this->isDisabled($settings)) {
|
| 49 |
+
return;
|
| 50 |
+
}
|
| 51 |
+
try {
|
| 52 |
+
$this->mailer->getSenderNameAndAddress($this->constructSenderEmail());
|
| 53 |
+
$this->mailer->send($this->constructNewsletter($subscriber, $segments), $settings['address']);
|
| 54 |
+
} catch(\Exception $e) {
|
| 55 |
+
if(WP_DEBUG) {
|
| 56 |
+
throw $e;
|
| 57 |
+
}
|
| 58 |
+
}
|
| 59 |
+
}
|
| 60 |
+
|
| 61 |
+
public static function isDisabled($settings) {
|
| 62 |
+
if(!is_array($settings)) {
|
| 63 |
+
return true;
|
| 64 |
+
}
|
| 65 |
+
if(!isset($settings['enabled'])) {
|
| 66 |
+
return true;
|
| 67 |
+
}
|
| 68 |
+
if(!isset($settings['address'])) {
|
| 69 |
+
return true;
|
| 70 |
+
}
|
| 71 |
+
if(empty(trim($settings['address']))) {
|
| 72 |
+
return true;
|
| 73 |
+
}
|
| 74 |
+
return !(bool)$settings['enabled'];
|
| 75 |
+
}
|
| 76 |
+
|
| 77 |
+
private function constructSenderEmail() {
|
| 78 |
+
$url_parts = parse_url(home_url());
|
| 79 |
+
return [
|
| 80 |
+
'address' => self::SENDER_EMAIL_PREFIX . $url_parts['host'],
|
| 81 |
+
'name' => self::SENDER_EMAIL_PREFIX . $url_parts['host'],
|
| 82 |
+
];
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
/**
|
| 86 |
+
* @param Subscriber $subscriber
|
| 87 |
+
* @param Segment[] $segments
|
| 88 |
+
*
|
| 89 |
+
* @return array
|
| 90 |
+
* @throws \Exception
|
| 91 |
+
*/
|
| 92 |
+
private function constructNewsletter(Subscriber $subscriber, array $segments) {
|
| 93 |
+
$segment_names = $this->getSegmentNames($segments);
|
| 94 |
+
$context = [
|
| 95 |
+
'subscriber_email' => $subscriber->get('email'),
|
| 96 |
+
'segments_names' => $segment_names,
|
| 97 |
+
'link_settings' => get_site_url(null, '/wp-admin/admin.php?page=mailpoet-settings'),
|
| 98 |
+
'link_premium' => get_site_url(null, '/wp-admin/admin.php?page=mailpoet-premium'),
|
| 99 |
+
];
|
| 100 |
+
return [
|
| 101 |
+
'subject' => sprintf(__('New subscriber to %s', 'mailpoet'), $segment_names),
|
| 102 |
+
'body' => [
|
| 103 |
+
'html' => $this->renderer->render('emails/newSubscriberNotification.html', $context),
|
| 104 |
+
'text' => $this->renderer->render('emails/newSubscriberNotification.txt', $context),
|
| 105 |
+
],
|
| 106 |
+
];
|
| 107 |
+
}
|
| 108 |
+
|
| 109 |
+
/**
|
| 110 |
+
* @param Segment[] $segments
|
| 111 |
+
* @return string
|
| 112 |
+
*/
|
| 113 |
+
private function getSegmentNames($segments) {
|
| 114 |
+
$names = [];
|
| 115 |
+
foreach($segments as $segment) {
|
| 116 |
+
$names[] = $segment->get('name');
|
| 117 |
+
}
|
| 118 |
+
return implode(', ', $names);
|
| 119 |
+
}
|
| 120 |
+
|
| 121 |
+
}
|
lib/Subscription/Pages.php
CHANGED
|
@@ -8,6 +8,7 @@ use MailPoet\Models\CustomField;
|
|
| 8 |
use MailPoet\Models\Setting;
|
| 9 |
use MailPoet\Models\Segment;
|
| 10 |
use MailPoet\Newsletter\Scheduler\Scheduler;
|
|
|
|
| 11 |
use MailPoet\Util\Helpers;
|
| 12 |
use MailPoet\Util\Url as UrlHelper;
|
| 13 |
use MailPoet\Form\Renderer as FormRenderer;
|
|
@@ -22,13 +23,20 @@ class Pages {
|
|
| 22 |
private $action;
|
| 23 |
private $data;
|
| 24 |
private $subscriber;
|
|
|
|
|
|
|
| 25 |
|
| 26 |
-
function __construct($action = false, $data = array(), $init_shortcodes = false, $init_page_filters = false) {
|
| 27 |
$this->action = $action;
|
| 28 |
$this->data = $data;
|
| 29 |
$this->subscriber = $this->getSubscriber();
|
| 30 |
if($init_page_filters) $this->initPageFilters();
|
| 31 |
if($init_shortcodes) $this->initShortcodes();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
}
|
| 33 |
|
| 34 |
private function isPreview() {
|
|
@@ -76,14 +84,18 @@ class Pages {
|
|
| 76 |
|
| 77 |
if($this->subscriber->getErrors() === false) {
|
| 78 |
// send welcome notification
|
| 79 |
-
$subsciber_segments = $this->subscriber->segments()->
|
| 80 |
if($subsciber_segments) {
|
| 81 |
Scheduler::scheduleSubscriberWelcomeNotification(
|
| 82 |
$this->subscriber->id,
|
| 83 |
-
|
|
|
|
|
|
|
| 84 |
);
|
| 85 |
}
|
| 86 |
|
|
|
|
|
|
|
| 87 |
// update subscriber from stored data after confirmation
|
| 88 |
if(!empty($subscriber_data)) {
|
| 89 |
Subscriber::createOrUpdate($subscriber_data);
|
|
@@ -427,4 +439,4 @@ class Pages {
|
|
| 427 |
$this->subscriber
|
| 428 |
).'">'.$text.'</a>';
|
| 429 |
}
|
| 430 |
-
}
|
| 8 |
use MailPoet\Models\Setting;
|
| 9 |
use MailPoet\Models\Segment;
|
| 10 |
use MailPoet\Newsletter\Scheduler\Scheduler;
|
| 11 |
+
use MailPoet\Subscribers\NewSubscriberNotificationMailer;
|
| 12 |
use MailPoet\Util\Helpers;
|
| 13 |
use MailPoet\Util\Url as UrlHelper;
|
| 14 |
use MailPoet\Form\Renderer as FormRenderer;
|
| 23 |
private $action;
|
| 24 |
private $data;
|
| 25 |
private $subscriber;
|
| 26 |
+
/** @var NewSubscriberNotificationMailer */
|
| 27 |
+
private $new_subscriber_notification_sender;
|
| 28 |
|
| 29 |
+
function __construct($action = false, $data = array(), $init_shortcodes = false, $init_page_filters = false, $new_subscriber_notification_sender = null) {
|
| 30 |
$this->action = $action;
|
| 31 |
$this->data = $data;
|
| 32 |
$this->subscriber = $this->getSubscriber();
|
| 33 |
if($init_page_filters) $this->initPageFilters();
|
| 34 |
if($init_shortcodes) $this->initShortcodes();
|
| 35 |
+
if($new_subscriber_notification_sender) {
|
| 36 |
+
$this->new_subscriber_notification_sender = $new_subscriber_notification_sender;
|
| 37 |
+
} else {
|
| 38 |
+
$this->new_subscriber_notification_sender = new NewSubscriberNotificationMailer();
|
| 39 |
+
}
|
| 40 |
}
|
| 41 |
|
| 42 |
private function isPreview() {
|
| 84 |
|
| 85 |
if($this->subscriber->getErrors() === false) {
|
| 86 |
// send welcome notification
|
| 87 |
+
$subsciber_segments = $this->subscriber->segments()->findMany();
|
| 88 |
if($subsciber_segments) {
|
| 89 |
Scheduler::scheduleSubscriberWelcomeNotification(
|
| 90 |
$this->subscriber->id,
|
| 91 |
+
array_map(function ($segment) {
|
| 92 |
+
return $segment->get('id');
|
| 93 |
+
}, $subsciber_segments)
|
| 94 |
);
|
| 95 |
}
|
| 96 |
|
| 97 |
+
$this->new_subscriber_notification_sender->send($this->subscriber, $subsciber_segments);
|
| 98 |
+
|
| 99 |
// update subscriber from stored data after confirmation
|
| 100 |
if(!empty($subscriber_data)) {
|
| 101 |
Subscriber::createOrUpdate($subscriber_data);
|
| 439 |
$this->subscriber
|
| 440 |
).'">'.$text.'</a>';
|
| 441 |
}
|
| 442 |
+
}
|
lib/Util/ConflictResolver.php
CHANGED
|
@@ -15,7 +15,9 @@ class ConflictResolver {
|
|
| 15 |
// WP default
|
| 16 |
'^/wp-admin',
|
| 17 |
'^/wp-includes',
|
|
|
|
| 18 |
'googleapis.com/ajax/libs',
|
|
|
|
| 19 |
// third-party
|
| 20 |
'query-monitor',
|
| 21 |
'wpt-tx-updater-network'
|
|
@@ -90,4 +92,4 @@ class ConflictResolver {
|
|
| 90 |
add_action('admin_print_footer_scripts', $dequeue_scripts, PHP_INT_MAX);
|
| 91 |
add_action('admin_footer', $dequeue_scripts, PHP_INT_MAX);
|
| 92 |
}
|
| 93 |
-
}
|
| 15 |
// WP default
|
| 16 |
'^/wp-admin',
|
| 17 |
'^/wp-includes',
|
| 18 |
+
// CDN
|
| 19 |
'googleapis.com/ajax/libs',
|
| 20 |
+
'wp.com',
|
| 21 |
// third-party
|
| 22 |
'query-monitor',
|
| 23 |
'wpt-tx-updater-network'
|
| 92 |
add_action('admin_print_footer_scripts', $dequeue_scripts, PHP_INT_MAX);
|
| 93 |
add_action('admin_footer', $dequeue_scripts, PHP_INT_MAX);
|
| 94 |
}
|
| 95 |
+
}
|
lib/Util/Helpers.php
CHANGED
|
@@ -87,4 +87,12 @@ class Helpers {
|
|
| 87 |
: null;
|
| 88 |
}
|
| 89 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 90 |
}
|
| 87 |
: null;
|
| 88 |
}
|
| 89 |
|
| 90 |
+
static function recursiveTrim($value) {
|
| 91 |
+
if(is_array($value))
|
| 92 |
+
return array_map([__CLASS__, 'recursiveTrim'], $value);
|
| 93 |
+
if(is_string($value))
|
| 94 |
+
return trim($value);
|
| 95 |
+
return $value;
|
| 96 |
+
}
|
| 97 |
+
|
| 98 |
}
|
lib/Util/Notices/DiscountsAnnouncement.php
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
namespace MailPoet\Util\Notices;
|
| 3 |
+
|
| 4 |
+
use MailPoet\Models\Setting;
|
| 5 |
+
use MailPoet\Util\Helpers;
|
| 6 |
+
use MailPoet\WP\Notice as WPNotice;
|
| 7 |
+
|
| 8 |
+
class DiscountsAnnouncement {
|
| 9 |
+
|
| 10 |
+
const OPTION_NAME = 'mailpoet_display_discounts_announcement_q4_2018';
|
| 11 |
+
|
| 12 |
+
function enable() {
|
| 13 |
+
Setting::setValue(self::OPTION_NAME, true);
|
| 14 |
+
}
|
| 15 |
+
|
| 16 |
+
function disable() {
|
| 17 |
+
Setting::setValue(self::OPTION_NAME, false);
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
+
function init($should_display) {
|
| 21 |
+
$should_display = $should_display && (time() <= strtotime('2018-11-30 23:59:59'));
|
| 22 |
+
if($should_display && Setting::getValue(self::OPTION_NAME, true)) {
|
| 23 |
+
return $this->display();
|
| 24 |
+
}
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
private function display() {
|
| 28 |
+
$message = Helpers::replaceLinkTags(
|
| 29 |
+
__('<h3>Save on MailPoet Premium for a limited time. Discounts up to 40%</h3>
|
| 30 |
+
<p>Our annual sale is a good opportunity to get more detailed stats & great email deliverability. Don’t miss out!</p>
|
| 31 |
+
[link]Visit the MailPoet Premium page[/link].', 'mailpoet'),
|
| 32 |
+
'admin.php?page=mailpoet-premium',
|
| 33 |
+
array('target' => '_blank', 'class' => 'button button-primary')
|
| 34 |
+
);
|
| 35 |
+
$message .= '<script>jQuery(function($) {$(document).on("click", ".mailpoet-dismissible-notice .notice-dismiss",function dismiss() {const type = $(this).closest(".mailpoet-dismissible-notice").data("notice");$.ajax(window.ajaxurl,{type: "POST",data: {action: "dismissed_notice_handler",type,}});});});</script>';
|
| 36 |
+
|
| 37 |
+
$extra_classes = 'mailpoet-dismissible-notice is-dismissible';
|
| 38 |
+
$data_notice_name = self::OPTION_NAME;
|
| 39 |
+
|
| 40 |
+
WPNotice::displaySuccess($message, $extra_classes, $data_notice_name);
|
| 41 |
+
return $message;
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
}
|
lib/Util/Notices/PHPVersionWarnings.php
CHANGED
|
@@ -3,7 +3,6 @@
|
|
| 3 |
namespace MailPoet\Util\Notices;
|
| 4 |
|
| 5 |
use MailPoet\Util\Helpers;
|
| 6 |
-
use MailPoet\WP\Notice as WPNotice;
|
| 7 |
|
| 8 |
class PHPVersionWarnings {
|
| 9 |
|
|
@@ -27,7 +26,7 @@ class PHPVersionWarnings {
|
|
| 27 |
$error = Helpers::replaceLinkTags($error_string, 'https://beta.docs.mailpoet.com/article/251-upgrading-the-websites-php-version', array('target' => '_blank'));
|
| 28 |
$extra_classes = 'mailpoet-dismissible-notice is-dismissible';
|
| 29 |
|
| 30 |
-
return
|
| 31 |
}
|
| 32 |
|
| 33 |
function disable() {
|
| 3 |
namespace MailPoet\Util\Notices;
|
| 4 |
|
| 5 |
use MailPoet\Util\Helpers;
|
|
|
|
| 6 |
|
| 7 |
class PHPVersionWarnings {
|
| 8 |
|
| 26 |
$error = Helpers::replaceLinkTags($error_string, 'https://beta.docs.mailpoet.com/article/251-upgrading-the-websites-php-version', array('target' => '_blank'));
|
| 27 |
$extra_classes = 'mailpoet-dismissible-notice is-dismissible';
|
| 28 |
|
| 29 |
+
return \MailPoet\WP\Notice::displayError($error, $extra_classes, self::OPTION_NAME);
|
| 30 |
}
|
| 31 |
|
| 32 |
function disable() {
|
lib/Util/Notices/PermanentNotices.php
CHANGED
|
@@ -12,9 +12,12 @@ class PermanentNotices {
|
|
| 12 |
/** @var AfterMigrationNotice */
|
| 13 |
private $after_migration_notice;
|
| 14 |
|
|
|
|
|
|
|
| 15 |
public function __construct() {
|
| 16 |
$this->php_version_warnings = new PHPVersionWarnings();
|
| 17 |
$this->after_migration_notice = new AfterMigrationNotice();
|
|
|
|
| 18 |
}
|
| 19 |
|
| 20 |
public function init() {
|
|
@@ -29,6 +32,7 @@ class PermanentNotices {
|
|
| 29 |
Menu::isOnMailPoetAdminPage()
|
| 30 |
&& $_GET['page'] !== 'mailpoet-welcome-wizard'
|
| 31 |
);
|
|
|
|
| 32 |
}
|
| 33 |
|
| 34 |
function ajaxDismissNoticeHandler() {
|
|
@@ -40,6 +44,9 @@ class PermanentNotices {
|
|
| 40 |
case (AfterMigrationNotice::OPTION_NAME):
|
| 41 |
$this->after_migration_notice->disable();
|
| 42 |
break;
|
|
|
|
|
|
|
|
|
|
| 43 |
}
|
| 44 |
}
|
| 45 |
|
| 12 |
/** @var AfterMigrationNotice */
|
| 13 |
private $after_migration_notice;
|
| 14 |
|
| 15 |
+
private $discounts_announcement;
|
| 16 |
+
|
| 17 |
public function __construct() {
|
| 18 |
$this->php_version_warnings = new PHPVersionWarnings();
|
| 19 |
$this->after_migration_notice = new AfterMigrationNotice();
|
| 20 |
+
$this->discounts_announcement = new DiscountsAnnouncement();
|
| 21 |
}
|
| 22 |
|
| 23 |
public function init() {
|
| 32 |
Menu::isOnMailPoetAdminPage()
|
| 33 |
&& $_GET['page'] !== 'mailpoet-welcome-wizard'
|
| 34 |
);
|
| 35 |
+
$this->discounts_announcement->init(empty($_GET['page']) && is_admin());
|
| 36 |
}
|
| 37 |
|
| 38 |
function ajaxDismissNoticeHandler() {
|
| 44 |
case (AfterMigrationNotice::OPTION_NAME):
|
| 45 |
$this->after_migration_notice->disable();
|
| 46 |
break;
|
| 47 |
+
case (DiscountsAnnouncement::OPTION_NAME):
|
| 48 |
+
$this->discounts_announcement->disable();
|
| 49 |
+
break;
|
| 50 |
}
|
| 51 |
}
|
| 52 |
|
mailpoet.php
CHANGED
|
@@ -4,7 +4,7 @@ if(!defined('ABSPATH')) exit;
|
|
| 4 |
|
| 5 |
/*
|
| 6 |
* Plugin Name: MailPoet 3 (New)
|
| 7 |
-
* Version: 3.11.
|
| 8 |
* Plugin URI: http://www.mailpoet.com
|
| 9 |
* Description: Create and send newsletters, post notifications and welcome emails from your WordPress.
|
| 10 |
* Author: MailPoet
|
|
@@ -18,7 +18,7 @@ if(!defined('ABSPATH')) exit;
|
|
| 18 |
*/
|
| 19 |
|
| 20 |
$mailpoet_plugin = array(
|
| 21 |
-
'version' => '3.11.
|
| 22 |
'filename' => __FILE__,
|
| 23 |
'path' => dirname(__FILE__),
|
| 24 |
'autoloader' => dirname(__FILE__) . '/vendor/autoload.php',
|
| 4 |
|
| 5 |
/*
|
| 6 |
* Plugin Name: MailPoet 3 (New)
|
| 7 |
+
* Version: 3.11.4
|
| 8 |
* Plugin URI: http://www.mailpoet.com
|
| 9 |
* Description: Create and send newsletters, post notifications and welcome emails from your WordPress.
|
| 10 |
* Author: MailPoet
|
| 18 |
*/
|
| 19 |
|
| 20 |
$mailpoet_plugin = array(
|
| 21 |
+
'version' => '3.11.4',
|
| 22 |
'filename' => __FILE__,
|
| 23 |
'path' => dirname(__FILE__),
|
| 24 |
'autoloader' => dirname(__FILE__) . '/vendor/autoload.php',
|
readme.txt
CHANGED
|
@@ -3,7 +3,7 @@ Contributors: mailpoet, wysija, kgjerstad
|
|
| 3 |
Tags: newsletter, newsletter subscribers, email, welcome email, post notification, WooCommerce emails, newsletter builder, mailing list
|
| 4 |
Requires at least: 4.7
|
| 5 |
Tested up to: 4.9
|
| 6 |
-
Stable tag: 3.11.
|
| 7 |
License: GPLv3
|
| 8 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
| 9 |
|
|
@@ -161,6 +161,9 @@ Stop by our [support site](https://www.mailpoet.com/support).
|
|
| 161 |
|
| 162 |
== Changelog ==
|
| 163 |
|
|
|
|
|
|
|
|
|
|
| 164 |
= 3.11.3 - 2018-10-09 =
|
| 165 |
* Fixed: Linux cron to work again.
|
| 166 |
|
| 3 |
Tags: newsletter, newsletter subscribers, email, welcome email, post notification, WooCommerce emails, newsletter builder, mailing list
|
| 4 |
Requires at least: 4.7
|
| 5 |
Tested up to: 4.9
|
| 6 |
+
Stable tag: 3.11.4
|
| 7 |
License: GPLv3
|
| 8 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
| 9 |
|
| 161 |
|
| 162 |
== Changelog ==
|
| 163 |
|
| 164 |
+
= 3.11.4 - 2018-10-16 =
|
| 165 |
+
* Added: email notifications to administrators when new subscribers subscribe
|
| 166 |
+
|
| 167 |
= 3.11.3 - 2018-10-09 =
|
| 168 |
* Fixed: Linux cron to work again.
|
| 169 |
|
vendor/autoload.php
CHANGED
|
@@ -4,4 +4,4 @@
|
|
| 4 |
|
| 5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
| 6 |
|
| 7 |
-
return
|
| 4 |
|
| 5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
| 6 |
|
| 7 |
+
return ComposerAutoloaderInit2159ad40a248aa7256850bbda617bbb4::getLoader();
|
vendor/bin/security-checker
CHANGED
|
@@ -26,7 +26,8 @@ if ((!$loader = includeIfExists(__DIR__.'/vendor/autoload.php')) && (!$loader =
|
|
| 26 |
use Symfony\Component\Console\Application;
|
| 27 |
use SensioLabs\Security\Command\SecurityCheckerCommand;
|
| 28 |
use SensioLabs\Security\SecurityChecker;
|
|
|
|
| 29 |
|
| 30 |
$console = new Application('SensioLabs Security Checker', SecurityChecker::VERSION);
|
| 31 |
-
$console->add(new SecurityCheckerCommand(new SecurityChecker()));
|
| 32 |
$console->run();
|
| 26 |
use Symfony\Component\Console\Application;
|
| 27 |
use SensioLabs\Security\Command\SecurityCheckerCommand;
|
| 28 |
use SensioLabs\Security\SecurityChecker;
|
| 29 |
+
use SensioLabs\Security\Crawler;
|
| 30 |
|
| 31 |
$console = new Application('SensioLabs Security Checker', SecurityChecker::VERSION);
|
| 32 |
+
$console->add(new SecurityCheckerCommand(new SecurityChecker(new Crawler())));
|
| 33 |
$console->run();
|
vendor/cerdic/css-tidy/class.csstidy.php
CHANGED
|
@@ -61,14 +61,15 @@ if (!function_exists('ctype_xdigit')){
|
|
| 61 |
* Defines constants
|
| 62 |
* @todo //TODO: make them class constants of csstidy
|
| 63 |
*/
|
| 64 |
-
define('AT_START',
|
| 65 |
-
define('AT_END',
|
| 66 |
-
define('SEL_START',
|
| 67 |
-
define('SEL_END',
|
| 68 |
-
define('PROPERTY',
|
| 69 |
-
define('VALUE',
|
| 70 |
-
define('COMMENT',
|
| 71 |
-
define('
|
|
|
|
| 72 |
|
| 73 |
/**
|
| 74 |
* Contains a class for printing CSS code
|
|
@@ -94,7 +95,7 @@ require('class.csstidy_optimise.php');
|
|
| 94 |
* An online version should be available here: http://cdburnerxp.se/cssparse/css_optimiser.php
|
| 95 |
* @package csstidy
|
| 96 |
* @author Florian Schmitz (floele at gmail dot com) 2005-2006
|
| 97 |
-
* @version 1.
|
| 98 |
*/
|
| 99 |
class csstidy {
|
| 100 |
|
|
@@ -147,7 +148,7 @@ class csstidy {
|
|
| 147 |
* @var string
|
| 148 |
* @access private
|
| 149 |
*/
|
| 150 |
-
public $version = '1.
|
| 151 |
/**
|
| 152 |
* Stores the settings
|
| 153 |
* @var array
|
|
@@ -318,6 +319,10 @@ class csstidy {
|
|
| 318 |
/* is dangeroues to be used: CSS is broken sometimes */
|
| 319 |
$this->settings['merge_selectors'] = 0;
|
| 320 |
/* preserve or not browser hacks */
|
|
|
|
|
|
|
|
|
|
|
|
|
| 321 |
$this->settings['discard_invalid_selectors'] = false;
|
| 322 |
$this->settings['discard_invalid_properties'] = false;
|
| 323 |
$this->settings['css_level'] = 'CSS3.0';
|
|
@@ -411,7 +416,7 @@ class csstidy {
|
|
| 411 |
*/
|
| 412 |
public function _add_token($type, $data, $do = false) {
|
| 413 |
if ($this->get_cfg('preserve_css') || $do) {
|
| 414 |
-
$this->tokens[] = array($type, ($type == COMMENT) ? $data : trim($data));
|
| 415 |
}
|
| 416 |
}
|
| 417 |
|
|
@@ -947,7 +952,13 @@ class csstidy {
|
|
| 947 |
if ($string{$i} === '*' && $string{$i + 1} === '/') {
|
| 948 |
$this->status = array_pop($this->from);
|
| 949 |
$i++;
|
| 950 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 951 |
$cur_comment = '';
|
| 952 |
} else {
|
| 953 |
$cur_comment .= $string{$i};
|
|
@@ -1036,6 +1047,25 @@ class csstidy {
|
|
| 1036 |
return!(@($string{$pos - 1} !== '\\') || csstidy::escaped($string, $pos - 1));
|
| 1037 |
}
|
| 1038 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1039 |
/**
|
| 1040 |
* Adds a property with value to the existing CSS code
|
| 1041 |
* @param string $media
|
| 61 |
* Defines constants
|
| 62 |
* @todo //TODO: make them class constants of csstidy
|
| 63 |
*/
|
| 64 |
+
define('AT_START', 1);
|
| 65 |
+
define('AT_END', 2);
|
| 66 |
+
define('SEL_START', 3);
|
| 67 |
+
define('SEL_END', 4);
|
| 68 |
+
define('PROPERTY', 5);
|
| 69 |
+
define('VALUE', 6);
|
| 70 |
+
define('COMMENT', 7);
|
| 71 |
+
define('IMPORTANT_COMMENT',8);
|
| 72 |
+
define('DEFAULT_AT', 41);
|
| 73 |
|
| 74 |
/**
|
| 75 |
* Contains a class for printing CSS code
|
| 95 |
* An online version should be available here: http://cdburnerxp.se/cssparse/css_optimiser.php
|
| 96 |
* @package csstidy
|
| 97 |
* @author Florian Schmitz (floele at gmail dot com) 2005-2006
|
| 98 |
+
* @version 1.6.4
|
| 99 |
*/
|
| 100 |
class csstidy {
|
| 101 |
|
| 148 |
* @var string
|
| 149 |
* @access private
|
| 150 |
*/
|
| 151 |
+
public $version = '1.6.4';
|
| 152 |
/**
|
| 153 |
* Stores the settings
|
| 154 |
* @var array
|
| 319 |
/* is dangeroues to be used: CSS is broken sometimes */
|
| 320 |
$this->settings['merge_selectors'] = 0;
|
| 321 |
/* preserve or not browser hacks */
|
| 322 |
+
|
| 323 |
+
/* Useful to produce a rtl css from a ltr one (or the opposite) */
|
| 324 |
+
$this->settings['reverse_left_and_right'] = 0;
|
| 325 |
+
|
| 326 |
$this->settings['discard_invalid_selectors'] = false;
|
| 327 |
$this->settings['discard_invalid_properties'] = false;
|
| 328 |
$this->settings['css_level'] = 'CSS3.0';
|
| 416 |
*/
|
| 417 |
public function _add_token($type, $data, $do = false) {
|
| 418 |
if ($this->get_cfg('preserve_css') || $do) {
|
| 419 |
+
$this->tokens[] = array($type, ($type == COMMENT or $type == IMPORTANT_COMMENT) ? $data : trim($data));
|
| 420 |
}
|
| 421 |
}
|
| 422 |
|
| 952 |
if ($string{$i} === '*' && $string{$i + 1} === '/') {
|
| 953 |
$this->status = array_pop($this->from);
|
| 954 |
$i++;
|
| 955 |
+
if (strlen($cur_comment) > 1 and strncmp($cur_comment, '!', 1) === 0) {
|
| 956 |
+
$this->_add_token(IMPORTANT_COMMENT, $cur_comment);
|
| 957 |
+
$this->css_add_important_comment($cur_comment);
|
| 958 |
+
}
|
| 959 |
+
else {
|
| 960 |
+
$this->_add_token(COMMENT, $cur_comment);
|
| 961 |
+
}
|
| 962 |
$cur_comment = '';
|
| 963 |
} else {
|
| 964 |
$cur_comment .= $string{$i};
|
| 1047 |
return!(@($string{$pos - 1} !== '\\') || csstidy::escaped($string, $pos - 1));
|
| 1048 |
}
|
| 1049 |
|
| 1050 |
+
|
| 1051 |
+
/**
|
| 1052 |
+
* Add an important comment to the css code
|
| 1053 |
+
* (one we want to keep)
|
| 1054 |
+
* @param $comment
|
| 1055 |
+
*/
|
| 1056 |
+
public function css_add_important_comment($comment) {
|
| 1057 |
+
if ($this->get_cfg('preserve_css') || trim($comment) == '') {
|
| 1058 |
+
return;
|
| 1059 |
+
}
|
| 1060 |
+
if (!isset($this->css['!'])) {
|
| 1061 |
+
$this->css['!'] = '';
|
| 1062 |
+
}
|
| 1063 |
+
else {
|
| 1064 |
+
$this->css['!'] .= "\n";
|
| 1065 |
+
}
|
| 1066 |
+
$this->css['!'] .= $comment;
|
| 1067 |
+
}
|
| 1068 |
+
|
| 1069 |
/**
|
| 1070 |
* Adds a property with value to the existing CSS code
|
| 1071 |
* @param string $media
|
vendor/cerdic/css-tidy/class.csstidy_optimise.php
CHANGED
|
@@ -70,40 +70,60 @@ class csstidy_optimise {
|
|
| 70 |
* @version 1.0
|
| 71 |
*/
|
| 72 |
public function postparse() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 73 |
if ($this->parser->get_cfg('preserve_css')) {
|
| 74 |
return;
|
| 75 |
}
|
| 76 |
|
| 77 |
if ((int)$this->parser->get_cfg('merge_selectors') === 2) {
|
| 78 |
foreach ($this->css as $medium => $value) {
|
| 79 |
-
|
|
|
|
|
|
|
| 80 |
}
|
| 81 |
}
|
| 82 |
|
| 83 |
if ($this->parser->get_cfg('discard_invalid_selectors')) {
|
| 84 |
foreach ($this->css as $medium => $value) {
|
| 85 |
-
|
|
|
|
|
|
|
| 86 |
}
|
| 87 |
}
|
| 88 |
|
| 89 |
if ($this->parser->get_cfg('optimise_shorthands') > 0) {
|
| 90 |
foreach ($this->css as $medium => $value) {
|
| 91 |
-
|
| 92 |
-
$
|
|
|
|
|
|
|
| 93 |
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
|
| 98 |
-
|
| 99 |
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
|
|
|
| 107 |
}
|
| 108 |
}
|
| 109 |
}
|
|
@@ -525,12 +545,15 @@ class csstidy_optimise {
|
|
| 525 |
* Dissolves properties like padding:10px 10px 10px to padding-top:10px;padding-bottom:10px;...
|
| 526 |
* @param string $property
|
| 527 |
* @param string $value
|
|
|
|
| 528 |
* @return array
|
| 529 |
* @version 1.0
|
| 530 |
* @see merge_4value_shorthands()
|
| 531 |
*/
|
| 532 |
-
public function dissolve_4value_shorthands($property, $value) {
|
| 533 |
-
$shorthands
|
|
|
|
|
|
|
| 534 |
if (!is_array($shorthands[$property])) {
|
| 535 |
$return[$property] = $value;
|
| 536 |
return $return;
|
|
@@ -567,25 +590,66 @@ class csstidy_optimise {
|
|
| 567 |
return $return;
|
| 568 |
}
|
| 569 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 570 |
/**
|
| 571 |
* Explodes a string as explode() does, however, not if $sep is escaped or within a string.
|
| 572 |
* @param string $sep seperator
|
| 573 |
* @param string $string
|
|
|
|
| 574 |
* @return array
|
| 575 |
* @version 1.0
|
| 576 |
*/
|
| 577 |
-
public function explode_ws($sep, $string) {
|
| 578 |
$status = 'st';
|
| 579 |
$to = '';
|
| 580 |
|
| 581 |
-
$output = array(
|
|
|
|
|
|
|
| 582 |
$num = 0;
|
| 583 |
for ($i = 0, $len = strlen($string); $i < $len; $i++) {
|
| 584 |
switch ($status) {
|
| 585 |
case 'st':
|
| 586 |
if ($string{$i} == $sep && !$this->parser->escaped($string, $i)) {
|
| 587 |
++$num;
|
| 588 |
-
} elseif ($string{$i} === '"' || $string{$i} === '\'' || $string{$i} === '(' && !$this->parser->escaped($string, $i)) {
|
| 589 |
$status = 'str';
|
| 590 |
$to = ($string{$i} === '(') ? ')' : $string{$i};
|
| 591 |
(isset($output[$num])) ? $output[$num] .= $string{$i} : $output[$num] = $string{$i};
|
|
@@ -603,27 +667,26 @@ class csstidy_optimise {
|
|
| 603 |
}
|
| 604 |
}
|
| 605 |
|
| 606 |
-
|
| 607 |
-
return $output;
|
| 608 |
-
} else {
|
| 609 |
-
return array($output);
|
| 610 |
-
}
|
| 611 |
}
|
| 612 |
|
| 613 |
/**
|
| 614 |
* Merges Shorthand properties again, the opposite of dissolve_4value_shorthands()
|
| 615 |
* @param array $array
|
|
|
|
| 616 |
* @return array
|
| 617 |
* @version 1.2
|
| 618 |
* @see dissolve_4value_shorthands()
|
| 619 |
*/
|
| 620 |
-
public function merge_4value_shorthands($array) {
|
| 621 |
$return = $array;
|
| 622 |
-
$shorthands
|
|
|
|
|
|
|
| 623 |
|
| 624 |
foreach ($shorthands as $key => $value) {
|
| 625 |
-
if (isset($array[$value[0]]) && isset($array[$value[1]])
|
| 626 |
-
&& isset($array[$value[2]]) && isset($array[$value[3]])
|
| 627 |
$return[$key] = '';
|
| 628 |
|
| 629 |
$important = '';
|
|
@@ -643,6 +706,45 @@ class csstidy_optimise {
|
|
| 643 |
return $return;
|
| 644 |
}
|
| 645 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 646 |
/**
|
| 647 |
* Dissolve background property
|
| 648 |
* @param string $str_value
|
|
@@ -960,4 +1062,237 @@ class csstidy_optimise {
|
|
| 960 |
return $input_css;
|
| 961 |
}
|
| 962 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 963 |
}
|
| 70 |
* @version 1.0
|
| 71 |
*/
|
| 72 |
public function postparse() {
|
| 73 |
+
|
| 74 |
+
if ($this->parser->get_cfg('reverse_left_and_right') > 0) {
|
| 75 |
+
|
| 76 |
+
foreach ($this->css as $medium => $selectors) {
|
| 77 |
+
if (is_array($selectors)) {
|
| 78 |
+
foreach ($selectors as $selector => $properties) {
|
| 79 |
+
$this->css[$medium][$selector] = $this->reverse_left_and_right($this->css[$medium][$selector]);
|
| 80 |
+
}
|
| 81 |
+
}
|
| 82 |
+
}
|
| 83 |
+
|
| 84 |
+
}
|
| 85 |
+
|
| 86 |
if ($this->parser->get_cfg('preserve_css')) {
|
| 87 |
return;
|
| 88 |
}
|
| 89 |
|
| 90 |
if ((int)$this->parser->get_cfg('merge_selectors') === 2) {
|
| 91 |
foreach ($this->css as $medium => $value) {
|
| 92 |
+
if (is_array($value)) {
|
| 93 |
+
$this->merge_selectors($this->css[$medium]);
|
| 94 |
+
}
|
| 95 |
}
|
| 96 |
}
|
| 97 |
|
| 98 |
if ($this->parser->get_cfg('discard_invalid_selectors')) {
|
| 99 |
foreach ($this->css as $medium => $value) {
|
| 100 |
+
if (is_array($value)) {
|
| 101 |
+
$this->discard_invalid_selectors($this->css[$medium]);
|
| 102 |
+
}
|
| 103 |
}
|
| 104 |
}
|
| 105 |
|
| 106 |
if ($this->parser->get_cfg('optimise_shorthands') > 0) {
|
| 107 |
foreach ($this->css as $medium => $value) {
|
| 108 |
+
if (is_array($value)) {
|
| 109 |
+
foreach ($value as $selector => $value1) {
|
| 110 |
+
$this->css[$medium][$selector] = $this->merge_4value_shorthands($this->css[$medium][$selector]);
|
| 111 |
+
$this->css[$medium][$selector] = $this->merge_4value_radius_shorthands($this->css[$medium][$selector]);
|
| 112 |
|
| 113 |
+
if ($this->parser->get_cfg('optimise_shorthands') < 2) {
|
| 114 |
+
continue;
|
| 115 |
+
}
|
| 116 |
|
| 117 |
+
$this->css[$medium][$selector] = $this->merge_font($this->css[$medium][$selector]);
|
| 118 |
|
| 119 |
+
if ($this->parser->get_cfg('optimise_shorthands') < 3) {
|
| 120 |
+
continue;
|
| 121 |
+
}
|
| 122 |
|
| 123 |
+
$this->css[$medium][$selector] = $this->merge_bg($this->css[$medium][$selector]);
|
| 124 |
+
if (empty($this->css[$medium][$selector])) {
|
| 125 |
+
unset($this->css[$medium][$selector]);
|
| 126 |
+
}
|
| 127 |
}
|
| 128 |
}
|
| 129 |
}
|
| 545 |
* Dissolves properties like padding:10px 10px 10px to padding-top:10px;padding-bottom:10px;...
|
| 546 |
* @param string $property
|
| 547 |
* @param string $value
|
| 548 |
+
* @param array|null $shorthands
|
| 549 |
* @return array
|
| 550 |
* @version 1.0
|
| 551 |
* @see merge_4value_shorthands()
|
| 552 |
*/
|
| 553 |
+
public function dissolve_4value_shorthands($property, $value, $shorthands = null) {
|
| 554 |
+
if (is_null($shorthands)) {
|
| 555 |
+
$shorthands = & $this->parser->data['csstidy']['shorthands'];
|
| 556 |
+
}
|
| 557 |
if (!is_array($shorthands[$property])) {
|
| 558 |
$return[$property] = $value;
|
| 559 |
return $return;
|
| 590 |
return $return;
|
| 591 |
}
|
| 592 |
|
| 593 |
+
/**
|
| 594 |
+
* Dissolves radius properties like
|
| 595 |
+
* border-radius:10px 10px 10px / 1px 2px
|
| 596 |
+
* to border-top-left:10px 1px;border-top-right:10px 2x;...
|
| 597 |
+
* @param string $property
|
| 598 |
+
* @param string $value
|
| 599 |
+
* @return array
|
| 600 |
+
* @version 1.0
|
| 601 |
+
* @use dissolve_4value_shorthands()
|
| 602 |
+
* @see merge_4value_radius_shorthands()
|
| 603 |
+
*/
|
| 604 |
+
public function dissolve_4value_radius_shorthands($property, $value) {
|
| 605 |
+
$shorthands = & $this->parser->data['csstidy']['radius_shorthands'];
|
| 606 |
+
if (!is_array($shorthands[$property])) {
|
| 607 |
+
$return[$property] = $value;
|
| 608 |
+
return $return;
|
| 609 |
+
}
|
| 610 |
+
|
| 611 |
+
if (strpos($value, '/') !== false) {
|
| 612 |
+
$values = $this->explode_ws('/', $value);
|
| 613 |
+
if (count($values) == 2) {
|
| 614 |
+
$r[0] = $this->dissolve_4value_shorthands($property, trim($values[0]), $shorthands);
|
| 615 |
+
$r[1] = $this->dissolve_4value_shorthands($property, trim($values[1]), $shorthands);
|
| 616 |
+
$return = array();
|
| 617 |
+
foreach ($r[0] as $p=>$v) {
|
| 618 |
+
$return[$p] = $v;
|
| 619 |
+
if ($r[1][$p] !== $v) {
|
| 620 |
+
$return[$p] .= ' ' . $r[1][$p];
|
| 621 |
+
}
|
| 622 |
+
}
|
| 623 |
+
return $return;
|
| 624 |
+
}
|
| 625 |
+
}
|
| 626 |
+
|
| 627 |
+
$return = $this->dissolve_4value_shorthands($property, $value, $shorthands);
|
| 628 |
+
return $return;
|
| 629 |
+
}
|
| 630 |
+
|
| 631 |
/**
|
| 632 |
* Explodes a string as explode() does, however, not if $sep is escaped or within a string.
|
| 633 |
* @param string $sep seperator
|
| 634 |
* @param string $string
|
| 635 |
+
* @param bool $explode_in_parenthesis
|
| 636 |
* @return array
|
| 637 |
* @version 1.0
|
| 638 |
*/
|
| 639 |
+
public function explode_ws($sep, $string, $explode_in_parenthesis = false) {
|
| 640 |
$status = 'st';
|
| 641 |
$to = '';
|
| 642 |
|
| 643 |
+
$output = array(
|
| 644 |
+
0 => '',
|
| 645 |
+
);
|
| 646 |
$num = 0;
|
| 647 |
for ($i = 0, $len = strlen($string); $i < $len; $i++) {
|
| 648 |
switch ($status) {
|
| 649 |
case 'st':
|
| 650 |
if ($string{$i} == $sep && !$this->parser->escaped($string, $i)) {
|
| 651 |
++$num;
|
| 652 |
+
} elseif ($string{$i} === '"' || $string{$i} === '\'' || (!$explode_in_parenthesis && $string{$i} === '(') && !$this->parser->escaped($string, $i)) {
|
| 653 |
$status = 'str';
|
| 654 |
$to = ($string{$i} === '(') ? ')' : $string{$i};
|
| 655 |
(isset($output[$num])) ? $output[$num] .= $string{$i} : $output[$num] = $string{$i};
|
| 667 |
}
|
| 668 |
}
|
| 669 |
|
| 670 |
+
return $output;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 671 |
}
|
| 672 |
|
| 673 |
/**
|
| 674 |
* Merges Shorthand properties again, the opposite of dissolve_4value_shorthands()
|
| 675 |
* @param array $array
|
| 676 |
+
* @param array|null $shorthands
|
| 677 |
* @return array
|
| 678 |
* @version 1.2
|
| 679 |
* @see dissolve_4value_shorthands()
|
| 680 |
*/
|
| 681 |
+
public function merge_4value_shorthands($array, $shorthands = null) {
|
| 682 |
$return = $array;
|
| 683 |
+
if (is_null($shorthands)) {
|
| 684 |
+
$shorthands = & $this->parser->data['csstidy']['shorthands'];
|
| 685 |
+
}
|
| 686 |
|
| 687 |
foreach ($shorthands as $key => $value) {
|
| 688 |
+
if ($value !== 0 && isset($array[$value[0]]) && isset($array[$value[1]])
|
| 689 |
+
&& isset($array[$value[2]]) && isset($array[$value[3]])) {
|
| 690 |
$return[$key] = '';
|
| 691 |
|
| 692 |
$important = '';
|
| 706 |
return $return;
|
| 707 |
}
|
| 708 |
|
| 709 |
+
/**
|
| 710 |
+
* Merges Shorthand properties again, the opposite of dissolve_4value_shorthands()
|
| 711 |
+
* @param array $array
|
| 712 |
+
* @return array
|
| 713 |
+
* @version 1.2
|
| 714 |
+
* @use merge_4value_shorthands()
|
| 715 |
+
* @see dissolve_4value_radius_shorthands()
|
| 716 |
+
*/
|
| 717 |
+
public function merge_4value_radius_shorthands($array) {
|
| 718 |
+
$return = $array;
|
| 719 |
+
$shorthands = & $this->parser->data['csstidy']['radius_shorthands'];
|
| 720 |
+
|
| 721 |
+
foreach ($shorthands as $key => $value) {
|
| 722 |
+
if (isset($array[$value[0]]) && isset($array[$value[1]])
|
| 723 |
+
&& isset($array[$value[2]]) && isset($array[$value[3]]) && $value !== 0) {
|
| 724 |
+
$return[$key] = '';
|
| 725 |
+
$a = array();
|
| 726 |
+
for ($i = 0; $i < 4; $i++) {
|
| 727 |
+
$v = $this->explode_ws(' ', trim($array[$value[$i]]));
|
| 728 |
+
$a[0][$value[$i]] = reset($v);
|
| 729 |
+
$a[1][$value[$i]] = end($v);
|
| 730 |
+
}
|
| 731 |
+
$r = array();
|
| 732 |
+
$r[0] = $this->merge_4value_shorthands($a[0], $shorthands);
|
| 733 |
+
$r[1] = $this->merge_4value_shorthands($a[1], $shorthands);
|
| 734 |
+
|
| 735 |
+
if (isset($r[0][$key]) and isset($r[1][$key])) {
|
| 736 |
+
$return[$key] = $r[0][$key];
|
| 737 |
+
if ($r[1][$key] !== $r[0][$key]) {
|
| 738 |
+
$return[$key] .= ' / ' . $r[1][$key];
|
| 739 |
+
}
|
| 740 |
+
for ($i = 0; $i < 4; $i++) {
|
| 741 |
+
unset($return[$value[$i]]);
|
| 742 |
+
}
|
| 743 |
+
}
|
| 744 |
+
}
|
| 745 |
+
}
|
| 746 |
+
return $return;
|
| 747 |
+
}
|
| 748 |
/**
|
| 749 |
* Dissolve background property
|
| 750 |
* @param string $str_value
|
| 1062 |
return $input_css;
|
| 1063 |
}
|
| 1064 |
|
| 1065 |
+
/**
|
| 1066 |
+
* Reverse left vs right in a list of properties/values
|
| 1067 |
+
* @param array $array
|
| 1068 |
+
* @return array
|
| 1069 |
+
*/
|
| 1070 |
+
public function reverse_left_and_right($array) {
|
| 1071 |
+
$return = array();
|
| 1072 |
+
|
| 1073 |
+
// change left <-> right in properties name and values
|
| 1074 |
+
foreach ($array as $propertie => $value) {
|
| 1075 |
+
|
| 1076 |
+
if (method_exists($this, $m = 'reverse_left_and_right_' . str_replace('-','_',trim($propertie)))) {
|
| 1077 |
+
$value = $this->$m($value);
|
| 1078 |
+
}
|
| 1079 |
+
|
| 1080 |
+
// simple replacement for properties
|
| 1081 |
+
$propertie = str_ireplace(array('left', 'right' ,"\x1"), array("\x1", 'left', 'right') , $propertie);
|
| 1082 |
+
// be careful for values, not modifying protected or quoted valued
|
| 1083 |
+
foreach (array('left' => "\x1", 'right' => 'left', "\x1" => 'right') as $v => $r) {
|
| 1084 |
+
if (strpos($value, $v) !== false) {
|
| 1085 |
+
// attraper les left et right separes du reste (pas au milieu d'un mot)
|
| 1086 |
+
if (in_array($v, array('left', 'right') )) {
|
| 1087 |
+
$value = preg_replace(",\\b$v\\b,", "\x0" , $value);
|
| 1088 |
+
}
|
| 1089 |
+
else {
|
| 1090 |
+
$value = str_replace($v, "\x0" , $value);
|
| 1091 |
+
}
|
| 1092 |
+
$value = $this->explode_ws("\x0", $value . ' ', true);
|
| 1093 |
+
$value = rtrim(implode($r, $value));
|
| 1094 |
+
$value = str_replace("\x0" , $v, $value);
|
| 1095 |
+
}
|
| 1096 |
+
}
|
| 1097 |
+
$return[$propertie] = $value;
|
| 1098 |
+
}
|
| 1099 |
+
|
| 1100 |
+
return $return;
|
| 1101 |
+
}
|
| 1102 |
+
|
| 1103 |
+
/**
|
| 1104 |
+
* Reversing 4 values shorthands properties
|
| 1105 |
+
* @param string $value
|
| 1106 |
+
* @return string
|
| 1107 |
+
*/
|
| 1108 |
+
public function reverse_left_and_right_4value_shorthands($property, $value) {
|
| 1109 |
+
$shorthands = & $this->parser->data['csstidy']['shorthands'];
|
| 1110 |
+
if (isset($shorthands[$property])) {
|
| 1111 |
+
$property_right = $shorthands[$property][1];
|
| 1112 |
+
$property_left = $shorthands[$property][3];
|
| 1113 |
+
$v = $this->dissolve_4value_shorthands($property, $value);
|
| 1114 |
+
if ($v[$property_left] !== $v[$property_right]) {
|
| 1115 |
+
$r = $v[$property_right];
|
| 1116 |
+
$v[$property_right] = $v[$property_left];
|
| 1117 |
+
$v[$property_left] = $r;
|
| 1118 |
+
$v = $this->merge_4value_shorthands($v);
|
| 1119 |
+
if (isset($v[$property])) {
|
| 1120 |
+
return $v[$property];
|
| 1121 |
+
}
|
| 1122 |
+
}
|
| 1123 |
+
}
|
| 1124 |
+
return $value;
|
| 1125 |
+
}
|
| 1126 |
+
|
| 1127 |
+
/**
|
| 1128 |
+
* Reversing 4 values radius shorthands properties
|
| 1129 |
+
* @param string $value
|
| 1130 |
+
* @return string
|
| 1131 |
+
*/
|
| 1132 |
+
public function reverse_left_and_right_4value_radius_shorthands($property, $value) {
|
| 1133 |
+
$shorthands = & $this->parser->data['csstidy']['radius_shorthands'];
|
| 1134 |
+
if (isset($shorthands[$property])) {
|
| 1135 |
+
$v = $this->dissolve_4value_radius_shorthands($property, $value);
|
| 1136 |
+
if ($v[$shorthands[$property][0]] !== $v[$shorthands[$property][1]]
|
| 1137 |
+
or $v[$shorthands[$property][2]] !== $v[$shorthands[$property][3]]) {
|
| 1138 |
+
$r = array(
|
| 1139 |
+
$shorthands[$property][0] => $v[$shorthands[$property][1]],
|
| 1140 |
+
$shorthands[$property][1] => $v[$shorthands[$property][0]],
|
| 1141 |
+
$shorthands[$property][2] => $v[$shorthands[$property][3]],
|
| 1142 |
+
$shorthands[$property][3] => $v[$shorthands[$property][2]],
|
| 1143 |
+
);
|
| 1144 |
+
$v = $this->merge_4value_radius_shorthands($r);
|
| 1145 |
+
if (isset($v[$property])) {
|
| 1146 |
+
return $v[$property];
|
| 1147 |
+
}
|
| 1148 |
+
}
|
| 1149 |
+
}
|
| 1150 |
+
return $value;
|
| 1151 |
+
}
|
| 1152 |
+
|
| 1153 |
+
/**
|
| 1154 |
+
* Reversing margin shorthands
|
| 1155 |
+
* @param string $value
|
| 1156 |
+
* @return string
|
| 1157 |
+
*/
|
| 1158 |
+
public function reverse_left_and_right_margin($value) {
|
| 1159 |
+
return $this->reverse_left_and_right_4value_shorthands('margin', $value);
|
| 1160 |
+
}
|
| 1161 |
+
|
| 1162 |
+
/**
|
| 1163 |
+
* Reversing padding shorthands
|
| 1164 |
+
* @param string $value
|
| 1165 |
+
* @return string
|
| 1166 |
+
*/
|
| 1167 |
+
public function reverse_left_and_right_padding($value) {
|
| 1168 |
+
return $this->reverse_left_and_right_4value_shorthands('padding', $value);
|
| 1169 |
+
}
|
| 1170 |
+
|
| 1171 |
+
/**
|
| 1172 |
+
* Reversing border-color shorthands
|
| 1173 |
+
* @param string $value
|
| 1174 |
+
* @return string
|
| 1175 |
+
*/
|
| 1176 |
+
public function reverse_left_and_right_border_color($value) {
|
| 1177 |
+
return $this->reverse_left_and_right_4value_shorthands('border-color', $value);
|
| 1178 |
+
}
|
| 1179 |
+
|
| 1180 |
+
/**
|
| 1181 |
+
* Reversing border-style shorthands
|
| 1182 |
+
* @param string $value
|
| 1183 |
+
* @return string
|
| 1184 |
+
*/
|
| 1185 |
+
public function reverse_left_and_right_border_style($value) {
|
| 1186 |
+
return $this->reverse_left_and_right_4value_shorthands('border-style', $value);
|
| 1187 |
+
}
|
| 1188 |
+
|
| 1189 |
+
/**
|
| 1190 |
+
* Reversing border-width shorthands
|
| 1191 |
+
* @param string $value
|
| 1192 |
+
* @return string
|
| 1193 |
+
*/
|
| 1194 |
+
public function reverse_left_and_right_border_width($value) {
|
| 1195 |
+
return $this->reverse_left_and_right_4value_shorthands('border-width', $value);
|
| 1196 |
+
}
|
| 1197 |
+
|
| 1198 |
+
/**
|
| 1199 |
+
* Reversing border-radius shorthands
|
| 1200 |
+
* @param string $value
|
| 1201 |
+
* @return string
|
| 1202 |
+
*/
|
| 1203 |
+
public function reverse_left_and_right_border_radius($value) {
|
| 1204 |
+
return $this->reverse_left_and_right_4value_radius_shorthands('border-radius', $value);
|
| 1205 |
+
}
|
| 1206 |
+
|
| 1207 |
+
/**
|
| 1208 |
+
* Reversing border-radius shorthands
|
| 1209 |
+
* @param string $value
|
| 1210 |
+
* @return string
|
| 1211 |
+
*/
|
| 1212 |
+
public function reverse_left_and_right__moz_border_radius($value) {
|
| 1213 |
+
return $this->reverse_left_and_right_4value_radius_shorthands('border-radius', $value);
|
| 1214 |
+
}
|
| 1215 |
+
|
| 1216 |
+
/**
|
| 1217 |
+
* Reversing border-radius shorthands
|
| 1218 |
+
* @param string $value
|
| 1219 |
+
* @return string
|
| 1220 |
+
*/
|
| 1221 |
+
public function reverse_left_and_right__webkit_border_radius($value) {
|
| 1222 |
+
return $this->reverse_left_and_right_4value_radius_shorthands('border-radius', $value);
|
| 1223 |
+
}
|
| 1224 |
+
|
| 1225 |
+
|
| 1226 |
+
/**
|
| 1227 |
+
* Reversing background shorthands
|
| 1228 |
+
* @param string $value
|
| 1229 |
+
* @return string
|
| 1230 |
+
*/
|
| 1231 |
+
public function reverse_left_and_right_background($value) {
|
| 1232 |
+
$values = $this->dissolve_short_bg($value);
|
| 1233 |
+
if (isset($values['background-position']) and $values['background-position']) {
|
| 1234 |
+
$v = $this->reverse_left_and_right_background_position($values['background-position']);
|
| 1235 |
+
if ($v !== $values['background-position']) {
|
| 1236 |
+
if ($value == $values['background-position']) {
|
| 1237 |
+
return $v;
|
| 1238 |
+
}
|
| 1239 |
+
else {
|
| 1240 |
+
$values['background-position'] = $v;
|
| 1241 |
+
$x = $this->merge_bg($values);
|
| 1242 |
+
if (isset($x['background'])) {
|
| 1243 |
+
return $x['background'];
|
| 1244 |
+
}
|
| 1245 |
+
}
|
| 1246 |
+
}
|
| 1247 |
+
}
|
| 1248 |
+
return $value;
|
| 1249 |
+
}
|
| 1250 |
+
|
| 1251 |
+
/**
|
| 1252 |
+
* Reversing background position shorthands
|
| 1253 |
+
* @param string $value
|
| 1254 |
+
* @return string
|
| 1255 |
+
*/
|
| 1256 |
+
public function reverse_left_and_right_background_position_x($value) {
|
| 1257 |
+
return $this->reverse_left_and_right_background_position($value);
|
| 1258 |
+
}
|
| 1259 |
+
|
| 1260 |
+
/**
|
| 1261 |
+
* Reversing background position shorthands
|
| 1262 |
+
* @param string $value
|
| 1263 |
+
* @return string
|
| 1264 |
+
*/
|
| 1265 |
+
public function reverse_left_and_right_background_position($value) {
|
| 1266 |
+
// multiple background case
|
| 1267 |
+
if (strpos($value, ',') !== false) {
|
| 1268 |
+
$values = $this->explode_ws(',', $value);
|
| 1269 |
+
if (count($values) > 1) {
|
| 1270 |
+
foreach ($values as $k=>$v) {
|
| 1271 |
+
$values[$k] = $this->reverse_left_and_right_background_position($v);
|
| 1272 |
+
}
|
| 1273 |
+
return implode(',', $values);
|
| 1274 |
+
}
|
| 1275 |
+
}
|
| 1276 |
+
|
| 1277 |
+
// if no explicit left or right value
|
| 1278 |
+
if (stripos($value, 'left') === false and stripos($value, 'right') === false) {
|
| 1279 |
+
$values = $this->explode_ws(' ', trim($value));
|
| 1280 |
+
$values = array_map('trim', $values);
|
| 1281 |
+
$values = array_filter($values);
|
| 1282 |
+
$values = array_values($values);
|
| 1283 |
+
if (count($values) == 1) {
|
| 1284 |
+
return "left $value";
|
| 1285 |
+
}
|
| 1286 |
+
if ($values[1] == 'top' or $values[1] == 'bottom') {
|
| 1287 |
+
return 'left ' . implode(' ', $values);
|
| 1288 |
+
}
|
| 1289 |
+
else {
|
| 1290 |
+
$last = array_pop($values);
|
| 1291 |
+
return implode(' ', $values) . ' left ' . $last;
|
| 1292 |
+
}
|
| 1293 |
+
}
|
| 1294 |
+
|
| 1295 |
+
return $value;
|
| 1296 |
+
}
|
| 1297 |
+
|
| 1298 |
}
|
vendor/cerdic/css-tidy/class.csstidy_print.php
CHANGED
|
@@ -269,6 +269,7 @@ class csstidy_print {
|
|
| 269 |
$in_at_out = '';
|
| 270 |
break;
|
| 271 |
|
|
|
|
| 272 |
case COMMENT:
|
| 273 |
$out .= $template[11] . '/*' . $this->_htmlsp($token[1], $plain) . '*/' . $template[12];
|
| 274 |
break;
|
|
@@ -319,6 +320,12 @@ class csstidy_print {
|
|
| 319 |
$sort_selectors = $this->parser->get_cfg('sort_selectors');
|
| 320 |
$sort_properties = $this->parser->get_cfg('sort_properties');
|
| 321 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 322 |
foreach ($this->css as $medium => $val) {
|
| 323 |
if ($sort_selectors)
|
| 324 |
ksort($val);
|
| 269 |
$in_at_out = '';
|
| 270 |
break;
|
| 271 |
|
| 272 |
+
case IMPORTANT_COMMENT:
|
| 273 |
case COMMENT:
|
| 274 |
$out .= $template[11] . '/*' . $this->_htmlsp($token[1], $plain) . '*/' . $template[12];
|
| 275 |
break;
|
| 320 |
$sort_selectors = $this->parser->get_cfg('sort_selectors');
|
| 321 |
$sort_properties = $this->parser->get_cfg('sort_properties');
|
| 322 |
|
| 323 |
+
// important comment section ?
|
| 324 |
+
if (isset($this->css['!'])) {
|
| 325 |
+
$this->parser->_add_token(IMPORTANT_COMMENT, rtrim($this->css['!']), true);
|
| 326 |
+
unset($this->css['!']);
|
| 327 |
+
}
|
| 328 |
+
|
| 329 |
foreach ($this->css as $medium => $val) {
|
| 330 |
if ($sort_selectors)
|
| 331 |
ksort($val);
|
vendor/cerdic/css-tidy/data.inc.php
CHANGED
|
@@ -274,7 +274,10 @@ $data['csstidy']['shorthands']['border-style'] = array('border-top-style','borde
|
|
| 274 |
$data['csstidy']['shorthands']['border-width'] = array('border-top-width','border-right-width','border-bottom-width','border-left-width');
|
| 275 |
$data['csstidy']['shorthands']['margin'] = array('margin-top','margin-right','margin-bottom','margin-left');
|
| 276 |
$data['csstidy']['shorthands']['padding'] = array('padding-top','padding-right','padding-bottom','padding-left');
|
| 277 |
-
|
|
|
|
|
|
|
|
|
|
| 278 |
|
| 279 |
/**
|
| 280 |
* All CSS Properties. Needed for csstidy::property_is_next()
|
|
@@ -612,7 +615,7 @@ $data['csstidy']['predefined_templates']['high_compression'][] = "\n";
|
|
| 612 |
$data['csstidy']['predefined_templates']['high_compression'][] = "\n". '<span class="format">}'."\n".'</span>';
|
| 613 |
$data['csstidy']['predefined_templates']['high_compression'][] = '';
|
| 614 |
$data['csstidy']['predefined_templates']['high_compression'][] = '<span class="comment">'; // before comment
|
| 615 |
-
$data['csstidy']['predefined_templates']['high_compression'][] = '</span>'; // after comment
|
| 616 |
$data['csstidy']['predefined_templates']['high_compression'][] = "\n";
|
| 617 |
|
| 618 |
$data['csstidy']['predefined_templates']['highest_compression'][] = '<span class="at">';
|
| 274 |
$data['csstidy']['shorthands']['border-width'] = array('border-top-width','border-right-width','border-bottom-width','border-left-width');
|
| 275 |
$data['csstidy']['shorthands']['margin'] = array('margin-top','margin-right','margin-bottom','margin-left');
|
| 276 |
$data['csstidy']['shorthands']['padding'] = array('padding-top','padding-right','padding-bottom','padding-left');
|
| 277 |
+
|
| 278 |
+
$data['csstidy']['radius_shorthands']['border-radius'] = array('border-top-left-radius','border-top-right-radius','border-bottom-right-radius','border-bottom-left-radius');
|
| 279 |
+
$data['csstidy']['radius_shorthands']['-webkit-border-radius'] = array('-webkit-border-top-left-radius','-webkit-border-top-right-radius','-webkit-border-bottom-right-radius','-webkit-border-bottom-left-radius');
|
| 280 |
+
$data['csstidy']['radius_shorthands']['-moz-border-radius'] = array('-moz-border-radius-topleft','-moz-border-radius-topright','-moz-border-radius-bottomright','-moz-border-radius-bottomleft');
|
| 281 |
|
| 282 |
/**
|
| 283 |
* All CSS Properties. Needed for csstidy::property_is_next()
|
| 615 |
$data['csstidy']['predefined_templates']['high_compression'][] = "\n". '<span class="format">}'."\n".'</span>';
|
| 616 |
$data['csstidy']['predefined_templates']['high_compression'][] = '';
|
| 617 |
$data['csstidy']['predefined_templates']['high_compression'][] = '<span class="comment">'; // before comment
|
| 618 |
+
$data['csstidy']['predefined_templates']['high_compression'][] = '</span>'."\n"; // after comment
|
| 619 |
$data['csstidy']['predefined_templates']['high_compression'][] = "\n";
|
| 620 |
|
| 621 |
$data['csstidy']['predefined_templates']['highest_compression'][] = '<span class="at">';
|
vendor/cerdic/css-tidy/lang.inc.php
CHANGED
|
@@ -38,7 +38,7 @@ if (isset($_GET['lang'])) {
|
|
| 38 |
|
| 39 |
$l = (in_array($l, array('de', 'fr', 'zh'))) ? $l : 'en';
|
| 40 |
|
| 41 |
-
// note
|
| 42 |
|
| 43 |
$lang = array();
|
| 44 |
$lang['en'][0] = 'CSS Formatter and Optimiser/Optimizer (based on CSSTidy ';
|
|
@@ -106,7 +106,7 @@ $lang['en'][63] = 'Output CSS code as complete HTML document';
|
|
| 106 |
$lang['en'][64] = 'Code';
|
| 107 |
$lang['en'][65] = 'CSS to style CSS output';
|
| 108 |
$lang['en'][66] = 'You need to go to about:config in your URL bar, select \'signed.applets.codebase_principal_support\' in the filter field, and set its value to true in order to use this feature; however, be aware that doing so increases security risks.';
|
| 109 |
-
|
| 110 |
|
| 111 |
$lang['de'][0] = 'CSS Formatierer und Optimierer (basierend auf CSSTidy ';
|
| 112 |
$lang['de'][1] = 'CSS Formatierer und Optimierer';
|
|
@@ -240,6 +240,8 @@ $lang['fr'][63] = 'Sauver le code CSS comme document complet HTML';
|
|
| 240 |
$lang['fr'][64] = 'Code';
|
| 241 |
$lang['fr'][65] = 'CSS pour colorier la sortie CSS';
|
| 242 |
$lang['fr'][66] = 'Vous devez aller dans about:config dans votre barre d’adresse, sélectionner \'signed.applets.codebase_principal_support\' dans le champ Filtre et attribuez-lui la valeur \'true\' pour utiliser cette fonctionnalité; toutefois, soyez conscient que cela augmente les risques de sécurité.';
|
|
|
|
|
|
|
| 243 |
|
| 244 |
|
| 245 |
$lang['zh'][0] = 'CSS整形與最佳化工具(使用 CSSTidy ';
|
| 38 |
|
| 39 |
$l = (in_array($l, array('de', 'fr', 'zh'))) ? $l : 'en';
|
| 40 |
|
| 41 |
+
// note 67 in all but English&French, and 5 and 40 in all are orphaned
|
| 42 |
|
| 43 |
$lang = array();
|
| 44 |
$lang['en'][0] = 'CSS Formatter and Optimiser/Optimizer (based on CSSTidy ';
|
| 106 |
$lang['en'][64] = 'Code';
|
| 107 |
$lang['en'][65] = 'CSS to style CSS output';
|
| 108 |
$lang['en'][66] = 'You need to go to about:config in your URL bar, select \'signed.applets.codebase_principal_support\' in the filter field, and set its value to true in order to use this feature; however, be aware that doing so increases security risks.';
|
| 109 |
+
$lang['en'][67] = 'Reverse left and right directions';
|
| 110 |
|
| 111 |
$lang['de'][0] = 'CSS Formatierer und Optimierer (basierend auf CSSTidy ';
|
| 112 |
$lang['de'][1] = 'CSS Formatierer und Optimierer';
|
| 240 |
$lang['fr'][64] = 'Code';
|
| 241 |
$lang['fr'][65] = 'CSS pour colorier la sortie CSS';
|
| 242 |
$lang['fr'][66] = 'Vous devez aller dans about:config dans votre barre d’adresse, sélectionner \'signed.applets.codebase_principal_support\' dans le champ Filtre et attribuez-lui la valeur \'true\' pour utiliser cette fonctionnalité; toutefois, soyez conscient que cela augmente les risques de sécurité.';
|
| 243 |
+
$lang['fr'][67] = 'Inverser gauche et droite';
|
| 244 |
+
|
| 245 |
|
| 246 |
|
| 247 |
$lang['zh'][0] = 'CSS整形與最佳化工具(使用 CSSTidy ';
|
vendor/composer/ClassLoader.php
CHANGED
|
@@ -377,11 +377,11 @@ class ClassLoader
|
|
| 377 |
$subPath = $class;
|
| 378 |
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
| 379 |
$subPath = substr($subPath, 0, $lastPos);
|
| 380 |
-
$search = $subPath
|
| 381 |
if (isset($this->prefixDirsPsr4[$search])) {
|
| 382 |
-
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
|
| 383 |
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
| 384 |
-
|
|
|
|
| 385 |
return $file;
|
| 386 |
}
|
| 387 |
}
|
| 377 |
$subPath = $class;
|
| 378 |
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
| 379 |
$subPath = substr($subPath, 0, $lastPos);
|
| 380 |
+
$search = $subPath.'\\';
|
| 381 |
if (isset($this->prefixDirsPsr4[$search])) {
|
|
|
|
| 382 |
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
| 383 |
+
$length = $this->prefixLengthsPsr4[$first][$search];
|
| 384 |
+
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
|
| 385 |
return $file;
|
| 386 |
}
|
| 387 |
}
|
vendor/composer/autoload_classmap.php
CHANGED
|
@@ -343,6 +343,7 @@ return array(
|
|
| 343 |
'MailPoet\\Statistics\\Track\\Clicks' => $baseDir . '/lib/Statistics/Track/Clicks.php',
|
| 344 |
'MailPoet\\Statistics\\Track\\Opens' => $baseDir . '/lib/Statistics/Track/Opens.php',
|
| 345 |
'MailPoet\\Statistics\\Track\\Unsubscribes' => $baseDir . '/lib/Statistics/Track/Unsubscribes.php',
|
|
|
|
| 346 |
'MailPoet\\Subscribers\\ImportExport\\Export\\DefaultSubscribersGetter' => $baseDir . '/lib/Subscribers/ImportExport/Export/DefaultSubscribersGetter.php',
|
| 347 |
'MailPoet\\Subscribers\\ImportExport\\Export\\DynamicSubscribersGetter' => $baseDir . '/lib/Subscribers/ImportExport/Export/DynamicSubscribersGetter.php',
|
| 348 |
'MailPoet\\Subscribers\\ImportExport\\Export\\Export' => $baseDir . '/lib/Subscribers/ImportExport/Export/Export.php',
|
|
@@ -354,6 +355,7 @@ return array(
|
|
| 354 |
'MailPoet\\Subscribers\\ImportExport\\PersonalDataExporters\\NewslettersExporter' => $baseDir . '/lib/Subscribers/ImportExport/PersonalDataExporters/NewslettersExporter.php',
|
| 355 |
'MailPoet\\Subscribers\\ImportExport\\PersonalDataExporters\\SegmentsExporter' => $baseDir . '/lib/Subscribers/ImportExport/PersonalDataExporters/SegmentsExporter.php',
|
| 356 |
'MailPoet\\Subscribers\\ImportExport\\PersonalDataExporters\\SubscriberExporter' => $baseDir . '/lib/Subscribers/ImportExport/PersonalDataExporters/SubscriberExporter.php',
|
|
|
|
| 357 |
'MailPoet\\Subscribers\\RequiredCustomFieldValidator' => $baseDir . '/lib/Subscribers/RequiredCustomFieldValidator.php',
|
| 358 |
'MailPoet\\Subscribers\\Source' => $baseDir . '/lib/Subscribers/Source.php',
|
| 359 |
'MailPoet\\Subscribers\\SubscriberPersonalDataEraser' => $baseDir . '/lib/Subscribers/SubscriberPersonalDataEraser.php',
|
|
@@ -383,6 +385,7 @@ return array(
|
|
| 383 |
'MailPoet\\Util\\License\\Features\\Subscribers' => $baseDir . '/lib/Util/License/Features/Subscribers.php',
|
| 384 |
'MailPoet\\Util\\License\\License' => $baseDir . '/lib/Util/License/License.php',
|
| 385 |
'MailPoet\\Util\\Notices\\AfterMigrationNotice' => $baseDir . '/lib/Util/Notices/AfterMigrationNotice.php',
|
|
|
|
| 386 |
'MailPoet\\Util\\Notices\\PHPVersionWarnings' => $baseDir . '/lib/Util/Notices/PHPVersionWarnings.php',
|
| 387 |
'MailPoet\\Util\\Notices\\PermanentNotices' => $baseDir . '/lib/Util/Notices/PermanentNotices.php',
|
| 388 |
'MailPoet\\Util\\ProgressBar' => $baseDir . '/lib/Util/ProgressBar.php',
|
|
@@ -539,23 +542,19 @@ return array(
|
|
| 539 |
'Sabberworm\\CSS\\Value\\Value' => $vendorDir . '/sabberworm/php-css-parser/lib/Sabberworm/CSS/Value/Value.php',
|
| 540 |
'Sabberworm\\CSS\\Value\\ValueList' => $vendorDir . '/sabberworm/php-css-parser/lib/Sabberworm/CSS/Value/ValueList.php',
|
| 541 |
'SensioLabs\\Security\\Command\\SecurityCheckerCommand' => $vendorDir . '/sensiolabs/security-checker/SensioLabs/Security/Command/SecurityCheckerCommand.php',
|
| 542 |
-
'SensioLabs\\Security\\Crawler
|
| 543 |
-
'SensioLabs\\Security\\Crawler\\CrawlerInterface' => $vendorDir . '/sensiolabs/security-checker/SensioLabs/Security/Crawler/CrawlerInterface.php',
|
| 544 |
-
'SensioLabs\\Security\\Crawler\\CurlCrawler' => $vendorDir . '/sensiolabs/security-checker/SensioLabs/Security/Crawler/CurlCrawler.php',
|
| 545 |
-
'SensioLabs\\Security\\Crawler\\DefaultCrawler' => $vendorDir . '/sensiolabs/security-checker/SensioLabs/Security/Crawler/DefaultCrawler.php',
|
| 546 |
-
'SensioLabs\\Security\\Crawler\\FileGetContentsCrawler' => $vendorDir . '/sensiolabs/security-checker/SensioLabs/Security/Crawler/FileGetContentsCrawler.php',
|
| 547 |
'SensioLabs\\Security\\Exception\\ExceptionInterface' => $vendorDir . '/sensiolabs/security-checker/SensioLabs/Security/Exception/ExceptionInterface.php',
|
| 548 |
'SensioLabs\\Security\\Exception\\HttpException' => $vendorDir . '/sensiolabs/security-checker/SensioLabs/Security/Exception/HttpException.php',
|
| 549 |
'SensioLabs\\Security\\Exception\\RuntimeException' => $vendorDir . '/sensiolabs/security-checker/SensioLabs/Security/Exception/RuntimeException.php',
|
| 550 |
-
'SensioLabs\\Security\\
|
| 551 |
-
'SensioLabs\\Security\\Formatters\\JsonFormatter' => $vendorDir . '/sensiolabs/security-checker/SensioLabs/Security/Formatters/JsonFormatter.php',
|
| 552 |
-
'SensioLabs\\Security\\Formatters\\SimpleFormatter' => $vendorDir . '/sensiolabs/security-checker/SensioLabs/Security/Formatters/SimpleFormatter.php',
|
| 553 |
-
'SensioLabs\\Security\\Formatters\\TextFormatter' => $vendorDir . '/sensiolabs/security-checker/SensioLabs/Security/Formatters/TextFormatter.php',
|
| 554 |
'SensioLabs\\Security\\SecurityChecker' => $vendorDir . '/sensiolabs/security-checker/SensioLabs/Security/SecurityChecker.php',
|
| 555 |
'Sudzy\\Engine' => $baseDir . '/lib/Util/Sudzy/Engine.php',
|
| 556 |
'Sudzy\\ValidModel' => $baseDir . '/lib/Util/Sudzy/ValidModel.php',
|
| 557 |
'Sudzy\\ValidationException' => $baseDir . '/lib/Util/Sudzy/ValidationException.php',
|
| 558 |
'Symfony\\Component\\Console\\Application' => $vendorDir . '/symfony/console/Application.php',
|
|
|
|
|
|
|
|
|
|
| 559 |
'Symfony\\Component\\Console\\Command\\Command' => $vendorDir . '/symfony/console/Command/Command.php',
|
| 560 |
'Symfony\\Component\\Console\\Command\\HelpCommand' => $vendorDir . '/symfony/console/Command/HelpCommand.php',
|
| 561 |
'Symfony\\Component\\Console\\Command\\ListCommand' => $vendorDir . '/symfony/console/Command/ListCommand.php',
|
| 343 |
'MailPoet\\Statistics\\Track\\Clicks' => $baseDir . '/lib/Statistics/Track/Clicks.php',
|
| 344 |
'MailPoet\\Statistics\\Track\\Opens' => $baseDir . '/lib/Statistics/Track/Opens.php',
|
| 345 |
'MailPoet\\Statistics\\Track\\Unsubscribes' => $baseDir . '/lib/Statistics/Track/Unsubscribes.php',
|
| 346 |
+
'MailPoet\\Subscribers\\ConfirmationEmailMailer' => $baseDir . '/lib/Subscribers/ConfirmationEmailMailer.php',
|
| 347 |
'MailPoet\\Subscribers\\ImportExport\\Export\\DefaultSubscribersGetter' => $baseDir . '/lib/Subscribers/ImportExport/Export/DefaultSubscribersGetter.php',
|
| 348 |
'MailPoet\\Subscribers\\ImportExport\\Export\\DynamicSubscribersGetter' => $baseDir . '/lib/Subscribers/ImportExport/Export/DynamicSubscribersGetter.php',
|
| 349 |
'MailPoet\\Subscribers\\ImportExport\\Export\\Export' => $baseDir . '/lib/Subscribers/ImportExport/Export/Export.php',
|
| 355 |
'MailPoet\\Subscribers\\ImportExport\\PersonalDataExporters\\NewslettersExporter' => $baseDir . '/lib/Subscribers/ImportExport/PersonalDataExporters/NewslettersExporter.php',
|
| 356 |
'MailPoet\\Subscribers\\ImportExport\\PersonalDataExporters\\SegmentsExporter' => $baseDir . '/lib/Subscribers/ImportExport/PersonalDataExporters/SegmentsExporter.php',
|
| 357 |
'MailPoet\\Subscribers\\ImportExport\\PersonalDataExporters\\SubscriberExporter' => $baseDir . '/lib/Subscribers/ImportExport/PersonalDataExporters/SubscriberExporter.php',
|
| 358 |
+
'MailPoet\\Subscribers\\NewSubscriberNotificationMailer' => $baseDir . '/lib/Subscribers/NewSubscriberNotificationMailer.php',
|
| 359 |
'MailPoet\\Subscribers\\RequiredCustomFieldValidator' => $baseDir . '/lib/Subscribers/RequiredCustomFieldValidator.php',
|
| 360 |
'MailPoet\\Subscribers\\Source' => $baseDir . '/lib/Subscribers/Source.php',
|
| 361 |
'MailPoet\\Subscribers\\SubscriberPersonalDataEraser' => $baseDir . '/lib/Subscribers/SubscriberPersonalDataEraser.php',
|
| 385 |
'MailPoet\\Util\\License\\Features\\Subscribers' => $baseDir . '/lib/Util/License/Features/Subscribers.php',
|
| 386 |
'MailPoet\\Util\\License\\License' => $baseDir . '/lib/Util/License/License.php',
|
| 387 |
'MailPoet\\Util\\Notices\\AfterMigrationNotice' => $baseDir . '/lib/Util/Notices/AfterMigrationNotice.php',
|
| 388 |
+
'MailPoet\\Util\\Notices\\DiscountsAnnouncement' => $baseDir . '/lib/Util/Notices/DiscountsAnnouncement.php',
|
| 389 |
'MailPoet\\Util\\Notices\\PHPVersionWarnings' => $baseDir . '/lib/Util/Notices/PHPVersionWarnings.php',
|
| 390 |
'MailPoet\\Util\\Notices\\PermanentNotices' => $baseDir . '/lib/Util/Notices/PermanentNotices.php',
|
| 391 |
'MailPoet\\Util\\ProgressBar' => $baseDir . '/lib/Util/ProgressBar.php',
|
| 542 |
'Sabberworm\\CSS\\Value\\Value' => $vendorDir . '/sabberworm/php-css-parser/lib/Sabberworm/CSS/Value/Value.php',
|
| 543 |
'Sabberworm\\CSS\\Value\\ValueList' => $vendorDir . '/sabberworm/php-css-parser/lib/Sabberworm/CSS/Value/ValueList.php',
|
| 544 |
'SensioLabs\\Security\\Command\\SecurityCheckerCommand' => $vendorDir . '/sensiolabs/security-checker/SensioLabs/Security/Command/SecurityCheckerCommand.php',
|
| 545 |
+
'SensioLabs\\Security\\Crawler' => $vendorDir . '/sensiolabs/security-checker/SensioLabs/Security/Crawler.php',
|
|
|
|
|
|
|
|
|
|
|
|
|
| 546 |
'SensioLabs\\Security\\Exception\\ExceptionInterface' => $vendorDir . '/sensiolabs/security-checker/SensioLabs/Security/Exception/ExceptionInterface.php',
|
| 547 |
'SensioLabs\\Security\\Exception\\HttpException' => $vendorDir . '/sensiolabs/security-checker/SensioLabs/Security/Exception/HttpException.php',
|
| 548 |
'SensioLabs\\Security\\Exception\\RuntimeException' => $vendorDir . '/sensiolabs/security-checker/SensioLabs/Security/Exception/RuntimeException.php',
|
| 549 |
+
'SensioLabs\\Security\\Result' => $vendorDir . '/sensiolabs/security-checker/SensioLabs/Security/Result.php',
|
|
|
|
|
|
|
|
|
|
| 550 |
'SensioLabs\\Security\\SecurityChecker' => $vendorDir . '/sensiolabs/security-checker/SensioLabs/Security/SecurityChecker.php',
|
| 551 |
'Sudzy\\Engine' => $baseDir . '/lib/Util/Sudzy/Engine.php',
|
| 552 |
'Sudzy\\ValidModel' => $baseDir . '/lib/Util/Sudzy/ValidModel.php',
|
| 553 |
'Sudzy\\ValidationException' => $baseDir . '/lib/Util/Sudzy/ValidationException.php',
|
| 554 |
'Symfony\\Component\\Console\\Application' => $vendorDir . '/symfony/console/Application.php',
|
| 555 |
+
'Symfony\\Component\\Console\\CommandLoader\\CommandLoaderInterface' => $vendorDir . '/symfony/console/CommandLoader/CommandLoaderInterface.php',
|
| 556 |
+
'Symfony\\Component\\Console\\CommandLoader\\ContainerCommandLoader' => $vendorDir . '/symfony/console/CommandLoader/ContainerCommandLoader.php',
|
| 557 |
+
'Symfony\\Component\\Console\\CommandLoader\\FactoryCommandLoader' => $vendorDir . '/symfony/console/CommandLoader/FactoryCommandLoader.php',
|
| 558 |
'Symfony\\Component\\Console\\Command\\Command' => $vendorDir . '/symfony/console/Command/Command.php',
|
| 559 |
'Symfony\\Component\\Console\\Command\\HelpCommand' => $vendorDir . '/symfony/console/Command/HelpCommand.php',
|
| 560 |
'Symfony\\Component\\Console\\Command\\ListCommand' => $vendorDir . '/symfony/console/Command/ListCommand.php',
|
vendor/composer/autoload_namespaces.php
CHANGED
|
@@ -7,6 +7,5 @@ $baseDir = dirname($vendorDir);
|
|
| 7 |
|
| 8 |
return array(
|
| 9 |
'Twig_' => array($vendorDir . '/twig/twig/lib'),
|
| 10 |
-
'SensioLabs\\Security' => array($vendorDir . '/sensiolabs/security-checker'),
|
| 11 |
'Sabberworm\\CSS' => array($vendorDir . '/sabberworm/php-css-parser/lib'),
|
| 12 |
);
|
| 7 |
|
| 8 |
return array(
|
| 9 |
'Twig_' => array($vendorDir . '/twig/twig/lib'),
|
|
|
|
| 10 |
'Sabberworm\\CSS' => array($vendorDir . '/sabberworm/php-css-parser/lib'),
|
| 11 |
);
|
vendor/composer/autoload_psr4.php
CHANGED
|
@@ -14,6 +14,7 @@ return array(
|
|
| 14 |
'Symfony\\Component\\Debug\\' => array($vendorDir . '/symfony/debug'),
|
| 15 |
'Symfony\\Component\\Console\\' => array($vendorDir . '/symfony/console'),
|
| 16 |
'Sudzy\\' => array($baseDir . '/lib/Util/Sudzy'),
|
|
|
|
| 17 |
'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
|
| 18 |
'Monolog\\' => array($vendorDir . '/monolog/monolog/src/Monolog'),
|
| 19 |
'MailPoet\\' => array($baseDir . '/lib'),
|
| 14 |
'Symfony\\Component\\Debug\\' => array($vendorDir . '/symfony/debug'),
|
| 15 |
'Symfony\\Component\\Console\\' => array($vendorDir . '/symfony/console'),
|
| 16 |
'Sudzy\\' => array($baseDir . '/lib/Util/Sudzy'),
|
| 17 |
+
'SensioLabs\\Security\\' => array($vendorDir . '/sensiolabs/security-checker/SensioLabs/Security'),
|
| 18 |
'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
|
| 19 |
'Monolog\\' => array($vendorDir . '/monolog/monolog/src/Monolog'),
|
| 20 |
'MailPoet\\' => array($baseDir . '/lib'),
|
vendor/composer/autoload_real.php
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
|
| 3 |
// autoload_real.php @generated by Composer
|
| 4 |
|
| 5 |
-
class
|
| 6 |
{
|
| 7 |
private static $loader;
|
| 8 |
|
|
@@ -19,15 +19,15 @@ class ComposerAutoloaderInitf4c002f116b3d5948416331af9d158ad
|
|
| 19 |
return self::$loader;
|
| 20 |
}
|
| 21 |
|
| 22 |
-
spl_autoload_register(array('
|
| 23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
| 24 |
-
spl_autoload_unregister(array('
|
| 25 |
|
| 26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
| 27 |
if ($useStaticLoader) {
|
| 28 |
require_once __DIR__ . '/autoload_static.php';
|
| 29 |
|
| 30 |
-
call_user_func(\Composer\Autoload\
|
| 31 |
} else {
|
| 32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
| 33 |
foreach ($map as $namespace => $path) {
|
|
@@ -48,19 +48,19 @@ class ComposerAutoloaderInitf4c002f116b3d5948416331af9d158ad
|
|
| 48 |
$loader->register(true);
|
| 49 |
|
| 50 |
if ($useStaticLoader) {
|
| 51 |
-
$includeFiles = Composer\Autoload\
|
| 52 |
} else {
|
| 53 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
| 54 |
}
|
| 55 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
| 56 |
-
|
| 57 |
}
|
| 58 |
|
| 59 |
return $loader;
|
| 60 |
}
|
| 61 |
}
|
| 62 |
|
| 63 |
-
function
|
| 64 |
{
|
| 65 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
| 66 |
require $file;
|
| 2 |
|
| 3 |
// autoload_real.php @generated by Composer
|
| 4 |
|
| 5 |
+
class ComposerAutoloaderInit2159ad40a248aa7256850bbda617bbb4
|
| 6 |
{
|
| 7 |
private static $loader;
|
| 8 |
|
| 19 |
return self::$loader;
|
| 20 |
}
|
| 21 |
|
| 22 |
+
spl_autoload_register(array('ComposerAutoloaderInit2159ad40a248aa7256850bbda617bbb4', 'loadClassLoader'), true, true);
|
| 23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
| 24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit2159ad40a248aa7256850bbda617bbb4', 'loadClassLoader'));
|
| 25 |
|
| 26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
| 27 |
if ($useStaticLoader) {
|
| 28 |
require_once __DIR__ . '/autoload_static.php';
|
| 29 |
|
| 30 |
+
call_user_func(\Composer\Autoload\ComposerStaticInit2159ad40a248aa7256850bbda617bbb4::getInitializer($loader));
|
| 31 |
} else {
|
| 32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
| 33 |
foreach ($map as $namespace => $path) {
|
| 48 |
$loader->register(true);
|
| 49 |
|
| 50 |
if ($useStaticLoader) {
|
| 51 |
+
$includeFiles = Composer\Autoload\ComposerStaticInit2159ad40a248aa7256850bbda617bbb4::$files;
|
| 52 |
} else {
|
| 53 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
| 54 |
}
|
| 55 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
| 56 |
+
composerRequire2159ad40a248aa7256850bbda617bbb4($fileIdentifier, $file);
|
| 57 |
}
|
| 58 |
|
| 59 |
return $loader;
|
| 60 |
}
|
| 61 |
}
|
| 62 |
|
| 63 |
+
function composerRequire2159ad40a248aa7256850bbda617bbb4($fileIdentifier, $file)
|
| 64 |
{
|
| 65 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
| 66 |
require $file;
|
vendor/composer/autoload_static.php
CHANGED
|
@@ -4,7 +4,7 @@
|
|
| 4 |
|
| 5 |
namespace Composer\Autoload;
|
| 6 |
|
| 7 |
-
class
|
| 8 |
{
|
| 9 |
public static $files = array (
|
| 10 |
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
|
|
@@ -27,6 +27,7 @@ class ComposerStaticInitf4c002f116b3d5948416331af9d158ad
|
|
| 27 |
'Symfony\\Component\\Debug\\' => 24,
|
| 28 |
'Symfony\\Component\\Console\\' => 26,
|
| 29 |
'Sudzy\\' => 6,
|
|
|
|
| 30 |
),
|
| 31 |
'P' =>
|
| 32 |
array (
|
|
@@ -81,6 +82,10 @@ class ComposerStaticInitf4c002f116b3d5948416331af9d158ad
|
|
| 81 |
array (
|
| 82 |
0 => __DIR__ . '/../..' . '/lib/Util/Sudzy',
|
| 83 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
| 84 |
'Psr\\Log\\' =>
|
| 85 |
array (
|
| 86 |
0 => __DIR__ . '/..' . '/psr/log/Psr/Log',
|
|
@@ -121,10 +126,6 @@ class ComposerStaticInitf4c002f116b3d5948416331af9d158ad
|
|
| 121 |
),
|
| 122 |
'S' =>
|
| 123 |
array (
|
| 124 |
-
'SensioLabs\\Security' =>
|
| 125 |
-
array (
|
| 126 |
-
0 => __DIR__ . '/..' . '/sensiolabs/security-checker',
|
| 127 |
-
),
|
| 128 |
'Sabberworm\\CSS' =>
|
| 129 |
array (
|
| 130 |
0 => __DIR__ . '/..' . '/sabberworm/php-css-parser/lib',
|
|
@@ -470,6 +471,7 @@ class ComposerStaticInitf4c002f116b3d5948416331af9d158ad
|
|
| 470 |
'MailPoet\\Statistics\\Track\\Clicks' => __DIR__ . '/../..' . '/lib/Statistics/Track/Clicks.php',
|
| 471 |
'MailPoet\\Statistics\\Track\\Opens' => __DIR__ . '/../..' . '/lib/Statistics/Track/Opens.php',
|
| 472 |
'MailPoet\\Statistics\\Track\\Unsubscribes' => __DIR__ . '/../..' . '/lib/Statistics/Track/Unsubscribes.php',
|
|
|
|
| 473 |
'MailPoet\\Subscribers\\ImportExport\\Export\\DefaultSubscribersGetter' => __DIR__ . '/../..' . '/lib/Subscribers/ImportExport/Export/DefaultSubscribersGetter.php',
|
| 474 |
'MailPoet\\Subscribers\\ImportExport\\Export\\DynamicSubscribersGetter' => __DIR__ . '/../..' . '/lib/Subscribers/ImportExport/Export/DynamicSubscribersGetter.php',
|
| 475 |
'MailPoet\\Subscribers\\ImportExport\\Export\\Export' => __DIR__ . '/../..' . '/lib/Subscribers/ImportExport/Export/Export.php',
|
|
@@ -481,6 +483,7 @@ class ComposerStaticInitf4c002f116b3d5948416331af9d158ad
|
|
| 481 |
'MailPoet\\Subscribers\\ImportExport\\PersonalDataExporters\\NewslettersExporter' => __DIR__ . '/../..' . '/lib/Subscribers/ImportExport/PersonalDataExporters/NewslettersExporter.php',
|
| 482 |
'MailPoet\\Subscribers\\ImportExport\\PersonalDataExporters\\SegmentsExporter' => __DIR__ . '/../..' . '/lib/Subscribers/ImportExport/PersonalDataExporters/SegmentsExporter.php',
|
| 483 |
'MailPoet\\Subscribers\\ImportExport\\PersonalDataExporters\\SubscriberExporter' => __DIR__ . '/../..' . '/lib/Subscribers/ImportExport/PersonalDataExporters/SubscriberExporter.php',
|
|
|
|
| 484 |
'MailPoet\\Subscribers\\RequiredCustomFieldValidator' => __DIR__ . '/../..' . '/lib/Subscribers/RequiredCustomFieldValidator.php',
|
| 485 |
'MailPoet\\Subscribers\\Source' => __DIR__ . '/../..' . '/lib/Subscribers/Source.php',
|
| 486 |
'MailPoet\\Subscribers\\SubscriberPersonalDataEraser' => __DIR__ . '/../..' . '/lib/Subscribers/SubscriberPersonalDataEraser.php',
|
|
@@ -510,6 +513,7 @@ class ComposerStaticInitf4c002f116b3d5948416331af9d158ad
|
|
| 510 |
'MailPoet\\Util\\License\\Features\\Subscribers' => __DIR__ . '/../..' . '/lib/Util/License/Features/Subscribers.php',
|
| 511 |
'MailPoet\\Util\\License\\License' => __DIR__ . '/../..' . '/lib/Util/License/License.php',
|
| 512 |
'MailPoet\\Util\\Notices\\AfterMigrationNotice' => __DIR__ . '/../..' . '/lib/Util/Notices/AfterMigrationNotice.php',
|
|
|
|
| 513 |
'MailPoet\\Util\\Notices\\PHPVersionWarnings' => __DIR__ . '/../..' . '/lib/Util/Notices/PHPVersionWarnings.php',
|
| 514 |
'MailPoet\\Util\\Notices\\PermanentNotices' => __DIR__ . '/../..' . '/lib/Util/Notices/PermanentNotices.php',
|
| 515 |
'MailPoet\\Util\\ProgressBar' => __DIR__ . '/../..' . '/lib/Util/ProgressBar.php',
|
|
@@ -666,23 +670,19 @@ class ComposerStaticInitf4c002f116b3d5948416331af9d158ad
|
|
| 666 |
'Sabberworm\\CSS\\Value\\Value' => __DIR__ . '/..' . '/sabberworm/php-css-parser/lib/Sabberworm/CSS/Value/Value.php',
|
| 667 |
'Sabberworm\\CSS\\Value\\ValueList' => __DIR__ . '/..' . '/sabberworm/php-css-parser/lib/Sabberworm/CSS/Value/ValueList.php',
|
| 668 |
'SensioLabs\\Security\\Command\\SecurityCheckerCommand' => __DIR__ . '/..' . '/sensiolabs/security-checker/SensioLabs/Security/Command/SecurityCheckerCommand.php',
|
| 669 |
-
'SensioLabs\\Security\\Crawler
|
| 670 |
-
'SensioLabs\\Security\\Crawler\\CrawlerInterface' => __DIR__ . '/..' . '/sensiolabs/security-checker/SensioLabs/Security/Crawler/CrawlerInterface.php',
|
| 671 |
-
'SensioLabs\\Security\\Crawler\\CurlCrawler' => __DIR__ . '/..' . '/sensiolabs/security-checker/SensioLabs/Security/Crawler/CurlCrawler.php',
|
| 672 |
-
'SensioLabs\\Security\\Crawler\\DefaultCrawler' => __DIR__ . '/..' . '/sensiolabs/security-checker/SensioLabs/Security/Crawler/DefaultCrawler.php',
|
| 673 |
-
'SensioLabs\\Security\\Crawler\\FileGetContentsCrawler' => __DIR__ . '/..' . '/sensiolabs/security-checker/SensioLabs/Security/Crawler/FileGetContentsCrawler.php',
|
| 674 |
'SensioLabs\\Security\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/sensiolabs/security-checker/SensioLabs/Security/Exception/ExceptionInterface.php',
|
| 675 |
'SensioLabs\\Security\\Exception\\HttpException' => __DIR__ . '/..' . '/sensiolabs/security-checker/SensioLabs/Security/Exception/HttpException.php',
|
| 676 |
'SensioLabs\\Security\\Exception\\RuntimeException' => __DIR__ . '/..' . '/sensiolabs/security-checker/SensioLabs/Security/Exception/RuntimeException.php',
|
| 677 |
-
'SensioLabs\\Security\\
|
| 678 |
-
'SensioLabs\\Security\\Formatters\\JsonFormatter' => __DIR__ . '/..' . '/sensiolabs/security-checker/SensioLabs/Security/Formatters/JsonFormatter.php',
|
| 679 |
-
'SensioLabs\\Security\\Formatters\\SimpleFormatter' => __DIR__ . '/..' . '/sensiolabs/security-checker/SensioLabs/Security/Formatters/SimpleFormatter.php',
|
| 680 |
-
'SensioLabs\\Security\\Formatters\\TextFormatter' => __DIR__ . '/..' . '/sensiolabs/security-checker/SensioLabs/Security/Formatters/TextFormatter.php',
|
| 681 |
'SensioLabs\\Security\\SecurityChecker' => __DIR__ . '/..' . '/sensiolabs/security-checker/SensioLabs/Security/SecurityChecker.php',
|
| 682 |
'Sudzy\\Engine' => __DIR__ . '/../..' . '/lib/Util/Sudzy/Engine.php',
|
| 683 |
'Sudzy\\ValidModel' => __DIR__ . '/../..' . '/lib/Util/Sudzy/ValidModel.php',
|
| 684 |
'Sudzy\\ValidationException' => __DIR__ . '/../..' . '/lib/Util/Sudzy/ValidationException.php',
|
| 685 |
'Symfony\\Component\\Console\\Application' => __DIR__ . '/..' . '/symfony/console/Application.php',
|
|
|
|
|
|
|
|
|
|
| 686 |
'Symfony\\Component\\Console\\Command\\Command' => __DIR__ . '/..' . '/symfony/console/Command/Command.php',
|
| 687 |
'Symfony\\Component\\Console\\Command\\HelpCommand' => __DIR__ . '/..' . '/symfony/console/Command/HelpCommand.php',
|
| 688 |
'Symfony\\Component\\Console\\Command\\ListCommand' => __DIR__ . '/..' . '/symfony/console/Command/ListCommand.php',
|
|
@@ -1225,11 +1225,11 @@ class ComposerStaticInitf4c002f116b3d5948416331af9d158ad
|
|
| 1225 |
public static function getInitializer(ClassLoader $loader)
|
| 1226 |
{
|
| 1227 |
return \Closure::bind(function () use ($loader) {
|
| 1228 |
-
$loader->prefixLengthsPsr4 =
|
| 1229 |
-
$loader->prefixDirsPsr4 =
|
| 1230 |
-
$loader->fallbackDirsPsr4 =
|
| 1231 |
-
$loader->prefixesPsr0 =
|
| 1232 |
-
$loader->classMap =
|
| 1233 |
|
| 1234 |
}, null, ClassLoader::class);
|
| 1235 |
}
|
| 4 |
|
| 5 |
namespace Composer\Autoload;
|
| 6 |
|
| 7 |
+
class ComposerStaticInit2159ad40a248aa7256850bbda617bbb4
|
| 8 |
{
|
| 9 |
public static $files = array (
|
| 10 |
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
|
| 27 |
'Symfony\\Component\\Debug\\' => 24,
|
| 28 |
'Symfony\\Component\\Console\\' => 26,
|
| 29 |
'Sudzy\\' => 6,
|
| 30 |
+
'SensioLabs\\Security\\' => 20,
|
| 31 |
),
|
| 32 |
'P' =>
|
| 33 |
array (
|
| 82 |
array (
|
| 83 |
0 => __DIR__ . '/../..' . '/lib/Util/Sudzy',
|
| 84 |
),
|
| 85 |
+
'SensioLabs\\Security\\' =>
|
| 86 |
+
array (
|
| 87 |
+
0 => __DIR__ . '/..' . '/sensiolabs/security-checker/SensioLabs/Security',
|
| 88 |
+
),
|
| 89 |
'Psr\\Log\\' =>
|
| 90 |
array (
|
| 91 |
0 => __DIR__ . '/..' . '/psr/log/Psr/Log',
|
| 126 |
),
|
| 127 |
'S' =>
|
| 128 |
array (
|
|
|
|
|
|
|
|
|
|
|
|
|
| 129 |
'Sabberworm\\CSS' =>
|
| 130 |
array (
|
| 131 |
0 => __DIR__ . '/..' . '/sabberworm/php-css-parser/lib',
|
| 471 |
'MailPoet\\Statistics\\Track\\Clicks' => __DIR__ . '/../..' . '/lib/Statistics/Track/Clicks.php',
|
| 472 |
'MailPoet\\Statistics\\Track\\Opens' => __DIR__ . '/../..' . '/lib/Statistics/Track/Opens.php',
|
| 473 |
'MailPoet\\Statistics\\Track\\Unsubscribes' => __DIR__ . '/../..' . '/lib/Statistics/Track/Unsubscribes.php',
|
| 474 |
+
'MailPoet\\Subscribers\\ConfirmationEmailMailer' => __DIR__ . '/../..' . '/lib/Subscribers/ConfirmationEmailMailer.php',
|
| 475 |
'MailPoet\\Subscribers\\ImportExport\\Export\\DefaultSubscribersGetter' => __DIR__ . '/../..' . '/lib/Subscribers/ImportExport/Export/DefaultSubscribersGetter.php',
|
| 476 |
'MailPoet\\Subscribers\\ImportExport\\Export\\DynamicSubscribersGetter' => __DIR__ . '/../..' . '/lib/Subscribers/ImportExport/Export/DynamicSubscribersGetter.php',
|
| 477 |
'MailPoet\\Subscribers\\ImportExport\\Export\\Export' => __DIR__ . '/../..' . '/lib/Subscribers/ImportExport/Export/Export.php',
|
| 483 |
'MailPoet\\Subscribers\\ImportExport\\PersonalDataExporters\\NewslettersExporter' => __DIR__ . '/../..' . '/lib/Subscribers/ImportExport/PersonalDataExporters/NewslettersExporter.php',
|
| 484 |
'MailPoet\\Subscribers\\ImportExport\\PersonalDataExporters\\SegmentsExporter' => __DIR__ . '/../..' . '/lib/Subscribers/ImportExport/PersonalDataExporters/SegmentsExporter.php',
|
| 485 |
'MailPoet\\Subscribers\\ImportExport\\PersonalDataExporters\\SubscriberExporter' => __DIR__ . '/../..' . '/lib/Subscribers/ImportExport/PersonalDataExporters/SubscriberExporter.php',
|
| 486 |
+
'MailPoet\\Subscribers\\NewSubscriberNotificationMailer' => __DIR__ . '/../..' . '/lib/Subscribers/NewSubscriberNotificationMailer.php',
|
| 487 |
'MailPoet\\Subscribers\\RequiredCustomFieldValidator' => __DIR__ . '/../..' . '/lib/Subscribers/RequiredCustomFieldValidator.php',
|
| 488 |
'MailPoet\\Subscribers\\Source' => __DIR__ . '/../..' . '/lib/Subscribers/Source.php',
|
| 489 |
'MailPoet\\Subscribers\\SubscriberPersonalDataEraser' => __DIR__ . '/../..' . '/lib/Subscribers/SubscriberPersonalDataEraser.php',
|
| 513 |
'MailPoet\\Util\\License\\Features\\Subscribers' => __DIR__ . '/../..' . '/lib/Util/License/Features/Subscribers.php',
|
| 514 |
'MailPoet\\Util\\License\\License' => __DIR__ . '/../..' . '/lib/Util/License/License.php',
|
| 515 |
'MailPoet\\Util\\Notices\\AfterMigrationNotice' => __DIR__ . '/../..' . '/lib/Util/Notices/AfterMigrationNotice.php',
|
| 516 |
+
'MailPoet\\Util\\Notices\\DiscountsAnnouncement' => __DIR__ . '/../..' . '/lib/Util/Notices/DiscountsAnnouncement.php',
|
| 517 |
'MailPoet\\Util\\Notices\\PHPVersionWarnings' => __DIR__ . '/../..' . '/lib/Util/Notices/PHPVersionWarnings.php',
|
| 518 |
'MailPoet\\Util\\Notices\\PermanentNotices' => __DIR__ . '/../..' . '/lib/Util/Notices/PermanentNotices.php',
|
| 519 |
'MailPoet\\Util\\ProgressBar' => __DIR__ . '/../..' . '/lib/Util/ProgressBar.php',
|
| 670 |
'Sabberworm\\CSS\\Value\\Value' => __DIR__ . '/..' . '/sabberworm/php-css-parser/lib/Sabberworm/CSS/Value/Value.php',
|
| 671 |
'Sabberworm\\CSS\\Value\\ValueList' => __DIR__ . '/..' . '/sabberworm/php-css-parser/lib/Sabberworm/CSS/Value/ValueList.php',
|
| 672 |
'SensioLabs\\Security\\Command\\SecurityCheckerCommand' => __DIR__ . '/..' . '/sensiolabs/security-checker/SensioLabs/Security/Command/SecurityCheckerCommand.php',
|
| 673 |
+
'SensioLabs\\Security\\Crawler' => __DIR__ . '/..' . '/sensiolabs/security-checker/SensioLabs/Security/Crawler.php',
|
|
|
|
|
|
|
|
|
|
|
|
|
| 674 |
'SensioLabs\\Security\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/sensiolabs/security-checker/SensioLabs/Security/Exception/ExceptionInterface.php',
|
| 675 |
'SensioLabs\\Security\\Exception\\HttpException' => __DIR__ . '/..' . '/sensiolabs/security-checker/SensioLabs/Security/Exception/HttpException.php',
|
| 676 |
'SensioLabs\\Security\\Exception\\RuntimeException' => __DIR__ . '/..' . '/sensiolabs/security-checker/SensioLabs/Security/Exception/RuntimeException.php',
|
| 677 |
+
'SensioLabs\\Security\\Result' => __DIR__ . '/..' . '/sensiolabs/security-checker/SensioLabs/Security/Result.php',
|
|
|
|
|
|
|
|
|
|
| 678 |
'SensioLabs\\Security\\SecurityChecker' => __DIR__ . '/..' . '/sensiolabs/security-checker/SensioLabs/Security/SecurityChecker.php',
|
| 679 |
'Sudzy\\Engine' => __DIR__ . '/../..' . '/lib/Util/Sudzy/Engine.php',
|
| 680 |
'Sudzy\\ValidModel' => __DIR__ . '/../..' . '/lib/Util/Sudzy/ValidModel.php',
|
| 681 |
'Sudzy\\ValidationException' => __DIR__ . '/../..' . '/lib/Util/Sudzy/ValidationException.php',
|
| 682 |
'Symfony\\Component\\Console\\Application' => __DIR__ . '/..' . '/symfony/console/Application.php',
|
| 683 |
+
'Symfony\\Component\\Console\\CommandLoader\\CommandLoaderInterface' => __DIR__ . '/..' . '/symfony/console/CommandLoader/CommandLoaderInterface.php',
|
| 684 |
+
'Symfony\\Component\\Console\\CommandLoader\\ContainerCommandLoader' => __DIR__ . '/..' . '/symfony/console/CommandLoader/ContainerCommandLoader.php',
|
| 685 |
+
'Symfony\\Component\\Console\\CommandLoader\\FactoryCommandLoader' => __DIR__ . '/..' . '/symfony/console/CommandLoader/FactoryCommandLoader.php',
|
| 686 |
'Symfony\\Component\\Console\\Command\\Command' => __DIR__ . '/..' . '/symfony/console/Command/Command.php',
|
| 687 |
'Symfony\\Component\\Console\\Command\\HelpCommand' => __DIR__ . '/..' . '/symfony/console/Command/HelpCommand.php',
|
| 688 |
'Symfony\\Component\\Console\\Command\\ListCommand' => __DIR__ . '/..' . '/symfony/console/Command/ListCommand.php',
|
| 1225 |
public static function getInitializer(ClassLoader $loader)
|
| 1226 |
{
|
| 1227 |
return \Closure::bind(function () use ($loader) {
|
| 1228 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInit2159ad40a248aa7256850bbda617bbb4::$prefixLengthsPsr4;
|
| 1229 |
+
$loader->prefixDirsPsr4 = ComposerStaticInit2159ad40a248aa7256850bbda617bbb4::$prefixDirsPsr4;
|
| 1230 |
+
$loader->fallbackDirsPsr4 = ComposerStaticInit2159ad40a248aa7256850bbda617bbb4::$fallbackDirsPsr4;
|
| 1231 |
+
$loader->prefixesPsr0 = ComposerStaticInit2159ad40a248aa7256850bbda617bbb4::$prefixesPsr0;
|
| 1232 |
+
$loader->classMap = ComposerStaticInit2159ad40a248aa7256850bbda617bbb4::$classMap;
|
| 1233 |
|
| 1234 |
}, null, ClassLoader::class);
|
| 1235 |
}
|
vendor/composer/installed.json
CHANGED
|
@@ -1,24 +1,24 @@
|
|
| 1 |
[
|
| 2 |
{
|
| 3 |
"name": "cerdic/css-tidy",
|
| 4 |
-
"version": "v1.
|
| 5 |
-
"version_normalized": "1.
|
| 6 |
"source": {
|
| 7 |
"type": "git",
|
| 8 |
"url": "https://github.com/Cerdic/CSSTidy.git",
|
| 9 |
-
"reference": "
|
| 10 |
},
|
| 11 |
"dist": {
|
| 12 |
"type": "zip",
|
| 13 |
-
"url": "https://api.github.com/repos/Cerdic/CSSTidy/zipball/
|
| 14 |
-
"reference": "
|
| 15 |
"shasum": ""
|
| 16 |
},
|
| 17 |
"require-dev": {
|
| 18 |
"pear/text_diff": "^1.2",
|
| 19 |
"simpletest/simpletest": "^1.1"
|
| 20 |
},
|
| 21 |
-
"time": "2018-
|
| 22 |
"type": "library",
|
| 23 |
"installation-source": "dist",
|
| 24 |
"autoload": {
|
|
@@ -40,64 +40,6 @@
|
|
| 40 |
],
|
| 41 |
"description": "CSSTidy is a CSS minifier"
|
| 42 |
},
|
| 43 |
-
{
|
| 44 |
-
"name": "composer/ca-bundle",
|
| 45 |
-
"version": "1.1.2",
|
| 46 |
-
"version_normalized": "1.1.2.0",
|
| 47 |
-
"source": {
|
| 48 |
-
"type": "git",
|
| 49 |
-
"url": "https://github.com/composer/ca-bundle.git",
|
| 50 |
-
"reference": "46afded9720f40b9dc63542af4e3e43a1177acb0"
|
| 51 |
-
},
|
| 52 |
-
"dist": {
|
| 53 |
-
"type": "zip",
|
| 54 |
-
"url": "https://api.github.com/repos/composer/ca-bundle/zipball/46afded9720f40b9dc63542af4e3e43a1177acb0",
|
| 55 |
-
"reference": "46afded9720f40b9dc63542af4e3e43a1177acb0",
|
| 56 |
-
"shasum": ""
|
| 57 |
-
},
|
| 58 |
-
"require": {
|
| 59 |
-
"ext-openssl": "*",
|
| 60 |
-
"ext-pcre": "*",
|
| 61 |
-
"php": "^5.3.2 || ^7.0"
|
| 62 |
-
},
|
| 63 |
-
"require-dev": {
|
| 64 |
-
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5",
|
| 65 |
-
"psr/log": "^1.0",
|
| 66 |
-
"symfony/process": "^2.5 || ^3.0 || ^4.0"
|
| 67 |
-
},
|
| 68 |
-
"time": "2018-08-08T08:57:40+00:00",
|
| 69 |
-
"type": "library",
|
| 70 |
-
"extra": {
|
| 71 |
-
"branch-alias": {
|
| 72 |
-
"dev-master": "1.x-dev"
|
| 73 |
-
}
|
| 74 |
-
},
|
| 75 |
-
"installation-source": "dist",
|
| 76 |
-
"autoload": {
|
| 77 |
-
"psr-4": {
|
| 78 |
-
"Composer\\CaBundle\\": "src"
|
| 79 |
-
}
|
| 80 |
-
},
|
| 81 |
-
"notification-url": "https://packagist.org/downloads/",
|
| 82 |
-
"license": [
|
| 83 |
-
"MIT"
|
| 84 |
-
],
|
| 85 |
-
"authors": [
|
| 86 |
-
{
|
| 87 |
-
"name": "Jordi Boggiano",
|
| 88 |
-
"email": "j.boggiano@seld.be",
|
| 89 |
-
"homepage": "http://seld.be"
|
| 90 |
-
}
|
| 91 |
-
],
|
| 92 |
-
"description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.",
|
| 93 |
-
"keywords": [
|
| 94 |
-
"cabundle",
|
| 95 |
-
"cacert",
|
| 96 |
-
"certificate",
|
| 97 |
-
"ssl",
|
| 98 |
-
"tls"
|
| 99 |
-
]
|
| 100 |
-
},
|
| 101 |
{
|
| 102 |
"name": "j4mie/idiorm",
|
| 103 |
"version": "v1.5.6",
|
|
@@ -227,6 +169,55 @@
|
|
| 227 |
"paris"
|
| 228 |
]
|
| 229 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 230 |
{
|
| 231 |
"name": "monolog/monolog",
|
| 232 |
"version": "1.23.0",
|
|
@@ -354,42 +345,41 @@
|
|
| 354 |
]
|
| 355 |
},
|
| 356 |
{
|
| 357 |
-
"name": "
|
| 358 |
-
"version": "
|
| 359 |
-
"version_normalized": "1.
|
| 360 |
"source": {
|
| 361 |
"type": "git",
|
| 362 |
-
"url": "https://github.com/
|
| 363 |
-
"reference": "
|
| 364 |
},
|
| 365 |
"dist": {
|
| 366 |
"type": "zip",
|
| 367 |
-
"url": "https://api.github.com/repos/
|
| 368 |
-
"reference": "
|
| 369 |
"shasum": ""
|
| 370 |
},
|
| 371 |
"require": {
|
| 372 |
-
"php": ">=5.3.
|
| 373 |
-
"symfony/translation": "~2.6 || ~3.0 || ~4.0"
|
| 374 |
},
|
| 375 |
-
"
|
| 376 |
-
"
|
| 377 |
-
"phpunit/phpunit": "^4.8.35 || ^5.7"
|
| 378 |
},
|
| 379 |
-
"time": "2018-08-
|
| 380 |
"type": "library",
|
| 381 |
"extra": {
|
| 382 |
-
"
|
| 383 |
-
"
|
| 384 |
-
"Carbon\\Laravel\\ServiceProvider"
|
| 385 |
-
]
|
| 386 |
}
|
| 387 |
},
|
| 388 |
"installation-source": "dist",
|
| 389 |
"autoload": {
|
| 390 |
"psr-4": {
|
| 391 |
-
"": "
|
| 392 |
-
}
|
|
|
|
|
|
|
|
|
|
| 393 |
},
|
| 394 |
"notification-url": "https://packagist.org/downloads/",
|
| 395 |
"license": [
|
|
@@ -397,48 +387,126 @@
|
|
| 397 |
],
|
| 398 |
"authors": [
|
| 399 |
{
|
| 400 |
-
"name": "
|
| 401 |
-
"email": "
|
| 402 |
-
|
|
|
|
|
|
|
|
|
|
| 403 |
}
|
| 404 |
],
|
| 405 |
-
"description": "
|
| 406 |
-
"homepage": "
|
| 407 |
"keywords": [
|
| 408 |
-
"
|
| 409 |
-
"
|
| 410 |
-
"
|
|
|
|
|
|
|
| 411 |
]
|
| 412 |
},
|
| 413 |
{
|
| 414 |
-
"name": "
|
| 415 |
-
"version": "
|
| 416 |
-
"version_normalized": "
|
| 417 |
"source": {
|
| 418 |
"type": "git",
|
| 419 |
-
"url": "https://github.com/
|
| 420 |
-
"reference": "
|
| 421 |
},
|
| 422 |
"dist": {
|
| 423 |
"type": "zip",
|
| 424 |
-
"url": "https://api.github.com/repos/
|
| 425 |
-
"reference": "
|
| 426 |
"shasum": ""
|
| 427 |
},
|
| 428 |
"require": {
|
| 429 |
-
"php": ">=5.3.
|
|
|
|
| 430 |
},
|
| 431 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 432 |
"type": "library",
|
| 433 |
"extra": {
|
| 434 |
"branch-alias": {
|
| 435 |
-
"dev-master": "
|
| 436 |
}
|
| 437 |
},
|
| 438 |
"installation-source": "dist",
|
| 439 |
"autoload": {
|
| 440 |
"psr-4": {
|
| 441 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 442 |
}
|
| 443 |
},
|
| 444 |
"notification-url": "https://packagist.org/downloads/",
|
|
@@ -447,16 +515,17 @@
|
|
| 447 |
],
|
| 448 |
"authors": [
|
| 449 |
{
|
| 450 |
-
"name": "
|
| 451 |
-
"
|
|
|
|
| 452 |
}
|
| 453 |
],
|
| 454 |
-
"description": "
|
| 455 |
-
"homepage": "
|
| 456 |
"keywords": [
|
| 457 |
-
"
|
| 458 |
-
"
|
| 459 |
-
"
|
| 460 |
]
|
| 461 |
},
|
| 462 |
{
|
|
@@ -506,212 +575,106 @@
|
|
| 506 |
]
|
| 507 |
},
|
| 508 |
{
|
| 509 |
-
"name": "
|
| 510 |
-
"version": "
|
| 511 |
-
"version_normalized": "4.
|
| 512 |
"source": {
|
| 513 |
"type": "git",
|
| 514 |
-
"url": "https://github.com/
|
| 515 |
-
"reference": "
|
| 516 |
-
},
|
| 517 |
-
"dist": {
|
| 518 |
-
"type": "zip",
|
| 519 |
-
"url": "https://api.github.com/repos/sensiolabs/security-checker/zipball/dc270d5fec418cc6ac983671dba5d80ffaffb142",
|
| 520 |
-
"reference": "dc270d5fec418cc6ac983671dba5d80ffaffb142",
|
| 521 |
-
"shasum": ""
|
| 522 |
-
},
|
| 523 |
-
"require": {
|
| 524 |
-
"composer/ca-bundle": "^1.0",
|
| 525 |
-
"symfony/console": "~2.7|~3.0|~4.0"
|
| 526 |
-
},
|
| 527 |
-
"time": "2018-02-28T22:10:01+00:00",
|
| 528 |
-
"bin": [
|
| 529 |
-
"security-checker"
|
| 530 |
-
],
|
| 531 |
-
"type": "library",
|
| 532 |
-
"extra": {
|
| 533 |
-
"branch-alias": {
|
| 534 |
-
"dev-master": "4.1-dev"
|
| 535 |
-
}
|
| 536 |
-
},
|
| 537 |
-
"installation-source": "dist",
|
| 538 |
-
"autoload": {
|
| 539 |
-
"psr-0": {
|
| 540 |
-
"SensioLabs\\Security": ""
|
| 541 |
-
}
|
| 542 |
-
},
|
| 543 |
-
"notification-url": "https://packagist.org/downloads/",
|
| 544 |
-
"license": [
|
| 545 |
-
"MIT"
|
| 546 |
-
],
|
| 547 |
-
"authors": [
|
| 548 |
-
{
|
| 549 |
-
"name": "Fabien Potencier",
|
| 550 |
-
"email": "fabien.potencier@gmail.com"
|
| 551 |
-
}
|
| 552 |
-
],
|
| 553 |
-
"description": "A security checker for your composer.lock"
|
| 554 |
-
},
|
| 555 |
-
{
|
| 556 |
-
"name": "soundasleep/html2text",
|
| 557 |
-
"version": "dev-master",
|
| 558 |
-
"version_normalized": "9999999-dev",
|
| 559 |
-
"source": {
|
| 560 |
-
"type": "git",
|
| 561 |
-
"url": "https://github.com/mailpoet/html2text.git",
|
| 562 |
-
"reference": "95c5f266e7ea1a79b3879555cf27289985b1e4c7"
|
| 563 |
},
|
| 564 |
"dist": {
|
| 565 |
"type": "zip",
|
| 566 |
-
"url": "https://api.github.com/repos/
|
| 567 |
-
"reference": "
|
| 568 |
"shasum": ""
|
| 569 |
},
|
| 570 |
"require": {
|
| 571 |
-
"
|
| 572 |
-
"
|
| 573 |
-
"php": ">=5.3.2"
|
| 574 |
-
},
|
| 575 |
-
"require-dev": {
|
| 576 |
-
"phpunit/phpunit": ">=4.0",
|
| 577 |
-
"soundasleep/component-tests": "dev-master"
|
| 578 |
-
},
|
| 579 |
-
"time": "2018-04-08T14:18:46+00:00",
|
| 580 |
-
"type": "library",
|
| 581 |
-
"installation-source": "dist",
|
| 582 |
-
"autoload": {
|
| 583 |
-
"psr-4": {
|
| 584 |
-
"Html2Text\\": "src"
|
| 585 |
-
}
|
| 586 |
-
},
|
| 587 |
-
"license": [
|
| 588 |
-
"EPL-1.0"
|
| 589 |
-
],
|
| 590 |
-
"authors": [
|
| 591 |
-
{
|
| 592 |
-
"name": "Jevon Wright",
|
| 593 |
-
"homepage": "https://jevon.org",
|
| 594 |
-
"role": "Developer"
|
| 595 |
-
}
|
| 596 |
-
],
|
| 597 |
-
"description": "A PHP script to convert HTML into a plain text format",
|
| 598 |
-
"homepage": "https://github.com/soundasleep/html2text",
|
| 599 |
-
"keywords": [
|
| 600 |
-
"email",
|
| 601 |
-
"html",
|
| 602 |
-
"php",
|
| 603 |
-
"text"
|
| 604 |
-
],
|
| 605 |
-
"support": {
|
| 606 |
-
"email": "support@jevon.org",
|
| 607 |
-
"source": "https://github.com/mailpoet/html2text/tree/master"
|
| 608 |
-
}
|
| 609 |
-
},
|
| 610 |
-
{
|
| 611 |
-
"name": "swiftmailer/swiftmailer",
|
| 612 |
-
"version": "dev-tls",
|
| 613 |
-
"version_normalized": "dev-tls",
|
| 614 |
-
"source": {
|
| 615 |
-
"type": "git",
|
| 616 |
-
"url": "https://github.com/mailpoet/swiftmailer.git",
|
| 617 |
-
"reference": "e6963324036afd178d3a8356e5c705ae4a442ef9"
|
| 618 |
-
},
|
| 619 |
-
"dist": {
|
| 620 |
-
"type": "zip",
|
| 621 |
-
"url": "https://api.github.com/repos/mailpoet/swiftmailer/zipball/e6963324036afd178d3a8356e5c705ae4a442ef9",
|
| 622 |
-
"reference": "e6963324036afd178d3a8356e5c705ae4a442ef9",
|
| 623 |
-
"shasum": ""
|
| 624 |
},
|
| 625 |
-
"
|
| 626 |
-
"
|
| 627 |
},
|
| 628 |
"require-dev": {
|
| 629 |
-
"
|
| 630 |
-
"symfony/phpunit-bridge": "~3.2"
|
| 631 |
},
|
| 632 |
-
"time": "2018-
|
| 633 |
"type": "library",
|
| 634 |
"extra": {
|
| 635 |
"branch-alias": {
|
| 636 |
-
"dev-master": "
|
| 637 |
}
|
| 638 |
},
|
| 639 |
"installation-source": "dist",
|
| 640 |
"autoload": {
|
| 641 |
-
"
|
| 642 |
-
"
|
|
|
|
|
|
|
|
|
|
| 643 |
]
|
| 644 |
},
|
| 645 |
-
"
|
| 646 |
-
"psr-0": {
|
| 647 |
-
"Swift_": "tests/unit"
|
| 648 |
-
}
|
| 649 |
-
},
|
| 650 |
"license": [
|
| 651 |
"MIT"
|
| 652 |
],
|
| 653 |
"authors": [
|
| 654 |
-
{
|
| 655 |
-
"name": "Chris Corbyn"
|
| 656 |
-
},
|
| 657 |
{
|
| 658 |
"name": "Fabien Potencier",
|
| 659 |
"email": "fabien@symfony.com"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 660 |
}
|
| 661 |
],
|
| 662 |
-
"description": "
|
| 663 |
-
"homepage": "https://
|
| 664 |
-
"keywords": [
|
| 665 |
-
"email",
|
| 666 |
-
"mail",
|
| 667 |
-
"mailer"
|
| 668 |
-
],
|
| 669 |
-
"support": {
|
| 670 |
-
"source": "https://github.com/mailpoet/swiftmailer/tree/tls"
|
| 671 |
-
}
|
| 672 |
},
|
| 673 |
{
|
| 674 |
"name": "symfony/console",
|
| 675 |
-
"version": "v3.
|
| 676 |
-
"version_normalized": "3.
|
| 677 |
"source": {
|
| 678 |
"type": "git",
|
| 679 |
"url": "https://github.com/symfony/console.git",
|
| 680 |
-
"reference": "
|
| 681 |
},
|
| 682 |
"dist": {
|
| 683 |
"type": "zip",
|
| 684 |
-
"url": "https://api.github.com/repos/symfony/console/zipball/
|
| 685 |
-
"reference": "
|
| 686 |
"shasum": ""
|
| 687 |
},
|
| 688 |
"require": {
|
| 689 |
"php": "^5.5.9|>=7.0.8",
|
| 690 |
-
"symfony/debug": "~2.8|~3.0",
|
| 691 |
"symfony/polyfill-mbstring": "~1.0"
|
| 692 |
},
|
| 693 |
"conflict": {
|
| 694 |
-
"symfony/dependency-injection": "<3.
|
|
|
|
| 695 |
},
|
| 696 |
"require-dev": {
|
| 697 |
"psr/log": "~1.0",
|
| 698 |
-
"symfony/config": "~3.3",
|
| 699 |
-
"symfony/dependency-injection": "~3.
|
| 700 |
-
"symfony/event-dispatcher": "~2.8|~3.0",
|
| 701 |
-
"symfony/
|
| 702 |
-
"symfony/process": "~
|
| 703 |
},
|
| 704 |
"suggest": {
|
| 705 |
-
"psr/log": "For using the console logger",
|
| 706 |
"symfony/event-dispatcher": "",
|
| 707 |
-
"symfony/
|
| 708 |
"symfony/process": ""
|
| 709 |
},
|
| 710 |
-
"time": "2018-
|
| 711 |
"type": "library",
|
| 712 |
"extra": {
|
| 713 |
"branch-alias": {
|
| 714 |
-
"dev-master": "3.
|
| 715 |
}
|
| 716 |
},
|
| 717 |
"installation-source": "dist",
|
|
@@ -741,45 +704,42 @@
|
|
| 741 |
"homepage": "https://symfony.com"
|
| 742 |
},
|
| 743 |
{
|
| 744 |
-
"name": "
|
| 745 |
-
"version": "
|
| 746 |
-
"version_normalized": "
|
| 747 |
"source": {
|
| 748 |
"type": "git",
|
| 749 |
-
"url": "https://github.com/
|
| 750 |
-
"reference": "
|
| 751 |
},
|
| 752 |
"dist": {
|
| 753 |
"type": "zip",
|
| 754 |
-
"url": "https://api.github.com/repos/
|
| 755 |
-
"reference": "
|
| 756 |
"shasum": ""
|
| 757 |
},
|
| 758 |
"require": {
|
| 759 |
-
"
|
| 760 |
-
"
|
| 761 |
-
|
| 762 |
-
"conflict": {
|
| 763 |
-
"symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2"
|
| 764 |
},
|
| 765 |
"require-dev": {
|
| 766 |
-
"
|
|
|
|
|
|
|
| 767 |
},
|
| 768 |
-
"time": "2018-
|
| 769 |
"type": "library",
|
| 770 |
"extra": {
|
| 771 |
"branch-alias": {
|
| 772 |
-
"dev-master": "
|
| 773 |
}
|
| 774 |
},
|
| 775 |
"installation-source": "dist",
|
| 776 |
"autoload": {
|
| 777 |
"psr-4": {
|
| 778 |
-
"
|
| 779 |
-
}
|
| 780 |
-
"exclude-from-classmap": [
|
| 781 |
-
"/Tests/"
|
| 782 |
-
]
|
| 783 |
},
|
| 784 |
"notification-url": "https://packagist.org/downloads/",
|
| 785 |
"license": [
|
|
@@ -787,53 +747,55 @@
|
|
| 787 |
],
|
| 788 |
"authors": [
|
| 789 |
{
|
| 790 |
-
"name": "
|
| 791 |
-
"email": "
|
| 792 |
-
|
| 793 |
-
{
|
| 794 |
-
"name": "Symfony Community",
|
| 795 |
-
"homepage": "https://symfony.com/contributors"
|
| 796 |
}
|
| 797 |
],
|
| 798 |
-
"description": "
|
| 799 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 800 |
},
|
| 801 |
{
|
| 802 |
-
"name": "
|
| 803 |
-
"version": "
|
| 804 |
-
"version_normalized": "
|
| 805 |
"source": {
|
| 806 |
"type": "git",
|
| 807 |
-
"url": "https://github.com/
|
| 808 |
-
"reference": "
|
| 809 |
},
|
| 810 |
"dist": {
|
| 811 |
"type": "zip",
|
| 812 |
-
"url": "https://api.github.com/repos/
|
| 813 |
-
"reference": "
|
| 814 |
"shasum": ""
|
| 815 |
},
|
| 816 |
"require": {
|
| 817 |
-
"
|
| 818 |
-
|
| 819 |
-
|
| 820 |
-
"ext-ctype": "For best performance"
|
| 821 |
},
|
| 822 |
-
"time": "2018-
|
|
|
|
|
|
|
|
|
|
| 823 |
"type": "library",
|
| 824 |
"extra": {
|
| 825 |
"branch-alias": {
|
| 826 |
-
"dev-master": "
|
| 827 |
}
|
| 828 |
},
|
| 829 |
"installation-source": "dist",
|
| 830 |
"autoload": {
|
| 831 |
"psr-4": {
|
| 832 |
-
"
|
| 833 |
-
}
|
| 834 |
-
"files": [
|
| 835 |
-
"bootstrap.php"
|
| 836 |
-
]
|
| 837 |
},
|
| 838 |
"notification-url": "https://packagist.org/downloads/",
|
| 839 |
"license": [
|
|
@@ -841,83 +803,129 @@
|
|
| 841 |
],
|
| 842 |
"authors": [
|
| 843 |
{
|
| 844 |
-
"name": "
|
| 845 |
-
"
|
| 846 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 847 |
{
|
| 848 |
-
"name": "
|
| 849 |
-
"
|
|
|
|
| 850 |
}
|
| 851 |
],
|
| 852 |
-
"description": "
|
| 853 |
-
"homepage": "https://
|
| 854 |
"keywords": [
|
| 855 |
-
"
|
| 856 |
-
"
|
| 857 |
-
"
|
| 858 |
-
"
|
| 859 |
-
]
|
|
|
|
|
|
|
|
|
|
|
|
|
| 860 |
},
|
| 861 |
{
|
| 862 |
-
"name": "
|
| 863 |
-
"version": "
|
| 864 |
-
"version_normalized": "
|
| 865 |
"source": {
|
| 866 |
"type": "git",
|
| 867 |
-
"url": "https://github.com/
|
| 868 |
-
"reference": "
|
| 869 |
},
|
| 870 |
"dist": {
|
| 871 |
"type": "zip",
|
| 872 |
-
"url": "https://api.github.com/repos/
|
| 873 |
-
"reference": "
|
| 874 |
"shasum": ""
|
| 875 |
},
|
| 876 |
"require": {
|
| 877 |
"php": ">=5.3.3"
|
| 878 |
},
|
| 879 |
-
"
|
| 880 |
-
"
|
|
|
|
| 881 |
},
|
| 882 |
-
"time": "2018-
|
| 883 |
"type": "library",
|
| 884 |
"extra": {
|
| 885 |
"branch-alias": {
|
| 886 |
-
"dev-master": "
|
| 887 |
}
|
| 888 |
},
|
| 889 |
"installation-source": "dist",
|
| 890 |
"autoload": {
|
| 891 |
-
"psr-4": {
|
| 892 |
-
"Symfony\\Polyfill\\Mbstring\\": ""
|
| 893 |
-
},
|
| 894 |
"files": [
|
| 895 |
-
"
|
| 896 |
]
|
| 897 |
},
|
| 898 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 899 |
"license": [
|
| 900 |
"MIT"
|
| 901 |
],
|
| 902 |
"authors": [
|
| 903 |
{
|
| 904 |
-
"name": "
|
| 905 |
-
"email": "p@tchwork.com"
|
| 906 |
},
|
| 907 |
{
|
| 908 |
-
"name": "
|
| 909 |
-
"
|
| 910 |
}
|
| 911 |
],
|
| 912 |
-
"description": "
|
| 913 |
-
"homepage": "https://symfony.com",
|
| 914 |
"keywords": [
|
| 915 |
-
"
|
| 916 |
-
"
|
| 917 |
-
"
|
| 918 |
-
|
| 919 |
-
|
| 920 |
-
|
|
|
|
| 921 |
},
|
| 922 |
{
|
| 923 |
"name": "symfony/polyfill-php72",
|
|
@@ -976,72 +984,6 @@
|
|
| 976 |
"shim"
|
| 977 |
]
|
| 978 |
},
|
| 979 |
-
{
|
| 980 |
-
"name": "symfony/translation",
|
| 981 |
-
"version": "v2.8.44",
|
| 982 |
-
"version_normalized": "2.8.44.0",
|
| 983 |
-
"source": {
|
| 984 |
-
"type": "git",
|
| 985 |
-
"url": "https://github.com/symfony/translation.git",
|
| 986 |
-
"reference": "12ad0a708ec55fb80cac9e809c5b56ddd5417d6a"
|
| 987 |
-
},
|
| 988 |
-
"dist": {
|
| 989 |
-
"type": "zip",
|
| 990 |
-
"url": "https://api.github.com/repos/symfony/translation/zipball/12ad0a708ec55fb80cac9e809c5b56ddd5417d6a",
|
| 991 |
-
"reference": "12ad0a708ec55fb80cac9e809c5b56ddd5417d6a",
|
| 992 |
-
"shasum": ""
|
| 993 |
-
},
|
| 994 |
-
"require": {
|
| 995 |
-
"php": ">=5.3.9",
|
| 996 |
-
"symfony/polyfill-mbstring": "~1.0"
|
| 997 |
-
},
|
| 998 |
-
"conflict": {
|
| 999 |
-
"symfony/config": "<2.7"
|
| 1000 |
-
},
|
| 1001 |
-
"require-dev": {
|
| 1002 |
-
"psr/log": "~1.0",
|
| 1003 |
-
"symfony/config": "~2.8",
|
| 1004 |
-
"symfony/intl": "~2.7.25|^2.8.18|~3.2.5",
|
| 1005 |
-
"symfony/yaml": "~2.2|~3.0.0"
|
| 1006 |
-
},
|
| 1007 |
-
"suggest": {
|
| 1008 |
-
"psr/log-implementation": "To use logging capability in translator",
|
| 1009 |
-
"symfony/config": "",
|
| 1010 |
-
"symfony/yaml": ""
|
| 1011 |
-
},
|
| 1012 |
-
"time": "2018-07-26T11:13:39+00:00",
|
| 1013 |
-
"type": "library",
|
| 1014 |
-
"extra": {
|
| 1015 |
-
"branch-alias": {
|
| 1016 |
-
"dev-master": "2.8-dev"
|
| 1017 |
-
}
|
| 1018 |
-
},
|
| 1019 |
-
"installation-source": "dist",
|
| 1020 |
-
"autoload": {
|
| 1021 |
-
"psr-4": {
|
| 1022 |
-
"Symfony\\Component\\Translation\\": ""
|
| 1023 |
-
},
|
| 1024 |
-
"exclude-from-classmap": [
|
| 1025 |
-
"/Tests/"
|
| 1026 |
-
]
|
| 1027 |
-
},
|
| 1028 |
-
"notification-url": "https://packagist.org/downloads/",
|
| 1029 |
-
"license": [
|
| 1030 |
-
"MIT"
|
| 1031 |
-
],
|
| 1032 |
-
"authors": [
|
| 1033 |
-
{
|
| 1034 |
-
"name": "Fabien Potencier",
|
| 1035 |
-
"email": "fabien@symfony.com"
|
| 1036 |
-
},
|
| 1037 |
-
{
|
| 1038 |
-
"name": "Symfony Community",
|
| 1039 |
-
"homepage": "https://symfony.com/contributors"
|
| 1040 |
-
}
|
| 1041 |
-
],
|
| 1042 |
-
"description": "Symfony Translation Component",
|
| 1043 |
-
"homepage": "https://symfony.com"
|
| 1044 |
-
},
|
| 1045 |
{
|
| 1046 |
"name": "tburry/pquery",
|
| 1047 |
"version": "v1.1.1",
|
|
@@ -1096,6 +1038,66 @@
|
|
| 1096 |
"php"
|
| 1097 |
]
|
| 1098 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1099 |
{
|
| 1100 |
"name": "twig/twig",
|
| 1101 |
"version": "v1.35.4",
|
| 1 |
[
|
| 2 |
{
|
| 3 |
"name": "cerdic/css-tidy",
|
| 4 |
+
"version": "v1.6.4",
|
| 5 |
+
"version_normalized": "1.6.4.0",
|
| 6 |
"source": {
|
| 7 |
"type": "git",
|
| 8 |
"url": "https://github.com/Cerdic/CSSTidy.git",
|
| 9 |
+
"reference": "ba7eae1ea2adeaf21e0e892ba3fc67dfb913f85d"
|
| 10 |
},
|
| 11 |
"dist": {
|
| 12 |
"type": "zip",
|
| 13 |
+
"url": "https://api.github.com/repos/Cerdic/CSSTidy/zipball/ba7eae1ea2adeaf21e0e892ba3fc67dfb913f85d",
|
| 14 |
+
"reference": "ba7eae1ea2adeaf21e0e892ba3fc67dfb913f85d",
|
| 15 |
"shasum": ""
|
| 16 |
},
|
| 17 |
"require-dev": {
|
| 18 |
"pear/text_diff": "^1.2",
|
| 19 |
"simpletest/simpletest": "^1.1"
|
| 20 |
},
|
| 21 |
+
"time": "2018-09-29T12:26:47+00:00",
|
| 22 |
"type": "library",
|
| 23 |
"installation-source": "dist",
|
| 24 |
"autoload": {
|
| 40 |
],
|
| 41 |
"description": "CSSTidy is a CSS minifier"
|
| 42 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
{
|
| 44 |
"name": "j4mie/idiorm",
|
| 45 |
"version": "v1.5.6",
|
| 169 |
"paris"
|
| 170 |
]
|
| 171 |
},
|
| 172 |
+
{
|
| 173 |
+
"name": "psr/log",
|
| 174 |
+
"version": "1.0.2",
|
| 175 |
+
"version_normalized": "1.0.2.0",
|
| 176 |
+
"source": {
|
| 177 |
+
"type": "git",
|
| 178 |
+
"url": "https://github.com/php-fig/log.git",
|
| 179 |
+
"reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d"
|
| 180 |
+
},
|
| 181 |
+
"dist": {
|
| 182 |
+
"type": "zip",
|
| 183 |
+
"url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
|
| 184 |
+
"reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
|
| 185 |
+
"shasum": ""
|
| 186 |
+
},
|
| 187 |
+
"require": {
|
| 188 |
+
"php": ">=5.3.0"
|
| 189 |
+
},
|
| 190 |
+
"time": "2016-10-10T12:19:37+00:00",
|
| 191 |
+
"type": "library",
|
| 192 |
+
"extra": {
|
| 193 |
+
"branch-alias": {
|
| 194 |
+
"dev-master": "1.0.x-dev"
|
| 195 |
+
}
|
| 196 |
+
},
|
| 197 |
+
"installation-source": "dist",
|
| 198 |
+
"autoload": {
|
| 199 |
+
"psr-4": {
|
| 200 |
+
"Psr\\Log\\": "Psr/Log/"
|
| 201 |
+
}
|
| 202 |
+
},
|
| 203 |
+
"notification-url": "https://packagist.org/downloads/",
|
| 204 |
+
"license": [
|
| 205 |
+
"MIT"
|
| 206 |
+
],
|
| 207 |
+
"authors": [
|
| 208 |
+
{
|
| 209 |
+
"name": "PHP-FIG",
|
| 210 |
+
"homepage": "http://www.php-fig.org/"
|
| 211 |
+
}
|
| 212 |
+
],
|
| 213 |
+
"description": "Common interface for logging libraries",
|
| 214 |
+
"homepage": "https://github.com/php-fig/log",
|
| 215 |
+
"keywords": [
|
| 216 |
+
"log",
|
| 217 |
+
"psr",
|
| 218 |
+
"psr-3"
|
| 219 |
+
]
|
| 220 |
+
},
|
| 221 |
{
|
| 222 |
"name": "monolog/monolog",
|
| 223 |
"version": "1.23.0",
|
| 345 |
]
|
| 346 |
},
|
| 347 |
{
|
| 348 |
+
"name": "symfony/polyfill-mbstring",
|
| 349 |
+
"version": "v1.9.0",
|
| 350 |
+
"version_normalized": "1.9.0.0",
|
| 351 |
"source": {
|
| 352 |
"type": "git",
|
| 353 |
+
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
| 354 |
+
"reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8"
|
| 355 |
},
|
| 356 |
"dist": {
|
| 357 |
"type": "zip",
|
| 358 |
+
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/d0cd638f4634c16d8df4508e847f14e9e43168b8",
|
| 359 |
+
"reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8",
|
| 360 |
"shasum": ""
|
| 361 |
},
|
| 362 |
"require": {
|
| 363 |
+
"php": ">=5.3.3"
|
|
|
|
| 364 |
},
|
| 365 |
+
"suggest": {
|
| 366 |
+
"ext-mbstring": "For best performance"
|
|
|
|
| 367 |
},
|
| 368 |
+
"time": "2018-08-06T14:22:27+00:00",
|
| 369 |
"type": "library",
|
| 370 |
"extra": {
|
| 371 |
+
"branch-alias": {
|
| 372 |
+
"dev-master": "1.9-dev"
|
|
|
|
|
|
|
| 373 |
}
|
| 374 |
},
|
| 375 |
"installation-source": "dist",
|
| 376 |
"autoload": {
|
| 377 |
"psr-4": {
|
| 378 |
+
"Symfony\\Polyfill\\Mbstring\\": ""
|
| 379 |
+
},
|
| 380 |
+
"files": [
|
| 381 |
+
"bootstrap.php"
|
| 382 |
+
]
|
| 383 |
},
|
| 384 |
"notification-url": "https://packagist.org/downloads/",
|
| 385 |
"license": [
|
| 387 |
],
|
| 388 |
"authors": [
|
| 389 |
{
|
| 390 |
+
"name": "Nicolas Grekas",
|
| 391 |
+
"email": "p@tchwork.com"
|
| 392 |
+
},
|
| 393 |
+
{
|
| 394 |
+
"name": "Symfony Community",
|
| 395 |
+
"homepage": "https://symfony.com/contributors"
|
| 396 |
}
|
| 397 |
],
|
| 398 |
+
"description": "Symfony polyfill for the Mbstring extension",
|
| 399 |
+
"homepage": "https://symfony.com",
|
| 400 |
"keywords": [
|
| 401 |
+
"compatibility",
|
| 402 |
+
"mbstring",
|
| 403 |
+
"polyfill",
|
| 404 |
+
"portable",
|
| 405 |
+
"shim"
|
| 406 |
]
|
| 407 |
},
|
| 408 |
{
|
| 409 |
+
"name": "symfony/translation",
|
| 410 |
+
"version": "v2.8.46",
|
| 411 |
+
"version_normalized": "2.8.46.0",
|
| 412 |
"source": {
|
| 413 |
"type": "git",
|
| 414 |
+
"url": "https://github.com/symfony/translation.git",
|
| 415 |
+
"reference": "59b4debd89c156fd753343fcc1ca36aa5bc2d0f4"
|
| 416 |
},
|
| 417 |
"dist": {
|
| 418 |
"type": "zip",
|
| 419 |
+
"url": "https://api.github.com/repos/symfony/translation/zipball/59b4debd89c156fd753343fcc1ca36aa5bc2d0f4",
|
| 420 |
+
"reference": "59b4debd89c156fd753343fcc1ca36aa5bc2d0f4",
|
| 421 |
"shasum": ""
|
| 422 |
},
|
| 423 |
"require": {
|
| 424 |
+
"php": ">=5.3.9",
|
| 425 |
+
"symfony/polyfill-mbstring": "~1.0"
|
| 426 |
},
|
| 427 |
+
"conflict": {
|
| 428 |
+
"symfony/config": "<2.7"
|
| 429 |
+
},
|
| 430 |
+
"require-dev": {
|
| 431 |
+
"psr/log": "~1.0",
|
| 432 |
+
"symfony/config": "~2.8",
|
| 433 |
+
"symfony/intl": "~2.7.25|^2.8.18|~3.2.5",
|
| 434 |
+
"symfony/yaml": "~2.2|~3.0.0"
|
| 435 |
+
},
|
| 436 |
+
"suggest": {
|
| 437 |
+
"psr/log-implementation": "To use logging capability in translator",
|
| 438 |
+
"symfony/config": "",
|
| 439 |
+
"symfony/yaml": ""
|
| 440 |
+
},
|
| 441 |
+
"time": "2018-09-21T12:46:38+00:00",
|
| 442 |
"type": "library",
|
| 443 |
"extra": {
|
| 444 |
"branch-alias": {
|
| 445 |
+
"dev-master": "2.8-dev"
|
| 446 |
}
|
| 447 |
},
|
| 448 |
"installation-source": "dist",
|
| 449 |
"autoload": {
|
| 450 |
"psr-4": {
|
| 451 |
+
"Symfony\\Component\\Translation\\": ""
|
| 452 |
+
},
|
| 453 |
+
"exclude-from-classmap": [
|
| 454 |
+
"/Tests/"
|
| 455 |
+
]
|
| 456 |
+
},
|
| 457 |
+
"notification-url": "https://packagist.org/downloads/",
|
| 458 |
+
"license": [
|
| 459 |
+
"MIT"
|
| 460 |
+
],
|
| 461 |
+
"authors": [
|
| 462 |
+
{
|
| 463 |
+
"name": "Fabien Potencier",
|
| 464 |
+
"email": "fabien@symfony.com"
|
| 465 |
+
},
|
| 466 |
+
{
|
| 467 |
+
"name": "Symfony Community",
|
| 468 |
+
"homepage": "https://symfony.com/contributors"
|
| 469 |
+
}
|
| 470 |
+
],
|
| 471 |
+
"description": "Symfony Translation Component",
|
| 472 |
+
"homepage": "https://symfony.com"
|
| 473 |
+
},
|
| 474 |
+
{
|
| 475 |
+
"name": "nesbot/carbon",
|
| 476 |
+
"version": "1.34.0",
|
| 477 |
+
"version_normalized": "1.34.0.0",
|
| 478 |
+
"source": {
|
| 479 |
+
"type": "git",
|
| 480 |
+
"url": "https://github.com/briannesbitt/Carbon.git",
|
| 481 |
+
"reference": "1dbd3cb01c5645f3e7deda7aa46ef780d95fcc33"
|
| 482 |
+
},
|
| 483 |
+
"dist": {
|
| 484 |
+
"type": "zip",
|
| 485 |
+
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/1dbd3cb01c5645f3e7deda7aa46ef780d95fcc33",
|
| 486 |
+
"reference": "1dbd3cb01c5645f3e7deda7aa46ef780d95fcc33",
|
| 487 |
+
"shasum": ""
|
| 488 |
+
},
|
| 489 |
+
"require": {
|
| 490 |
+
"php": ">=5.3.9",
|
| 491 |
+
"symfony/translation": "~2.6 || ~3.0 || ~4.0"
|
| 492 |
+
},
|
| 493 |
+
"require-dev": {
|
| 494 |
+
"friendsofphp/php-cs-fixer": "~2",
|
| 495 |
+
"phpunit/phpunit": "^4.8.35 || ^5.7"
|
| 496 |
+
},
|
| 497 |
+
"time": "2018-09-20T19:36:25+00:00",
|
| 498 |
+
"type": "library",
|
| 499 |
+
"extra": {
|
| 500 |
+
"laravel": {
|
| 501 |
+
"providers": [
|
| 502 |
+
"Carbon\\Laravel\\ServiceProvider"
|
| 503 |
+
]
|
| 504 |
+
}
|
| 505 |
+
},
|
| 506 |
+
"installation-source": "dist",
|
| 507 |
+
"autoload": {
|
| 508 |
+
"psr-4": {
|
| 509 |
+
"": "src/"
|
| 510 |
}
|
| 511 |
},
|
| 512 |
"notification-url": "https://packagist.org/downloads/",
|
| 515 |
],
|
| 516 |
"authors": [
|
| 517 |
{
|
| 518 |
+
"name": "Brian Nesbitt",
|
| 519 |
+
"email": "brian@nesbot.com",
|
| 520 |
+
"homepage": "http://nesbot.com"
|
| 521 |
}
|
| 522 |
],
|
| 523 |
+
"description": "A simple API extension for DateTime.",
|
| 524 |
+
"homepage": "http://carbon.nesbot.com",
|
| 525 |
"keywords": [
|
| 526 |
+
"date",
|
| 527 |
+
"datetime",
|
| 528 |
+
"time"
|
| 529 |
]
|
| 530 |
},
|
| 531 |
{
|
| 575 |
]
|
| 576 |
},
|
| 577 |
{
|
| 578 |
+
"name": "symfony/debug",
|
| 579 |
+
"version": "v3.4.17",
|
| 580 |
+
"version_normalized": "3.4.17.0",
|
| 581 |
"source": {
|
| 582 |
"type": "git",
|
| 583 |
+
"url": "https://github.com/symfony/debug.git",
|
| 584 |
+
"reference": "0a612e9dfbd2ccce03eb174365f31ecdca930ff6"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 585 |
},
|
| 586 |
"dist": {
|
| 587 |
"type": "zip",
|
| 588 |
+
"url": "https://api.github.com/repos/symfony/debug/zipball/0a612e9dfbd2ccce03eb174365f31ecdca930ff6",
|
| 589 |
+
"reference": "0a612e9dfbd2ccce03eb174365f31ecdca930ff6",
|
| 590 |
"shasum": ""
|
| 591 |
},
|
| 592 |
"require": {
|
| 593 |
+
"php": "^5.5.9|>=7.0.8",
|
| 594 |
+
"psr/log": "~1.0"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 595 |
},
|
| 596 |
+
"conflict": {
|
| 597 |
+
"symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2"
|
| 598 |
},
|
| 599 |
"require-dev": {
|
| 600 |
+
"symfony/http-kernel": "~2.8|~3.0|~4.0"
|
|
|
|
| 601 |
},
|
| 602 |
+
"time": "2018-10-02T16:33:53+00:00",
|
| 603 |
"type": "library",
|
| 604 |
"extra": {
|
| 605 |
"branch-alias": {
|
| 606 |
+
"dev-master": "3.4-dev"
|
| 607 |
}
|
| 608 |
},
|
| 609 |
"installation-source": "dist",
|
| 610 |
"autoload": {
|
| 611 |
+
"psr-4": {
|
| 612 |
+
"Symfony\\Component\\Debug\\": ""
|
| 613 |
+
},
|
| 614 |
+
"exclude-from-classmap": [
|
| 615 |
+
"/Tests/"
|
| 616 |
]
|
| 617 |
},
|
| 618 |
+
"notification-url": "https://packagist.org/downloads/",
|
|
|
|
|
|
|
|
|
|
|
|
|
| 619 |
"license": [
|
| 620 |
"MIT"
|
| 621 |
],
|
| 622 |
"authors": [
|
|
|
|
|
|
|
|
|
|
| 623 |
{
|
| 624 |
"name": "Fabien Potencier",
|
| 625 |
"email": "fabien@symfony.com"
|
| 626 |
+
},
|
| 627 |
+
{
|
| 628 |
+
"name": "Symfony Community",
|
| 629 |
+
"homepage": "https://symfony.com/contributors"
|
| 630 |
}
|
| 631 |
],
|
| 632 |
+
"description": "Symfony Debug Component",
|
| 633 |
+
"homepage": "https://symfony.com"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 634 |
},
|
| 635 |
{
|
| 636 |
"name": "symfony/console",
|
| 637 |
+
"version": "v3.4.17",
|
| 638 |
+
"version_normalized": "3.4.17.0",
|
| 639 |
"source": {
|
| 640 |
"type": "git",
|
| 641 |
"url": "https://github.com/symfony/console.git",
|
| 642 |
+
"reference": "3b2b415d4c48fbefca7dc742aa0a0171bfae4e0b"
|
| 643 |
},
|
| 644 |
"dist": {
|
| 645 |
"type": "zip",
|
| 646 |
+
"url": "https://api.github.com/repos/symfony/console/zipball/3b2b415d4c48fbefca7dc742aa0a0171bfae4e0b",
|
| 647 |
+
"reference": "3b2b415d4c48fbefca7dc742aa0a0171bfae4e0b",
|
| 648 |
"shasum": ""
|
| 649 |
},
|
| 650 |
"require": {
|
| 651 |
"php": "^5.5.9|>=7.0.8",
|
| 652 |
+
"symfony/debug": "~2.8|~3.0|~4.0",
|
| 653 |
"symfony/polyfill-mbstring": "~1.0"
|
| 654 |
},
|
| 655 |
"conflict": {
|
| 656 |
+
"symfony/dependency-injection": "<3.4",
|
| 657 |
+
"symfony/process": "<3.3"
|
| 658 |
},
|
| 659 |
"require-dev": {
|
| 660 |
"psr/log": "~1.0",
|
| 661 |
+
"symfony/config": "~3.3|~4.0",
|
| 662 |
+
"symfony/dependency-injection": "~3.4|~4.0",
|
| 663 |
+
"symfony/event-dispatcher": "~2.8|~3.0|~4.0",
|
| 664 |
+
"symfony/lock": "~3.4|~4.0",
|
| 665 |
+
"symfony/process": "~3.3|~4.0"
|
| 666 |
},
|
| 667 |
"suggest": {
|
| 668 |
+
"psr/log-implementation": "For using the console logger",
|
| 669 |
"symfony/event-dispatcher": "",
|
| 670 |
+
"symfony/lock": "",
|
| 671 |
"symfony/process": ""
|
| 672 |
},
|
| 673 |
+
"time": "2018-10-02T16:33:53+00:00",
|
| 674 |
"type": "library",
|
| 675 |
"extra": {
|
| 676 |
"branch-alias": {
|
| 677 |
+
"dev-master": "3.4-dev"
|
| 678 |
}
|
| 679 |
},
|
| 680 |
"installation-source": "dist",
|
| 704 |
"homepage": "https://symfony.com"
|
| 705 |
},
|
| 706 |
{
|
| 707 |
+
"name": "composer/ca-bundle",
|
| 708 |
+
"version": "1.1.2",
|
| 709 |
+
"version_normalized": "1.1.2.0",
|
| 710 |
"source": {
|
| 711 |
"type": "git",
|
| 712 |
+
"url": "https://github.com/composer/ca-bundle.git",
|
| 713 |
+
"reference": "46afded9720f40b9dc63542af4e3e43a1177acb0"
|
| 714 |
},
|
| 715 |
"dist": {
|
| 716 |
"type": "zip",
|
| 717 |
+
"url": "https://api.github.com/repos/composer/ca-bundle/zipball/46afded9720f40b9dc63542af4e3e43a1177acb0",
|
| 718 |
+
"reference": "46afded9720f40b9dc63542af4e3e43a1177acb0",
|
| 719 |
"shasum": ""
|
| 720 |
},
|
| 721 |
"require": {
|
| 722 |
+
"ext-openssl": "*",
|
| 723 |
+
"ext-pcre": "*",
|
| 724 |
+
"php": "^5.3.2 || ^7.0"
|
|
|
|
|
|
|
| 725 |
},
|
| 726 |
"require-dev": {
|
| 727 |
+
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5",
|
| 728 |
+
"psr/log": "^1.0",
|
| 729 |
+
"symfony/process": "^2.5 || ^3.0 || ^4.0"
|
| 730 |
},
|
| 731 |
+
"time": "2018-08-08T08:57:40+00:00",
|
| 732 |
"type": "library",
|
| 733 |
"extra": {
|
| 734 |
"branch-alias": {
|
| 735 |
+
"dev-master": "1.x-dev"
|
| 736 |
}
|
| 737 |
},
|
| 738 |
"installation-source": "dist",
|
| 739 |
"autoload": {
|
| 740 |
"psr-4": {
|
| 741 |
+
"Composer\\CaBundle\\": "src"
|
| 742 |
+
}
|
|
|
|
|
|
|
|
|
|
| 743 |
},
|
| 744 |
"notification-url": "https://packagist.org/downloads/",
|
| 745 |
"license": [
|
| 747 |
],
|
| 748 |
"authors": [
|
| 749 |
{
|
| 750 |
+
"name": "Jordi Boggiano",
|
| 751 |
+
"email": "j.boggiano@seld.be",
|
| 752 |
+
"homepage": "http://seld.be"
|
|
|
|
|
|
|
|
|
|
| 753 |
}
|
| 754 |
],
|
| 755 |
+
"description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.",
|
| 756 |
+
"keywords": [
|
| 757 |
+
"cabundle",
|
| 758 |
+
"cacert",
|
| 759 |
+
"certificate",
|
| 760 |
+
"ssl",
|
| 761 |
+
"tls"
|
| 762 |
+
]
|
| 763 |
},
|
| 764 |
{
|
| 765 |
+
"name": "sensiolabs/security-checker",
|
| 766 |
+
"version": "v5.0.0",
|
| 767 |
+
"version_normalized": "5.0.0.0",
|
| 768 |
"source": {
|
| 769 |
"type": "git",
|
| 770 |
+
"url": "https://github.com/sensiolabs/security-checker.git",
|
| 771 |
+
"reference": "df4625e39868ecf4e868355caf45352f566791db"
|
| 772 |
},
|
| 773 |
"dist": {
|
| 774 |
"type": "zip",
|
| 775 |
+
"url": "https://api.github.com/repos/sensiolabs/security-checker/zipball/df4625e39868ecf4e868355caf45352f566791db",
|
| 776 |
+
"reference": "df4625e39868ecf4e868355caf45352f566791db",
|
| 777 |
"shasum": ""
|
| 778 |
},
|
| 779 |
"require": {
|
| 780 |
+
"composer/ca-bundle": "^1.0",
|
| 781 |
+
"php": ">=5.5.9",
|
| 782 |
+
"symfony/console": "~2.7|~3.0|~4.0"
|
|
|
|
| 783 |
},
|
| 784 |
+
"time": "2018-09-04T07:02:17+00:00",
|
| 785 |
+
"bin": [
|
| 786 |
+
"security-checker"
|
| 787 |
+
],
|
| 788 |
"type": "library",
|
| 789 |
"extra": {
|
| 790 |
"branch-alias": {
|
| 791 |
+
"dev-master": "5.0-dev"
|
| 792 |
}
|
| 793 |
},
|
| 794 |
"installation-source": "dist",
|
| 795 |
"autoload": {
|
| 796 |
"psr-4": {
|
| 797 |
+
"SensioLabs\\Security\\": "SensioLabs/Security"
|
| 798 |
+
}
|
|
|
|
|
|
|
|
|
|
| 799 |
},
|
| 800 |
"notification-url": "https://packagist.org/downloads/",
|
| 801 |
"license": [
|
| 803 |
],
|
| 804 |
"authors": [
|
| 805 |
{
|
| 806 |
+
"name": "Fabien Potencier",
|
| 807 |
+
"email": "fabien.potencier@gmail.com"
|
| 808 |
+
}
|
| 809 |
+
],
|
| 810 |
+
"description": "A security checker for your composer.lock"
|
| 811 |
+
},
|
| 812 |
+
{
|
| 813 |
+
"name": "soundasleep/html2text",
|
| 814 |
+
"version": "dev-master",
|
| 815 |
+
"version_normalized": "9999999-dev",
|
| 816 |
+
"source": {
|
| 817 |
+
"type": "git",
|
| 818 |
+
"url": "https://github.com/mailpoet/html2text.git",
|
| 819 |
+
"reference": "95c5f266e7ea1a79b3879555cf27289985b1e4c7"
|
| 820 |
+
},
|
| 821 |
+
"dist": {
|
| 822 |
+
"type": "zip",
|
| 823 |
+
"url": "https://api.github.com/repos/mailpoet/html2text/zipball/95c5f266e7ea1a79b3879555cf27289985b1e4c7",
|
| 824 |
+
"reference": "95c5f266e7ea1a79b3879555cf27289985b1e4c7",
|
| 825 |
+
"shasum": ""
|
| 826 |
+
},
|
| 827 |
+
"require": {
|
| 828 |
+
"ext-dom": "*",
|
| 829 |
+
"ext-libxml": "*",
|
| 830 |
+
"php": ">=5.3.2"
|
| 831 |
+
},
|
| 832 |
+
"require-dev": {
|
| 833 |
+
"phpunit/phpunit": ">=4.0",
|
| 834 |
+
"soundasleep/component-tests": "dev-master"
|
| 835 |
+
},
|
| 836 |
+
"time": "2018-04-08T14:18:46+00:00",
|
| 837 |
+
"type": "library",
|
| 838 |
+
"installation-source": "dist",
|
| 839 |
+
"autoload": {
|
| 840 |
+
"psr-4": {
|
| 841 |
+
"Html2Text\\": "src"
|
| 842 |
+
}
|
| 843 |
+
},
|
| 844 |
+
"license": [
|
| 845 |
+
"EPL-1.0"
|
| 846 |
+
],
|
| 847 |
+
"authors": [
|
| 848 |
{
|
| 849 |
+
"name": "Jevon Wright",
|
| 850 |
+
"homepage": "https://jevon.org",
|
| 851 |
+
"role": "Developer"
|
| 852 |
}
|
| 853 |
],
|
| 854 |
+
"description": "A PHP script to convert HTML into a plain text format",
|
| 855 |
+
"homepage": "https://github.com/soundasleep/html2text",
|
| 856 |
"keywords": [
|
| 857 |
+
"email",
|
| 858 |
+
"html",
|
| 859 |
+
"php",
|
| 860 |
+
"text"
|
| 861 |
+
],
|
| 862 |
+
"support": {
|
| 863 |
+
"email": "support@jevon.org",
|
| 864 |
+
"source": "https://github.com/mailpoet/html2text/tree/master"
|
| 865 |
+
}
|
| 866 |
},
|
| 867 |
{
|
| 868 |
+
"name": "swiftmailer/swiftmailer",
|
| 869 |
+
"version": "dev-tls",
|
| 870 |
+
"version_normalized": "dev-tls",
|
| 871 |
"source": {
|
| 872 |
"type": "git",
|
| 873 |
+
"url": "https://github.com/mailpoet/swiftmailer.git",
|
| 874 |
+
"reference": "e6963324036afd178d3a8356e5c705ae4a442ef9"
|
| 875 |
},
|
| 876 |
"dist": {
|
| 877 |
"type": "zip",
|
| 878 |
+
"url": "https://api.github.com/repos/mailpoet/swiftmailer/zipball/e6963324036afd178d3a8356e5c705ae4a442ef9",
|
| 879 |
+
"reference": "e6963324036afd178d3a8356e5c705ae4a442ef9",
|
| 880 |
"shasum": ""
|
| 881 |
},
|
| 882 |
"require": {
|
| 883 |
"php": ">=5.3.3"
|
| 884 |
},
|
| 885 |
+
"require-dev": {
|
| 886 |
+
"mockery/mockery": "~0.9.1",
|
| 887 |
+
"symfony/phpunit-bridge": "~3.2"
|
| 888 |
},
|
| 889 |
+
"time": "2018-07-09T16:02:27+00:00",
|
| 890 |
"type": "library",
|
| 891 |
"extra": {
|
| 892 |
"branch-alias": {
|
| 893 |
+
"dev-master": "5.4-dev"
|
| 894 |
}
|
| 895 |
},
|
| 896 |
"installation-source": "dist",
|
| 897 |
"autoload": {
|
|
|
|
|
|
|
|
|
|
| 898 |
"files": [
|
| 899 |
+
"lib/swift_required.php"
|
| 900 |
]
|
| 901 |
},
|
| 902 |
+
"autoload-dev": {
|
| 903 |
+
"psr-0": {
|
| 904 |
+
"Swift_": "tests/unit"
|
| 905 |
+
}
|
| 906 |
+
},
|
| 907 |
"license": [
|
| 908 |
"MIT"
|
| 909 |
],
|
| 910 |
"authors": [
|
| 911 |
{
|
| 912 |
+
"name": "Chris Corbyn"
|
|
|
|
| 913 |
},
|
| 914 |
{
|
| 915 |
+
"name": "Fabien Potencier",
|
| 916 |
+
"email": "fabien@symfony.com"
|
| 917 |
}
|
| 918 |
],
|
| 919 |
+
"description": "Swiftmailer, free feature-rich PHP mailer",
|
| 920 |
+
"homepage": "https://swiftmailer.symfony.com",
|
| 921 |
"keywords": [
|
| 922 |
+
"email",
|
| 923 |
+
"mail",
|
| 924 |
+
"mailer"
|
| 925 |
+
],
|
| 926 |
+
"support": {
|
| 927 |
+
"source": "https://github.com/mailpoet/swiftmailer/tree/tls"
|
| 928 |
+
}
|
| 929 |
},
|
| 930 |
{
|
| 931 |
"name": "symfony/polyfill-php72",
|
| 984 |
"shim"
|
| 985 |
]
|
| 986 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 987 |
{
|
| 988 |
"name": "tburry/pquery",
|
| 989 |
"version": "v1.1.1",
|
| 1038 |
"php"
|
| 1039 |
]
|
| 1040 |
},
|
| 1041 |
+
{
|
| 1042 |
+
"name": "symfony/polyfill-ctype",
|
| 1043 |
+
"version": "v1.9.0",
|
| 1044 |
+
"version_normalized": "1.9.0.0",
|
| 1045 |
+
"source": {
|
| 1046 |
+
"type": "git",
|
| 1047 |
+
"url": "https://github.com/symfony/polyfill-ctype.git",
|
| 1048 |
+
"reference": "e3d826245268269cd66f8326bd8bc066687b4a19"
|
| 1049 |
+
},
|
| 1050 |
+
"dist": {
|
| 1051 |
+
"type": "zip",
|
| 1052 |
+
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19",
|
| 1053 |
+
"reference": "e3d826245268269cd66f8326bd8bc066687b4a19",
|
| 1054 |
+
"shasum": ""
|
| 1055 |
+
},
|
| 1056 |
+
"require": {
|
| 1057 |
+
"php": ">=5.3.3"
|
| 1058 |
+
},
|
| 1059 |
+
"suggest": {
|
| 1060 |
+
"ext-ctype": "For best performance"
|
| 1061 |
+
},
|
| 1062 |
+
"time": "2018-08-06T14:22:27+00:00",
|
| 1063 |
+
"type": "library",
|
| 1064 |
+
"extra": {
|
| 1065 |
+
"branch-alias": {
|
| 1066 |
+
"dev-master": "1.9-dev"
|
| 1067 |
+
}
|
| 1068 |
+
},
|
| 1069 |
+
"installation-source": "dist",
|
| 1070 |
+
"autoload": {
|
| 1071 |
+
"psr-4": {
|
| 1072 |
+
"Symfony\\Polyfill\\Ctype\\": ""
|
| 1073 |
+
},
|
| 1074 |
+
"files": [
|
| 1075 |
+
"bootstrap.php"
|
| 1076 |
+
]
|
| 1077 |
+
},
|
| 1078 |
+
"notification-url": "https://packagist.org/downloads/",
|
| 1079 |
+
"license": [
|
| 1080 |
+
"MIT"
|
| 1081 |
+
],
|
| 1082 |
+
"authors": [
|
| 1083 |
+
{
|
| 1084 |
+
"name": "Symfony Community",
|
| 1085 |
+
"homepage": "https://symfony.com/contributors"
|
| 1086 |
+
},
|
| 1087 |
+
{
|
| 1088 |
+
"name": "Gert de Pagter",
|
| 1089 |
+
"email": "BackEndTea@gmail.com"
|
| 1090 |
+
}
|
| 1091 |
+
],
|
| 1092 |
+
"description": "Symfony polyfill for ctype functions",
|
| 1093 |
+
"homepage": "https://symfony.com",
|
| 1094 |
+
"keywords": [
|
| 1095 |
+
"compatibility",
|
| 1096 |
+
"ctype",
|
| 1097 |
+
"polyfill",
|
| 1098 |
+
"portable"
|
| 1099 |
+
]
|
| 1100 |
+
},
|
| 1101 |
{
|
| 1102 |
"name": "twig/twig",
|
| 1103 |
"version": "v1.35.4",
|
vendor/nesbot/carbon/src/Carbon/Lang/ru.php
CHANGED
|
@@ -11,19 +11,19 @@
|
|
| 11 |
|
| 12 |
return array(
|
| 13 |
'year' => ':count год|:count года|:count лет',
|
| 14 |
-
'y' => ':count
|
| 15 |
'month' => ':count месяц|:count месяца|:count месяцев',
|
| 16 |
-
'm' => ':count
|
| 17 |
'week' => ':count неделю|:count недели|:count недель',
|
| 18 |
-
'w' => ':count
|
| 19 |
'day' => ':count день|:count дня|:count дней',
|
| 20 |
-
'd' => ':count
|
| 21 |
'hour' => ':count час|:count часа|:count часов',
|
| 22 |
-
'h' => ':count
|
| 23 |
'minute' => ':count минуту|:count минуты|:count минут',
|
| 24 |
-
'min' => ':count
|
| 25 |
'second' => ':count секунду|:count секунды|:count секунд',
|
| 26 |
-
's' => ':count
|
| 27 |
'ago' => ':time назад',
|
| 28 |
'from_now' => 'через :time',
|
| 29 |
'after' => ':time после',
|
| 11 |
|
| 12 |
return array(
|
| 13 |
'year' => ':count год|:count года|:count лет',
|
| 14 |
+
'y' => ':count г|:count г|:count л',
|
| 15 |
'month' => ':count месяц|:count месяца|:count месяцев',
|
| 16 |
+
'm' => ':count м|:count м|:count м',
|
| 17 |
'week' => ':count неделю|:count недели|:count недель',
|
| 18 |
+
'w' => ':count н|:count н|:count н',
|
| 19 |
'day' => ':count день|:count дня|:count дней',
|
| 20 |
+
'd' => ':count д|:count д|:count д',
|
| 21 |
'hour' => ':count час|:count часа|:count часов',
|
| 22 |
+
'h' => ':count ч|:count ч|:count ч',
|
| 23 |
'minute' => ':count минуту|:count минуты|:count минут',
|
| 24 |
+
'min' => ':count мин|:count мин|:count мин',
|
| 25 |
'second' => ':count секунду|:count секунды|:count секунд',
|
| 26 |
+
's' => ':count с|:count с|:count с',
|
| 27 |
'ago' => ':time назад',
|
| 28 |
'from_now' => 'через :time',
|
| 29 |
'after' => ':time после',
|
vendor/nesbot/carbon/src/JsonSerializable.php
CHANGED
|
@@ -1,16 +1,18 @@
|
|
| 1 |
<?php
|
| 2 |
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
|
|
|
|
|
|
| 16 |
}
|
| 1 |
<?php
|
| 2 |
|
| 3 |
+
if (!interface_exists('JsonSerializable')) {
|
| 4 |
+
interface JsonSerializable
|
| 5 |
+
{
|
| 6 |
+
/**
|
| 7 |
+
* Specify data which should be serialized to JSON.
|
| 8 |
+
*
|
| 9 |
+
* @link http://php.net/manual/en/jsonserializable.jsonserialize.php
|
| 10 |
+
*
|
| 11 |
+
* @return mixed data which can be serialized by <b>json_encode</b>,
|
| 12 |
+
* which is a value of any type other than a resource.
|
| 13 |
+
*
|
| 14 |
+
* @since 5.4.0
|
| 15 |
+
*/
|
| 16 |
+
public function jsonSerialize();
|
| 17 |
+
}
|
| 18 |
}
|
vendor/sensiolabs/security-checker/SensioLabs/Security/Command/SecurityCheckerCommand.php
CHANGED
|
@@ -18,9 +18,6 @@ use Symfony\Component\Console\Output\OutputInterface;
|
|
| 18 |
use Symfony\Component\Console\Input\InputArgument;
|
| 19 |
use Symfony\Component\Console\Input\InputOption;
|
| 20 |
use SensioLabs\Security\Exception\ExceptionInterface;
|
| 21 |
-
use SensioLabs\Security\Formatters\JsonFormatter;
|
| 22 |
-
use SensioLabs\Security\Formatters\SimpleFormatter;
|
| 23 |
-
use SensioLabs\Security\Formatters\TextFormatter;
|
| 24 |
|
| 25 |
class SecurityCheckerCommand extends Command
|
| 26 |
{
|
|
@@ -42,12 +39,13 @@ class SecurityCheckerCommand extends Command
|
|
| 42 |
{
|
| 43 |
$this
|
| 44 |
->setName('security:check')
|
| 45 |
-
->setDefinition(
|
| 46 |
new InputArgument('lockfile', InputArgument::OPTIONAL, 'The path to the composer.lock file', 'composer.lock'),
|
| 47 |
-
new InputOption('format', '', InputOption::VALUE_REQUIRED, 'The output format', '
|
| 48 |
new InputOption('end-point', '', InputOption::VALUE_REQUIRED, 'The security checker server URL'),
|
| 49 |
new InputOption('timeout', '', InputOption::VALUE_REQUIRED, 'The HTTP timeout in seconds'),
|
| 50 |
-
|
|
|
|
| 51 |
->setDescription('Checks security issues in your project dependencies')
|
| 52 |
->setHelp(<<<EOF
|
| 53 |
The <info>%command.name%</info> command looks for security issues in the
|
|
@@ -81,35 +79,21 @@ EOF
|
|
| 81 |
$this->checker->getCrawler()->setTimeout($timeout);
|
| 82 |
}
|
| 83 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 84 |
try {
|
| 85 |
-
$
|
| 86 |
} catch (ExceptionInterface $e) {
|
| 87 |
$output->writeln($this->getHelperSet()->get('formatter')->formatBlock($e->getMessage(), 'error', true));
|
| 88 |
|
| 89 |
return 1;
|
| 90 |
}
|
| 91 |
|
| 92 |
-
|
| 93 |
-
case 'json':
|
| 94 |
-
$formatter = new JsonFormatter();
|
| 95 |
-
break;
|
| 96 |
-
case 'simple':
|
| 97 |
-
$formatter = new SimpleFormatter($this->getHelperSet()->get('formatter'));
|
| 98 |
-
break;
|
| 99 |
-
case 'text':
|
| 100 |
-
default:
|
| 101 |
-
$formatter = new TextFormatter($this->getHelperSet()->get('formatter'));
|
| 102 |
-
}
|
| 103 |
-
|
| 104 |
-
if (!is_array($vulnerabilities)) {
|
| 105 |
-
$output->writeln($this->getHelperSet()->get('formatter')->formatBlock('Security Checker Server returned garbage.', 'error', true));
|
| 106 |
-
|
| 107 |
-
return 127;
|
| 108 |
-
}
|
| 109 |
-
|
| 110 |
-
$formatter->displayResults($output, $input->getArgument('lockfile'), $vulnerabilities);
|
| 111 |
|
| 112 |
-
if ($
|
| 113 |
return 1;
|
| 114 |
}
|
| 115 |
}
|
| 18 |
use Symfony\Component\Console\Input\InputArgument;
|
| 19 |
use Symfony\Component\Console\Input\InputOption;
|
| 20 |
use SensioLabs\Security\Exception\ExceptionInterface;
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
class SecurityCheckerCommand extends Command
|
| 23 |
{
|
| 39 |
{
|
| 40 |
$this
|
| 41 |
->setName('security:check')
|
| 42 |
+
->setDefinition([
|
| 43 |
new InputArgument('lockfile', InputArgument::OPTIONAL, 'The path to the composer.lock file', 'composer.lock'),
|
| 44 |
+
new InputOption('format', '', InputOption::VALUE_REQUIRED, 'The output format', 'ansi'),
|
| 45 |
new InputOption('end-point', '', InputOption::VALUE_REQUIRED, 'The security checker server URL'),
|
| 46 |
new InputOption('timeout', '', InputOption::VALUE_REQUIRED, 'The HTTP timeout in seconds'),
|
| 47 |
+
new InputOption('token', '', InputOption::VALUE_REQUIRED, 'The server token', ''),
|
| 48 |
+
])
|
| 49 |
->setDescription('Checks security issues in your project dependencies')
|
| 50 |
->setHelp(<<<EOF
|
| 51 |
The <info>%command.name%</info> command looks for security issues in the
|
| 79 |
$this->checker->getCrawler()->setTimeout($timeout);
|
| 80 |
}
|
| 81 |
|
| 82 |
+
if ($token = $input->getOption('token')) {
|
| 83 |
+
$this->checker->getCrawler()->setToken($token);
|
| 84 |
+
}
|
| 85 |
+
|
| 86 |
try {
|
| 87 |
+
$result = $this->checker->check($input->getArgument('lockfile'), $input->getOption('format'));
|
| 88 |
} catch (ExceptionInterface $e) {
|
| 89 |
$output->writeln($this->getHelperSet()->get('formatter')->formatBlock($e->getMessage(), 'error', true));
|
| 90 |
|
| 91 |
return 1;
|
| 92 |
}
|
| 93 |
|
| 94 |
+
$output->writeln((string) $result);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 95 |
|
| 96 |
+
if (count($result) > 0) {
|
| 97 |
return 1;
|
| 98 |
}
|
| 99 |
}
|
vendor/sensiolabs/security-checker/SensioLabs/Security/Crawler.php
ADDED
|
@@ -0,0 +1,180 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
/*
|
| 4 |
+
* This file is part of the SensioLabs Security Checker.
|
| 5 |
+
*
|
| 6 |
+
* (c) Fabien Potencier
|
| 7 |
+
*
|
| 8 |
+
* For the full copyright and license information, please view the LICENSE
|
| 9 |
+
* file that was distributed with this source code.
|
| 10 |
+
*/
|
| 11 |
+
|
| 12 |
+
namespace SensioLabs\Security;
|
| 13 |
+
|
| 14 |
+
use Composer\CaBundle\CaBundle;
|
| 15 |
+
use SensioLabs\Security\Exception\HttpException;
|
| 16 |
+
use SensioLabs\Security\Exception\RuntimeException;
|
| 17 |
+
|
| 18 |
+
/**
|
| 19 |
+
* @internal
|
| 20 |
+
*/
|
| 21 |
+
class Crawler
|
| 22 |
+
{
|
| 23 |
+
private $endPoint = 'https://security.symfony.com/check_lock';
|
| 24 |
+
private $timeout = 20;
|
| 25 |
+
private $headers = [];
|
| 26 |
+
|
| 27 |
+
public function setTimeout($timeout)
|
| 28 |
+
{
|
| 29 |
+
$this->timeout = $timeout;
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
public function setEndPoint($endPoint)
|
| 33 |
+
{
|
| 34 |
+
$this->endPoint = $endPoint;
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
public function setToken($token)
|
| 38 |
+
{
|
| 39 |
+
$this->addHeader('Authorization', 'Token '.$token);
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
+
/**
|
| 43 |
+
* Adds a global header that will be sent with all requests to the server.
|
| 44 |
+
*/
|
| 45 |
+
public function addHeader($key, $value)
|
| 46 |
+
{
|
| 47 |
+
$this->headers[] = $key.': '.$value;
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
/**
|
| 51 |
+
* Checks a Composer lock file.
|
| 52 |
+
*
|
| 53 |
+
* @param string $lock The path to the composer.lock file or a string able to be opened via file_get_contents
|
| 54 |
+
* @param string $format The format of the result
|
| 55 |
+
* @param array $headers An array of headers to add for this specific HTTP request
|
| 56 |
+
*
|
| 57 |
+
* @return Result
|
| 58 |
+
*/
|
| 59 |
+
public function check($lock, $format = 'json', array $headers = [])
|
| 60 |
+
{
|
| 61 |
+
list($headers, $body) = $this->doCheck($lock, $format, $headers);
|
| 62 |
+
|
| 63 |
+
if (!(preg_match('/X-Alerts: (\d+)/', $headers, $matches) || 2 == count($matches))) {
|
| 64 |
+
throw new RuntimeException('The web service did not return alerts count.');
|
| 65 |
+
}
|
| 66 |
+
|
| 67 |
+
return new Result((int) $matches[1], $body, $format);
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
/**
|
| 71 |
+
* @return array An array where the first element is a headers string and second one the response body
|
| 72 |
+
*/
|
| 73 |
+
private function doCheck($lock, $format = 'json', array $contextualHeaders = [])
|
| 74 |
+
{
|
| 75 |
+
$boundary = '------------------------'.md5(microtime(true));
|
| 76 |
+
$headers = "Content-Type: multipart/form-data; boundary=$boundary\r\nAccept: ".$this->getContentType($format);
|
| 77 |
+
foreach ($this->headers as $header) {
|
| 78 |
+
$headers .= "\r\n$header";
|
| 79 |
+
}
|
| 80 |
+
foreach ($contextualHeaders as $key => $value) {
|
| 81 |
+
$headers .= "\r\n$key: $value";
|
| 82 |
+
}
|
| 83 |
+
$opts = [
|
| 84 |
+
'http' => [
|
| 85 |
+
'method' => 'POST',
|
| 86 |
+
'header' => $headers,
|
| 87 |
+
'content' => "--$boundary\r\nContent-Disposition: form-data; name=\"lock\"; filename=\"composer.lock\"\r\nContent-Type: application/octet-stream\r\n\r\n".$this->getLockContents($lock)."\r\n--$boundary--\r\n",
|
| 88 |
+
'ignore_errors' => true,
|
| 89 |
+
'follow_location' => true,
|
| 90 |
+
'max_redirects' => 3,
|
| 91 |
+
'timeout' => $this->timeout,
|
| 92 |
+
'user_agent' => sprintf('SecurityChecker-CLI/%s FGC PHP', SecurityChecker::VERSION),
|
| 93 |
+
],
|
| 94 |
+
'ssl' => [
|
| 95 |
+
'verify_peer' => 1,
|
| 96 |
+
'verify_host' => 2,
|
| 97 |
+
],
|
| 98 |
+
];
|
| 99 |
+
|
| 100 |
+
$caPathOrFile = CaBundle::getSystemCaRootBundlePath();
|
| 101 |
+
if (is_dir($caPathOrFile) || (is_link($caPathOrFile) && is_dir(readlink($caPathOrFile)))) {
|
| 102 |
+
$opts['ssl']['capath'] = $caPathOrFile;
|
| 103 |
+
} else {
|
| 104 |
+
$opts['ssl']['cafile'] = $caPathOrFile;
|
| 105 |
+
}
|
| 106 |
+
|
| 107 |
+
$context = stream_context_create($opts);
|
| 108 |
+
$level = error_reporting(0);
|
| 109 |
+
$body = file_get_contents($this->endPoint, 0, $context);
|
| 110 |
+
error_reporting($level);
|
| 111 |
+
if (false === $body) {
|
| 112 |
+
$error = error_get_last();
|
| 113 |
+
|
| 114 |
+
throw new RuntimeException(sprintf('An error occurred: %s.', $error['message']));
|
| 115 |
+
}
|
| 116 |
+
|
| 117 |
+
// status code
|
| 118 |
+
if (!preg_match('{HTTP/\d\.\d (\d+) }i', $http_response_header[0], $match)) {
|
| 119 |
+
throw new RuntimeException('An unknown error occurred.');
|
| 120 |
+
}
|
| 121 |
+
|
| 122 |
+
$statusCode = $match[1];
|
| 123 |
+
if (400 == $statusCode) {
|
| 124 |
+
$data = json_decode($body, true);
|
| 125 |
+
|
| 126 |
+
throw new RuntimeException($data['error']);
|
| 127 |
+
}
|
| 128 |
+
|
| 129 |
+
if (200 != $statusCode) {
|
| 130 |
+
throw new HttpException(sprintf('The web service failed for an unknown reason (HTTP %s).', $statusCode), $statusCode);
|
| 131 |
+
}
|
| 132 |
+
|
| 133 |
+
$headers = '';
|
| 134 |
+
foreach ($http_response_header as $header) {
|
| 135 |
+
if (false !== strpos($header, 'X-Alerts: ')) {
|
| 136 |
+
$headers = $header;
|
| 137 |
+
}
|
| 138 |
+
}
|
| 139 |
+
|
| 140 |
+
return [$headers, $body];
|
| 141 |
+
}
|
| 142 |
+
|
| 143 |
+
private function getContentType($format)
|
| 144 |
+
{
|
| 145 |
+
static $formats = [
|
| 146 |
+
'text' => 'text/plain',
|
| 147 |
+
'simple' => 'text/plain',
|
| 148 |
+
'markdown' => 'text/markdown',
|
| 149 |
+
'yaml' => 'text/yaml',
|
| 150 |
+
'json' => 'application/json',
|
| 151 |
+
'ansi' => 'text/plain+ansi',
|
| 152 |
+
];
|
| 153 |
+
|
| 154 |
+
return isset($formats[$format]) ? $formats[$format] : 'text';
|
| 155 |
+
}
|
| 156 |
+
|
| 157 |
+
private function getLockContents($lock)
|
| 158 |
+
{
|
| 159 |
+
$contents = json_decode(file_get_contents($lock), true);
|
| 160 |
+
$hash = isset($contents['content-hash']) ? $contents['content-hash'] : (isset($contents['hash']) ? $contents['hash'] : '');
|
| 161 |
+
$packages = ['content-hash' => $hash, 'packages' => [], 'packages-dev' => []];
|
| 162 |
+
foreach (['packages', 'packages-dev'] as $key) {
|
| 163 |
+
if (!is_array($contents[$key])) {
|
| 164 |
+
continue;
|
| 165 |
+
}
|
| 166 |
+
foreach ($contents[$key] as $package) {
|
| 167 |
+
$data = [
|
| 168 |
+
'name' => $package['name'],
|
| 169 |
+
'version' => $package['version'],
|
| 170 |
+
];
|
| 171 |
+
if (isset($package['time']) && false !== strpos($package['version'], 'dev')) {
|
| 172 |
+
$data['time'] = $package['time'];
|
| 173 |
+
}
|
| 174 |
+
$packages[$key][] = $data;
|
| 175 |
+
}
|
| 176 |
+
}
|
| 177 |
+
|
| 178 |
+
return json_encode($packages);
|
| 179 |
+
}
|
| 180 |
+
}
|
vendor/sensiolabs/security-checker/SensioLabs/Security/Crawler/BaseCrawler.php
DELETED
|
@@ -1,106 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
/*
|
| 4 |
-
* This file is part of the SensioLabs Security Checker.
|
| 5 |
-
*
|
| 6 |
-
* (c) Fabien Potencier
|
| 7 |
-
*
|
| 8 |
-
* For the full copyright and license information, please view the LICENSE
|
| 9 |
-
* file that was distributed with this source code.
|
| 10 |
-
*/
|
| 11 |
-
|
| 12 |
-
namespace SensioLabs\Security\Crawler;
|
| 13 |
-
|
| 14 |
-
use SensioLabs\Security\Exception\RuntimeException;
|
| 15 |
-
|
| 16 |
-
/**
|
| 17 |
-
* @internal
|
| 18 |
-
*/
|
| 19 |
-
abstract class BaseCrawler implements CrawlerInterface
|
| 20 |
-
{
|
| 21 |
-
protected $endPoint = 'https://security.sensiolabs.org/check_lock';
|
| 22 |
-
protected $timeout = 20;
|
| 23 |
-
|
| 24 |
-
/**
|
| 25 |
-
* {@inheritdoc}
|
| 26 |
-
*/
|
| 27 |
-
public function setTimeout($timeout)
|
| 28 |
-
{
|
| 29 |
-
$this->timeout = $timeout;
|
| 30 |
-
}
|
| 31 |
-
|
| 32 |
-
/**
|
| 33 |
-
* {@inheritdoc}
|
| 34 |
-
*/
|
| 35 |
-
public function setEndPoint($endPoint)
|
| 36 |
-
{
|
| 37 |
-
$this->endPoint = $endPoint;
|
| 38 |
-
}
|
| 39 |
-
|
| 40 |
-
/**
|
| 41 |
-
* {@inheritdoc}
|
| 42 |
-
*/
|
| 43 |
-
public function check($lock)
|
| 44 |
-
{
|
| 45 |
-
$certFile = $this->getCertFile();
|
| 46 |
-
|
| 47 |
-
try {
|
| 48 |
-
list($headers, $body) = $this->doCheck($lock, $certFile);
|
| 49 |
-
} catch (\Exception $e) {
|
| 50 |
-
if (__DIR__.'/../Resources/security.sensiolabs.org.crt' !== $certFile) {
|
| 51 |
-
unlink($certFile);
|
| 52 |
-
}
|
| 53 |
-
|
| 54 |
-
throw $e;
|
| 55 |
-
}
|
| 56 |
-
|
| 57 |
-
if (!(preg_match('/X-Alerts: (\d+)/', $headers, $matches) || 2 == count($matches))) {
|
| 58 |
-
throw new RuntimeException('The web service did not return alerts count.');
|
| 59 |
-
}
|
| 60 |
-
|
| 61 |
-
return array((int) $matches[1], json_decode($body, true));
|
| 62 |
-
}
|
| 63 |
-
|
| 64 |
-
/**
|
| 65 |
-
* @return array An array where the first element is a headers string and second one the response body
|
| 66 |
-
*/
|
| 67 |
-
abstract protected function doCheck($lock, $certFile);
|
| 68 |
-
|
| 69 |
-
protected function getLockContents($lock)
|
| 70 |
-
{
|
| 71 |
-
$contents = json_decode(file_get_contents($lock), true);
|
| 72 |
-
$packages = array('packages' => array(), 'packages-dev' => array());
|
| 73 |
-
foreach (array('packages', 'packages-dev') as $key) {
|
| 74 |
-
if (!is_array($contents[$key])) {
|
| 75 |
-
continue;
|
| 76 |
-
}
|
| 77 |
-
foreach ($contents[$key] as $package) {
|
| 78 |
-
$data = array(
|
| 79 |
-
'name' => $package['name'],
|
| 80 |
-
'version' => $package['version'],
|
| 81 |
-
);
|
| 82 |
-
if (isset($package['time']) && false !== strpos($package['version'], 'dev')) {
|
| 83 |
-
$data['time'] = $package['time'];
|
| 84 |
-
}
|
| 85 |
-
$packages[$key][] = $data;
|
| 86 |
-
}
|
| 87 |
-
}
|
| 88 |
-
|
| 89 |
-
return json_encode($packages);
|
| 90 |
-
}
|
| 91 |
-
|
| 92 |
-
private function getCertFile()
|
| 93 |
-
{
|
| 94 |
-
$certFile = __DIR__.'/../Resources/security.sensiolabs.org.crt';
|
| 95 |
-
if ('phar://' !== substr(__FILE__, 0, 7)) {
|
| 96 |
-
return $certFile;
|
| 97 |
-
}
|
| 98 |
-
|
| 99 |
-
$tmpFile = tempnam(sys_get_temp_dir(), 'sls');
|
| 100 |
-
if (false === @copy($certFile, $tmpFile)) {
|
| 101 |
-
throw new RuntimeException(sprintf('Unable to copy the certificate in "%s".', $tmpFile));
|
| 102 |
-
}
|
| 103 |
-
|
| 104 |
-
return $tmpFile;
|
| 105 |
-
}
|
| 106 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/sensiolabs/security-checker/SensioLabs/Security/Crawler/CrawlerInterface.php
DELETED
|
@@ -1,31 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
/*
|
| 4 |
-
* This file is part of the SensioLabs Security Checker.
|
| 5 |
-
*
|
| 6 |
-
* (c) Fabien Potencier
|
| 7 |
-
*
|
| 8 |
-
* For the full copyright and license information, please view the LICENSE
|
| 9 |
-
* file that was distributed with this source code.
|
| 10 |
-
*/
|
| 11 |
-
|
| 12 |
-
namespace SensioLabs\Security\Crawler;
|
| 13 |
-
|
| 14 |
-
/**
|
| 15 |
-
* @internal
|
| 16 |
-
*/
|
| 17 |
-
interface CrawlerInterface
|
| 18 |
-
{
|
| 19 |
-
/**
|
| 20 |
-
* Checks a Composer lock file.
|
| 21 |
-
*
|
| 22 |
-
* @param string $lock The path to the composer.lock file
|
| 23 |
-
*
|
| 24 |
-
* @return An array of two items: the number of vulnerabilities and an array of vulnerabilities
|
| 25 |
-
*/
|
| 26 |
-
public function check($lock);
|
| 27 |
-
|
| 28 |
-
public function setTimeout($timeout);
|
| 29 |
-
|
| 30 |
-
public function setEndPoint($endPoint);
|
| 31 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/sensiolabs/security-checker/SensioLabs/Security/Crawler/CurlCrawler.php
DELETED
|
@@ -1,98 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
/*
|
| 4 |
-
* This file is part of the SensioLabs Security Checker.
|
| 5 |
-
*
|
| 6 |
-
* (c) Fabien Potencier
|
| 7 |
-
*
|
| 8 |
-
* For the full copyright and license information, please view the LICENSE
|
| 9 |
-
* file that was distributed with this source code.
|
| 10 |
-
*/
|
| 11 |
-
|
| 12 |
-
namespace SensioLabs\Security\Crawler;
|
| 13 |
-
|
| 14 |
-
use Composer\CaBundle\CaBundle;
|
| 15 |
-
use SensioLabs\Security\Exception\HttpException;
|
| 16 |
-
use SensioLabs\Security\Exception\RuntimeException;
|
| 17 |
-
use SensioLabs\Security\SecurityChecker;
|
| 18 |
-
|
| 19 |
-
/**
|
| 20 |
-
* @internal
|
| 21 |
-
*/
|
| 22 |
-
class CurlCrawler extends BaseCrawler
|
| 23 |
-
{
|
| 24 |
-
public function __construct()
|
| 25 |
-
{
|
| 26 |
-
if (!function_exists('curl_init')) {
|
| 27 |
-
throw new RuntimeException('cURL is required to use the cURL crawler.');
|
| 28 |
-
}
|
| 29 |
-
}
|
| 30 |
-
|
| 31 |
-
/**
|
| 32 |
-
* {@inheritdoc}
|
| 33 |
-
*/
|
| 34 |
-
protected function doCheck($lock, $certFile)
|
| 35 |
-
{
|
| 36 |
-
if (false === $curl = curl_init()) {
|
| 37 |
-
throw new RuntimeException('Unable to create a cURL handle.');
|
| 38 |
-
}
|
| 39 |
-
$tmplock = tempnam(sys_get_temp_dir(), 'sensiolabs_security');
|
| 40 |
-
$handle = fopen($tmplock, 'w');
|
| 41 |
-
fwrite($handle, $this->getLockContents($lock));
|
| 42 |
-
fclose($handle);
|
| 43 |
-
|
| 44 |
-
$postFields = array('lock' => PHP_VERSION_ID >= 50500 ? new \CurlFile($tmplock) : '@'.$tmplock);
|
| 45 |
-
|
| 46 |
-
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
|
| 47 |
-
curl_setopt($curl, CURLOPT_HEADER, true);
|
| 48 |
-
curl_setopt($curl, CURLOPT_URL, $this->endPoint);
|
| 49 |
-
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Accept: application/json'));
|
| 50 |
-
curl_setopt($curl, CURLOPT_POSTFIELDS, $postFields);
|
| 51 |
-
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, $this->timeout);
|
| 52 |
-
curl_setopt($curl, CURLOPT_TIMEOUT, 10);
|
| 53 |
-
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, ini_get('open_basedir') ? 0 : 1);
|
| 54 |
-
curl_setopt($curl, CURLOPT_MAXREDIRS, 3);
|
| 55 |
-
curl_setopt($curl, CURLOPT_FAILONERROR, false);
|
| 56 |
-
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 1);
|
| 57 |
-
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2);
|
| 58 |
-
curl_setopt($curl, CURLOPT_USERAGENT, sprintf('SecurityChecker-CLI/%s CURL PHP', SecurityChecker::VERSION));
|
| 59 |
-
|
| 60 |
-
$caPathOrFile = CaBundle::getSystemCaRootBundlePath();
|
| 61 |
-
if (is_dir($caPathOrFile) || (is_link($caPathOrFile) && is_dir(readlink($caPathOrFile)))) {
|
| 62 |
-
curl_setopt($curl, CURLOPT_CAPATH, $caPathOrFile);
|
| 63 |
-
} else {
|
| 64 |
-
curl_setopt($curl, CURLOPT_CAINFO, $caPathOrFile);
|
| 65 |
-
}
|
| 66 |
-
|
| 67 |
-
$response = curl_exec($curl);
|
| 68 |
-
|
| 69 |
-
unlink($tmplock);
|
| 70 |
-
|
| 71 |
-
if (false === $response) {
|
| 72 |
-
$error = curl_error($curl);
|
| 73 |
-
curl_close($curl);
|
| 74 |
-
|
| 75 |
-
throw new RuntimeException(sprintf('An error occurred: %s.', $error));
|
| 76 |
-
}
|
| 77 |
-
|
| 78 |
-
$headersSize = curl_getinfo($curl, CURLINFO_HEADER_SIZE);
|
| 79 |
-
$headers = substr($response, 0, $headersSize);
|
| 80 |
-
$body = substr($response, $headersSize);
|
| 81 |
-
|
| 82 |
-
$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
|
| 83 |
-
curl_close($curl);
|
| 84 |
-
|
| 85 |
-
if (400 == $statusCode) {
|
| 86 |
-
$data = json_decode($body, true);
|
| 87 |
-
$error = $data['error'];
|
| 88 |
-
|
| 89 |
-
throw new RuntimeException($error);
|
| 90 |
-
}
|
| 91 |
-
|
| 92 |
-
if (200 != $statusCode) {
|
| 93 |
-
throw new HttpException(sprintf('The web service failed for an unknown reason (HTTP %s).', $statusCode), $statusCode);
|
| 94 |
-
}
|
| 95 |
-
|
| 96 |
-
return array($headers, $body);
|
| 97 |
-
}
|
| 98 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/sensiolabs/security-checker/SensioLabs/Security/Crawler/DefaultCrawler.php
DELETED
|
@@ -1,49 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
/*
|
| 4 |
-
* This file is part of the SensioLabs Security Checker.
|
| 5 |
-
*
|
| 6 |
-
* (c) Fabien Potencier
|
| 7 |
-
*
|
| 8 |
-
* For the full copyright and license information, please view the LICENSE
|
| 9 |
-
* file that was distributed with this source code.
|
| 10 |
-
*/
|
| 11 |
-
|
| 12 |
-
namespace SensioLabs\Security\Crawler;
|
| 13 |
-
|
| 14 |
-
/**
|
| 15 |
-
* @internal
|
| 16 |
-
*/
|
| 17 |
-
class DefaultCrawler implements CrawlerInterface
|
| 18 |
-
{
|
| 19 |
-
private $crawler;
|
| 20 |
-
|
| 21 |
-
public function __construct()
|
| 22 |
-
{
|
| 23 |
-
$this->crawler = ('stream' === getenv('SENSIOLABS_SECURITY_CHECKER_TRANSPORT') || !function_exists('curl_init')) ? new FileGetContentsCrawler() : new CurlCrawler();
|
| 24 |
-
}
|
| 25 |
-
|
| 26 |
-
/**
|
| 27 |
-
* {@inheritdoc}
|
| 28 |
-
*/
|
| 29 |
-
public function check($lock)
|
| 30 |
-
{
|
| 31 |
-
return $this->crawler->check($lock);
|
| 32 |
-
}
|
| 33 |
-
|
| 34 |
-
/**
|
| 35 |
-
* {@inheritdoc}
|
| 36 |
-
*/
|
| 37 |
-
public function setTimeout($timeout)
|
| 38 |
-
{
|
| 39 |
-
$this->crawler->setTimeout($timeout);
|
| 40 |
-
}
|
| 41 |
-
|
| 42 |
-
/**
|
| 43 |
-
* {@inheritdoc}
|
| 44 |
-
*/
|
| 45 |
-
public function setEndPoint($endPoint)
|
| 46 |
-
{
|
| 47 |
-
$this->crawler->setEndPoint($endPoint);
|
| 48 |
-
}
|
| 49 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/sensiolabs/security-checker/SensioLabs/Security/Crawler/FileGetContentsCrawler.php
DELETED
|
@@ -1,89 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
/*
|
| 4 |
-
* This file is part of the SensioLabs Security Checker.
|
| 5 |
-
*
|
| 6 |
-
* (c) Fabien Potencier
|
| 7 |
-
*
|
| 8 |
-
* For the full copyright and license information, please view the LICENSE
|
| 9 |
-
* file that was distributed with this source code.
|
| 10 |
-
*/
|
| 11 |
-
|
| 12 |
-
namespace SensioLabs\Security\Crawler;
|
| 13 |
-
|
| 14 |
-
use Composer\CaBundle\CaBundle;
|
| 15 |
-
use SensioLabs\Security\Exception\HttpException;
|
| 16 |
-
use SensioLabs\Security\Exception\RuntimeException;
|
| 17 |
-
use SensioLabs\Security\SecurityChecker;
|
| 18 |
-
|
| 19 |
-
/**
|
| 20 |
-
* @internal
|
| 21 |
-
*/
|
| 22 |
-
class FileGetContentsCrawler extends BaseCrawler
|
| 23 |
-
{
|
| 24 |
-
/**
|
| 25 |
-
* {@inheritdoc}
|
| 26 |
-
*/
|
| 27 |
-
protected function doCheck($lock, $certFile)
|
| 28 |
-
{
|
| 29 |
-
$boundary = '------------------------'.md5(microtime(true));
|
| 30 |
-
$opts = array(
|
| 31 |
-
'http' => array(
|
| 32 |
-
'method' => 'POST',
|
| 33 |
-
'header' => "Content-Type: multipart/form-data; boundary=$boundary\r\nAccept: application/json",
|
| 34 |
-
'content' => "--$boundary\r\nContent-Disposition: form-data; name=\"lock\"; filename=\"$lock\"\r\nContent-Type: application/octet-stream\r\n\r\n".$this->getLockContents($lock)."\r\n--$boundary--\r\n",
|
| 35 |
-
'ignore_errors' => true,
|
| 36 |
-
'follow_location' => true,
|
| 37 |
-
'max_redirects' => 3,
|
| 38 |
-
'timeout' => $this->timeout,
|
| 39 |
-
'user_agent' => sprintf('SecurityChecker-CLI/%s FGC PHP', SecurityChecker::VERSION),
|
| 40 |
-
),
|
| 41 |
-
'ssl' => array(
|
| 42 |
-
'verify_peer' => 1,
|
| 43 |
-
'verify_host' => 2,
|
| 44 |
-
),
|
| 45 |
-
);
|
| 46 |
-
|
| 47 |
-
$caPathOrFile = CaBundle::getSystemCaRootBundlePath();
|
| 48 |
-
if (is_dir($caPathOrFile) || (is_link($caPathOrFile) && is_dir(readlink($caPathOrFile)))) {
|
| 49 |
-
$opts['ssl']['capath'] = $caPathOrFile;
|
| 50 |
-
} else {
|
| 51 |
-
$opts['ssl']['cafile'] = $caPathOrFile;
|
| 52 |
-
}
|
| 53 |
-
|
| 54 |
-
$context = stream_context_create($opts);
|
| 55 |
-
$level = error_reporting(0);
|
| 56 |
-
$body = file_get_contents($this->endPoint, 0, $context);
|
| 57 |
-
error_reporting($level);
|
| 58 |
-
if (false === $body) {
|
| 59 |
-
$error = error_get_last();
|
| 60 |
-
|
| 61 |
-
throw new RuntimeException(sprintf('An error occurred: %s.', $error['message']));
|
| 62 |
-
}
|
| 63 |
-
|
| 64 |
-
// status code
|
| 65 |
-
if (!preg_match('{HTTP/\d\.\d (\d+) }i', $http_response_header[0], $match)) {
|
| 66 |
-
throw new RuntimeException('An unknown error occurred.');
|
| 67 |
-
}
|
| 68 |
-
|
| 69 |
-
$statusCode = $match[1];
|
| 70 |
-
if (400 == $statusCode) {
|
| 71 |
-
$data = json_decode($body, true);
|
| 72 |
-
|
| 73 |
-
throw new RuntimeException($data['error']);
|
| 74 |
-
}
|
| 75 |
-
|
| 76 |
-
if (200 != $statusCode) {
|
| 77 |
-
throw new HttpException(sprintf('The web service failed for an unknown reason (HTTP %s).', $statusCode), $statusCode);
|
| 78 |
-
}
|
| 79 |
-
|
| 80 |
-
$headers = '';
|
| 81 |
-
foreach ($http_response_header as $header) {
|
| 82 |
-
if (false !== strpos($header, 'X-Alerts: ')) {
|
| 83 |
-
$headers = $header;
|
| 84 |
-
}
|
| 85 |
-
}
|
| 86 |
-
|
| 87 |
-
return array($headers, $body);
|
| 88 |
-
}
|
| 89 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/sensiolabs/security-checker/SensioLabs/Security/Formatters/FormatterInterface.php
DELETED
|
@@ -1,26 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
/*
|
| 4 |
-
* This file is part of the SensioLabs Security Checker.
|
| 5 |
-
*
|
| 6 |
-
* (c) Fabien Potencier
|
| 7 |
-
*
|
| 8 |
-
* For the full copyright and license information, please view the LICENSE
|
| 9 |
-
* file that was distributed with this source code.
|
| 10 |
-
*/
|
| 11 |
-
|
| 12 |
-
namespace SensioLabs\Security\Formatters;
|
| 13 |
-
|
| 14 |
-
use Symfony\Component\Console\Output\OutputInterface;
|
| 15 |
-
|
| 16 |
-
interface FormatterInterface
|
| 17 |
-
{
|
| 18 |
-
/**
|
| 19 |
-
* Displays a security report as json.
|
| 20 |
-
*
|
| 21 |
-
* @param OutputInterface $output
|
| 22 |
-
* @param string $lockFilePath The file path to the checked lock file
|
| 23 |
-
* @param array $vulnerabilities An array of vulnerabilities
|
| 24 |
-
*/
|
| 25 |
-
public function displayResults(OutputInterface $output, $lockFilePath, array $vulnerabilities);
|
| 26 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/sensiolabs/security-checker/SensioLabs/Security/Formatters/JsonFormatter.php
DELETED
|
@@ -1,33 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
/*
|
| 4 |
-
* This file is part of the SensioLabs Security Checker.
|
| 5 |
-
*
|
| 6 |
-
* (c) Fabien Potencier
|
| 7 |
-
*
|
| 8 |
-
* For the full copyright and license information, please view the LICENSE
|
| 9 |
-
* file that was distributed with this source code.
|
| 10 |
-
*/
|
| 11 |
-
|
| 12 |
-
namespace SensioLabs\Security\Formatters;
|
| 13 |
-
|
| 14 |
-
use Symfony\Component\Console\Output\OutputInterface;
|
| 15 |
-
|
| 16 |
-
class JsonFormatter implements FormatterInterface
|
| 17 |
-
{
|
| 18 |
-
/**
|
| 19 |
-
* Displays a security report as json.
|
| 20 |
-
*
|
| 21 |
-
* @param OutputInterface $output
|
| 22 |
-
* @param string $lockFilePath The file path to the checked lock file
|
| 23 |
-
* @param array $vulnerabilities An array of vulnerabilities
|
| 24 |
-
*/
|
| 25 |
-
public function displayResults(OutputInterface $output, $lockFilePath, array $vulnerabilities)
|
| 26 |
-
{
|
| 27 |
-
if (defined('JSON_PRETTY_PRINT')) {
|
| 28 |
-
$output->write(json_encode($vulnerabilities, JSON_PRETTY_PRINT));
|
| 29 |
-
} else {
|
| 30 |
-
$output->write(json_encode($vulnerabilities));
|
| 31 |
-
}
|
| 32 |
-
}
|
| 33 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/sensiolabs/security-checker/SensioLabs/Security/Formatters/SimpleFormatter.php
DELETED
|
@@ -1,68 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
/*
|
| 4 |
-
* This file is part of the SensioLabs Security Checker.
|
| 5 |
-
*
|
| 6 |
-
* (c) Fabien Potencier
|
| 7 |
-
*
|
| 8 |
-
* For the full copyright and license information, please view the LICENSE
|
| 9 |
-
* file that was distributed with this source code.
|
| 10 |
-
*/
|
| 11 |
-
|
| 12 |
-
namespace SensioLabs\Security\Formatters;
|
| 13 |
-
|
| 14 |
-
use Symfony\Component\Console\Output\OutputInterface;
|
| 15 |
-
use Symfony\Component\Console\Helper\FormatterHelper;
|
| 16 |
-
|
| 17 |
-
class SimpleFormatter implements FormatterInterface
|
| 18 |
-
{
|
| 19 |
-
public function __construct(FormatterHelper $formatter)
|
| 20 |
-
{
|
| 21 |
-
$this->formatter = $formatter;
|
| 22 |
-
}
|
| 23 |
-
|
| 24 |
-
/**
|
| 25 |
-
* Displays a security report as simple plain text.
|
| 26 |
-
*
|
| 27 |
-
* @param OutputInterface $output
|
| 28 |
-
* @param string $lockFilePath The file path to the checked lock file
|
| 29 |
-
* @param array $vulnerabilities An array of vulnerabilities
|
| 30 |
-
*/
|
| 31 |
-
public function displayResults(OutputInterface $output, $lockFilePath, array $vulnerabilities)
|
| 32 |
-
{
|
| 33 |
-
$output->writeln(sprintf('Security Check Report: <comment>%s</>', realpath($lockFilePath)));
|
| 34 |
-
|
| 35 |
-
if ($count = count($vulnerabilities)) {
|
| 36 |
-
$status = 'CRITICAL';
|
| 37 |
-
$style = 'error';
|
| 38 |
-
} else {
|
| 39 |
-
$status = 'OK';
|
| 40 |
-
$style = 'info';
|
| 41 |
-
}
|
| 42 |
-
|
| 43 |
-
$output->writeln(sprintf('<%s>[%s] %d %s known vulnerabilities</>', $style, $status, $count, 1 === $count ? 'package has' : 'packages have'));
|
| 44 |
-
|
| 45 |
-
if (0 !== $count) {
|
| 46 |
-
$output->write("\n");
|
| 47 |
-
|
| 48 |
-
foreach ($vulnerabilities as $dependency => $issues) {
|
| 49 |
-
$dependencyFullName = $dependency.' ('.$issues['version'].')';
|
| 50 |
-
$output->writeln('<info>'.$dependencyFullName."\n".str_repeat('-', strlen($dependencyFullName))."</>\n");
|
| 51 |
-
|
| 52 |
-
foreach ($issues['advisories'] as $issue => $details) {
|
| 53 |
-
$output->write(' * ');
|
| 54 |
-
if ($details['cve']) {
|
| 55 |
-
$output->write('<comment>'.$details['cve'].': </comment>');
|
| 56 |
-
}
|
| 57 |
-
$output->writeln($details['title']);
|
| 58 |
-
|
| 59 |
-
if ('' !== $details['link']) {
|
| 60 |
-
$output->writeln(' '.$details['link']);
|
| 61 |
-
}
|
| 62 |
-
|
| 63 |
-
$output->writeln('');
|
| 64 |
-
}
|
| 65 |
-
}
|
| 66 |
-
}
|
| 67 |
-
}
|
| 68 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/sensiolabs/security-checker/SensioLabs/Security/Formatters/TextFormatter.php
DELETED
|
@@ -1,60 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
/*
|
| 4 |
-
* This file is part of the SensioLabs Security Checker.
|
| 5 |
-
*
|
| 6 |
-
* (c) Fabien Potencier
|
| 7 |
-
*
|
| 8 |
-
* For the full copyright and license information, please view the LICENSE
|
| 9 |
-
* file that was distributed with this source code.
|
| 10 |
-
*/
|
| 11 |
-
|
| 12 |
-
namespace SensioLabs\Security\Formatters;
|
| 13 |
-
|
| 14 |
-
use Symfony\Component\Console\Output\OutputInterface;
|
| 15 |
-
use Symfony\Component\Console\Helper\FormatterHelper;
|
| 16 |
-
use Symfony\Component\Console\Input\ArrayInput;
|
| 17 |
-
use Symfony\Component\Console\Style\SymfonyStyle;
|
| 18 |
-
|
| 19 |
-
class TextFormatter implements FormatterInterface
|
| 20 |
-
{
|
| 21 |
-
public function __construct(FormatterHelper $formatter)
|
| 22 |
-
{
|
| 23 |
-
$this->formatter = $formatter;
|
| 24 |
-
}
|
| 25 |
-
|
| 26 |
-
/**
|
| 27 |
-
* Displays a security report as plain text.
|
| 28 |
-
*
|
| 29 |
-
* @param OutputInterface $output
|
| 30 |
-
* @param string $lockFilePath The file path to the checked lock file
|
| 31 |
-
* @param array $vulnerabilities An array of vulnerabilities
|
| 32 |
-
*/
|
| 33 |
-
public function displayResults(OutputInterface $output, $lockFilePath, array $vulnerabilities)
|
| 34 |
-
{
|
| 35 |
-
$output = new SymfonyStyle(new ArrayInput(array()), $output);
|
| 36 |
-
$output->title('Symfony Security Check Report');
|
| 37 |
-
// use ->comment when bumping console to 2.8+
|
| 38 |
-
$output->writeln(sprintf('<fg=default;bg=default> // </>Checked file: <comment>%s</>', realpath($lockFilePath)));
|
| 39 |
-
|
| 40 |
-
if ($count = count($vulnerabilities)) {
|
| 41 |
-
$output->error(sprintf('%d packages have known vulnerabilities.', $count));
|
| 42 |
-
} else {
|
| 43 |
-
$output->success('No packages have known vulnerabilities.');
|
| 44 |
-
}
|
| 45 |
-
|
| 46 |
-
if (0 !== $count) {
|
| 47 |
-
foreach ($vulnerabilities as $dependency => $issues) {
|
| 48 |
-
$output->section(sprintf('%s (%s)', $dependency, $issues['version']));
|
| 49 |
-
|
| 50 |
-
$details = array_map(function ($value) {
|
| 51 |
-
return sprintf("<info>%s</>: %s\n %s", $value['cve'] ?: '(no CVE ID)', $value['title'], $value['link']);
|
| 52 |
-
}, $issues['advisories']);
|
| 53 |
-
|
| 54 |
-
$output->listing($details);
|
| 55 |
-
}
|
| 56 |
-
}
|
| 57 |
-
|
| 58 |
-
$output->note('This checker can only detect vulnerabilities that are referenced in the SensioLabs security advisories database. Execute this command regularly to check the newly discovered vulnerabilities.');
|
| 59 |
-
}
|
| 60 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/sensiolabs/security-checker/SensioLabs/Security/Resources/security.sensiolabs.org.crt
DELETED
|
@@ -1,25 +0,0 @@
|
|
| 1 |
-
-----BEGIN CERTIFICATE-----
|
| 2 |
-
MIIENjCCAx6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBvMQswCQYDVQQGEwJTRTEU
|
| 3 |
-
MBIGA1UEChMLQWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFkZFRydXN0IEV4dGVybmFs
|
| 4 |
-
IFRUUCBOZXR3b3JrMSIwIAYDVQQDExlBZGRUcnVzdCBFeHRlcm5hbCBDQSBSb290
|
| 5 |
-
MB4XDTAwMDUzMDEwNDgzOFoXDTIwMDUzMDEwNDgzOFowbzELMAkGA1UEBhMCU0Ux
|
| 6 |
-
FDASBgNVBAoTC0FkZFRydXN0IEFCMSYwJAYDVQQLEx1BZGRUcnVzdCBFeHRlcm5h
|
| 7 |
-
bCBUVFAgTmV0d29yazEiMCAGA1UEAxMZQWRkVHJ1c3QgRXh0ZXJuYWwgQ0EgUm9v
|
| 8 |
-
dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALf3GjPm8gAELTngTlvt
|
| 9 |
-
H7xsD821+iO2zt6bETOXpClMfZOfvUq8k+0DGuOPz+VtUFrWlymUWoCwSXrbLpX9
|
| 10 |
-
uMq/NzgtHj6RQa1wVsfwTz/oMp50ysiQVOnGXw94nZpAPA6sYapeFI+eh6FqUNzX
|
| 11 |
-
mk6vBbOmcZSccbNQYArHE504B4YCqOmoaSYYkKtMsE8jqzpPhNjfzp/haW+710LX
|
| 12 |
-
a0Tkx63ubUFfclpxCDezeWWkWaCUN/cALw3CknLa0Dhy2xSoRcRdKn23tNbE7qzN
|
| 13 |
-
E0S3ySvdQwAl+mG5aWpYIxG3pzOPVnVZ9c0p10a3CitlttNCbxWyuHv77+ldU9U0
|
| 14 |
-
WicCAwEAAaOB3DCB2TAdBgNVHQ4EFgQUrb2YejS0Jvf6xCZU7wO94CTLVBowCwYD
|
| 15 |
-
VR0PBAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wgZkGA1UdIwSBkTCBjoAUrb2YejS0
|
| 16 |
-
Jvf6xCZU7wO94CTLVBqhc6RxMG8xCzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtBZGRU
|
| 17 |
-
cnVzdCBBQjEmMCQGA1UECxMdQWRkVHJ1c3QgRXh0ZXJuYWwgVFRQIE5ldHdvcmsx
|
| 18 |
-
IjAgBgNVBAMTGUFkZFRydXN0IEV4dGVybmFsIENBIFJvb3SCAQEwDQYJKoZIhvcN
|
| 19 |
-
AQEFBQADggEBALCb4IUlwtYj4g+WBpKdQZic2YR5gdkeWxQHIzZlj7DYd7usQWxH
|
| 20 |
-
YINRsPkyPef89iYTx4AWpb9a/IfPeHmJIZriTAcKhjW88t5RxNKWt9x+Tu5w/Rw5
|
| 21 |
-
6wwCURQtjr0W4MHfRnXnJK3s9EK0hZNwEGe6nQY1ShjTK3rMUUKhemPR5ruhxSvC
|
| 22 |
-
Nr4TDea9Y355e6cJDUCrat2PisP29owaQgVR1EX1n6diIWgVIEM8med8vSTYqZEX
|
| 23 |
-
c4g/VhsxOBi0cQ+azcgOno4uG+GMmIPLHzHxREzGBHNJdmAPx/i9F4BrLunMTA5a
|
| 24 |
-
mnkPIAou1Z5jJh5VkpTYghdae9C8x49OhgQ=
|
| 25 |
-
-----END CERTIFICATE-----
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/sensiolabs/security-checker/SensioLabs/Security/Result.php
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
/*
|
| 4 |
+
* This file is part of the SensioLabs Security Checker.
|
| 5 |
+
*
|
| 6 |
+
* (c) Fabien Potencier
|
| 7 |
+
*
|
| 8 |
+
* For the full copyright and license information, please view the LICENSE
|
| 9 |
+
* file that was distributed with this source code.
|
| 10 |
+
*/
|
| 11 |
+
|
| 12 |
+
namespace SensioLabs\Security;
|
| 13 |
+
|
| 14 |
+
class Result implements \Countable
|
| 15 |
+
{
|
| 16 |
+
private $count;
|
| 17 |
+
private $vulnerabilities;
|
| 18 |
+
private $format;
|
| 19 |
+
|
| 20 |
+
public function __construct($count, $vulnerabilities, $format)
|
| 21 |
+
{
|
| 22 |
+
$this->count = $count;
|
| 23 |
+
$this->vulnerabilities = $vulnerabilities;
|
| 24 |
+
$this->format = $format;
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
public function getFormat()
|
| 28 |
+
{
|
| 29 |
+
return $this->format;
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
public function __toString()
|
| 33 |
+
{
|
| 34 |
+
return $this->vulnerabilities;
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
public function count()
|
| 38 |
+
{
|
| 39 |
+
return $this->count;
|
| 40 |
+
}
|
| 41 |
+
}
|
vendor/sensiolabs/security-checker/SensioLabs/Security/SecurityChecker.php
CHANGED
|
@@ -12,55 +12,51 @@
|
|
| 12 |
namespace SensioLabs\Security;
|
| 13 |
|
| 14 |
use SensioLabs\Security\Exception\RuntimeException;
|
| 15 |
-
use SensioLabs\Security\Crawler\CrawlerInterface;
|
| 16 |
-
use SensioLabs\Security\Crawler\DefaultCrawler;
|
| 17 |
|
| 18 |
class SecurityChecker
|
| 19 |
{
|
| 20 |
-
const VERSION = '
|
| 21 |
|
| 22 |
-
private $vulnerabilityCount;
|
| 23 |
private $crawler;
|
| 24 |
|
| 25 |
-
public function __construct(
|
| 26 |
{
|
| 27 |
-
$this->crawler = null === $crawler ? new
|
| 28 |
}
|
| 29 |
|
| 30 |
/**
|
| 31 |
* Checks a composer.lock file.
|
| 32 |
*
|
| 33 |
-
* @param string $lock
|
|
|
|
|
|
|
| 34 |
*
|
| 35 |
-
* @return
|
| 36 |
*
|
| 37 |
* @throws RuntimeException When the lock file does not exist
|
| 38 |
* @throws RuntimeException When the certificate can not be copied
|
| 39 |
*/
|
| 40 |
-
public function check($lock)
|
| 41 |
{
|
| 42 |
-
if (
|
| 43 |
-
$lock
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
|
|
|
| 47 |
|
| 48 |
-
|
| 49 |
-
|
|
|
|
| 50 |
}
|
| 51 |
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
return $vulnerabilities;
|
| 55 |
-
}
|
| 56 |
-
|
| 57 |
-
public function getLastVulnerabilityCount()
|
| 58 |
-
{
|
| 59 |
-
return $this->vulnerabilityCount;
|
| 60 |
}
|
| 61 |
|
| 62 |
/**
|
| 63 |
-
* @
|
|
|
|
|
|
|
| 64 |
*/
|
| 65 |
public function getCrawler()
|
| 66 |
{
|
| 12 |
namespace SensioLabs\Security;
|
| 13 |
|
| 14 |
use SensioLabs\Security\Exception\RuntimeException;
|
|
|
|
|
|
|
| 15 |
|
| 16 |
class SecurityChecker
|
| 17 |
{
|
| 18 |
+
const VERSION = '5.0';
|
| 19 |
|
|
|
|
| 20 |
private $crawler;
|
| 21 |
|
| 22 |
+
public function __construct(Crawler $crawler = null)
|
| 23 |
{
|
| 24 |
+
$this->crawler = null === $crawler ? new Crawler() : $crawler;
|
| 25 |
}
|
| 26 |
|
| 27 |
/**
|
| 28 |
* Checks a composer.lock file.
|
| 29 |
*
|
| 30 |
+
* @param string $lock The path to the composer.lock file
|
| 31 |
+
* @param string $format The format of the result
|
| 32 |
+
* @param array $headers An array of headers to add for this specific HTTP request
|
| 33 |
*
|
| 34 |
+
* @return Result
|
| 35 |
*
|
| 36 |
* @throws RuntimeException When the lock file does not exist
|
| 37 |
* @throws RuntimeException When the certificate can not be copied
|
| 38 |
*/
|
| 39 |
+
public function check($lock, $format = 'json', array $headers = [])
|
| 40 |
{
|
| 41 |
+
if (0 !== strpos($lock, 'data://text/plain;base64,')) {
|
| 42 |
+
if (is_dir($lock) && file_exists($lock.'/composer.lock')) {
|
| 43 |
+
$lock = $lock.'/composer.lock';
|
| 44 |
+
} elseif (preg_match('/composer\.json$/', $lock)) {
|
| 45 |
+
$lock = str_replace('composer.json', 'composer.lock', $lock);
|
| 46 |
+
}
|
| 47 |
|
| 48 |
+
if (!is_file($lock)) {
|
| 49 |
+
throw new RuntimeException('Lock file does not exist.');
|
| 50 |
+
}
|
| 51 |
}
|
| 52 |
|
| 53 |
+
return $this->crawler->check($lock, $format, $headers);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
}
|
| 55 |
|
| 56 |
/**
|
| 57 |
+
* @internal
|
| 58 |
+
*
|
| 59 |
+
* @return Crawler
|
| 60 |
*/
|
| 61 |
public function getCrawler()
|
| 62 |
{
|
vendor/sensiolabs/security-checker/box.json
CHANGED
|
@@ -16,7 +16,7 @@
|
|
| 16 |
"in": "vendor"
|
| 17 |
},
|
| 18 |
{
|
| 19 |
-
"name": ["*.*"
|
| 20 |
"in": "SensioLabs"
|
| 21 |
}
|
| 22 |
],
|
| 16 |
"in": "vendor"
|
| 17 |
},
|
| 18 |
{
|
| 19 |
+
"name": ["*.*"],
|
| 20 |
"in": "SensioLabs"
|
| 21 |
}
|
| 22 |
],
|
vendor/sensiolabs/security-checker/composer.json
CHANGED
|
@@ -9,16 +9,17 @@
|
|
| 9 |
}
|
| 10 |
],
|
| 11 |
"require": {
|
|
|
|
| 12 |
"symfony/console": "~2.7|~3.0|~4.0",
|
| 13 |
"composer/ca-bundle": "^1.0"
|
| 14 |
},
|
| 15 |
"bin": ["security-checker"],
|
| 16 |
"autoload": {
|
| 17 |
-
"psr-
|
| 18 |
},
|
| 19 |
"extra": {
|
| 20 |
"branch-alias": {
|
| 21 |
-
"dev-master": "
|
| 22 |
}
|
| 23 |
}
|
| 24 |
}
|
| 9 |
}
|
| 10 |
],
|
| 11 |
"require": {
|
| 12 |
+
"php": ">=5.5.9",
|
| 13 |
"symfony/console": "~2.7|~3.0|~4.0",
|
| 14 |
"composer/ca-bundle": "^1.0"
|
| 15 |
},
|
| 16 |
"bin": ["security-checker"],
|
| 17 |
"autoload": {
|
| 18 |
+
"psr-4": { "SensioLabs\\Security\\": "SensioLabs/Security" }
|
| 19 |
},
|
| 20 |
"extra": {
|
| 21 |
"branch-alias": {
|
| 22 |
+
"dev-master": "5.0-dev"
|
| 23 |
}
|
| 24 |
}
|
| 25 |
}
|
vendor/sensiolabs/security-checker/security-checker
CHANGED
|
@@ -26,7 +26,8 @@ if ((!$loader = includeIfExists(__DIR__.'/vendor/autoload.php')) && (!$loader =
|
|
| 26 |
use Symfony\Component\Console\Application;
|
| 27 |
use SensioLabs\Security\Command\SecurityCheckerCommand;
|
| 28 |
use SensioLabs\Security\SecurityChecker;
|
|
|
|
| 29 |
|
| 30 |
$console = new Application('SensioLabs Security Checker', SecurityChecker::VERSION);
|
| 31 |
-
$console->add(new SecurityCheckerCommand(new SecurityChecker()));
|
| 32 |
$console->run();
|
| 26 |
use Symfony\Component\Console\Application;
|
| 27 |
use SensioLabs\Security\Command\SecurityCheckerCommand;
|
| 28 |
use SensioLabs\Security\SecurityChecker;
|
| 29 |
+
use SensioLabs\Security\Crawler;
|
| 30 |
|
| 31 |
$console = new Application('SensioLabs Security Checker', SecurityChecker::VERSION);
|
| 32 |
+
$console->add(new SecurityCheckerCommand(new SecurityChecker(new Crawler())));
|
| 33 |
$console->run();
|
vendor/symfony/console/Application.php
CHANGED
|
@@ -11,34 +11,36 @@
|
|
| 11 |
|
| 12 |
namespace Symfony\Component\Console;
|
| 13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
use Symfony\Component\Console\Exception\ExceptionInterface;
|
|
|
|
| 15 |
use Symfony\Component\Console\Formatter\OutputFormatter;
|
| 16 |
use Symfony\Component\Console\Helper\DebugFormatterHelper;
|
|
|
|
| 17 |
use Symfony\Component\Console\Helper\Helper;
|
|
|
|
| 18 |
use Symfony\Component\Console\Helper\ProcessHelper;
|
| 19 |
use Symfony\Component\Console\Helper\QuestionHelper;
|
| 20 |
-
use Symfony\Component\Console\Input\InputInterface;
|
| 21 |
-
use Symfony\Component\Console\Input\StreamableInputInterface;
|
| 22 |
use Symfony\Component\Console\Input\ArgvInput;
|
| 23 |
use Symfony\Component\Console\Input\ArrayInput;
|
| 24 |
-
use Symfony\Component\Console\Input\InputDefinition;
|
| 25 |
-
use Symfony\Component\Console\Input\InputOption;
|
| 26 |
use Symfony\Component\Console\Input\InputArgument;
|
| 27 |
use Symfony\Component\Console\Input\InputAwareInterface;
|
| 28 |
-
use Symfony\Component\Console\
|
|
|
|
|
|
|
|
|
|
| 29 |
use Symfony\Component\Console\Output\ConsoleOutput;
|
| 30 |
use Symfony\Component\Console\Output\ConsoleOutputInterface;
|
| 31 |
-
use Symfony\Component\Console\
|
| 32 |
-
use Symfony\Component\
|
| 33 |
-
use Symfony\Component\Console\Command\ListCommand;
|
| 34 |
-
use Symfony\Component\Console\Helper\HelperSet;
|
| 35 |
-
use Symfony\Component\Console\Helper\FormatterHelper;
|
| 36 |
-
use Symfony\Component\Console\Event\ConsoleCommandEvent;
|
| 37 |
-
use Symfony\Component\Console\Event\ConsoleErrorEvent;
|
| 38 |
-
use Symfony\Component\Console\Event\ConsoleExceptionEvent;
|
| 39 |
-
use Symfony\Component\Console\Event\ConsoleTerminateEvent;
|
| 40 |
-
use Symfony\Component\Console\Exception\CommandNotFoundException;
|
| 41 |
-
use Symfony\Component\Console\Exception\LogicException;
|
| 42 |
use Symfony\Component\Debug\Exception\FatalThrowableError;
|
| 43 |
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
| 44 |
|
|
@@ -64,6 +66,7 @@ class Application
|
|
| 64 |
private $runningCommand;
|
| 65 |
private $name;
|
| 66 |
private $version;
|
|
|
|
| 67 |
private $catchExceptions = true;
|
| 68 |
private $autoExit = true;
|
| 69 |
private $definition;
|
|
@@ -91,6 +94,11 @@ class Application
|
|
| 91 |
$this->dispatcher = $dispatcher;
|
| 92 |
}
|
| 93 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 94 |
/**
|
| 95 |
* Runs the current application.
|
| 96 |
*
|
|
@@ -111,6 +119,25 @@ class Application
|
|
| 111 |
$output = new ConsoleOutput();
|
| 112 |
}
|
| 113 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 114 |
if (null !== $this->dispatcher && $this->dispatcher->hasListeners(ConsoleEvents::EXCEPTION)) {
|
| 115 |
@trigger_error(sprintf('The "ConsoleEvents::EXCEPTION" event is deprecated since Symfony 3.3 and will be removed in 4.0. Listen to the "ConsoleEvents::ERROR" event instead.'), E_USER_DEPRECATED);
|
| 116 |
}
|
|
@@ -118,21 +145,13 @@ class Application
|
|
| 118 |
$this->configureIO($input, $output);
|
| 119 |
|
| 120 |
try {
|
| 121 |
-
$e = null;
|
| 122 |
$exitCode = $this->doRun($input, $output);
|
| 123 |
} catch (\Exception $e) {
|
| 124 |
-
}
|
| 125 |
-
|
| 126 |
-
if (null !== $e) {
|
| 127 |
if (!$this->catchExceptions) {
|
| 128 |
throw $e;
|
| 129 |
}
|
| 130 |
|
| 131 |
-
|
| 132 |
-
$this->renderException($e, $output->getErrorOutput());
|
| 133 |
-
} else {
|
| 134 |
-
$this->renderException($e, $output);
|
| 135 |
-
}
|
| 136 |
|
| 137 |
$exitCode = $e->getCode();
|
| 138 |
if (is_numeric($exitCode)) {
|
|
@@ -143,6 +162,20 @@ class Application
|
|
| 143 |
} else {
|
| 144 |
$exitCode = 1;
|
| 145 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 146 |
}
|
| 147 |
|
| 148 |
if ($this->autoExit) {
|
|
@@ -418,7 +451,11 @@ class Application
|
|
| 418 |
}
|
| 419 |
|
| 420 |
if (null === $command->getDefinition()) {
|
| 421 |
-
throw new LogicException(sprintf('Command class "%s" is not correctly initialized. You probably forgot to call the parent constructor.', get_class($command)));
|
|
|
|
|
|
|
|
|
|
|
|
|
| 422 |
}
|
| 423 |
|
| 424 |
$this->commands[$command->getName()] = $command;
|
|
@@ -443,7 +480,7 @@ class Application
|
|
| 443 |
{
|
| 444 |
$this->init();
|
| 445 |
|
| 446 |
-
if (
|
| 447 |
throw new CommandNotFoundException(sprintf('The command "%s" does not exist.', $name));
|
| 448 |
}
|
| 449 |
|
|
@@ -472,7 +509,7 @@ class Application
|
|
| 472 |
{
|
| 473 |
$this->init();
|
| 474 |
|
| 475 |
-
return isset($this->commands[$name]);
|
| 476 |
}
|
| 477 |
|
| 478 |
/**
|
|
@@ -515,7 +552,7 @@ class Application
|
|
| 515 |
$message = sprintf('There are no commands defined in the "%s" namespace.', $namespace);
|
| 516 |
|
| 517 |
if ($alternatives = $this->findAlternatives($namespace, $allNamespaces)) {
|
| 518 |
-
if (1 == count($alternatives)) {
|
| 519 |
$message .= "\n\nDid you mean this?\n ";
|
| 520 |
} else {
|
| 521 |
$message .= "\n\nDid you mean one of these?\n ";
|
|
@@ -527,8 +564,8 @@ class Application
|
|
| 527 |
throw new CommandNotFoundException($message, $alternatives);
|
| 528 |
}
|
| 529 |
|
| 530 |
-
$exact = in_array($namespace, $namespaces, true);
|
| 531 |
-
if (count($namespaces) > 1 && !$exact) {
|
| 532 |
throw new CommandNotFoundException(sprintf("The namespace \"%s\" is ambiguous.\nDid you mean one of these?\n%s", $namespace, $this->getAbbreviationSuggestions(array_values($namespaces))), array_values($namespaces));
|
| 533 |
}
|
| 534 |
|
|
@@ -550,12 +587,18 @@ class Application
|
|
| 550 |
public function find($name)
|
| 551 |
{
|
| 552 |
$this->init();
|
|
|
|
| 553 |
$aliases = array();
|
| 554 |
-
$allCommands = array_keys($this->commands);
|
| 555 |
$expr = preg_replace_callback('{([^:]+|)}', function ($matches) { return preg_quote($matches[1]).'[^:]*'; }, $name);
|
| 556 |
$commands = preg_grep('{^'.$expr.'}', $allCommands);
|
| 557 |
|
| 558 |
-
if (empty($commands)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 559 |
if (false !== $pos = strrpos($name, ':')) {
|
| 560 |
// check if a namespace exists and contains commands
|
| 561 |
$this->findNamespace(substr($name, 0, $pos));
|
|
@@ -564,7 +607,7 @@ class Application
|
|
| 564 |
$message = sprintf('Command "%s" is not defined.', $name);
|
| 565 |
|
| 566 |
if ($alternatives = $this->findAlternatives($name, $allCommands)) {
|
| 567 |
-
if (1 == count($alternatives)) {
|
| 568 |
$message .= "\n\nDid you mean this?\n ";
|
| 569 |
} else {
|
| 570 |
$message .= "\n\nDid you mean one of these?\n ";
|
|
@@ -576,18 +619,18 @@ class Application
|
|
| 576 |
}
|
| 577 |
|
| 578 |
// filter out aliases for commands which are already on the list
|
| 579 |
-
if (count($commands) > 1) {
|
| 580 |
-
$commandList = $this->commands;
|
| 581 |
-
$commands = array_filter($commands, function ($nameOrAlias) use ($commandList, $commands, &$aliases) {
|
| 582 |
-
$commandName = $commandList[$nameOrAlias]->getName();
|
| 583 |
$aliases[$nameOrAlias] = $commandName;
|
| 584 |
|
| 585 |
-
return $commandName === $nameOrAlias ||
|
| 586 |
-
});
|
| 587 |
}
|
| 588 |
|
| 589 |
-
$exact = in_array($name, $commands, true) || isset($aliases[$name]);
|
| 590 |
-
if (count($commands) > 1 && !$exact) {
|
| 591 |
$usableWidth = $this->terminal->getWidth() - 10;
|
| 592 |
$abbrevs = array_values($commands);
|
| 593 |
$maxLen = 0;
|
|
@@ -595,6 +638,9 @@ class Application
|
|
| 595 |
$maxLen = max(Helper::strlen($abbrev), $maxLen);
|
| 596 |
}
|
| 597 |
$abbrevs = array_map(function ($cmd) use ($commandList, $usableWidth, $maxLen) {
|
|
|
|
|
|
|
|
|
|
| 598 |
$abbrev = str_pad($cmd, $maxLen, ' ').' '.$commandList[$cmd]->getDescription();
|
| 599 |
|
| 600 |
return Helper::strlen($abbrev) > $usableWidth ? Helper::substr($abbrev, 0, $usableWidth - 3).'...' : $abbrev;
|
|
@@ -621,7 +667,18 @@ class Application
|
|
| 621 |
$this->init();
|
| 622 |
|
| 623 |
if (null === $namespace) {
|
| 624 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 625 |
}
|
| 626 |
|
| 627 |
$commands = array();
|
|
@@ -631,6 +688,14 @@ class Application
|
|
| 631 |
}
|
| 632 |
}
|
| 633 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 634 |
return $commands;
|
| 635 |
}
|
| 636 |
|
|
@@ -645,7 +710,7 @@ class Application
|
|
| 645 |
{
|
| 646 |
$abbrevs = array();
|
| 647 |
foreach ($names as $name) {
|
| 648 |
-
for ($len = strlen($name); $len > 0; --$len) {
|
| 649 |
$abbrev = substr($name, 0, $len);
|
| 650 |
$abbrevs[$abbrev][] = $name;
|
| 651 |
}
|
|
@@ -661,22 +726,32 @@ class Application
|
|
| 661 |
{
|
| 662 |
$output->writeln('', OutputInterface::VERBOSITY_QUIET);
|
| 663 |
|
| 664 |
-
|
| 665 |
-
|
| 666 |
-
|
| 667 |
-
|
| 668 |
-
|
| 669 |
-
|
|
|
|
| 670 |
|
| 671 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 672 |
|
| 673 |
$width = $this->terminal->getWidth() ? $this->terminal->getWidth() - 1 : PHP_INT_MAX;
|
| 674 |
// HHVM only accepts 32 bits integer in str_split, even when PHP_INT_MAX is a 64 bit integer: https://github.com/facebook/hhvm/issues/1327
|
| 675 |
-
if (defined('HHVM_VERSION') && $width > 1 << 31) {
|
| 676 |
$width = 1 << 31;
|
| 677 |
}
|
| 678 |
$lines = array();
|
| 679 |
-
foreach (preg_split('/\r?\n/',
|
| 680 |
foreach ($this->splitStringByWidth($line, $width - 4) as $line) {
|
| 681 |
// pre-format lines to get the right string length
|
| 682 |
$lineLength = Helper::strlen($line) + 4;
|
|
@@ -687,8 +762,13 @@ class Application
|
|
| 687 |
}
|
| 688 |
|
| 689 |
$messages = array();
|
|
|
|
|
|
|
|
|
|
| 690 |
$messages[] = $emptyLine = sprintf('<error>%s</error>', str_repeat(' ', $len));
|
| 691 |
-
|
|
|
|
|
|
|
| 692 |
foreach ($lines as $line) {
|
| 693 |
$messages[] = sprintf('<error> %s %s</error>', OutputFormatter::escape($line[0]), str_repeat(' ', $len - $line[1]));
|
| 694 |
}
|
|
@@ -702,14 +782,8 @@ class Application
|
|
| 702 |
|
| 703 |
// exception related properties
|
| 704 |
$trace = $e->getTrace();
|
| 705 |
-
|
| 706 |
-
|
| 707 |
-
'file' => null !== $e->getFile() ? $e->getFile() : 'n/a',
|
| 708 |
-
'line' => null !== $e->getLine() ? $e->getLine() : 'n/a',
|
| 709 |
-
'args' => array(),
|
| 710 |
-
));
|
| 711 |
-
|
| 712 |
-
for ($i = 0, $count = count($trace); $i < $count; ++$i) {
|
| 713 |
$class = isset($trace[$i]['class']) ? $trace[$i]['class'] : '';
|
| 714 |
$type = isset($trace[$i]['type']) ? $trace[$i]['type'] : '';
|
| 715 |
$function = $trace[$i]['function'];
|
|
@@ -722,11 +796,6 @@ class Application
|
|
| 722 |
$output->writeln('', OutputInterface::VERBOSITY_QUIET);
|
| 723 |
}
|
| 724 |
} while ($e = $e->getPrevious());
|
| 725 |
-
|
| 726 |
-
if (null !== $this->runningCommand) {
|
| 727 |
-
$output->writeln(sprintf('<info>%s</info>', sprintf($this->runningCommand->getSynopsis(), $this->getName())), OutputInterface::VERBOSITY_QUIET);
|
| 728 |
-
$output->writeln('', OutputInterface::VERBOSITY_QUIET);
|
| 729 |
-
}
|
| 730 |
}
|
| 731 |
|
| 732 |
/**
|
|
@@ -738,7 +807,7 @@ class Application
|
|
| 738 |
*/
|
| 739 |
protected function getTerminalWidth()
|
| 740 |
{
|
| 741 |
-
@trigger_error(sprintf('%s is deprecated as of 3.2 and will be removed in 4.0. Create a Terminal instance instead.', __METHOD__), E_USER_DEPRECATED);
|
| 742 |
|
| 743 |
return $this->terminal->getWidth();
|
| 744 |
}
|
|
@@ -752,7 +821,7 @@ class Application
|
|
| 752 |
*/
|
| 753 |
protected function getTerminalHeight()
|
| 754 |
{
|
| 755 |
-
@trigger_error(sprintf('%s is deprecated as of 3.2 and will be removed in 4.0. Create a Terminal instance instead.', __METHOD__), E_USER_DEPRECATED);
|
| 756 |
|
| 757 |
return $this->terminal->getHeight();
|
| 758 |
}
|
|
@@ -766,7 +835,7 @@ class Application
|
|
| 766 |
*/
|
| 767 |
public function getTerminalDimensions()
|
| 768 |
{
|
| 769 |
-
@trigger_error(sprintf('%s is deprecated as of 3.2 and will be removed in 4.0. Create a Terminal instance instead.', __METHOD__), E_USER_DEPRECATED);
|
| 770 |
|
| 771 |
return array($this->terminal->getWidth(), $this->terminal->getHeight());
|
| 772 |
}
|
|
@@ -785,7 +854,7 @@ class Application
|
|
| 785 |
*/
|
| 786 |
public function setTerminalDimensions($width, $height)
|
| 787 |
{
|
| 788 |
-
@trigger_error(sprintf('%s is deprecated as of 3.2 and will be removed in 4.0. Set the COLUMNS and LINES env vars instead.', __METHOD__), E_USER_DEPRECATED);
|
| 789 |
|
| 790 |
putenv('COLUMNS='.$width);
|
| 791 |
putenv('LINES='.$height);
|
|
@@ -806,7 +875,7 @@ class Application
|
|
| 806 |
|
| 807 |
if (true === $input->hasParameterOption(array('--no-interaction', '-n'), true)) {
|
| 808 |
$input->setInteractive(false);
|
| 809 |
-
} elseif (function_exists('posix_isatty')) {
|
| 810 |
$inputStream = null;
|
| 811 |
|
| 812 |
if ($input instanceof StreamableInputInterface) {
|
|
@@ -824,18 +893,37 @@ class Application
|
|
| 824 |
}
|
| 825 |
}
|
| 826 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 827 |
if (true === $input->hasParameterOption(array('--quiet', '-q'), true)) {
|
| 828 |
$output->setVerbosity(OutputInterface::VERBOSITY_QUIET);
|
| 829 |
-
$
|
| 830 |
} else {
|
| 831 |
if ($input->hasParameterOption('-vvv', true) || $input->hasParameterOption('--verbose=3', true) || 3 === $input->getParameterOption('--verbose', false, true)) {
|
| 832 |
$output->setVerbosity(OutputInterface::VERBOSITY_DEBUG);
|
|
|
|
| 833 |
} elseif ($input->hasParameterOption('-vv', true) || $input->hasParameterOption('--verbose=2', true) || 2 === $input->getParameterOption('--verbose', false, true)) {
|
| 834 |
$output->setVerbosity(OutputInterface::VERBOSITY_VERY_VERBOSE);
|
|
|
|
| 835 |
} elseif ($input->hasParameterOption('-v', true) || $input->hasParameterOption('--verbose=1', true) || $input->hasParameterOption('--verbose', true) || $input->getParameterOption('--verbose', false, true)) {
|
| 836 |
$output->setVerbosity(OutputInterface::VERBOSITY_VERBOSE);
|
|
|
|
| 837 |
}
|
| 838 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 839 |
}
|
| 840 |
|
| 841 |
/**
|
|
@@ -991,7 +1079,7 @@ class Application
|
|
| 991 |
$parts = explode(':', $name);
|
| 992 |
array_pop($parts);
|
| 993 |
|
| 994 |
-
return implode(':', null === $limit ? $parts : array_slice($parts, 0, $limit));
|
| 995 |
}
|
| 996 |
|
| 997 |
/**
|
|
@@ -1024,7 +1112,7 @@ class Application
|
|
| 1024 |
}
|
| 1025 |
|
| 1026 |
$lev = levenshtein($subname, $parts[$i]);
|
| 1027 |
-
if ($lev <= strlen($subname) / 3 || '' !== $subname && false !== strpos($parts[$i], $subname)) {
|
| 1028 |
$alternatives[$collectionName] = $exists ? $alternatives[$collectionName] + $lev : $lev;
|
| 1029 |
} elseif ($exists) {
|
| 1030 |
$alternatives[$collectionName] += $threshold;
|
|
@@ -1034,7 +1122,7 @@ class Application
|
|
| 1034 |
|
| 1035 |
foreach ($collection as $item) {
|
| 1036 |
$lev = levenshtein($name, $item);
|
| 1037 |
-
if ($lev <= strlen($name) / 3 || false !== strpos($item, $name)) {
|
| 1038 |
$alternatives[$item] = isset($alternatives[$item]) ? $alternatives[$item] - $lev : $lev;
|
| 1039 |
}
|
| 1040 |
}
|
|
@@ -1090,7 +1178,7 @@ class Application
|
|
| 1090 |
$line = $char;
|
| 1091 |
}
|
| 1092 |
|
| 1093 |
-
$lines[] = count($lines) ? str_pad($line, $width) : $line;
|
| 1094 |
|
| 1095 |
mb_convert_variables($encoding, 'utf8', $lines);
|
| 1096 |
|
|
@@ -1111,7 +1199,7 @@ class Application
|
|
| 1111 |
$namespaces = array();
|
| 1112 |
|
| 1113 |
foreach ($parts as $part) {
|
| 1114 |
-
if (count($namespaces)) {
|
| 1115 |
$namespaces[] = end($namespaces).':'.$part;
|
| 1116 |
} else {
|
| 1117 |
$namespaces[] = $part;
|
| 11 |
|
| 12 |
namespace Symfony\Component\Console;
|
| 13 |
|
| 14 |
+
use Symfony\Component\Console\Command\Command;
|
| 15 |
+
use Symfony\Component\Console\Command\HelpCommand;
|
| 16 |
+
use Symfony\Component\Console\Command\ListCommand;
|
| 17 |
+
use Symfony\Component\Console\CommandLoader\CommandLoaderInterface;
|
| 18 |
+
use Symfony\Component\Console\Event\ConsoleCommandEvent;
|
| 19 |
+
use Symfony\Component\Console\Event\ConsoleErrorEvent;
|
| 20 |
+
use Symfony\Component\Console\Event\ConsoleExceptionEvent;
|
| 21 |
+
use Symfony\Component\Console\Event\ConsoleTerminateEvent;
|
| 22 |
+
use Symfony\Component\Console\Exception\CommandNotFoundException;
|
| 23 |
use Symfony\Component\Console\Exception\ExceptionInterface;
|
| 24 |
+
use Symfony\Component\Console\Exception\LogicException;
|
| 25 |
use Symfony\Component\Console\Formatter\OutputFormatter;
|
| 26 |
use Symfony\Component\Console\Helper\DebugFormatterHelper;
|
| 27 |
+
use Symfony\Component\Console\Helper\FormatterHelper;
|
| 28 |
use Symfony\Component\Console\Helper\Helper;
|
| 29 |
+
use Symfony\Component\Console\Helper\HelperSet;
|
| 30 |
use Symfony\Component\Console\Helper\ProcessHelper;
|
| 31 |
use Symfony\Component\Console\Helper\QuestionHelper;
|
|
|
|
|
|
|
| 32 |
use Symfony\Component\Console\Input\ArgvInput;
|
| 33 |
use Symfony\Component\Console\Input\ArrayInput;
|
|
|
|
|
|
|
| 34 |
use Symfony\Component\Console\Input\InputArgument;
|
| 35 |
use Symfony\Component\Console\Input\InputAwareInterface;
|
| 36 |
+
use Symfony\Component\Console\Input\InputDefinition;
|
| 37 |
+
use Symfony\Component\Console\Input\InputInterface;
|
| 38 |
+
use Symfony\Component\Console\Input\InputOption;
|
| 39 |
+
use Symfony\Component\Console\Input\StreamableInputInterface;
|
| 40 |
use Symfony\Component\Console\Output\ConsoleOutput;
|
| 41 |
use Symfony\Component\Console\Output\ConsoleOutputInterface;
|
| 42 |
+
use Symfony\Component\Console\Output\OutputInterface;
|
| 43 |
+
use Symfony\Component\Debug\ErrorHandler;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
use Symfony\Component\Debug\Exception\FatalThrowableError;
|
| 45 |
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
| 46 |
|
| 66 |
private $runningCommand;
|
| 67 |
private $name;
|
| 68 |
private $version;
|
| 69 |
+
private $commandLoader;
|
| 70 |
private $catchExceptions = true;
|
| 71 |
private $autoExit = true;
|
| 72 |
private $definition;
|
| 94 |
$this->dispatcher = $dispatcher;
|
| 95 |
}
|
| 96 |
|
| 97 |
+
public function setCommandLoader(CommandLoaderInterface $commandLoader)
|
| 98 |
+
{
|
| 99 |
+
$this->commandLoader = $commandLoader;
|
| 100 |
+
}
|
| 101 |
+
|
| 102 |
/**
|
| 103 |
* Runs the current application.
|
| 104 |
*
|
| 119 |
$output = new ConsoleOutput();
|
| 120 |
}
|
| 121 |
|
| 122 |
+
$renderException = function ($e) use ($output) {
|
| 123 |
+
if (!$e instanceof \Exception) {
|
| 124 |
+
$e = class_exists(FatalThrowableError::class) ? new FatalThrowableError($e) : new \ErrorException($e->getMessage(), $e->getCode(), E_ERROR, $e->getFile(), $e->getLine());
|
| 125 |
+
}
|
| 126 |
+
if ($output instanceof ConsoleOutputInterface) {
|
| 127 |
+
$this->renderException($e, $output->getErrorOutput());
|
| 128 |
+
} else {
|
| 129 |
+
$this->renderException($e, $output);
|
| 130 |
+
}
|
| 131 |
+
};
|
| 132 |
+
if ($phpHandler = set_exception_handler($renderException)) {
|
| 133 |
+
restore_exception_handler();
|
| 134 |
+
if (!\is_array($phpHandler) || !$phpHandler[0] instanceof ErrorHandler) {
|
| 135 |
+
$debugHandler = true;
|
| 136 |
+
} elseif ($debugHandler = $phpHandler[0]->setExceptionHandler($renderException)) {
|
| 137 |
+
$phpHandler[0]->setExceptionHandler($debugHandler);
|
| 138 |
+
}
|
| 139 |
+
}
|
| 140 |
+
|
| 141 |
if (null !== $this->dispatcher && $this->dispatcher->hasListeners(ConsoleEvents::EXCEPTION)) {
|
| 142 |
@trigger_error(sprintf('The "ConsoleEvents::EXCEPTION" event is deprecated since Symfony 3.3 and will be removed in 4.0. Listen to the "ConsoleEvents::ERROR" event instead.'), E_USER_DEPRECATED);
|
| 143 |
}
|
| 145 |
$this->configureIO($input, $output);
|
| 146 |
|
| 147 |
try {
|
|
|
|
| 148 |
$exitCode = $this->doRun($input, $output);
|
| 149 |
} catch (\Exception $e) {
|
|
|
|
|
|
|
|
|
|
| 150 |
if (!$this->catchExceptions) {
|
| 151 |
throw $e;
|
| 152 |
}
|
| 153 |
|
| 154 |
+
$renderException($e);
|
|
|
|
|
|
|
|
|
|
|
|
|
| 155 |
|
| 156 |
$exitCode = $e->getCode();
|
| 157 |
if (is_numeric($exitCode)) {
|
| 162 |
} else {
|
| 163 |
$exitCode = 1;
|
| 164 |
}
|
| 165 |
+
} finally {
|
| 166 |
+
// if the exception handler changed, keep it
|
| 167 |
+
// otherwise, unregister $renderException
|
| 168 |
+
if (!$phpHandler) {
|
| 169 |
+
if (set_exception_handler($renderException) === $renderException) {
|
| 170 |
+
restore_exception_handler();
|
| 171 |
+
}
|
| 172 |
+
restore_exception_handler();
|
| 173 |
+
} elseif (!$debugHandler) {
|
| 174 |
+
$finalHandler = $phpHandler[0]->setExceptionHandler(null);
|
| 175 |
+
if ($finalHandler !== $renderException) {
|
| 176 |
+
$phpHandler[0]->setExceptionHandler($finalHandler);
|
| 177 |
+
}
|
| 178 |
+
}
|
| 179 |
}
|
| 180 |
|
| 181 |
if ($this->autoExit) {
|
| 451 |
}
|
| 452 |
|
| 453 |
if (null === $command->getDefinition()) {
|
| 454 |
+
throw new LogicException(sprintf('Command class "%s" is not correctly initialized. You probably forgot to call the parent constructor.', \get_class($command)));
|
| 455 |
+
}
|
| 456 |
+
|
| 457 |
+
if (!$command->getName()) {
|
| 458 |
+
throw new LogicException(sprintf('The command defined in "%s" cannot have an empty name.', \get_class($command)));
|
| 459 |
}
|
| 460 |
|
| 461 |
$this->commands[$command->getName()] = $command;
|
| 480 |
{
|
| 481 |
$this->init();
|
| 482 |
|
| 483 |
+
if (!$this->has($name)) {
|
| 484 |
throw new CommandNotFoundException(sprintf('The command "%s" does not exist.', $name));
|
| 485 |
}
|
| 486 |
|
| 509 |
{
|
| 510 |
$this->init();
|
| 511 |
|
| 512 |
+
return isset($this->commands[$name]) || ($this->commandLoader && $this->commandLoader->has($name) && $this->add($this->commandLoader->get($name)));
|
| 513 |
}
|
| 514 |
|
| 515 |
/**
|
| 552 |
$message = sprintf('There are no commands defined in the "%s" namespace.', $namespace);
|
| 553 |
|
| 554 |
if ($alternatives = $this->findAlternatives($namespace, $allNamespaces)) {
|
| 555 |
+
if (1 == \count($alternatives)) {
|
| 556 |
$message .= "\n\nDid you mean this?\n ";
|
| 557 |
} else {
|
| 558 |
$message .= "\n\nDid you mean one of these?\n ";
|
| 564 |
throw new CommandNotFoundException($message, $alternatives);
|
| 565 |
}
|
| 566 |
|
| 567 |
+
$exact = \in_array($namespace, $namespaces, true);
|
| 568 |
+
if (\count($namespaces) > 1 && !$exact) {
|
| 569 |
throw new CommandNotFoundException(sprintf("The namespace \"%s\" is ambiguous.\nDid you mean one of these?\n%s", $namespace, $this->getAbbreviationSuggestions(array_values($namespaces))), array_values($namespaces));
|
| 570 |
}
|
| 571 |
|
| 587 |
public function find($name)
|
| 588 |
{
|
| 589 |
$this->init();
|
| 590 |
+
|
| 591 |
$aliases = array();
|
| 592 |
+
$allCommands = $this->commandLoader ? array_merge($this->commandLoader->getNames(), array_keys($this->commands)) : array_keys($this->commands);
|
| 593 |
$expr = preg_replace_callback('{([^:]+|)}', function ($matches) { return preg_quote($matches[1]).'[^:]*'; }, $name);
|
| 594 |
$commands = preg_grep('{^'.$expr.'}', $allCommands);
|
| 595 |
|
| 596 |
+
if (empty($commands)) {
|
| 597 |
+
$commands = preg_grep('{^'.$expr.'}i', $allCommands);
|
| 598 |
+
}
|
| 599 |
+
|
| 600 |
+
// if no commands matched or we just matched namespaces
|
| 601 |
+
if (empty($commands) || \count(preg_grep('{^'.$expr.'$}i', $commands)) < 1) {
|
| 602 |
if (false !== $pos = strrpos($name, ':')) {
|
| 603 |
// check if a namespace exists and contains commands
|
| 604 |
$this->findNamespace(substr($name, 0, $pos));
|
| 607 |
$message = sprintf('Command "%s" is not defined.', $name);
|
| 608 |
|
| 609 |
if ($alternatives = $this->findAlternatives($name, $allCommands)) {
|
| 610 |
+
if (1 == \count($alternatives)) {
|
| 611 |
$message .= "\n\nDid you mean this?\n ";
|
| 612 |
} else {
|
| 613 |
$message .= "\n\nDid you mean one of these?\n ";
|
| 619 |
}
|
| 620 |
|
| 621 |
// filter out aliases for commands which are already on the list
|
| 622 |
+
if (\count($commands) > 1) {
|
| 623 |
+
$commandList = $this->commandLoader ? array_merge(array_flip($this->commandLoader->getNames()), $this->commands) : $this->commands;
|
| 624 |
+
$commands = array_unique(array_filter($commands, function ($nameOrAlias) use ($commandList, $commands, &$aliases) {
|
| 625 |
+
$commandName = $commandList[$nameOrAlias] instanceof Command ? $commandList[$nameOrAlias]->getName() : $nameOrAlias;
|
| 626 |
$aliases[$nameOrAlias] = $commandName;
|
| 627 |
|
| 628 |
+
return $commandName === $nameOrAlias || !\in_array($commandName, $commands);
|
| 629 |
+
}));
|
| 630 |
}
|
| 631 |
|
| 632 |
+
$exact = \in_array($name, $commands, true) || isset($aliases[$name]);
|
| 633 |
+
if (\count($commands) > 1 && !$exact) {
|
| 634 |
$usableWidth = $this->terminal->getWidth() - 10;
|
| 635 |
$abbrevs = array_values($commands);
|
| 636 |
$maxLen = 0;
|
| 638 |
$maxLen = max(Helper::strlen($abbrev), $maxLen);
|
| 639 |
}
|
| 640 |
$abbrevs = array_map(function ($cmd) use ($commandList, $usableWidth, $maxLen) {
|
| 641 |
+
if (!$commandList[$cmd] instanceof Command) {
|
| 642 |
+
return $cmd;
|
| 643 |
+
}
|
| 644 |
$abbrev = str_pad($cmd, $maxLen, ' ').' '.$commandList[$cmd]->getDescription();
|
| 645 |
|
| 646 |
return Helper::strlen($abbrev) > $usableWidth ? Helper::substr($abbrev, 0, $usableWidth - 3).'...' : $abbrev;
|
| 667 |
$this->init();
|
| 668 |
|
| 669 |
if (null === $namespace) {
|
| 670 |
+
if (!$this->commandLoader) {
|
| 671 |
+
return $this->commands;
|
| 672 |
+
}
|
| 673 |
+
|
| 674 |
+
$commands = $this->commands;
|
| 675 |
+
foreach ($this->commandLoader->getNames() as $name) {
|
| 676 |
+
if (!isset($commands[$name]) && $this->has($name)) {
|
| 677 |
+
$commands[$name] = $this->get($name);
|
| 678 |
+
}
|
| 679 |
+
}
|
| 680 |
+
|
| 681 |
+
return $commands;
|
| 682 |
}
|
| 683 |
|
| 684 |
$commands = array();
|
| 688 |
}
|
| 689 |
}
|
| 690 |
|
| 691 |
+
if ($this->commandLoader) {
|
| 692 |
+
foreach ($this->commandLoader->getNames() as $name) {
|
| 693 |
+
if (!isset($commands[$name]) && $namespace === $this->extractNamespace($name, substr_count($namespace, ':') + 1) && $this->has($name)) {
|
| 694 |
+
$commands[$name] = $this->get($name);
|
| 695 |
+
}
|
| 696 |
+
}
|
| 697 |
+
}
|
| 698 |
+
|
| 699 |
return $commands;
|
| 700 |
}
|
| 701 |
|
| 710 |
{
|
| 711 |
$abbrevs = array();
|
| 712 |
foreach ($names as $name) {
|
| 713 |
+
for ($len = \strlen($name); $len > 0; --$len) {
|
| 714 |
$abbrev = substr($name, 0, $len);
|
| 715 |
$abbrevs[$abbrev][] = $name;
|
| 716 |
}
|
| 726 |
{
|
| 727 |
$output->writeln('', OutputInterface::VERBOSITY_QUIET);
|
| 728 |
|
| 729 |
+
$this->doRenderException($e, $output);
|
| 730 |
+
|
| 731 |
+
if (null !== $this->runningCommand) {
|
| 732 |
+
$output->writeln(sprintf('<info>%s</info>', sprintf($this->runningCommand->getSynopsis(), $this->getName())), OutputInterface::VERBOSITY_QUIET);
|
| 733 |
+
$output->writeln('', OutputInterface::VERBOSITY_QUIET);
|
| 734 |
+
}
|
| 735 |
+
}
|
| 736 |
|
| 737 |
+
protected function doRenderException(\Exception $e, OutputInterface $output)
|
| 738 |
+
{
|
| 739 |
+
do {
|
| 740 |
+
$message = trim($e->getMessage());
|
| 741 |
+
if ('' === $message || OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) {
|
| 742 |
+
$title = sprintf(' [%s%s] ', \get_class($e), 0 !== ($code = $e->getCode()) ? ' ('.$code.')' : '');
|
| 743 |
+
$len = Helper::strlen($title);
|
| 744 |
+
} else {
|
| 745 |
+
$len = 0;
|
| 746 |
+
}
|
| 747 |
|
| 748 |
$width = $this->terminal->getWidth() ? $this->terminal->getWidth() - 1 : PHP_INT_MAX;
|
| 749 |
// HHVM only accepts 32 bits integer in str_split, even when PHP_INT_MAX is a 64 bit integer: https://github.com/facebook/hhvm/issues/1327
|
| 750 |
+
if (\defined('HHVM_VERSION') && $width > 1 << 31) {
|
| 751 |
$width = 1 << 31;
|
| 752 |
}
|
| 753 |
$lines = array();
|
| 754 |
+
foreach ('' !== $message ? preg_split('/\r?\n/', $message) : array() as $line) {
|
| 755 |
foreach ($this->splitStringByWidth($line, $width - 4) as $line) {
|
| 756 |
// pre-format lines to get the right string length
|
| 757 |
$lineLength = Helper::strlen($line) + 4;
|
| 762 |
}
|
| 763 |
|
| 764 |
$messages = array();
|
| 765 |
+
if (!$e instanceof ExceptionInterface || OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) {
|
| 766 |
+
$messages[] = sprintf('<comment>%s</comment>', OutputFormatter::escape(sprintf('In %s line %s:', basename($e->getFile()) ?: 'n/a', $e->getLine() ?: 'n/a')));
|
| 767 |
+
}
|
| 768 |
$messages[] = $emptyLine = sprintf('<error>%s</error>', str_repeat(' ', $len));
|
| 769 |
+
if ('' === $message || OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) {
|
| 770 |
+
$messages[] = sprintf('<error>%s%s</error>', $title, str_repeat(' ', max(0, $len - Helper::strlen($title))));
|
| 771 |
+
}
|
| 772 |
foreach ($lines as $line) {
|
| 773 |
$messages[] = sprintf('<error> %s %s</error>', OutputFormatter::escape($line[0]), str_repeat(' ', $len - $line[1]));
|
| 774 |
}
|
| 782 |
|
| 783 |
// exception related properties
|
| 784 |
$trace = $e->getTrace();
|
| 785 |
+
|
| 786 |
+
for ($i = 0, $count = \count($trace); $i < $count; ++$i) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 787 |
$class = isset($trace[$i]['class']) ? $trace[$i]['class'] : '';
|
| 788 |
$type = isset($trace[$i]['type']) ? $trace[$i]['type'] : '';
|
| 789 |
$function = $trace[$i]['function'];
|
| 796 |
$output->writeln('', OutputInterface::VERBOSITY_QUIET);
|
| 797 |
}
|
| 798 |
} while ($e = $e->getPrevious());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 799 |
}
|
| 800 |
|
| 801 |
/**
|
| 807 |
*/
|
| 808 |
protected function getTerminalWidth()
|
| 809 |
{
|
| 810 |
+
@trigger_error(sprintf('The "%s()" method is deprecated as of 3.2 and will be removed in 4.0. Create a Terminal instance instead.', __METHOD__), E_USER_DEPRECATED);
|
| 811 |
|
| 812 |
return $this->terminal->getWidth();
|
| 813 |
}
|
| 821 |
*/
|
| 822 |
protected function getTerminalHeight()
|
| 823 |
{
|
| 824 |
+
@trigger_error(sprintf('The "%s()" method is deprecated as of 3.2 and will be removed in 4.0. Create a Terminal instance instead.', __METHOD__), E_USER_DEPRECATED);
|
| 825 |
|
| 826 |
return $this->terminal->getHeight();
|
| 827 |
}
|
| 835 |
*/
|
| 836 |
public function getTerminalDimensions()
|
| 837 |
{
|
| 838 |
+
@trigger_error(sprintf('The "%s()" method is deprecated as of 3.2 and will be removed in 4.0. Create a Terminal instance instead.', __METHOD__), E_USER_DEPRECATED);
|
| 839 |
|
| 840 |
return array($this->terminal->getWidth(), $this->terminal->getHeight());
|
| 841 |
}
|
| 854 |
*/
|
| 855 |
public function setTerminalDimensions($width, $height)
|
| 856 |
{
|
| 857 |
+
@trigger_error(sprintf('The "%s()" method is deprecated as of 3.2 and will be removed in 4.0. Set the COLUMNS and LINES env vars instead.', __METHOD__), E_USER_DEPRECATED);
|
| 858 |
|
| 859 |
putenv('COLUMNS='.$width);
|
| 860 |
putenv('LINES='.$height);
|
| 875 |
|
| 876 |
if (true === $input->hasParameterOption(array('--no-interaction', '-n'), true)) {
|
| 877 |
$input->setInteractive(false);
|
| 878 |
+
} elseif (\function_exists('posix_isatty')) {
|
| 879 |
$inputStream = null;
|
| 880 |
|
| 881 |
if ($input instanceof StreamableInputInterface) {
|
| 893 |
}
|
| 894 |
}
|
| 895 |
|
| 896 |
+
switch ($shellVerbosity = (int) getenv('SHELL_VERBOSITY')) {
|
| 897 |
+
case -1: $output->setVerbosity(OutputInterface::VERBOSITY_QUIET); break;
|
| 898 |
+
case 1: $output->setVerbosity(OutputInterface::VERBOSITY_VERBOSE); break;
|
| 899 |
+
case 2: $output->setVerbosity(OutputInterface::VERBOSITY_VERY_VERBOSE); break;
|
| 900 |
+
case 3: $output->setVerbosity(OutputInterface::VERBOSITY_DEBUG); break;
|
| 901 |
+
default: $shellVerbosity = 0; break;
|
| 902 |
+
}
|
| 903 |
+
|
| 904 |
if (true === $input->hasParameterOption(array('--quiet', '-q'), true)) {
|
| 905 |
$output->setVerbosity(OutputInterface::VERBOSITY_QUIET);
|
| 906 |
+
$shellVerbosity = -1;
|
| 907 |
} else {
|
| 908 |
if ($input->hasParameterOption('-vvv', true) || $input->hasParameterOption('--verbose=3', true) || 3 === $input->getParameterOption('--verbose', false, true)) {
|
| 909 |
$output->setVerbosity(OutputInterface::VERBOSITY_DEBUG);
|
| 910 |
+
$shellVerbosity = 3;
|
| 911 |
} elseif ($input->hasParameterOption('-vv', true) || $input->hasParameterOption('--verbose=2', true) || 2 === $input->getParameterOption('--verbose', false, true)) {
|
| 912 |
$output->setVerbosity(OutputInterface::VERBOSITY_VERY_VERBOSE);
|
| 913 |
+
$shellVerbosity = 2;
|
| 914 |
} elseif ($input->hasParameterOption('-v', true) || $input->hasParameterOption('--verbose=1', true) || $input->hasParameterOption('--verbose', true) || $input->getParameterOption('--verbose', false, true)) {
|
| 915 |
$output->setVerbosity(OutputInterface::VERBOSITY_VERBOSE);
|
| 916 |
+
$shellVerbosity = 1;
|
| 917 |
}
|
| 918 |
}
|
| 919 |
+
|
| 920 |
+
if (-1 === $shellVerbosity) {
|
| 921 |
+
$input->setInteractive(false);
|
| 922 |
+
}
|
| 923 |
+
|
| 924 |
+
putenv('SHELL_VERBOSITY='.$shellVerbosity);
|
| 925 |
+
$_ENV['SHELL_VERBOSITY'] = $shellVerbosity;
|
| 926 |
+
$_SERVER['SHELL_VERBOSITY'] = $shellVerbosity;
|
| 927 |
}
|
| 928 |
|
| 929 |
/**
|
| 1079 |
$parts = explode(':', $name);
|
| 1080 |
array_pop($parts);
|
| 1081 |
|
| 1082 |
+
return implode(':', null === $limit ? $parts : \array_slice($parts, 0, $limit));
|
| 1083 |
}
|
| 1084 |
|
| 1085 |
/**
|
| 1112 |
}
|
| 1113 |
|
| 1114 |
$lev = levenshtein($subname, $parts[$i]);
|
| 1115 |
+
if ($lev <= \strlen($subname) / 3 || '' !== $subname && false !== strpos($parts[$i], $subname)) {
|
| 1116 |
$alternatives[$collectionName] = $exists ? $alternatives[$collectionName] + $lev : $lev;
|
| 1117 |
} elseif ($exists) {
|
| 1118 |
$alternatives[$collectionName] += $threshold;
|
| 1122 |
|
| 1123 |
foreach ($collection as $item) {
|
| 1124 |
$lev = levenshtein($name, $item);
|
| 1125 |
+
if ($lev <= \strlen($name) / 3 || false !== strpos($item, $name)) {
|
| 1126 |
$alternatives[$item] = isset($alternatives[$item]) ? $alternatives[$item] - $lev : $lev;
|
| 1127 |
}
|
| 1128 |
}
|
| 1178 |
$line = $char;
|
| 1179 |
}
|
| 1180 |
|
| 1181 |
+
$lines[] = \count($lines) ? str_pad($line, $width) : $line;
|
| 1182 |
|
| 1183 |
mb_convert_variables($encoding, 'utf8', $lines);
|
| 1184 |
|
| 1199 |
$namespaces = array();
|
| 1200 |
|
| 1201 |
foreach ($parts as $part) {
|
| 1202 |
+
if (\count($namespaces)) {
|
| 1203 |
$namespaces[] = end($namespaces).':'.$part;
|
| 1204 |
} else {
|
| 1205 |
$namespaces[] = $part;
|
vendor/symfony/console/Command/Command.php
CHANGED
|
@@ -11,16 +11,16 @@
|
|
| 11 |
|
| 12 |
namespace Symfony\Component\Console\Command;
|
| 13 |
|
|
|
|
| 14 |
use Symfony\Component\Console\Exception\ExceptionInterface;
|
| 15 |
-
use Symfony\Component\Console\
|
| 16 |
-
use Symfony\Component\Console\
|
|
|
|
| 17 |
use Symfony\Component\Console\Input\InputArgument;
|
|
|
|
| 18 |
use Symfony\Component\Console\Input\InputInterface;
|
|
|
|
| 19 |
use Symfony\Component\Console\Output\OutputInterface;
|
| 20 |
-
use Symfony\Component\Console\Application;
|
| 21 |
-
use Symfony\Component\Console\Helper\HelperSet;
|
| 22 |
-
use Symfony\Component\Console\Exception\InvalidArgumentException;
|
| 23 |
-
use Symfony\Component\Console\Exception\LogicException;
|
| 24 |
|
| 25 |
/**
|
| 26 |
* Base class for all commands.
|
|
@@ -29,6 +29,11 @@ use Symfony\Component\Console\Exception\LogicException;
|
|
| 29 |
*/
|
| 30 |
class Command
|
| 31 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
private $application;
|
| 33 |
private $name;
|
| 34 |
private $processTitle;
|
|
@@ -45,6 +50,17 @@ class Command
|
|
| 45 |
private $usages = array();
|
| 46 |
private $helperSet;
|
| 47 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
/**
|
| 49 |
* @param string|null $name The name of the command; passing null means it must be set in configure()
|
| 50 |
*
|
|
@@ -54,15 +70,11 @@ class Command
|
|
| 54 |
{
|
| 55 |
$this->definition = new InputDefinition();
|
| 56 |
|
| 57 |
-
if (null !== $name) {
|
| 58 |
$this->setName($name);
|
| 59 |
}
|
| 60 |
|
| 61 |
$this->configure();
|
| 62 |
-
|
| 63 |
-
if (!$this->name) {
|
| 64 |
-
throw new LogicException(sprintf('The command defined in "%s" cannot have an empty name.', get_class($this)));
|
| 65 |
-
}
|
| 66 |
}
|
| 67 |
|
| 68 |
/**
|
|
@@ -138,7 +150,7 @@ class Command
|
|
| 138 |
* execute() method, you set the code to execute by passing
|
| 139 |
* a Closure to the setCode() method.
|
| 140 |
*
|
| 141 |
-
* @return null
|
| 142 |
*
|
| 143 |
* @throws LogicException When this abstract method is not implemented
|
| 144 |
*
|
|
@@ -161,10 +173,14 @@ class Command
|
|
| 161 |
}
|
| 162 |
|
| 163 |
/**
|
| 164 |
-
* Initializes the command
|
|
|
|
| 165 |
*
|
| 166 |
* This is mainly useful when a lot of commands extends one main command
|
| 167 |
* where some things need to be initialized based on the input arguments and options.
|
|
|
|
|
|
|
|
|
|
| 168 |
*/
|
| 169 |
protected function initialize(InputInterface $input, OutputInterface $output)
|
| 170 |
{
|
|
@@ -205,16 +221,15 @@ class Command
|
|
| 205 |
$this->initialize($input, $output);
|
| 206 |
|
| 207 |
if (null !== $this->processTitle) {
|
| 208 |
-
if (function_exists('cli_set_process_title')) {
|
| 209 |
-
if (
|
| 210 |
if ('Darwin' === PHP_OS) {
|
| 211 |
-
$output->writeln('<comment>Running "
|
| 212 |
} else {
|
| 213 |
-
$
|
| 214 |
-
trigger_error($error['message'], E_USER_WARNING);
|
| 215 |
}
|
| 216 |
}
|
| 217 |
-
} elseif (function_exists('setproctitle')) {
|
| 218 |
setproctitle($this->processTitle);
|
| 219 |
} elseif (OutputInterface::VERBOSITY_VERY_VERBOSE === $output->getVerbosity()) {
|
| 220 |
$output->writeln('<comment>Install the proctitle PECL to be able to change the process title.</comment>');
|
|
@@ -235,7 +250,7 @@ class Command
|
|
| 235 |
$input->validate();
|
| 236 |
|
| 237 |
if ($this->code) {
|
| 238 |
-
$statusCode = call_user_func($this->code, $input, $output);
|
| 239 |
} else {
|
| 240 |
$statusCode = $this->execute($input, $output);
|
| 241 |
}
|
|
@@ -539,7 +554,7 @@ class Command
|
|
| 539 |
*/
|
| 540 |
public function setAliases($aliases)
|
| 541 |
{
|
| 542 |
-
if (
|
| 543 |
throw new InvalidArgumentException('$aliases must be an array or an instance of \Traversable');
|
| 544 |
}
|
| 545 |
|
| 11 |
|
| 12 |
namespace Symfony\Component\Console\Command;
|
| 13 |
|
| 14 |
+
use Symfony\Component\Console\Application;
|
| 15 |
use Symfony\Component\Console\Exception\ExceptionInterface;
|
| 16 |
+
use Symfony\Component\Console\Exception\InvalidArgumentException;
|
| 17 |
+
use Symfony\Component\Console\Exception\LogicException;
|
| 18 |
+
use Symfony\Component\Console\Helper\HelperSet;
|
| 19 |
use Symfony\Component\Console\Input\InputArgument;
|
| 20 |
+
use Symfony\Component\Console\Input\InputDefinition;
|
| 21 |
use Symfony\Component\Console\Input\InputInterface;
|
| 22 |
+
use Symfony\Component\Console\Input\InputOption;
|
| 23 |
use Symfony\Component\Console\Output\OutputInterface;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
|
| 25 |
/**
|
| 26 |
* Base class for all commands.
|
| 29 |
*/
|
| 30 |
class Command
|
| 31 |
{
|
| 32 |
+
/**
|
| 33 |
+
* @var string|null The default command name
|
| 34 |
+
*/
|
| 35 |
+
protected static $defaultName;
|
| 36 |
+
|
| 37 |
private $application;
|
| 38 |
private $name;
|
| 39 |
private $processTitle;
|
| 50 |
private $usages = array();
|
| 51 |
private $helperSet;
|
| 52 |
|
| 53 |
+
/**
|
| 54 |
+
* @return string|null The default command name or null when no default name is set
|
| 55 |
+
*/
|
| 56 |
+
public static function getDefaultName()
|
| 57 |
+
{
|
| 58 |
+
$class = \get_called_class();
|
| 59 |
+
$r = new \ReflectionProperty($class, 'defaultName');
|
| 60 |
+
|
| 61 |
+
return $class === $r->class ? static::$defaultName : null;
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
/**
|
| 65 |
* @param string|null $name The name of the command; passing null means it must be set in configure()
|
| 66 |
*
|
| 70 |
{
|
| 71 |
$this->definition = new InputDefinition();
|
| 72 |
|
| 73 |
+
if (null !== $name || null !== $name = static::getDefaultName()) {
|
| 74 |
$this->setName($name);
|
| 75 |
}
|
| 76 |
|
| 77 |
$this->configure();
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
}
|
| 79 |
|
| 80 |
/**
|
| 150 |
* execute() method, you set the code to execute by passing
|
| 151 |
* a Closure to the setCode() method.
|
| 152 |
*
|
| 153 |
+
* @return int|null null or 0 if everything went fine, or an error code
|
| 154 |
*
|
| 155 |
* @throws LogicException When this abstract method is not implemented
|
| 156 |
*
|
| 173 |
}
|
| 174 |
|
| 175 |
/**
|
| 176 |
+
* Initializes the command after the input has been bound and before the input
|
| 177 |
+
* is validated.
|
| 178 |
*
|
| 179 |
* This is mainly useful when a lot of commands extends one main command
|
| 180 |
* where some things need to be initialized based on the input arguments and options.
|
| 181 |
+
*
|
| 182 |
+
* @see InputInterface::bind()
|
| 183 |
+
* @see InputInterface::validate()
|
| 184 |
*/
|
| 185 |
protected function initialize(InputInterface $input, OutputInterface $output)
|
| 186 |
{
|
| 221 |
$this->initialize($input, $output);
|
| 222 |
|
| 223 |
if (null !== $this->processTitle) {
|
| 224 |
+
if (\function_exists('cli_set_process_title')) {
|
| 225 |
+
if (!@cli_set_process_title($this->processTitle)) {
|
| 226 |
if ('Darwin' === PHP_OS) {
|
| 227 |
+
$output->writeln('<comment>Running "cli_set_process_title" as an unprivileged user is not supported on MacOS.</comment>', OutputInterface::VERBOSITY_VERY_VERBOSE);
|
| 228 |
} else {
|
| 229 |
+
cli_set_process_title($this->processTitle);
|
|
|
|
| 230 |
}
|
| 231 |
}
|
| 232 |
+
} elseif (\function_exists('setproctitle')) {
|
| 233 |
setproctitle($this->processTitle);
|
| 234 |
} elseif (OutputInterface::VERBOSITY_VERY_VERBOSE === $output->getVerbosity()) {
|
| 235 |
$output->writeln('<comment>Install the proctitle PECL to be able to change the process title.</comment>');
|
| 250 |
$input->validate();
|
| 251 |
|
| 252 |
if ($this->code) {
|
| 253 |
+
$statusCode = \call_user_func($this->code, $input, $output);
|
| 254 |
} else {
|
| 255 |
$statusCode = $this->execute($input, $output);
|
| 256 |
}
|
| 554 |
*/
|
| 555 |
public function setAliases($aliases)
|
| 556 |
{
|
| 557 |
+
if (!\is_array($aliases) && !$aliases instanceof \Traversable) {
|
| 558 |
throw new InvalidArgumentException('$aliases must be an array or an instance of \Traversable');
|
| 559 |
}
|
| 560 |
|
vendor/symfony/console/Command/HelpCommand.php
CHANGED
|
@@ -13,8 +13,8 @@ namespace Symfony\Component\Console\Command;
|
|
| 13 |
|
| 14 |
use Symfony\Component\Console\Helper\DescriptorHelper;
|
| 15 |
use Symfony\Component\Console\Input\InputArgument;
|
| 16 |
-
use Symfony\Component\Console\Input\InputOption;
|
| 17 |
use Symfony\Component\Console\Input\InputInterface;
|
|
|
|
| 18 |
use Symfony\Component\Console\Output\OutputInterface;
|
| 19 |
|
| 20 |
/**
|
| 13 |
|
| 14 |
use Symfony\Component\Console\Helper\DescriptorHelper;
|
| 15 |
use Symfony\Component\Console\Input\InputArgument;
|
|
|
|
| 16 |
use Symfony\Component\Console\Input\InputInterface;
|
| 17 |
+
use Symfony\Component\Console\Input\InputOption;
|
| 18 |
use Symfony\Component\Console\Output\OutputInterface;
|
| 19 |
|
| 20 |
/**
|
vendor/symfony/console/Command/ListCommand.php
CHANGED
|
@@ -13,10 +13,10 @@ namespace Symfony\Component\Console\Command;
|
|
| 13 |
|
| 14 |
use Symfony\Component\Console\Helper\DescriptorHelper;
|
| 15 |
use Symfony\Component\Console\Input\InputArgument;
|
| 16 |
-
use Symfony\Component\Console\Input\
|
| 17 |
use Symfony\Component\Console\Input\InputInterface;
|
|
|
|
| 18 |
use Symfony\Component\Console\Output\OutputInterface;
|
| 19 |
-
use Symfony\Component\Console\Input\InputDefinition;
|
| 20 |
|
| 21 |
/**
|
| 22 |
* ListCommand displays the list of all available commands for the application.
|
| 13 |
|
| 14 |
use Symfony\Component\Console\Helper\DescriptorHelper;
|
| 15 |
use Symfony\Component\Console\Input\InputArgument;
|
| 16 |
+
use Symfony\Component\Console\Input\InputDefinition;
|
| 17 |
use Symfony\Component\Console\Input\InputInterface;
|
| 18 |
+
use Symfony\Component\Console\Input\InputOption;
|
| 19 |
use Symfony\Component\Console\Output\OutputInterface;
|
|
|
|
| 20 |
|
| 21 |
/**
|
| 22 |
* ListCommand displays the list of all available commands for the application.
|
vendor/symfony/console/Command/LockableTrait.php
CHANGED
|
@@ -13,7 +13,10 @@ namespace Symfony\Component\Console\Command;
|
|
| 13 |
|
| 14 |
use Symfony\Component\Console\Exception\LogicException;
|
| 15 |
use Symfony\Component\Console\Exception\RuntimeException;
|
| 16 |
-
use Symfony\Component\
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
/**
|
| 19 |
* Basic lock feature for commands.
|
|
@@ -22,7 +25,8 @@ use Symfony\Component\Filesystem\LockHandler;
|
|
| 22 |
*/
|
| 23 |
trait LockableTrait
|
| 24 |
{
|
| 25 |
-
|
|
|
|
| 26 |
|
| 27 |
/**
|
| 28 |
* Locks a command.
|
|
@@ -31,18 +35,23 @@ trait LockableTrait
|
|
| 31 |
*/
|
| 32 |
private function lock($name = null, $blocking = false)
|
| 33 |
{
|
| 34 |
-
if (!class_exists(
|
| 35 |
-
throw new RuntimeException('To enable the locking feature you must install the symfony/
|
| 36 |
}
|
| 37 |
|
| 38 |
-
if (null !== $this->
|
| 39 |
throw new LogicException('A lock is already in place.');
|
| 40 |
}
|
| 41 |
|
| 42 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
|
| 44 |
-
|
| 45 |
-
|
|
|
|
| 46 |
|
| 47 |
return false;
|
| 48 |
}
|
|
@@ -55,9 +64,9 @@ trait LockableTrait
|
|
| 55 |
*/
|
| 56 |
private function release()
|
| 57 |
{
|
| 58 |
-
if ($this->
|
| 59 |
-
$this->
|
| 60 |
-
$this->
|
| 61 |
}
|
| 62 |
}
|
| 63 |
}
|
| 13 |
|
| 14 |
use Symfony\Component\Console\Exception\LogicException;
|
| 15 |
use Symfony\Component\Console\Exception\RuntimeException;
|
| 16 |
+
use Symfony\Component\Lock\Factory;
|
| 17 |
+
use Symfony\Component\Lock\Lock;
|
| 18 |
+
use Symfony\Component\Lock\Store\FlockStore;
|
| 19 |
+
use Symfony\Component\Lock\Store\SemaphoreStore;
|
| 20 |
|
| 21 |
/**
|
| 22 |
* Basic lock feature for commands.
|
| 25 |
*/
|
| 26 |
trait LockableTrait
|
| 27 |
{
|
| 28 |
+
/** @var Lock */
|
| 29 |
+
private $lock;
|
| 30 |
|
| 31 |
/**
|
| 32 |
* Locks a command.
|
| 35 |
*/
|
| 36 |
private function lock($name = null, $blocking = false)
|
| 37 |
{
|
| 38 |
+
if (!class_exists(SemaphoreStore::class)) {
|
| 39 |
+
throw new RuntimeException('To enable the locking feature you must install the symfony/lock component.');
|
| 40 |
}
|
| 41 |
|
| 42 |
+
if (null !== $this->lock) {
|
| 43 |
throw new LogicException('A lock is already in place.');
|
| 44 |
}
|
| 45 |
|
| 46 |
+
if (SemaphoreStore::isSupported($blocking)) {
|
| 47 |
+
$store = new SemaphoreStore();
|
| 48 |
+
} else {
|
| 49 |
+
$store = new FlockStore();
|
| 50 |
+
}
|
| 51 |
|
| 52 |
+
$this->lock = (new Factory($store))->createLock($name ?: $this->getName());
|
| 53 |
+
if (!$this->lock->acquire($blocking)) {
|
| 54 |
+
$this->lock = null;
|
| 55 |
|
| 56 |
return false;
|
| 57 |
}
|
| 64 |
*/
|
| 65 |
private function release()
|
| 66 |
{
|
| 67 |
+
if ($this->lock) {
|
| 68 |
+
$this->lock->release();
|
| 69 |
+
$this->lock = null;
|
| 70 |
}
|
| 71 |
}
|
| 72 |
}
|
vendor/symfony/console/CommandLoader/CommandLoaderInterface.php
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
namespace Symfony\Component\Console\CommandLoader;
|
| 4 |
+
|
| 5 |
+
use Symfony\Component\Console\Command\Command;
|
| 6 |
+
use Symfony\Component\Console\Exception\CommandNotFoundException;
|
| 7 |
+
|
| 8 |
+
/**
|
| 9 |
+
* @author Robin Chalas <robin.chalas@gmail.com>
|
| 10 |
+
*/
|
| 11 |
+
interface CommandLoaderInterface
|
| 12 |
+
{
|
| 13 |
+
/**
|
| 14 |
+
* Loads a command.
|
| 15 |
+
*
|
| 16 |
+
* @param string $name
|
| 17 |
+
*
|
| 18 |
+
* @return Command
|
| 19 |
+
*
|
| 20 |
+
* @throws CommandNotFoundException
|
| 21 |
+
*/
|
| 22 |
+
public function get($name);
|
| 23 |
+
|
| 24 |
+
/**
|
| 25 |
+
* Checks if a command exists.
|
| 26 |
+
*
|
| 27 |
+
* @param string $name
|
| 28 |
+
*
|
| 29 |
+
* @return bool
|
| 30 |
+
*/
|
| 31 |
+
public function has($name);
|
| 32 |
+
|
| 33 |
+
/**
|
| 34 |
+
* @return string[] All registered command names
|
| 35 |
+
*/
|
| 36 |
+
public function getNames();
|
| 37 |
+
}
|
vendor/symfony/console/CommandLoader/ContainerCommandLoader.php
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
namespace Symfony\Component\Console\CommandLoader;
|
| 4 |
+
|
| 5 |
+
use Psr\Container\ContainerInterface;
|
| 6 |
+
use Symfony\Component\Console\Exception\CommandNotFoundException;
|
| 7 |
+
|
| 8 |
+
/**
|
| 9 |
+
* Loads commands from a PSR-11 container.
|
| 10 |
+
*
|
| 11 |
+
* @author Robin Chalas <robin.chalas@gmail.com>
|
| 12 |
+
*/
|
| 13 |
+
class ContainerCommandLoader implements CommandLoaderInterface
|
| 14 |
+
{
|
| 15 |
+
private $container;
|
| 16 |
+
private $commandMap;
|
| 17 |
+
|
| 18 |
+
/**
|
| 19 |
+
* @param ContainerInterface $container A container from which to load command services
|
| 20 |
+
* @param array $commandMap An array with command names as keys and service ids as values
|
| 21 |
+
*/
|
| 22 |
+
public function __construct(ContainerInterface $container, array $commandMap)
|
| 23 |
+
{
|
| 24 |
+
$this->container = $container;
|
| 25 |
+
$this->commandMap = $commandMap;
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
/**
|
| 29 |
+
* {@inheritdoc}
|
| 30 |
+
*/
|
| 31 |
+
public function get($name)
|
| 32 |
+
{
|
| 33 |
+
if (!$this->has($name)) {
|
| 34 |
+
throw new CommandNotFoundException(sprintf('Command "%s" does not exist.', $name));
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
return $this->container->get($this->commandMap[$name]);
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
/**
|
| 41 |
+
* {@inheritdoc}
|
| 42 |
+
*/
|
| 43 |
+
public function has($name)
|
| 44 |
+
{
|
| 45 |
+
return isset($this->commandMap[$name]) && $this->container->has($this->commandMap[$name]);
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
/**
|
| 49 |
+
* {@inheritdoc}
|
| 50 |
+
*/
|
| 51 |
+
public function getNames()
|
| 52 |
+
{
|
| 53 |
+
return array_keys($this->commandMap);
|
| 54 |
+
}
|
| 55 |
+
}
|
vendor/symfony/console/CommandLoader/FactoryCommandLoader.php
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
/*
|
| 4 |
+
* This file is part of the Symfony package.
|
| 5 |
+
*
|
| 6 |
+
* (c) Fabien Potencier <fabien@symfony.com>
|
| 7 |
+
*
|
| 8 |
+
* For the full copyright and license information, please view the LICENSE
|
| 9 |
+
* file that was distributed with this source code.
|
| 10 |
+
*/
|
| 11 |
+
|
| 12 |
+
namespace Symfony\Component\Console\CommandLoader;
|
| 13 |
+
|
| 14 |
+
use Symfony\Component\Console\Exception\CommandNotFoundException;
|
| 15 |
+
|
| 16 |
+
/**
|
| 17 |
+
* A simple command loader using factories to instantiate commands lazily.
|
| 18 |
+
*
|
| 19 |
+
* @author Maxime Steinhausser <maxime.steinhausser@gmail.com>
|
| 20 |
+
*/
|
| 21 |
+
class FactoryCommandLoader implements CommandLoaderInterface
|
| 22 |
+
{
|
| 23 |
+
private $factories;
|
| 24 |
+
|
| 25 |
+
/**
|
| 26 |
+
* @param callable[] $factories Indexed by command names
|
| 27 |
+
*/
|
| 28 |
+
public function __construct(array $factories)
|
| 29 |
+
{
|
| 30 |
+
$this->factories = $factories;
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
/**
|
| 34 |
+
* {@inheritdoc}
|
| 35 |
+
*/
|
| 36 |
+
public function has($name)
|
| 37 |
+
{
|
| 38 |
+
return isset($this->factories[$name]);
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
/**
|
| 42 |
+
* {@inheritdoc}
|
| 43 |
+
*/
|
| 44 |
+
public function get($name)
|
| 45 |
+
{
|
| 46 |
+
if (!isset($this->factories[$name])) {
|
| 47 |
+
throw new CommandNotFoundException(sprintf('Command "%s" does not exist.', $name));
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
$factory = $this->factories[$name];
|
| 51 |
+
|
| 52 |
+
return $factory();
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
/**
|
| 56 |
+
* {@inheritdoc}
|
| 57 |
+
*/
|
| 58 |
+
public function getNames()
|
| 59 |
+
{
|
| 60 |
+
return array_keys($this->factories);
|
| 61 |
+
}
|
| 62 |
+
}
|
vendor/{sensiolabs/security-checker/SensioLabs/Security/Crawler → symfony/console/CommandLoader}/index.php
RENAMED
|
File without changes
|
vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php
CHANGED
|
@@ -12,9 +12,12 @@
|
|
| 12 |
namespace Symfony\Component\Console\DependencyInjection;
|
| 13 |
|
| 14 |
use Symfony\Component\Console\Command\Command;
|
|
|
|
| 15 |
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
|
|
|
|
| 16 |
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
| 17 |
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
|
|
|
| 18 |
|
| 19 |
/**
|
| 20 |
* Registers console commands.
|
|
@@ -23,34 +26,81 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
|
| 23 |
*/
|
| 24 |
class AddConsoleCommandPass implements CompilerPassInterface
|
| 25 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
public function process(ContainerBuilder $container)
|
| 27 |
{
|
| 28 |
-
$commandServices = $container->findTaggedServiceIds(
|
|
|
|
|
|
|
| 29 |
$serviceIds = array();
|
|
|
|
| 30 |
|
| 31 |
foreach ($commandServices as $id => $tags) {
|
| 32 |
$definition = $container->getDefinition($id);
|
| 33 |
$class = $container->getParameterBag()->resolveValue($definition->getClass());
|
| 34 |
|
| 35 |
-
if (!$r = $container->getReflectionClass($class)) {
|
| 36 |
-
throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id));
|
| 37 |
-
}
|
| 38 |
-
if (!$r->isSubclassOf(Command::class)) {
|
| 39 |
-
throw new InvalidArgumentException(sprintf('The service "%s" tagged "console.command" must be a subclass of "%s".', $id, Command::class));
|
| 40 |
-
}
|
| 41 |
-
|
| 42 |
$commandId = 'console.command.'.strtolower(str_replace('\\', '_', $class));
|
| 43 |
-
|
| 44 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
}
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
}
|
| 50 |
|
| 51 |
$serviceIds[$commandId] = $id;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
}
|
| 53 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
$container->setParameter('console.command.ids', $serviceIds);
|
|
|
|
| 55 |
}
|
| 56 |
}
|
| 12 |
namespace Symfony\Component\Console\DependencyInjection;
|
| 13 |
|
| 14 |
use Symfony\Component\Console\Command\Command;
|
| 15 |
+
use Symfony\Component\Console\CommandLoader\ContainerCommandLoader;
|
| 16 |
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
|
| 17 |
+
use Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass;
|
| 18 |
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
| 19 |
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
| 20 |
+
use Symfony\Component\DependencyInjection\TypedReference;
|
| 21 |
|
| 22 |
/**
|
| 23 |
* Registers console commands.
|
| 26 |
*/
|
| 27 |
class AddConsoleCommandPass implements CompilerPassInterface
|
| 28 |
{
|
| 29 |
+
private $commandLoaderServiceId;
|
| 30 |
+
private $commandTag;
|
| 31 |
+
|
| 32 |
+
public function __construct($commandLoaderServiceId = 'console.command_loader', $commandTag = 'console.command')
|
| 33 |
+
{
|
| 34 |
+
$this->commandLoaderServiceId = $commandLoaderServiceId;
|
| 35 |
+
$this->commandTag = $commandTag;
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
public function process(ContainerBuilder $container)
|
| 39 |
{
|
| 40 |
+
$commandServices = $container->findTaggedServiceIds($this->commandTag, true);
|
| 41 |
+
$lazyCommandMap = array();
|
| 42 |
+
$lazyCommandRefs = array();
|
| 43 |
$serviceIds = array();
|
| 44 |
+
$lazyServiceIds = array();
|
| 45 |
|
| 46 |
foreach ($commandServices as $id => $tags) {
|
| 47 |
$definition = $container->getDefinition($id);
|
| 48 |
$class = $container->getParameterBag()->resolveValue($definition->getClass());
|
| 49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
$commandId = 'console.command.'.strtolower(str_replace('\\', '_', $class));
|
| 51 |
+
|
| 52 |
+
if (isset($tags[0]['command'])) {
|
| 53 |
+
$commandName = $tags[0]['command'];
|
| 54 |
+
} else {
|
| 55 |
+
if (!$r = $container->getReflectionClass($class)) {
|
| 56 |
+
throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id));
|
| 57 |
+
}
|
| 58 |
+
if (!$r->isSubclassOf(Command::class)) {
|
| 59 |
+
throw new InvalidArgumentException(sprintf('The service "%s" tagged "%s" must be a subclass of "%s".', $id, $this->commandTag, Command::class));
|
| 60 |
+
}
|
| 61 |
+
$commandName = $class::getDefaultName();
|
| 62 |
}
|
| 63 |
+
|
| 64 |
+
if (null === $commandName) {
|
| 65 |
+
if (isset($serviceIds[$commandId]) || $container->hasAlias($commandId)) {
|
| 66 |
+
$commandId = $commandId.'_'.$id;
|
| 67 |
+
}
|
| 68 |
+
if (!$definition->isPublic() || $definition->isPrivate()) {
|
| 69 |
+
$container->setAlias($commandId, $id)->setPublic(true);
|
| 70 |
+
$id = $commandId;
|
| 71 |
+
}
|
| 72 |
+
$serviceIds[$commandId] = $id;
|
| 73 |
+
|
| 74 |
+
continue;
|
| 75 |
}
|
| 76 |
|
| 77 |
$serviceIds[$commandId] = $id;
|
| 78 |
+
$lazyServiceIds[$id] = true;
|
| 79 |
+
unset($tags[0]);
|
| 80 |
+
$lazyCommandMap[$commandName] = $id;
|
| 81 |
+
$lazyCommandRefs[$id] = new TypedReference($id, $class);
|
| 82 |
+
$aliases = array();
|
| 83 |
+
|
| 84 |
+
foreach ($tags as $tag) {
|
| 85 |
+
if (isset($tag['command'])) {
|
| 86 |
+
$aliases[] = $tag['command'];
|
| 87 |
+
$lazyCommandMap[$tag['command']] = $id;
|
| 88 |
+
}
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
$definition->addMethodCall('setName', array($commandName));
|
| 92 |
+
|
| 93 |
+
if ($aliases) {
|
| 94 |
+
$definition->addMethodCall('setAliases', array($aliases));
|
| 95 |
+
}
|
| 96 |
}
|
| 97 |
|
| 98 |
+
$container
|
| 99 |
+
->register($this->commandLoaderServiceId, ContainerCommandLoader::class)
|
| 100 |
+
->setPublic(true)
|
| 101 |
+
->setArguments(array(ServiceLocatorTagPass::register($container, $lazyCommandRefs), $lazyCommandMap));
|
| 102 |
+
|
| 103 |
$container->setParameter('console.command.ids', $serviceIds);
|
| 104 |
+
$container->setParameter('console.lazy_command.ids', $lazyServiceIds);
|
| 105 |
}
|
| 106 |
}
|
vendor/symfony/console/Descriptor/Descriptor.php
CHANGED
|
@@ -13,11 +13,11 @@ namespace Symfony\Component\Console\Descriptor;
|
|
| 13 |
|
| 14 |
use Symfony\Component\Console\Application;
|
| 15 |
use Symfony\Component\Console\Command\Command;
|
|
|
|
| 16 |
use Symfony\Component\Console\Input\InputArgument;
|
| 17 |
use Symfony\Component\Console\Input\InputDefinition;
|
| 18 |
use Symfony\Component\Console\Input\InputOption;
|
| 19 |
use Symfony\Component\Console\Output\OutputInterface;
|
| 20 |
-
use Symfony\Component\Console\Exception\InvalidArgumentException;
|
| 21 |
|
| 22 |
/**
|
| 23 |
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
|
|
@@ -55,7 +55,7 @@ abstract class Descriptor implements DescriptorInterface
|
|
| 55 |
$this->describeApplication($object, $options);
|
| 56 |
break;
|
| 57 |
default:
|
| 58 |
-
throw new InvalidArgumentException(sprintf('Object of type "%s" is not describable.', get_class($object)));
|
| 59 |
}
|
| 60 |
}
|
| 61 |
|
| 13 |
|
| 14 |
use Symfony\Component\Console\Application;
|
| 15 |
use Symfony\Component\Console\Command\Command;
|
| 16 |
+
use Symfony\Component\Console\Exception\InvalidArgumentException;
|
| 17 |
use Symfony\Component\Console\Input\InputArgument;
|
| 18 |
use Symfony\Component\Console\Input\InputDefinition;
|
| 19 |
use Symfony\Component\Console\Input\InputOption;
|
| 20 |
use Symfony\Component\Console\Output\OutputInterface;
|
|
|
|
| 21 |
|
| 22 |
/**
|
| 23 |
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
|
| 55 |
$this->describeApplication($object, $options);
|
| 56 |
break;
|
| 57 |
default:
|
| 58 |
+
throw new InvalidArgumentException(sprintf('Object of type "%s" is not describable.', \get_class($object)));
|
| 59 |
}
|
| 60 |
}
|
| 61 |
|
vendor/symfony/console/Descriptor/DescriptorInterface.php
CHANGED
|
@@ -21,7 +21,7 @@ use Symfony\Component\Console\Output\OutputInterface;
|
|
| 21 |
interface DescriptorInterface
|
| 22 |
{
|
| 23 |
/**
|
| 24 |
-
* Describes an
|
| 25 |
*
|
| 26 |
* @param OutputInterface $output
|
| 27 |
* @param object $object
|
| 21 |
interface DescriptorInterface
|
| 22 |
{
|
| 23 |
/**
|
| 24 |
+
* Describes an object if supported.
|
| 25 |
*
|
| 26 |
* @param OutputInterface $output
|
| 27 |
* @param object $object
|
vendor/symfony/console/Descriptor/JsonDescriptor.php
CHANGED
|
@@ -121,7 +121,7 @@ class JsonDescriptor extends Descriptor
|
|
| 121 |
{
|
| 122 |
return array(
|
| 123 |
'name' => '--'.$option->getName(),
|
| 124 |
-
'shortcut' => $option->getShortcut() ? '-'.
|
| 125 |
'accept_value' => $option->acceptValue(),
|
| 126 |
'is_value_required' => $option->isValueRequired(),
|
| 127 |
'is_multiple' => $option->isArray(),
|
| 121 |
{
|
| 122 |
return array(
|
| 123 |
'name' => '--'.$option->getName(),
|
| 124 |
+
'shortcut' => $option->getShortcut() ? '-'.str_replace('|', '|-', $option->getShortcut()) : '',
|
| 125 |
'accept_value' => $option->acceptValue(),
|
| 126 |
'is_value_required' => $option->isValueRequired(),
|
| 127 |
'is_multiple' => $option->isArray(),
|
vendor/symfony/console/Descriptor/MarkdownDescriptor.php
CHANGED
|
@@ -70,7 +70,7 @@ class MarkdownDescriptor extends Descriptor
|
|
| 70 |
{
|
| 71 |
$name = '--'.$option->getName();
|
| 72 |
if ($option->getShortcut()) {
|
| 73 |
-
$name .= '|-'.
|
| 74 |
}
|
| 75 |
|
| 76 |
$this->write(
|
|
@@ -88,7 +88,7 @@ class MarkdownDescriptor extends Descriptor
|
|
| 88 |
*/
|
| 89 |
protected function describeInputDefinition(InputDefinition $definition, array $options = array())
|
| 90 |
{
|
| 91 |
-
if ($showArguments = count($definition->getArguments()) > 0) {
|
| 92 |
$this->write('### Arguments');
|
| 93 |
foreach ($definition->getArguments() as $argument) {
|
| 94 |
$this->write("\n\n");
|
|
@@ -96,7 +96,7 @@ class MarkdownDescriptor extends Descriptor
|
|
| 96 |
}
|
| 97 |
}
|
| 98 |
|
| 99 |
-
if (count($definition->getOptions()) > 0) {
|
| 100 |
if ($showArguments) {
|
| 101 |
$this->write("\n\n");
|
| 102 |
}
|
| 70 |
{
|
| 71 |
$name = '--'.$option->getName();
|
| 72 |
if ($option->getShortcut()) {
|
| 73 |
+
$name .= '|-'.str_replace('|', '|-', $option->getShortcut()).'';
|
| 74 |
}
|
| 75 |
|
| 76 |
$this->write(
|
| 88 |
*/
|
| 89 |
protected function describeInputDefinition(InputDefinition $definition, array $options = array())
|
| 90 |
{
|
| 91 |
+
if ($showArguments = \count($definition->getArguments()) > 0) {
|
| 92 |
$this->write('### Arguments');
|
| 93 |
foreach ($definition->getArguments() as $argument) {
|
| 94 |
$this->write("\n\n");
|
| 96 |
}
|
| 97 |
}
|
| 98 |
|
| 99 |
+
if (\count($definition->getOptions()) > 0) {
|
| 100 |
if ($showArguments) {
|
| 101 |
$this->write("\n\n");
|
| 102 |
}
|
vendor/symfony/console/Descriptor/TextDescriptor.php
CHANGED
|
@@ -33,14 +33,14 @@ class TextDescriptor extends Descriptor
|
|
| 33 |
*/
|
| 34 |
protected function describeInputArgument(InputArgument $argument, array $options = array())
|
| 35 |
{
|
| 36 |
-
if (null !== $argument->getDefault() && (
|
| 37 |
$default = sprintf('<comment> [default: %s]</comment>', $this->formatDefaultValue($argument->getDefault()));
|
| 38 |
} else {
|
| 39 |
$default = '';
|
| 40 |
}
|
| 41 |
|
| 42 |
$totalWidth = isset($options['total_width']) ? $options['total_width'] : Helper::strlen($argument->getName());
|
| 43 |
-
$spacingWidth = $totalWidth - strlen($argument->getName());
|
| 44 |
|
| 45 |
$this->writeText(sprintf(' <info>%s</info> %s%s%s',
|
| 46 |
$argument->getName(),
|
|
@@ -56,7 +56,7 @@ class TextDescriptor extends Descriptor
|
|
| 56 |
*/
|
| 57 |
protected function describeInputOption(InputOption $option, array $options = array())
|
| 58 |
{
|
| 59 |
-
if ($option->acceptValue() && null !== $option->getDefault() && (
|
| 60 |
$default = sprintf('<comment> [default: %s]</comment>', $this->formatDefaultValue($option->getDefault()));
|
| 61 |
} else {
|
| 62 |
$default = '';
|
|
@@ -117,7 +117,7 @@ class TextDescriptor extends Descriptor
|
|
| 117 |
|
| 118 |
$this->writeText('<comment>Options:</comment>', $options);
|
| 119 |
foreach ($definition->getOptions() as $option) {
|
| 120 |
-
if (strlen($option->getShortcut()) > 1) {
|
| 121 |
$laterOptions[] = $option;
|
| 122 |
continue;
|
| 123 |
}
|
|
@@ -202,7 +202,7 @@ class TextDescriptor extends Descriptor
|
|
| 202 |
}
|
| 203 |
|
| 204 |
// calculate max. width based on available commands per namespace
|
| 205 |
-
$width = $this->getColumnWidth(call_user_func_array('array_merge', array_map(function ($namespace) use ($commands) {
|
| 206 |
return array_intersect($namespace['commands'], array_keys($commands));
|
| 207 |
}, $namespaces)));
|
| 208 |
|
|
@@ -280,11 +280,11 @@ class TextDescriptor extends Descriptor
|
|
| 280 |
return 'INF';
|
| 281 |
}
|
| 282 |
|
| 283 |
-
if (is_string($default)) {
|
| 284 |
$default = OutputFormatter::escape($default);
|
| 285 |
-
} elseif (is_array($default)) {
|
| 286 |
foreach ($default as $key => $value) {
|
| 287 |
-
if (is_string($value)) {
|
| 288 |
$default[$key] = OutputFormatter::escape($value);
|
| 289 |
}
|
| 290 |
}
|
| 33 |
*/
|
| 34 |
protected function describeInputArgument(InputArgument $argument, array $options = array())
|
| 35 |
{
|
| 36 |
+
if (null !== $argument->getDefault() && (!\is_array($argument->getDefault()) || \count($argument->getDefault()))) {
|
| 37 |
$default = sprintf('<comment> [default: %s]</comment>', $this->formatDefaultValue($argument->getDefault()));
|
| 38 |
} else {
|
| 39 |
$default = '';
|
| 40 |
}
|
| 41 |
|
| 42 |
$totalWidth = isset($options['total_width']) ? $options['total_width'] : Helper::strlen($argument->getName());
|
| 43 |
+
$spacingWidth = $totalWidth - \strlen($argument->getName());
|
| 44 |
|
| 45 |
$this->writeText(sprintf(' <info>%s</info> %s%s%s',
|
| 46 |
$argument->getName(),
|
| 56 |
*/
|
| 57 |
protected function describeInputOption(InputOption $option, array $options = array())
|
| 58 |
{
|
| 59 |
+
if ($option->acceptValue() && null !== $option->getDefault() && (!\is_array($option->getDefault()) || \count($option->getDefault()))) {
|
| 60 |
$default = sprintf('<comment> [default: %s]</comment>', $this->formatDefaultValue($option->getDefault()));
|
| 61 |
} else {
|
| 62 |
$default = '';
|
| 117 |
|
| 118 |
$this->writeText('<comment>Options:</comment>', $options);
|
| 119 |
foreach ($definition->getOptions() as $option) {
|
| 120 |
+
if (\strlen($option->getShortcut()) > 1) {
|
| 121 |
$laterOptions[] = $option;
|
| 122 |
continue;
|
| 123 |
}
|
| 202 |
}
|
| 203 |
|
| 204 |
// calculate max. width based on available commands per namespace
|
| 205 |
+
$width = $this->getColumnWidth(\call_user_func_array('array_merge', array_map(function ($namespace) use ($commands) {
|
| 206 |
return array_intersect($namespace['commands'], array_keys($commands));
|
| 207 |
}, $namespaces)));
|
| 208 |
|
| 280 |
return 'INF';
|
| 281 |
}
|
| 282 |
|
| 283 |
+
if (\is_string($default)) {
|
| 284 |
$default = OutputFormatter::escape($default);
|
| 285 |
+
} elseif (\is_array($default)) {
|
| 286 |
foreach ($default as $key => $value) {
|
| 287 |
+
if (\is_string($value)) {
|
| 288 |
$default[$key] = OutputFormatter::escape($value);
|
| 289 |
}
|
| 290 |
}
|
vendor/symfony/console/Descriptor/XmlDescriptor.php
CHANGED
|
@@ -203,7 +203,7 @@ class XmlDescriptor extends Descriptor
|
|
| 203 |
$descriptionXML->appendChild($dom->createTextNode($argument->getDescription()));
|
| 204 |
|
| 205 |
$objectXML->appendChild($defaultsXML = $dom->createElement('defaults'));
|
| 206 |
-
$defaults = is_array($argument->getDefault()) ? $argument->getDefault() : (is_bool($argument->getDefault()) ? array(var_export($argument->getDefault(), true)) : ($argument->getDefault() ? array($argument->getDefault()) : array()));
|
| 207 |
foreach ($defaults as $default) {
|
| 208 |
$defaultsXML->appendChild($defaultXML = $dom->createElement('default'));
|
| 209 |
$defaultXML->appendChild($dom->createTextNode($default));
|
|
@@ -224,7 +224,7 @@ class XmlDescriptor extends Descriptor
|
|
| 224 |
$pos = strpos($option->getShortcut(), '|');
|
| 225 |
if (false !== $pos) {
|
| 226 |
$objectXML->setAttribute('shortcut', '-'.substr($option->getShortcut(), 0, $pos));
|
| 227 |
-
$objectXML->setAttribute('shortcuts', '-'.
|
| 228 |
} else {
|
| 229 |
$objectXML->setAttribute('shortcut', $option->getShortcut() ? '-'.$option->getShortcut() : '');
|
| 230 |
}
|
|
@@ -235,7 +235,7 @@ class XmlDescriptor extends Descriptor
|
|
| 235 |
$descriptionXML->appendChild($dom->createTextNode($option->getDescription()));
|
| 236 |
|
| 237 |
if ($option->acceptValue()) {
|
| 238 |
-
$defaults = is_array($option->getDefault()) ? $option->getDefault() : (is_bool($option->getDefault()) ? array(var_export($option->getDefault(), true)) : ($option->getDefault() ? array($option->getDefault()) : array()));
|
| 239 |
$objectXML->appendChild($defaultsXML = $dom->createElement('defaults'));
|
| 240 |
|
| 241 |
if (!empty($defaults)) {
|
| 203 |
$descriptionXML->appendChild($dom->createTextNode($argument->getDescription()));
|
| 204 |
|
| 205 |
$objectXML->appendChild($defaultsXML = $dom->createElement('defaults'));
|
| 206 |
+
$defaults = \is_array($argument->getDefault()) ? $argument->getDefault() : (\is_bool($argument->getDefault()) ? array(var_export($argument->getDefault(), true)) : ($argument->getDefault() ? array($argument->getDefault()) : array()));
|
| 207 |
foreach ($defaults as $default) {
|
| 208 |
$defaultsXML->appendChild($defaultXML = $dom->createElement('default'));
|
| 209 |
$defaultXML->appendChild($dom->createTextNode($default));
|
| 224 |
$pos = strpos($option->getShortcut(), '|');
|
| 225 |
if (false !== $pos) {
|
| 226 |
$objectXML->setAttribute('shortcut', '-'.substr($option->getShortcut(), 0, $pos));
|
| 227 |
+
$objectXML->setAttribute('shortcuts', '-'.str_replace('|', '|-', $option->getShortcut()));
|
| 228 |
} else {
|
| 229 |
$objectXML->setAttribute('shortcut', $option->getShortcut() ? '-'.$option->getShortcut() : '');
|
| 230 |
}
|
| 235 |
$descriptionXML->appendChild($dom->createTextNode($option->getDescription()));
|
| 236 |
|
| 237 |
if ($option->acceptValue()) {
|
| 238 |
+
$defaults = \is_array($option->getDefault()) ? $option->getDefault() : (\is_bool($option->getDefault()) ? array(var_export($option->getDefault(), true)) : ($option->getDefault() ? array($option->getDefault()) : array()));
|
| 239 |
$objectXML->appendChild($defaultsXML = $dom->createElement('defaults'));
|
| 240 |
|
| 241 |
if (!empty($defaults)) {
|
vendor/symfony/console/Event/ConsoleErrorEvent.php
CHANGED
|
@@ -51,7 +51,7 @@ final class ConsoleErrorEvent extends ConsoleEvent
|
|
| 51 |
public function setError($error)
|
| 52 |
{
|
| 53 |
if (!$error instanceof \Throwable && !$error instanceof \Exception) {
|
| 54 |
-
throw new InvalidArgumentException(sprintf('The error passed to ConsoleErrorEvent must be an instance of \Throwable or \Exception, "%s" was passed instead.', is_object($error) ? get_class($error) : gettype($error)));
|
| 55 |
}
|
| 56 |
|
| 57 |
$this->error = $error;
|
|
@@ -78,6 +78,6 @@ final class ConsoleErrorEvent extends ConsoleEvent
|
|
| 78 |
*/
|
| 79 |
public function getExitCode()
|
| 80 |
{
|
| 81 |
-
return null !== $this->exitCode ? $this->exitCode : (is_int($this->error->getCode()) && 0 !== $this->error->getCode() ? $this->error->getCode() : 1);
|
| 82 |
}
|
| 83 |
}
|
| 51 |
public function setError($error)
|
| 52 |
{
|
| 53 |
if (!$error instanceof \Throwable && !$error instanceof \Exception) {
|
| 54 |
+
throw new InvalidArgumentException(sprintf('The error passed to ConsoleErrorEvent must be an instance of \Throwable or \Exception, "%s" was passed instead.', \is_object($error) ? \get_class($error) : \gettype($error)));
|
| 55 |
}
|
| 56 |
|
| 57 |
$this->error = $error;
|
| 78 |
*/
|
| 79 |
public function getExitCode()
|
| 80 |
{
|
| 81 |
+
return null !== $this->exitCode ? $this->exitCode : (\is_int($this->error->getCode()) && 0 !== $this->error->getCode() ? $this->error->getCode() : 1);
|
| 82 |
}
|
| 83 |
}
|
vendor/symfony/console/EventListener/ErrorListener.php
CHANGED
|
@@ -40,10 +40,10 @@ class ErrorListener implements EventSubscriberInterface
|
|
| 40 |
$error = $event->getError();
|
| 41 |
|
| 42 |
if (!$inputString = $this->getInputString($event)) {
|
| 43 |
-
return $this->logger->error('An error occurred while using the console. Message: "{message}"', array('
|
| 44 |
}
|
| 45 |
|
| 46 |
-
$this->logger->error('Error thrown while running command "{command}". Message: "{message}"', array('
|
| 47 |
}
|
| 48 |
|
| 49 |
public function onConsoleTerminate(ConsoleTerminateEvent $event)
|
| 40 |
$error = $event->getError();
|
| 41 |
|
| 42 |
if (!$inputString = $this->getInputString($event)) {
|
| 43 |
+
return $this->logger->error('An error occurred while using the console. Message: "{message}"', array('exception' => $error, 'message' => $error->getMessage()));
|
| 44 |
}
|
| 45 |
|
| 46 |
+
$this->logger->error('Error thrown while running command "{command}". Message: "{message}"', array('exception' => $error, 'command' => $inputString, 'message' => $error->getMessage()));
|
| 47 |
}
|
| 48 |
|
| 49 |
public function onConsoleTerminate(ConsoleTerminateEvent $event)
|
vendor/symfony/console/Formatter/OutputFormatter.php
CHANGED
|
@@ -50,10 +50,10 @@ class OutputFormatter implements OutputFormatterInterface
|
|
| 50 |
public static function escapeTrailingBackslash($text)
|
| 51 |
{
|
| 52 |
if ('\\' === substr($text, -1)) {
|
| 53 |
-
$len = strlen($text);
|
| 54 |
$text = rtrim($text, '\\');
|
| 55 |
$text = str_replace("\0", '', $text);
|
| 56 |
-
$text .= str_repeat("\0", $len - strlen($text));
|
| 57 |
}
|
| 58 |
|
| 59 |
return $text;
|
|
@@ -145,7 +145,7 @@ class OutputFormatter implements OutputFormatterInterface
|
|
| 145 |
|
| 146 |
// add the text up to the next tag
|
| 147 |
$output .= $this->applyCurrentStyle(substr($message, $offset, $pos - $offset));
|
| 148 |
-
$offset = $pos + strlen($text);
|
| 149 |
|
| 150 |
// opening tag?
|
| 151 |
if ($open = '/' != $text[1]) {
|
|
@@ -237,6 +237,6 @@ class OutputFormatter implements OutputFormatterInterface
|
|
| 237 |
*/
|
| 238 |
private function applyCurrentStyle($text)
|
| 239 |
{
|
| 240 |
-
return $this->isDecorated() && strlen($text) > 0 ? $this->styleStack->getCurrent()->apply($text) : $text;
|
| 241 |
}
|
| 242 |
}
|
| 50 |
public static function escapeTrailingBackslash($text)
|
| 51 |
{
|
| 52 |
if ('\\' === substr($text, -1)) {
|
| 53 |
+
$len = \strlen($text);
|
| 54 |
$text = rtrim($text, '\\');
|
| 55 |
$text = str_replace("\0", '', $text);
|
| 56 |
+
$text .= str_repeat("\0", $len - \strlen($text));
|
| 57 |
}
|
| 58 |
|
| 59 |
return $text;
|
| 145 |
|
| 146 |
// add the text up to the next tag
|
| 147 |
$output .= $this->applyCurrentStyle(substr($message, $offset, $pos - $offset));
|
| 148 |
+
$offset = $pos + \strlen($text);
|
| 149 |
|
| 150 |
// opening tag?
|
| 151 |
if ($open = '/' != $text[1]) {
|
| 237 |
*/
|
| 238 |
private function applyCurrentStyle($text)
|
| 239 |
{
|
| 240 |
+
return $this->isDecorated() && \strlen($text) > 0 ? $this->styleStack->getCurrent()->apply($text) : $text;
|
| 241 |
}
|
| 242 |
}
|
vendor/symfony/console/Formatter/OutputFormatterStyle.php
CHANGED
|
@@ -69,7 +69,7 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface
|
|
| 69 |
if (null !== $background) {
|
| 70 |
$this->setBackground($background);
|
| 71 |
}
|
| 72 |
-
if (count($options)) {
|
| 73 |
$this->setOptions($options);
|
| 74 |
}
|
| 75 |
}
|
|
@@ -90,11 +90,7 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface
|
|
| 90 |
}
|
| 91 |
|
| 92 |
if (!isset(static::$availableForegroundColors[$color])) {
|
| 93 |
-
throw new InvalidArgumentException(sprintf(
|
| 94 |
-
'Invalid foreground color specified: "%s". Expected one of (%s)',
|
| 95 |
-
$color,
|
| 96 |
-
implode(', ', array_keys(static::$availableForegroundColors))
|
| 97 |
-
));
|
| 98 |
}
|
| 99 |
|
| 100 |
$this->foreground = static::$availableForegroundColors[$color];
|
|
@@ -116,11 +112,7 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface
|
|
| 116 |
}
|
| 117 |
|
| 118 |
if (!isset(static::$availableBackgroundColors[$color])) {
|
| 119 |
-
throw new InvalidArgumentException(sprintf(
|
| 120 |
-
'Invalid background color specified: "%s". Expected one of (%s)',
|
| 121 |
-
$color,
|
| 122 |
-
implode(', ', array_keys(static::$availableBackgroundColors))
|
| 123 |
-
));
|
| 124 |
}
|
| 125 |
|
| 126 |
$this->background = static::$availableBackgroundColors[$color];
|
|
@@ -136,14 +128,10 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface
|
|
| 136 |
public function setOption($option)
|
| 137 |
{
|
| 138 |
if (!isset(static::$availableOptions[$option])) {
|
| 139 |
-
throw new InvalidArgumentException(sprintf(
|
| 140 |
-
'Invalid option specified: "%s". Expected one of (%s)',
|
| 141 |
-
$option,
|
| 142 |
-
implode(', ', array_keys(static::$availableOptions))
|
| 143 |
-
));
|
| 144 |
}
|
| 145 |
|
| 146 |
-
if (
|
| 147 |
$this->options[] = static::$availableOptions[$option];
|
| 148 |
}
|
| 149 |
}
|
|
@@ -158,11 +146,7 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface
|
|
| 158 |
public function unsetOption($option)
|
| 159 |
{
|
| 160 |
if (!isset(static::$availableOptions[$option])) {
|
| 161 |
-
throw new InvalidArgumentException(sprintf(
|
| 162 |
-
'Invalid option specified: "%s". Expected one of (%s)',
|
| 163 |
-
$option,
|
| 164 |
-
implode(', ', array_keys(static::$availableOptions))
|
| 165 |
-
));
|
| 166 |
}
|
| 167 |
|
| 168 |
$pos = array_search(static::$availableOptions[$option], $this->options);
|
|
@@ -203,14 +187,14 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface
|
|
| 203 |
$setCodes[] = $this->background['set'];
|
| 204 |
$unsetCodes[] = $this->background['unset'];
|
| 205 |
}
|
| 206 |
-
if (count($this->options)) {
|
| 207 |
foreach ($this->options as $option) {
|
| 208 |
$setCodes[] = $option['set'];
|
| 209 |
$unsetCodes[] = $option['unset'];
|
| 210 |
}
|
| 211 |
}
|
| 212 |
|
| 213 |
-
if (0 === count($setCodes)) {
|
| 214 |
return $text;
|
| 215 |
}
|
| 216 |
|
| 69 |
if (null !== $background) {
|
| 70 |
$this->setBackground($background);
|
| 71 |
}
|
| 72 |
+
if (\count($options)) {
|
| 73 |
$this->setOptions($options);
|
| 74 |
}
|
| 75 |
}
|
| 90 |
}
|
| 91 |
|
| 92 |
if (!isset(static::$availableForegroundColors[$color])) {
|
| 93 |
+
throw new InvalidArgumentException(sprintf('Invalid foreground color specified: "%s". Expected one of (%s)', $color, implode(', ', array_keys(static::$availableForegroundColors))));
|
|
|
|
|
|
|
|
|
|
|
|
|
| 94 |
}
|
| 95 |
|
| 96 |
$this->foreground = static::$availableForegroundColors[$color];
|
| 112 |
}
|
| 113 |
|
| 114 |
if (!isset(static::$availableBackgroundColors[$color])) {
|
| 115 |
+
throw new InvalidArgumentException(sprintf('Invalid background color specified: "%s". Expected one of (%s)', $color, implode(', ', array_keys(static::$availableBackgroundColors))));
|
|
|
|
|
|
|
|
|
|
|
|
|
| 116 |
}
|
| 117 |
|
| 118 |
$this->background = static::$availableBackgroundColors[$color];
|
| 128 |
public function setOption($option)
|
| 129 |
{
|
| 130 |
if (!isset(static::$availableOptions[$option])) {
|
| 131 |
+
throw new InvalidArgumentException(sprintf('Invalid option specified: "%s". Expected one of (%s)', $option, implode(', ', array_keys(static::$availableOptions))));
|
|
|
|
|
|
|
|
|
|
|
|
|
| 132 |
}
|
| 133 |
|
| 134 |
+
if (!\in_array(static::$availableOptions[$option], $this->options)) {
|
| 135 |
$this->options[] = static::$availableOptions[$option];
|
| 136 |
}
|
| 137 |
}
|
| 146 |
public function unsetOption($option)
|
| 147 |
{
|
| 148 |
if (!isset(static::$availableOptions[$option])) {
|
| 149 |
+
throw new InvalidArgumentException(sprintf('Invalid option specified: "%s". Expected one of (%s)', $option, implode(', ', array_keys(static::$availableOptions))));
|
|
|
|
|
|
|
|
|
|
|
|
|
| 150 |
}
|
| 151 |
|
| 152 |
$pos = array_search(static::$availableOptions[$option], $this->options);
|
| 187 |
$setCodes[] = $this->background['set'];
|
| 188 |
$unsetCodes[] = $this->background['unset'];
|
| 189 |
}
|
| 190 |
+
if (\count($this->options)) {
|
| 191 |
foreach ($this->options as $option) {
|
| 192 |
$setCodes[] = $option['set'];
|
| 193 |
$unsetCodes[] = $option['unset'];
|
| 194 |
}
|
| 195 |
}
|
| 196 |
|
| 197 |
+
if (0 === \count($setCodes)) {
|
| 198 |
return $text;
|
| 199 |
}
|
| 200 |
|
vendor/symfony/console/Formatter/OutputFormatterStyleStack.php
CHANGED
|
@@ -66,7 +66,7 @@ class OutputFormatterStyleStack
|
|
| 66 |
|
| 67 |
foreach (array_reverse($this->styles, true) as $index => $stackedStyle) {
|
| 68 |
if ($style->apply('') === $stackedStyle->apply('')) {
|
| 69 |
-
$this->styles = array_slice($this->styles, 0, $index);
|
| 70 |
|
| 71 |
return $stackedStyle;
|
| 72 |
}
|
|
@@ -86,7 +86,7 @@ class OutputFormatterStyleStack
|
|
| 86 |
return $this->emptyStyle;
|
| 87 |
}
|
| 88 |
|
| 89 |
-
return $this->styles[count($this->styles) - 1];
|
| 90 |
}
|
| 91 |
|
| 92 |
/**
|
| 66 |
|
| 67 |
foreach (array_reverse($this->styles, true) as $index => $stackedStyle) {
|
| 68 |
if ($style->apply('') === $stackedStyle->apply('')) {
|
| 69 |
+
$this->styles = \array_slice($this->styles, 0, $index);
|
| 70 |
|
| 71 |
return $stackedStyle;
|
| 72 |
}
|
| 86 |
return $this->emptyStyle;
|
| 87 |
}
|
| 88 |
|
| 89 |
+
return $this->styles[\count($this->styles) - 1];
|
| 90 |
}
|
| 91 |
|
| 92 |
/**
|
vendor/symfony/console/Helper/DebugFormatterHelper.php
CHANGED
|
@@ -35,7 +35,7 @@ class DebugFormatterHelper extends Helper
|
|
| 35 |
*/
|
| 36 |
public function start($id, $message, $prefix = 'RUN')
|
| 37 |
{
|
| 38 |
-
$this->started[$id] = array('border' => ++$this->count % count($this->colors));
|
| 39 |
|
| 40 |
return sprintf("%s<bg=blue;fg=white> %s </> <fg=blue>%s</>\n", $this->getBorder($id), $prefix, $message);
|
| 41 |
}
|
| 35 |
*/
|
| 36 |
public function start($id, $message, $prefix = 'RUN')
|
| 37 |
{
|
| 38 |
+
$this->started[$id] = array('border' => ++$this->count % \count($this->colors));
|
| 39 |
|
| 40 |
return sprintf("%s<bg=blue;fg=white> %s </> <fg=blue>%s</>\n", $this->getBorder($id), $prefix, $message);
|
| 41 |
}
|
vendor/symfony/console/Helper/DescriptorHelper.php
CHANGED
|
@@ -16,8 +16,8 @@ use Symfony\Component\Console\Descriptor\JsonDescriptor;
|
|
| 16 |
use Symfony\Component\Console\Descriptor\MarkdownDescriptor;
|
| 17 |
use Symfony\Component\Console\Descriptor\TextDescriptor;
|
| 18 |
use Symfony\Component\Console\Descriptor\XmlDescriptor;
|
| 19 |
-
use Symfony\Component\Console\Output\OutputInterface;
|
| 20 |
use Symfony\Component\Console\Exception\InvalidArgumentException;
|
|
|
|
| 21 |
|
| 22 |
/**
|
| 23 |
* This class adds helper method to describe objects in various formats.
|
| 16 |
use Symfony\Component\Console\Descriptor\MarkdownDescriptor;
|
| 17 |
use Symfony\Component\Console\Descriptor\TextDescriptor;
|
| 18 |
use Symfony\Component\Console\Descriptor\XmlDescriptor;
|
|
|
|
| 19 |
use Symfony\Component\Console\Exception\InvalidArgumentException;
|
| 20 |
+
use Symfony\Component\Console\Output\OutputInterface;
|
| 21 |
|
| 22 |
/**
|
| 23 |
* This class adds helper method to describe objects in various formats.
|
vendor/symfony/console/Helper/FormatterHelper.php
CHANGED
|
@@ -45,7 +45,7 @@ class FormatterHelper extends Helper
|
|
| 45 |
*/
|
| 46 |
public function formatBlock($messages, $style, $large = false)
|
| 47 |
{
|
| 48 |
-
if (
|
| 49 |
$messages = array($messages);
|
| 50 |
}
|
| 51 |
|
| 45 |
*/
|
| 46 |
public function formatBlock($messages, $style, $large = false)
|
| 47 |
{
|
| 48 |
+
if (!\is_array($messages)) {
|
| 49 |
$messages = array($messages);
|
| 50 |
}
|
| 51 |
|
vendor/symfony/console/Helper/Helper.php
CHANGED
|
@@ -48,7 +48,7 @@ abstract class Helper implements HelperInterface
|
|
| 48 |
public static function strlen($string)
|
| 49 |
{
|
| 50 |
if (false === $encoding = mb_detect_encoding($string, null, true)) {
|
| 51 |
-
return strlen($string);
|
| 52 |
}
|
| 53 |
|
| 54 |
return mb_strwidth($string, $encoding);
|
|
@@ -89,9 +89,9 @@ abstract class Helper implements HelperInterface
|
|
| 89 |
foreach ($timeFormats as $index => $format) {
|
| 90 |
if ($secs >= $format[0]) {
|
| 91 |
if ((isset($timeFormats[$index + 1]) && $secs < $timeFormats[$index + 1][0])
|
| 92 |
-
|| $index == count($timeFormats) - 1
|
| 93 |
) {
|
| 94 |
-
if (2 == count($format)) {
|
| 95 |
return $format[1];
|
| 96 |
}
|
| 97 |
|
| 48 |
public static function strlen($string)
|
| 49 |
{
|
| 50 |
if (false === $encoding = mb_detect_encoding($string, null, true)) {
|
| 51 |
+
return \strlen($string);
|
| 52 |
}
|
| 53 |
|
| 54 |
return mb_strwidth($string, $encoding);
|
| 89 |
foreach ($timeFormats as $index => $format) {
|
| 90 |
if ($secs >= $format[0]) {
|
| 91 |
if ((isset($timeFormats[$index + 1]) && $secs < $timeFormats[$index + 1][0])
|
| 92 |
+
|| $index == \count($timeFormats) - 1
|
| 93 |
) {
|
| 94 |
+
if (2 == \count($format)) {
|
| 95 |
return $format[1];
|
| 96 |
}
|
| 97 |
|
vendor/symfony/console/Helper/HelperSet.php
CHANGED
|
@@ -33,7 +33,7 @@ class HelperSet implements \IteratorAggregate
|
|
| 33 |
public function __construct(array $helpers = array())
|
| 34 |
{
|
| 35 |
foreach ($helpers as $alias => $helper) {
|
| 36 |
-
$this->set($helper, is_int($alias) ? null : $alias);
|
| 37 |
}
|
| 38 |
}
|
| 39 |
|
| 33 |
public function __construct(array $helpers = array())
|
| 34 |
{
|
| 35 |
foreach ($helpers as $alias => $helper) {
|
| 36 |
+
$this->set($helper, \is_int($alias) ? null : $alias);
|
| 37 |
}
|
| 38 |
}
|
| 39 |
|
vendor/symfony/console/Helper/InputAwareHelper.php
CHANGED
|
@@ -11,8 +11,8 @@
|
|
| 11 |
|
| 12 |
namespace Symfony\Component\Console\Helper;
|
| 13 |
|
| 14 |
-
use Symfony\Component\Console\Input\InputInterface;
|
| 15 |
use Symfony\Component\Console\Input\InputAwareInterface;
|
|
|
|
| 16 |
|
| 17 |
/**
|
| 18 |
* An implementation of InputAwareInterface for Helpers.
|
| 11 |
|
| 12 |
namespace Symfony\Component\Console\Helper;
|
| 13 |
|
|
|
|
| 14 |
use Symfony\Component\Console\Input\InputAwareInterface;
|
| 15 |
+
use Symfony\Component\Console\Input\InputInterface;
|
| 16 |
|
| 17 |
/**
|
| 18 |
* An implementation of InputAwareInterface for Helpers.
|
vendor/symfony/console/Helper/ProcessHelper.php
CHANGED
|
@@ -15,7 +15,6 @@ use Symfony\Component\Console\Output\ConsoleOutputInterface;
|
|
| 15 |
use Symfony\Component\Console\Output\OutputInterface;
|
| 16 |
use Symfony\Component\Process\Exception\ProcessFailedException;
|
| 17 |
use Symfony\Component\Process\Process;
|
| 18 |
-
use Symfony\Component\Process\ProcessBuilder;
|
| 19 |
|
| 20 |
/**
|
| 21 |
* The ProcessHelper class provides helpers to run external processes.
|
|
@@ -44,9 +43,7 @@ class ProcessHelper extends Helper
|
|
| 44 |
|
| 45 |
$formatter = $this->getHelperSet()->get('debug_formatter');
|
| 46 |
|
| 47 |
-
if (
|
| 48 |
-
$process = ProcessBuilder::create($cmd)->getProcess();
|
| 49 |
-
} elseif ($cmd instanceof Process) {
|
| 50 |
$process = $cmd;
|
| 51 |
} else {
|
| 52 |
$process = new Process($cmd);
|
|
@@ -124,7 +121,7 @@ class ProcessHelper extends Helper
|
|
| 124 |
$output->write($formatter->progress(spl_object_hash($process), $this->escapeString($buffer), Process::ERR === $type));
|
| 125 |
|
| 126 |
if (null !== $callback) {
|
| 127 |
-
call_user_func($callback, $type, $buffer);
|
| 128 |
}
|
| 129 |
};
|
| 130 |
}
|
| 15 |
use Symfony\Component\Console\Output\OutputInterface;
|
| 16 |
use Symfony\Component\Process\Exception\ProcessFailedException;
|
| 17 |
use Symfony\Component\Process\Process;
|
|
|
|
| 18 |
|
| 19 |
/**
|
| 20 |
* The ProcessHelper class provides helpers to run external processes.
|
| 43 |
|
| 44 |
$formatter = $this->getHelperSet()->get('debug_formatter');
|
| 45 |
|
| 46 |
+
if ($cmd instanceof Process) {
|
|
|
|
|
|
|
| 47 |
$process = $cmd;
|
| 48 |
} else {
|
| 49 |
$process = new Process($cmd);
|
| 121 |
$output->write($formatter->progress(spl_object_hash($process), $this->escapeString($buffer), Process::ERR === $type));
|
| 122 |
|
| 123 |
if (null !== $callback) {
|
| 124 |
+
\call_user_func($callback, $type, $buffer);
|
| 125 |
}
|
| 126 |
};
|
| 127 |
}
|
vendor/symfony/console/Helper/ProgressBar.php
CHANGED
|
@@ -11,9 +11,9 @@
|
|
| 11 |
|
| 12 |
namespace Symfony\Component\Console\Helper;
|
| 13 |
|
|
|
|
| 14 |
use Symfony\Component\Console\Output\ConsoleOutputInterface;
|
| 15 |
use Symfony\Component\Console\Output\OutputInterface;
|
| 16 |
-
use Symfony\Component\Console\Exception\LogicException;
|
| 17 |
use Symfony\Component\Console\Terminal;
|
| 18 |
|
| 19 |
/**
|
|
@@ -583,7 +583,7 @@ final class ProgressBar
|
|
| 583 |
$regex = "{%([a-z\-_]+)(?:\:([^%]+))?%}i";
|
| 584 |
$callback = function ($matches) {
|
| 585 |
if ($formatter = $this::getPlaceholderFormatterDefinition($matches[1])) {
|
| 586 |
-
$text = call_user_func($formatter, $this, $this->output);
|
| 587 |
} elseif (isset($this->messages[$matches[1]])) {
|
| 588 |
$text = $this->messages[$matches[1]];
|
| 589 |
} else {
|
| 11 |
|
| 12 |
namespace Symfony\Component\Console\Helper;
|
| 13 |
|
| 14 |
+
use Symfony\Component\Console\Exception\LogicException;
|
| 15 |
use Symfony\Component\Console\Output\ConsoleOutputInterface;
|
| 16 |
use Symfony\Component\Console\Output\OutputInterface;
|
|
|
|
| 17 |
use Symfony\Component\Console\Terminal;
|
| 18 |
|
| 19 |
/**
|
| 583 |
$regex = "{%([a-z\-_]+)(?:\:([^%]+))?%}i";
|
| 584 |
$callback = function ($matches) {
|
| 585 |
if ($formatter = $this::getPlaceholderFormatterDefinition($matches[1])) {
|
| 586 |
+
$text = \call_user_func($formatter, $this, $this->output);
|
| 587 |
} elseif (isset($this->messages[$matches[1]])) {
|
| 588 |
$text = $this->messages[$matches[1]];
|
| 589 |
} else {
|
vendor/symfony/console/Helper/ProgressIndicator.php
CHANGED
|
@@ -53,7 +53,7 @@ class ProgressIndicator
|
|
| 53 |
|
| 54 |
$indicatorValues = array_values($indicatorValues);
|
| 55 |
|
| 56 |
-
if (2 > count($indicatorValues)) {
|
| 57 |
throw new InvalidArgumentException('Must have at least 2 indicator value characters.');
|
| 58 |
}
|
| 59 |
|
|
@@ -196,7 +196,7 @@ class ProgressIndicator
|
|
| 196 |
|
| 197 |
$this->overwrite(preg_replace_callback("{%([a-z\-_]+)(?:\:([^%]+))?%}i", function ($matches) use ($self) {
|
| 198 |
if ($formatter = $self::getPlaceholderFormatterDefinition($matches[1])) {
|
| 199 |
-
return call_user_func($formatter, $self);
|
| 200 |
}
|
| 201 |
|
| 202 |
return $matches[0];
|
|
@@ -241,7 +241,7 @@ class ProgressIndicator
|
|
| 241 |
{
|
| 242 |
return array(
|
| 243 |
'indicator' => function (ProgressIndicator $indicator) {
|
| 244 |
-
return $indicator->indicatorValues[$indicator->indicatorCurrent % count($indicator->indicatorValues)];
|
| 245 |
},
|
| 246 |
'message' => function (ProgressIndicator $indicator) {
|
| 247 |
return $indicator->message;
|
| 53 |
|
| 54 |
$indicatorValues = array_values($indicatorValues);
|
| 55 |
|
| 56 |
+
if (2 > \count($indicatorValues)) {
|
| 57 |
throw new InvalidArgumentException('Must have at least 2 indicator value characters.');
|
| 58 |
}
|
| 59 |
|
| 196 |
|
| 197 |
$this->overwrite(preg_replace_callback("{%([a-z\-_]+)(?:\:([^%]+))?%}i", function ($matches) use ($self) {
|
| 198 |
if ($formatter = $self::getPlaceholderFormatterDefinition($matches[1])) {
|
| 199 |
+
return \call_user_func($formatter, $self);
|
| 200 |
}
|
| 201 |
|
| 202 |
return $matches[0];
|
| 241 |
{
|
| 242 |
return array(
|
| 243 |
'indicator' => function (ProgressIndicator $indicator) {
|
| 244 |
+
return $indicator->indicatorValues[$indicator->indicatorCurrent % \count($indicator->indicatorValues)];
|
| 245 |
},
|
| 246 |
'message' => function (ProgressIndicator $indicator) {
|
| 247 |
return $indicator->message;
|
vendor/symfony/console/Helper/QuestionHelper.php
CHANGED
|
@@ -19,8 +19,8 @@ use Symfony\Component\Console\Input\InputInterface;
|
|
| 19 |
use Symfony\Component\Console\Input\StreamableInputInterface;
|
| 20 |
use Symfony\Component\Console\Output\ConsoleOutputInterface;
|
| 21 |
use Symfony\Component\Console\Output\OutputInterface;
|
| 22 |
-
use Symfony\Component\Console\Question\Question;
|
| 23 |
use Symfony\Component\Console\Question\ChoiceQuestion;
|
|
|
|
| 24 |
|
| 25 |
/**
|
| 26 |
* The QuestionHelper class provides helpers to interact with the user.
|
|
@@ -87,7 +87,7 @@ class QuestionHelper extends Helper
|
|
| 87 |
{
|
| 88 |
@trigger_error(sprintf('The %s() method is deprecated since Symfony 3.2 and will be removed in 4.0. Use %s::setStream() instead.', __METHOD__, StreamableInputInterface::class), E_USER_DEPRECATED);
|
| 89 |
|
| 90 |
-
if (
|
| 91 |
throw new InvalidArgumentException('Input stream must be a valid resource.');
|
| 92 |
}
|
| 93 |
|
|
@@ -104,7 +104,7 @@ class QuestionHelper extends Helper
|
|
| 104 |
*/
|
| 105 |
public function getInputStream()
|
| 106 |
{
|
| 107 |
-
if (0 === func_num_args() || func_get_arg(0)) {
|
| 108 |
@trigger_error(sprintf('The %s() method is deprecated since Symfony 3.2 and will be removed in 4.0. Use %s::getStream() instead.', __METHOD__, StreamableInputInterface::class), E_USER_DEPRECATED);
|
| 109 |
}
|
| 110 |
|
|
@@ -130,7 +130,7 @@ class QuestionHelper extends Helper
|
|
| 130 |
/**
|
| 131 |
* Asks the question to the user.
|
| 132 |
*
|
| 133 |
-
* @return bool|mixed|null
|
| 134 |
*
|
| 135 |
* @throws RuntimeException In case the fallback is deactivated and the response cannot be hidden
|
| 136 |
*/
|
|
@@ -161,10 +161,10 @@ class QuestionHelper extends Helper
|
|
| 161 |
$ret = trim($ret);
|
| 162 |
}
|
| 163 |
} else {
|
| 164 |
-
$ret = trim($this->autocomplete($output, $question, $inputStream, is_array($autocomplete) ? $autocomplete : iterator_to_array($autocomplete, false)));
|
| 165 |
}
|
| 166 |
|
| 167 |
-
$ret = strlen($ret) > 0 ? $ret : $question->getDefault();
|
| 168 |
|
| 169 |
if ($normalizer = $question->getNormalizer()) {
|
| 170 |
return $normalizer($ret);
|
|
@@ -228,7 +228,7 @@ class QuestionHelper extends Helper
|
|
| 228 |
$i = 0;
|
| 229 |
$ofs = -1;
|
| 230 |
$matches = $autocomplete;
|
| 231 |
-
$numMatches = count($matches);
|
| 232 |
|
| 233 |
$sttyMode = shell_exec('stty -g');
|
| 234 |
|
|
@@ -253,7 +253,7 @@ class QuestionHelper extends Helper
|
|
| 253 |
if (0 === $i) {
|
| 254 |
$ofs = -1;
|
| 255 |
$matches = $autocomplete;
|
| 256 |
-
$numMatches = count($matches);
|
| 257 |
} else {
|
| 258 |
$numMatches = 0;
|
| 259 |
}
|
|
@@ -277,13 +277,13 @@ class QuestionHelper extends Helper
|
|
| 277 |
$ofs += ('A' === $c[2]) ? -1 : 1;
|
| 278 |
$ofs = ($numMatches + $ofs) % $numMatches;
|
| 279 |
}
|
| 280 |
-
} elseif (ord($c) < 32) {
|
| 281 |
if ("\t" === $c || "\n" === $c) {
|
| 282 |
if ($numMatches > 0 && -1 !== $ofs) {
|
| 283 |
$ret = $matches[$ofs];
|
| 284 |
// Echo out remaining chars for current match
|
| 285 |
$output->write(substr($ret, $i));
|
| 286 |
-
$i = strlen($ret);
|
| 287 |
}
|
| 288 |
|
| 289 |
if ("\n" === $c) {
|
|
@@ -305,7 +305,7 @@ class QuestionHelper extends Helper
|
|
| 305 |
|
| 306 |
foreach ($autocomplete as $value) {
|
| 307 |
// If typed characters match the beginning chunk of value (e.g. [AcmeDe]moBundle)
|
| 308 |
-
if (0 === strpos($value, $ret)
|
| 309 |
$matches[$numMatches++] = $value;
|
| 310 |
}
|
| 311 |
}
|
|
@@ -342,7 +342,7 @@ class QuestionHelper extends Helper
|
|
| 342 |
*/
|
| 343 |
private function getHiddenResponse(OutputInterface $output, $inputStream)
|
| 344 |
{
|
| 345 |
-
if ('\\' === DIRECTORY_SEPARATOR) {
|
| 346 |
$exe = __DIR__.'/../Resources/bin/hiddeninput.exe';
|
| 347 |
|
| 348 |
// handle code running from a phar
|
|
@@ -412,7 +412,7 @@ class QuestionHelper extends Helper
|
|
| 412 |
}
|
| 413 |
|
| 414 |
try {
|
| 415 |
-
return call_user_func($question->getValidator(), $interviewer());
|
| 416 |
} catch (RuntimeException $e) {
|
| 417 |
throw $e;
|
| 418 |
} catch (\Exception $error) {
|
| 19 |
use Symfony\Component\Console\Input\StreamableInputInterface;
|
| 20 |
use Symfony\Component\Console\Output\ConsoleOutputInterface;
|
| 21 |
use Symfony\Component\Console\Output\OutputInterface;
|
|
|
|
| 22 |
use Symfony\Component\Console\Question\ChoiceQuestion;
|
| 23 |
+
use Symfony\Component\Console\Question\Question;
|
| 24 |
|
| 25 |
/**
|
| 26 |
* The QuestionHelper class provides helpers to interact with the user.
|
| 87 |
{
|
| 88 |
@trigger_error(sprintf('The %s() method is deprecated since Symfony 3.2 and will be removed in 4.0. Use %s::setStream() instead.', __METHOD__, StreamableInputInterface::class), E_USER_DEPRECATED);
|
| 89 |
|
| 90 |
+
if (!\is_resource($stream)) {
|
| 91 |
throw new InvalidArgumentException('Input stream must be a valid resource.');
|
| 92 |
}
|
| 93 |
|
| 104 |
*/
|
| 105 |
public function getInputStream()
|
| 106 |
{
|
| 107 |
+
if (0 === \func_num_args() || func_get_arg(0)) {
|
| 108 |
@trigger_error(sprintf('The %s() method is deprecated since Symfony 3.2 and will be removed in 4.0. Use %s::getStream() instead.', __METHOD__, StreamableInputInterface::class), E_USER_DEPRECATED);
|
| 109 |
}
|
| 110 |
|
| 130 |
/**
|
| 131 |
* Asks the question to the user.
|
| 132 |
*
|
| 133 |
+
* @return bool|mixed|string|null
|
| 134 |
*
|
| 135 |
* @throws RuntimeException In case the fallback is deactivated and the response cannot be hidden
|
| 136 |
*/
|
| 161 |
$ret = trim($ret);
|
| 162 |
}
|
| 163 |
} else {
|
| 164 |
+
$ret = trim($this->autocomplete($output, $question, $inputStream, \is_array($autocomplete) ? $autocomplete : iterator_to_array($autocomplete, false)));
|
| 165 |
}
|
| 166 |
|
| 167 |
+
$ret = \strlen($ret) > 0 ? $ret : $question->getDefault();
|
| 168 |
|
| 169 |
if ($normalizer = $question->getNormalizer()) {
|
| 170 |
return $normalizer($ret);
|
| 228 |
$i = 0;
|
| 229 |
$ofs = -1;
|
| 230 |
$matches = $autocomplete;
|
| 231 |
+
$numMatches = \count($matches);
|
| 232 |
|
| 233 |
$sttyMode = shell_exec('stty -g');
|
| 234 |
|
| 253 |
if (0 === $i) {
|
| 254 |
$ofs = -1;
|
| 255 |
$matches = $autocomplete;
|
| 256 |
+
$numMatches = \count($matches);
|
| 257 |
} else {
|
| 258 |
$numMatches = 0;
|
| 259 |
}
|
| 277 |
$ofs += ('A' === $c[2]) ? -1 : 1;
|
| 278 |
$ofs = ($numMatches + $ofs) % $numMatches;
|
| 279 |
}
|
| 280 |
+
} elseif (\ord($c) < 32) {
|
| 281 |
if ("\t" === $c || "\n" === $c) {
|
| 282 |
if ($numMatches > 0 && -1 !== $ofs) {
|
| 283 |
$ret = $matches[$ofs];
|
| 284 |
// Echo out remaining chars for current match
|
| 285 |
$output->write(substr($ret, $i));
|
| 286 |
+
$i = \strlen($ret);
|
| 287 |
}
|
| 288 |
|
| 289 |
if ("\n" === $c) {
|
| 305 |
|
| 306 |
foreach ($autocomplete as $value) {
|
| 307 |
// If typed characters match the beginning chunk of value (e.g. [AcmeDe]moBundle)
|
| 308 |
+
if (0 === strpos($value, $ret)) {
|
| 309 |
$matches[$numMatches++] = $value;
|
| 310 |
}
|
| 311 |
}
|
| 342 |
*/
|
| 343 |
private function getHiddenResponse(OutputInterface $output, $inputStream)
|
| 344 |
{
|
| 345 |
+
if ('\\' === \DIRECTORY_SEPARATOR) {
|
| 346 |
$exe = __DIR__.'/../Resources/bin/hiddeninput.exe';
|
| 347 |
|
| 348 |
// handle code running from a phar
|
| 412 |
}
|
| 413 |
|
| 414 |
try {
|
| 415 |
+
return \call_user_func($question->getValidator(), $interviewer());
|
| 416 |
} catch (RuntimeException $e) {
|
| 417 |
throw $e;
|
| 418 |
} catch (\Exception $error) {
|
vendor/symfony/console/Helper/SymfonyQuestionHelper.php
CHANGED
|
@@ -12,13 +12,13 @@
|
|
| 12 |
namespace Symfony\Component\Console\Helper;
|
| 13 |
|
| 14 |
use Symfony\Component\Console\Exception\LogicException;
|
|
|
|
| 15 |
use Symfony\Component\Console\Input\InputInterface;
|
| 16 |
use Symfony\Component\Console\Output\OutputInterface;
|
| 17 |
use Symfony\Component\Console\Question\ChoiceQuestion;
|
| 18 |
use Symfony\Component\Console\Question\ConfirmationQuestion;
|
| 19 |
use Symfony\Component\Console\Question\Question;
|
| 20 |
use Symfony\Component\Console\Style\SymfonyStyle;
|
| 21 |
-
use Symfony\Component\Console\Formatter\OutputFormatter;
|
| 22 |
|
| 23 |
/**
|
| 24 |
* Symfony Style Guide compliant question helper.
|
|
@@ -29,6 +29,8 @@ class SymfonyQuestionHelper extends QuestionHelper
|
|
| 29 |
{
|
| 30 |
/**
|
| 31 |
* {@inheritdoc}
|
|
|
|
|
|
|
| 32 |
*/
|
| 33 |
public function ask(InputInterface $input, OutputInterface $output, Question $question)
|
| 34 |
{
|
|
@@ -38,7 +40,9 @@ class SymfonyQuestionHelper extends QuestionHelper
|
|
| 38 |
$value = $validator($value);
|
| 39 |
} else {
|
| 40 |
// make required
|
| 41 |
-
if (
|
|
|
|
|
|
|
| 42 |
throw new LogicException('A value is required.');
|
| 43 |
}
|
| 44 |
}
|
|
@@ -82,7 +86,7 @@ class SymfonyQuestionHelper extends QuestionHelper
|
|
| 82 |
|
| 83 |
case $question instanceof ChoiceQuestion:
|
| 84 |
$choices = $question->getChoices();
|
| 85 |
-
$text = sprintf(' <info>%s</info> [<comment>%s</comment>]:', $text, OutputFormatter::escape($choices[$default]));
|
| 86 |
|
| 87 |
break;
|
| 88 |
|
| 12 |
namespace Symfony\Component\Console\Helper;
|
| 13 |
|
| 14 |
use Symfony\Component\Console\Exception\LogicException;
|
| 15 |
+
use Symfony\Component\Console\Formatter\OutputFormatter;
|
| 16 |
use Symfony\Component\Console\Input\InputInterface;
|
| 17 |
use Symfony\Component\Console\Output\OutputInterface;
|
| 18 |
use Symfony\Component\Console\Question\ChoiceQuestion;
|
| 19 |
use Symfony\Component\Console\Question\ConfirmationQuestion;
|
| 20 |
use Symfony\Component\Console\Question\Question;
|
| 21 |
use Symfony\Component\Console\Style\SymfonyStyle;
|
|
|
|
| 22 |
|
| 23 |
/**
|
| 24 |
* Symfony Style Guide compliant question helper.
|
| 29 |
{
|
| 30 |
/**
|
| 31 |
* {@inheritdoc}
|
| 32 |
+
*
|
| 33 |
+
* To be removed in 4.0
|
| 34 |
*/
|
| 35 |
public function ask(InputInterface $input, OutputInterface $output, Question $question)
|
| 36 |
{
|
| 40 |
$value = $validator($value);
|
| 41 |
} else {
|
| 42 |
// make required
|
| 43 |
+
if (!\is_array($value) && !\is_bool($value) && 0 === \strlen($value)) {
|
| 44 |
+
@trigger_error('The default question validator is deprecated since Symfony 3.3 and will not be used anymore in version 4.0. Set a custom question validator if needed.', E_USER_DEPRECATED);
|
| 45 |
+
|
| 46 |
throw new LogicException('A value is required.');
|
| 47 |
}
|
| 48 |
}
|
| 86 |
|
| 87 |
case $question instanceof ChoiceQuestion:
|
| 88 |
$choices = $question->getChoices();
|
| 89 |
+
$text = sprintf(' <info>%s</info> [<comment>%s</comment>]:', $text, OutputFormatter::escape(isset($choices[$default]) ? $choices[$default] : $default));
|
| 90 |
|
| 91 |
break;
|
| 92 |
|
vendor/symfony/console/Helper/Table.php
CHANGED
|
@@ -11,8 +11,8 @@
|
|
| 11 |
|
| 12 |
namespace Symfony\Component\Console\Helper;
|
| 13 |
|
| 14 |
-
use Symfony\Component\Console\Output\OutputInterface;
|
| 15 |
use Symfony\Component\Console\Exception\InvalidArgumentException;
|
|
|
|
| 16 |
|
| 17 |
/**
|
| 18 |
* Provides helpers to display a table.
|
|
@@ -210,7 +210,7 @@ class Table
|
|
| 210 |
public function setHeaders(array $headers)
|
| 211 |
{
|
| 212 |
$headers = array_values($headers);
|
| 213 |
-
if (!empty($headers) &&
|
| 214 |
$headers = array($headers);
|
| 215 |
}
|
| 216 |
|
|
@@ -243,7 +243,7 @@ class Table
|
|
| 243 |
return $this;
|
| 244 |
}
|
| 245 |
|
| 246 |
-
if (
|
| 247 |
throw new InvalidArgumentException('A row must be an array or a TableSeparator instance.');
|
| 248 |
}
|
| 249 |
|
|
@@ -263,15 +263,14 @@ class Table
|
|
| 263 |
* Renders table to output.
|
| 264 |
*
|
| 265 |
* Example:
|
| 266 |
-
*
|
| 267 |
-
*
|
| 268 |
-
*
|
| 269 |
-
*
|
| 270 |
-
*
|
| 271 |
-
*
|
| 272 |
-
*
|
| 273 |
-
*
|
| 274 |
-
* </code>
|
| 275 |
*/
|
| 276 |
public function render()
|
| 277 |
{
|
|
@@ -305,7 +304,9 @@ class Table
|
|
| 305 |
/**
|
| 306 |
* Renders horizontal header separator.
|
| 307 |
*
|
| 308 |
-
* Example:
|
|
|
|
|
|
|
| 309 |
*/
|
| 310 |
private function renderRowSeparator()
|
| 311 |
{
|
|
@@ -336,7 +337,9 @@ class Table
|
|
| 336 |
/**
|
| 337 |
* Renders table row.
|
| 338 |
*
|
| 339 |
-
* Example:
|
|
|
|
|
|
|
| 340 |
*
|
| 341 |
* @param array $row
|
| 342 |
* @param string $cellFormat
|
|
@@ -375,7 +378,7 @@ class Table
|
|
| 375 |
|
| 376 |
// str_pad won't work properly with multi-byte strings, we need to fix the padding
|
| 377 |
if (false !== $encoding = mb_detect_encoding($cell, null, true)) {
|
| 378 |
-
$width += strlen($cell) - mb_strwidth($cell, $encoding);
|
| 379 |
}
|
| 380 |
|
| 381 |
$style = $this->getColumnStyle($column);
|
|
@@ -414,7 +417,7 @@ class Table
|
|
| 414 |
private function buildTableRows($rows)
|
| 415 |
{
|
| 416 |
$unmergedRows = array();
|
| 417 |
-
for ($rowKey = 0; $rowKey < count($rows); ++$rowKey) {
|
| 418 |
$rows = $this->fillNextRows($rows, $rowKey);
|
| 419 |
|
| 420 |
// Remove any new line breaks and replace it with a new line
|
|
@@ -454,17 +457,22 @@ class Table
|
|
| 454 |
* @param int $line
|
| 455 |
*
|
| 456 |
* @return array
|
|
|
|
|
|
|
| 457 |
*/
|
| 458 |
private function fillNextRows(array $rows, $line)
|
| 459 |
{
|
| 460 |
$unmergedRows = array();
|
| 461 |
foreach ($rows[$line] as $column => $cell) {
|
|
|
|
|
|
|
|
|
|
| 462 |
if ($cell instanceof TableCell && $cell->getRowspan() > 1) {
|
| 463 |
$nbLines = $cell->getRowspan() - 1;
|
| 464 |
$lines = array($cell);
|
| 465 |
if (strstr($cell, "\n")) {
|
| 466 |
$lines = explode("\n", str_replace("\n", "<fg=default;bg=default>\n</>", $cell));
|
| 467 |
-
$nbLines = count($lines) > $nbLines ? substr_count($cell, "\n") : $nbLines;
|
| 468 |
|
| 469 |
$rows[$line][$column] = new TableCell($lines[0], array('colspan' => $cell->getColspan()));
|
| 470 |
unset($lines[0]);
|
|
@@ -484,7 +492,7 @@ class Table
|
|
| 484 |
|
| 485 |
foreach ($unmergedRows as $unmergedRowKey => $unmergedRow) {
|
| 486 |
// we need to know if $unmergedRow will be merged or inserted into $rows
|
| 487 |
-
if (isset($rows[$unmergedRowKey]) && is_array($rows[$unmergedRowKey]) && ($this->getNumberOfColumns($rows[$unmergedRowKey]) + $this->getNumberOfColumns($unmergedRows[$unmergedRowKey]) <= $this->numberOfColumns)) {
|
| 488 |
foreach ($unmergedRow as $cellKey => $cell) {
|
| 489 |
// insert cell into row at cellKey position
|
| 490 |
array_splice($rows[$unmergedRowKey], $cellKey, 0, array($cell));
|
|
@@ -550,7 +558,7 @@ class Table
|
|
| 550 |
*/
|
| 551 |
private function getNumberOfColumns(array $row)
|
| 552 |
{
|
| 553 |
-
$columns = count($row);
|
| 554 |
foreach ($row as $column) {
|
| 555 |
$columns += $column instanceof TableCell ? ($column->getColspan() - 1) : 0;
|
| 556 |
}
|
|
@@ -604,7 +612,7 @@ class Table
|
|
| 604 |
$lengths[] = $this->getCellWidth($row, $column);
|
| 605 |
}
|
| 606 |
|
| 607 |
-
$this->effectiveColumnWidths[$column] = max($lengths) + strlen($this->style->getCellRowContentFormat()) - 2;
|
| 608 |
}
|
| 609 |
}
|
| 610 |
|
|
@@ -615,7 +623,7 @@ class Table
|
|
| 615 |
*/
|
| 616 |
private function getColumnSeparatorWidth()
|
| 617 |
{
|
| 618 |
-
return strlen(sprintf($this->style->getBorderFormat(), $this->style->getVerticalBorderChar()));
|
| 619 |
}
|
| 620 |
|
| 621 |
/**
|
| 11 |
|
| 12 |
namespace Symfony\Component\Console\Helper;
|
| 13 |
|
|
|
|
| 14 |
use Symfony\Component\Console\Exception\InvalidArgumentException;
|
| 15 |
+
use Symfony\Component\Console\Output\OutputInterface;
|
| 16 |
|
| 17 |
/**
|
| 18 |
* Provides helpers to display a table.
|
| 210 |
public function setHeaders(array $headers)
|
| 211 |
{
|
| 212 |
$headers = array_values($headers);
|
| 213 |
+
if (!empty($headers) && !\is_array($headers[0])) {
|
| 214 |
$headers = array($headers);
|
| 215 |
}
|
| 216 |
|
| 243 |
return $this;
|
| 244 |
}
|
| 245 |
|
| 246 |
+
if (!\is_array($row)) {
|
| 247 |
throw new InvalidArgumentException('A row must be an array or a TableSeparator instance.');
|
| 248 |
}
|
| 249 |
|
| 263 |
* Renders table to output.
|
| 264 |
*
|
| 265 |
* Example:
|
| 266 |
+
*
|
| 267 |
+
* +---------------+-----------------------+------------------+
|
| 268 |
+
* | ISBN | Title | Author |
|
| 269 |
+
* +---------------+-----------------------+------------------+
|
| 270 |
+
* | 99921-58-10-7 | Divine Comedy | Dante Alighieri |
|
| 271 |
+
* | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens |
|
| 272 |
+
* | 960-425-059-0 | The Lord of the Rings | J. R. R. Tolkien |
|
| 273 |
+
* +---------------+-----------------------+------------------+
|
|
|
|
| 274 |
*/
|
| 275 |
public function render()
|
| 276 |
{
|
| 304 |
/**
|
| 305 |
* Renders horizontal header separator.
|
| 306 |
*
|
| 307 |
+
* Example:
|
| 308 |
+
*
|
| 309 |
+
* +-----+-----------+-------+
|
| 310 |
*/
|
| 311 |
private function renderRowSeparator()
|
| 312 |
{
|
| 337 |
/**
|
| 338 |
* Renders table row.
|
| 339 |
*
|
| 340 |
+
* Example:
|
| 341 |
+
*
|
| 342 |
+
* | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens |
|
| 343 |
*
|
| 344 |
* @param array $row
|
| 345 |
* @param string $cellFormat
|
| 378 |
|
| 379 |
// str_pad won't work properly with multi-byte strings, we need to fix the padding
|
| 380 |
if (false !== $encoding = mb_detect_encoding($cell, null, true)) {
|
| 381 |
+
$width += \strlen($cell) - mb_strwidth($cell, $encoding);
|
| 382 |
}
|
| 383 |
|
| 384 |
$style = $this->getColumnStyle($column);
|
| 417 |
private function buildTableRows($rows)
|
| 418 |
{
|
| 419 |
$unmergedRows = array();
|
| 420 |
+
for ($rowKey = 0; $rowKey < \count($rows); ++$rowKey) {
|
| 421 |
$rows = $this->fillNextRows($rows, $rowKey);
|
| 422 |
|
| 423 |
// Remove any new line breaks and replace it with a new line
|
| 457 |
* @param int $line
|
| 458 |
*
|
| 459 |
* @return array
|
| 460 |
+
*
|
| 461 |
+
* @throws InvalidArgumentException
|
| 462 |
*/
|
| 463 |
private function fillNextRows(array $rows, $line)
|
| 464 |
{
|
| 465 |
$unmergedRows = array();
|
| 466 |
foreach ($rows[$line] as $column => $cell) {
|
| 467 |
+
if (null !== $cell && !$cell instanceof TableCell && !is_scalar($cell) && !(\is_object($cell) && method_exists($cell, '__toString'))) {
|
| 468 |
+
throw new InvalidArgumentException(sprintf('A cell must be a TableCell, a scalar or an object implementing __toString, %s given.', \gettype($cell)));
|
| 469 |
+
}
|
| 470 |
if ($cell instanceof TableCell && $cell->getRowspan() > 1) {
|
| 471 |
$nbLines = $cell->getRowspan() - 1;
|
| 472 |
$lines = array($cell);
|
| 473 |
if (strstr($cell, "\n")) {
|
| 474 |
$lines = explode("\n", str_replace("\n", "<fg=default;bg=default>\n</>", $cell));
|
| 475 |
+
$nbLines = \count($lines) > $nbLines ? substr_count($cell, "\n") : $nbLines;
|
| 476 |
|
| 477 |
$rows[$line][$column] = new TableCell($lines[0], array('colspan' => $cell->getColspan()));
|
| 478 |
unset($lines[0]);
|
| 492 |
|
| 493 |
foreach ($unmergedRows as $unmergedRowKey => $unmergedRow) {
|
| 494 |
// we need to know if $unmergedRow will be merged or inserted into $rows
|
| 495 |
+
if (isset($rows[$unmergedRowKey]) && \is_array($rows[$unmergedRowKey]) && ($this->getNumberOfColumns($rows[$unmergedRowKey]) + $this->getNumberOfColumns($unmergedRows[$unmergedRowKey]) <= $this->numberOfColumns)) {
|
| 496 |
foreach ($unmergedRow as $cellKey => $cell) {
|
| 497 |
// insert cell into row at cellKey position
|
| 498 |
array_splice($rows[$unmergedRowKey], $cellKey, 0, array($cell));
|
| 558 |
*/
|
| 559 |
private function getNumberOfColumns(array $row)
|
| 560 |
{
|
| 561 |
+
$columns = \count($row);
|
| 562 |
foreach ($row as $column) {
|
| 563 |
$columns += $column instanceof TableCell ? ($column->getColspan() - 1) : 0;
|
| 564 |
}
|
| 612 |
$lengths[] = $this->getCellWidth($row, $column);
|
| 613 |
}
|
| 614 |
|
| 615 |
+
$this->effectiveColumnWidths[$column] = max($lengths) + Helper::strlen($this->style->getCellRowContentFormat()) - 2;
|
| 616 |
}
|
| 617 |
}
|
| 618 |
|
| 623 |
*/
|
| 624 |
private function getColumnSeparatorWidth()
|
| 625 |
{
|
| 626 |
+
return Helper::strlen(sprintf($this->style->getBorderFormat(), $this->style->getVerticalBorderChar()));
|
| 627 |
}
|
| 628 |
|
| 629 |
/**
|
vendor/symfony/console/Helper/TableCell.php
CHANGED
|
@@ -30,7 +30,7 @@ class TableCell
|
|
| 30 |
*/
|
| 31 |
public function __construct($value = '', array $options = array())
|
| 32 |
{
|
| 33 |
-
if (is_numeric($value) &&
|
| 34 |
$value = (string) $value;
|
| 35 |
}
|
| 36 |
|
| 30 |
*/
|
| 31 |
public function __construct($value = '', array $options = array())
|
| 32 |
{
|
| 33 |
+
if (is_numeric($value) && !\is_string($value)) {
|
| 34 |
$value = (string) $value;
|
| 35 |
}
|
| 36 |
|
vendor/symfony/console/Helper/TableStyle.php
CHANGED
|
@@ -237,7 +237,7 @@ class TableStyle
|
|
| 237 |
*/
|
| 238 |
public function setPadType($padType)
|
| 239 |
{
|
| 240 |
-
if (
|
| 241 |
throw new InvalidArgumentException('Invalid padding type. Expected one of (STR_PAD_LEFT, STR_PAD_RIGHT, STR_PAD_BOTH).');
|
| 242 |
}
|
| 243 |
|
| 237 |
*/
|
| 238 |
public function setPadType($padType)
|
| 239 |
{
|
| 240 |
+
if (!\in_array($padType, array(STR_PAD_LEFT, STR_PAD_RIGHT, STR_PAD_BOTH), true)) {
|
| 241 |
throw new InvalidArgumentException('Invalid padding type. Expected one of (STR_PAD_LEFT, STR_PAD_RIGHT, STR_PAD_BOTH).');
|
| 242 |
}
|
| 243 |
|
vendor/symfony/console/Input/ArgvInput.php
CHANGED
|
@@ -97,7 +97,7 @@ class ArgvInput extends Input
|
|
| 97 |
{
|
| 98 |
$name = substr($token, 1);
|
| 99 |
|
| 100 |
-
if (strlen($name) > 1) {
|
| 101 |
if ($this->definition->hasShortcut($name[0]) && $this->definition->getOptionForShortcut($name[0])->acceptValue()) {
|
| 102 |
// an option with a value (with no space)
|
| 103 |
$this->addShortOption($name[0], substr($name, 1));
|
|
@@ -118,10 +118,11 @@ class ArgvInput extends Input
|
|
| 118 |
*/
|
| 119 |
private function parseShortOptionSet($name)
|
| 120 |
{
|
| 121 |
-
$len = strlen($name);
|
| 122 |
for ($i = 0; $i < $len; ++$i) {
|
| 123 |
if (!$this->definition->hasShortcut($name[$i])) {
|
| 124 |
-
|
|
|
|
| 125 |
}
|
| 126 |
|
| 127 |
$option = $this->definition->getOptionForShortcut($name[$i]);
|
|
@@ -145,7 +146,7 @@ class ArgvInput extends Input
|
|
| 145 |
$name = substr($token, 2);
|
| 146 |
|
| 147 |
if (false !== $pos = strpos($name, '=')) {
|
| 148 |
-
if (0 === strlen($value = substr($name, $pos + 1))) {
|
| 149 |
// if no value after "=" then substr() returns "" since php7 only, false before
|
| 150 |
// see http://php.net/manual/fr/migration70.incompatible.php#119151
|
| 151 |
if (\PHP_VERSION_ID < 70000 && false === $value) {
|
|
@@ -168,7 +169,7 @@ class ArgvInput extends Input
|
|
| 168 |
*/
|
| 169 |
private function parseArgument($token)
|
| 170 |
{
|
| 171 |
-
$c = count($this->arguments);
|
| 172 |
|
| 173 |
// if input is expecting another argument, add it
|
| 174 |
if ($this->definition->hasArgument($c)) {
|
|
@@ -183,7 +184,7 @@ class ArgvInput extends Input
|
|
| 183 |
// unexpected argument
|
| 184 |
} else {
|
| 185 |
$all = $this->definition->getArguments();
|
| 186 |
-
if (count($all)) {
|
| 187 |
throw new RuntimeException(sprintf('Too many arguments, expected arguments "%s".', implode('" "', array_keys($all))));
|
| 188 |
}
|
| 189 |
|
|
@@ -228,11 +229,11 @@ class ArgvInput extends Input
|
|
| 228 |
throw new RuntimeException(sprintf('The "--%s" option does not accept a value.', $name));
|
| 229 |
}
|
| 230 |
|
| 231 |
-
if (in_array($value, array('', null), true) && $option->acceptValue() && count($this->parsed)) {
|
| 232 |
// if option accepts an optional or mandatory argument
|
| 233 |
// let's see if there is one provided
|
| 234 |
$next = array_shift($this->parsed);
|
| 235 |
-
if ((isset($next[0]) && '-' !== $next[0]) || in_array($next, array('', null), true)) {
|
| 236 |
$value = $next;
|
| 237 |
} else {
|
| 238 |
array_unshift($this->parsed, $next);
|
|
@@ -282,7 +283,11 @@ class ArgvInput extends Input
|
|
| 282 |
return false;
|
| 283 |
}
|
| 284 |
foreach ($values as $value) {
|
| 285 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 286 |
return true;
|
| 287 |
}
|
| 288 |
}
|
|
@@ -299,20 +304,23 @@ class ArgvInput extends Input
|
|
| 299 |
$values = (array) $values;
|
| 300 |
$tokens = $this->tokens;
|
| 301 |
|
| 302 |
-
while (0 < count($tokens)) {
|
| 303 |
$token = array_shift($tokens);
|
| 304 |
if ($onlyParams && '--' === $token) {
|
| 305 |
-
return
|
| 306 |
}
|
| 307 |
|
| 308 |
foreach ($values as $value) {
|
| 309 |
-
if ($token === $value
|
| 310 |
-
if (false !== $pos = strpos($token, '=')) {
|
| 311 |
-
return substr($token, $pos + 1);
|
| 312 |
-
}
|
| 313 |
-
|
| 314 |
return array_shift($tokens);
|
| 315 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 316 |
}
|
| 317 |
}
|
| 318 |
|
| 97 |
{
|
| 98 |
$name = substr($token, 1);
|
| 99 |
|
| 100 |
+
if (\strlen($name) > 1) {
|
| 101 |
if ($this->definition->hasShortcut($name[0]) && $this->definition->getOptionForShortcut($name[0])->acceptValue()) {
|
| 102 |
// an option with a value (with no space)
|
| 103 |
$this->addShortOption($name[0], substr($name, 1));
|
| 118 |
*/
|
| 119 |
private function parseShortOptionSet($name)
|
| 120 |
{
|
| 121 |
+
$len = \strlen($name);
|
| 122 |
for ($i = 0; $i < $len; ++$i) {
|
| 123 |
if (!$this->definition->hasShortcut($name[$i])) {
|
| 124 |
+
$encoding = mb_detect_encoding($name, null, true);
|
| 125 |
+
throw new RuntimeException(sprintf('The "-%s" option does not exist.', false === $encoding ? $name[$i] : mb_substr($name, $i, 1, $encoding)));
|
| 126 |
}
|
| 127 |
|
| 128 |
$option = $this->definition->getOptionForShortcut($name[$i]);
|
| 146 |
$name = substr($token, 2);
|
| 147 |
|
| 148 |
if (false !== $pos = strpos($name, '=')) {
|
| 149 |
+
if (0 === \strlen($value = substr($name, $pos + 1))) {
|
| 150 |
// if no value after "=" then substr() returns "" since php7 only, false before
|
| 151 |
// see http://php.net/manual/fr/migration70.incompatible.php#119151
|
| 152 |
if (\PHP_VERSION_ID < 70000 && false === $value) {
|
| 169 |
*/
|
| 170 |
private function parseArgument($token)
|
| 171 |
{
|
| 172 |
+
$c = \count($this->arguments);
|
| 173 |
|
| 174 |
// if input is expecting another argument, add it
|
| 175 |
if ($this->definition->hasArgument($c)) {
|
| 184 |
// unexpected argument
|
| 185 |
} else {
|
| 186 |
$all = $this->definition->getArguments();
|
| 187 |
+
if (\count($all)) {
|
| 188 |
throw new RuntimeException(sprintf('Too many arguments, expected arguments "%s".', implode('" "', array_keys($all))));
|
| 189 |
}
|
| 190 |
|
| 229 |
throw new RuntimeException(sprintf('The "--%s" option does not accept a value.', $name));
|
| 230 |
}
|
| 231 |
|
| 232 |
+
if (\in_array($value, array('', null), true) && $option->acceptValue() && \count($this->parsed)) {
|
| 233 |
// if option accepts an optional or mandatory argument
|
| 234 |
// let's see if there is one provided
|
| 235 |
$next = array_shift($this->parsed);
|
| 236 |
+
if ((isset($next[0]) && '-' !== $next[0]) || \in_array($next, array('', null), true)) {
|
| 237 |
$value = $next;
|
| 238 |
} else {
|
| 239 |
array_unshift($this->parsed, $next);
|
| 283 |
return false;
|
| 284 |
}
|
| 285 |
foreach ($values as $value) {
|
| 286 |
+
// Options with values:
|
| 287 |
+
// For long options, test for '--option=' at beginning
|
| 288 |
+
// For short options, test for '-o' at beginning
|
| 289 |
+
$leading = 0 === strpos($value, '--') ? $value.'=' : $value;
|
| 290 |
+
if ($token === $value || '' !== $leading && 0 === strpos($token, $leading)) {
|
| 291 |
return true;
|
| 292 |
}
|
| 293 |
}
|
| 304 |
$values = (array) $values;
|
| 305 |
$tokens = $this->tokens;
|
| 306 |
|
| 307 |
+
while (0 < \count($tokens)) {
|
| 308 |
$token = array_shift($tokens);
|
| 309 |
if ($onlyParams && '--' === $token) {
|
| 310 |
+
return $default;
|
| 311 |
}
|
| 312 |
|
| 313 |
foreach ($values as $value) {
|
| 314 |
+
if ($token === $value) {
|
|
|
|
|
|
|
|
|
|
|
|
|
| 315 |
return array_shift($tokens);
|
| 316 |
}
|
| 317 |
+
// Options with values:
|
| 318 |
+
// For long options, test for '--option=' at beginning
|
| 319 |
+
// For short options, test for '-o' at beginning
|
| 320 |
+
$leading = 0 === strpos($value, '--') ? $value.'=' : $value;
|
| 321 |
+
if ('' !== $leading && 0 === strpos($token, $leading)) {
|
| 322 |
+
return substr($token, \strlen($leading));
|
| 323 |
+
}
|
| 324 |
}
|
| 325 |
}
|
| 326 |
|
vendor/symfony/console/Input/ArrayInput.php
CHANGED
|
@@ -56,7 +56,7 @@ class ArrayInput extends Input
|
|
| 56 |
$values = (array) $values;
|
| 57 |
|
| 58 |
foreach ($this->parameters as $k => $v) {
|
| 59 |
-
if (
|
| 60 |
$v = $k;
|
| 61 |
}
|
| 62 |
|
|
@@ -64,7 +64,7 @@ class ArrayInput extends Input
|
|
| 64 |
return false;
|
| 65 |
}
|
| 66 |
|
| 67 |
-
if (in_array($v, $values)) {
|
| 68 |
return true;
|
| 69 |
}
|
| 70 |
}
|
|
@@ -80,15 +80,15 @@ class ArrayInput extends Input
|
|
| 80 |
$values = (array) $values;
|
| 81 |
|
| 82 |
foreach ($this->parameters as $k => $v) {
|
| 83 |
-
if ($onlyParams && ('--' === $k || (is_int($k) && '--' === $v))) {
|
| 84 |
-
return
|
| 85 |
}
|
| 86 |
|
| 87 |
-
if (is_int($k)) {
|
| 88 |
-
if (in_array($v, $values)) {
|
| 89 |
return true;
|
| 90 |
}
|
| 91 |
-
} elseif (in_array($k, $values)) {
|
| 92 |
return $v;
|
| 93 |
}
|
| 94 |
}
|
|
@@ -106,7 +106,7 @@ class ArrayInput extends Input
|
|
| 106 |
$params = array();
|
| 107 |
foreach ($this->parameters as $param => $val) {
|
| 108 |
if ($param && '-' === $param[0]) {
|
| 109 |
-
if (is_array($val)) {
|
| 110 |
foreach ($val as $v) {
|
| 111 |
$params[] = $param.('' != $v ? '='.$this->escapeToken($v) : '');
|
| 112 |
}
|
|
@@ -114,7 +114,7 @@ class ArrayInput extends Input
|
|
| 114 |
$params[] = $param.('' != $val ? '='.$this->escapeToken($val) : '');
|
| 115 |
}
|
| 116 |
} else {
|
| 117 |
-
$params[] = is_array($val) ? array_map(array($this, 'escapeToken'), $val) : $this->escapeToken($val);
|
| 118 |
}
|
| 119 |
}
|
| 120 |
|
| 56 |
$values = (array) $values;
|
| 57 |
|
| 58 |
foreach ($this->parameters as $k => $v) {
|
| 59 |
+
if (!\is_int($k)) {
|
| 60 |
$v = $k;
|
| 61 |
}
|
| 62 |
|
| 64 |
return false;
|
| 65 |
}
|
| 66 |
|
| 67 |
+
if (\in_array($v, $values)) {
|
| 68 |
return true;
|
| 69 |
}
|
| 70 |
}
|
| 80 |
$values = (array) $values;
|
| 81 |
|
| 82 |
foreach ($this->parameters as $k => $v) {
|
| 83 |
+
if ($onlyParams && ('--' === $k || (\is_int($k) && '--' === $v))) {
|
| 84 |
+
return $default;
|
| 85 |
}
|
| 86 |
|
| 87 |
+
if (\is_int($k)) {
|
| 88 |
+
if (\in_array($v, $values)) {
|
| 89 |
return true;
|
| 90 |
}
|
| 91 |
+
} elseif (\in_array($k, $values)) {
|
| 92 |
return $v;
|
| 93 |
}
|
| 94 |
}
|
| 106 |
$params = array();
|
| 107 |
foreach ($this->parameters as $param => $val) {
|
| 108 |
if ($param && '-' === $param[0]) {
|
| 109 |
+
if (\is_array($val)) {
|
| 110 |
foreach ($val as $v) {
|
| 111 |
$params[] = $param.('' != $v ? '='.$this->escapeToken($v) : '');
|
| 112 |
}
|
| 114 |
$params[] = $param.('' != $val ? '='.$this->escapeToken($val) : '');
|
| 115 |
}
|
| 116 |
} else {
|
| 117 |
+
$params[] = \is_array($val) ? implode(' ', array_map(array($this, 'escapeToken'), $val)) : $this->escapeToken($val);
|
| 118 |
}
|
| 119 |
}
|
| 120 |
|
vendor/symfony/console/Input/Input.php
CHANGED
|
@@ -72,7 +72,7 @@ abstract class Input implements InputInterface, StreamableInputInterface
|
|
| 72 |
return !array_key_exists($argument, $givenArguments) && $definition->getArgument($argument)->isRequired();
|
| 73 |
});
|
| 74 |
|
| 75 |
-
if (count($missingArguments) > 0) {
|
| 76 |
throw new RuntimeException(sprintf('Not enough arguments (missing: "%s").', implode(', ', $missingArguments)));
|
| 77 |
}
|
| 78 |
}
|
| 72 |
return !array_key_exists($argument, $givenArguments) && $definition->getArgument($argument)->isRequired();
|
| 73 |
});
|
| 74 |
|
| 75 |
+
if (\count($missingArguments) > 0) {
|
| 76 |
throw new RuntimeException(sprintf('Not enough arguments (missing: "%s").', implode(', ', $missingArguments)));
|
| 77 |
}
|
| 78 |
}
|
vendor/symfony/console/Input/InputArgument.php
CHANGED
|
@@ -31,10 +31,10 @@ class InputArgument
|
|
| 31 |
private $description;
|
| 32 |
|
| 33 |
/**
|
| 34 |
-
* @param string
|
| 35 |
-
* @param int
|
| 36 |
-
* @param string
|
| 37 |
-
* @param
|
| 38 |
*
|
| 39 |
* @throws InvalidArgumentException When argument mode is not valid
|
| 40 |
*/
|
|
@@ -42,7 +42,7 @@ class InputArgument
|
|
| 42 |
{
|
| 43 |
if (null === $mode) {
|
| 44 |
$mode = self::OPTIONAL;
|
| 45 |
-
} elseif (
|
| 46 |
throw new InvalidArgumentException(sprintf('Argument mode "%s" is not valid.', $mode));
|
| 47 |
}
|
| 48 |
|
|
@@ -86,7 +86,7 @@ class InputArgument
|
|
| 86 |
/**
|
| 87 |
* Sets the default value.
|
| 88 |
*
|
| 89 |
-
* @param
|
| 90 |
*
|
| 91 |
* @throws LogicException When incorrect default value is given
|
| 92 |
*/
|
|
@@ -99,7 +99,7 @@ class InputArgument
|
|
| 99 |
if ($this->isArray()) {
|
| 100 |
if (null === $default) {
|
| 101 |
$default = array();
|
| 102 |
-
} elseif (
|
| 103 |
throw new LogicException('A default value for an array argument must be an array.');
|
| 104 |
}
|
| 105 |
}
|
|
@@ -110,7 +110,7 @@ class InputArgument
|
|
| 110 |
/**
|
| 111 |
* Returns the default value.
|
| 112 |
*
|
| 113 |
-
* @return
|
| 114 |
*/
|
| 115 |
public function getDefault()
|
| 116 |
{
|
| 31 |
private $description;
|
| 32 |
|
| 33 |
/**
|
| 34 |
+
* @param string $name The argument name
|
| 35 |
+
* @param int|null $mode The argument mode: self::REQUIRED or self::OPTIONAL
|
| 36 |
+
* @param string $description A description text
|
| 37 |
+
* @param string|string[]|null $default The default value (for self::OPTIONAL mode only)
|
| 38 |
*
|
| 39 |
* @throws InvalidArgumentException When argument mode is not valid
|
| 40 |
*/
|
| 42 |
{
|
| 43 |
if (null === $mode) {
|
| 44 |
$mode = self::OPTIONAL;
|
| 45 |
+
} elseif (!\is_int($mode) || $mode > 7 || $mode < 1) {
|
| 46 |
throw new InvalidArgumentException(sprintf('Argument mode "%s" is not valid.', $mode));
|
| 47 |
}
|
| 48 |
|
| 86 |
/**
|
| 87 |
* Sets the default value.
|
| 88 |
*
|
| 89 |
+
* @param string|string[]|null $default The default value
|
| 90 |
*
|
| 91 |
* @throws LogicException When incorrect default value is given
|
| 92 |
*/
|
| 99 |
if ($this->isArray()) {
|
| 100 |
if (null === $default) {
|
| 101 |
$default = array();
|
| 102 |
+
} elseif (!\is_array($default)) {
|
| 103 |
throw new LogicException('A default value for an array argument must be an array.');
|
| 104 |
}
|
| 105 |
}
|
| 110 |
/**
|
| 111 |
* Returns the default value.
|
| 112 |
*
|
| 113 |
+
* @return string|string[]|null The default value
|
| 114 |
*/
|
| 115 |
public function getDefault()
|
| 116 |
{
|
vendor/symfony/console/Input/InputDefinition.php
CHANGED
|
@@ -20,8 +20,8 @@ use Symfony\Component\Console\Exception\LogicException;
|
|
| 20 |
* Usage:
|
| 21 |
*
|
| 22 |
* $definition = new InputDefinition(array(
|
| 23 |
-
*
|
| 24 |
-
*
|
| 25 |
* ));
|
| 26 |
*
|
| 27 |
* @author Fabien Potencier <fabien@symfony.com>
|
|
@@ -135,7 +135,7 @@ class InputDefinition
|
|
| 135 |
throw new InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name));
|
| 136 |
}
|
| 137 |
|
| 138 |
-
$arguments = is_int($name) ? array_values($this->arguments) : $this->arguments;
|
| 139 |
|
| 140 |
return $arguments[$name];
|
| 141 |
}
|
|
@@ -149,7 +149,7 @@ class InputDefinition
|
|
| 149 |
*/
|
| 150 |
public function hasArgument($name)
|
| 151 |
{
|
| 152 |
-
$arguments = is_int($name) ? array_values($this->arguments) : $this->arguments;
|
| 153 |
|
| 154 |
return isset($arguments[$name]);
|
| 155 |
}
|
|
@@ -171,7 +171,7 @@ class InputDefinition
|
|
| 171 |
*/
|
| 172 |
public function getArgumentCount()
|
| 173 |
{
|
| 174 |
-
return $this->hasAnArrayArgument ? PHP_INT_MAX : count($this->arguments);
|
| 175 |
}
|
| 176 |
|
| 177 |
/**
|
|
@@ -378,7 +378,7 @@ class InputDefinition
|
|
| 378 |
}
|
| 379 |
}
|
| 380 |
|
| 381 |
-
if (count($elements) && $this->getArguments()) {
|
| 382 |
$elements[] = '[--]';
|
| 383 |
}
|
| 384 |
|
|
@@ -387,7 +387,7 @@ class InputDefinition
|
|
| 387 |
if (!$argument->isRequired()) {
|
| 388 |
$element = '['.$element.']';
|
| 389 |
} elseif ($argument->isArray()) {
|
| 390 |
-
$element
|
| 391 |
}
|
| 392 |
|
| 393 |
if ($argument->isArray()) {
|
| 20 |
* Usage:
|
| 21 |
*
|
| 22 |
* $definition = new InputDefinition(array(
|
| 23 |
+
* new InputArgument('name', InputArgument::REQUIRED),
|
| 24 |
+
* new InputOption('foo', 'f', InputOption::VALUE_REQUIRED),
|
| 25 |
* ));
|
| 26 |
*
|
| 27 |
* @author Fabien Potencier <fabien@symfony.com>
|
| 135 |
throw new InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name));
|
| 136 |
}
|
| 137 |
|
| 138 |
+
$arguments = \is_int($name) ? array_values($this->arguments) : $this->arguments;
|
| 139 |
|
| 140 |
return $arguments[$name];
|
| 141 |
}
|
| 149 |
*/
|
| 150 |
public function hasArgument($name)
|
| 151 |
{
|
| 152 |
+
$arguments = \is_int($name) ? array_values($this->arguments) : $this->arguments;
|
| 153 |
|
| 154 |
return isset($arguments[$name]);
|
| 155 |
}
|
| 171 |
*/
|
| 172 |
public function getArgumentCount()
|
| 173 |
{
|
| 174 |
+
return $this->hasAnArrayArgument ? PHP_INT_MAX : \count($this->arguments);
|
| 175 |
}
|
| 176 |
|
| 177 |
/**
|
| 378 |
}
|
| 379 |
}
|
| 380 |
|
| 381 |
+
if (\count($elements) && $this->getArguments()) {
|
| 382 |
$elements[] = '[--]';
|
| 383 |
}
|
| 384 |
|
| 387 |
if (!$argument->isRequired()) {
|
| 388 |
$element = '['.$element.']';
|
| 389 |
} elseif ($argument->isArray()) {
|
| 390 |
+
$element .= ' ('.$element.')';
|
| 391 |
}
|
| 392 |
|
| 393 |
if ($argument->isArray()) {
|
vendor/symfony/console/Input/InputInterface.php
CHANGED
|
@@ -33,6 +33,8 @@ interface InputInterface
|
|
| 33 |
*
|
| 34 |
* This method is to be used to introspect the input parameters
|
| 35 |
* before they have been validated. It must be used carefully.
|
|
|
|
|
|
|
| 36 |
*
|
| 37 |
* @param string|array $values The values to look for in the raw parameters (can be an array)
|
| 38 |
* @param bool $onlyParams Only check real parameters, skip those following an end of options (--) signal
|
|
@@ -46,6 +48,8 @@ interface InputInterface
|
|
| 46 |
*
|
| 47 |
* This method is to be used to introspect the input parameters
|
| 48 |
* before they have been validated. It must be used carefully.
|
|
|
|
|
|
|
| 49 |
*
|
| 50 |
* @param string|array $values The value(s) to look for in the raw parameters (can be an array)
|
| 51 |
* @param mixed $default The default value to return if no result is found
|
|
@@ -57,6 +61,8 @@ interface InputInterface
|
|
| 57 |
|
| 58 |
/**
|
| 59 |
* Binds the current Input instance with the given arguments and options.
|
|
|
|
|
|
|
| 60 |
*/
|
| 61 |
public function bind(InputDefinition $definition);
|
| 62 |
|
|
@@ -79,7 +85,7 @@ interface InputInterface
|
|
| 79 |
*
|
| 80 |
* @param string $name The argument name
|
| 81 |
*
|
| 82 |
-
* @return
|
| 83 |
*
|
| 84 |
* @throws InvalidArgumentException When argument given doesn't exist
|
| 85 |
*/
|
|
@@ -88,8 +94,8 @@ interface InputInterface
|
|
| 88 |
/**
|
| 89 |
* Sets an argument value by name.
|
| 90 |
*
|
| 91 |
-
* @param string
|
| 92 |
-
* @param string $value The argument value
|
| 93 |
*
|
| 94 |
* @throws InvalidArgumentException When argument given doesn't exist
|
| 95 |
*/
|
|
@@ -116,7 +122,7 @@ interface InputInterface
|
|
| 116 |
*
|
| 117 |
* @param string $name The option name
|
| 118 |
*
|
| 119 |
-
* @return
|
| 120 |
*
|
| 121 |
* @throws InvalidArgumentException When option given doesn't exist
|
| 122 |
*/
|
|
@@ -125,8 +131,8 @@ interface InputInterface
|
|
| 125 |
/**
|
| 126 |
* Sets an option value by name.
|
| 127 |
*
|
| 128 |
-
* @param string
|
| 129 |
-
* @param string|bool $value The option value
|
| 130 |
*
|
| 131 |
* @throws InvalidArgumentException When option given doesn't exist
|
| 132 |
*/
|
| 33 |
*
|
| 34 |
* This method is to be used to introspect the input parameters
|
| 35 |
* before they have been validated. It must be used carefully.
|
| 36 |
+
* Does not necessarily return the correct result for short options
|
| 37 |
+
* when multiple flags are combined in the same option.
|
| 38 |
*
|
| 39 |
* @param string|array $values The values to look for in the raw parameters (can be an array)
|
| 40 |
* @param bool $onlyParams Only check real parameters, skip those following an end of options (--) signal
|
| 48 |
*
|
| 49 |
* This method is to be used to introspect the input parameters
|
| 50 |
* before they have been validated. It must be used carefully.
|
| 51 |
+
* Does not necessarily return the correct result for short options
|
| 52 |
+
* when multiple flags are combined in the same option.
|
| 53 |
*
|
| 54 |
* @param string|array $values The value(s) to look for in the raw parameters (can be an array)
|
| 55 |
* @param mixed $default The default value to return if no result is found
|
| 61 |
|
| 62 |
/**
|
| 63 |
* Binds the current Input instance with the given arguments and options.
|
| 64 |
+
*
|
| 65 |
+
* @throws RuntimeException
|
| 66 |
*/
|
| 67 |
public function bind(InputDefinition $definition);
|
| 68 |
|
| 85 |
*
|
| 86 |
* @param string $name The argument name
|
| 87 |
*
|
| 88 |
+
* @return string|string[]|null The argument value
|
| 89 |
*
|
| 90 |
* @throws InvalidArgumentException When argument given doesn't exist
|
| 91 |
*/
|
| 94 |
/**
|
| 95 |
* Sets an argument value by name.
|
| 96 |
*
|
| 97 |
+
* @param string $name The argument name
|
| 98 |
+
* @param string|string[]|null $value The argument value
|
| 99 |
*
|
| 100 |
* @throws InvalidArgumentException When argument given doesn't exist
|
| 101 |
*/
|
| 122 |
*
|
| 123 |
* @param string $name The option name
|
| 124 |
*
|
| 125 |
+
* @return string|string[]|bool|null The option value
|
| 126 |
*
|
| 127 |
* @throws InvalidArgumentException When option given doesn't exist
|
| 128 |
*/
|
| 131 |
/**
|
| 132 |
* Sets an option value by name.
|
| 133 |
*
|
| 134 |
+
* @param string $name The option name
|
| 135 |
+
* @param string|string[]|bool|null $value The option value
|
| 136 |
*
|
| 137 |
* @throws InvalidArgumentException When option given doesn't exist
|
| 138 |
*/
|
vendor/symfony/console/Input/InputOption.php
CHANGED
|
@@ -33,11 +33,11 @@ class InputOption
|
|
| 33 |
private $description;
|
| 34 |
|
| 35 |
/**
|
| 36 |
-
* @param string
|
| 37 |
-
* @param string|array
|
| 38 |
-
* @param int
|
| 39 |
-
* @param string
|
| 40 |
-
* @param
|
| 41 |
*
|
| 42 |
* @throws InvalidArgumentException If option mode is invalid or incompatible
|
| 43 |
*/
|
|
@@ -56,7 +56,7 @@ class InputOption
|
|
| 56 |
}
|
| 57 |
|
| 58 |
if (null !== $shortcut) {
|
| 59 |
-
if (is_array($shortcut)) {
|
| 60 |
$shortcut = implode('|', $shortcut);
|
| 61 |
}
|
| 62 |
$shortcuts = preg_split('{(\|)-?}', ltrim($shortcut, '-'));
|
|
@@ -70,7 +70,7 @@ class InputOption
|
|
| 70 |
|
| 71 |
if (null === $mode) {
|
| 72 |
$mode = self::VALUE_NONE;
|
| 73 |
-
} elseif (
|
| 74 |
throw new InvalidArgumentException(sprintf('Option mode "%s" is not valid.', $mode));
|
| 75 |
}
|
| 76 |
|
|
@@ -149,7 +149,7 @@ class InputOption
|
|
| 149 |
/**
|
| 150 |
* Sets the default value.
|
| 151 |
*
|
| 152 |
-
* @param
|
| 153 |
*
|
| 154 |
* @throws LogicException When incorrect default value is given
|
| 155 |
*/
|
|
@@ -162,7 +162,7 @@ class InputOption
|
|
| 162 |
if ($this->isArray()) {
|
| 163 |
if (null === $default) {
|
| 164 |
$default = array();
|
| 165 |
-
} elseif (
|
| 166 |
throw new LogicException('A default value for an array option must be an array.');
|
| 167 |
}
|
| 168 |
}
|
|
@@ -173,7 +173,7 @@ class InputOption
|
|
| 173 |
/**
|
| 174 |
* Returns the default value.
|
| 175 |
*
|
| 176 |
-
* @return
|
| 177 |
*/
|
| 178 |
public function getDefault()
|
| 179 |
{
|
|
@@ -195,7 +195,7 @@ class InputOption
|
|
| 195 |
*
|
| 196 |
* @return bool
|
| 197 |
*/
|
| 198 |
-
public function equals(
|
| 199 |
{
|
| 200 |
return $option->getName() === $this->getName()
|
| 201 |
&& $option->getShortcut() === $this->getShortcut()
|
| 33 |
private $description;
|
| 34 |
|
| 35 |
/**
|
| 36 |
+
* @param string $name The option name
|
| 37 |
+
* @param string|array $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts
|
| 38 |
+
* @param int|null $mode The option mode: One of the VALUE_* constants
|
| 39 |
+
* @param string $description A description text
|
| 40 |
+
* @param string|string[]|bool|null $default The default value (must be null for self::VALUE_NONE)
|
| 41 |
*
|
| 42 |
* @throws InvalidArgumentException If option mode is invalid or incompatible
|
| 43 |
*/
|
| 56 |
}
|
| 57 |
|
| 58 |
if (null !== $shortcut) {
|
| 59 |
+
if (\is_array($shortcut)) {
|
| 60 |
$shortcut = implode('|', $shortcut);
|
| 61 |
}
|
| 62 |
$shortcuts = preg_split('{(\|)-?}', ltrim($shortcut, '-'));
|
| 70 |
|
| 71 |
if (null === $mode) {
|
| 72 |
$mode = self::VALUE_NONE;
|
| 73 |
+
} elseif (!\is_int($mode) || $mode > 15 || $mode < 1) {
|
| 74 |
throw new InvalidArgumentException(sprintf('Option mode "%s" is not valid.', $mode));
|
| 75 |
}
|
| 76 |
|
| 149 |
/**
|
| 150 |
* Sets the default value.
|
| 151 |
*
|
| 152 |
+
* @param string|string[]|bool|null $default The default value
|
| 153 |
*
|
| 154 |
* @throws LogicException When incorrect default value is given
|
| 155 |
*/
|
| 162 |
if ($this->isArray()) {
|
| 163 |
if (null === $default) {
|
| 164 |
$default = array();
|
| 165 |
+
} elseif (!\is_array($default)) {
|
| 166 |
throw new LogicException('A default value for an array option must be an array.');
|
| 167 |
}
|
| 168 |
}
|
| 173 |
/**
|
| 174 |
* Returns the default value.
|
| 175 |
*
|
| 176 |
+
* @return string|string[]|bool|null The default value
|
| 177 |
*/
|
| 178 |
public function getDefault()
|
| 179 |
{
|
| 195 |
*
|
| 196 |
* @return bool
|
| 197 |
*/
|
| 198 |
+
public function equals(self $option)
|
| 199 |
{
|
| 200 |
return $option->getName() === $this->getName()
|
| 201 |
&& $option->getShortcut() === $this->getShortcut()
|
vendor/symfony/console/Input/StringInput.php
CHANGED
|
@@ -49,14 +49,14 @@ class StringInput extends ArgvInput
|
|
| 49 |
private function tokenize($input)
|
| 50 |
{
|
| 51 |
$tokens = array();
|
| 52 |
-
$length = strlen($input);
|
| 53 |
$cursor = 0;
|
| 54 |
while ($cursor < $length) {
|
| 55 |
if (preg_match('/\s+/A', $input, $match, null, $cursor)) {
|
| 56 |
} elseif (preg_match('/([^="\'\s]+?)(=?)('.self::REGEX_QUOTED_STRING.'+)/A', $input, $match, null, $cursor)) {
|
| 57 |
-
$tokens[] = $match[1].$match[2].stripcslashes(str_replace(array('"\'', '\'"', '\'\'', '""'), '', substr($match[3], 1, strlen($match[3]) - 2)));
|
| 58 |
} elseif (preg_match('/'.self::REGEX_QUOTED_STRING.'/A', $input, $match, null, $cursor)) {
|
| 59 |
-
$tokens[] = stripcslashes(substr($match[0], 1, strlen($match[0]) - 2));
|
| 60 |
} elseif (preg_match('/'.self::REGEX_STRING.'/A', $input, $match, null, $cursor)) {
|
| 61 |
$tokens[] = stripcslashes($match[1]);
|
| 62 |
} else {
|
|
@@ -64,7 +64,7 @@ class StringInput extends ArgvInput
|
|
| 64 |
throw new InvalidArgumentException(sprintf('Unable to parse input near "... %s ..."', substr($input, $cursor, 10)));
|
| 65 |
}
|
| 66 |
|
| 67 |
-
$cursor += strlen($match[0]);
|
| 68 |
}
|
| 69 |
|
| 70 |
return $tokens;
|
| 49 |
private function tokenize($input)
|
| 50 |
{
|
| 51 |
$tokens = array();
|
| 52 |
+
$length = \strlen($input);
|
| 53 |
$cursor = 0;
|
| 54 |
while ($cursor < $length) {
|
| 55 |
if (preg_match('/\s+/A', $input, $match, null, $cursor)) {
|
| 56 |
} elseif (preg_match('/([^="\'\s]+?)(=?)('.self::REGEX_QUOTED_STRING.'+)/A', $input, $match, null, $cursor)) {
|
| 57 |
+
$tokens[] = $match[1].$match[2].stripcslashes(str_replace(array('"\'', '\'"', '\'\'', '""'), '', substr($match[3], 1, \strlen($match[3]) - 2)));
|
| 58 |
} elseif (preg_match('/'.self::REGEX_QUOTED_STRING.'/A', $input, $match, null, $cursor)) {
|
| 59 |
+
$tokens[] = stripcslashes(substr($match[0], 1, \strlen($match[0]) - 2));
|
| 60 |
} elseif (preg_match('/'.self::REGEX_STRING.'/A', $input, $match, null, $cursor)) {
|
| 61 |
$tokens[] = stripcslashes($match[1]);
|
| 62 |
} else {
|
| 64 |
throw new InvalidArgumentException(sprintf('Unable to parse input near "... %s ..."', substr($input, $cursor, 10)));
|
| 65 |
}
|
| 66 |
|
| 67 |
+
$cursor += \strlen($match[0]);
|
| 68 |
}
|
| 69 |
|
| 70 |
return $tokens;
|
vendor/symfony/console/Logger/ConsoleLogger.php
CHANGED
|
@@ -14,8 +14,8 @@ namespace Symfony\Component\Console\Logger;
|
|
| 14 |
use Psr\Log\AbstractLogger;
|
| 15 |
use Psr\Log\InvalidArgumentException;
|
| 16 |
use Psr\Log\LogLevel;
|
| 17 |
-
use Symfony\Component\Console\Output\OutputInterface;
|
| 18 |
use Symfony\Component\Console\Output\ConsoleOutputInterface;
|
|
|
|
| 19 |
|
| 20 |
/**
|
| 21 |
* PSR-3 compliant console logger.
|
|
@@ -87,6 +87,8 @@ class ConsoleLogger extends AbstractLogger
|
|
| 87 |
|
| 88 |
/**
|
| 89 |
* Returns true when any messages have been logged at error levels.
|
|
|
|
|
|
|
| 90 |
*/
|
| 91 |
public function hasErrored()
|
| 92 |
{
|
|
@@ -105,15 +107,23 @@ class ConsoleLogger extends AbstractLogger
|
|
| 105 |
*/
|
| 106 |
private function interpolate($message, array $context)
|
| 107 |
{
|
| 108 |
-
|
| 109 |
-
|
|
|
|
|
|
|
|
|
|
| 110 |
foreach ($context as $key => $val) {
|
| 111 |
-
if (
|
| 112 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 113 |
}
|
| 114 |
}
|
| 115 |
|
| 116 |
-
|
| 117 |
-
return strtr($message, $replace);
|
| 118 |
}
|
| 119 |
}
|
| 14 |
use Psr\Log\AbstractLogger;
|
| 15 |
use Psr\Log\InvalidArgumentException;
|
| 16 |
use Psr\Log\LogLevel;
|
|
|
|
| 17 |
use Symfony\Component\Console\Output\ConsoleOutputInterface;
|
| 18 |
+
use Symfony\Component\Console\Output\OutputInterface;
|
| 19 |
|
| 20 |
/**
|
| 21 |
* PSR-3 compliant console logger.
|
| 87 |
|
| 88 |
/**
|
| 89 |
* Returns true when any messages have been logged at error levels.
|
| 90 |
+
*
|
| 91 |
+
* @return bool
|
| 92 |
*/
|
| 93 |
public function hasErrored()
|
| 94 |
{
|
| 107 |
*/
|
| 108 |
private function interpolate($message, array $context)
|
| 109 |
{
|
| 110 |
+
if (false === strpos($message, '{')) {
|
| 111 |
+
return $message;
|
| 112 |
+
}
|
| 113 |
+
|
| 114 |
+
$replacements = array();
|
| 115 |
foreach ($context as $key => $val) {
|
| 116 |
+
if (null === $val || is_scalar($val) || (\is_object($val) && method_exists($val, '__toString'))) {
|
| 117 |
+
$replacements["{{$key}}"] = $val;
|
| 118 |
+
} elseif ($val instanceof \DateTimeInterface) {
|
| 119 |
+
$replacements["{{$key}}"] = $val->format(\DateTime::RFC3339);
|
| 120 |
+
} elseif (\is_object($val)) {
|
| 121 |
+
$replacements["{{$key}}"] = '[object '.\get_class($val).']';
|
| 122 |
+
} else {
|
| 123 |
+
$replacements["{{$key}}"] = '['.\gettype($val).']';
|
| 124 |
}
|
| 125 |
}
|
| 126 |
|
| 127 |
+
return strtr($message, $replacements);
|
|
|
|
| 128 |
}
|
| 129 |
}
|
vendor/symfony/console/Output/ConsoleOutput.php
CHANGED
|
@@ -122,7 +122,7 @@ class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface
|
|
| 122 |
private function isRunningOS400()
|
| 123 |
{
|
| 124 |
$checks = array(
|
| 125 |
-
function_exists('php_uname') ? php_uname('s') : '',
|
| 126 |
getenv('OSTYPE'),
|
| 127 |
PHP_OS,
|
| 128 |
);
|
| 122 |
private function isRunningOS400()
|
| 123 |
{
|
| 124 |
$checks = array(
|
| 125 |
+
\function_exists('php_uname') ? php_uname('s') : '',
|
| 126 |
getenv('OSTYPE'),
|
| 127 |
PHP_OS,
|
| 128 |
);
|
vendor/symfony/console/Output/Output.php
CHANGED
|
@@ -11,8 +11,8 @@
|
|
| 11 |
|
| 12 |
namespace Symfony\Component\Console\Output;
|
| 13 |
|
| 14 |
-
use Symfony\Component\Console\Formatter\OutputFormatterInterface;
|
| 15 |
use Symfony\Component\Console\Formatter\OutputFormatter;
|
|
|
|
| 16 |
|
| 17 |
/**
|
| 18 |
* Base class for output classes.
|
| 11 |
|
| 12 |
namespace Symfony\Component\Console\Output;
|
| 13 |
|
|
|
|
| 14 |
use Symfony\Component\Console\Formatter\OutputFormatter;
|
| 15 |
+
use Symfony\Component\Console\Formatter\OutputFormatterInterface;
|
| 16 |
|
| 17 |
/**
|
| 18 |
* Base class for output classes.
|
vendor/symfony/console/Output/OutputInterface.php
CHANGED
|
@@ -33,7 +33,7 @@ interface OutputInterface
|
|
| 33 |
/**
|
| 34 |
* Writes a message to the output.
|
| 35 |
*
|
| 36 |
-
* @param string|array $messages The message as an array of
|
| 37 |
* @param bool $newline Whether to add a newline
|
| 38 |
* @param int $options A bitmask of options (one of the OUTPUT or VERBOSITY constants), 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL
|
| 39 |
*/
|
|
@@ -42,7 +42,7 @@ interface OutputInterface
|
|
| 42 |
/**
|
| 43 |
* Writes a message to the output and adds a newline at the end.
|
| 44 |
*
|
| 45 |
-
* @param string|array $messages The message as an array of
|
| 46 |
* @param int $options A bitmask of options (one of the OUTPUT or VERBOSITY constants), 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL
|
| 47 |
*/
|
| 48 |
public function writeln($messages, $options = 0);
|
| 33 |
/**
|
| 34 |
* Writes a message to the output.
|
| 35 |
*
|
| 36 |
+
* @param string|array $messages The message as an array of strings or a single string
|
| 37 |
* @param bool $newline Whether to add a newline
|
| 38 |
* @param int $options A bitmask of options (one of the OUTPUT or VERBOSITY constants), 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL
|
| 39 |
*/
|
| 42 |
/**
|
| 43 |
* Writes a message to the output and adds a newline at the end.
|
| 44 |
*
|
| 45 |
+
* @param string|array $messages The message as an array of strings or a single string
|
| 46 |
* @param int $options A bitmask of options (one of the OUTPUT or VERBOSITY constants), 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL
|
| 47 |
*/
|
| 48 |
public function writeln($messages, $options = 0);
|
vendor/symfony/console/Output/StreamOutput.php
CHANGED
|
@@ -20,11 +20,11 @@ use Symfony\Component\Console\Formatter\OutputFormatterInterface;
|
|
| 20 |
*
|
| 21 |
* Usage:
|
| 22 |
*
|
| 23 |
-
*
|
| 24 |
*
|
| 25 |
* As `StreamOutput` can use any stream, you can also use a file:
|
| 26 |
*
|
| 27 |
-
*
|
| 28 |
*
|
| 29 |
* @author Fabien Potencier <fabien@symfony.com>
|
| 30 |
*/
|
|
@@ -42,7 +42,7 @@ class StreamOutput extends Output
|
|
| 42 |
*/
|
| 43 |
public function __construct($stream, $verbosity = self::VERBOSITY_NORMAL, $decorated = null, OutputFormatterInterface $formatter = null)
|
| 44 |
{
|
| 45 |
-
if (
|
| 46 |
throw new InvalidArgumentException('The StreamOutput class needs a stream as its first argument.');
|
| 47 |
}
|
| 48 |
|
|
@@ -83,21 +83,38 @@ class StreamOutput extends Output
|
|
| 83 |
*
|
| 84 |
* Colorization is disabled if not supported by the stream:
|
| 85 |
*
|
| 86 |
-
*
|
| 87 |
-
*
|
|
|
|
|
|
|
|
|
|
| 88 |
*
|
| 89 |
* @return bool true if the stream supports colorization, false otherwise
|
| 90 |
*/
|
| 91 |
protected function hasColorSupport()
|
| 92 |
{
|
| 93 |
-
if (
|
| 94 |
-
return
|
| 95 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 96 |
|| false !== getenv('ANSICON')
|
| 97 |
|| 'ON' === getenv('ConEmuANSI')
|
| 98 |
|| 'xterm' === getenv('TERM');
|
| 99 |
}
|
| 100 |
|
| 101 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 102 |
}
|
| 103 |
}
|
| 20 |
*
|
| 21 |
* Usage:
|
| 22 |
*
|
| 23 |
+
* $output = new StreamOutput(fopen('php://stdout', 'w'));
|
| 24 |
*
|
| 25 |
* As `StreamOutput` can use any stream, you can also use a file:
|
| 26 |
*
|
| 27 |
+
* $output = new StreamOutput(fopen('/path/to/output.log', 'a', false));
|
| 28 |
*
|
| 29 |
* @author Fabien Potencier <fabien@symfony.com>
|
| 30 |
*/
|
| 42 |
*/
|
| 43 |
public function __construct($stream, $verbosity = self::VERBOSITY_NORMAL, $decorated = null, OutputFormatterInterface $formatter = null)
|
| 44 |
{
|
| 45 |
+
if (!\is_resource($stream) || 'stream' !== get_resource_type($stream)) {
|
| 46 |
throw new InvalidArgumentException('The StreamOutput class needs a stream as its first argument.');
|
| 47 |
}
|
| 48 |
|
| 83 |
*
|
| 84 |
* Colorization is disabled if not supported by the stream:
|
| 85 |
*
|
| 86 |
+
* This is tricky on Windows, because Cygwin, Msys2 etc emulate pseudo
|
| 87 |
+
* terminals via named pipes, so we can only check the environment.
|
| 88 |
+
*
|
| 89 |
+
* Reference: Composer\XdebugHandler\Process::supportsColor
|
| 90 |
+
* https://github.com/composer/xdebug-handler
|
| 91 |
*
|
| 92 |
* @return bool true if the stream supports colorization, false otherwise
|
| 93 |
*/
|
| 94 |
protected function hasColorSupport()
|
| 95 |
{
|
| 96 |
+
if ('Hyper' === getenv('TERM_PROGRAM')) {
|
| 97 |
+
return true;
|
| 98 |
+
}
|
| 99 |
+
|
| 100 |
+
if (\DIRECTORY_SEPARATOR === '\\') {
|
| 101 |
+
return (\function_exists('sapi_windows_vt100_support')
|
| 102 |
+
&& @sapi_windows_vt100_support($this->stream))
|
| 103 |
|| false !== getenv('ANSICON')
|
| 104 |
|| 'ON' === getenv('ConEmuANSI')
|
| 105 |
|| 'xterm' === getenv('TERM');
|
| 106 |
}
|
| 107 |
|
| 108 |
+
if (\function_exists('stream_isatty')) {
|
| 109 |
+
return @stream_isatty($this->stream);
|
| 110 |
+
}
|
| 111 |
+
|
| 112 |
+
if (\function_exists('posix_isatty')) {
|
| 113 |
+
return @posix_isatty($this->stream);
|
| 114 |
+
}
|
| 115 |
+
|
| 116 |
+
$stat = @fstat($this->stream);
|
| 117 |
+
// Check if formatted mode is S_IFCHR
|
| 118 |
+
return $stat ? 0020000 === ($stat['mode'] & 0170000) : false;
|
| 119 |
}
|
| 120 |
}
|
vendor/symfony/console/Question/ChoiceQuestion.php
CHANGED
|
@@ -156,7 +156,7 @@ class ChoiceQuestion extends Question
|
|
| 156 |
}
|
| 157 |
}
|
| 158 |
|
| 159 |
-
if (count($results) > 1) {
|
| 160 |
throw new InvalidArgumentException(sprintf('The provided answer is ambiguous. Value should be one of %s.', implode(' or ', $results)));
|
| 161 |
}
|
| 162 |
|
| 156 |
}
|
| 157 |
}
|
| 158 |
|
| 159 |
+
if (\count($results) > 1) {
|
| 160 |
throw new InvalidArgumentException(sprintf('The provided answer is ambiguous. Value should be one of %s.', implode(' or ', $results)));
|
| 161 |
}
|
| 162 |
|
vendor/symfony/console/Question/ConfirmationQuestion.php
CHANGED
|
@@ -44,7 +44,7 @@ class ConfirmationQuestion extends Question
|
|
| 44 |
$regex = $this->trueAnswerRegex;
|
| 45 |
|
| 46 |
return function ($answer) use ($default, $regex) {
|
| 47 |
-
if (is_bool($answer)) {
|
| 48 |
return $answer;
|
| 49 |
}
|
| 50 |
|
| 44 |
$regex = $this->trueAnswerRegex;
|
| 45 |
|
| 46 |
return function ($answer) use ($default, $regex) {
|
| 47 |
+
if (\is_bool($answer)) {
|
| 48 |
return $answer;
|
| 49 |
}
|
| 50 |
|
vendor/symfony/console/Question/Question.php
CHANGED
|
@@ -117,7 +117,7 @@ class Question
|
|
| 117 |
/**
|
| 118 |
* Gets values for the autocompleter.
|
| 119 |
*
|
| 120 |
-
* @return null
|
| 121 |
*/
|
| 122 |
public function getAutocompleterValues()
|
| 123 |
{
|
|
@@ -127,7 +127,7 @@ class Question
|
|
| 127 |
/**
|
| 128 |
* Sets values for the autocompleter.
|
| 129 |
*
|
| 130 |
-
* @param null
|
| 131 |
*
|
| 132 |
* @return $this
|
| 133 |
*
|
|
@@ -136,11 +136,11 @@ class Question
|
|
| 136 |
*/
|
| 137 |
public function setAutocompleterValues($values)
|
| 138 |
{
|
| 139 |
-
if (is_array($values)) {
|
| 140 |
$values = $this->isAssoc($values) ? array_merge(array_keys($values), array_values($values)) : array_values($values);
|
| 141 |
}
|
| 142 |
|
| 143 |
-
if (null !== $values &&
|
| 144 |
throw new InvalidArgumentException('Autocompleter values can be either an array, `null` or a `Traversable` object.');
|
| 145 |
}
|
| 146 |
|
|
@@ -156,7 +156,7 @@ class Question
|
|
| 156 |
/**
|
| 157 |
* Sets a validator for the question.
|
| 158 |
*
|
| 159 |
-
* @param null
|
| 160 |
*
|
| 161 |
* @return $this
|
| 162 |
*/
|
|
@@ -170,7 +170,7 @@ class Question
|
|
| 170 |
/**
|
| 171 |
* Gets the validator for the question.
|
| 172 |
*
|
| 173 |
-
* @return null
|
| 174 |
*/
|
| 175 |
public function getValidator()
|
| 176 |
{
|
|
@@ -182,7 +182,7 @@ class Question
|
|
| 182 |
*
|
| 183 |
* Null means an unlimited number of attempts.
|
| 184 |
*
|
| 185 |
-
* @param null
|
| 186 |
*
|
| 187 |
* @return $this
|
| 188 |
*
|
|
@@ -204,7 +204,7 @@ class Question
|
|
| 204 |
*
|
| 205 |
* Null means an unlimited number of attempts.
|
| 206 |
*
|
| 207 |
-
* @return null
|
| 208 |
*/
|
| 209 |
public function getMaxAttempts()
|
| 210 |
{
|
|
@@ -241,6 +241,6 @@ class Question
|
|
| 241 |
|
| 242 |
protected function isAssoc($array)
|
| 243 |
{
|
| 244 |
-
return (bool) count(array_filter(array_keys($array), 'is_string'));
|
| 245 |
}
|
| 246 |
}
|
| 117 |
/**
|
| 118 |
* Gets values for the autocompleter.
|
| 119 |
*
|
| 120 |
+
* @return iterable|null
|
| 121 |
*/
|
| 122 |
public function getAutocompleterValues()
|
| 123 |
{
|
| 127 |
/**
|
| 128 |
* Sets values for the autocompleter.
|
| 129 |
*
|
| 130 |
+
* @param iterable|null $values
|
| 131 |
*
|
| 132 |
* @return $this
|
| 133 |
*
|
| 136 |
*/
|
| 137 |
public function setAutocompleterValues($values)
|
| 138 |
{
|
| 139 |
+
if (\is_array($values)) {
|
| 140 |
$values = $this->isAssoc($values) ? array_merge(array_keys($values), array_values($values)) : array_values($values);
|
| 141 |
}
|
| 142 |
|
| 143 |
+
if (null !== $values && !\is_array($values) && !$values instanceof \Traversable) {
|
| 144 |
throw new InvalidArgumentException('Autocompleter values can be either an array, `null` or a `Traversable` object.');
|
| 145 |
}
|
| 146 |
|
| 156 |
/**
|
| 157 |
* Sets a validator for the question.
|
| 158 |
*
|
| 159 |
+
* @param callable|null $validator
|
| 160 |
*
|
| 161 |
* @return $this
|
| 162 |
*/
|
| 170 |
/**
|
| 171 |
* Gets the validator for the question.
|
| 172 |
*
|
| 173 |
+
* @return callable|null
|
| 174 |
*/
|
| 175 |
public function getValidator()
|
| 176 |
{
|
| 182 |
*
|
| 183 |
* Null means an unlimited number of attempts.
|
| 184 |
*
|
| 185 |
+
* @param int|null $attempts
|
| 186 |
*
|
| 187 |
* @return $this
|
| 188 |
*
|
| 204 |
*
|
| 205 |
* Null means an unlimited number of attempts.
|
| 206 |
*
|
| 207 |
+
* @return int|null
|
| 208 |
*/
|
| 209 |
public function getMaxAttempts()
|
| 210 |
{
|
| 241 |
|
| 242 |
protected function isAssoc($array)
|
| 243 |
{
|
| 244 |
+
return (bool) \count(array_filter(array_keys($array), 'is_string'));
|
| 245 |
}
|
| 246 |
}
|
vendor/symfony/console/Style/OutputStyle.php
CHANGED
|
@@ -13,8 +13,8 @@ namespace Symfony\Component\Console\Style;
|
|
| 13 |
|
| 14 |
use Symfony\Component\Console\Formatter\OutputFormatterInterface;
|
| 15 |
use Symfony\Component\Console\Helper\ProgressBar;
|
| 16 |
-
use Symfony\Component\Console\Output\OutputInterface;
|
| 17 |
use Symfony\Component\Console\Output\ConsoleOutputInterface;
|
|
|
|
| 18 |
|
| 19 |
/**
|
| 20 |
* Decorates output to add console style guide helpers.
|
| 13 |
|
| 14 |
use Symfony\Component\Console\Formatter\OutputFormatterInterface;
|
| 15 |
use Symfony\Component\Console\Helper\ProgressBar;
|
|
|
|
| 16 |
use Symfony\Component\Console\Output\ConsoleOutputInterface;
|
| 17 |
+
use Symfony\Component\Console\Output\OutputInterface;
|
| 18 |
|
| 19 |
/**
|
| 20 |
* Decorates output to add console style guide helpers.
|
vendor/symfony/console/Style/SymfonyStyle.php
CHANGED
|
@@ -46,7 +46,7 @@ class SymfonyStyle extends OutputStyle
|
|
| 46 |
$this->bufferedOutput = new BufferedOutput($output->getVerbosity(), false, clone $output->getFormatter());
|
| 47 |
// Windows cmd wraps lines as soon as the terminal width is reached, whether there are following chars or not.
|
| 48 |
$width = (new Terminal())->getWidth() ?: self::MAX_LINE_LENGTH;
|
| 49 |
-
$this->lineLength = min($width - (int) (DIRECTORY_SEPARATOR === '\\'), self::MAX_LINE_LENGTH);
|
| 50 |
|
| 51 |
parent::__construct($output);
|
| 52 |
}
|
|
@@ -63,7 +63,7 @@ class SymfonyStyle extends OutputStyle
|
|
| 63 |
*/
|
| 64 |
public function block($messages, $type = null, $style = null, $prefix = ' ', $padding = false, $escape = true)
|
| 65 |
{
|
| 66 |
-
$messages = is_array($messages) ? array_values($messages) : array($messages);
|
| 67 |
|
| 68 |
$this->autoPrependBlock();
|
| 69 |
$this->writeln($this->createBlock($messages, $type, $style, $prefix, $padding, $escape));
|
|
@@ -117,7 +117,7 @@ class SymfonyStyle extends OutputStyle
|
|
| 117 |
{
|
| 118 |
$this->autoPrependText();
|
| 119 |
|
| 120 |
-
$messages = is_array($message) ? array_values($message) : array($message);
|
| 121 |
foreach ($messages as $message) {
|
| 122 |
$this->writeln(sprintf(' %s', $message));
|
| 123 |
}
|
|
@@ -269,7 +269,7 @@ class SymfonyStyle extends OutputStyle
|
|
| 269 |
{
|
| 270 |
$progressBar = parent::createProgressBar($max);
|
| 271 |
|
| 272 |
-
if ('\\' !== DIRECTORY_SEPARATOR) {
|
| 273 |
$progressBar->setEmptyBarCharacter('░'); // light shade character \u2591
|
| 274 |
$progressBar->setProgressCharacter('');
|
| 275 |
$progressBar->setBarCharacter('▓'); // dark shade character \u2593
|
|
@@ -387,7 +387,7 @@ class SymfonyStyle extends OutputStyle
|
|
| 387 |
|
| 388 |
if (null !== $type) {
|
| 389 |
$type = sprintf('[%s] ', $type);
|
| 390 |
-
$indentLength = strlen($type);
|
| 391 |
$lineIndentation = str_repeat(' ', $indentLength);
|
| 392 |
}
|
| 393 |
|
|
@@ -399,7 +399,7 @@ class SymfonyStyle extends OutputStyle
|
|
| 399 |
|
| 400 |
$lines = array_merge($lines, explode(PHP_EOL, wordwrap($message, $this->lineLength - $prefixLength - $indentLength, PHP_EOL, true)));
|
| 401 |
|
| 402 |
-
if (count($messages) > 1 && $key < count($messages) - 1) {
|
| 403 |
$lines[] = '';
|
| 404 |
}
|
| 405 |
}
|
| 46 |
$this->bufferedOutput = new BufferedOutput($output->getVerbosity(), false, clone $output->getFormatter());
|
| 47 |
// Windows cmd wraps lines as soon as the terminal width is reached, whether there are following chars or not.
|
| 48 |
$width = (new Terminal())->getWidth() ?: self::MAX_LINE_LENGTH;
|
| 49 |
+
$this->lineLength = min($width - (int) (\DIRECTORY_SEPARATOR === '\\'), self::MAX_LINE_LENGTH);
|
| 50 |
|
| 51 |
parent::__construct($output);
|
| 52 |
}
|
| 63 |
*/
|
| 64 |
public function block($messages, $type = null, $style = null, $prefix = ' ', $padding = false, $escape = true)
|
| 65 |
{
|
| 66 |
+
$messages = \is_array($messages) ? array_values($messages) : array($messages);
|
| 67 |
|
| 68 |
$this->autoPrependBlock();
|
| 69 |
$this->writeln($this->createBlock($messages, $type, $style, $prefix, $padding, $escape));
|
| 117 |
{
|
| 118 |
$this->autoPrependText();
|
| 119 |
|
| 120 |
+
$messages = \is_array($message) ? array_values($message) : array($message);
|
| 121 |
foreach ($messages as $message) {
|
| 122 |
$this->writeln(sprintf(' %s', $message));
|
| 123 |
}
|
| 269 |
{
|
| 270 |
$progressBar = parent::createProgressBar($max);
|
| 271 |
|
| 272 |
+
if ('\\' !== \DIRECTORY_SEPARATOR || 'Hyper' === getenv('TERM_PROGRAM')) {
|
| 273 |
$progressBar->setEmptyBarCharacter('░'); // light shade character \u2591
|
| 274 |
$progressBar->setProgressCharacter('');
|
| 275 |
$progressBar->setBarCharacter('▓'); // dark shade character \u2593
|
| 387 |
|
| 388 |
if (null !== $type) {
|
| 389 |
$type = sprintf('[%s] ', $type);
|
| 390 |
+
$indentLength = \strlen($type);
|
| 391 |
$lineIndentation = str_repeat(' ', $indentLength);
|
| 392 |
}
|
| 393 |
|
| 399 |
|
| 400 |
$lines = array_merge($lines, explode(PHP_EOL, wordwrap($message, $this->lineLength - $prefixLength - $indentLength, PHP_EOL, true)));
|
| 401 |
|
| 402 |
+
if (\count($messages) > 1 && $key < \count($messages) - 1) {
|
| 403 |
$lines[] = '';
|
| 404 |
}
|
| 405 |
}
|
vendor/symfony/console/Terminal.php
CHANGED
|
@@ -56,7 +56,7 @@ class Terminal
|
|
| 56 |
|
| 57 |
private static function initDimensions()
|
| 58 |
{
|
| 59 |
-
if ('\\' === DIRECTORY_SEPARATOR) {
|
| 60 |
if (preg_match('/^(\d+)x(\d+)(?: \((\d+)x(\d+)\))?$/', trim(getenv('ANSICON')), $matches)) {
|
| 61 |
// extract [w, H] from "wxh (WxH)"
|
| 62 |
// or [w, h] from "wxh"
|
|
@@ -87,7 +87,7 @@ class Terminal
|
|
| 87 |
*/
|
| 88 |
private static function getConsoleMode()
|
| 89 |
{
|
| 90 |
-
if (
|
| 91 |
return;
|
| 92 |
}
|
| 93 |
|
|
@@ -96,7 +96,7 @@ class Terminal
|
|
| 96 |
2 => array('pipe', 'w'),
|
| 97 |
);
|
| 98 |
$process = proc_open('mode CON', $descriptorspec, $pipes, null, null, array('suppress_errors' => true));
|
| 99 |
-
if (is_resource($process)) {
|
| 100 |
$info = stream_get_contents($pipes[1]);
|
| 101 |
fclose($pipes[1]);
|
| 102 |
fclose($pipes[2]);
|
|
@@ -115,7 +115,7 @@ class Terminal
|
|
| 115 |
*/
|
| 116 |
private static function getSttyColumns()
|
| 117 |
{
|
| 118 |
-
if (
|
| 119 |
return;
|
| 120 |
}
|
| 121 |
|
|
@@ -125,7 +125,7 @@ class Terminal
|
|
| 125 |
);
|
| 126 |
|
| 127 |
$process = proc_open('stty -a | grep columns', $descriptorspec, $pipes, null, null, array('suppress_errors' => true));
|
| 128 |
-
if (is_resource($process)) {
|
| 129 |
$info = stream_get_contents($pipes[1]);
|
| 130 |
fclose($pipes[1]);
|
| 131 |
fclose($pipes[2]);
|
| 56 |
|
| 57 |
private static function initDimensions()
|
| 58 |
{
|
| 59 |
+
if ('\\' === \DIRECTORY_SEPARATOR) {
|
| 60 |
if (preg_match('/^(\d+)x(\d+)(?: \((\d+)x(\d+)\))?$/', trim(getenv('ANSICON')), $matches)) {
|
| 61 |
// extract [w, H] from "wxh (WxH)"
|
| 62 |
// or [w, h] from "wxh"
|
| 87 |
*/
|
| 88 |
private static function getConsoleMode()
|
| 89 |
{
|
| 90 |
+
if (!\function_exists('proc_open')) {
|
| 91 |
return;
|
| 92 |
}
|
| 93 |
|
| 96 |
2 => array('pipe', 'w'),
|
| 97 |
);
|
| 98 |
$process = proc_open('mode CON', $descriptorspec, $pipes, null, null, array('suppress_errors' => true));
|
| 99 |
+
if (\is_resource($process)) {
|
| 100 |
$info = stream_get_contents($pipes[1]);
|
| 101 |
fclose($pipes[1]);
|
| 102 |
fclose($pipes[2]);
|
| 115 |
*/
|
| 116 |
private static function getSttyColumns()
|
| 117 |
{
|
| 118 |
+
if (!\function_exists('proc_open')) {
|
| 119 |
return;
|
| 120 |
}
|
| 121 |
|
| 125 |
);
|
| 126 |
|
| 127 |
$process = proc_open('stty -a | grep columns', $descriptorspec, $pipes, null, null, array('suppress_errors' => true));
|
| 128 |
+
if (\is_resource($process)) {
|
| 129 |
$info = stream_get_contents($pipes[1]);
|
| 130 |
fclose($pipes[1]);
|
| 131 |
fclose($pipes[2]);
|
vendor/symfony/console/Tester/CommandTester.php
CHANGED
|
@@ -13,9 +13,9 @@ namespace Symfony\Component\Console\Tester;
|
|
| 13 |
|
| 14 |
use Symfony\Component\Console\Command\Command;
|
| 15 |
use Symfony\Component\Console\Input\ArrayInput;
|
| 16 |
-
use Symfony\Component\Console\Output\StreamOutput;
|
| 17 |
use Symfony\Component\Console\Input\InputInterface;
|
| 18 |
use Symfony\Component\Console\Output\OutputInterface;
|
|
|
|
| 19 |
|
| 20 |
/**
|
| 21 |
* Eases the testing of console commands.
|
| 13 |
|
| 14 |
use Symfony\Component\Console\Command\Command;
|
| 15 |
use Symfony\Component\Console\Input\ArrayInput;
|
|
|
|
| 16 |
use Symfony\Component\Console\Input\InputInterface;
|
| 17 |
use Symfony\Component\Console\Output\OutputInterface;
|
| 18 |
+
use Symfony\Component\Console\Output\StreamOutput;
|
| 19 |
|
| 20 |
/**
|
| 21 |
* Eases the testing of console commands.
|
vendor/symfony/console/Tests/ApplicationTest.php
CHANGED
|
@@ -13,24 +13,28 @@ namespace Symfony\Component\Console\Tests;
|
|
| 13 |
|
| 14 |
use PHPUnit\Framework\TestCase;
|
| 15 |
use Symfony\Component\Console\Application;
|
| 16 |
-
use Symfony\Component\Console\
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
use Symfony\Component\Console\Helper\FormatterHelper;
|
|
|
|
| 18 |
use Symfony\Component\Console\Input\ArgvInput;
|
| 19 |
use Symfony\Component\Console\Input\ArrayInput;
|
| 20 |
-
use Symfony\Component\Console\Input\InputInterface;
|
| 21 |
use Symfony\Component\Console\Input\InputArgument;
|
| 22 |
use Symfony\Component\Console\Input\InputDefinition;
|
|
|
|
| 23 |
use Symfony\Component\Console\Input\InputOption;
|
| 24 |
use Symfony\Component\Console\Output\NullOutput;
|
| 25 |
use Symfony\Component\Console\Output\Output;
|
| 26 |
use Symfony\Component\Console\Output\OutputInterface;
|
| 27 |
use Symfony\Component\Console\Output\StreamOutput;
|
| 28 |
use Symfony\Component\Console\Tester\ApplicationTester;
|
| 29 |
-
use Symfony\Component\
|
| 30 |
-
use Symfony\Component\Console\Event\ConsoleErrorEvent;
|
| 31 |
-
use Symfony\Component\Console\Event\ConsoleExceptionEvent;
|
| 32 |
-
use Symfony\Component\Console\Event\ConsoleTerminateEvent;
|
| 33 |
-
use Symfony\Component\Console\Exception\CommandNotFoundException;
|
| 34 |
use Symfony\Component\EventDispatcher\EventDispatcher;
|
| 35 |
|
| 36 |
class ApplicationTest extends TestCase
|
|
@@ -47,6 +51,8 @@ class ApplicationTest extends TestCase
|
|
| 47 |
require_once self::$fixturesPath.'/Foo3Command.php';
|
| 48 |
require_once self::$fixturesPath.'/Foo4Command.php';
|
| 49 |
require_once self::$fixturesPath.'/Foo5Command.php';
|
|
|
|
|
|
|
| 50 |
require_once self::$fixturesPath.'/FoobarCommand.php';
|
| 51 |
require_once self::$fixturesPath.'/BarBucCommand.php';
|
| 52 |
require_once self::$fixturesPath.'/FooSubnamespaced1Command.php';
|
|
@@ -117,6 +123,25 @@ class ApplicationTest extends TestCase
|
|
| 117 |
$this->assertCount(1, $commands, '->all() takes a namespace as its first argument');
|
| 118 |
}
|
| 119 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 120 |
public function testRegister()
|
| 121 |
{
|
| 122 |
$application = new Application();
|
|
@@ -169,6 +194,30 @@ class ApplicationTest extends TestCase
|
|
| 169 |
$this->assertInstanceOf('Symfony\Component\Console\Command\HelpCommand', $command, '->get() returns the help command if --help is provided as the input');
|
| 170 |
}
|
| 171 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 172 |
public function testSilentHelp()
|
| 173 |
{
|
| 174 |
$application = new Application();
|
|
@@ -280,6 +329,55 @@ class ApplicationTest extends TestCase
|
|
| 280 |
$this->assertInstanceOf('FooCommand', $application->find('a'), '->find() returns a command if the abbreviation exists for an alias');
|
| 281 |
}
|
| 282 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 283 |
/**
|
| 284 |
* @dataProvider provideAmbiguousAbbreviations
|
| 285 |
*/
|
|
@@ -363,8 +461,8 @@ class ApplicationTest extends TestCase
|
|
| 363 |
public function provideInvalidCommandNamesSingle()
|
| 364 |
{
|
| 365 |
return array(
|
| 366 |
-
array('foo3:
|
| 367 |
-
array('
|
| 368 |
);
|
| 369 |
}
|
| 370 |
|
|
@@ -630,10 +728,10 @@ class ApplicationTest extends TestCase
|
|
| 630 |
$tester = new ApplicationTester($application);
|
| 631 |
|
| 632 |
$tester->run(array('command' => 'foo'), array('decorated' => false, 'capture_stderr_separately' => true));
|
| 633 |
-
$this->
|
| 634 |
|
| 635 |
$tester->run(array('command' => 'foo'), array('decorated' => true, 'capture_stderr_separately' => true));
|
| 636 |
-
$this->
|
| 637 |
|
| 638 |
$application = new Application();
|
| 639 |
$application->setAutoExit(false);
|
|
@@ -643,7 +741,7 @@ class ApplicationTest extends TestCase
|
|
| 643 |
});
|
| 644 |
$tester = new ApplicationTester($application);
|
| 645 |
$tester->run(array('command' => 'foo'), array('decorated' => false, 'capture_stderr_separately' => true));
|
| 646 |
-
$this->
|
| 647 |
putenv('COLUMNS=120');
|
| 648 |
}
|
| 649 |
|
|
@@ -658,7 +756,7 @@ class ApplicationTest extends TestCase
|
|
| 658 |
$tester = new ApplicationTester($application);
|
| 659 |
|
| 660 |
$tester->run(array('command' => 'foo'), array('decorated' => false));
|
| 661 |
-
$this->
|
| 662 |
putenv('COLUMNS=120');
|
| 663 |
}
|
| 664 |
|
|
@@ -675,7 +773,7 @@ class ApplicationTest extends TestCase
|
|
| 675 |
$tester = new ApplicationTester($application);
|
| 676 |
|
| 677 |
$tester->run(array('command' => 'foo'), array('decorated' => false));
|
| 678 |
-
$this->
|
| 679 |
}
|
| 680 |
|
| 681 |
public function testRun()
|
|
@@ -814,6 +912,30 @@ class ApplicationTest extends TestCase
|
|
| 814 |
$this->assertSame(4, $exitCode, '->run() returns integer exit code extracted from raised exception');
|
| 815 |
}
|
| 816 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 817 |
public function testRunReturnsExitCodeOneForExceptionCodeZero()
|
| 818 |
{
|
| 819 |
$exception = new \Exception('', 0);
|
|
@@ -829,6 +951,30 @@ class ApplicationTest extends TestCase
|
|
| 829 |
$this->assertSame(1, $exitCode, '->run() returns exit code 1 when exception code is 0');
|
| 830 |
}
|
| 831 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 832 |
/**
|
| 833 |
* @expectedException \LogicException
|
| 834 |
* @expectedExceptionMessage An option with shortcut "e" already exists.
|
|
@@ -1414,6 +1560,60 @@ class ApplicationTest extends TestCase
|
|
| 1414 |
$this->assertEquals($tester->getInput()->isInteractive(), @posix_isatty($inputStream));
|
| 1415 |
}
|
| 1416 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1417 |
protected function getDispatcher($skipCommand = false)
|
| 1418 |
{
|
| 1419 |
$dispatcher = new EventDispatcher();
|
|
@@ -1462,6 +1662,13 @@ class ApplicationTest extends TestCase
|
|
| 1462 |
$this->assertSame($e->getMessage(), 'Class \'UnknownClass\' not found');
|
| 1463 |
}
|
| 1464 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1465 |
}
|
| 1466 |
|
| 1467 |
class CustomApplication extends Application
|
|
@@ -1501,3 +1708,19 @@ class CustomDefaultCommandApplication extends Application
|
|
| 1501 |
$this->setDefaultCommand($command->getName());
|
| 1502 |
}
|
| 1503 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
|
| 14 |
use PHPUnit\Framework\TestCase;
|
| 15 |
use Symfony\Component\Console\Application;
|
| 16 |
+
use Symfony\Component\Console\Command\Command;
|
| 17 |
+
use Symfony\Component\Console\CommandLoader\FactoryCommandLoader;
|
| 18 |
+
use Symfony\Component\Console\DependencyInjection\AddConsoleCommandPass;
|
| 19 |
+
use Symfony\Component\Console\Event\ConsoleCommandEvent;
|
| 20 |
+
use Symfony\Component\Console\Event\ConsoleErrorEvent;
|
| 21 |
+
use Symfony\Component\Console\Event\ConsoleExceptionEvent;
|
| 22 |
+
use Symfony\Component\Console\Event\ConsoleTerminateEvent;
|
| 23 |
+
use Symfony\Component\Console\Exception\CommandNotFoundException;
|
| 24 |
use Symfony\Component\Console\Helper\FormatterHelper;
|
| 25 |
+
use Symfony\Component\Console\Helper\HelperSet;
|
| 26 |
use Symfony\Component\Console\Input\ArgvInput;
|
| 27 |
use Symfony\Component\Console\Input\ArrayInput;
|
|
|
|
| 28 |
use Symfony\Component\Console\Input\InputArgument;
|
| 29 |
use Symfony\Component\Console\Input\InputDefinition;
|
| 30 |
+
use Symfony\Component\Console\Input\InputInterface;
|
| 31 |
use Symfony\Component\Console\Input\InputOption;
|
| 32 |
use Symfony\Component\Console\Output\NullOutput;
|
| 33 |
use Symfony\Component\Console\Output\Output;
|
| 34 |
use Symfony\Component\Console\Output\OutputInterface;
|
| 35 |
use Symfony\Component\Console\Output\StreamOutput;
|
| 36 |
use Symfony\Component\Console\Tester\ApplicationTester;
|
| 37 |
+
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
use Symfony\Component\EventDispatcher\EventDispatcher;
|
| 39 |
|
| 40 |
class ApplicationTest extends TestCase
|
| 51 |
require_once self::$fixturesPath.'/Foo3Command.php';
|
| 52 |
require_once self::$fixturesPath.'/Foo4Command.php';
|
| 53 |
require_once self::$fixturesPath.'/Foo5Command.php';
|
| 54 |
+
require_once self::$fixturesPath.'/FooSameCaseUppercaseCommand.php';
|
| 55 |
+
require_once self::$fixturesPath.'/FooSameCaseLowercaseCommand.php';
|
| 56 |
require_once self::$fixturesPath.'/FoobarCommand.php';
|
| 57 |
require_once self::$fixturesPath.'/BarBucCommand.php';
|
| 58 |
require_once self::$fixturesPath.'/FooSubnamespaced1Command.php';
|
| 123 |
$this->assertCount(1, $commands, '->all() takes a namespace as its first argument');
|
| 124 |
}
|
| 125 |
|
| 126 |
+
public function testAllWithCommandLoader()
|
| 127 |
+
{
|
| 128 |
+
$application = new Application();
|
| 129 |
+
$commands = $application->all();
|
| 130 |
+
$this->assertInstanceOf('Symfony\\Component\\Console\\Command\\HelpCommand', $commands['help'], '->all() returns the registered commands');
|
| 131 |
+
|
| 132 |
+
$application->add(new \FooCommand());
|
| 133 |
+
$commands = $application->all('foo');
|
| 134 |
+
$this->assertCount(1, $commands, '->all() takes a namespace as its first argument');
|
| 135 |
+
|
| 136 |
+
$application->setCommandLoader(new FactoryCommandLoader(array(
|
| 137 |
+
'foo:bar1' => function () { return new \Foo1Command(); },
|
| 138 |
+
)));
|
| 139 |
+
$commands = $application->all('foo');
|
| 140 |
+
$this->assertCount(2, $commands, '->all() takes a namespace as its first argument');
|
| 141 |
+
$this->assertInstanceOf(\FooCommand::class, $commands['foo:bar'], '->all() returns the registered commands');
|
| 142 |
+
$this->assertInstanceOf(\Foo1Command::class, $commands['foo:bar1'], '->all() returns the registered commands');
|
| 143 |
+
}
|
| 144 |
+
|
| 145 |
public function testRegister()
|
| 146 |
{
|
| 147 |
$application = new Application();
|
| 194 |
$this->assertInstanceOf('Symfony\Component\Console\Command\HelpCommand', $command, '->get() returns the help command if --help is provided as the input');
|
| 195 |
}
|
| 196 |
|
| 197 |
+
public function testHasGetWithCommandLoader()
|
| 198 |
+
{
|
| 199 |
+
$application = new Application();
|
| 200 |
+
$this->assertTrue($application->has('list'), '->has() returns true if a named command is registered');
|
| 201 |
+
$this->assertFalse($application->has('afoobar'), '->has() returns false if a named command is not registered');
|
| 202 |
+
|
| 203 |
+
$application->add($foo = new \FooCommand());
|
| 204 |
+
$this->assertTrue($application->has('afoobar'), '->has() returns true if an alias is registered');
|
| 205 |
+
$this->assertEquals($foo, $application->get('foo:bar'), '->get() returns a command by name');
|
| 206 |
+
$this->assertEquals($foo, $application->get('afoobar'), '->get() returns a command by alias');
|
| 207 |
+
|
| 208 |
+
$application->setCommandLoader(new FactoryCommandLoader(array(
|
| 209 |
+
'foo:bar1' => function () { return new \Foo1Command(); },
|
| 210 |
+
)));
|
| 211 |
+
|
| 212 |
+
$this->assertTrue($application->has('afoobar'), '->has() returns true if an instance is registered for an alias even with command loader');
|
| 213 |
+
$this->assertEquals($foo, $application->get('foo:bar'), '->get() returns an instance by name even with command loader');
|
| 214 |
+
$this->assertEquals($foo, $application->get('afoobar'), '->get() returns an instance by alias even with command loader');
|
| 215 |
+
$this->assertTrue($application->has('foo:bar1'), '->has() returns true for commands registered in the loader');
|
| 216 |
+
$this->assertInstanceOf(\Foo1Command::class, $foo1 = $application->get('foo:bar1'), '->get() returns a command by name from the command loader');
|
| 217 |
+
$this->assertTrue($application->has('afoobar1'), '->has() returns true for commands registered in the loader');
|
| 218 |
+
$this->assertEquals($foo1, $application->get('afoobar1'), '->get() returns a command by name from the command loader');
|
| 219 |
+
}
|
| 220 |
+
|
| 221 |
public function testSilentHelp()
|
| 222 |
{
|
| 223 |
$application = new Application();
|
| 329 |
$this->assertInstanceOf('FooCommand', $application->find('a'), '->find() returns a command if the abbreviation exists for an alias');
|
| 330 |
}
|
| 331 |
|
| 332 |
+
public function testFindCaseSensitiveFirst()
|
| 333 |
+
{
|
| 334 |
+
$application = new Application();
|
| 335 |
+
$application->add(new \FooSameCaseUppercaseCommand());
|
| 336 |
+
$application->add(new \FooSameCaseLowercaseCommand());
|
| 337 |
+
|
| 338 |
+
$this->assertInstanceOf('FooSameCaseUppercaseCommand', $application->find('f:B'), '->find() returns a command if the abbreviation is the correct case');
|
| 339 |
+
$this->assertInstanceOf('FooSameCaseUppercaseCommand', $application->find('f:BAR'), '->find() returns a command if the abbreviation is the correct case');
|
| 340 |
+
$this->assertInstanceOf('FooSameCaseLowercaseCommand', $application->find('f:b'), '->find() returns a command if the abbreviation is the correct case');
|
| 341 |
+
$this->assertInstanceOf('FooSameCaseLowercaseCommand', $application->find('f:bar'), '->find() returns a command if the abbreviation is the correct case');
|
| 342 |
+
}
|
| 343 |
+
|
| 344 |
+
public function testFindCaseInsensitiveAsFallback()
|
| 345 |
+
{
|
| 346 |
+
$application = new Application();
|
| 347 |
+
$application->add(new \FooSameCaseLowercaseCommand());
|
| 348 |
+
|
| 349 |
+
$this->assertInstanceOf('FooSameCaseLowercaseCommand', $application->find('f:b'), '->find() returns a command if the abbreviation is the correct case');
|
| 350 |
+
$this->assertInstanceOf('FooSameCaseLowercaseCommand', $application->find('f:B'), '->find() will fallback to case insensitivity');
|
| 351 |
+
$this->assertInstanceOf('FooSameCaseLowercaseCommand', $application->find('FoO:BaR'), '->find() will fallback to case insensitivity');
|
| 352 |
+
}
|
| 353 |
+
|
| 354 |
+
/**
|
| 355 |
+
* @expectedException \Symfony\Component\Console\Exception\CommandNotFoundException
|
| 356 |
+
* @expectedExceptionMessage Command "FoO:BaR" is ambiguous
|
| 357 |
+
*/
|
| 358 |
+
public function testFindCaseInsensitiveSuggestions()
|
| 359 |
+
{
|
| 360 |
+
$application = new Application();
|
| 361 |
+
$application->add(new \FooSameCaseLowercaseCommand());
|
| 362 |
+
$application->add(new \FooSameCaseUppercaseCommand());
|
| 363 |
+
|
| 364 |
+
$this->assertInstanceOf('FooSameCaseLowercaseCommand', $application->find('FoO:BaR'), '->find() will find two suggestions with case insensitivity');
|
| 365 |
+
}
|
| 366 |
+
|
| 367 |
+
public function testFindWithCommandLoader()
|
| 368 |
+
{
|
| 369 |
+
$application = new Application();
|
| 370 |
+
$application->setCommandLoader(new FactoryCommandLoader(array(
|
| 371 |
+
'foo:bar' => $f = function () { return new \FooCommand(); },
|
| 372 |
+
)));
|
| 373 |
+
|
| 374 |
+
$this->assertInstanceOf('FooCommand', $application->find('foo:bar'), '->find() returns a command if its name exists');
|
| 375 |
+
$this->assertInstanceOf('Symfony\Component\Console\Command\HelpCommand', $application->find('h'), '->find() returns a command if its name exists');
|
| 376 |
+
$this->assertInstanceOf('FooCommand', $application->find('f:bar'), '->find() returns a command if the abbreviation for the namespace exists');
|
| 377 |
+
$this->assertInstanceOf('FooCommand', $application->find('f:b'), '->find() returns a command if the abbreviation for the namespace and the command name exist');
|
| 378 |
+
$this->assertInstanceOf('FooCommand', $application->find('a'), '->find() returns a command if the abbreviation exists for an alias');
|
| 379 |
+
}
|
| 380 |
+
|
| 381 |
/**
|
| 382 |
* @dataProvider provideAmbiguousAbbreviations
|
| 383 |
*/
|
| 461 |
public function provideInvalidCommandNamesSingle()
|
| 462 |
{
|
| 463 |
return array(
|
| 464 |
+
array('foo3:barr'),
|
| 465 |
+
array('fooo3:bar'),
|
| 466 |
);
|
| 467 |
}
|
| 468 |
|
| 728 |
$tester = new ApplicationTester($application);
|
| 729 |
|
| 730 |
$tester->run(array('command' => 'foo'), array('decorated' => false, 'capture_stderr_separately' => true));
|
| 731 |
+
$this->assertStringMatchesFormatFile(self::$fixturesPath.'/application_renderexception_doublewidth1.txt', $tester->getErrorOutput(true), '->renderException() renders a pretty exceptions with previous exceptions');
|
| 732 |
|
| 733 |
$tester->run(array('command' => 'foo'), array('decorated' => true, 'capture_stderr_separately' => true));
|
| 734 |
+
$this->assertStringMatchesFormatFile(self::$fixturesPath.'/application_renderexception_doublewidth1decorated.txt', $tester->getErrorOutput(true), '->renderException() renders a pretty exceptions with previous exceptions');
|
| 735 |
|
| 736 |
$application = new Application();
|
| 737 |
$application->setAutoExit(false);
|
| 741 |
});
|
| 742 |
$tester = new ApplicationTester($application);
|
| 743 |
$tester->run(array('command' => 'foo'), array('decorated' => false, 'capture_stderr_separately' => true));
|
| 744 |
+
$this->assertStringMatchesFormatFile(self::$fixturesPath.'/application_renderexception_doublewidth2.txt', $tester->getErrorOutput(true), '->renderException() wraps messages when they are bigger than the terminal');
|
| 745 |
putenv('COLUMNS=120');
|
| 746 |
}
|
| 747 |
|
| 756 |
$tester = new ApplicationTester($application);
|
| 757 |
|
| 758 |
$tester->run(array('command' => 'foo'), array('decorated' => false));
|
| 759 |
+
$this->assertStringMatchesFormatFile(self::$fixturesPath.'/application_renderexception_escapeslines.txt', $tester->getDisplay(true), '->renderException() escapes lines containing formatting');
|
| 760 |
putenv('COLUMNS=120');
|
| 761 |
}
|
| 762 |
|
| 773 |
$tester = new ApplicationTester($application);
|
| 774 |
|
| 775 |
$tester->run(array('command' => 'foo'), array('decorated' => false));
|
| 776 |
+
$this->assertStringMatchesFormatFile(self::$fixturesPath.'/application_renderexception_linebreaks.txt', $tester->getDisplay(true), '->renderException() keep multiple line breaks');
|
| 777 |
}
|
| 778 |
|
| 779 |
public function testRun()
|
| 912 |
$this->assertSame(4, $exitCode, '->run() returns integer exit code extracted from raised exception');
|
| 913 |
}
|
| 914 |
|
| 915 |
+
public function testRunDispatchesIntegerExitCode()
|
| 916 |
+
{
|
| 917 |
+
$passedRightValue = false;
|
| 918 |
+
|
| 919 |
+
// We can assume here that some other test asserts that the event is dispatched at all
|
| 920 |
+
$dispatcher = new EventDispatcher();
|
| 921 |
+
$dispatcher->addListener('console.terminate', function (ConsoleTerminateEvent $event) use (&$passedRightValue) {
|
| 922 |
+
$passedRightValue = (4 === $event->getExitCode());
|
| 923 |
+
});
|
| 924 |
+
|
| 925 |
+
$application = new Application();
|
| 926 |
+
$application->setDispatcher($dispatcher);
|
| 927 |
+
$application->setAutoExit(false);
|
| 928 |
+
|
| 929 |
+
$application->register('test')->setCode(function (InputInterface $input, OutputInterface $output) {
|
| 930 |
+
throw new \Exception('', 4);
|
| 931 |
+
});
|
| 932 |
+
|
| 933 |
+
$tester = new ApplicationTester($application);
|
| 934 |
+
$tester->run(array('command' => 'test'));
|
| 935 |
+
|
| 936 |
+
$this->assertTrue($passedRightValue, '-> exit code 4 was passed in the console.terminate event');
|
| 937 |
+
}
|
| 938 |
+
|
| 939 |
public function testRunReturnsExitCodeOneForExceptionCodeZero()
|
| 940 |
{
|
| 941 |
$exception = new \Exception('', 0);
|
| 951 |
$this->assertSame(1, $exitCode, '->run() returns exit code 1 when exception code is 0');
|
| 952 |
}
|
| 953 |
|
| 954 |
+
public function testRunDispatchesExitCodeOneForExceptionCodeZero()
|
| 955 |
+
{
|
| 956 |
+
$passedRightValue = false;
|
| 957 |
+
|
| 958 |
+
// We can assume here that some other test asserts that the event is dispatched at all
|
| 959 |
+
$dispatcher = new EventDispatcher();
|
| 960 |
+
$dispatcher->addListener('console.terminate', function (ConsoleTerminateEvent $event) use (&$passedRightValue) {
|
| 961 |
+
$passedRightValue = (1 === $event->getExitCode());
|
| 962 |
+
});
|
| 963 |
+
|
| 964 |
+
$application = new Application();
|
| 965 |
+
$application->setDispatcher($dispatcher);
|
| 966 |
+
$application->setAutoExit(false);
|
| 967 |
+
|
| 968 |
+
$application->register('test')->setCode(function (InputInterface $input, OutputInterface $output) {
|
| 969 |
+
throw new \Exception();
|
| 970 |
+
});
|
| 971 |
+
|
| 972 |
+
$tester = new ApplicationTester($application);
|
| 973 |
+
$tester->run(array('command' => 'test'));
|
| 974 |
+
|
| 975 |
+
$this->assertTrue($passedRightValue, '-> exit code 1 was passed in the console.terminate event');
|
| 976 |
+
}
|
| 977 |
+
|
| 978 |
/**
|
| 979 |
* @expectedException \LogicException
|
| 980 |
* @expectedExceptionMessage An option with shortcut "e" already exists.
|
| 1560 |
$this->assertEquals($tester->getInput()->isInteractive(), @posix_isatty($inputStream));
|
| 1561 |
}
|
| 1562 |
|
| 1563 |
+
public function testRunLazyCommandService()
|
| 1564 |
+
{
|
| 1565 |
+
$container = new ContainerBuilder();
|
| 1566 |
+
$container->addCompilerPass(new AddConsoleCommandPass());
|
| 1567 |
+
$container
|
| 1568 |
+
->register('lazy-command', LazyCommand::class)
|
| 1569 |
+
->addTag('console.command', array('command' => 'lazy:command'))
|
| 1570 |
+
->addTag('console.command', array('command' => 'lazy:alias'))
|
| 1571 |
+
->addTag('console.command', array('command' => 'lazy:alias2'));
|
| 1572 |
+
$container->compile();
|
| 1573 |
+
|
| 1574 |
+
$application = new Application();
|
| 1575 |
+
$application->setCommandLoader($container->get('console.command_loader'));
|
| 1576 |
+
$application->setAutoExit(false);
|
| 1577 |
+
|
| 1578 |
+
$tester = new ApplicationTester($application);
|
| 1579 |
+
|
| 1580 |
+
$tester->run(array('command' => 'lazy:command'));
|
| 1581 |
+
$this->assertSame("lazy-command called\n", $tester->getDisplay(true));
|
| 1582 |
+
|
| 1583 |
+
$tester->run(array('command' => 'lazy:alias'));
|
| 1584 |
+
$this->assertSame("lazy-command called\n", $tester->getDisplay(true));
|
| 1585 |
+
|
| 1586 |
+
$tester->run(array('command' => 'lazy:alias2'));
|
| 1587 |
+
$this->assertSame("lazy-command called\n", $tester->getDisplay(true));
|
| 1588 |
+
|
| 1589 |
+
$command = $application->get('lazy:command');
|
| 1590 |
+
$this->assertSame(array('lazy:alias', 'lazy:alias2'), $command->getAliases());
|
| 1591 |
+
}
|
| 1592 |
+
|
| 1593 |
+
/**
|
| 1594 |
+
* @expectedException \Symfony\Component\Console\Exception\CommandNotFoundException
|
| 1595 |
+
*/
|
| 1596 |
+
public function testGetDisabledLazyCommand()
|
| 1597 |
+
{
|
| 1598 |
+
$application = new Application();
|
| 1599 |
+
$application->setCommandLoader(new FactoryCommandLoader(array('disabled' => function () { return new DisabledCommand(); })));
|
| 1600 |
+
$application->get('disabled');
|
| 1601 |
+
}
|
| 1602 |
+
|
| 1603 |
+
public function testHasReturnsFalseForDisabledLazyCommand()
|
| 1604 |
+
{
|
| 1605 |
+
$application = new Application();
|
| 1606 |
+
$application->setCommandLoader(new FactoryCommandLoader(array('disabled' => function () { return new DisabledCommand(); })));
|
| 1607 |
+
$this->assertFalse($application->has('disabled'));
|
| 1608 |
+
}
|
| 1609 |
+
|
| 1610 |
+
public function testAllExcludesDisabledLazyCommand()
|
| 1611 |
+
{
|
| 1612 |
+
$application = new Application();
|
| 1613 |
+
$application->setCommandLoader(new FactoryCommandLoader(array('disabled' => function () { return new DisabledCommand(); })));
|
| 1614 |
+
$this->assertArrayNotHasKey('disabled', $application->all());
|
| 1615 |
+
}
|
| 1616 |
+
|
| 1617 |
protected function getDispatcher($skipCommand = false)
|
| 1618 |
{
|
| 1619 |
$dispatcher = new EventDispatcher();
|
| 1662 |
$this->assertSame($e->getMessage(), 'Class \'UnknownClass\' not found');
|
| 1663 |
}
|
| 1664 |
}
|
| 1665 |
+
|
| 1666 |
+
protected function tearDown()
|
| 1667 |
+
{
|
| 1668 |
+
putenv('SHELL_VERBOSITY');
|
| 1669 |
+
unset($_ENV['SHELL_VERBOSITY']);
|
| 1670 |
+
unset($_SERVER['SHELL_VERBOSITY']);
|
| 1671 |
+
}
|
| 1672 |
}
|
| 1673 |
|
| 1674 |
class CustomApplication extends Application
|
| 1708 |
$this->setDefaultCommand($command->getName());
|
| 1709 |
}
|
| 1710 |
}
|
| 1711 |
+
|
| 1712 |
+
class LazyCommand extends Command
|
| 1713 |
+
{
|
| 1714 |
+
public function execute(InputInterface $input, OutputInterface $output)
|
| 1715 |
+
{
|
| 1716 |
+
$output->writeln('lazy-command called');
|
| 1717 |
+
}
|
| 1718 |
+
}
|
| 1719 |
+
|
| 1720 |
+
class DisabledCommand extends Command
|
| 1721 |
+
{
|
| 1722 |
+
public function isEnabled()
|
| 1723 |
+
{
|
| 1724 |
+
return false;
|
| 1725 |
+
}
|
| 1726 |
+
}
|
vendor/symfony/console/Tests/Command/CommandTest.php
CHANGED
|
@@ -12,16 +12,16 @@
|
|
| 12 |
namespace Symfony\Component\Console\Tests\Command;
|
| 13 |
|
| 14 |
use PHPUnit\Framework\TestCase;
|
|
|
|
| 15 |
use Symfony\Component\Console\Command\Command;
|
| 16 |
use Symfony\Component\Console\Helper\FormatterHelper;
|
| 17 |
-
use Symfony\Component\Console\Application;
|
| 18 |
-
use Symfony\Component\Console\Input\InputDefinition;
|
| 19 |
use Symfony\Component\Console\Input\InputArgument;
|
| 20 |
-
use Symfony\Component\Console\Input\
|
| 21 |
use Symfony\Component\Console\Input\InputInterface;
|
|
|
|
| 22 |
use Symfony\Component\Console\Input\StringInput;
|
| 23 |
-
use Symfony\Component\Console\Output\OutputInterface;
|
| 24 |
use Symfony\Component\Console\Output\NullOutput;
|
|
|
|
| 25 |
use Symfony\Component\Console\Tester\CommandTester;
|
| 26 |
|
| 27 |
class CommandTest extends TestCase
|
|
@@ -46,7 +46,7 @@ class CommandTest extends TestCase
|
|
| 46 |
*/
|
| 47 |
public function testCommandNameCannotBeEmpty()
|
| 48 |
{
|
| 49 |
-
new Command();
|
| 50 |
}
|
| 51 |
|
| 52 |
public function testSetApplication()
|
|
@@ -340,7 +340,7 @@ class CommandTest extends TestCase
|
|
| 340 |
$command->setApplication(new Application());
|
| 341 |
$command->setProcessTitle('foo');
|
| 342 |
$this->assertSame(0, $command->run(new StringInput(''), new NullOutput()));
|
| 343 |
-
if (function_exists('cli_set_process_title')) {
|
| 344 |
if (null === @cli_get_process_title() && 'Darwin' === PHP_OS) {
|
| 345 |
$this->markTestSkipped('Running "cli_get_process_title" as an unprivileged user is not supported on MacOS.');
|
| 346 |
}
|
| 12 |
namespace Symfony\Component\Console\Tests\Command;
|
| 13 |
|
| 14 |
use PHPUnit\Framework\TestCase;
|
| 15 |
+
use Symfony\Component\Console\Application;
|
| 16 |
use Symfony\Component\Console\Command\Command;
|
| 17 |
use Symfony\Component\Console\Helper\FormatterHelper;
|
|
|
|
|
|
|
| 18 |
use Symfony\Component\Console\Input\InputArgument;
|
| 19 |
+
use Symfony\Component\Console\Input\InputDefinition;
|
| 20 |
use Symfony\Component\Console\Input\InputInterface;
|
| 21 |
+
use Symfony\Component\Console\Input\InputOption;
|
| 22 |
use Symfony\Component\Console\Input\StringInput;
|
|
|
|
| 23 |
use Symfony\Component\Console\Output\NullOutput;
|
| 24 |
+
use Symfony\Component\Console\Output\OutputInterface;
|
| 25 |
use Symfony\Component\Console\Tester\CommandTester;
|
| 26 |
|
| 27 |
class CommandTest extends TestCase
|
| 46 |
*/
|
| 47 |
public function testCommandNameCannotBeEmpty()
|
| 48 |
{
|
| 49 |
+
(new Application())->add(new Command());
|
| 50 |
}
|
| 51 |
|
| 52 |
public function testSetApplication()
|
| 340 |
$command->setApplication(new Application());
|
| 341 |
$command->setProcessTitle('foo');
|
| 342 |
$this->assertSame(0, $command->run(new StringInput(''), new NullOutput()));
|
| 343 |
+
if (\function_exists('cli_set_process_title')) {
|
| 344 |
if (null === @cli_get_process_title() && 'Darwin' === PHP_OS) {
|
| 345 |
$this->markTestSkipped('Running "cli_get_process_title" as an unprivileged user is not supported on MacOS.');
|
| 346 |
}
|
vendor/symfony/console/Tests/Command/HelpCommandTest.php
CHANGED
|
@@ -12,10 +12,10 @@
|
|
| 12 |
namespace Symfony\Component\Console\Tests\Command;
|
| 13 |
|
| 14 |
use PHPUnit\Framework\TestCase;
|
| 15 |
-
use Symfony\Component\Console\
|
| 16 |
use Symfony\Component\Console\Command\HelpCommand;
|
| 17 |
use Symfony\Component\Console\Command\ListCommand;
|
| 18 |
-
use Symfony\Component\Console\
|
| 19 |
|
| 20 |
class HelpCommandTest extends TestCase
|
| 21 |
{
|
| 12 |
namespace Symfony\Component\Console\Tests\Command;
|
| 13 |
|
| 14 |
use PHPUnit\Framework\TestCase;
|
| 15 |
+
use Symfony\Component\Console\Application;
|
| 16 |
use Symfony\Component\Console\Command\HelpCommand;
|
| 17 |
use Symfony\Component\Console\Command\ListCommand;
|
| 18 |
+
use Symfony\Component\Console\Tester\CommandTester;
|
| 19 |
|
| 20 |
class HelpCommandTest extends TestCase
|
| 21 |
{
|
vendor/symfony/console/Tests/Command/ListCommandTest.php
CHANGED
|
@@ -12,8 +12,8 @@
|
|
| 12 |
namespace Symfony\Component\Console\Tests\Command;
|
| 13 |
|
| 14 |
use PHPUnit\Framework\TestCase;
|
| 15 |
-
use Symfony\Component\Console\Tester\CommandTester;
|
| 16 |
use Symfony\Component\Console\Application;
|
|
|
|
| 17 |
|
| 18 |
class ListCommandTest extends TestCase
|
| 19 |
{
|
| 12 |
namespace Symfony\Component\Console\Tests\Command;
|
| 13 |
|
| 14 |
use PHPUnit\Framework\TestCase;
|
|
|
|
| 15 |
use Symfony\Component\Console\Application;
|
| 16 |
+
use Symfony\Component\Console\Tester\CommandTester;
|
| 17 |
|
| 18 |
class ListCommandTest extends TestCase
|
| 19 |
{
|
vendor/symfony/console/Tests/Command/LockableTraitTest.php
CHANGED
|
@@ -13,7 +13,9 @@ namespace Symfony\Component\Console\Tests\Command;
|
|
| 13 |
|
| 14 |
use PHPUnit\Framework\TestCase;
|
| 15 |
use Symfony\Component\Console\Tester\CommandTester;
|
| 16 |
-
use Symfony\Component\
|
|
|
|
|
|
|
| 17 |
|
| 18 |
class LockableTraitTest extends TestCase
|
| 19 |
{
|
|
@@ -39,8 +41,14 @@ class LockableTraitTest extends TestCase
|
|
| 39 |
{
|
| 40 |
$command = new \FooLockCommand();
|
| 41 |
|
| 42 |
-
|
| 43 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
|
| 45 |
$tester = new CommandTester($command);
|
| 46 |
$this->assertSame(1, $tester->execute(array()));
|
| 13 |
|
| 14 |
use PHPUnit\Framework\TestCase;
|
| 15 |
use Symfony\Component\Console\Tester\CommandTester;
|
| 16 |
+
use Symfony\Component\Lock\Factory;
|
| 17 |
+
use Symfony\Component\Lock\Store\FlockStore;
|
| 18 |
+
use Symfony\Component\Lock\Store\SemaphoreStore;
|
| 19 |
|
| 20 |
class LockableTraitTest extends TestCase
|
| 21 |
{
|
| 41 |
{
|
| 42 |
$command = new \FooLockCommand();
|
| 43 |
|
| 44 |
+
if (SemaphoreStore::isSupported(false)) {
|
| 45 |
+
$store = new SemaphoreStore();
|
| 46 |
+
} else {
|
| 47 |
+
$store = new FlockStore();
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
$lock = (new Factory($store))->createLock($command->getName());
|
| 51 |
+
$lock->acquire();
|
| 52 |
|
| 53 |
$tester = new CommandTester($command);
|
| 54 |
$this->assertSame(1, $tester->execute(array()));
|
vendor/symfony/console/Tests/CommandLoader/ContainerCommandLoaderTest.php
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
/*
|
| 4 |
+
* This file is part of the Symfony package.
|
| 5 |
+
*
|
| 6 |
+
* (c) Fabien Potencier <fabien@symfony.com>
|
| 7 |
+
*
|
| 8 |
+
* For the full copyright and license information, please view the LICENSE
|
| 9 |
+
* file that was distributed with this source code.
|
| 10 |
+
*/
|
| 11 |
+
|
| 12 |
+
namespace Symfony\Component\Console\Tests\CommandLoader;
|
| 13 |
+
|
| 14 |
+
use PHPUnit\Framework\TestCase;
|
| 15 |
+
use Symfony\Component\Console\Command\Command;
|
| 16 |
+
use Symfony\Component\Console\CommandLoader\ContainerCommandLoader;
|
| 17 |
+
use Symfony\Component\DependencyInjection\ServiceLocator;
|
| 18 |
+
|
| 19 |
+
class ContainerCommandLoaderTest extends TestCase
|
| 20 |
+
{
|
| 21 |
+
public function testHas()
|
| 22 |
+
{
|
| 23 |
+
$loader = new ContainerCommandLoader(new ServiceLocator(array(
|
| 24 |
+
'foo-service' => function () { return new Command('foo'); },
|
| 25 |
+
'bar-service' => function () { return new Command('bar'); },
|
| 26 |
+
)), array('foo' => 'foo-service', 'bar' => 'bar-service'));
|
| 27 |
+
|
| 28 |
+
$this->assertTrue($loader->has('foo'));
|
| 29 |
+
$this->assertTrue($loader->has('bar'));
|
| 30 |
+
$this->assertFalse($loader->has('baz'));
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
public function testGet()
|
| 34 |
+
{
|
| 35 |
+
$loader = new ContainerCommandLoader(new ServiceLocator(array(
|
| 36 |
+
'foo-service' => function () { return new Command('foo'); },
|
| 37 |
+
'bar-service' => function () { return new Command('bar'); },
|
| 38 |
+
)), array('foo' => 'foo-service', 'bar' => 'bar-service'));
|
| 39 |
+
|
| 40 |
+
$this->assertInstanceOf(Command::class, $loader->get('foo'));
|
| 41 |
+
$this->assertInstanceOf(Command::class, $loader->get('bar'));
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
/**
|
| 45 |
+
* @expectedException \Symfony\Component\Console\Exception\CommandNotFoundException
|
| 46 |
+
*/
|
| 47 |
+
public function testGetUnknownCommandThrows()
|
| 48 |
+
{
|
| 49 |
+
(new ContainerCommandLoader(new ServiceLocator(array()), array()))->get('unknown');
|
| 50 |
+
}
|
| 51 |
+
|
| 52 |
+
public function testGetCommandNames()
|
| 53 |
+
{
|
| 54 |
+
$loader = new ContainerCommandLoader(new ServiceLocator(array(
|
| 55 |
+
'foo-service' => function () { return new Command('foo'); },
|
| 56 |
+
'bar-service' => function () { return new Command('bar'); },
|
| 57 |
+
)), array('foo' => 'foo-service', 'bar' => 'bar-service'));
|
| 58 |
+
|
| 59 |
+
$this->assertSame(array('foo', 'bar'), $loader->getNames());
|
| 60 |
+
}
|
| 61 |
+
}
|
vendor/symfony/console/Tests/CommandLoader/FactoryCommandLoaderTest.php
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
/*
|
| 4 |
+
* This file is part of the Symfony package.
|
| 5 |
+
*
|
| 6 |
+
* (c) Fabien Potencier <fabien@symfony.com>
|
| 7 |
+
*
|
| 8 |
+
* For the full copyright and license information, please view the LICENSE
|
| 9 |
+
* file that was distributed with this source code.
|
| 10 |
+
*/
|
| 11 |
+
|
| 12 |
+
namespace Symfony\Component\Console\Tests\CommandLoader;
|
| 13 |
+
|
| 14 |
+
use PHPUnit\Framework\TestCase;
|
| 15 |
+
use Symfony\Component\Console\Command\Command;
|
| 16 |
+
use Symfony\Component\Console\CommandLoader\FactoryCommandLoader;
|
| 17 |
+
|
| 18 |
+
class FactoryCommandLoaderTest extends TestCase
|
| 19 |
+
{
|
| 20 |
+
public function testHas()
|
| 21 |
+
{
|
| 22 |
+
$loader = new FactoryCommandLoader(array(
|
| 23 |
+
'foo' => function () { return new Command('foo'); },
|
| 24 |
+
'bar' => function () { return new Command('bar'); },
|
| 25 |
+
));
|
| 26 |
+
|
| 27 |
+
$this->assertTrue($loader->has('foo'));
|
| 28 |
+
$this->assertTrue($loader->has('bar'));
|
| 29 |
+
$this->assertFalse($loader->has('baz'));
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
public function testGet()
|
| 33 |
+
{
|
| 34 |
+
$loader = new FactoryCommandLoader(array(
|
| 35 |
+
'foo' => function () { return new Command('foo'); },
|
| 36 |
+
'bar' => function () { return new Command('bar'); },
|
| 37 |
+
));
|
| 38 |
+
|
| 39 |
+
$this->assertInstanceOf(Command::class, $loader->get('foo'));
|
| 40 |
+
$this->assertInstanceOf(Command::class, $loader->get('bar'));
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
/**
|
| 44 |
+
* @expectedException \Symfony\Component\Console\Exception\CommandNotFoundException
|
| 45 |
+
*/
|
| 46 |
+
public function testGetUnknownCommandThrows()
|
| 47 |
+
{
|
| 48 |
+
(new FactoryCommandLoader(array()))->get('unknown');
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
public function testGetCommandNames()
|
| 52 |
+
{
|
| 53 |
+
$loader = new FactoryCommandLoader(array(
|
| 54 |
+
'foo' => function () { return new Command('foo'); },
|
| 55 |
+
'bar' => function () { return new Command('bar'); },
|
| 56 |
+
));
|
| 57 |
+
|
| 58 |
+
$this->assertSame(array('foo', 'bar'), $loader->getNames());
|
| 59 |
+
}
|
| 60 |
+
}
|
vendor/{sensiolabs/security-checker/SensioLabs/Security/Formatters → symfony/console/Tests/CommandLoader}/index.php
RENAMED
|
File without changes
|
vendor/symfony/console/Tests/DependencyInjection/AddConsoleCommandPassTest.php
CHANGED
|
@@ -12,10 +12,15 @@
|
|
| 12 |
namespace Symfony\Component\Console\Tests\DependencyInjection;
|
| 13 |
|
| 14 |
use PHPUnit\Framework\TestCase;
|
| 15 |
-
use Symfony\Component\Console\DependencyInjection\AddConsoleCommandPass;
|
| 16 |
use Symfony\Component\Console\Command\Command;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
| 18 |
use Symfony\Component\DependencyInjection\Definition;
|
|
|
|
| 19 |
|
| 20 |
class AddConsoleCommandPassTest extends TestCase
|
| 21 |
{
|
|
@@ -25,7 +30,7 @@ class AddConsoleCommandPassTest extends TestCase
|
|
| 25 |
public function testProcess($public)
|
| 26 |
{
|
| 27 |
$container = new ContainerBuilder();
|
| 28 |
-
$container->addCompilerPass(new AddConsoleCommandPass());
|
| 29 |
$container->setParameter('my-command.class', 'Symfony\Component\Console\Tests\DependencyInjection\MyCommand');
|
| 30 |
|
| 31 |
$definition = new Definition('%my-command.class%');
|
|
@@ -52,6 +57,62 @@ class AddConsoleCommandPassTest extends TestCase
|
|
| 52 |
$this->assertSame(array($alias => $id), $container->getParameter('console.command.ids'));
|
| 53 |
}
|
| 54 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
public function visibilityProvider()
|
| 56 |
{
|
| 57 |
return array(
|
|
@@ -68,7 +129,7 @@ class AddConsoleCommandPassTest extends TestCase
|
|
| 68 |
{
|
| 69 |
$container = new ContainerBuilder();
|
| 70 |
$container->setResourceTracking(false);
|
| 71 |
-
$container->addCompilerPass(new AddConsoleCommandPass());
|
| 72 |
|
| 73 |
$definition = new Definition('Symfony\Component\Console\Tests\DependencyInjection\MyCommand');
|
| 74 |
$definition->addTag('console.command');
|
|
@@ -86,7 +147,7 @@ class AddConsoleCommandPassTest extends TestCase
|
|
| 86 |
{
|
| 87 |
$container = new ContainerBuilder();
|
| 88 |
$container->setResourceTracking(false);
|
| 89 |
-
$container->addCompilerPass(new AddConsoleCommandPass());
|
| 90 |
|
| 91 |
$definition = new Definition('SplObjectStorage');
|
| 92 |
$definition->addTag('console.command');
|
|
@@ -116,8 +177,86 @@ class AddConsoleCommandPassTest extends TestCase
|
|
| 116 |
$this->assertTrue($container->hasAlias($alias1));
|
| 117 |
$this->assertTrue($container->hasAlias($alias2));
|
| 118 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 119 |
}
|
| 120 |
|
| 121 |
class MyCommand extends Command
|
| 122 |
{
|
| 123 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
namespace Symfony\Component\Console\Tests\DependencyInjection;
|
| 13 |
|
| 14 |
use PHPUnit\Framework\TestCase;
|
|
|
|
| 15 |
use Symfony\Component\Console\Command\Command;
|
| 16 |
+
use Symfony\Component\Console\CommandLoader\ContainerCommandLoader;
|
| 17 |
+
use Symfony\Component\Console\DependencyInjection\AddConsoleCommandPass;
|
| 18 |
+
use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument;
|
| 19 |
+
use Symfony\Component\DependencyInjection\ChildDefinition;
|
| 20 |
+
use Symfony\Component\DependencyInjection\Compiler\PassConfig;
|
| 21 |
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
| 22 |
use Symfony\Component\DependencyInjection\Definition;
|
| 23 |
+
use Symfony\Component\DependencyInjection\TypedReference;
|
| 24 |
|
| 25 |
class AddConsoleCommandPassTest extends TestCase
|
| 26 |
{
|
| 30 |
public function testProcess($public)
|
| 31 |
{
|
| 32 |
$container = new ContainerBuilder();
|
| 33 |
+
$container->addCompilerPass(new AddConsoleCommandPass(), PassConfig::TYPE_BEFORE_REMOVING);
|
| 34 |
$container->setParameter('my-command.class', 'Symfony\Component\Console\Tests\DependencyInjection\MyCommand');
|
| 35 |
|
| 36 |
$definition = new Definition('%my-command.class%');
|
| 57 |
$this->assertSame(array($alias => $id), $container->getParameter('console.command.ids'));
|
| 58 |
}
|
| 59 |
|
| 60 |
+
public function testProcessRegistersLazyCommands()
|
| 61 |
+
{
|
| 62 |
+
$container = new ContainerBuilder();
|
| 63 |
+
$command = $container
|
| 64 |
+
->register('my-command', MyCommand::class)
|
| 65 |
+
->setPublic(false)
|
| 66 |
+
->addTag('console.command', array('command' => 'my:command'))
|
| 67 |
+
->addTag('console.command', array('command' => 'my:alias'))
|
| 68 |
+
;
|
| 69 |
+
|
| 70 |
+
(new AddConsoleCommandPass())->process($container);
|
| 71 |
+
|
| 72 |
+
$commandLoader = $container->getDefinition('console.command_loader');
|
| 73 |
+
$commandLocator = $container->getDefinition((string) $commandLoader->getArgument(0));
|
| 74 |
+
|
| 75 |
+
$this->assertSame(ContainerCommandLoader::class, $commandLoader->getClass());
|
| 76 |
+
$this->assertSame(array('my:command' => 'my-command', 'my:alias' => 'my-command'), $commandLoader->getArgument(1));
|
| 77 |
+
$this->assertEquals(array(array('my-command' => new ServiceClosureArgument(new TypedReference('my-command', MyCommand::class)))), $commandLocator->getArguments());
|
| 78 |
+
$this->assertSame(array('console.command.symfony_component_console_tests_dependencyinjection_mycommand' => 'my-command'), $container->getParameter('console.command.ids'));
|
| 79 |
+
$this->assertSame(array('my-command' => true), $container->getParameter('console.lazy_command.ids'));
|
| 80 |
+
$this->assertSame(array(array('setName', array('my:command')), array('setAliases', array(array('my:alias')))), $command->getMethodCalls());
|
| 81 |
+
}
|
| 82 |
+
|
| 83 |
+
public function testProcessFallsBackToDefaultName()
|
| 84 |
+
{
|
| 85 |
+
$container = new ContainerBuilder();
|
| 86 |
+
$container
|
| 87 |
+
->register('with-default-name', NamedCommand::class)
|
| 88 |
+
->setPublic(false)
|
| 89 |
+
->addTag('console.command')
|
| 90 |
+
;
|
| 91 |
+
|
| 92 |
+
$pass = new AddConsoleCommandPass();
|
| 93 |
+
$pass->process($container);
|
| 94 |
+
|
| 95 |
+
$commandLoader = $container->getDefinition('console.command_loader');
|
| 96 |
+
$commandLocator = $container->getDefinition((string) $commandLoader->getArgument(0));
|
| 97 |
+
|
| 98 |
+
$this->assertSame(ContainerCommandLoader::class, $commandLoader->getClass());
|
| 99 |
+
$this->assertSame(array('default' => 'with-default-name'), $commandLoader->getArgument(1));
|
| 100 |
+
$this->assertEquals(array(array('with-default-name' => new ServiceClosureArgument(new TypedReference('with-default-name', NamedCommand::class)))), $commandLocator->getArguments());
|
| 101 |
+
$this->assertSame(array('console.command.symfony_component_console_tests_dependencyinjection_namedcommand' => 'with-default-name'), $container->getParameter('console.command.ids'));
|
| 102 |
+
$this->assertSame(array('with-default-name' => true), $container->getParameter('console.lazy_command.ids'));
|
| 103 |
+
|
| 104 |
+
$container = new ContainerBuilder();
|
| 105 |
+
$container
|
| 106 |
+
->register('with-default-name', NamedCommand::class)
|
| 107 |
+
->setPublic(false)
|
| 108 |
+
->addTag('console.command', array('command' => 'new-name'))
|
| 109 |
+
;
|
| 110 |
+
|
| 111 |
+
$pass->process($container);
|
| 112 |
+
|
| 113 |
+
$this->assertSame(array('new-name' => 'with-default-name'), $container->getDefinition('console.command_loader')->getArgument(1));
|
| 114 |
+
}
|
| 115 |
+
|
| 116 |
public function visibilityProvider()
|
| 117 |
{
|
| 118 |
return array(
|
| 129 |
{
|
| 130 |
$container = new ContainerBuilder();
|
| 131 |
$container->setResourceTracking(false);
|
| 132 |
+
$container->addCompilerPass(new AddConsoleCommandPass(), PassConfig::TYPE_BEFORE_REMOVING);
|
| 133 |
|
| 134 |
$definition = new Definition('Symfony\Component\Console\Tests\DependencyInjection\MyCommand');
|
| 135 |
$definition->addTag('console.command');
|
| 147 |
{
|
| 148 |
$container = new ContainerBuilder();
|
| 149 |
$container->setResourceTracking(false);
|
| 150 |
+
$container->addCompilerPass(new AddConsoleCommandPass(), PassConfig::TYPE_BEFORE_REMOVING);
|
| 151 |
|
| 152 |
$definition = new Definition('SplObjectStorage');
|
| 153 |
$definition->addTag('console.command');
|
| 177 |
$this->assertTrue($container->hasAlias($alias1));
|
| 178 |
$this->assertTrue($container->hasAlias($alias2));
|
| 179 |
}
|
| 180 |
+
|
| 181 |
+
public function testProcessOnChildDefinitionWithClass()
|
| 182 |
+
{
|
| 183 |
+
$container = new ContainerBuilder();
|
| 184 |
+
$container->addCompilerPass(new AddConsoleCommandPass(), PassConfig::TYPE_BEFORE_REMOVING);
|
| 185 |
+
$className = 'Symfony\Component\Console\Tests\DependencyInjection\MyCommand';
|
| 186 |
+
|
| 187 |
+
$parentId = 'my-parent-command';
|
| 188 |
+
$childId = 'my-child-command';
|
| 189 |
+
|
| 190 |
+
$parentDefinition = new Definition(/* no class */);
|
| 191 |
+
$parentDefinition->setAbstract(true)->setPublic(false);
|
| 192 |
+
|
| 193 |
+
$childDefinition = new ChildDefinition($parentId);
|
| 194 |
+
$childDefinition->addTag('console.command')->setPublic(true);
|
| 195 |
+
$childDefinition->setClass($className);
|
| 196 |
+
|
| 197 |
+
$container->setDefinition($parentId, $parentDefinition);
|
| 198 |
+
$container->setDefinition($childId, $childDefinition);
|
| 199 |
+
|
| 200 |
+
$container->compile();
|
| 201 |
+
$command = $container->get($childId);
|
| 202 |
+
|
| 203 |
+
$this->assertInstanceOf($className, $command);
|
| 204 |
+
}
|
| 205 |
+
|
| 206 |
+
public function testProcessOnChildDefinitionWithParentClass()
|
| 207 |
+
{
|
| 208 |
+
$container = new ContainerBuilder();
|
| 209 |
+
$container->addCompilerPass(new AddConsoleCommandPass(), PassConfig::TYPE_BEFORE_REMOVING);
|
| 210 |
+
$className = 'Symfony\Component\Console\Tests\DependencyInjection\MyCommand';
|
| 211 |
+
|
| 212 |
+
$parentId = 'my-parent-command';
|
| 213 |
+
$childId = 'my-child-command';
|
| 214 |
+
|
| 215 |
+
$parentDefinition = new Definition($className);
|
| 216 |
+
$parentDefinition->setAbstract(true)->setPublic(false);
|
| 217 |
+
|
| 218 |
+
$childDefinition = new ChildDefinition($parentId);
|
| 219 |
+
$childDefinition->addTag('console.command')->setPublic(true);
|
| 220 |
+
|
| 221 |
+
$container->setDefinition($parentId, $parentDefinition);
|
| 222 |
+
$container->setDefinition($childId, $childDefinition);
|
| 223 |
+
|
| 224 |
+
$container->compile();
|
| 225 |
+
$command = $container->get($childId);
|
| 226 |
+
|
| 227 |
+
$this->assertInstanceOf($className, $command);
|
| 228 |
+
}
|
| 229 |
+
|
| 230 |
+
/**
|
| 231 |
+
* @expectedException \RuntimeException
|
| 232 |
+
* @expectedExceptionMessage The definition for "my-child-command" has no class.
|
| 233 |
+
*/
|
| 234 |
+
public function testProcessOnChildDefinitionWithoutClass()
|
| 235 |
+
{
|
| 236 |
+
$container = new ContainerBuilder();
|
| 237 |
+
$container->addCompilerPass(new AddConsoleCommandPass(), PassConfig::TYPE_BEFORE_REMOVING);
|
| 238 |
+
|
| 239 |
+
$parentId = 'my-parent-command';
|
| 240 |
+
$childId = 'my-child-command';
|
| 241 |
+
|
| 242 |
+
$parentDefinition = new Definition();
|
| 243 |
+
$parentDefinition->setAbstract(true)->setPublic(false);
|
| 244 |
+
|
| 245 |
+
$childDefinition = new ChildDefinition($parentId);
|
| 246 |
+
$childDefinition->addTag('console.command')->setPublic(true);
|
| 247 |
+
|
| 248 |
+
$container->setDefinition($parentId, $parentDefinition);
|
| 249 |
+
$container->setDefinition($childId, $childDefinition);
|
| 250 |
+
|
| 251 |
+
$container->compile();
|
| 252 |
+
}
|
| 253 |
}
|
| 254 |
|
| 255 |
class MyCommand extends Command
|
| 256 |
{
|
| 257 |
}
|
| 258 |
+
|
| 259 |
+
class NamedCommand extends Command
|
| 260 |
+
{
|
| 261 |
+
protected static $defaultName = 'default';
|
| 262 |
+
}
|
vendor/symfony/console/Tests/EventListener/ErrorListenerTest.php
CHANGED
|
@@ -20,8 +20,8 @@ use Symfony\Component\Console\EventListener\ErrorListener;
|
|
| 20 |
use Symfony\Component\Console\Input\ArgvInput;
|
| 21 |
use Symfony\Component\Console\Input\ArrayInput;
|
| 22 |
use Symfony\Component\Console\Input\Input;
|
| 23 |
-
use Symfony\Component\Console\Input\StringInput;
|
| 24 |
use Symfony\Component\Console\Input\InputInterface;
|
|
|
|
| 25 |
use Symfony\Component\Console\Output\OutputInterface;
|
| 26 |
|
| 27 |
class ErrorListenerTest extends TestCase
|
|
@@ -34,7 +34,7 @@ class ErrorListenerTest extends TestCase
|
|
| 34 |
$logger
|
| 35 |
->expects($this->once())
|
| 36 |
->method('error')
|
| 37 |
-
->with('Error thrown while running command "{command}". Message: "{message}"', array('
|
| 38 |
;
|
| 39 |
|
| 40 |
$listener = new ErrorListener($logger);
|
|
@@ -49,7 +49,7 @@ class ErrorListenerTest extends TestCase
|
|
| 49 |
$logger
|
| 50 |
->expects($this->once())
|
| 51 |
->method('error')
|
| 52 |
-
->with('An error occurred while using the console. Message: "{message}"', array('
|
| 53 |
;
|
| 54 |
|
| 55 |
$listener = new ErrorListener($logger);
|
| 20 |
use Symfony\Component\Console\Input\ArgvInput;
|
| 21 |
use Symfony\Component\Console\Input\ArrayInput;
|
| 22 |
use Symfony\Component\Console\Input\Input;
|
|
|
|
| 23 |
use Symfony\Component\Console\Input\InputInterface;
|
| 24 |
+
use Symfony\Component\Console\Input\StringInput;
|
| 25 |
use Symfony\Component\Console\Output\OutputInterface;
|
| 26 |
|
| 27 |
class ErrorListenerTest extends TestCase
|
| 34 |
$logger
|
| 35 |
->expects($this->once())
|
| 36 |
->method('error')
|
| 37 |
+
->with('Error thrown while running command "{command}". Message: "{message}"', array('exception' => $error, 'command' => 'test:run --foo=baz buzz', 'message' => 'An error occurred'))
|
| 38 |
;
|
| 39 |
|
| 40 |
$listener = new ErrorListener($logger);
|
| 49 |
$logger
|
| 50 |
->expects($this->once())
|
| 51 |
->method('error')
|
| 52 |
+
->with('An error occurred while using the console. Message: "{message}"', array('exception' => $error, 'message' => 'An error occurred'))
|
| 53 |
;
|
| 54 |
|
| 55 |
$listener = new ErrorListener($logger);
|
vendor/symfony/console/Tests/Fixtures/Foo6Command.php
CHANGED
|
@@ -1,6 +1,5 @@
|
|
| 1 |
<?php
|
| 2 |
|
| 3 |
-
|
| 4 |
use Symfony\Component\Console\Command\Command;
|
| 5 |
|
| 6 |
class Foo6Command extends Command
|
| 1 |
<?php
|
| 2 |
|
|
|
|
| 3 |
use Symfony\Component\Console\Command\Command;
|
| 4 |
|
| 5 |
class Foo6Command extends Command
|
vendor/symfony/console/Tests/Fixtures/FooSameCaseLowercaseCommand.php
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
use Symfony\Component\Console\Command\Command;
|
| 4 |
+
|
| 5 |
+
class FooSameCaseLowercaseCommand extends Command
|
| 6 |
+
{
|
| 7 |
+
protected function configure()
|
| 8 |
+
{
|
| 9 |
+
$this->setName('foo:bar')->setDescription('foo:bar command');
|
| 10 |
+
}
|
| 11 |
+
}
|
vendor/symfony/console/Tests/Fixtures/FooSameCaseUppercaseCommand.php
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
use Symfony\Component\Console\Command\Command;
|
| 4 |
+
|
| 5 |
+
class FooSameCaseUppercaseCommand extends Command
|
| 6 |
+
{
|
| 7 |
+
protected function configure()
|
| 8 |
+
{
|
| 9 |
+
$this->setName('foo:BAR')->setDescription('foo:BAR command');
|
| 10 |
+
}
|
| 11 |
+
}
|
vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_8.php
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
<?php
|
| 2 |
|
|
|
|
| 3 |
use Symfony\Component\Console\Input\InputInterface;
|
| 4 |
use Symfony\Component\Console\Output\OutputInterface;
|
| 5 |
use Symfony\Component\Console\Style\SymfonyStyle;
|
| 6 |
-
use Symfony\Component\Console\Helper\TableCell;
|
| 7 |
|
| 8 |
//Ensure formatting tables when using multiple headers with TableCell
|
| 9 |
return function (InputInterface $input, OutputInterface $output) {
|
| 1 |
<?php
|
| 2 |
|
| 3 |
+
use Symfony\Component\Console\Helper\TableCell;
|
| 4 |
use Symfony\Component\Console\Input\InputInterface;
|
| 5 |
use Symfony\Component\Console\Output\OutputInterface;
|
| 6 |
use Symfony\Component\Console\Style\SymfonyStyle;
|
|
|
|
| 7 |
|
| 8 |
//Ensure formatting tables when using multiple headers with TableCell
|
| 9 |
return function (InputInterface $input, OutputInterface $output) {
|
vendor/symfony/console/Tests/Formatter/OutputFormatterStyleStackTest.php
CHANGED
|
@@ -12,8 +12,8 @@
|
|
| 12 |
namespace Symfony\Component\Console\Tests\Formatter;
|
| 13 |
|
| 14 |
use PHPUnit\Framework\TestCase;
|
| 15 |
-
use Symfony\Component\Console\Formatter\OutputFormatterStyleStack;
|
| 16 |
use Symfony\Component\Console\Formatter\OutputFormatterStyle;
|
|
|
|
| 17 |
|
| 18 |
class OutputFormatterStyleStackTest extends TestCase
|
| 19 |
{
|
| 12 |
namespace Symfony\Component\Console\Tests\Formatter;
|
| 13 |
|
| 14 |
use PHPUnit\Framework\TestCase;
|
|
|
|
| 15 |
use Symfony\Component\Console\Formatter\OutputFormatterStyle;
|
| 16 |
+
use Symfony\Component\Console\Formatter\OutputFormatterStyleStack;
|
| 17 |
|
| 18 |
class OutputFormatterStyleStackTest extends TestCase
|
| 19 |
{
|
vendor/symfony/console/Tests/Helper/HelperSetTest.php
CHANGED
|
@@ -12,8 +12,8 @@
|
|
| 12 |
namespace Symfony\Component\Console\Tests\Helper;
|
| 13 |
|
| 14 |
use PHPUnit\Framework\TestCase;
|
| 15 |
-
use Symfony\Component\Console\Helper\HelperSet;
|
| 16 |
use Symfony\Component\Console\Command\Command;
|
|
|
|
| 17 |
|
| 18 |
class HelperSetTest extends TestCase
|
| 19 |
{
|
| 12 |
namespace Symfony\Component\Console\Tests\Helper;
|
| 13 |
|
| 14 |
use PHPUnit\Framework\TestCase;
|
|
|
|
| 15 |
use Symfony\Component\Console\Command\Command;
|
| 16 |
+
use Symfony\Component\Console\Helper\HelperSet;
|
| 17 |
|
| 18 |
class HelperSetTest extends TestCase
|
| 19 |
{
|
vendor/symfony/console/Tests/Helper/ProcessHelperTest.php
CHANGED
|
@@ -14,10 +14,9 @@ namespace Symfony\Component\Console\Tests\Helper;
|
|
| 14 |
use PHPUnit\Framework\TestCase;
|
| 15 |
use Symfony\Component\Console\Helper\DebugFormatterHelper;
|
| 16 |
use Symfony\Component\Console\Helper\HelperSet;
|
| 17 |
-
use Symfony\Component\Console\Output\StreamOutput;
|
| 18 |
use Symfony\Component\Console\Helper\ProcessHelper;
|
|
|
|
| 19 |
use Symfony\Component\Process\Process;
|
| 20 |
-
use Symfony\Component\Process\ProcessBuilder;
|
| 21 |
|
| 22 |
class ProcessHelperTest extends TestCase
|
| 23 |
{
|
|
@@ -85,8 +84,8 @@ EOT;
|
|
| 85 |
EOT;
|
| 86 |
|
| 87 |
$errorMessage = 'An error occurred';
|
| 88 |
-
$args = new
|
| 89 |
-
$args = $args->
|
| 90 |
$successOutputProcessDebug = str_replace("'php' '-r' 'echo 42;'", $args, $successOutputProcessDebug);
|
| 91 |
|
| 92 |
return array(
|
| 14 |
use PHPUnit\Framework\TestCase;
|
| 15 |
use Symfony\Component\Console\Helper\DebugFormatterHelper;
|
| 16 |
use Symfony\Component\Console\Helper\HelperSet;
|
|
|
|
| 17 |
use Symfony\Component\Console\Helper\ProcessHelper;
|
| 18 |
+
use Symfony\Component\Console\Output\StreamOutput;
|
| 19 |
use Symfony\Component\Process\Process;
|
|
|
|
| 20 |
|
| 21 |
class ProcessHelperTest extends TestCase
|
| 22 |
{
|
| 84 |
EOT;
|
| 85 |
|
| 86 |
$errorMessage = 'An error occurred';
|
| 87 |
+
$args = new Process(array('php', '-r', 'echo 42;'));
|
| 88 |
+
$args = $args->getCommandLine();
|
| 89 |
$successOutputProcessDebug = str_replace("'php' '-r' 'echo 42;'", $args, $successOutputProcessDebug);
|
| 90 |
|
| 91 |
return array(
|
vendor/symfony/console/Tests/Helper/ProgressBarTest.php
CHANGED
|
@@ -12,8 +12,8 @@
|
|
| 12 |
namespace Symfony\Component\Console\Tests\Helper;
|
| 13 |
|
| 14 |
use PHPUnit\Framework\TestCase;
|
| 15 |
-
use Symfony\Component\Console\Helper\ProgressBar;
|
| 16 |
use Symfony\Component\Console\Helper\Helper;
|
|
|
|
| 17 |
use Symfony\Component\Console\Output\StreamOutput;
|
| 18 |
|
| 19 |
/**
|
| 12 |
namespace Symfony\Component\Console\Tests\Helper;
|
| 13 |
|
| 14 |
use PHPUnit\Framework\TestCase;
|
|
|
|
| 15 |
use Symfony\Component\Console\Helper\Helper;
|
| 16 |
+
use Symfony\Component\Console\Helper\ProgressBar;
|
| 17 |
use Symfony\Component\Console\Output\StreamOutput;
|
| 18 |
|
| 19 |
/**
|
vendor/symfony/console/Tests/Helper/QuestionHelperTest.php
CHANGED
|
@@ -12,9 +12,9 @@
|
|
| 12 |
namespace Symfony\Component\Console\Tests\Helper;
|
| 13 |
|
| 14 |
use Symfony\Component\Console\Formatter\OutputFormatter;
|
| 15 |
-
use Symfony\Component\Console\Helper\QuestionHelper;
|
| 16 |
-
use Symfony\Component\Console\Helper\HelperSet;
|
| 17 |
use Symfony\Component\Console\Helper\FormatterHelper;
|
|
|
|
|
|
|
| 18 |
use Symfony\Component\Console\Output\StreamOutput;
|
| 19 |
use Symfony\Component\Console\Question\ChoiceQuestion;
|
| 20 |
use Symfony\Component\Console\Question\ConfirmationQuestion;
|
|
@@ -157,6 +157,29 @@ class QuestionHelperTest extends AbstractQuestionHelperTest
|
|
| 157 |
$this->assertEquals('AsseticBundle', $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question));
|
| 158 |
}
|
| 159 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 160 |
public function testAutocompleteWithTrailingBackslash()
|
| 161 |
{
|
| 162 |
if (!$this->hasSttyAvailable()) {
|
|
@@ -198,7 +221,7 @@ class QuestionHelperTest extends AbstractQuestionHelperTest
|
|
| 198 |
|
| 199 |
public function testAskHiddenResponse()
|
| 200 |
{
|
| 201 |
-
if ('\\' === DIRECTORY_SEPARATOR) {
|
| 202 |
$this->markTestSkipped('This test is not supported on Windows');
|
| 203 |
}
|
| 204 |
|
|
@@ -253,7 +276,7 @@ class QuestionHelperTest extends AbstractQuestionHelperTest
|
|
| 253 |
|
| 254 |
$error = 'This is not a color!';
|
| 255 |
$validator = function ($color) use ($error) {
|
| 256 |
-
if (
|
| 257 |
throw new \InvalidArgumentException($error);
|
| 258 |
}
|
| 259 |
|
|
@@ -614,7 +637,7 @@ class QuestionHelperTest extends AbstractQuestionHelperTest
|
|
| 614 |
*/
|
| 615 |
public function testLegacyAskHiddenResponse()
|
| 616 |
{
|
| 617 |
-
if ('\\' === DIRECTORY_SEPARATOR) {
|
| 618 |
$this->markTestSkipped('This test is not supported on Windows');
|
| 619 |
}
|
| 620 |
|
|
@@ -665,7 +688,7 @@ class QuestionHelperTest extends AbstractQuestionHelperTest
|
|
| 665 |
|
| 666 |
$error = 'This is not a color!';
|
| 667 |
$validator = function ($color) use ($error) {
|
| 668 |
-
if (
|
| 669 |
throw new \InvalidArgumentException($error);
|
| 670 |
}
|
| 671 |
|
| 12 |
namespace Symfony\Component\Console\Tests\Helper;
|
| 13 |
|
| 14 |
use Symfony\Component\Console\Formatter\OutputFormatter;
|
|
|
|
|
|
|
| 15 |
use Symfony\Component\Console\Helper\FormatterHelper;
|
| 16 |
+
use Symfony\Component\Console\Helper\HelperSet;
|
| 17 |
+
use Symfony\Component\Console\Helper\QuestionHelper;
|
| 18 |
use Symfony\Component\Console\Output\StreamOutput;
|
| 19 |
use Symfony\Component\Console\Question\ChoiceQuestion;
|
| 20 |
use Symfony\Component\Console\Question\ConfirmationQuestion;
|
| 157 |
$this->assertEquals('AsseticBundle', $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question));
|
| 158 |
}
|
| 159 |
|
| 160 |
+
public function testAskWithAutocompleteWithExactMatch()
|
| 161 |
+
{
|
| 162 |
+
if (!$this->hasSttyAvailable()) {
|
| 163 |
+
$this->markTestSkipped('`stty` is required to test autocomplete functionality');
|
| 164 |
+
}
|
| 165 |
+
|
| 166 |
+
$inputStream = $this->getInputStream("b\n");
|
| 167 |
+
|
| 168 |
+
$possibleChoices = array(
|
| 169 |
+
'a' => 'berlin',
|
| 170 |
+
'b' => 'copenhagen',
|
| 171 |
+
'c' => 'amsterdam',
|
| 172 |
+
);
|
| 173 |
+
|
| 174 |
+
$dialog = new QuestionHelper();
|
| 175 |
+
$dialog->setHelperSet(new HelperSet(array(new FormatterHelper())));
|
| 176 |
+
|
| 177 |
+
$question = new ChoiceQuestion('Please select a city', $possibleChoices);
|
| 178 |
+
$question->setMaxAttempts(1);
|
| 179 |
+
|
| 180 |
+
$this->assertSame('b', $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question));
|
| 181 |
+
}
|
| 182 |
+
|
| 183 |
public function testAutocompleteWithTrailingBackslash()
|
| 184 |
{
|
| 185 |
if (!$this->hasSttyAvailable()) {
|
| 221 |
|
| 222 |
public function testAskHiddenResponse()
|
| 223 |
{
|
| 224 |
+
if ('\\' === \DIRECTORY_SEPARATOR) {
|
| 225 |
$this->markTestSkipped('This test is not supported on Windows');
|
| 226 |
}
|
| 227 |
|
| 276 |
|
| 277 |
$error = 'This is not a color!';
|
| 278 |
$validator = function ($color) use ($error) {
|
| 279 |
+
if (!\in_array($color, array('white', 'black'))) {
|
| 280 |
throw new \InvalidArgumentException($error);
|
| 281 |
}
|
| 282 |
|
| 637 |
*/
|
| 638 |
public function testLegacyAskHiddenResponse()
|
| 639 |
{
|
| 640 |
+
if ('\\' === \DIRECTORY_SEPARATOR) {
|
| 641 |
$this->markTestSkipped('This test is not supported on Windows');
|
| 642 |
}
|
| 643 |
|
| 688 |
|
| 689 |
$error = 'This is not a color!';
|
| 690 |
$validator = function ($color) use ($error) {
|
| 691 |
+
if (!\in_array($color, array('white', 'black'))) {
|
| 692 |
throw new \InvalidArgumentException($error);
|
| 693 |
}
|
| 694 |
|
vendor/symfony/console/Tests/Helper/SymfonyQuestionHelperTest.php
CHANGED
|
@@ -6,8 +6,8 @@ use Symfony\Component\Console\Helper\FormatterHelper;
|
|
| 6 |
use Symfony\Component\Console\Helper\HelperSet;
|
| 7 |
use Symfony\Component\Console\Helper\SymfonyQuestionHelper;
|
| 8 |
use Symfony\Component\Console\Output\StreamOutput;
|
| 9 |
-
use Symfony\Component\Console\Question\Question;
|
| 10 |
use Symfony\Component\Console\Question\ChoiceQuestion;
|
|
|
|
| 11 |
|
| 12 |
/**
|
| 13 |
* @group tty
|
|
@@ -74,6 +74,18 @@ class SymfonyQuestionHelperTest extends AbstractQuestionHelperTest
|
|
| 74 |
$this->assertOutputContains('What is your favorite superhero? [Superman, Batman]', $output);
|
| 75 |
}
|
| 76 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 77 |
public function testAskReturnsNullIfValidatorAllowsIt()
|
| 78 |
{
|
| 79 |
$questionHelper = new SymfonyQuestionHelper();
|
| 6 |
use Symfony\Component\Console\Helper\HelperSet;
|
| 7 |
use Symfony\Component\Console\Helper\SymfonyQuestionHelper;
|
| 8 |
use Symfony\Component\Console\Output\StreamOutput;
|
|
|
|
| 9 |
use Symfony\Component\Console\Question\ChoiceQuestion;
|
| 10 |
+
use Symfony\Component\Console\Question\Question;
|
| 11 |
|
| 12 |
/**
|
| 13 |
* @group tty
|
| 74 |
$this->assertOutputContains('What is your favorite superhero? [Superman, Batman]', $output);
|
| 75 |
}
|
| 76 |
|
| 77 |
+
public function testAskChoiceWithChoiceValueAsDefault()
|
| 78 |
+
{
|
| 79 |
+
$questionHelper = new SymfonyQuestionHelper();
|
| 80 |
+
$helperSet = new HelperSet(array(new FormatterHelper()));
|
| 81 |
+
$questionHelper->setHelperSet($helperSet);
|
| 82 |
+
$question = new ChoiceQuestion('What is your favorite superhero?', array('Superman', 'Batman', 'Spiderman'), 'Batman');
|
| 83 |
+
$question->setMaxAttempts(1);
|
| 84 |
+
|
| 85 |
+
$this->assertSame('Batman', $questionHelper->ask($this->createStreamableInputInterfaceMock($this->getInputStream("Batman\n")), $output = $this->createOutputInterface(), $question));
|
| 86 |
+
$this->assertOutputContains('What is your favorite superhero? [Batman]', $output);
|
| 87 |
+
}
|
| 88 |
+
|
| 89 |
public function testAskReturnsNullIfValidatorAllowsIt()
|
| 90 |
{
|
| 91 |
$questionHelper = new SymfonyQuestionHelper();
|
vendor/symfony/console/Tests/Helper/TableTest.php
CHANGED
|
@@ -13,9 +13,9 @@ namespace Symfony\Component\Console\Tests\Helper;
|
|
| 13 |
|
| 14 |
use PHPUnit\Framework\TestCase;
|
| 15 |
use Symfony\Component\Console\Helper\Table;
|
| 16 |
-
use Symfony\Component\Console\Helper\TableStyle;
|
| 17 |
-
use Symfony\Component\Console\Helper\TableSeparator;
|
| 18 |
use Symfony\Component\Console\Helper\TableCell;
|
|
|
|
|
|
|
| 19 |
use Symfony\Component\Console\Output\StreamOutput;
|
| 20 |
|
| 21 |
class TableTest extends TestCase
|
|
@@ -726,7 +726,23 @@ TABLE;
|
|
| 726 |
$this->assertEquals($expected, $this->getOutputContent($output));
|
| 727 |
}
|
| 728 |
|
| 729 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 730 |
{
|
| 731 |
$table = new Table($output = $this->getOutputStream());
|
| 732 |
$table
|
|
@@ -758,7 +774,7 @@ TABLE;
|
|
| 758 |
$this->assertEquals($expected, $this->getOutputContent($output));
|
| 759 |
}
|
| 760 |
|
| 761 |
-
public function
|
| 762 |
{
|
| 763 |
$table = new Table($output = $this->getOutputStream());
|
| 764 |
$table
|
|
@@ -808,6 +824,42 @@ TABLE;
|
|
| 808 |
Table::getStyleDefinition('absent');
|
| 809 |
}
|
| 810 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 811 |
protected function getOutputStream($decorated = false)
|
| 812 |
{
|
| 813 |
return new StreamOutput($this->stream, StreamOutput::VERBOSITY_NORMAL, $decorated);
|
| 13 |
|
| 14 |
use PHPUnit\Framework\TestCase;
|
| 15 |
use Symfony\Component\Console\Helper\Table;
|
|
|
|
|
|
|
| 16 |
use Symfony\Component\Console\Helper\TableCell;
|
| 17 |
+
use Symfony\Component\Console\Helper\TableSeparator;
|
| 18 |
+
use Symfony\Component\Console\Helper\TableStyle;
|
| 19 |
use Symfony\Component\Console\Output\StreamOutput;
|
| 20 |
|
| 21 |
class TableTest extends TestCase
|
| 726 |
$this->assertEquals($expected, $this->getOutputContent($output));
|
| 727 |
}
|
| 728 |
|
| 729 |
+
/**
|
| 730 |
+
* @expectedException \Symfony\Component\Console\Exception\InvalidArgumentException
|
| 731 |
+
* @expectedExceptionMessage A cell must be a TableCell, a scalar or an object implementing __toString, array given.
|
| 732 |
+
*/
|
| 733 |
+
public function testThrowsWhenTheCellInAnArray()
|
| 734 |
+
{
|
| 735 |
+
$table = new Table($output = $this->getOutputStream());
|
| 736 |
+
$table
|
| 737 |
+
->setHeaders(array('ISBN', 'Title', 'Author', 'Price'))
|
| 738 |
+
->setRows(array(
|
| 739 |
+
array('99921-58-10-7', array(), 'Dante Alighieri', '9.95'),
|
| 740 |
+
));
|
| 741 |
+
|
| 742 |
+
$table->render();
|
| 743 |
+
}
|
| 744 |
+
|
| 745 |
+
public function testColumnWidth()
|
| 746 |
{
|
| 747 |
$table = new Table($output = $this->getOutputStream());
|
| 748 |
$table
|
| 774 |
$this->assertEquals($expected, $this->getOutputContent($output));
|
| 775 |
}
|
| 776 |
|
| 777 |
+
public function testColumnWidths()
|
| 778 |
{
|
| 779 |
$table = new Table($output = $this->getOutputStream());
|
| 780 |
$table
|
| 824 |
Table::getStyleDefinition('absent');
|
| 825 |
}
|
| 826 |
|
| 827 |
+
public function testBoxedStyleWithColspan()
|
| 828 |
+
{
|
| 829 |
+
$boxed = new TableStyle();
|
| 830 |
+
$boxed
|
| 831 |
+
->setHorizontalBorderChar('─')
|
| 832 |
+
->setVerticalBorderChar('│')
|
| 833 |
+
->setCrossingChar('┼')
|
| 834 |
+
;
|
| 835 |
+
|
| 836 |
+
$table = new Table($output = $this->getOutputStream());
|
| 837 |
+
$table->setStyle($boxed);
|
| 838 |
+
$table
|
| 839 |
+
->setHeaders(array('ISBN', 'Title', 'Author'))
|
| 840 |
+
->setRows(array(
|
| 841 |
+
array('99921-58-10-7', 'Divine Comedy', 'Dante Alighieri'),
|
| 842 |
+
new TableSeparator(),
|
| 843 |
+
array(new TableCell('This value spans 3 columns.', array('colspan' => 3))),
|
| 844 |
+
))
|
| 845 |
+
;
|
| 846 |
+
$table->render();
|
| 847 |
+
|
| 848 |
+
$expected =
|
| 849 |
+
<<<TABLE
|
| 850 |
+
┼───────────────┼───────────────┼─────────────────┼
|
| 851 |
+
│ ISBN │ Title │ Author │
|
| 852 |
+
┼───────────────┼───────────────┼─────────────────┼
|
| 853 |
+
│ 99921-58-10-7 │ Divine Comedy │ Dante Alighieri │
|
| 854 |
+
┼───────────────┼───────────────┼─────────────────┼
|
| 855 |
+
│ This value spans 3 columns. │
|
| 856 |
+
┼───────────────┼───────────────┼─────────────────┼
|
| 857 |
+
|
| 858 |
+
TABLE;
|
| 859 |
+
|
| 860 |
+
$this->assertSame($expected, $this->getOutputContent($output));
|
| 861 |
+
}
|
| 862 |
+
|
| 863 |
protected function getOutputStream($decorated = false)
|
| 864 |
{
|
| 865 |
return new StreamOutput($this->stream, StreamOutput::VERBOSITY_NORMAL, $decorated);
|
vendor/symfony/console/Tests/Input/ArgvInputTest.php
CHANGED
|
@@ -13,8 +13,8 @@ namespace Symfony\Component\Console\Tests\Input;
|
|
| 13 |
|
| 14 |
use PHPUnit\Framework\TestCase;
|
| 15 |
use Symfony\Component\Console\Input\ArgvInput;
|
| 16 |
-
use Symfony\Component\Console\Input\InputDefinition;
|
| 17 |
use Symfony\Component\Console\Input\InputArgument;
|
|
|
|
| 18 |
use Symfony\Component\Console\Input\InputOption;
|
| 19 |
|
| 20 |
class ArgvInputTest extends TestCase
|
|
@@ -246,6 +246,11 @@ class ArgvInputTest extends TestCase
|
|
| 246 |
new InputDefinition(array(new InputArgument('number'))),
|
| 247 |
'The "-1" option does not exist.',
|
| 248 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 249 |
);
|
| 250 |
}
|
| 251 |
|
|
@@ -314,6 +319,10 @@ class ArgvInputTest extends TestCase
|
|
| 314 |
$input = new ArgvInput(array('cli.php', '-f', 'foo'));
|
| 315 |
$this->assertTrue($input->hasParameterOption('-f'), '->hasParameterOption() returns true if the given short option is in the raw input');
|
| 316 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 317 |
$input = new ArgvInput(array('cli.php', '--foo', 'foo'));
|
| 318 |
$this->assertTrue($input->hasParameterOption('--foo'), '->hasParameterOption() returns true if the given short option is in the raw input');
|
| 319 |
|
|
@@ -339,6 +348,46 @@ class ArgvInputTest extends TestCase
|
|
| 339 |
$this->assertFalse($input->hasParameterOption('--foo', true), '->hasParameterOption() returns false if the given option is in the raw input but after an end of options signal');
|
| 340 |
}
|
| 341 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 342 |
public function testToString()
|
| 343 |
{
|
| 344 |
$input = new ArgvInput(array('cli.php', '-f', 'foo'));
|
|
@@ -351,25 +400,26 @@ class ArgvInputTest extends TestCase
|
|
| 351 |
/**
|
| 352 |
* @dataProvider provideGetParameterOptionValues
|
| 353 |
*/
|
| 354 |
-
public function testGetParameterOptionEqualSign($argv, $key, $onlyParams, $expected)
|
| 355 |
{
|
| 356 |
$input = new ArgvInput($argv);
|
| 357 |
-
$this->assertEquals($expected, $input->getParameterOption($key,
|
| 358 |
}
|
| 359 |
|
| 360 |
public function provideGetParameterOptionValues()
|
| 361 |
{
|
| 362 |
return array(
|
| 363 |
-
array(array('app/console', 'foo:bar', '-e', '
|
| 364 |
-
array(array('app/console', 'foo:bar', '
|
| 365 |
-
array(array('app/console', 'foo:bar', '
|
| 366 |
-
array(array('app/console', 'foo:bar', '
|
| 367 |
-
array(array('app/console', 'foo:bar', '--env=dev', '
|
| 368 |
-
array(array('app/console', 'foo:bar', '--env=dev', '
|
| 369 |
-
array(array('app/console', 'foo:bar', '--env', '
|
| 370 |
-
array(array('app/console', 'foo:bar', '--env', 'val', '--
|
| 371 |
-
array(array('app/console', 'foo:bar', '--', '--
|
| 372 |
-
array(array('app/console', 'foo:bar', '--', '--env=dev'), '--env',
|
|
|
|
| 373 |
);
|
| 374 |
}
|
| 375 |
|
| 13 |
|
| 14 |
use PHPUnit\Framework\TestCase;
|
| 15 |
use Symfony\Component\Console\Input\ArgvInput;
|
|
|
|
| 16 |
use Symfony\Component\Console\Input\InputArgument;
|
| 17 |
+
use Symfony\Component\Console\Input\InputDefinition;
|
| 18 |
use Symfony\Component\Console\Input\InputOption;
|
| 19 |
|
| 20 |
class ArgvInputTest extends TestCase
|
| 246 |
new InputDefinition(array(new InputArgument('number'))),
|
| 247 |
'The "-1" option does not exist.',
|
| 248 |
),
|
| 249 |
+
array(
|
| 250 |
+
array('cli.php', '-fЩ'),
|
| 251 |
+
new InputDefinition(array(new InputOption('foo', 'f', InputOption::VALUE_NONE))),
|
| 252 |
+
'The "-Щ" option does not exist.',
|
| 253 |
+
),
|
| 254 |
);
|
| 255 |
}
|
| 256 |
|
| 319 |
$input = new ArgvInput(array('cli.php', '-f', 'foo'));
|
| 320 |
$this->assertTrue($input->hasParameterOption('-f'), '->hasParameterOption() returns true if the given short option is in the raw input');
|
| 321 |
|
| 322 |
+
$input = new ArgvInput(array('cli.php', '-etest'));
|
| 323 |
+
$this->assertTrue($input->hasParameterOption('-e'), '->hasParameterOption() returns true if the given short option is in the raw input');
|
| 324 |
+
$this->assertFalse($input->hasParameterOption('-s'), '->hasParameterOption() returns true if the given short option is in the raw input');
|
| 325 |
+
|
| 326 |
$input = new ArgvInput(array('cli.php', '--foo', 'foo'));
|
| 327 |
$this->assertTrue($input->hasParameterOption('--foo'), '->hasParameterOption() returns true if the given short option is in the raw input');
|
| 328 |
|
| 348 |
$this->assertFalse($input->hasParameterOption('--foo', true), '->hasParameterOption() returns false if the given option is in the raw input but after an end of options signal');
|
| 349 |
}
|
| 350 |
|
| 351 |
+
public function testHasParameterOptionEdgeCasesAndLimitations()
|
| 352 |
+
{
|
| 353 |
+
$input = new ArgvInput(array('cli.php', '-fh'));
|
| 354 |
+
// hasParameterOption does not know if the previous short option, -f,
|
| 355 |
+
// takes a value or not. If -f takes a value, then -fh does NOT include
|
| 356 |
+
// -h; Otherwise it does. Since we do not know which short options take
|
| 357 |
+
// values, hasParameterOption does not support this use-case.
|
| 358 |
+
$this->assertFalse($input->hasParameterOption('-h'), '->hasParameterOption() returns true if the given short option is in the raw input');
|
| 359 |
+
// hasParameterOption does detect that `-fh` contains `-f`, since
|
| 360 |
+
// `-f` is the first short option in the set.
|
| 361 |
+
$this->assertTrue($input->hasParameterOption('-f'), '->hasParameterOption() returns true if the given short option is in the raw input');
|
| 362 |
+
// The test below happens to pass, although it might make more sense
|
| 363 |
+
// to disallow it, and require the use of
|
| 364 |
+
// $input->hasParameterOption('-f') && $input->hasParameterOption('-h')
|
| 365 |
+
// instead.
|
| 366 |
+
$this->assertTrue($input->hasParameterOption('-fh'), '->hasParameterOption() returns true if the given short option is in the raw input');
|
| 367 |
+
// In theory, if -fh is supported, then -hf should also work.
|
| 368 |
+
// However, this is not supported.
|
| 369 |
+
$this->assertFalse($input->hasParameterOption('-hf'), '->hasParameterOption() returns true if the given short option is in the raw input');
|
| 370 |
+
|
| 371 |
+
$input = new ArgvInput(array('cli.php', '-f', '-h'));
|
| 372 |
+
// If hasParameterOption('-fh') is supported for 'cli.php -fh', then
|
| 373 |
+
// one might also expect that it should also be supported for
|
| 374 |
+
// 'cli.php -f -h'. However, this is not supported.
|
| 375 |
+
$this->assertFalse($input->hasParameterOption('-fh'), '->hasParameterOption() returns true if the given short option is in the raw input');
|
| 376 |
+
}
|
| 377 |
+
|
| 378 |
+
public function testNoWarningOnInvalidParameterOption()
|
| 379 |
+
{
|
| 380 |
+
$input = new ArgvInput(array('cli.php', '-edev'));
|
| 381 |
+
|
| 382 |
+
$this->assertTrue($input->hasParameterOption(array('-e', '')));
|
| 383 |
+
// No warning thrown
|
| 384 |
+
$this->assertFalse($input->hasParameterOption(array('-m', '')));
|
| 385 |
+
|
| 386 |
+
$this->assertEquals('dev', $input->getParameterOption(array('-e', '')));
|
| 387 |
+
// No warning thrown
|
| 388 |
+
$this->assertFalse($input->getParameterOption(array('-m', '')));
|
| 389 |
+
}
|
| 390 |
+
|
| 391 |
public function testToString()
|
| 392 |
{
|
| 393 |
$input = new ArgvInput(array('cli.php', '-f', 'foo'));
|
| 400 |
/**
|
| 401 |
* @dataProvider provideGetParameterOptionValues
|
| 402 |
*/
|
| 403 |
+
public function testGetParameterOptionEqualSign($argv, $key, $default, $onlyParams, $expected)
|
| 404 |
{
|
| 405 |
$input = new ArgvInput($argv);
|
| 406 |
+
$this->assertEquals($expected, $input->getParameterOption($key, $default, $onlyParams), '->getParameterOption() returns the expected value');
|
| 407 |
}
|
| 408 |
|
| 409 |
public function provideGetParameterOptionValues()
|
| 410 |
{
|
| 411 |
return array(
|
| 412 |
+
array(array('app/console', 'foo:bar'), '-e', 'default', false, 'default'),
|
| 413 |
+
array(array('app/console', 'foo:bar', '-e', 'dev'), '-e', 'default', false, 'dev'),
|
| 414 |
+
array(array('app/console', 'foo:bar', '--env=dev'), '--env', 'default', false, 'dev'),
|
| 415 |
+
array(array('app/console', 'foo:bar', '-e', 'dev'), array('-e', '--env'), 'default', false, 'dev'),
|
| 416 |
+
array(array('app/console', 'foo:bar', '--env=dev'), array('-e', '--env'), 'default', false, 'dev'),
|
| 417 |
+
array(array('app/console', 'foo:bar', '--env=dev', '--en=1'), array('--en'), 'default', false, '1'),
|
| 418 |
+
array(array('app/console', 'foo:bar', '--env=dev', '', '--en=1'), array('--en'), 'default', false, '1'),
|
| 419 |
+
array(array('app/console', 'foo:bar', '--env', 'val'), '--env', 'default', false, 'val'),
|
| 420 |
+
array(array('app/console', 'foo:bar', '--env', 'val', '--dummy'), '--env', 'default', false, 'val'),
|
| 421 |
+
array(array('app/console', 'foo:bar', '--', '--env=dev'), '--env', 'default', false, 'dev'),
|
| 422 |
+
array(array('app/console', 'foo:bar', '--', '--env=dev'), '--env', 'default', true, 'default'),
|
| 423 |
);
|
| 424 |
}
|
| 425 |
|
vendor/symfony/console/Tests/Input/ArrayInputTest.php
CHANGED
|
@@ -13,8 +13,8 @@ namespace Symfony\Component\Console\Tests\Input;
|
|
| 13 |
|
| 14 |
use PHPUnit\Framework\TestCase;
|
| 15 |
use Symfony\Component\Console\Input\ArrayInput;
|
| 16 |
-
use Symfony\Component\Console\Input\InputDefinition;
|
| 17 |
use Symfony\Component\Console\Input\InputArgument;
|
|
|
|
| 18 |
use Symfony\Component\Console\Input\InputOption;
|
| 19 |
|
| 20 |
class ArrayInputTest extends TestCase
|
|
@@ -47,14 +47,14 @@ class ArrayInputTest extends TestCase
|
|
| 47 |
{
|
| 48 |
$input = new ArrayInput(array('name' => 'Fabien', '--foo' => 'bar'));
|
| 49 |
$this->assertEquals('bar', $input->getParameterOption('--foo'), '->getParameterOption() returns the option of specified name');
|
| 50 |
-
$this->
|
| 51 |
|
| 52 |
$input = new ArrayInput(array('Fabien', '--foo' => 'bar'));
|
| 53 |
$this->assertEquals('bar', $input->getParameterOption('--foo'), '->getParameterOption() returns the option of specified name');
|
| 54 |
|
| 55 |
$input = new ArrayInput(array('--foo', '--', '--bar' => 'woop'));
|
| 56 |
$this->assertEquals('woop', $input->getParameterOption('--bar'), '->getParameterOption() returns the correct value if an option is present in the passed parameters');
|
| 57 |
-
$this->
|
| 58 |
}
|
| 59 |
|
| 60 |
public function testParseArguments()
|
|
@@ -170,5 +170,8 @@ class ArrayInputTest extends TestCase
|
|
| 170 |
|
| 171 |
$input = new ArrayInput(array('-b' => array('bval_1', 'bval_2'), '--f' => array('fval_1', 'fval_2')));
|
| 172 |
$this->assertSame('-b=bval_1 -b=bval_2 --f=fval_1 --f=fval_2', (string) $input);
|
|
|
|
|
|
|
|
|
|
| 173 |
}
|
| 174 |
}
|
| 13 |
|
| 14 |
use PHPUnit\Framework\TestCase;
|
| 15 |
use Symfony\Component\Console\Input\ArrayInput;
|
|
|
|
| 16 |
use Symfony\Component\Console\Input\InputArgument;
|
| 17 |
+
use Symfony\Component\Console\Input\InputDefinition;
|
| 18 |
use Symfony\Component\Console\Input\InputOption;
|
| 19 |
|
| 20 |
class ArrayInputTest extends TestCase
|
| 47 |
{
|
| 48 |
$input = new ArrayInput(array('name' => 'Fabien', '--foo' => 'bar'));
|
| 49 |
$this->assertEquals('bar', $input->getParameterOption('--foo'), '->getParameterOption() returns the option of specified name');
|
| 50 |
+
$this->assertEquals('default', $input->getParameterOption('--bar', 'default'), '->getParameterOption() returns the default value if an option is not present in the passed parameters');
|
| 51 |
|
| 52 |
$input = new ArrayInput(array('Fabien', '--foo' => 'bar'));
|
| 53 |
$this->assertEquals('bar', $input->getParameterOption('--foo'), '->getParameterOption() returns the option of specified name');
|
| 54 |
|
| 55 |
$input = new ArrayInput(array('--foo', '--', '--bar' => 'woop'));
|
| 56 |
$this->assertEquals('woop', $input->getParameterOption('--bar'), '->getParameterOption() returns the correct value if an option is present in the passed parameters');
|
| 57 |
+
$this->assertEquals('default', $input->getParameterOption('--bar', 'default', true), '->getParameterOption() returns the default value if an option is present in the passed parameters after an end of options signal');
|
| 58 |
}
|
| 59 |
|
| 60 |
public function testParseArguments()
|
| 170 |
|
| 171 |
$input = new ArrayInput(array('-b' => array('bval_1', 'bval_2'), '--f' => array('fval_1', 'fval_2')));
|
| 172 |
$this->assertSame('-b=bval_1 -b=bval_2 --f=fval_1 --f=fval_2', (string) $input);
|
| 173 |
+
|
| 174 |
+
$input = new ArrayInput(array('array_arg' => array('val_1', 'val_2')));
|
| 175 |
+
$this->assertSame('val_1 val_2', (string) $input);
|
| 176 |
}
|
| 177 |
}
|
vendor/symfony/console/Tests/Input/InputDefinitionTest.php
CHANGED
|
@@ -12,8 +12,8 @@
|
|
| 12 |
namespace Symfony\Component\Console\Tests\Input;
|
| 13 |
|
| 14 |
use PHPUnit\Framework\TestCase;
|
| 15 |
-
use Symfony\Component\Console\Input\InputDefinition;
|
| 16 |
use Symfony\Component\Console\Input\InputArgument;
|
|
|
|
| 17 |
use Symfony\Component\Console\Input\InputOption;
|
| 18 |
|
| 19 |
class InputDefinitionTest extends TestCase
|
| 12 |
namespace Symfony\Component\Console\Tests\Input;
|
| 13 |
|
| 14 |
use PHPUnit\Framework\TestCase;
|
|
|
|
| 15 |
use Symfony\Component\Console\Input\InputArgument;
|
| 16 |
+
use Symfony\Component\Console\Input\InputDefinition;
|
| 17 |
use Symfony\Component\Console\Input\InputOption;
|
| 18 |
|
| 19 |
class InputDefinitionTest extends TestCase
|
vendor/symfony/console/Tests/Input/InputTest.php
CHANGED
|
@@ -13,8 +13,8 @@ namespace Symfony\Component\Console\Tests\Input;
|
|
| 13 |
|
| 14 |
use PHPUnit\Framework\TestCase;
|
| 15 |
use Symfony\Component\Console\Input\ArrayInput;
|
| 16 |
-
use Symfony\Component\Console\Input\InputDefinition;
|
| 17 |
use Symfony\Component\Console\Input\InputArgument;
|
|
|
|
| 18 |
use Symfony\Component\Console\Input\InputOption;
|
| 19 |
|
| 20 |
class InputTest extends TestCase
|
| 13 |
|
| 14 |
use PHPUnit\Framework\TestCase;
|
| 15 |
use Symfony\Component\Console\Input\ArrayInput;
|
|
|
|
| 16 |
use Symfony\Component\Console\Input\InputArgument;
|
| 17 |
+
use Symfony\Component\Console\Input\InputDefinition;
|
| 18 |
use Symfony\Component\Console\Input\InputOption;
|
| 19 |
|
| 20 |
class InputTest extends TestCase
|
vendor/symfony/console/Tests/Logger/ConsoleLoggerTest.php
CHANGED
|
@@ -16,8 +16,8 @@ use Psr\Log\LoggerInterface;
|
|
| 16 |
use Psr\Log\LogLevel;
|
| 17 |
use Symfony\Component\Console\Logger\ConsoleLogger;
|
| 18 |
use Symfony\Component\Console\Output\BufferedOutput;
|
| 19 |
-
use Symfony\Component\Console\Tests\Fixtures\DummyOutput;
|
| 20 |
use Symfony\Component\Console\Output\OutputInterface;
|
|
|
|
| 21 |
|
| 22 |
/**
|
| 23 |
* Console logger test.
|
|
@@ -166,9 +166,7 @@ class ConsoleLoggerTest extends TestCase
|
|
| 166 |
} else {
|
| 167 |
$dummy = $this->getMock('Symfony\Component\Console\Tests\Logger\DummyTest', array('__toString'));
|
| 168 |
}
|
| 169 |
-
$dummy->
|
| 170 |
-
->method('__toString')
|
| 171 |
-
->will($this->returnValue('DUMMY'));
|
| 172 |
|
| 173 |
$this->getLogger()->warning($dummy);
|
| 174 |
|
| 16 |
use Psr\Log\LogLevel;
|
| 17 |
use Symfony\Component\Console\Logger\ConsoleLogger;
|
| 18 |
use Symfony\Component\Console\Output\BufferedOutput;
|
|
|
|
| 19 |
use Symfony\Component\Console\Output\OutputInterface;
|
| 20 |
+
use Symfony\Component\Console\Tests\Fixtures\DummyOutput;
|
| 21 |
|
| 22 |
/**
|
| 23 |
* Console logger test.
|
| 166 |
} else {
|
| 167 |
$dummy = $this->getMock('Symfony\Component\Console\Tests\Logger\DummyTest', array('__toString'));
|
| 168 |
}
|
| 169 |
+
$dummy->method('__toString')->will($this->returnValue('DUMMY'));
|
|
|
|
|
|
|
| 170 |
|
| 171 |
$this->getLogger()->warning($dummy);
|
| 172 |
|
vendor/symfony/console/Tests/Output/OutputTest.php
CHANGED
|
@@ -12,8 +12,8 @@
|
|
| 12 |
namespace Symfony\Component\Console\Tests\Output;
|
| 13 |
|
| 14 |
use PHPUnit\Framework\TestCase;
|
| 15 |
-
use Symfony\Component\Console\Output\Output;
|
| 16 |
use Symfony\Component\Console\Formatter\OutputFormatterStyle;
|
|
|
|
| 17 |
|
| 18 |
class OutputTest extends TestCase
|
| 19 |
{
|
| 12 |
namespace Symfony\Component\Console\Tests\Output;
|
| 13 |
|
| 14 |
use PHPUnit\Framework\TestCase;
|
|
|
|
| 15 |
use Symfony\Component\Console\Formatter\OutputFormatterStyle;
|
| 16 |
+
use Symfony\Component\Console\Output\Output;
|
| 17 |
|
| 18 |
class OutputTest extends TestCase
|
| 19 |
{
|
vendor/symfony/console/Tests/Style/SymfonyStyleTest.php
CHANGED
|
@@ -13,12 +13,12 @@ namespace Symfony\Component\Console\Tests\Style;
|
|
| 13 |
|
| 14 |
use PHPUnit\Framework\TestCase;
|
| 15 |
use Symfony\Component\Console\Command\Command;
|
| 16 |
-
use Symfony\Component\Console\Tester\CommandTester;
|
| 17 |
use Symfony\Component\Console\Formatter\OutputFormatter;
|
| 18 |
-
use Symfony\Component\Console\Output\OutputInterface;
|
| 19 |
-
use Symfony\Component\Console\Output\ConsoleOutputInterface;
|
| 20 |
use Symfony\Component\Console\Input\InputInterface;
|
|
|
|
|
|
|
| 21 |
use Symfony\Component\Console\Style\SymfonyStyle;
|
|
|
|
| 22 |
|
| 23 |
class SymfonyStyleTest extends TestCase
|
| 24 |
{
|
| 13 |
|
| 14 |
use PHPUnit\Framework\TestCase;
|
| 15 |
use Symfony\Component\Console\Command\Command;
|
|
|
|
| 16 |
use Symfony\Component\Console\Formatter\OutputFormatter;
|
|
|
|
|
|
|
| 17 |
use Symfony\Component\Console\Input\InputInterface;
|
| 18 |
+
use Symfony\Component\Console\Output\ConsoleOutputInterface;
|
| 19 |
+
use Symfony\Component\Console\Output\OutputInterface;
|
| 20 |
use Symfony\Component\Console\Style\SymfonyStyle;
|
| 21 |
+
use Symfony\Component\Console\Tester\CommandTester;
|
| 22 |
|
| 23 |
class SymfonyStyleTest extends TestCase
|
| 24 |
{
|
vendor/symfony/console/Tests/Tester/CommandTesterTest.php
CHANGED
|
@@ -14,12 +14,12 @@ namespace Symfony\Component\Console\Tests\Tester;
|
|
| 14 |
use PHPUnit\Framework\TestCase;
|
| 15 |
use Symfony\Component\Console\Application;
|
| 16 |
use Symfony\Component\Console\Command\Command;
|
| 17 |
-
use Symfony\Component\Console\Output\Output;
|
| 18 |
-
use Symfony\Component\Console\Tester\CommandTester;
|
| 19 |
-
use Symfony\Component\Console\Question\Question;
|
| 20 |
use Symfony\Component\Console\Helper\HelperSet;
|
| 21 |
use Symfony\Component\Console\Helper\QuestionHelper;
|
|
|
|
|
|
|
| 22 |
use Symfony\Component\Console\Style\SymfonyStyle;
|
|
|
|
| 23 |
|
| 24 |
class CommandTesterTest extends TestCase
|
| 25 |
{
|
| 14 |
use PHPUnit\Framework\TestCase;
|
| 15 |
use Symfony\Component\Console\Application;
|
| 16 |
use Symfony\Component\Console\Command\Command;
|
|
|
|
|
|
|
|
|
|
| 17 |
use Symfony\Component\Console\Helper\HelperSet;
|
| 18 |
use Symfony\Component\Console\Helper\QuestionHelper;
|
| 19 |
+
use Symfony\Component\Console\Output\Output;
|
| 20 |
+
use Symfony\Component\Console\Question\Question;
|
| 21 |
use Symfony\Component\Console\Style\SymfonyStyle;
|
| 22 |
+
use Symfony\Component\Console\Tester\CommandTester;
|
| 23 |
|
| 24 |
class CommandTesterTest extends TestCase
|
| 25 |
{
|
vendor/symfony/console/composer.json
CHANGED
|
@@ -18,24 +18,25 @@
|
|
| 18 |
"require": {
|
| 19 |
"php": "^5.5.9|>=7.0.8",
|
| 20 |
"symfony/polyfill-mbstring": "~1.0",
|
| 21 |
-
"symfony/debug": "~2.8|~3.0"
|
| 22 |
},
|
| 23 |
"require-dev": {
|
| 24 |
-
"symfony/config": "~3.3",
|
| 25 |
-
"symfony/event-dispatcher": "~2.8|~3.0",
|
| 26 |
-
"symfony/dependency-injection": "~3.
|
| 27 |
-
"symfony/
|
| 28 |
-
"symfony/process": "~
|
| 29 |
"psr/log": "~1.0"
|
| 30 |
},
|
| 31 |
"suggest": {
|
| 32 |
"symfony/event-dispatcher": "",
|
| 33 |
-
"symfony/
|
| 34 |
"symfony/process": "",
|
| 35 |
-
"psr/log": "For using the console logger"
|
| 36 |
},
|
| 37 |
"conflict": {
|
| 38 |
-
"symfony/dependency-injection": "<3.
|
|
|
|
| 39 |
},
|
| 40 |
"autoload": {
|
| 41 |
"psr-4": { "Symfony\\Component\\Console\\": "" },
|
|
@@ -46,7 +47,7 @@
|
|
| 46 |
"minimum-stability": "dev",
|
| 47 |
"extra": {
|
| 48 |
"branch-alias": {
|
| 49 |
-
"dev-master": "3.
|
| 50 |
}
|
| 51 |
}
|
| 52 |
}
|
| 18 |
"require": {
|
| 19 |
"php": "^5.5.9|>=7.0.8",
|
| 20 |
"symfony/polyfill-mbstring": "~1.0",
|
| 21 |
+
"symfony/debug": "~2.8|~3.0|~4.0"
|
| 22 |
},
|
| 23 |
"require-dev": {
|
| 24 |
+
"symfony/config": "~3.3|~4.0",
|
| 25 |
+
"symfony/event-dispatcher": "~2.8|~3.0|~4.0",
|
| 26 |
+
"symfony/dependency-injection": "~3.4|~4.0",
|
| 27 |
+
"symfony/lock": "~3.4|~4.0",
|
| 28 |
+
"symfony/process": "~3.3|~4.0",
|
| 29 |
"psr/log": "~1.0"
|
| 30 |
},
|
| 31 |
"suggest": {
|
| 32 |
"symfony/event-dispatcher": "",
|
| 33 |
+
"symfony/lock": "",
|
| 34 |
"symfony/process": "",
|
| 35 |
+
"psr/log-implementation": "For using the console logger"
|
| 36 |
},
|
| 37 |
"conflict": {
|
| 38 |
+
"symfony/dependency-injection": "<3.4",
|
| 39 |
+
"symfony/process": "<3.3"
|
| 40 |
},
|
| 41 |
"autoload": {
|
| 42 |
"psr-4": { "Symfony\\Component\\Console\\": "" },
|
| 47 |
"minimum-stability": "dev",
|
| 48 |
"extra": {
|
| 49 |
"branch-alias": {
|
| 50 |
+
"dev-master": "3.4-dev"
|
| 51 |
}
|
| 52 |
}
|
| 53 |
}
|
vendor/symfony/debug/DebugClassLoader.php
CHANGED
|
@@ -129,8 +129,6 @@ class DebugClassLoader
|
|
| 129 |
*
|
| 130 |
* @param string $class The name of the class
|
| 131 |
*
|
| 132 |
-
* @return bool|null True, if loaded
|
| 133 |
-
*
|
| 134 |
* @throws \RuntimeException
|
| 135 |
*/
|
| 136 |
public function loadClass($class)
|
|
@@ -184,200 +182,227 @@ class DebugClassLoader
|
|
| 184 |
throw new \RuntimeException(sprintf('Case mismatch between loaded and declared class names: "%s" vs "%s".', $class, $name));
|
| 185 |
}
|
| 186 |
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
$
|
| 191 |
-
} else {
|
| 192 |
-
$ns = \substr($name, 0, $len);
|
| 193 |
}
|
| 194 |
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
foreach (array('final', 'deprecated', 'internal') as $annotation) {
|
| 198 |
-
if (false !== \strpos($doc, $annotation) && preg_match('#\n \* @'.$annotation.'(?:( .+?)\.?)?\r?\n \*(?: @|/$)#s', $doc, $notice)) {
|
| 199 |
-
self::${$annotation}[$name] = isset($notice[1]) ? preg_replace('#\s*\r?\n \* +#', ' ', $notice[1]) : '';
|
| 200 |
-
}
|
| 201 |
-
}
|
| 202 |
}
|
|
|
|
| 203 |
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
|
| 207 |
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 211 |
|
| 212 |
-
|
| 213 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 214 |
}
|
| 215 |
}
|
|
|
|
| 216 |
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
|
| 220 |
-
|
| 221 |
-
}
|
| 222 |
-
if (isset(self::$deprecated[$use]) && \strncmp($ns, $use, $len)) {
|
| 223 |
-
$type = class_exists($name, false) ? 'class' : (interface_exists($name, false) ? 'interface' : 'trait');
|
| 224 |
-
$verb = class_exists($use, false) || interface_exists($name, false) ? 'extends' : (interface_exists($use, false) ? 'implements' : 'uses');
|
| 225 |
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
if (isset(self::$internal[$use]) && \strncmp($ns, $use, $len)) {
|
| 229 |
-
@trigger_error(sprintf('The "%s" %s is considered internal%s. It may change without further notice. You should not use it from "%s".', $use, class_exists($use, false) ? 'class' : (interface_exists($use, false) ? 'interface' : 'trait'), self::$internal[$use], $name), E_USER_DEPRECATED);
|
| 230 |
-
}
|
| 231 |
}
|
| 232 |
|
| 233 |
-
|
| 234 |
-
|
| 235 |
-
self::$internalMethods[$name] = array();
|
| 236 |
-
foreach ($parentAndTraits as $use) {
|
| 237 |
-
foreach (array('finalMethods', 'internalMethods') as $property) {
|
| 238 |
-
if (isset(self::${$property}[$use])) {
|
| 239 |
-
self::${$property}[$name] = self::${$property}[$name] ? self::${$property}[$use] + self::${$property}[$name] : self::${$property}[$use];
|
| 240 |
-
}
|
| 241 |
-
}
|
| 242 |
}
|
|
|
|
| 243 |
|
| 244 |
-
|
| 245 |
-
|
| 246 |
-
|
| 247 |
-
|
| 248 |
-
|
|
|
|
|
|
|
|
|
|
| 249 |
|
| 250 |
-
|
| 251 |
-
|
| 252 |
-
|
| 253 |
-
|
|
|
|
|
|
|
| 254 |
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
|
| 258 |
-
}
|
| 259 |
|
| 260 |
-
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
|
| 264 |
-
|
| 265 |
-
|
| 266 |
-
}
|
| 267 |
}
|
|
|
|
|
|
|
| 268 |
|
| 269 |
-
|
| 270 |
-
|
| 271 |
-
|
| 272 |
-
|
| 273 |
|
| 274 |
-
|
| 275 |
-
|
| 276 |
-
|
| 277 |
-
|
| 278 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 279 |
}
|
| 280 |
}
|
| 281 |
|
| 282 |
-
|
| 283 |
-
|
|
|
|
| 284 |
}
|
| 285 |
-
}
|
| 286 |
|
| 287 |
-
|
| 288 |
-
|
| 289 |
-
|
| 290 |
-
|
| 291 |
}
|
| 292 |
-
|
| 293 |
-
throw new \RuntimeException(sprintf('The autoloader expected class "%s" to be defined in file "%s". The file was found but the class was not in it, the class name or namespace probably has a typo.', $class, $file));
|
| 294 |
}
|
| 295 |
-
|
| 296 |
-
$real = explode('\\', $class.strrchr($file, '.'));
|
| 297 |
-
$tail = explode(\DIRECTORY_SEPARATOR, str_replace('/', \DIRECTORY_SEPARATOR, $file));
|
| 298 |
|
| 299 |
-
|
| 300 |
-
|
| 301 |
|
| 302 |
-
|
| 303 |
-
|
| 304 |
-
|
| 305 |
-
|
| 306 |
|
| 307 |
-
|
| 308 |
-
|
| 309 |
-
if (self::$caseCheck && $tail) {
|
| 310 |
-
$tail = \DIRECTORY_SEPARATOR.implode(\DIRECTORY_SEPARATOR, $tail);
|
| 311 |
-
$tailLen = \strlen($tail);
|
| 312 |
-
$real = $refl->getFileName();
|
| 313 |
-
|
| 314 |
-
if (2 === self::$caseCheck) {
|
| 315 |
-
// realpath() on MacOSX doesn't normalize the case of characters
|
| 316 |
-
|
| 317 |
-
$i = 1 + strrpos($real, '/');
|
| 318 |
-
$file = substr($real, $i);
|
| 319 |
-
$real = substr($real, 0, $i);
|
| 320 |
-
|
| 321 |
-
if (isset(self::$darwinCache[$real])) {
|
| 322 |
-
$kDir = $real;
|
| 323 |
-
} else {
|
| 324 |
-
$kDir = strtolower($real);
|
| 325 |
-
|
| 326 |
-
if (isset(self::$darwinCache[$kDir])) {
|
| 327 |
-
$real = self::$darwinCache[$kDir][0];
|
| 328 |
-
} else {
|
| 329 |
-
$dir = getcwd();
|
| 330 |
-
chdir($real);
|
| 331 |
-
$real = getcwd().'/';
|
| 332 |
-
chdir($dir);
|
| 333 |
-
|
| 334 |
-
$dir = $real;
|
| 335 |
-
$k = $kDir;
|
| 336 |
-
$i = \strlen($dir) - 1;
|
| 337 |
-
while (!isset(self::$darwinCache[$k])) {
|
| 338 |
-
self::$darwinCache[$k] = array($dir, array());
|
| 339 |
-
self::$darwinCache[$dir] = &self::$darwinCache[$k];
|
| 340 |
-
|
| 341 |
-
while ('/' !== $dir[--$i]) {
|
| 342 |
-
}
|
| 343 |
-
$k = substr($k, 0, ++$i);
|
| 344 |
-
$dir = substr($dir, 0, $i--);
|
| 345 |
-
}
|
| 346 |
-
}
|
| 347 |
-
}
|
| 348 |
|
| 349 |
-
|
| 350 |
-
|
| 351 |
-
|
| 352 |
-
|
| 353 |
-
|
| 354 |
-
|
| 355 |
-
|
| 356 |
-
if (!isset($dirFiles[$kFile])) {
|
| 357 |
-
foreach (scandir($real, 2) as $f) {
|
| 358 |
-
if ('.' !== $f[0]) {
|
| 359 |
-
$dirFiles[$f] = $f;
|
| 360 |
-
if ($f === $file) {
|
| 361 |
-
$kFile = $k = $file;
|
| 362 |
-
} elseif ($f !== $k = strtolower($f)) {
|
| 363 |
-
$dirFiles[$k] = $f;
|
| 364 |
-
}
|
| 365 |
-
}
|
| 366 |
-
}
|
| 367 |
-
self::$darwinCache[$kDir][1] = $dirFiles;
|
| 368 |
-
}
|
| 369 |
-
}
|
| 370 |
|
| 371 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 372 |
}
|
|
|
|
|
|
|
| 373 |
|
| 374 |
-
|
| 375 |
-
|
| 376 |
-
|
| 377 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 378 |
}
|
| 379 |
}
|
|
|
|
| 380 |
}
|
|
|
|
|
|
|
| 381 |
}
|
| 382 |
|
| 383 |
/**
|
| 129 |
*
|
| 130 |
* @param string $class The name of the class
|
| 131 |
*
|
|
|
|
|
|
|
| 132 |
* @throws \RuntimeException
|
| 133 |
*/
|
| 134 |
public function loadClass($class)
|
| 182 |
throw new \RuntimeException(sprintf('Case mismatch between loaded and declared class names: "%s" vs "%s".', $class, $name));
|
| 183 |
}
|
| 184 |
|
| 185 |
+
$deprecations = $this->checkAnnotations($refl, $name);
|
| 186 |
+
|
| 187 |
+
if (isset(self::$php7Reserved[\strtolower($refl->getShortName())])) {
|
| 188 |
+
$deprecations[] = sprintf('The "%s" class uses the reserved name "%s", it will break on PHP 7 and higher', $name, $refl->getShortName());
|
|
|
|
|
|
|
| 189 |
}
|
| 190 |
|
| 191 |
+
foreach ($deprecations as $message) {
|
| 192 |
+
@trigger_error($message, E_USER_DEPRECATED);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 193 |
}
|
| 194 |
+
}
|
| 195 |
|
| 196 |
+
if (!$file) {
|
| 197 |
+
return;
|
| 198 |
+
}
|
| 199 |
|
| 200 |
+
if (!$exists) {
|
| 201 |
+
if (false !== strpos($class, '/')) {
|
| 202 |
+
throw new \RuntimeException(sprintf('Trying to autoload a class with an invalid name "%s". Be careful that the namespace separator is "\" in PHP, not "/".', $class));
|
| 203 |
+
}
|
| 204 |
+
|
| 205 |
+
throw new \RuntimeException(sprintf('The autoloader expected class "%s" to be defined in file "%s". The file was found but the class was not in it, the class name or namespace probably has a typo.', $class, $file));
|
| 206 |
+
}
|
| 207 |
+
|
| 208 |
+
if (self::$caseCheck && $message = $this->checkCase($refl, $file, $class)) {
|
| 209 |
+
throw new \RuntimeException(sprintf('Case mismatch between class and real file names: "%s" vs "%s" in "%s".', $message[0], $message[1], $message[2]));
|
| 210 |
+
}
|
| 211 |
+
}
|
| 212 |
|
| 213 |
+
public function checkAnnotations(\ReflectionClass $refl, $class)
|
| 214 |
+
{
|
| 215 |
+
$deprecations = array();
|
| 216 |
+
|
| 217 |
+
// Don't trigger deprecations for classes in the same vendor
|
| 218 |
+
if (2 > $len = 1 + (\strpos($class, '\\') ?: \strpos($class, '_'))) {
|
| 219 |
+
$len = 0;
|
| 220 |
+
$ns = '';
|
| 221 |
+
} else {
|
| 222 |
+
$ns = \substr($class, 0, $len);
|
| 223 |
+
}
|
| 224 |
+
|
| 225 |
+
// Detect annotations on the class
|
| 226 |
+
if (false !== $doc = $refl->getDocComment()) {
|
| 227 |
+
foreach (array('final', 'deprecated', 'internal') as $annotation) {
|
| 228 |
+
if (false !== \strpos($doc, $annotation) && preg_match('#\n \* @'.$annotation.'(?:( .+?)\.?)?\r?\n \*(?: @|/$)#s', $doc, $notice)) {
|
| 229 |
+
self::${$annotation}[$class] = isset($notice[1]) ? preg_replace('#\s*\r?\n \* +#', ' ', $notice[1]) : '';
|
| 230 |
}
|
| 231 |
}
|
| 232 |
+
}
|
| 233 |
|
| 234 |
+
$parent = \get_parent_class($class);
|
| 235 |
+
$parentAndOwnInterfaces = $this->getOwnInterfaces($class, $parent);
|
| 236 |
+
if ($parent) {
|
| 237 |
+
$parentAndOwnInterfaces[$parent] = $parent;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 238 |
|
| 239 |
+
if (!isset(self::$checkedClasses[$parent])) {
|
| 240 |
+
$this->checkClass($parent);
|
|
|
|
|
|
|
|
|
|
| 241 |
}
|
| 242 |
|
| 243 |
+
if (isset(self::$final[$parent])) {
|
| 244 |
+
$deprecations[] = sprintf('The "%s" class is considered final%s. It may change without further notice as of its next major version. You should not extend it from "%s".', $parent, self::$final[$parent], $class);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 245 |
}
|
| 246 |
+
}
|
| 247 |
|
| 248 |
+
// Detect if the parent is annotated
|
| 249 |
+
foreach ($parentAndOwnInterfaces + \class_uses($class, false) as $use) {
|
| 250 |
+
if (!isset(self::$checkedClasses[$use])) {
|
| 251 |
+
$this->checkClass($use);
|
| 252 |
+
}
|
| 253 |
+
if (isset(self::$deprecated[$use]) && \strncmp($ns, $use, $len)) {
|
| 254 |
+
$type = class_exists($class, false) ? 'class' : (interface_exists($class, false) ? 'interface' : 'trait');
|
| 255 |
+
$verb = class_exists($use, false) || interface_exists($class, false) ? 'extends' : (interface_exists($use, false) ? 'implements' : 'uses');
|
| 256 |
|
| 257 |
+
$deprecations[] = sprintf('The "%s" %s %s "%s" that is deprecated%s.', $class, $type, $verb, $use, self::$deprecated[$use]);
|
| 258 |
+
}
|
| 259 |
+
if (isset(self::$internal[$use]) && \strncmp($ns, $use, $len)) {
|
| 260 |
+
$deprecations[] = sprintf('The "%s" %s is considered internal%s. It may change without further notice. You should not use it from "%s".', $use, class_exists($use, false) ? 'class' : (interface_exists($use, false) ? 'interface' : 'trait'), self::$internal[$use], $class);
|
| 261 |
+
}
|
| 262 |
+
}
|
| 263 |
|
| 264 |
+
if (\trait_exists($class)) {
|
| 265 |
+
return $deprecations;
|
| 266 |
+
}
|
|
|
|
| 267 |
|
| 268 |
+
// Inherit @final and @internal annotations for methods
|
| 269 |
+
self::$finalMethods[$class] = array();
|
| 270 |
+
self::$internalMethods[$class] = array();
|
| 271 |
+
foreach ($parentAndOwnInterfaces as $use) {
|
| 272 |
+
foreach (array('finalMethods', 'internalMethods') as $property) {
|
| 273 |
+
if (isset(self::${$property}[$use])) {
|
| 274 |
+
self::${$property}[$class] = self::${$property}[$class] ? self::${$property}[$use] + self::${$property}[$class] : self::${$property}[$use];
|
| 275 |
}
|
| 276 |
+
}
|
| 277 |
+
}
|
| 278 |
|
| 279 |
+
foreach ($refl->getMethods(\ReflectionMethod::IS_PUBLIC | \ReflectionMethod::IS_PROTECTED) as $method) {
|
| 280 |
+
if ($method->class !== $class) {
|
| 281 |
+
continue;
|
| 282 |
+
}
|
| 283 |
|
| 284 |
+
if ($parent && isset(self::$finalMethods[$parent][$method->name])) {
|
| 285 |
+
list($declaringClass, $message) = self::$finalMethods[$parent][$method->name];
|
| 286 |
+
$deprecations[] = sprintf('The "%s::%s()" method is considered final%s. It may change without further notice as of its next major version. You should not extend it from "%s".', $declaringClass, $method->name, $message, $class);
|
| 287 |
+
}
|
| 288 |
+
|
| 289 |
+
if (isset(self::$internalMethods[$class][$method->name])) {
|
| 290 |
+
list($declaringClass, $message) = self::$internalMethods[$class][$method->name];
|
| 291 |
+
if (\strncmp($ns, $declaringClass, $len)) {
|
| 292 |
+
$deprecations[] = sprintf('The "%s::%s()" method is considered internal%s. It may change without further notice. You should not extend it from "%s".', $declaringClass, $method->name, $message, $class);
|
| 293 |
}
|
| 294 |
}
|
| 295 |
|
| 296 |
+
// Detect method annotations
|
| 297 |
+
if (false === $doc = $method->getDocComment()) {
|
| 298 |
+
continue;
|
| 299 |
}
|
|
|
|
| 300 |
|
| 301 |
+
foreach (array('final', 'internal') as $annotation) {
|
| 302 |
+
if (false !== \strpos($doc, $annotation) && preg_match('#\n\s+\* @'.$annotation.'(?:( .+?)\.?)?\r?\n\s+\*(?: @|/$)#s', $doc, $notice)) {
|
| 303 |
+
$message = isset($notice[1]) ? preg_replace('#\s*\r?\n \* +#', ' ', $notice[1]) : '';
|
| 304 |
+
self::${$annotation.'Methods'}[$class][$method->name] = array($class, $message);
|
| 305 |
}
|
|
|
|
|
|
|
| 306 |
}
|
| 307 |
+
}
|
|
|
|
|
|
|
| 308 |
|
| 309 |
+
return $deprecations;
|
| 310 |
+
}
|
| 311 |
|
| 312 |
+
public function checkCase(\ReflectionClass $refl, $file, $class)
|
| 313 |
+
{
|
| 314 |
+
$real = explode('\\', $class.strrchr($file, '.'));
|
| 315 |
+
$tail = explode(\DIRECTORY_SEPARATOR, str_replace('/', \DIRECTORY_SEPARATOR, $file));
|
| 316 |
|
| 317 |
+
$i = \count($tail) - 1;
|
| 318 |
+
$j = \count($real) - 1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 319 |
|
| 320 |
+
while (isset($tail[$i], $real[$j]) && $tail[$i] === $real[$j]) {
|
| 321 |
+
--$i;
|
| 322 |
+
--$j;
|
| 323 |
+
}
|
| 324 |
+
|
| 325 |
+
array_splice($tail, 0, $i + 1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 326 |
|
| 327 |
+
if (!$tail) {
|
| 328 |
+
return;
|
| 329 |
+
}
|
| 330 |
+
|
| 331 |
+
$tail = \DIRECTORY_SEPARATOR.implode(\DIRECTORY_SEPARATOR, $tail);
|
| 332 |
+
$tailLen = \strlen($tail);
|
| 333 |
+
$real = $refl->getFileName();
|
| 334 |
+
|
| 335 |
+
if (2 === self::$caseCheck) {
|
| 336 |
+
$real = $this->darwinRealpath($real);
|
| 337 |
+
}
|
| 338 |
+
|
| 339 |
+
if (0 === substr_compare($real, $tail, -$tailLen, $tailLen, true)
|
| 340 |
+
&& 0 !== substr_compare($real, $tail, -$tailLen, $tailLen, false)
|
| 341 |
+
) {
|
| 342 |
+
return array(substr($tail, -$tailLen + 1), substr($real, -$tailLen + 1), substr($real, 0, -$tailLen + 1));
|
| 343 |
+
}
|
| 344 |
+
}
|
| 345 |
+
|
| 346 |
+
/**
|
| 347 |
+
* `realpath` on MacOSX doesn't normalize the case of characters.
|
| 348 |
+
*/
|
| 349 |
+
private function darwinRealpath($real)
|
| 350 |
+
{
|
| 351 |
+
$i = 1 + strrpos($real, '/');
|
| 352 |
+
$file = substr($real, $i);
|
| 353 |
+
$real = substr($real, 0, $i);
|
| 354 |
+
|
| 355 |
+
if (isset(self::$darwinCache[$real])) {
|
| 356 |
+
$kDir = $real;
|
| 357 |
+
} else {
|
| 358 |
+
$kDir = strtolower($real);
|
| 359 |
+
|
| 360 |
+
if (isset(self::$darwinCache[$kDir])) {
|
| 361 |
+
$real = self::$darwinCache[$kDir][0];
|
| 362 |
+
} else {
|
| 363 |
+
$dir = getcwd();
|
| 364 |
+
chdir($real);
|
| 365 |
+
$real = getcwd().'/';
|
| 366 |
+
chdir($dir);
|
| 367 |
+
|
| 368 |
+
$dir = $real;
|
| 369 |
+
$k = $kDir;
|
| 370 |
+
$i = \strlen($dir) - 1;
|
| 371 |
+
while (!isset(self::$darwinCache[$k])) {
|
| 372 |
+
self::$darwinCache[$k] = array($dir, array());
|
| 373 |
+
self::$darwinCache[$dir] = &self::$darwinCache[$k];
|
| 374 |
+
|
| 375 |
+
while ('/' !== $dir[--$i]) {
|
| 376 |
+
}
|
| 377 |
+
$k = substr($k, 0, ++$i);
|
| 378 |
+
$dir = substr($dir, 0, $i--);
|
| 379 |
}
|
| 380 |
+
}
|
| 381 |
+
}
|
| 382 |
|
| 383 |
+
$dirFiles = self::$darwinCache[$kDir][1];
|
| 384 |
+
|
| 385 |
+
if (isset($dirFiles[$file])) {
|
| 386 |
+
return $real .= $dirFiles[$file];
|
| 387 |
+
}
|
| 388 |
+
|
| 389 |
+
$kFile = strtolower($file);
|
| 390 |
+
|
| 391 |
+
if (!isset($dirFiles[$kFile])) {
|
| 392 |
+
foreach (scandir($real, 2) as $f) {
|
| 393 |
+
if ('.' !== $f[0]) {
|
| 394 |
+
$dirFiles[$f] = $f;
|
| 395 |
+
if ($f === $file) {
|
| 396 |
+
$kFile = $k = $file;
|
| 397 |
+
} elseif ($f !== $k = strtolower($f)) {
|
| 398 |
+
$dirFiles[$k] = $f;
|
| 399 |
+
}
|
| 400 |
}
|
| 401 |
}
|
| 402 |
+
self::$darwinCache[$kDir][1] = $dirFiles;
|
| 403 |
}
|
| 404 |
+
|
| 405 |
+
return $real .= $dirFiles[$kFile];
|
| 406 |
}
|
| 407 |
|
| 408 |
/**
|
vendor/symfony/debug/Tests/DebugClassLoaderTest.php
CHANGED
|
@@ -312,24 +312,21 @@ class DebugClassLoaderTest extends TestCase
|
|
| 312 |
|
| 313 |
public function testExtendedFinalMethod()
|
| 314 |
{
|
| 315 |
-
|
| 316 |
-
$
|
| 317 |
-
|
| 318 |
|
| 319 |
class_exists(__NAMESPACE__.'\\Fixtures\\ExtendedFinalMethod', true);
|
| 320 |
|
| 321 |
error_reporting($e);
|
| 322 |
restore_error_handler();
|
| 323 |
|
| 324 |
-
$lastError = error_get_last();
|
| 325 |
-
unset($lastError['file'], $lastError['line']);
|
| 326 |
-
|
| 327 |
$xError = array(
|
| 328 |
-
'
|
| 329 |
-
'
|
| 330 |
);
|
| 331 |
|
| 332 |
-
$this->assertSame($xError, $
|
| 333 |
}
|
| 334 |
|
| 335 |
public function testExtendedDeprecatedMethodDoesntTriggerAnyNotice()
|
|
@@ -361,12 +358,26 @@ class DebugClassLoaderTest extends TestCase
|
|
| 361 |
restore_error_handler();
|
| 362 |
|
| 363 |
$this->assertSame($deprecations, array(
|
| 364 |
-
'The "Symfony\Component\Debug\Tests\Fixtures\InternalClass" class is considered internal since version 3.4. It may change without further notice. You should not use it from "Test\Symfony\Component\Debug\Tests\ExtendsInternalsParent".',
|
| 365 |
'The "Symfony\Component\Debug\Tests\Fixtures\InternalInterface" interface is considered internal. It may change without further notice. You should not use it from "Test\Symfony\Component\Debug\Tests\ExtendsInternalsParent".',
|
|
|
|
| 366 |
'The "Symfony\Component\Debug\Tests\Fixtures\InternalTrait" trait is considered internal. It may change without further notice. You should not use it from "Test\Symfony\Component\Debug\Tests\ExtendsInternals".',
|
| 367 |
-
'The "Symfony\Component\Debug\Tests\Fixtures\
|
| 368 |
));
|
| 369 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 370 |
}
|
| 371 |
|
| 372 |
class ClassLoader
|
|
@@ -420,6 +431,8 @@ class ClassLoader
|
|
| 420 |
}');
|
| 421 |
} elseif ('Test\\'.__NAMESPACE__.'\ExtendsInternalsParent' === $class) {
|
| 422 |
eval('namespace Test\\'.__NAMESPACE__.'; class ExtendsInternalsParent extends \\'.__NAMESPACE__.'\Fixtures\InternalClass implements \\'.__NAMESPACE__.'\Fixtures\InternalInterface { }');
|
|
|
|
|
|
|
| 423 |
}
|
| 424 |
}
|
| 425 |
}
|
| 312 |
|
| 313 |
public function testExtendedFinalMethod()
|
| 314 |
{
|
| 315 |
+
$deprecations = array();
|
| 316 |
+
set_error_handler(function ($type, $msg) use (&$deprecations) { $deprecations[] = $msg; });
|
| 317 |
+
$e = error_reporting(E_USER_DEPRECATED);
|
| 318 |
|
| 319 |
class_exists(__NAMESPACE__.'\\Fixtures\\ExtendedFinalMethod', true);
|
| 320 |
|
| 321 |
error_reporting($e);
|
| 322 |
restore_error_handler();
|
| 323 |
|
|
|
|
|
|
|
|
|
|
| 324 |
$xError = array(
|
| 325 |
+
'The "Symfony\Component\Debug\Tests\Fixtures\FinalMethod::finalMethod()" method is considered final since version 3.3. It may change without further notice as of its next major version. You should not extend it from "Symfony\Component\Debug\Tests\Fixtures\ExtendedFinalMethod".',
|
| 326 |
+
'The "Symfony\Component\Debug\Tests\Fixtures\FinalMethod::finalMethod2()" method is considered final. It may change without further notice as of its next major version. You should not extend it from "Symfony\Component\Debug\Tests\Fixtures\ExtendedFinalMethod".',
|
| 327 |
);
|
| 328 |
|
| 329 |
+
$this->assertSame($xError, $deprecations);
|
| 330 |
}
|
| 331 |
|
| 332 |
public function testExtendedDeprecatedMethodDoesntTriggerAnyNotice()
|
| 358 |
restore_error_handler();
|
| 359 |
|
| 360 |
$this->assertSame($deprecations, array(
|
|
|
|
| 361 |
'The "Symfony\Component\Debug\Tests\Fixtures\InternalInterface" interface is considered internal. It may change without further notice. You should not use it from "Test\Symfony\Component\Debug\Tests\ExtendsInternalsParent".',
|
| 362 |
+
'The "Symfony\Component\Debug\Tests\Fixtures\InternalClass" class is considered internal since version 3.4. It may change without further notice. You should not use it from "Test\Symfony\Component\Debug\Tests\ExtendsInternalsParent".',
|
| 363 |
'The "Symfony\Component\Debug\Tests\Fixtures\InternalTrait" trait is considered internal. It may change without further notice. You should not use it from "Test\Symfony\Component\Debug\Tests\ExtendsInternals".',
|
| 364 |
+
'The "Symfony\Component\Debug\Tests\Fixtures\InternalClass::internalMethod()" method is considered internal since version 3.4. It may change without further notice. You should not extend it from "Test\Symfony\Component\Debug\Tests\ExtendsInternals".',
|
| 365 |
));
|
| 366 |
}
|
| 367 |
+
|
| 368 |
+
public function testUseTraitWithInternalMethod()
|
| 369 |
+
{
|
| 370 |
+
$deprecations = array();
|
| 371 |
+
set_error_handler(function ($type, $msg) use (&$deprecations) { $deprecations[] = $msg; });
|
| 372 |
+
$e = error_reporting(E_USER_DEPRECATED);
|
| 373 |
+
|
| 374 |
+
class_exists('Test\\'.__NAMESPACE__.'\\UseTraitWithInternalMethod', true);
|
| 375 |
+
|
| 376 |
+
error_reporting($e);
|
| 377 |
+
restore_error_handler();
|
| 378 |
+
|
| 379 |
+
$this->assertSame(array(), $deprecations);
|
| 380 |
+
}
|
| 381 |
}
|
| 382 |
|
| 383 |
class ClassLoader
|
| 431 |
}');
|
| 432 |
} elseif ('Test\\'.__NAMESPACE__.'\ExtendsInternalsParent' === $class) {
|
| 433 |
eval('namespace Test\\'.__NAMESPACE__.'; class ExtendsInternalsParent extends \\'.__NAMESPACE__.'\Fixtures\InternalClass implements \\'.__NAMESPACE__.'\Fixtures\InternalInterface { }');
|
| 434 |
+
} elseif ('Test\\'.__NAMESPACE__.'\UseTraitWithInternalMethod' === $class) {
|
| 435 |
+
eval('namespace Test\\'.__NAMESPACE__.'; class UseTraitWithInternalMethod { use \\'.__NAMESPACE__.'\Fixtures\TraitWithInternalMethod; }');
|
| 436 |
}
|
| 437 |
}
|
| 438 |
}
|
vendor/symfony/debug/Tests/FatalErrorHandler/UndefinedMethodFatalErrorHandlerTest.php
CHANGED
|
@@ -64,10 +64,10 @@ class UndefinedMethodFatalErrorHandlerTest extends TestCase
|
|
| 64 |
),
|
| 65 |
array(
|
| 66 |
array(
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
),
|
| 72 |
'Attempted to call an undefined method named "test" of class "class@anonymous".',
|
| 73 |
),
|
| 64 |
),
|
| 65 |
array(
|
| 66 |
array(
|
| 67 |
+
'type' => 1,
|
| 68 |
+
'message' => 'Call to undefined method class@anonymous::test()',
|
| 69 |
+
'file' => '/home/possum/work/symfony/test.php',
|
| 70 |
+
'line' => 11,
|
| 71 |
),
|
| 72 |
'Attempted to call an undefined method named "test" of class "class@anonymous".',
|
| 73 |
),
|
vendor/symfony/debug/Tests/Fixtures/ExtendedFinalMethod.php
CHANGED
|
@@ -4,6 +4,8 @@ namespace Symfony\Component\Debug\Tests\Fixtures;
|
|
| 4 |
|
| 5 |
class ExtendedFinalMethod extends FinalMethod
|
| 6 |
{
|
|
|
|
|
|
|
| 7 |
/**
|
| 8 |
* {@inheritdoc}
|
| 9 |
*/
|
| 4 |
|
| 5 |
class ExtendedFinalMethod extends FinalMethod
|
| 6 |
{
|
| 7 |
+
use FinalMethod2Trait;
|
| 8 |
+
|
| 9 |
/**
|
| 10 |
* {@inheritdoc}
|
| 11 |
*/
|
vendor/symfony/debug/Tests/Fixtures/FinalMethod.php
CHANGED
|
@@ -11,6 +11,13 @@ class FinalMethod
|
|
| 11 |
{
|
| 12 |
}
|
| 13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
public function anotherMethod()
|
| 15 |
{
|
| 16 |
}
|
| 11 |
{
|
| 12 |
}
|
| 13 |
|
| 14 |
+
/**
|
| 15 |
+
* @final
|
| 16 |
+
*/
|
| 17 |
+
public function finalMethod2()
|
| 18 |
+
{
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
public function anotherMethod()
|
| 22 |
{
|
| 23 |
}
|
vendor/symfony/debug/Tests/Fixtures/FinalMethod2Trait.php
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
namespace Symfony\Component\Debug\Tests\Fixtures;
|
| 4 |
+
|
| 5 |
+
trait FinalMethod2Trait
|
| 6 |
+
{
|
| 7 |
+
public function finalMethod2()
|
| 8 |
+
{
|
| 9 |
+
}
|
| 10 |
+
}
|
vendor/symfony/debug/Tests/Fixtures/TraitWithInternalMethod.php
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
namespace Symfony\Component\Debug\Tests\Fixtures;
|
| 4 |
+
|
| 5 |
+
trait TraitWithInternalMethod
|
| 6 |
+
{
|
| 7 |
+
/**
|
| 8 |
+
* @internal
|
| 9 |
+
*/
|
| 10 |
+
public function foo()
|
| 11 |
+
{
|
| 12 |
+
}
|
| 13 |
+
}
|
vendor/symfony/debug/Tests/phpt/debug_class_loader.phpt
CHANGED
|
@@ -24,3 +24,4 @@ class_exists(ExtendedFinalMethod::class);
|
|
| 24 |
?>
|
| 25 |
--EXPECTF--
|
| 26 |
The "Symfony\Component\Debug\Tests\Fixtures\FinalMethod::finalMethod()" method is considered final since version 3.3. It may change without further notice as of its next major version. You should not extend it from "Symfony\Component\Debug\Tests\Fixtures\ExtendedFinalMethod".
|
|
|
| 24 |
?>
|
| 25 |
--EXPECTF--
|
| 26 |
The "Symfony\Component\Debug\Tests\Fixtures\FinalMethod::finalMethod()" method is considered final since version 3.3. It may change without further notice as of its next major version. You should not extend it from "Symfony\Component\Debug\Tests\Fixtures\ExtendedFinalMethod".
|
| 27 |
+
The "Symfony\Component\Debug\Tests\Fixtures\FinalMethod::finalMethod2()" method is considered final. It may change without further notice as of its next major version. You should not extend it from "Symfony\Component\Debug\Tests\Fixtures\ExtendedFinalMethod".
|
vendor/symfony/debug/Tests/phpt/decorate_exception_hander.phpt
CHANGED
|
@@ -1,5 +1,7 @@
|
|
| 1 |
--TEST--
|
| 2 |
Test catching fatal errors when handlers are nested
|
|
|
|
|
|
|
| 3 |
--FILE--
|
| 4 |
<?php
|
| 5 |
|
|
@@ -24,7 +26,6 @@ if (true) {
|
|
| 24 |
|
| 25 |
?>
|
| 26 |
--EXPECTF--
|
| 27 |
-
Fatal error: Class 'Symfony\Component\Debug\missing' not found in %s on line %d
|
| 28 |
object(Symfony\Component\Debug\Exception\ClassNotFoundException)#%d (8) {
|
| 29 |
["message":protected]=>
|
| 30 |
string(131) "Attempted to load class "missing" from namespace "Symfony\Component\Debug".
|
|
@@ -38,8 +39,7 @@ Did you forget a "use" statement for another namespace?"
|
|
| 38 |
["line":protected]=>
|
| 39 |
int(%d)
|
| 40 |
["trace":"Exception":private]=>
|
| 41 |
-
array(
|
| 42 |
-
}
|
| 43 |
["previous":"Exception":private]=>
|
| 44 |
NULL
|
| 45 |
["severity":protected]=>
|
| 1 |
--TEST--
|
| 2 |
Test catching fatal errors when handlers are nested
|
| 3 |
+
--INI--
|
| 4 |
+
display_errors=0
|
| 5 |
--FILE--
|
| 6 |
<?php
|
| 7 |
|
| 26 |
|
| 27 |
?>
|
| 28 |
--EXPECTF--
|
|
|
|
| 29 |
object(Symfony\Component\Debug\Exception\ClassNotFoundException)#%d (8) {
|
| 30 |
["message":protected]=>
|
| 31 |
string(131) "Attempted to load class "missing" from namespace "Symfony\Component\Debug".
|
| 39 |
["line":protected]=>
|
| 40 |
int(%d)
|
| 41 |
["trace":"Exception":private]=>
|
| 42 |
+
array(%d) {%A}
|
|
|
|
| 43 |
["previous":"Exception":private]=>
|
| 44 |
NULL
|
| 45 |
["severity":protected]=>
|
vendor/symfony/polyfill-mbstring/Mbstring.php
CHANGED
|
@@ -44,7 +44,7 @@ namespace Symfony\Polyfill\Mbstring;
|
|
| 44 |
* - mb_strrchr - Finds the last occurrence of a character in a string within another
|
| 45 |
* - mb_strrichr - Finds the last occurrence of a character in a string within another, case insensitive
|
| 46 |
* - mb_strripos - Finds position of last occurrence of a string within another, case insensitive
|
| 47 |
-
* - mb_strstr - Finds first occurrence of a string within
|
| 48 |
* - mb_strwidth - Return width of string
|
| 49 |
* - mb_substr_count - Count the number of substring occurrences
|
| 50 |
*
|
|
@@ -281,8 +281,11 @@ final class Mbstring
|
|
| 281 |
}
|
| 282 |
|
| 283 |
if (MB_CASE_TITLE == $mode) {
|
| 284 |
-
$
|
| 285 |
-
|
|
|
|
|
|
|
|
|
|
| 286 |
} else {
|
| 287 |
if (MB_CASE_UPPER == $mode) {
|
| 288 |
static $upper = null;
|
|
@@ -752,14 +755,9 @@ final class Mbstring
|
|
| 752 |
return $entities;
|
| 753 |
}
|
| 754 |
|
| 755 |
-
private static function
|
| 756 |
-
{
|
| 757 |
-
return self::mb_convert_case($s[0], MB_CASE_LOWER, 'UTF-8');
|
| 758 |
-
}
|
| 759 |
-
|
| 760 |
-
private static function title_case_upper(array $s)
|
| 761 |
{
|
| 762 |
-
return self::mb_convert_case($s[
|
| 763 |
}
|
| 764 |
|
| 765 |
private static function getData($file)
|
| 44 |
* - mb_strrchr - Finds the last occurrence of a character in a string within another
|
| 45 |
* - mb_strrichr - Finds the last occurrence of a character in a string within another, case insensitive
|
| 46 |
* - mb_strripos - Finds position of last occurrence of a string within another, case insensitive
|
| 47 |
+
* - mb_strstr - Finds first occurrence of a string within another
|
| 48 |
* - mb_strwidth - Return width of string
|
| 49 |
* - mb_substr_count - Count the number of substring occurrences
|
| 50 |
*
|
| 281 |
}
|
| 282 |
|
| 283 |
if (MB_CASE_TITLE == $mode) {
|
| 284 |
+
static $titleRegexp = null;
|
| 285 |
+
if (null === $titleRegexp) {
|
| 286 |
+
$titleRegexp = self::getData('titleCaseRegexp');
|
| 287 |
+
}
|
| 288 |
+
$s = preg_replace_callback($titleRegexp, array(__CLASS__, 'title_case'), $s);
|
| 289 |
} else {
|
| 290 |
if (MB_CASE_UPPER == $mode) {
|
| 291 |
static $upper = null;
|
| 755 |
return $entities;
|
| 756 |
}
|
| 757 |
|
| 758 |
+
private static function title_case(array $s)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 759 |
{
|
| 760 |
+
return self::mb_convert_case($s[1], MB_CASE_UPPER, 'UTF-8').self::mb_convert_case($s[2], MB_CASE_LOWER, 'UTF-8');
|
| 761 |
}
|
| 762 |
|
| 763 |
private static function getData($file)
|
vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
// from Case_Ignorable in https://unicode.org/Public/UNIDATA/DerivedCoreProperties.txt
|
| 4 |
+
|
| 5 |
+
return '/(?<![\x{0027}\x{002E}\x{003A}\x{005E}\x{0060}\x{00A8}\x{00AD}\x{00AF}\x{00B4}\x{00B7}\x{00B8}\x{02B0}-\x{02C1}\x{02C2}-\x{02C5}\x{02C6}-\x{02D1}\x{02D2}-\x{02DF}\x{02E0}-\x{02E4}\x{02E5}-\x{02EB}\x{02EC}\x{02ED}\x{02EE}\x{02EF}-\x{02FF}\x{0300}-\x{036F}\x{0374}\x{0375}\x{037A}\x{0384}-\x{0385}\x{0387}\x{0483}-\x{0487}\x{0488}-\x{0489}\x{0559}\x{0591}-\x{05BD}\x{05BF}\x{05C1}-\x{05C2}\x{05C4}-\x{05C5}\x{05C7}\x{05F4}\x{0600}-\x{0605}\x{0610}-\x{061A}\x{061C}\x{0640}\x{064B}-\x{065F}\x{0670}\x{06D6}-\x{06DC}\x{06DD}\x{06DF}-\x{06E4}\x{06E5}-\x{06E6}\x{06E7}-\x{06E8}\x{06EA}-\x{06ED}\x{070F}\x{0711}\x{0730}-\x{074A}\x{07A6}-\x{07B0}\x{07EB}-\x{07F3}\x{07F4}-\x{07F5}\x{07FA}\x{07FD}\x{0816}-\x{0819}\x{081A}\x{081B}-\x{0823}\x{0824}\x{0825}-\x{0827}\x{0828}\x{0829}-\x{082D}\x{0859}-\x{085B}\x{08D3}-\x{08E1}\x{08E2}\x{08E3}-\x{0902}\x{093A}\x{093C}\x{0941}-\x{0948}\x{094D}\x{0951}-\x{0957}\x{0962}-\x{0963}\x{0971}\x{0981}\x{09BC}\x{09C1}-\x{09C4}\x{09CD}\x{09E2}-\x{09E3}\x{09FE}\x{0A01}-\x{0A02}\x{0A3C}\x{0A41}-\x{0A42}\x{0A47}-\x{0A48}\x{0A4B}-\x{0A4D}\x{0A51}\x{0A70}-\x{0A71}\x{0A75}\x{0A81}-\x{0A82}\x{0ABC}\x{0AC1}-\x{0AC5}\x{0AC7}-\x{0AC8}\x{0ACD}\x{0AE2}-\x{0AE3}\x{0AFA}-\x{0AFF}\x{0B01}\x{0B3C}\x{0B3F}\x{0B41}-\x{0B44}\x{0B4D}\x{0B56}\x{0B62}-\x{0B63}\x{0B82}\x{0BC0}\x{0BCD}\x{0C00}\x{0C04}\x{0C3E}-\x{0C40}\x{0C46}-\x{0C48}\x{0C4A}-\x{0C4D}\x{0C55}-\x{0C56}\x{0C62}-\x{0C63}\x{0C81}\x{0CBC}\x{0CBF}\x{0CC6}\x{0CCC}-\x{0CCD}\x{0CE2}-\x{0CE3}\x{0D00}-\x{0D01}\x{0D3B}-\x{0D3C}\x{0D41}-\x{0D44}\x{0D4D}\x{0D62}-\x{0D63}\x{0DCA}\x{0DD2}-\x{0DD4}\x{0DD6}\x{0E31}\x{0E34}-\x{0E3A}\x{0E46}\x{0E47}-\x{0E4E}\x{0EB1}\x{0EB4}-\x{0EB9}\x{0EBB}-\x{0EBC}\x{0EC6}\x{0EC8}-\x{0ECD}\x{0F18}-\x{0F19}\x{0F35}\x{0F37}\x{0F39}\x{0F71}-\x{0F7E}\x{0F80}-\x{0F84}\x{0F86}-\x{0F87}\x{0F8D}-\x{0F97}\x{0F99}-\x{0FBC}\x{0FC6}\x{102D}-\x{1030}\x{1032}-\x{1037}\x{1039}-\x{103A}\x{103D}-\x{103E}\x{1058}-\x{1059}\x{105E}-\x{1060}\x{1071}-\x{1074}\x{1082}\x{1085}-\x{1086}\x{108D}\x{109D}\x{10FC}\x{135D}-\x{135F}\x{1712}-\x{1714}\x{1732}-\x{1734}\x{1752}-\x{1753}\x{1772}-\x{1773}\x{17B4}-\x{17B5}\x{17B7}-\x{17BD}\x{17C6}\x{17C9}-\x{17D3}\x{17D7}\x{17DD}\x{180B}-\x{180D}\x{180E}\x{1843}\x{1885}-\x{1886}\x{18A9}\x{1920}-\x{1922}\x{1927}-\x{1928}\x{1932}\x{1939}-\x{193B}\x{1A17}-\x{1A18}\x{1A1B}\x{1A56}\x{1A58}-\x{1A5E}\x{1A60}\x{1A62}\x{1A65}-\x{1A6C}\x{1A73}-\x{1A7C}\x{1A7F}\x{1AA7}\x{1AB0}-\x{1ABD}\x{1ABE}\x{1B00}-\x{1B03}\x{1B34}\x{1B36}-\x{1B3A}\x{1B3C}\x{1B42}\x{1B6B}-\x{1B73}\x{1B80}-\x{1B81}\x{1BA2}-\x{1BA5}\x{1BA8}-\x{1BA9}\x{1BAB}-\x{1BAD}\x{1BE6}\x{1BE8}-\x{1BE9}\x{1BED}\x{1BEF}-\x{1BF1}\x{1C2C}-\x{1C33}\x{1C36}-\x{1C37}\x{1C78}-\x{1C7D}\x{1CD0}-\x{1CD2}\x{1CD4}-\x{1CE0}\x{1CE2}-\x{1CE8}\x{1CED}\x{1CF4}\x{1CF8}-\x{1CF9}\x{1D2C}-\x{1D6A}\x{1D78}\x{1D9B}-\x{1DBF}\x{1DC0}-\x{1DF9}\x{1DFB}-\x{1DFF}\x{1FBD}\x{1FBF}-\x{1FC1}\x{1FCD}-\x{1FCF}\x{1FDD}-\x{1FDF}\x{1FED}-\x{1FEF}\x{1FFD}-\x{1FFE}\x{200B}-\x{200F}\x{2018}\x{2019}\x{2024}\x{2027}\x{202A}-\x{202E}\x{2060}-\x{2064}\x{2066}-\x{206F}\x{2071}\x{207F}\x{2090}-\x{209C}\x{20D0}-\x{20DC}\x{20DD}-\x{20E0}\x{20E1}\x{20E2}-\x{20E4}\x{20E5}-\x{20F0}\x{2C7C}-\x{2C7D}\x{2CEF}-\x{2CF1}\x{2D6F}\x{2D7F}\x{2DE0}-\x{2DFF}\x{2E2F}\x{3005}\x{302A}-\x{302D}\x{3031}-\x{3035}\x{303B}\x{3099}-\x{309A}\x{309B}-\x{309C}\x{309D}-\x{309E}\x{30FC}-\x{30FE}\x{A015}\x{A4F8}-\x{A4FD}\x{A60C}\x{A66F}\x{A670}-\x{A672}\x{A674}-\x{A67D}\x{A67F}\x{A69C}-\x{A69D}\x{A69E}-\x{A69F}\x{A6F0}-\x{A6F1}\x{A700}-\x{A716}\x{A717}-\x{A71F}\x{A720}-\x{A721}\x{A770}\x{A788}\x{A789}-\x{A78A}\x{A7F8}-\x{A7F9}\x{A802}\x{A806}\x{A80B}\x{A825}-\x{A826}\x{A8C4}-\x{A8C5}\x{A8E0}-\x{A8F1}\x{A8FF}\x{A926}-\x{A92D}\x{A947}-\x{A951}\x{A980}-\x{A982}\x{A9B3}\x{A9B6}-\x{A9B9}\x{A9BC}\x{A9CF}\x{A9E5}\x{A9E6}\x{AA29}-\x{AA2E}\x{AA31}-\x{AA32}\x{AA35}-\x{AA36}\x{AA43}\x{AA4C}\x{AA70}\x{AA7C}\x{AAB0}\x{AAB2}-\x{AAB4}\x{AAB7}-\x{AAB8}\x{AABE}-\x{AABF}\x{AAC1}\x{AADD}\x{AAEC}-\x{AAED}\x{AAF3}-\x{AAF4}\x{AAF6}\x{AB5B}\x{AB5C}-\x{AB5F}\x{ABE5}\x{ABE8}\x{ABED}\x{FB1E}\x{FBB2}-\x{FBC1}\x{FE00}-\x{FE0F}\x{FE13}\x{FE20}-\x{FE2F}\x{FE52}\x{FE55}\x{FEFF}\x{FF07}\x{FF0E}\x{FF1A}\x{FF3E}\x{FF40}\x{FF70}\x{FF9E}-\x{FF9F}\x{FFE3}\x{FFF9}-\x{FFFB}\x{101FD}\x{102E0}\x{10376}-\x{1037A}\x{10A01}-\x{10A03}\x{10A05}-\x{10A06}\x{10A0C}-\x{10A0F}\x{10A38}-\x{10A3A}\x{10A3F}\x{10AE5}-\x{10AE6}\x{10D24}-\x{10D27}\x{10F46}-\x{10F50}\x{11001}\x{11038}-\x{11046}\x{1107F}-\x{11081}\x{110B3}-\x{110B6}\x{110B9}-\x{110BA}\x{110BD}\x{110CD}\x{11100}-\x{11102}\x{11127}-\x{1112B}\x{1112D}-\x{11134}\x{11173}\x{11180}-\x{11181}\x{111B6}-\x{111BE}\x{111C9}-\x{111CC}\x{1122F}-\x{11231}\x{11234}\x{11236}-\x{11237}\x{1123E}\x{112DF}\x{112E3}-\x{112EA}\x{11300}-\x{11301}\x{1133B}-\x{1133C}\x{11340}\x{11366}-\x{1136C}\x{11370}-\x{11374}\x{11438}-\x{1143F}\x{11442}-\x{11444}\x{11446}\x{1145E}\x{114B3}-\x{114B8}\x{114BA}\x{114BF}-\x{114C0}\x{114C2}-\x{114C3}\x{115B2}-\x{115B5}\x{115BC}-\x{115BD}\x{115BF}-\x{115C0}\x{115DC}-\x{115DD}\x{11633}-\x{1163A}\x{1163D}\x{1163F}-\x{11640}\x{116AB}\x{116AD}\x{116B0}-\x{116B5}\x{116B7}\x{1171D}-\x{1171F}\x{11722}-\x{11725}\x{11727}-\x{1172B}\x{1182F}-\x{11837}\x{11839}-\x{1183A}\x{11A01}-\x{11A0A}\x{11A33}-\x{11A38}\x{11A3B}-\x{11A3E}\x{11A47}\x{11A51}-\x{11A56}\x{11A59}-\x{11A5B}\x{11A8A}-\x{11A96}\x{11A98}-\x{11A99}\x{11C30}-\x{11C36}\x{11C38}-\x{11C3D}\x{11C3F}\x{11C92}-\x{11CA7}\x{11CAA}-\x{11CB0}\x{11CB2}-\x{11CB3}\x{11CB5}-\x{11CB6}\x{11D31}-\x{11D36}\x{11D3A}\x{11D3C}-\x{11D3D}\x{11D3F}-\x{11D45}\x{11D47}\x{11D90}-\x{11D91}\x{11D95}\x{11D97}\x{11EF3}-\x{11EF4}\x{16AF0}-\x{16AF4}\x{16B30}-\x{16B36}\x{16B40}-\x{16B43}\x{16F8F}-\x{16F92}\x{16F93}-\x{16F9F}\x{16FE0}-\x{16FE1}\x{1BC9D}-\x{1BC9E}\x{1BCA0}-\x{1BCA3}\x{1D167}-\x{1D169}\x{1D173}-\x{1D17A}\x{1D17B}-\x{1D182}\x{1D185}-\x{1D18B}\x{1D1AA}-\x{1D1AD}\x{1D242}-\x{1D244}\x{1DA00}-\x{1DA36}\x{1DA3B}-\x{1DA6C}\x{1DA75}\x{1DA84}\x{1DA9B}-\x{1DA9F}\x{1DAA1}-\x{1DAAF}\x{1E000}-\x{1E006}\x{1E008}-\x{1E018}\x{1E01B}-\x{1E021}\x{1E023}-\x{1E024}\x{1E026}-\x{1E02A}\x{1E8D0}-\x{1E8D6}\x{1E944}-\x{1E94A}\x{1F3FB}-\x{1F3FF}\x{E0001}\x{E0020}-\x{E007F}\x{E0100}-\x{E01EF}])(\pL)(\pL*+)/u';
|
vendor/symfony/polyfill-mbstring/composer.json
CHANGED
|
@@ -28,7 +28,7 @@
|
|
| 28 |
"minimum-stability": "dev",
|
| 29 |
"extra": {
|
| 30 |
"branch-alias": {
|
| 31 |
-
"dev-master": "1.
|
| 32 |
}
|
| 33 |
}
|
| 34 |
}
|
| 28 |
"minimum-stability": "dev",
|
| 29 |
"extra": {
|
| 30 |
"branch-alias": {
|
| 31 |
+
"dev-master": "1.9-dev"
|
| 32 |
}
|
| 33 |
}
|
| 34 |
}
|
vendor/symfony/translation/Catalogue/AbstractOperation.php
CHANGED
|
@@ -37,21 +37,20 @@ abstract class AbstractOperation implements OperationInterface
|
|
| 37 |
* This array stores 'all', 'new' and 'obsolete' messages for all valid domains.
|
| 38 |
*
|
| 39 |
* The data structure of this array is as follows:
|
| 40 |
-
*
|
| 41 |
-
*
|
| 42 |
-
*
|
| 43 |
-
*
|
| 44 |
-
*
|
| 45 |
-
*
|
| 46 |
-
*
|
| 47 |
-
*
|
| 48 |
-
*
|
| 49 |
-
*
|
| 50 |
-
*
|
| 51 |
-
*
|
| 52 |
-
*
|
| 53 |
-
*
|
| 54 |
-
* ```
|
| 55 |
*
|
| 56 |
* @var array The array that stores 'all', 'new' and 'obsolete' messages
|
| 57 |
*/
|
| 37 |
* This array stores 'all', 'new' and 'obsolete' messages for all valid domains.
|
| 38 |
*
|
| 39 |
* The data structure of this array is as follows:
|
| 40 |
+
*
|
| 41 |
+
* array(
|
| 42 |
+
* 'domain 1' => array(
|
| 43 |
+
* 'all' => array(...),
|
| 44 |
+
* 'new' => array(...),
|
| 45 |
+
* 'obsolete' => array(...)
|
| 46 |
+
* ),
|
| 47 |
+
* 'domain 2' => array(
|
| 48 |
+
* 'all' => array(...),
|
| 49 |
+
* 'new' => array(...),
|
| 50 |
+
* 'obsolete' => array(...)
|
| 51 |
+
* ),
|
| 52 |
+
* ...
|
| 53 |
+
* )
|
|
|
|
| 54 |
*
|
| 55 |
* @var array The array that stores 'all', 'new' and 'obsolete' messages
|
| 56 |
*/
|
vendor/symfony/translation/Dumper/CsvFileDumper.php
CHANGED
|
@@ -38,7 +38,7 @@ class CsvFileDumper extends FileDumper
|
|
| 38 |
*/
|
| 39 |
public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array())
|
| 40 |
{
|
| 41 |
-
$handle = fopen('php://memory', '
|
| 42 |
|
| 43 |
foreach ($messages->all($domain) as $source => $target) {
|
| 44 |
fputcsv($handle, array($source, $target), $this->delimiter, $this->enclosure);
|
| 38 |
*/
|
| 39 |
public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array())
|
| 40 |
{
|
| 41 |
+
$handle = fopen('php://memory', 'r+b');
|
| 42 |
|
| 43 |
foreach ($messages->all($domain) as $source => $target) {
|
| 44 |
fputcsv($handle, array($source, $target), $this->delimiter, $this->enclosure);
|
{vendor/sensiolabs/security-checker/SensioLabs/Security/Resources → views/emails}/index.php
RENAMED
|
File without changes
|
views/emails/newSubscriberNotification.html
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<p><%= __('Howdy,') %>
|
| 2 |
+
|
| 3 |
+
<p><%= __('The subscriber %$1s has just subscribed to your list %$2s!')
|
| 4 |
+
|replace({'%$1s': subscriber_email, '%$2s': segments_names})
|
| 5 |
+
%>
|
| 6 |
+
|
| 7 |
+
<p><%= __('Cheers,') %>
|
| 8 |
+
|
| 9 |
+
<p><%= __('The MailPoet Plugin') %>
|
| 10 |
+
|
| 11 |
+
<p><small><%= __('You can disable these emails in your [link]MailPoet Settings.[/link]'
|
| 12 |
+
|replaceLinkTags(link_settings)
|
| 13 |
+
) %></small>
|
| 14 |
+
|
| 15 |
+
<# date('-1hour') is here to get today's date, this is the only way that worked for me #>
|
| 16 |
+
<% if date('-1hour') < date('2018-11-12') %>
|
| 17 |
+
<p>
|
| 18 |
+
<small>
|
| 19 |
+
<%= __('PS. MailPoet annual plans are nearly half price for a limited time.
|
| 20 |
+
[link]Find out more in the Premium page in your admin.[/link]'
|
| 21 |
+
|replaceLinkTags(link_premium)
|
| 22 |
+
) %>
|
| 23 |
+
</small>
|
| 24 |
+
<% endif %>
|
views/emails/newSubscriberNotification.txt
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<%= __('Howdy,') %>
|
| 2 |
+
|
| 3 |
+
<%= __('The subscriber %$1s has just subscribed to your list %$2s!')
|
| 4 |
+
|replace({'%$1s': subscriber_email, '%$2s': segments_names})
|
| 5 |
+
%>
|
| 6 |
+
|
| 7 |
+
<%= __('Cheers,') %>
|
| 8 |
+
<%= __('The MailPoet Plugin') %>
|
| 9 |
+
|
| 10 |
+
<%= __('You can disable these emails in your MailPoet Settings.') %>
|
| 11 |
+
<%= link_settings %>
|
| 12 |
+
|
| 13 |
+
<# date('-1hour') is here to get today's date, this is the only way that worked for me #>
|
| 14 |
+
<% if date('-1hour') < date('2018-11-12') %>
|
| 15 |
+
<%= __('PS. MailPoet annual plans are nearly half price for a limited time. Find out more in the Premium page in your admin.') %>
|
| 16 |
+
<%= link_premium %>
|
| 17 |
+
<% endif %>
|
| 18 |
+
|
views/form/editor.html
CHANGED
|
@@ -195,6 +195,13 @@
|
|
| 195 |
</div>
|
| 196 |
</div>
|
| 197 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 198 |
<!-- End | Form Editor: Toolbar -->
|
| 199 |
</div>
|
| 200 |
|
| 195 |
</div>
|
| 196 |
</div>
|
| 197 |
|
| 198 |
+
<p class="help">
|
| 199 |
+
<%= __('<strong>Tip:</strong> read our [link]GDPR guide[/link] to make sure your form follows the privacy directive of the European Union.')
|
| 200 |
+
|replaceLinkTags('https://beta.docs.mailpoet.com/article/246-guide-to-conform-to-gdpr?utm_source=plugin&utm_medium=formeditor&utm_campaign=helpdocs', {'target' : '_blank', id: 'mailpoet_helper_link'})
|
| 201 |
+
|raw
|
| 202 |
+
%>
|
| 203 |
+
</p>
|
| 204 |
+
|
| 205 |
<!-- End | Form Editor: Toolbar -->
|
| 206 |
</div>
|
| 207 |
|
views/premium.html
CHANGED
|
@@ -1,8 +1,17 @@
|
|
| 1 |
<% extends 'layout.html' %>
|
| 2 |
|
| 3 |
<% block content %>
|
| 4 |
-
|
| 5 |
<div class="wrap mailpoet-about-wrap">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
<h1 style="text-align: center; margin-right: 0;"><%= __('What is MailPoet Premium?') %></h1>
|
| 7 |
|
| 8 |
<p class="about-text" style="text-align: center; margin-right: 0;"><%= __("Check out the brief video below. Or, keep reading!") %></p>
|
| 1 |
<% extends 'layout.html' %>
|
| 2 |
|
| 3 |
<% block content %>
|
|
|
|
| 4 |
<div class="wrap mailpoet-about-wrap">
|
| 5 |
+
|
| 6 |
+
<% if display_discount %>
|
| 7 |
+
<div class="mailpoet-discount-container">
|
| 8 |
+
<h1><%= __('Discounts up to 40% for a limited time') %></h1>
|
| 9 |
+
<p><%= __('Don’t miss out on our only sale of the year which ends on November 30.') %></p>
|
| 10 |
+
<p><%= __('There’s never been a better time to change gears.') %></p>
|
| 11 |
+
<a href=" https://account.mailpoet.com/?s=<%= subscriber_count %>&utm_source=plugin&utm_medium=premium&utm_campaign=discount">Save up to 40%</a>
|
| 12 |
+
</div>
|
| 13 |
+
<% endif %>
|
| 14 |
+
|
| 15 |
<h1 style="text-align: center; margin-right: 0;"><%= __('What is MailPoet Premium?') %></h1>
|
| 16 |
|
| 17 |
<p class="about-text" style="text-align: center; margin-right: 0;"><%= __("Check out the brief video below. Or, keep reading!") %></p>
|
views/settings.html
CHANGED
|
@@ -87,6 +87,16 @@
|
|
| 87 |
} else {
|
| 88 |
$('#settings_re_captcha_tokens_error').hide();
|
| 89 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 90 |
// if we're setting up a sending method, try to activate it
|
| 91 |
if ($('.mailpoet_mta_setup_save').is(':visible')) {
|
| 92 |
$('.mailpoet_mta_setup_save').trigger('click');
|
|
@@ -190,10 +200,18 @@
|
|
| 190 |
});
|
| 191 |
});
|
| 192 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 193 |
</script>
|
| 194 |
<% endblock %>
|
| 195 |
<% block translations %>
|
| 196 |
<%= localize({
|
| 197 |
-
'reinstallConfirmation': __('Are you sure? All of your MailPoet data will be permanently erased (newsletters, statistics, subscribers, etc.).')
|
|
|
|
|
|
|
|
|
|
| 198 |
}) %>
|
| 199 |
<% endblock %>
|
| 87 |
} else {
|
| 88 |
$('#settings_re_captcha_tokens_error').hide();
|
| 89 |
}
|
| 90 |
+
// if new subscriber notification is enabled but sender is empty, show error
|
| 91 |
+
var notifications_enabled = $('input[name="subscriber_email_notification[enabled]"]:checked').val(),
|
| 92 |
+
address = $('input[name="subscriber_email_notification[address]"]').val().trim();
|
| 93 |
+
if (notifications_enabled && address == '') {
|
| 94 |
+
$('#settings_subscriber_email_notification_error').show();
|
| 95 |
+
window.location.href = '#basic';
|
| 96 |
+
return false;
|
| 97 |
+
} else {
|
| 98 |
+
$('#settings_subscriber_email_notification_error').hide();
|
| 99 |
+
}
|
| 100 |
// if we're setting up a sending method, try to activate it
|
| 101 |
if ($('.mailpoet_mta_setup_save').is(':visible')) {
|
| 102 |
$('.mailpoet_mta_setup_save').trigger('click');
|
| 200 |
});
|
| 201 |
});
|
| 202 |
});
|
| 203 |
+
var mailpoet_in_app_announcements = <%= json_encode(settings.in_app_announcements) %>;
|
| 204 |
+
var mailpoet_new_subscriber_announcement_image = '<%= image_url('in_app_announcements/new-subscriber-notification.png') %>';
|
| 205 |
+
var mailpoet_installed_at = <%= json_encode(settings.installed_at) %>;
|
| 206 |
+
<% set newUser = (is_new_user == true) ? 'true' : 'false' %>
|
| 207 |
+
var mailpoet_is_new_user = <%= newUser %>;
|
| 208 |
</script>
|
| 209 |
<% endblock %>
|
| 210 |
<% block translations %>
|
| 211 |
<%= localize({
|
| 212 |
+
'reinstallConfirmation': __('Are you sure? All of your MailPoet data will be permanently erased (newsletters, statistics, subscribers, etc.).'),
|
| 213 |
+
'announcementHeader': __('Get notified when someone subscribes'),
|
| 214 |
+
'announcementParagraph1': __('It’s been a popular feature request from our users, we hope you get lots of emails about all your new subscribers!'),
|
| 215 |
+
'announcementParagraph2': __('(You can turn this feature off if it’s too many emails.)'),
|
| 216 |
}) %>
|
| 217 |
<% endblock %>
|
views/settings/basics.html
CHANGED
|
@@ -299,6 +299,48 @@
|
|
| 299 |
</p>
|
| 300 |
</td>
|
| 301 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 302 |
<!-- shortcode: archive page -->
|
| 303 |
<tr>
|
| 304 |
<th scope="row">
|
| 299 |
</p>
|
| 300 |
</td>
|
| 301 |
</tr>
|
| 302 |
+
|
| 303 |
+
<!-- New subscriber emails notifications -->
|
| 304 |
+
<tr>
|
| 305 |
+
<th scope="row">
|
| 306 |
+
<label for="subscription_unsubscribe_page">
|
| 307 |
+
<%= __('New subscriber notifications') %> <span id="new_subscriber_announcement" class="new_subscriber_announcement" />
|
| 308 |
+
</label>
|
| 309 |
+
<p class="description">
|
| 310 |
+
<%= __('Enter the email address that should receive notifications when someone subscribes.') %>
|
| 311 |
+
<td>
|
| 312 |
+
<p>
|
| 313 |
+
<label>
|
| 314 |
+
<input
|
| 315 |
+
type="radio"
|
| 316 |
+
name="subscriber_email_notification[enabled]"
|
| 317 |
+
value="1"
|
| 318 |
+
<% if(settings.subscriber_email_notification.enabled) %>
|
| 319 |
+
checked
|
| 320 |
+
<% endif %>
|
| 321 |
+
/><%= __('Yes') %>
|
| 322 |
+
</label>
|
| 323 |
+
|
| 324 |
+
<label>
|
| 325 |
+
<input
|
| 326 |
+
type="radio"
|
| 327 |
+
name="subscriber_email_notification[enabled]"
|
| 328 |
+
value=""
|
| 329 |
+
<% if not(settings.subscriber_email_notification.enabled) %>
|
| 330 |
+
checked
|
| 331 |
+
<% endif %>
|
| 332 |
+
/><%= __('No') %>
|
| 333 |
+
</label>
|
| 334 |
+
<br>
|
| 335 |
+
<input type="email"
|
| 336 |
+
id="subscriber_email_notification[address]"
|
| 337 |
+
name="subscriber_email_notification[address]"
|
| 338 |
+
value="<%= settings.subscriber_email_notification.address %>"
|
| 339 |
+
placeholder="me@mydomain.com" />
|
| 340 |
+
<br>
|
| 341 |
+
<div id="settings_subscriber_email_notification_error" class="mailpoet_error_item mailpoet_error">
|
| 342 |
+
<%= __('Please fill the email address.') %>
|
| 343 |
+
</div>
|
| 344 |
<!-- shortcode: archive page -->
|
| 345 |
<tr>
|
| 346 |
<th scope="row">
|
