WP Statistics - Version 12.4.1

Version Description

  • Implemented the do_welcome() function.
  • Updated Libraries to latest version.
  • Added delete_transient() for deleting transients when uninstalling the plugin.
Download this release

Release Info

Developer mostafa.s1990
Plugin Icon 128x128 WP Statistics
Version 12.4.1
Comparing to
See all releases

Code changes from version 12.4.0 to 12.4.1

Files changed (119) hide show
  1. composer.lock +40 -37
  2. includes/classes/class-wp-statistics-admin.php +4 -2
  3. includes/classes/class-wp-statistics-uninstall.php +5 -3
  4. includes/vendor/composer/ca-bundle/res/cacert.pem +2 -26
  5. includes/vendor/composer/installed.json +47 -44
  6. includes/vendor/symfony/console/Application.php +42 -42
  7. includes/vendor/symfony/console/Command/Command.php +12 -12
  8. includes/vendor/symfony/console/Command/HelpCommand.php +1 -1
  9. includes/vendor/symfony/console/Command/ListCommand.php +2 -2
  10. includes/vendor/symfony/console/Descriptor/Descriptor.php +2 -2
  11. includes/vendor/symfony/console/Descriptor/MarkdownDescriptor.php +2 -2
  12. includes/vendor/symfony/console/Descriptor/TextDescriptor.php +8 -8
  13. includes/vendor/symfony/console/Descriptor/XmlDescriptor.php +2 -2
  14. includes/vendor/symfony/console/Event/ConsoleErrorEvent.php +2 -2
  15. includes/vendor/symfony/console/Formatter/OutputFormatter.php +4 -4
  16. includes/vendor/symfony/console/Formatter/OutputFormatterStyle.php +4 -4
  17. includes/vendor/symfony/console/Formatter/OutputFormatterStyleStack.php +2 -2
  18. includes/vendor/symfony/console/Helper/DebugFormatterHelper.php +1 -1
  19. includes/vendor/symfony/console/Helper/DescriptorHelper.php +1 -1
  20. includes/vendor/symfony/console/Helper/FormatterHelper.php +1 -1
  21. includes/vendor/symfony/console/Helper/Helper.php +3 -3
  22. includes/vendor/symfony/console/Helper/HelperSet.php +1 -1
  23. includes/vendor/symfony/console/Helper/InputAwareHelper.php +1 -1
  24. includes/vendor/symfony/console/Helper/ProcessHelper.php +1 -1
  25. includes/vendor/symfony/console/Helper/ProgressBar.php +2 -2
  26. includes/vendor/symfony/console/Helper/ProgressIndicator.php +3 -3
  27. includes/vendor/symfony/console/Helper/QuestionHelper.php +11 -11
  28. includes/vendor/symfony/console/Helper/SymfonyQuestionHelper.php +2 -2
  29. includes/vendor/symfony/console/Helper/Table.php +12 -12
  30. includes/vendor/symfony/console/Helper/TableCell.php +1 -1
  31. includes/vendor/symfony/console/Helper/TableStyle.php +1 -1
  32. includes/vendor/symfony/console/Input/ArgvInput.php +10 -10
  33. includes/vendor/symfony/console/Input/ArrayInput.php +9 -9
  34. includes/vendor/symfony/console/Input/Input.php +1 -1
  35. includes/vendor/symfony/console/Input/InputArgument.php +2 -2
  36. includes/vendor/symfony/console/Input/InputDefinition.php +4 -4
  37. includes/vendor/symfony/console/Input/InputOption.php +3 -3
  38. includes/vendor/symfony/console/Input/StringInput.php +4 -4
  39. includes/vendor/symfony/console/Logger/ConsoleLogger.php +1 -1
  40. includes/vendor/symfony/console/Output/ConsoleOutput.php +1 -1
  41. includes/vendor/symfony/console/Output/Output.php +1 -1
  42. includes/vendor/symfony/console/Output/OutputInterface.php +2 -2
  43. includes/vendor/symfony/console/Output/StreamOutput.php +9 -5
  44. includes/vendor/symfony/console/Question/ChoiceQuestion.php +1 -1
  45. includes/vendor/symfony/console/Question/ConfirmationQuestion.php +1 -1
  46. includes/vendor/symfony/console/Question/Question.php +3 -3
  47. includes/vendor/symfony/console/Style/OutputStyle.php +1 -1
  48. includes/vendor/symfony/console/Style/SymfonyStyle.php +6 -6
  49. includes/vendor/symfony/console/Terminal.php +5 -5
  50. includes/vendor/symfony/console/Tester/CommandTester.php +1 -1
  51. includes/vendor/symfony/console/Tests/ApplicationTest.php +7 -7
  52. includes/vendor/symfony/console/Tests/Command/CommandTest.php +5 -5
  53. includes/vendor/symfony/console/Tests/Command/HelpCommandTest.php +2 -2
  54. includes/vendor/symfony/console/Tests/Command/ListCommandTest.php +1 -1
  55. includes/vendor/symfony/console/Tests/EventListener/ErrorListenerTest.php +1 -1
  56. includes/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_8.php +1 -1
  57. includes/vendor/symfony/console/Tests/Formatter/OutputFormatterStyleStackTest.php +1 -1
  58. includes/vendor/symfony/console/Tests/Helper/HelperSetTest.php +1 -1
  59. includes/vendor/symfony/console/Tests/Helper/ProcessHelperTest.php +1 -1
  60. includes/vendor/symfony/console/Tests/Helper/ProgressBarTest.php +1 -1
  61. includes/vendor/symfony/console/Tests/Helper/QuestionHelperTest.php +6 -6
  62. includes/vendor/symfony/console/Tests/Helper/SymfonyQuestionHelperTest.php +1 -1
  63. includes/vendor/symfony/console/Tests/Helper/TableTest.php +2 -2
  64. includes/vendor/symfony/console/Tests/Input/ArgvInputTest.php +14 -13
  65. includes/vendor/symfony/console/Tests/Input/ArrayInputTest.php +3 -3
  66. includes/vendor/symfony/console/Tests/Input/InputDefinitionTest.php +1 -1
  67. includes/vendor/symfony/console/Tests/Input/InputTest.php +1 -1
  68. includes/vendor/symfony/console/Tests/Logger/ConsoleLoggerTest.php +1 -1
  69. includes/vendor/symfony/console/Tests/Output/OutputTest.php +1 -1
  70. includes/vendor/symfony/console/Tests/Style/SymfonyStyleTest.php +3 -3
  71. includes/vendor/symfony/console/Tests/Tester/CommandTesterTest.php +3 -3
  72. includes/vendor/symfony/debug/Debug.php +1 -1
  73. includes/vendor/symfony/debug/DebugClassLoader.php +15 -15
  74. includes/vendor/symfony/debug/ErrorHandler.php +12 -12
  75. includes/vendor/symfony/debug/Exception/FatalErrorException.php +2 -2
  76. includes/vendor/symfony/debug/Exception/FlattenException.php +8 -8
  77. includes/vendor/symfony/debug/ExceptionHandler.php +58 -44
  78. includes/vendor/symfony/debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php +11 -11
  79. includes/vendor/symfony/debug/FatalErrorHandler/UndefinedFunctionFatalErrorHandler.php +4 -4
  80. includes/vendor/symfony/debug/FatalErrorHandler/UndefinedMethodFatalErrorHandler.php +1 -1
  81. includes/vendor/symfony/debug/Resources/ext/tests/003.phpt +1 -1
  82. includes/vendor/symfony/debug/Tests/ErrorHandlerTest.php +2 -2
  83. includes/vendor/symfony/debug/Tests/Exception/FlattenExceptionTest.php +6 -6
  84. includes/vendor/symfony/debug/Tests/ExceptionHandlerTest.php +2 -2
  85. includes/vendor/symfony/debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php +4 -4
  86. includes/vendor/symfony/debug/Tests/HeaderMock.php +2 -2
  87. includes/vendor/symfony/debug/Tests/phpt/debug_class_loader.phpt +1 -1
  88. includes/vendor/symfony/debug/Tests/phpt/decorate_exception_hander.phpt +2 -3
  89. includes/vendor/symfony/debug/Tests/phpt/exception_rethrown.phpt +1 -1
  90. includes/vendor/symfony/debug/Tests/phpt/fatal_with_nested_handlers.phpt +1 -1
  91. includes/vendor/symfony/filesystem/Filesystem.php +27 -27
  92. includes/vendor/symfony/filesystem/LockHandler.php +1 -1
  93. includes/vendor/symfony/filesystem/Tests/ExceptionTest.php +1 -1
  94. includes/vendor/symfony/filesystem/Tests/FilesystemTest.php +184 -159
  95. includes/vendor/symfony/filesystem/Tests/FilesystemTestCase.php +9 -9
  96. includes/vendor/symfony/filesystem/Tests/LockHandlerTest.php +2 -2
  97. includes/vendor/symfony/finder/Comparator/Comparator.php +1 -1
  98. includes/vendor/symfony/finder/Finder.php +4 -4
  99. includes/vendor/symfony/finder/Glob.php +1 -1
  100. includes/vendor/symfony/finder/Iterator/CustomFilterIterator.php +2 -2
  101. includes/vendor/symfony/finder/Iterator/PathFilterIterator.php +1 -1
  102. includes/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php +2 -2
  103. includes/vendor/symfony/finder/Iterator/SortableIterator.php +1 -1
  104. includes/vendor/symfony/finder/Tests/FinderTest.php +40 -40
  105. includes/vendor/symfony/finder/Tests/GlobTest.php +12 -12
  106. includes/vendor/symfony/finder/Tests/Iterator/DateRangeFilterIteratorTest.php +1 -1
  107. includes/vendor/symfony/finder/Tests/Iterator/IteratorTestCase.php +3 -3
  108. includes/vendor/symfony/finder/Tests/Iterator/MockSplFileInfo.php +3 -3
  109. includes/vendor/symfony/finder/Tests/Iterator/PathFilterIteratorTest.php +6 -6
  110. includes/vendor/symfony/finder/Tests/Iterator/RealIteratorTestCase.php +9 -9
  111. includes/vendor/symfony/finder/Tests/Iterator/RecursiveDirectoryIteratorTest.php +2 -2
  112. includes/vendor/symfony/finder/Tests/Iterator/SizeRangeFilterIteratorTest.php +1 -1
  113. includes/vendor/symfony/finder/Tests/Iterator/SortableIteratorTest.php +3 -3
  114. includes/vendor/symfony/polyfill-ctype/composer.json +4 -1
  115. includes/vendor/symfony/polyfill-mbstring/Mbstring.php +8 -10
  116. includes/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php +5 -0
  117. includes/vendor/symfony/polyfill-mbstring/composer.json +1 -1
  118. readme.txt +6 -1
  119. wp-statistics.php +1 -1
composer.lock CHANGED
@@ -77,16 +77,16 @@
77
  },
78
  {
79
  "name": "composer/ca-bundle",
80
- "version": "1.1.1",
81
  "source": {
82
  "type": "git",
83
  "url": "https://github.com/composer/ca-bundle.git",
84
- "reference": "d2c0a83b7533d6912e8d516756ebd34f893e9169"
85
  },
86
  "dist": {
87
  "type": "zip",
88
- "url": "https://api.github.com/repos/composer/ca-bundle/zipball/d2c0a83b7533d6912e8d516756ebd34f893e9169",
89
- "reference": "d2c0a83b7533d6912e8d516756ebd34f893e9169",
90
  "shasum": ""
91
  },
92
  "require": {
@@ -129,7 +129,7 @@
129
  "ssl",
130
  "tls"
131
  ],
132
- "time": "2018-03-29T19:57:20+00:00"
133
  },
134
  {
135
  "name": "donatj/phpuseragentparser",
@@ -898,16 +898,16 @@
898
  },
899
  {
900
  "name": "symfony/console",
901
- "version": "v3.4.12",
902
  "source": {
903
  "type": "git",
904
  "url": "https://github.com/symfony/console.git",
905
- "reference": "1b97071a26d028c9bd4588264e101e14f6e7cd00"
906
  },
907
  "dist": {
908
  "type": "zip",
909
- "url": "https://api.github.com/repos/symfony/console/zipball/1b97071a26d028c9bd4588264e101e14f6e7cd00",
910
- "reference": "1b97071a26d028c9bd4588264e101e14f6e7cd00",
911
  "shasum": ""
912
  },
913
  "require": {
@@ -963,20 +963,20 @@
963
  ],
964
  "description": "Symfony Console Component",
965
  "homepage": "https://symfony.com",
966
- "time": "2018-05-23T05:02:55+00:00"
967
  },
968
  {
969
  "name": "symfony/debug",
970
- "version": "v3.4.12",
971
  "source": {
972
  "type": "git",
973
  "url": "https://github.com/symfony/debug.git",
974
- "reference": "47e6788c5b151cf0cfdf3329116bf33800632d75"
975
  },
976
  "dist": {
977
  "type": "zip",
978
- "url": "https://api.github.com/repos/symfony/debug/zipball/47e6788c5b151cf0cfdf3329116bf33800632d75",
979
- "reference": "47e6788c5b151cf0cfdf3329116bf33800632d75",
980
  "shasum": ""
981
  },
982
  "require": {
@@ -1019,20 +1019,20 @@
1019
  ],
1020
  "description": "Symfony Debug Component",
1021
  "homepage": "https://symfony.com",
1022
- "time": "2018-06-25T11:10:40+00:00"
1023
  },
1024
  {
1025
  "name": "symfony/filesystem",
1026
- "version": "v3.4.12",
1027
  "source": {
1028
  "type": "git",
1029
  "url": "https://github.com/symfony/filesystem.git",
1030
- "reference": "8a721a5f2553c6c3482b1c5b22ed60fe94dd63ed"
1031
  },
1032
  "dist": {
1033
  "type": "zip",
1034
- "url": "https://api.github.com/repos/symfony/filesystem/zipball/8a721a5f2553c6c3482b1c5b22ed60fe94dd63ed",
1035
- "reference": "8a721a5f2553c6c3482b1c5b22ed60fe94dd63ed",
1036
  "shasum": ""
1037
  },
1038
  "require": {
@@ -1069,20 +1069,20 @@
1069
  ],
1070
  "description": "Symfony Filesystem Component",
1071
  "homepage": "https://symfony.com",
1072
- "time": "2018-06-21T11:10:19+00:00"
1073
  },
1074
  {
1075
  "name": "symfony/finder",
1076
- "version": "v3.4.12",
1077
  "source": {
1078
  "type": "git",
1079
  "url": "https://github.com/symfony/finder.git",
1080
- "reference": "3a8c3de91d2b2c68cd2d665cf9d00f7ef9eaa394"
1081
  },
1082
  "dist": {
1083
  "type": "zip",
1084
- "url": "https://api.github.com/repos/symfony/finder/zipball/3a8c3de91d2b2c68cd2d665cf9d00f7ef9eaa394",
1085
- "reference": "3a8c3de91d2b2c68cd2d665cf9d00f7ef9eaa394",
1086
  "shasum": ""
1087
  },
1088
  "require": {
@@ -1118,29 +1118,32 @@
1118
  ],
1119
  "description": "Symfony Finder Component",
1120
  "homepage": "https://symfony.com",
1121
- "time": "2018-06-19T20:52:10+00:00"
1122
  },
1123
  {
1124
  "name": "symfony/polyfill-ctype",
1125
- "version": "v1.8.0",
1126
  "source": {
1127
  "type": "git",
1128
  "url": "https://github.com/symfony/polyfill-ctype.git",
1129
- "reference": "7cc359f1b7b80fc25ed7796be7d96adc9b354bae"
1130
  },
1131
  "dist": {
1132
  "type": "zip",
1133
- "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/7cc359f1b7b80fc25ed7796be7d96adc9b354bae",
1134
- "reference": "7cc359f1b7b80fc25ed7796be7d96adc9b354bae",
1135
  "shasum": ""
1136
  },
1137
  "require": {
1138
  "php": ">=5.3.3"
1139
  },
 
 
 
1140
  "type": "library",
1141
  "extra": {
1142
  "branch-alias": {
1143
- "dev-master": "1.8-dev"
1144
  }
1145
  },
1146
  "autoload": {
@@ -1173,20 +1176,20 @@
1173
  "polyfill",
1174
  "portable"
1175
  ],
1176
- "time": "2018-04-30T19:57:29+00:00"
1177
  },
1178
  {
1179
  "name": "symfony/polyfill-mbstring",
1180
- "version": "v1.8.0",
1181
  "source": {
1182
  "type": "git",
1183
  "url": "https://github.com/symfony/polyfill-mbstring.git",
1184
- "reference": "3296adf6a6454a050679cde90f95350ad604b171"
1185
  },
1186
  "dist": {
1187
  "type": "zip",
1188
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/3296adf6a6454a050679cde90f95350ad604b171",
1189
- "reference": "3296adf6a6454a050679cde90f95350ad604b171",
1190
  "shasum": ""
1191
  },
1192
  "require": {
@@ -1198,7 +1201,7 @@
1198
  "type": "library",
1199
  "extra": {
1200
  "branch-alias": {
1201
- "dev-master": "1.8-dev"
1202
  }
1203
  },
1204
  "autoload": {
@@ -1232,7 +1235,7 @@
1232
  "portable",
1233
  "shim"
1234
  ],
1235
- "time": "2018-04-26T10:06:28+00:00"
1236
  }
1237
  ],
1238
  "packages-dev": [],
77
  },
78
  {
79
  "name": "composer/ca-bundle",
80
+ "version": "1.1.2",
81
  "source": {
82
  "type": "git",
83
  "url": "https://github.com/composer/ca-bundle.git",
84
+ "reference": "46afded9720f40b9dc63542af4e3e43a1177acb0"
85
  },
86
  "dist": {
87
  "type": "zip",
88
+ "url": "https://api.github.com/repos/composer/ca-bundle/zipball/46afded9720f40b9dc63542af4e3e43a1177acb0",
89
+ "reference": "46afded9720f40b9dc63542af4e3e43a1177acb0",
90
  "shasum": ""
91
  },
92
  "require": {
129
  "ssl",
130
  "tls"
131
  ],
132
+ "time": "2018-08-08T08:57:40+00:00"
133
  },
134
  {
135
  "name": "donatj/phpuseragentparser",
898
  },
899
  {
900
  "name": "symfony/console",
901
+ "version": "v3.4.15",
902
  "source": {
903
  "type": "git",
904
  "url": "https://github.com/symfony/console.git",
905
+ "reference": "6b217594552b9323bcdcfc14f8a0ce126e84cd73"
906
  },
907
  "dist": {
908
  "type": "zip",
909
+ "url": "https://api.github.com/repos/symfony/console/zipball/6b217594552b9323bcdcfc14f8a0ce126e84cd73",
910
+ "reference": "6b217594552b9323bcdcfc14f8a0ce126e84cd73",
911
  "shasum": ""
912
  },
913
  "require": {
963
  ],
964
  "description": "Symfony Console Component",
965
  "homepage": "https://symfony.com",
966
+ "time": "2018-07-26T11:19:56+00:00"
967
  },
968
  {
969
  "name": "symfony/debug",
970
+ "version": "v3.4.15",
971
  "source": {
972
  "type": "git",
973
  "url": "https://github.com/symfony/debug.git",
974
+ "reference": "c4625e75341e4fb309ce0c049cbf7fb84b8897cd"
975
  },
976
  "dist": {
977
  "type": "zip",
978
+ "url": "https://api.github.com/repos/symfony/debug/zipball/c4625e75341e4fb309ce0c049cbf7fb84b8897cd",
979
+ "reference": "c4625e75341e4fb309ce0c049cbf7fb84b8897cd",
980
  "shasum": ""
981
  },
982
  "require": {
1019
  ],
1020
  "description": "Symfony Debug Component",
1021
  "homepage": "https://symfony.com",
1022
+ "time": "2018-08-03T10:42:44+00:00"
1023
  },
1024
  {
1025
  "name": "symfony/filesystem",
1026
+ "version": "v3.4.15",
1027
  "source": {
1028
  "type": "git",
1029
  "url": "https://github.com/symfony/filesystem.git",
1030
+ "reference": "285ce5005cb01a0aeaa5b0cf590bd0cc40bb631c"
1031
  },
1032
  "dist": {
1033
  "type": "zip",
1034
+ "url": "https://api.github.com/repos/symfony/filesystem/zipball/285ce5005cb01a0aeaa5b0cf590bd0cc40bb631c",
1035
+ "reference": "285ce5005cb01a0aeaa5b0cf590bd0cc40bb631c",
1036
  "shasum": ""
1037
  },
1038
  "require": {
1069
  ],
1070
  "description": "Symfony Filesystem Component",
1071
  "homepage": "https://symfony.com",
1072
+ "time": "2018-08-10T07:29:05+00:00"
1073
  },
1074
  {
1075
  "name": "symfony/finder",
1076
+ "version": "v3.4.15",
1077
  "source": {
1078
  "type": "git",
1079
  "url": "https://github.com/symfony/finder.git",
1080
+ "reference": "8a84fcb207451df0013b2c74cbbf1b62d47b999a"
1081
  },
1082
  "dist": {
1083
  "type": "zip",
1084
+ "url": "https://api.github.com/repos/symfony/finder/zipball/8a84fcb207451df0013b2c74cbbf1b62d47b999a",
1085
+ "reference": "8a84fcb207451df0013b2c74cbbf1b62d47b999a",
1086
  "shasum": ""
1087
  },
1088
  "require": {
1118
  ],
1119
  "description": "Symfony Finder Component",
1120
  "homepage": "https://symfony.com",
1121
+ "time": "2018-07-26T11:19:56+00:00"
1122
  },
1123
  {
1124
  "name": "symfony/polyfill-ctype",
1125
+ "version": "v1.9.0",
1126
  "source": {
1127
  "type": "git",
1128
  "url": "https://github.com/symfony/polyfill-ctype.git",
1129
+ "reference": "e3d826245268269cd66f8326bd8bc066687b4a19"
1130
  },
1131
  "dist": {
1132
  "type": "zip",
1133
+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19",
1134
+ "reference": "e3d826245268269cd66f8326bd8bc066687b4a19",
1135
  "shasum": ""
1136
  },
1137
  "require": {
1138
  "php": ">=5.3.3"
1139
  },
1140
+ "suggest": {
1141
+ "ext-ctype": "For best performance"
1142
+ },
1143
  "type": "library",
1144
  "extra": {
1145
  "branch-alias": {
1146
+ "dev-master": "1.9-dev"
1147
  }
1148
  },
1149
  "autoload": {
1176
  "polyfill",
1177
  "portable"
1178
  ],
1179
+ "time": "2018-08-06T14:22:27+00:00"
1180
  },
1181
  {
1182
  "name": "symfony/polyfill-mbstring",
1183
+ "version": "v1.9.0",
1184
  "source": {
1185
  "type": "git",
1186
  "url": "https://github.com/symfony/polyfill-mbstring.git",
1187
+ "reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8"
1188
  },
1189
  "dist": {
1190
  "type": "zip",
1191
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/d0cd638f4634c16d8df4508e847f14e9e43168b8",
1192
+ "reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8",
1193
  "shasum": ""
1194
  },
1195
  "require": {
1201
  "type": "library",
1202
  "extra": {
1203
  "branch-alias": {
1204
+ "dev-master": "1.9-dev"
1205
  }
1206
  },
1207
  "autoload": {
1235
  "portable",
1236
  "shim"
1237
  ],
1238
+ "time": "2018-08-06T14:22:27+00:00"
1239
  }
1240
  ],
1241
  "packages-dev": [],
includes/classes/class-wp-statistics-admin.php CHANGED
@@ -675,12 +675,14 @@ class WP_Statistics_Admin {
675
 
676
  /**
677
  * Doing something when the WP-Statistics will be upgraded.
 
 
678
  */
679
- public function upgrade_plugin() {
680
  // Update options
681
  WP_Statistics_Updates::do_upgrade();
682
 
683
  // Launch the welcome page
684
- WP_Statistics_Welcome::do_welcome();
685
  }
686
  }
675
 
676
  /**
677
  * Doing something when the WP-Statistics will be upgraded.
678
+ * @param $upgrader_object
679
+ * @param $options
680
  */
681
+ public function upgrade_plugin( $upgrader_object, $options ) {
682
  // Update options
683
  WP_Statistics_Updates::do_upgrade();
684
 
685
  // Launch the welcome page
686
+ WP_Statistics_Welcome::do_welcome( $upgrader_object, $options );
687
  }
688
  }
includes/classes/class-wp-statistics-uninstall.php CHANGED
@@ -44,12 +44,14 @@ class WP_Statistics_Uninstall {
44
  delete_option( 'wp_statistics_db_version' );
45
  delete_option( 'wp_statistics_plugin_version' );
46
 
 
 
 
 
47
  // Delete the user options.
48
  $wpdb->query( "DELETE FROM {$wpdb->prefix}usermeta WHERE meta_key LIKE 'wp_statistics%'" );
49
 
50
  // Drop the tables
51
- $wpdb->query(
52
- "DROP TABLE IF EXISTS {$wpdb->prefix}statistics_useronline, {$wpdb->prefix}statistics_visit, {$wpdb->prefix}statistics_visitor, {$wpdb->prefix}statistics_exclusions, {$wpdb->prefix}statistics_pages, {$wpdb->prefix}statistics_historical"
53
- );
54
  }
55
  }
44
  delete_option( 'wp_statistics_db_version' );
45
  delete_option( 'wp_statistics_plugin_version' );
46
 
47
+ // Delete the transients.
48
+ delete_transient( 'wps_top_referring' );
49
+ delete_transient( 'wps_excluded_hostname_to_ip_cache' );
50
+
51
  // Delete the user options.
52
  $wpdb->query( "DELETE FROM {$wpdb->prefix}usermeta WHERE meta_key LIKE 'wp_statistics%'" );
53
 
54
  // Drop the tables
55
+ $wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}statistics_useronline, {$wpdb->prefix}statistics_visit, {$wpdb->prefix}statistics_visitor, {$wpdb->prefix}statistics_exclusions, {$wpdb->prefix}statistics_pages, {$wpdb->prefix}statistics_historical, {$wpdb->prefix}statistics_search" );
 
 
56
  }
57
  }
includes/vendor/composer/ca-bundle/res/cacert.pem CHANGED
@@ -1,7 +1,7 @@
1
  ##
2
  ## Bundle of CA Root Certificates
3
  ##
4
- ## Certificate data from Mozilla as of: Wed Mar 7 04:12:06 2018 GMT
5
  ##
6
  ## This is a bundle of X.509 certificates of public Certificate Authorities
7
  ## (CA). These were automatically extracted from Mozilla's root certificates
@@ -14,7 +14,7 @@
14
  ## Just configure this file as the SSLCACertificateFile.
15
  ##
16
  ## Conversion done with mk-ca-bundle.pl version 1.27.
17
- ## SHA256: 704f02707ec6b4c4a7597a8c6039b020def11e64f3ef0605a9c3543d48038a57
18
  ##
19
 
20
 
@@ -2635,30 +2635,6 @@ kbcFgKyLmZJ956LYBws2J+dIeWCKw9cTXPhyQN9Ky8+ZAAoACxGV2lZFA4gKn2fQ1XmxqI1AbQ3C
2635
  ekD6819kR5LLU7m7Wc5P/dAVUwHY3+vZ5nbv0CO7O6l5s9UCKc2Jo5YPSjXnTkLAdc0Hz+Ys63su
2636
  -----END CERTIFICATE-----
2637
 
2638
- TÜRKTRUST Elektronik Sertifika Hizmet Sağlayıcısı H5
2639
- ====================================================
2640
- -----BEGIN CERTIFICATE-----
2641
- MIIEJzCCAw+gAwIBAgIHAI4X/iQggTANBgkqhkiG9w0BAQsFADCBsTELMAkGA1UEBhMCVFIxDzAN
2642
- BgNVBAcMBkFua2FyYTFNMEsGA1UECgxEVMOcUktUUlVTVCBCaWxnaSDEsGxldGnFn2ltIHZlIEJp
2643
- bGnFn2ltIEfDvHZlbmxpxJ9pIEhpem1ldGxlcmkgQS7Fni4xQjBABgNVBAMMOVTDnFJLVFJVU1Qg
2644
- RWxla3Ryb25payBTZXJ0aWZpa2EgSGl6bWV0IFNhxJ9sYXnEsWPEsXPEsSBINTAeFw0xMzA0MzAw
2645
- ODA3MDFaFw0yMzA0MjgwODA3MDFaMIGxMQswCQYDVQQGEwJUUjEPMA0GA1UEBwwGQW5rYXJhMU0w
2646
- SwYDVQQKDERUw5xSS1RSVVNUIEJpbGdpIMSwbGV0acWfaW0gdmUgQmlsacWfaW0gR8O8dmVubGnE
2647
- n2kgSGl6bWV0bGVyaSBBLsWeLjFCMEAGA1UEAww5VMOcUktUUlVTVCBFbGVrdHJvbmlrIFNlcnRp
2648
- ZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxIEg1MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
2649
- CgKCAQEApCUZ4WWe60ghUEoI5RHwWrom/4NZzkQqL/7hzmAD/I0Dpe3/a6i6zDQGn1k19uwsu537
2650
- jVJp45wnEFPzpALFp/kRGml1bsMdi9GYjZOHp3GXDSHHmflS0yxjXVW86B8BSLlg/kJK9siArs1m
2651
- ep5Fimh34khon6La8eHBEJ/rPCmBp+EyCNSgBbGM+42WAA4+Jd9ThiI7/PS98wl+d+yG6w8z5UNP
2652
- 9FR1bSmZLmZaQ9/LXMrI5Tjxfjs1nQ/0xVqhzPMggCTTV+wVunUlm+hkS7M0hO8EuPbJbKoCPrZV
2653
- 4jI3X/xml1/N1p7HIL9Nxqw/dV8c7TKcfGkAaZHjIxhT6QIDAQABo0IwQDAdBgNVHQ4EFgQUVpkH
2654
- HtOsDGlktAxQR95DLL4gwPswDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZI
2655
- hvcNAQELBQADggEBAJ5FdnsXSDLyOIspve6WSk6BGLFRRyDN0GSxDsnZAdkJzsiZ3GglE9Rc8qPo
2656
- BP5yCccLqh0lVX6Wmle3usURehnmp349hQ71+S4pL+f5bFgWV1Al9j4uPqrtd3GqqpmWRgqujuwq
2657
- URawXs3qZwQcWDD1YIq9pr1N5Za0/EKJAWv2cMhQOQwt1WbZyNKzMrcbGW3LM/nfpeYVhDfwwvJl
2658
- lpKQd/Ct9JDpEXjXk4nAPQu6KfTomZ1yju2dL+6SfaHx/126M2CFYv4HAqGEVka+lgqaE9chTLd8
2659
- B59OTj+RdPsnnRHM3eaxynFNExc5JsUpISuTKWqW+qtB4Uu2NQvAmxU=
2660
- -----END CERTIFICATE-----
2661
-
2662
  Certinomis - Root CA
2663
  ====================
2664
  -----BEGIN CERTIFICATE-----
1
  ##
2
  ## Bundle of CA Root Certificates
3
  ##
4
+ ## Certificate data from Mozilla as of: Wed Jun 20 03:12:06 2018 GMT
5
  ##
6
  ## This is a bundle of X.509 certificates of public Certificate Authorities
7
  ## (CA). These were automatically extracted from Mozilla's root certificates
14
  ## Just configure this file as the SSLCACertificateFile.
15
  ##
16
  ## Conversion done with mk-ca-bundle.pl version 1.27.
17
+ ## SHA256: c80f571d9f4ebca4a91e0ad3a546f263153d71afffc845c6f8f52ce9d1a2e8ec
18
  ##
19
 
20
 
2635
  ekD6819kR5LLU7m7Wc5P/dAVUwHY3+vZ5nbv0CO7O6l5s9UCKc2Jo5YPSjXnTkLAdc0Hz+Ys63su
2636
  -----END CERTIFICATE-----
2637
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2638
  Certinomis - Root CA
2639
  ====================
2640
  -----BEGIN CERTIFICATE-----
includes/vendor/composer/installed.json CHANGED
@@ -72,17 +72,17 @@
72
  },
73
  {
74
  "name": "composer/ca-bundle",
75
- "version": "1.1.1",
76
- "version_normalized": "1.1.1.0",
77
  "source": {
78
  "type": "git",
79
  "url": "https://github.com/composer/ca-bundle.git",
80
- "reference": "d2c0a83b7533d6912e8d516756ebd34f893e9169"
81
  },
82
  "dist": {
83
  "type": "zip",
84
- "url": "https://api.github.com/repos/composer/ca-bundle/zipball/d2c0a83b7533d6912e8d516756ebd34f893e9169",
85
- "reference": "d2c0a83b7533d6912e8d516756ebd34f893e9169",
86
  "shasum": ""
87
  },
88
  "require": {
@@ -95,7 +95,7 @@
95
  "psr/log": "^1.0",
96
  "symfony/process": "^2.5 || ^3.0 || ^4.0"
97
  },
98
- "time": "2018-03-29T19:57:20+00:00",
99
  "type": "library",
100
  "extra": {
101
  "branch-alias": {
@@ -923,17 +923,17 @@
923
  },
924
  {
925
  "name": "symfony/console",
926
- "version": "v3.4.12",
927
- "version_normalized": "3.4.12.0",
928
  "source": {
929
  "type": "git",
930
  "url": "https://github.com/symfony/console.git",
931
- "reference": "1b97071a26d028c9bd4588264e101e14f6e7cd00"
932
  },
933
  "dist": {
934
  "type": "zip",
935
- "url": "https://api.github.com/repos/symfony/console/zipball/1b97071a26d028c9bd4588264e101e14f6e7cd00",
936
- "reference": "1b97071a26d028c9bd4588264e101e14f6e7cd00",
937
  "shasum": ""
938
  },
939
  "require": {
@@ -959,7 +959,7 @@
959
  "symfony/lock": "",
960
  "symfony/process": ""
961
  },
962
- "time": "2018-05-23T05:02:55+00:00",
963
  "type": "library",
964
  "extra": {
965
  "branch-alias": {
@@ -994,17 +994,17 @@
994
  },
995
  {
996
  "name": "symfony/debug",
997
- "version": "v3.4.12",
998
- "version_normalized": "3.4.12.0",
999
  "source": {
1000
  "type": "git",
1001
  "url": "https://github.com/symfony/debug.git",
1002
- "reference": "47e6788c5b151cf0cfdf3329116bf33800632d75"
1003
  },
1004
  "dist": {
1005
  "type": "zip",
1006
- "url": "https://api.github.com/repos/symfony/debug/zipball/47e6788c5b151cf0cfdf3329116bf33800632d75",
1007
- "reference": "47e6788c5b151cf0cfdf3329116bf33800632d75",
1008
  "shasum": ""
1009
  },
1010
  "require": {
@@ -1017,7 +1017,7 @@
1017
  "require-dev": {
1018
  "symfony/http-kernel": "~2.8|~3.0|~4.0"
1019
  },
1020
- "time": "2018-06-25T11:10:40+00:00",
1021
  "type": "library",
1022
  "extra": {
1023
  "branch-alias": {
@@ -1052,24 +1052,24 @@
1052
  },
1053
  {
1054
  "name": "symfony/filesystem",
1055
- "version": "v3.4.12",
1056
- "version_normalized": "3.4.12.0",
1057
  "source": {
1058
  "type": "git",
1059
  "url": "https://github.com/symfony/filesystem.git",
1060
- "reference": "8a721a5f2553c6c3482b1c5b22ed60fe94dd63ed"
1061
  },
1062
  "dist": {
1063
  "type": "zip",
1064
- "url": "https://api.github.com/repos/symfony/filesystem/zipball/8a721a5f2553c6c3482b1c5b22ed60fe94dd63ed",
1065
- "reference": "8a721a5f2553c6c3482b1c5b22ed60fe94dd63ed",
1066
  "shasum": ""
1067
  },
1068
  "require": {
1069
  "php": "^5.5.9|>=7.0.8",
1070
  "symfony/polyfill-ctype": "~1.8"
1071
  },
1072
- "time": "2018-06-21T11:10:19+00:00",
1073
  "type": "library",
1074
  "extra": {
1075
  "branch-alias": {
@@ -1104,23 +1104,23 @@
1104
  },
1105
  {
1106
  "name": "symfony/finder",
1107
- "version": "v3.4.12",
1108
- "version_normalized": "3.4.12.0",
1109
  "source": {
1110
  "type": "git",
1111
  "url": "https://github.com/symfony/finder.git",
1112
- "reference": "3a8c3de91d2b2c68cd2d665cf9d00f7ef9eaa394"
1113
  },
1114
  "dist": {
1115
  "type": "zip",
1116
- "url": "https://api.github.com/repos/symfony/finder/zipball/3a8c3de91d2b2c68cd2d665cf9d00f7ef9eaa394",
1117
- "reference": "3a8c3de91d2b2c68cd2d665cf9d00f7ef9eaa394",
1118
  "shasum": ""
1119
  },
1120
  "require": {
1121
  "php": "^5.5.9|>=7.0.8"
1122
  },
1123
- "time": "2018-06-19T20:52:10+00:00",
1124
  "type": "library",
1125
  "extra": {
1126
  "branch-alias": {
@@ -1155,27 +1155,30 @@
1155
  },
1156
  {
1157
  "name": "symfony/polyfill-ctype",
1158
- "version": "v1.8.0",
1159
- "version_normalized": "1.8.0.0",
1160
  "source": {
1161
  "type": "git",
1162
  "url": "https://github.com/symfony/polyfill-ctype.git",
1163
- "reference": "7cc359f1b7b80fc25ed7796be7d96adc9b354bae"
1164
  },
1165
  "dist": {
1166
  "type": "zip",
1167
- "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/7cc359f1b7b80fc25ed7796be7d96adc9b354bae",
1168
- "reference": "7cc359f1b7b80fc25ed7796be7d96adc9b354bae",
1169
  "shasum": ""
1170
  },
1171
  "require": {
1172
  "php": ">=5.3.3"
1173
  },
1174
- "time": "2018-04-30T19:57:29+00:00",
 
 
 
1175
  "type": "library",
1176
  "extra": {
1177
  "branch-alias": {
1178
- "dev-master": "1.8-dev"
1179
  }
1180
  },
1181
  "installation-source": "dist",
@@ -1212,17 +1215,17 @@
1212
  },
1213
  {
1214
  "name": "symfony/polyfill-mbstring",
1215
- "version": "v1.8.0",
1216
- "version_normalized": "1.8.0.0",
1217
  "source": {
1218
  "type": "git",
1219
  "url": "https://github.com/symfony/polyfill-mbstring.git",
1220
- "reference": "3296adf6a6454a050679cde90f95350ad604b171"
1221
  },
1222
  "dist": {
1223
  "type": "zip",
1224
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/3296adf6a6454a050679cde90f95350ad604b171",
1225
- "reference": "3296adf6a6454a050679cde90f95350ad604b171",
1226
  "shasum": ""
1227
  },
1228
  "require": {
@@ -1231,11 +1234,11 @@
1231
  "suggest": {
1232
  "ext-mbstring": "For best performance"
1233
  },
1234
- "time": "2018-04-26T10:06:28+00:00",
1235
  "type": "library",
1236
  "extra": {
1237
  "branch-alias": {
1238
- "dev-master": "1.8-dev"
1239
  }
1240
  },
1241
  "installation-source": "dist",
72
  },
73
  {
74
  "name": "composer/ca-bundle",
75
+ "version": "1.1.2",
76
+ "version_normalized": "1.1.2.0",
77
  "source": {
78
  "type": "git",
79
  "url": "https://github.com/composer/ca-bundle.git",
80
+ "reference": "46afded9720f40b9dc63542af4e3e43a1177acb0"
81
  },
82
  "dist": {
83
  "type": "zip",
84
+ "url": "https://api.github.com/repos/composer/ca-bundle/zipball/46afded9720f40b9dc63542af4e3e43a1177acb0",
85
+ "reference": "46afded9720f40b9dc63542af4e3e43a1177acb0",
86
  "shasum": ""
87
  },
88
  "require": {
95
  "psr/log": "^1.0",
96
  "symfony/process": "^2.5 || ^3.0 || ^4.0"
97
  },
98
+ "time": "2018-08-08T08:57:40+00:00",
99
  "type": "library",
100
  "extra": {
101
  "branch-alias": {
923
  },
924
  {
925
  "name": "symfony/console",
926
+ "version": "v3.4.15",
927
+ "version_normalized": "3.4.15.0",
928
  "source": {
929
  "type": "git",
930
  "url": "https://github.com/symfony/console.git",
931
+ "reference": "6b217594552b9323bcdcfc14f8a0ce126e84cd73"
932
  },
933
  "dist": {
934
  "type": "zip",
935
+ "url": "https://api.github.com/repos/symfony/console/zipball/6b217594552b9323bcdcfc14f8a0ce126e84cd73",
936
+ "reference": "6b217594552b9323bcdcfc14f8a0ce126e84cd73",
937
  "shasum": ""
938
  },
939
  "require": {
959
  "symfony/lock": "",
960
  "symfony/process": ""
961
  },
962
+ "time": "2018-07-26T11:19:56+00:00",
963
  "type": "library",
964
  "extra": {
965
  "branch-alias": {
994
  },
995
  {
996
  "name": "symfony/debug",
997
+ "version": "v3.4.15",
998
+ "version_normalized": "3.4.15.0",
999
  "source": {
1000
  "type": "git",
1001
  "url": "https://github.com/symfony/debug.git",
1002
+ "reference": "c4625e75341e4fb309ce0c049cbf7fb84b8897cd"
1003
  },
1004
  "dist": {
1005
  "type": "zip",
1006
+ "url": "https://api.github.com/repos/symfony/debug/zipball/c4625e75341e4fb309ce0c049cbf7fb84b8897cd",
1007
+ "reference": "c4625e75341e4fb309ce0c049cbf7fb84b8897cd",
1008
  "shasum": ""
1009
  },
1010
  "require": {
1017
  "require-dev": {
1018
  "symfony/http-kernel": "~2.8|~3.0|~4.0"
1019
  },
1020
+ "time": "2018-08-03T10:42:44+00:00",
1021
  "type": "library",
1022
  "extra": {
1023
  "branch-alias": {
1052
  },
1053
  {
1054
  "name": "symfony/filesystem",
1055
+ "version": "v3.4.15",
1056
+ "version_normalized": "3.4.15.0",
1057
  "source": {
1058
  "type": "git",
1059
  "url": "https://github.com/symfony/filesystem.git",
1060
+ "reference": "285ce5005cb01a0aeaa5b0cf590bd0cc40bb631c"
1061
  },
1062
  "dist": {
1063
  "type": "zip",
1064
+ "url": "https://api.github.com/repos/symfony/filesystem/zipball/285ce5005cb01a0aeaa5b0cf590bd0cc40bb631c",
1065
+ "reference": "285ce5005cb01a0aeaa5b0cf590bd0cc40bb631c",
1066
  "shasum": ""
1067
  },
1068
  "require": {
1069
  "php": "^5.5.9|>=7.0.8",
1070
  "symfony/polyfill-ctype": "~1.8"
1071
  },
1072
+ "time": "2018-08-10T07:29:05+00:00",
1073
  "type": "library",
1074
  "extra": {
1075
  "branch-alias": {
1104
  },
1105
  {
1106
  "name": "symfony/finder",
1107
+ "version": "v3.4.15",
1108
+ "version_normalized": "3.4.15.0",
1109
  "source": {
1110
  "type": "git",
1111
  "url": "https://github.com/symfony/finder.git",
1112
+ "reference": "8a84fcb207451df0013b2c74cbbf1b62d47b999a"
1113
  },
1114
  "dist": {
1115
  "type": "zip",
1116
+ "url": "https://api.github.com/repos/symfony/finder/zipball/8a84fcb207451df0013b2c74cbbf1b62d47b999a",
1117
+ "reference": "8a84fcb207451df0013b2c74cbbf1b62d47b999a",
1118
  "shasum": ""
1119
  },
1120
  "require": {
1121
  "php": "^5.5.9|>=7.0.8"
1122
  },
1123
+ "time": "2018-07-26T11:19:56+00:00",
1124
  "type": "library",
1125
  "extra": {
1126
  "branch-alias": {
1155
  },
1156
  {
1157
  "name": "symfony/polyfill-ctype",
1158
+ "version": "v1.9.0",
1159
+ "version_normalized": "1.9.0.0",
1160
  "source": {
1161
  "type": "git",
1162
  "url": "https://github.com/symfony/polyfill-ctype.git",
1163
+ "reference": "e3d826245268269cd66f8326bd8bc066687b4a19"
1164
  },
1165
  "dist": {
1166
  "type": "zip",
1167
+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19",
1168
+ "reference": "e3d826245268269cd66f8326bd8bc066687b4a19",
1169
  "shasum": ""
1170
  },
1171
  "require": {
1172
  "php": ">=5.3.3"
1173
  },
1174
+ "suggest": {
1175
+ "ext-ctype": "For best performance"
1176
+ },
1177
+ "time": "2018-08-06T14:22:27+00:00",
1178
  "type": "library",
1179
  "extra": {
1180
  "branch-alias": {
1181
+ "dev-master": "1.9-dev"
1182
  }
1183
  },
1184
  "installation-source": "dist",
1215
  },
1216
  {
1217
  "name": "symfony/polyfill-mbstring",
1218
+ "version": "v1.9.0",
1219
+ "version_normalized": "1.9.0.0",
1220
  "source": {
1221
  "type": "git",
1222
  "url": "https://github.com/symfony/polyfill-mbstring.git",
1223
+ "reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8"
1224
  },
1225
  "dist": {
1226
  "type": "zip",
1227
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/d0cd638f4634c16d8df4508e847f14e9e43168b8",
1228
+ "reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8",
1229
  "shasum": ""
1230
  },
1231
  "require": {
1234
  "suggest": {
1235
  "ext-mbstring": "For best performance"
1236
  },
1237
+ "time": "2018-08-06T14:22:27+00:00",
1238
  "type": "library",
1239
  "extra": {
1240
  "branch-alias": {
1241
+ "dev-master": "1.9-dev"
1242
  }
1243
  },
1244
  "installation-source": "dist",
includes/vendor/symfony/console/Application.php CHANGED
@@ -11,35 +11,35 @@
11
 
12
  namespace Symfony\Component\Console;
13
 
 
 
 
14
  use Symfony\Component\Console\CommandLoader\CommandLoaderInterface;
 
 
 
 
 
15
  use Symfony\Component\Console\Exception\ExceptionInterface;
 
16
  use Symfony\Component\Console\Formatter\OutputFormatter;
17
  use Symfony\Component\Console\Helper\DebugFormatterHelper;
 
18
  use Symfony\Component\Console\Helper\Helper;
 
19
  use Symfony\Component\Console\Helper\ProcessHelper;
20
  use Symfony\Component\Console\Helper\QuestionHelper;
21
- use Symfony\Component\Console\Input\InputInterface;
22
- use Symfony\Component\Console\Input\StreamableInputInterface;
23
  use Symfony\Component\Console\Input\ArgvInput;
24
  use Symfony\Component\Console\Input\ArrayInput;
25
- use Symfony\Component\Console\Input\InputDefinition;
26
- use Symfony\Component\Console\Input\InputOption;
27
  use Symfony\Component\Console\Input\InputArgument;
28
  use Symfony\Component\Console\Input\InputAwareInterface;
29
- use Symfony\Component\Console\Output\OutputInterface;
 
 
 
30
  use Symfony\Component\Console\Output\ConsoleOutput;
31
  use Symfony\Component\Console\Output\ConsoleOutputInterface;
32
- use Symfony\Component\Console\Command\Command;
33
- use Symfony\Component\Console\Command\HelpCommand;
34
- use Symfony\Component\Console\Command\ListCommand;
35
- use Symfony\Component\Console\Helper\HelperSet;
36
- use Symfony\Component\Console\Helper\FormatterHelper;
37
- use Symfony\Component\Console\Event\ConsoleCommandEvent;
38
- use Symfony\Component\Console\Event\ConsoleErrorEvent;
39
- use Symfony\Component\Console\Event\ConsoleExceptionEvent;
40
- use Symfony\Component\Console\Event\ConsoleTerminateEvent;
41
- use Symfony\Component\Console\Exception\CommandNotFoundException;
42
- use Symfony\Component\Console\Exception\LogicException;
43
  use Symfony\Component\Debug\ErrorHandler;
44
  use Symfony\Component\Debug\Exception\FatalThrowableError;
45
  use Symfony\Component\EventDispatcher\EventDispatcherInterface;
@@ -131,7 +131,7 @@ class Application
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);
@@ -451,11 +451,11 @@ class Application
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;
@@ -552,7 +552,7 @@ class Application
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,8 +564,8 @@ class Application
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
 
@@ -598,7 +598,7 @@ class Application
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,7 +607,7 @@ class Application
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,18 +619,18 @@ class Application
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;
@@ -710,7 +710,7 @@ class Application
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
  }
@@ -739,7 +739,7 @@ class Application
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;
@@ -747,7 +747,7 @@ class Application
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();
@@ -783,7 +783,7 @@ class Application
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'];
@@ -807,7 +807,7 @@ class Application
807
  */
808
  protected function getTerminalWidth()
809
  {
810
- @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);
811
 
812
  return $this->terminal->getWidth();
813
  }
@@ -821,7 +821,7 @@ class Application
821
  */
822
  protected function getTerminalHeight()
823
  {
824
- @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);
825
 
826
  return $this->terminal->getHeight();
827
  }
@@ -835,7 +835,7 @@ class Application
835
  */
836
  public function getTerminalDimensions()
837
  {
838
- @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);
839
 
840
  return array($this->terminal->getWidth(), $this->terminal->getHeight());
841
  }
@@ -854,7 +854,7 @@ class Application
854
  */
855
  public function setTerminalDimensions($width, $height)
856
  {
857
- @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);
858
 
859
  putenv('COLUMNS='.$width);
860
  putenv('LINES='.$height);
@@ -875,7 +875,7 @@ class Application
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) {
@@ -1079,7 +1079,7 @@ class Application
1079
  $parts = explode(':', $name);
1080
  array_pop($parts);
1081
 
1082
- return implode(':', null === $limit ? $parts : array_slice($parts, 0, $limit));
1083
  }
1084
 
1085
  /**
@@ -1112,7 +1112,7 @@ class Application
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,7 +1122,7 @@ class Application
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,7 +1178,7 @@ class Application
1178
  $line = $char;
1179
  }
1180
 
1181
- $lines[] = count($lines) ? str_pad($line, $width) : $line;
1182
 
1183
  mb_convert_variables($encoding, 'utf8', $lines);
1184
 
@@ -1199,7 +1199,7 @@ class Application
1199
  $namespaces = array();
1200
 
1201
  foreach ($parts as $part) {
1202
- if (count($namespaces)) {
1203
  $namespaces[] = end($namespaces).':'.$part;
1204
  } else {
1205
  $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;
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);
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;
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
 
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;
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
  }
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;
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();
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'];
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) {
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;
includes/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\Input\InputDefinition;
16
- use Symfony\Component\Console\Input\InputOption;
 
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.
@@ -55,7 +55,7 @@ class Command
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;
@@ -217,15 +217,15 @@ class Command
217
  $this->initialize($input, $output);
218
 
219
  if (null !== $this->processTitle) {
220
- if (function_exists('cli_set_process_title')) {
221
  if (!@cli_set_process_title($this->processTitle)) {
222
  if ('Darwin' === PHP_OS) {
223
- $output->writeln('<comment>Running "cli_get_process_title" as an unprivileged user is not supported on MacOS.</comment>');
224
  } else {
225
  cli_set_process_title($this->processTitle);
226
  }
227
  }
228
- } elseif (function_exists('setproctitle')) {
229
  setproctitle($this->processTitle);
230
  } elseif (OutputInterface::VERBOSITY_VERY_VERBOSE === $output->getVerbosity()) {
231
  $output->writeln('<comment>Install the proctitle PECL to be able to change the process title.</comment>');
@@ -246,7 +246,7 @@ class Command
246
  $input->validate();
247
 
248
  if ($this->code) {
249
- $statusCode = call_user_func($this->code, $input, $output);
250
  } else {
251
  $statusCode = $this->execute($input, $output);
252
  }
@@ -550,7 +550,7 @@ class Command
550
  */
551
  public function setAliases($aliases)
552
  {
553
- if (!is_array($aliases) && !$aliases instanceof \Traversable) {
554
  throw new InvalidArgumentException('$aliases must be an array or an instance of \Traversable');
555
  }
556
 
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.
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;
217
  $this->initialize($input, $output);
218
 
219
  if (null !== $this->processTitle) {
220
+ if (\function_exists('cli_set_process_title')) {
221
  if (!@cli_set_process_title($this->processTitle)) {
222
  if ('Darwin' === PHP_OS) {
223
+ $output->writeln('<comment>Running "cli_set_process_title" as an unprivileged user is not supported on MacOS.</comment>', OutputInterface::VERBOSITY_VERY_VERBOSE);
224
  } else {
225
  cli_set_process_title($this->processTitle);
226
  }
227
  }
228
+ } elseif (\function_exists('setproctitle')) {
229
  setproctitle($this->processTitle);
230
  } elseif (OutputInterface::VERBOSITY_VERY_VERBOSE === $output->getVerbosity()) {
231
  $output->writeln('<comment>Install the proctitle PECL to be able to change the process title.</comment>');
246
  $input->validate();
247
 
248
  if ($this->code) {
249
+ $statusCode = \call_user_func($this->code, $input, $output);
250
  } else {
251
  $statusCode = $this->execute($input, $output);
252
  }
550
  */
551
  public function setAliases($aliases)
552
  {
553
+ if (!\is_array($aliases) && !$aliases instanceof \Traversable) {
554
  throw new InvalidArgumentException('$aliases must be an array or an instance of \Traversable');
555
  }
556
 
includes/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
  /**
includes/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\InputOption;
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.
includes/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
 
includes/vendor/symfony/console/Descriptor/MarkdownDescriptor.php CHANGED
@@ -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
  }
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
  }
includes/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() && (!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,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() && (!is_array($option->getDefault()) || count($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
  }
includes/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));
@@ -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));
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)) {
includes/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
  }
includes/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
  }
includes/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
  }
@@ -143,7 +143,7 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface
143
  ));
144
  }
145
 
146
- if (!in_array(static::$availableOptions[$option], $this->options)) {
147
  $this->options[] = static::$availableOptions[$option];
148
  }
149
  }
@@ -203,14 +203,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
  }
143
  ));
144
  }
145
 
146
+ if (!\in_array(static::$availableOptions[$option], $this->options)) {
147
  $this->options[] = static::$availableOptions[$option];
148
  }
149
  }
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
 
includes/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
  /**
includes/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
  }
includes/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.
includes/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 (!is_array($messages)) {
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
 
includes/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
 
includes/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
 
includes/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.
includes/vendor/symfony/console/Helper/ProcessHelper.php CHANGED
@@ -121,7 +121,7 @@ class ProcessHelper extends Helper
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
  }
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
  }
includes/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 {
includes/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;
includes/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 (!is_resource($stream)) {
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
 
@@ -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) {
@@ -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
 
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) {
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) {
includes/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.
@@ -40,7 +40,7 @@ class SymfonyQuestionHelper extends QuestionHelper
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.');
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.
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.');
includes/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) && !is_array($headers[0])) {
214
  $headers = array($headers);
215
  }
216
 
@@ -243,7 +243,7 @@ class Table
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
 
@@ -375,7 +375,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 +414,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
@@ -461,15 +461,15 @@ class Table
461
  {
462
  $unmergedRows = array();
463
  foreach ($rows[$line] as $column => $cell) {
464
- if (null !== $cell && !$cell instanceof TableCell && !is_scalar($cell) && !(is_object($cell) && method_exists($cell, '__toString'))) {
465
- throw new InvalidArgumentException(sprintf('A cell must be a TableCell, a scalar or an object implementing __toString, %s given.', gettype($cell)));
466
  }
467
  if ($cell instanceof TableCell && $cell->getRowspan() > 1) {
468
  $nbLines = $cell->getRowspan() - 1;
469
  $lines = array($cell);
470
  if (strstr($cell, "\n")) {
471
  $lines = explode("\n", str_replace("\n", "<fg=default;bg=default>\n</>", $cell));
472
- $nbLines = count($lines) > $nbLines ? substr_count($cell, "\n") : $nbLines;
473
 
474
  $rows[$line][$column] = new TableCell($lines[0], array('colspan' => $cell->getColspan()));
475
  unset($lines[0]);
@@ -489,7 +489,7 @@ class Table
489
 
490
  foreach ($unmergedRows as $unmergedRowKey => $unmergedRow) {
491
  // we need to know if $unmergedRow will be merged or inserted into $rows
492
- if (isset($rows[$unmergedRowKey]) && is_array($rows[$unmergedRowKey]) && ($this->getNumberOfColumns($rows[$unmergedRowKey]) + $this->getNumberOfColumns($unmergedRows[$unmergedRowKey]) <= $this->numberOfColumns)) {
493
  foreach ($unmergedRow as $cellKey => $cell) {
494
  // insert cell into row at cellKey position
495
  array_splice($rows[$unmergedRowKey], $cellKey, 0, array($cell));
@@ -555,7 +555,7 @@ class Table
555
  */
556
  private function getNumberOfColumns(array $row)
557
  {
558
- $columns = count($row);
559
  foreach ($row as $column) {
560
  $columns += $column instanceof TableCell ? ($column->getColspan() - 1) : 0;
561
  }
@@ -609,7 +609,7 @@ class Table
609
  $lengths[] = $this->getCellWidth($row, $column);
610
  }
611
 
612
- $this->effectiveColumnWidths[$column] = max($lengths) + strlen($this->style->getCellRowContentFormat()) - 2;
613
  }
614
  }
615
 
@@ -620,7 +620,7 @@ class Table
620
  */
621
  private function getColumnSeparatorWidth()
622
  {
623
- return strlen(sprintf($this->style->getBorderFormat(), $this->style->getVerticalBorderChar()));
624
  }
625
 
626
  /**
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
 
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
  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
461
  {
462
  $unmergedRows = array();
463
  foreach ($rows[$line] as $column => $cell) {
464
+ if (null !== $cell && !$cell instanceof TableCell && !is_scalar($cell) && !(\is_object($cell) && method_exists($cell, '__toString'))) {
465
+ throw new InvalidArgumentException(sprintf('A cell must be a TableCell, a scalar or an object implementing __toString, %s given.', \gettype($cell)));
466
  }
467
  if ($cell instanceof TableCell && $cell->getRowspan() > 1) {
468
  $nbLines = $cell->getRowspan() - 1;
469
  $lines = array($cell);
470
  if (strstr($cell, "\n")) {
471
  $lines = explode("\n", str_replace("\n", "<fg=default;bg=default>\n</>", $cell));
472
+ $nbLines = \count($lines) > $nbLines ? substr_count($cell, "\n") : $nbLines;
473
 
474
  $rows[$line][$column] = new TableCell($lines[0], array('colspan' => $cell->getColspan()));
475
  unset($lines[0]);
489
 
490
  foreach ($unmergedRows as $unmergedRowKey => $unmergedRow) {
491
  // we need to know if $unmergedRow will be merged or inserted into $rows
492
+ if (isset($rows[$unmergedRowKey]) && \is_array($rows[$unmergedRowKey]) && ($this->getNumberOfColumns($rows[$unmergedRowKey]) + $this->getNumberOfColumns($unmergedRows[$unmergedRowKey]) <= $this->numberOfColumns)) {
493
  foreach ($unmergedRow as $cellKey => $cell) {
494
  // insert cell into row at cellKey position
495
  array_splice($rows[$unmergedRowKey], $cellKey, 0, array($cell));
555
  */
556
  private function getNumberOfColumns(array $row)
557
  {
558
+ $columns = \count($row);
559
  foreach ($row as $column) {
560
  $columns += $column instanceof TableCell ? ($column->getColspan() - 1) : 0;
561
  }
609
  $lengths[] = $this->getCellWidth($row, $column);
610
  }
611
 
612
+ $this->effectiveColumnWidths[$column] = max($lengths) + \strlen($this->style->getCellRowContentFormat()) - 2;
613
  }
614
  }
615
 
620
  */
621
  private function getColumnSeparatorWidth()
622
  {
623
+ return \strlen(sprintf($this->style->getBorderFormat(), $this->style->getVerticalBorderChar()));
624
  }
625
 
626
  /**
includes/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) && !is_string($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
 
includes/vendor/symfony/console/Helper/TableStyle.php CHANGED
@@ -237,7 +237,7 @@ class TableStyle
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
 
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
 
includes/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,7 +118,7 @@ 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
  throw new RuntimeException(sprintf('The "-%s" option does not exist.', $name[$i]));
@@ -145,7 +145,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 +168,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 +183,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 +228,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);
@@ -303,10 +303,10 @@ class ArgvInput extends Input
303
  $values = (array) $values;
304
  $tokens = $this->tokens;
305
 
306
- while (0 < count($tokens)) {
307
  $token = array_shift($tokens);
308
  if ($onlyParams && '--' === $token) {
309
- return false;
310
  }
311
 
312
  foreach ($values as $value) {
@@ -318,7 +318,7 @@ class ArgvInput extends Input
318
  // For short options, test for '-o' at beginning
319
  $leading = 0 === strpos($value, '--') ? $value.'=' : $value;
320
  if ('' !== $leading && 0 === strpos($token, $leading)) {
321
- return substr($token, strlen($leading));
322
  }
323
  }
324
  }
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
  throw new RuntimeException(sprintf('The "-%s" option does not exist.', $name[$i]));
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
  */
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
  // 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
  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);
303
  $values = (array) $values;
304
  $tokens = $this->tokens;
305
 
306
+ while (0 < \count($tokens)) {
307
  $token = array_shift($tokens);
308
  if ($onlyParams && '--' === $token) {
309
+ return $default;
310
  }
311
 
312
  foreach ($values as $value) {
318
  // For short options, test for '-o' at beginning
319
  $leading = 0 === strpos($value, '--') ? $value.'=' : $value;
320
  if ('' !== $leading && 0 === strpos($token, $leading)) {
321
+ return substr($token, \strlen($leading));
322
  }
323
  }
324
  }
includes/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 (!is_int($k)) {
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 false;
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) ? implode(' ', 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
 
includes/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
  }
includes/vendor/symfony/console/Input/InputArgument.php CHANGED
@@ -42,7 +42,7 @@ class InputArgument
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
 
@@ -99,7 +99,7 @@ class InputArgument
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
  }
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
 
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
  }
includes/vendor/symfony/console/Input/InputDefinition.php CHANGED
@@ -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
 
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
 
includes/vendor/symfony/console/Input/InputOption.php CHANGED
@@ -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 (!is_int($mode) || $mode > 15 || $mode < 1) {
74
  throw new InvalidArgumentException(sprintf('Option mode "%s" is not valid.', $mode));
75
  }
76
 
@@ -162,7 +162,7 @@ class InputOption
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
  }
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
 
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
  }
includes/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;
includes/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.
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.
includes/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
  );
includes/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.
includes/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 lines 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,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 lines of 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);
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);
includes/vendor/symfony/console/Output/StreamOutput.php CHANGED
@@ -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 (!is_resource($stream) || 'stream' !== get_resource_type($stream)) {
46
  throw new InvalidArgumentException('The StreamOutput class needs a stream as its first argument.');
47
  }
48
 
@@ -93,19 +93,23 @@ class StreamOutput extends Output
93
  */
94
  protected function hasColorSupport()
95
  {
96
- if (DIRECTORY_SEPARATOR === '\\') {
97
- return (function_exists('sapi_windows_vt100_support')
 
 
 
 
98
  && @sapi_windows_vt100_support($this->stream))
99
  || false !== getenv('ANSICON')
100
  || 'ON' === getenv('ConEmuANSI')
101
  || 'xterm' === getenv('TERM');
102
  }
103
 
104
- if (function_exists('stream_isatty')) {
105
  return @stream_isatty($this->stream);
106
  }
107
 
108
- if (function_exists('posix_isatty')) {
109
  return @posix_isatty($this->stream);
110
  }
111
 
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
 
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
 
includes/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
 
includes/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
 
includes/vendor/symfony/console/Question/Question.php CHANGED
@@ -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 && !is_array($values) && !$values instanceof \Traversable) {
144
  throw new InvalidArgumentException('Autocompleter values can be either an array, `null` or a `Traversable` object.');
145
  }
146
 
@@ -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
  }
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
 
241
 
242
  protected function isAssoc($array)
243
  {
244
+ return (bool) \count(array_filter(array_keys($array), 'is_string'));
245
  }
246
  }
includes/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.
includes/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
  }
includes/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 (!function_exists('proc_open')) {
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 (!function_exists('proc_open')) {
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]);
includes/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.
includes/vendor/symfony/console/Tests/ApplicationTest.php CHANGED
@@ -16,24 +16,24 @@ 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\Helper\HelperSet;
 
 
 
 
20
  use Symfony\Component\Console\Helper\FormatterHelper;
 
21
  use Symfony\Component\Console\Input\ArgvInput;
22
  use Symfony\Component\Console\Input\ArrayInput;
23
- use Symfony\Component\Console\Input\InputInterface;
24
  use Symfony\Component\Console\Input\InputArgument;
25
  use Symfony\Component\Console\Input\InputDefinition;
 
26
  use Symfony\Component\Console\Input\InputOption;
27
  use Symfony\Component\Console\Output\NullOutput;
28
  use Symfony\Component\Console\Output\Output;
29
  use Symfony\Component\Console\Output\OutputInterface;
30
  use Symfony\Component\Console\Output\StreamOutput;
31
  use Symfony\Component\Console\Tester\ApplicationTester;
32
- use Symfony\Component\Console\Event\ConsoleCommandEvent;
33
- use Symfony\Component\Console\Event\ConsoleErrorEvent;
34
- use Symfony\Component\Console\Event\ConsoleExceptionEvent;
35
- use Symfony\Component\Console\Event\ConsoleTerminateEvent;
36
- use Symfony\Component\Console\Exception\CommandNotFoundException;
37
  use Symfony\Component\DependencyInjection\ContainerBuilder;
38
  use Symfony\Component\EventDispatcher\EventDispatcher;
39
 
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
 
includes/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\InputOption;
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
@@ -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
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
  }
includes/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\Tester\CommandTester;
16
  use Symfony\Component\Console\Command\HelpCommand;
17
  use Symfony\Component\Console\Command\ListCommand;
18
- use Symfony\Component\Console\Application;
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
  {
includes/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
  {
includes/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
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
includes/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) {
includes/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
  {
includes/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
  {
includes/vendor/symfony/console/Tests/Helper/ProcessHelperTest.php CHANGED
@@ -14,8 +14,8 @@ 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
 
21
  class ProcessHelperTest extends TestCase
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
includes/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
  /**
includes/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;
@@ -221,7 +221,7 @@ class QuestionHelperTest extends AbstractQuestionHelperTest
221
 
222
  public function testAskHiddenResponse()
223
  {
224
- if ('\\' === DIRECTORY_SEPARATOR) {
225
  $this->markTestSkipped('This test is not supported on Windows');
226
  }
227
 
@@ -276,7 +276,7 @@ class QuestionHelperTest extends AbstractQuestionHelperTest
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,7 +637,7 @@ class QuestionHelperTest extends AbstractQuestionHelperTest
637
  */
638
  public function testLegacyAskHiddenResponse()
639
  {
640
- if ('\\' === DIRECTORY_SEPARATOR) {
641
  $this->markTestSkipped('This test is not supported on Windows');
642
  }
643
 
@@ -688,7 +688,7 @@ class QuestionHelperTest extends AbstractQuestionHelperTest
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
 
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;
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
 
includes/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
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
includes/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
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
includes/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
@@ -395,25 +395,26 @@ class ArgvInputTest extends TestCase
395
  /**
396
  * @dataProvider provideGetParameterOptionValues
397
  */
398
- public function testGetParameterOptionEqualSign($argv, $key, $onlyParams, $expected)
399
  {
400
  $input = new ArgvInput($argv);
401
- $this->assertEquals($expected, $input->getParameterOption($key, false, $onlyParams), '->getParameterOption() returns the expected value');
402
  }
403
 
404
  public function provideGetParameterOptionValues()
405
  {
406
  return array(
407
- array(array('app/console', 'foo:bar', '-e', 'dev'), '-e', false, 'dev'),
408
- array(array('app/console', 'foo:bar', '--env=dev'), '--env', false, 'dev'),
409
- array(array('app/console', 'foo:bar', '-e', 'dev'), array('-e', '--env'), false, 'dev'),
410
- array(array('app/console', 'foo:bar', '--env=dev'), array('-e', '--env'), false, 'dev'),
411
- array(array('app/console', 'foo:bar', '--env=dev', '--en=1'), array('--en'), false, '1'),
412
- array(array('app/console', 'foo:bar', '--env=dev', '', '--en=1'), array('--en'), false, '1'),
413
- array(array('app/console', 'foo:bar', '--env', 'val'), '--env', false, 'val'),
414
- array(array('app/console', 'foo:bar', '--env', 'val', '--dummy'), '--env', false, 'val'),
415
- array(array('app/console', 'foo:bar', '--', '--env=dev'), '--env', false, 'dev'),
416
- array(array('app/console', 'foo:bar', '--', '--env=dev'), '--env', true, false),
 
417
  );
418
  }
419
 
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
395
  /**
396
  * @dataProvider provideGetParameterOptionValues
397
  */
398
+ public function testGetParameterOptionEqualSign($argv, $key, $default, $onlyParams, $expected)
399
  {
400
  $input = new ArgvInput($argv);
401
+ $this->assertEquals($expected, $input->getParameterOption($key, $default, $onlyParams), '->getParameterOption() returns the expected value');
402
  }
403
 
404
  public function provideGetParameterOptionValues()
405
  {
406
  return array(
407
+ array(array('app/console', 'foo:bar'), '-e', 'default', false, 'default'),
408
+ array(array('app/console', 'foo:bar', '-e', 'dev'), '-e', 'default', false, 'dev'),
409
+ array(array('app/console', 'foo:bar', '--env=dev'), '--env', 'default', false, 'dev'),
410
+ array(array('app/console', 'foo:bar', '-e', 'dev'), array('-e', '--env'), 'default', false, 'dev'),
411
+ array(array('app/console', 'foo:bar', '--env=dev'), array('-e', '--env'), 'default', false, 'dev'),
412
+ array(array('app/console', 'foo:bar', '--env=dev', '--en=1'), array('--en'), 'default', false, '1'),
413
+ array(array('app/console', 'foo:bar', '--env=dev', '', '--en=1'), array('--en'), 'default', false, '1'),
414
+ array(array('app/console', 'foo:bar', '--env', 'val'), '--env', 'default', false, 'val'),
415
+ array(array('app/console', 'foo:bar', '--env', 'val', '--dummy'), '--env', 'default', false, 'val'),
416
+ array(array('app/console', 'foo:bar', '--', '--env=dev'), '--env', 'default', false, 'dev'),
417
+ array(array('app/console', 'foo:bar', '--', '--env=dev'), '--env', 'default', true, 'default'),
418
  );
419
  }
420
 
includes/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->assertFalse($input->getParameterOption('--bar'), '->getParameterOption() returns the default 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->assertFalse($input->getParameterOption('--bar', false, true), '->getParameterOption() returns false if an option is present in the passed parameters after an end of options signal');
58
  }
59
 
60
  public function testParseArguments()
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()
includes/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
includes/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
includes/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.
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.
includes/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
  {
includes/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
  {
includes/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
  {
includes/vendor/symfony/debug/Debug.php CHANGED
@@ -42,7 +42,7 @@ class Debug
42
  error_reporting(E_ALL);
43
  }
44
 
45
- if (!\in_array(PHP_SAPI, array('cli', 'phpdbg'), true)) {
46
  ini_set('display_errors', 0);
47
  ExceptionHandler::register();
48
  } elseif ($displayErrors && (!ini_get('log_errors') || ini_get('error_log'))) {
42
  error_reporting(E_ALL);
43
  }
44
 
45
+ if (!\in_array(\PHP_SAPI, array('cli', 'phpdbg'), true)) {
46
  ini_set('display_errors', 0);
47
  ExceptionHandler::register();
48
  } elseif ($displayErrors && (!ini_get('log_errors') || ini_get('error_log'))) {
includes/vendor/symfony/debug/DebugClassLoader.php CHANGED
@@ -40,11 +40,11 @@ class DebugClassLoader
40
  public function __construct(callable $classLoader)
41
  {
42
  $this->classLoader = $classLoader;
43
- $this->isFinder = is_array($classLoader) && method_exists($classLoader[0], 'findFile');
44
 
45
  if (!isset(self::$caseCheck)) {
46
- $file = file_exists(__FILE__) ? __FILE__ : rtrim(realpath('.'), DIRECTORY_SEPARATOR);
47
- $i = strrpos($file, DIRECTORY_SEPARATOR);
48
  $dir = substr($file, 0, 1 + $i);
49
  $file = substr($file, 1 + $i);
50
  $test = strtoupper($file) === $file ? strtolower($file) : strtoupper($file);
@@ -53,7 +53,7 @@ class DebugClassLoader
53
  if (false === $test || false === $i) {
54
  // filesystem is case sensitive
55
  self::$caseCheck = 0;
56
- } elseif (substr($test, -strlen($file)) === $file) {
57
  // filesystem is case insensitive and realpath() normalizes the case of characters
58
  self::$caseCheck = 1;
59
  } elseif (false !== stripos(PHP_OS, 'darwin')) {
@@ -85,7 +85,7 @@ class DebugClassLoader
85
  class_exists('Symfony\Component\Debug\ErrorHandler');
86
  class_exists('Psr\Log\LogLevel');
87
 
88
- if (!is_array($functions = spl_autoload_functions())) {
89
  return;
90
  }
91
 
@@ -94,7 +94,7 @@ class DebugClassLoader
94
  }
95
 
96
  foreach ($functions as $function) {
97
- if (!is_array($function) || !$function[0] instanceof self) {
98
  $function = array(new static($function), 'loadClass');
99
  }
100
 
@@ -107,7 +107,7 @@ class DebugClassLoader
107
  */
108
  public static function disable()
109
  {
110
- if (!is_array($functions = spl_autoload_functions())) {
111
  return;
112
  }
113
 
@@ -116,7 +116,7 @@ class DebugClassLoader
116
  }
117
 
118
  foreach ($functions as $function) {
119
- if (is_array($function) && $function[0] instanceof self) {
120
  $function = $function[0]->getClassLoader();
121
  }
122
 
@@ -150,7 +150,7 @@ class DebugClassLoader
150
  }
151
  }
152
  } else {
153
- call_user_func($this->classLoader, $class);
154
  $file = false;
155
  }
156
  } finally {
@@ -294,10 +294,10 @@ class DebugClassLoader
294
  }
295
  if (self::$caseCheck) {
296
  $real = explode('\\', $class.strrchr($file, '.'));
297
- $tail = explode(DIRECTORY_SEPARATOR, str_replace('/', DIRECTORY_SEPARATOR, $file));
298
 
299
- $i = count($tail) - 1;
300
- $j = count($real) - 1;
301
 
302
  while (isset($tail[$i], $real[$j]) && $tail[$i] === $real[$j]) {
303
  --$i;
@@ -307,8 +307,8 @@ class DebugClassLoader
307
  array_splice($tail, 0, $i + 1);
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) {
@@ -333,7 +333,7 @@ class DebugClassLoader
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];
40
  public function __construct(callable $classLoader)
41
  {
42
  $this->classLoader = $classLoader;
43
+ $this->isFinder = \is_array($classLoader) && method_exists($classLoader[0], 'findFile');
44
 
45
  if (!isset(self::$caseCheck)) {
46
+ $file = file_exists(__FILE__) ? __FILE__ : rtrim(realpath('.'), \DIRECTORY_SEPARATOR);
47
+ $i = strrpos($file, \DIRECTORY_SEPARATOR);
48
  $dir = substr($file, 0, 1 + $i);
49
  $file = substr($file, 1 + $i);
50
  $test = strtoupper($file) === $file ? strtolower($file) : strtoupper($file);
53
  if (false === $test || false === $i) {
54
  // filesystem is case sensitive
55
  self::$caseCheck = 0;
56
+ } elseif (substr($test, -\strlen($file)) === $file) {
57
  // filesystem is case insensitive and realpath() normalizes the case of characters
58
  self::$caseCheck = 1;
59
  } elseif (false !== stripos(PHP_OS, 'darwin')) {
85
  class_exists('Symfony\Component\Debug\ErrorHandler');
86
  class_exists('Psr\Log\LogLevel');
87
 
88
+ if (!\is_array($functions = spl_autoload_functions())) {
89
  return;
90
  }
91
 
94
  }
95
 
96
  foreach ($functions as $function) {
97
+ if (!\is_array($function) || !$function[0] instanceof self) {
98
  $function = array(new static($function), 'loadClass');
99
  }
100
 
107
  */
108
  public static function disable()
109
  {
110
+ if (!\is_array($functions = spl_autoload_functions())) {
111
  return;
112
  }
113
 
116
  }
117
 
118
  foreach ($functions as $function) {
119
+ if (\is_array($function) && $function[0] instanceof self) {
120
  $function = $function[0]->getClassLoader();
121
  }
122
 
150
  }
151
  }
152
  } else {
153
+ \call_user_func($this->classLoader, $class);
154
  $file = false;
155
  }
156
  } finally {
294
  }
295
  if (self::$caseCheck) {
296
  $real = explode('\\', $class.strrchr($file, '.'));
297
+ $tail = explode(\DIRECTORY_SEPARATOR, str_replace('/', \DIRECTORY_SEPARATOR, $file));
298
 
299
+ $i = \count($tail) - 1;
300
+ $j = \count($real) - 1;
301
 
302
  while (isset($tail[$i], $real[$j]) && $tail[$i] === $real[$j]) {
303
  --$i;
307
  array_splice($tail, 0, $i + 1);
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) {
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];
includes/vendor/symfony/debug/ErrorHandler.php CHANGED
@@ -11,17 +11,17 @@
11
 
12
  namespace Symfony\Component\Debug;
13
 
14
- use Psr\Log\LogLevel;
15
  use Psr\Log\LoggerInterface;
 
16
  use Symfony\Component\Debug\Exception\ContextErrorException;
17
  use Symfony\Component\Debug\Exception\FatalErrorException;
18
  use Symfony\Component\Debug\Exception\FatalThrowableError;
19
  use Symfony\Component\Debug\Exception\OutOfMemoryException;
20
  use Symfony\Component\Debug\Exception\SilencedErrorContext;
21
- use Symfony\Component\Debug\FatalErrorHandler\UndefinedFunctionFatalErrorHandler;
22
- use Symfony\Component\Debug\FatalErrorHandler\UndefinedMethodFatalErrorHandler;
23
  use Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler;
24
  use Symfony\Component\Debug\FatalErrorHandler\FatalErrorHandlerInterface;
 
 
25
 
26
  /**
27
  * A generic ErrorHandler for the PHP engine.
@@ -130,17 +130,17 @@ class ErrorHandler
130
  $handler->isRoot = true;
131
  }
132
 
133
- if ($handlerIsNew && is_array($prev) && $prev[0] instanceof self) {
134
  $handler = $prev[0];
135
  $replace = false;
136
  }
137
  if (!$replace && $prev) {
138
  restore_error_handler();
139
- $handlerIsRegistered = is_array($prev) && $handler === $prev[0];
140
  } else {
141
  $handlerIsRegistered = true;
142
  }
143
- if (is_array($prev = set_exception_handler(array($handler, 'handleException'))) && $prev[0] instanceof self) {
144
  restore_exception_handler();
145
  if (!$handlerIsRegistered) {
146
  $handler = $prev[0];
@@ -180,7 +180,7 @@ class ErrorHandler
180
  {
181
  $loggers = array();
182
 
183
- if (is_array($levels)) {
184
  foreach ($levels as $type => $logLevel) {
185
  if (empty($this->loggers[$type][0]) || $replace || $this->loggers[$type][0] === $this->bootstrappingLogger) {
186
  $loggers[$type] = array($logger, $logLevel);
@@ -220,7 +220,7 @@ class ErrorHandler
220
  if (!isset($prev[$type])) {
221
  throw new \InvalidArgumentException('Unknown error type: '.$type);
222
  }
223
- if (!is_array($log)) {
224
  $log = array($log);
225
  } elseif (!array_key_exists(0, $log)) {
226
  throw new \InvalidArgumentException('No logger provided');
@@ -353,7 +353,7 @@ class ErrorHandler
353
  {
354
  if ($prev !== $this->thrownErrors | $this->loggedErrors) {
355
  $handler = set_error_handler('var_dump');
356
- $handler = is_array($handler) ? $handler[0] : null;
357
  restore_error_handler();
358
  if ($handler === $this) {
359
  restore_error_handler();
@@ -396,7 +396,7 @@ class ErrorHandler
396
  }
397
  $scope = $this->scopedErrors & $type;
398
 
399
- if (4 < $numArgs = func_num_args()) {
400
  $context = $scope ? (func_get_arg(4) ?: array()) : array();
401
  $backtrace = 5 < $numArgs ? func_get_arg(5) : null; // defined on HHVM
402
  } else {
@@ -616,7 +616,7 @@ class ErrorHandler
616
  $previousHandler = null;
617
  $sameHandlerLimit = 10;
618
 
619
- while (!is_array($handler) || !$handler[0] instanceof self) {
620
  $handler = set_exception_handler('var_dump');
621
  restore_exception_handler();
622
 
@@ -757,7 +757,7 @@ class ErrorHandler
757
 
758
  for ($i = 0; isset($backtrace[$i]); ++$i) {
759
  if (isset($backtrace[$i]['file'], $backtrace[$i]['line']) && $backtrace[$i]['line'] === $line && $backtrace[$i]['file'] === $file) {
760
- $lightTrace = array_slice($lightTrace, 1 + $i);
761
  break;
762
  }
763
  }
11
 
12
  namespace Symfony\Component\Debug;
13
 
 
14
  use Psr\Log\LoggerInterface;
15
+ use Psr\Log\LogLevel;
16
  use Symfony\Component\Debug\Exception\ContextErrorException;
17
  use Symfony\Component\Debug\Exception\FatalErrorException;
18
  use Symfony\Component\Debug\Exception\FatalThrowableError;
19
  use Symfony\Component\Debug\Exception\OutOfMemoryException;
20
  use Symfony\Component\Debug\Exception\SilencedErrorContext;
 
 
21
  use Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler;
22
  use Symfony\Component\Debug\FatalErrorHandler\FatalErrorHandlerInterface;
23
+ use Symfony\Component\Debug\FatalErrorHandler\UndefinedFunctionFatalErrorHandler;
24
+ use Symfony\Component\Debug\FatalErrorHandler\UndefinedMethodFatalErrorHandler;
25
 
26
  /**
27
  * A generic ErrorHandler for the PHP engine.
130
  $handler->isRoot = true;
131
  }
132
 
133
+ if ($handlerIsNew && \is_array($prev) && $prev[0] instanceof self) {
134
  $handler = $prev[0];
135
  $replace = false;
136
  }
137
  if (!$replace && $prev) {
138
  restore_error_handler();
139
+ $handlerIsRegistered = \is_array($prev) && $handler === $prev[0];
140
  } else {
141
  $handlerIsRegistered = true;
142
  }
143
+ if (\is_array($prev = set_exception_handler(array($handler, 'handleException'))) && $prev[0] instanceof self) {
144
  restore_exception_handler();
145
  if (!$handlerIsRegistered) {
146
  $handler = $prev[0];
180
  {
181
  $loggers = array();
182
 
183
+ if (\is_array($levels)) {
184
  foreach ($levels as $type => $logLevel) {
185
  if (empty($this->loggers[$type][0]) || $replace || $this->loggers[$type][0] === $this->bootstrappingLogger) {
186
  $loggers[$type] = array($logger, $logLevel);
220
  if (!isset($prev[$type])) {
221
  throw new \InvalidArgumentException('Unknown error type: '.$type);
222
  }
223
+ if (!\is_array($log)) {
224
  $log = array($log);
225
  } elseif (!array_key_exists(0, $log)) {
226
  throw new \InvalidArgumentException('No logger provided');
353
  {
354
  if ($prev !== $this->thrownErrors | $this->loggedErrors) {
355
  $handler = set_error_handler('var_dump');
356
+ $handler = \is_array($handler) ? $handler[0] : null;
357
  restore_error_handler();
358
  if ($handler === $this) {
359
  restore_error_handler();
396
  }
397
  $scope = $this->scopedErrors & $type;
398
 
399
+ if (4 < $numArgs = \func_num_args()) {
400
  $context = $scope ? (func_get_arg(4) ?: array()) : array();
401
  $backtrace = 5 < $numArgs ? func_get_arg(5) : null; // defined on HHVM
402
  } else {
616
  $previousHandler = null;
617
  $sameHandlerLimit = 10;
618
 
619
+ while (!\is_array($handler) || !$handler[0] instanceof self) {
620
  $handler = set_exception_handler('var_dump');
621
  restore_exception_handler();
622
 
757
 
758
  for ($i = 0; isset($backtrace[$i]); ++$i) {
759
  if (isset($backtrace[$i]['file'], $backtrace[$i]['line']) && $backtrace[$i]['line'] === $line && $backtrace[$i]['file'] === $file) {
760
+ $lightTrace = \array_slice($lightTrace, 1 + $i);
761
  break;
762
  }
763
  }
includes/vendor/symfony/debug/Exception/FatalErrorException.php CHANGED
@@ -31,7 +31,7 @@ class FatalErrorException extends \ErrorException
31
 
32
  $this->setTrace($trace);
33
  } elseif (null !== $traceOffset) {
34
- if (function_exists('xdebug_get_function_stack')) {
35
  $trace = xdebug_get_function_stack();
36
  if (0 < $traceOffset) {
37
  array_splice($trace, -$traceOffset);
@@ -60,7 +60,7 @@ class FatalErrorException extends \ErrorException
60
 
61
  unset($frame);
62
  $trace = array_reverse($trace);
63
- } elseif (function_exists('symfony_debug_backtrace')) {
64
  $trace = symfony_debug_backtrace();
65
  if (0 < $traceOffset) {
66
  array_splice($trace, 0, $traceOffset);
31
 
32
  $this->setTrace($trace);
33
  } elseif (null !== $traceOffset) {
34
+ if (\function_exists('xdebug_get_function_stack')) {
35
  $trace = xdebug_get_function_stack();
36
  if (0 < $traceOffset) {
37
  array_splice($trace, -$traceOffset);
60
 
61
  unset($frame);
62
  $trace = array_reverse($trace);
63
+ } elseif (\function_exists('symfony_debug_backtrace')) {
64
  $trace = symfony_debug_backtrace();
65
  if (0 < $traceOffset) {
66
  array_splice($trace, 0, $traceOffset);
includes/vendor/symfony/debug/Exception/FlattenException.php CHANGED
@@ -53,7 +53,7 @@ class FlattenException
53
  $e->setStatusCode($statusCode);
54
  $e->setHeaders($headers);
55
  $e->setTraceFromException($exception);
56
- $e->setClass(get_class($exception));
57
  $e->setFile($exception->getFile());
58
  $e->setLine($exception->getLine());
59
 
@@ -228,9 +228,9 @@ class FlattenException
228
  if ($value instanceof \__PHP_Incomplete_Class) {
229
  // is_object() returns false on PHP<=7.1
230
  $result[$key] = array('incomplete-object', $this->getClassNameFromIncomplete($value));
231
- } elseif (is_object($value)) {
232
- $result[$key] = array('object', get_class($value));
233
- } elseif (is_array($value)) {
234
  if ($level > 10) {
235
  $result[$key] = array('array', '*DEEP NESTED ARRAY*');
236
  } else {
@@ -238,13 +238,13 @@ class FlattenException
238
  }
239
  } elseif (null === $value) {
240
  $result[$key] = array('null', null);
241
- } elseif (is_bool($value)) {
242
  $result[$key] = array('boolean', $value);
243
- } elseif (is_int($value)) {
244
  $result[$key] = array('integer', $value);
245
- } elseif (is_float($value)) {
246
  $result[$key] = array('float', $value);
247
- } elseif (is_resource($value)) {
248
  $result[$key] = array('resource', get_resource_type($value));
249
  } else {
250
  $result[$key] = array('string', (string) $value);
53
  $e->setStatusCode($statusCode);
54
  $e->setHeaders($headers);
55
  $e->setTraceFromException($exception);
56
+ $e->setClass(\get_class($exception));
57
  $e->setFile($exception->getFile());
58
  $e->setLine($exception->getLine());
59
 
228
  if ($value instanceof \__PHP_Incomplete_Class) {
229
  // is_object() returns false on PHP<=7.1
230
  $result[$key] = array('incomplete-object', $this->getClassNameFromIncomplete($value));
231
+ } elseif (\is_object($value)) {
232
+ $result[$key] = array('object', \get_class($value));
233
+ } elseif (\is_array($value)) {
234
  if ($level > 10) {
235
  $result[$key] = array('array', '*DEEP NESTED ARRAY*');
236
  } else {
238
  }
239
  } elseif (null === $value) {
240
  $result[$key] = array('null', null);
241
+ } elseif (\is_bool($value)) {
242
  $result[$key] = array('boolean', $value);
243
+ } elseif (\is_int($value)) {
244
  $result[$key] = array('integer', $value);
245
+ } elseif (\is_float($value)) {
246
  $result[$key] = array('float', $value);
247
+ } elseif (\is_resource($value)) {
248
  $result[$key] = array('resource', get_resource_type($value));
249
  } else {
250
  $result[$key] = array('string', (string) $value);
includes/vendor/symfony/debug/ExceptionHandler.php CHANGED
@@ -57,7 +57,7 @@ class ExceptionHandler
57
  $handler = new static($debug, $charset, $fileLinkFormat);
58
 
59
  $prev = set_exception_handler(array($handler, 'handle'));
60
- if (is_array($prev) && $prev[0] instanceof ErrorHandler) {
61
  restore_exception_handler();
62
  $prev[0]->setExceptionHandler(array($handler, 'handle'));
63
  }
@@ -142,7 +142,7 @@ class ExceptionHandler
142
  $this->caughtBuffer = null;
143
 
144
  try {
145
- call_user_func($this->handler, $exception);
146
  $this->caughtLength = $caughtLength;
147
  } catch (\Exception $e) {
148
  if (!$caughtLength) {
@@ -208,48 +208,54 @@ class ExceptionHandler
208
  $title = 'Whoops, looks like something went wrong.';
209
  }
210
 
 
 
 
 
 
 
 
 
211
  $content = '';
212
- if ($this->debug) {
213
- try {
214
- $count = count($exception->getAllPrevious());
215
- $total = $count + 1;
216
- foreach ($exception->toArray() as $position => $e) {
217
- $ind = $count - $position + 1;
218
- $class = $this->formatClass($e['class']);
219
- $message = nl2br($this->escapeHtml($e['message']));
220
- $content .= sprintf(<<<'EOF'
221
- <div class="trace trace-as-html">
222
- <table class="trace-details">
223
- <thead class="trace-head"><tr><th>
224
- <h3 class="trace-class">
225
- <span class="text-muted">(%d/%d)</span>
226
- <span class="exception_title">%s</span>
227
- </h3>
228
- <p class="break-long-words trace-message">%s</p>
229
- </th></tr></thead>
230
- <tbody>
231
  EOF
232
- , $ind, $total, $class, $message);
233
- foreach ($e['trace'] as $trace) {
234
- $content .= '<tr><td>';
235
- if ($trace['function']) {
236
- $content .= sprintf('at <span class="trace-class">%s</span><span class="trace-type">%s</span><span class="trace-method">%s</span>(<span class="trace-arguments">%s</span>)', $this->formatClass($trace['class']), $trace['type'], $trace['function'], $this->formatArgs($trace['args']));
237
- }
238
- if (isset($trace['file']) && isset($trace['line'])) {
239
- $content .= $this->formatPath($trace['file'], $trace['line']);
240
- }
241
- $content .= "</td></tr>\n";
242
  }
243
-
244
- $content .= "</tbody>\n</table>\n</div>\n";
245
- }
246
- } catch (\Exception $e) {
247
- // something nasty happened and we cannot throw an exception anymore
248
- if ($this->debug) {
249
- $title = sprintf('Exception thrown when handling an exception (%s: %s)', get_class($e), $this->escapeHtml($e->getMessage()));
250
- } else {
251
- $title = 'Whoops, looks like something went wrong.';
252
  }
 
 
 
 
 
 
 
 
 
253
  }
254
  }
255
 
@@ -278,6 +284,14 @@ EOF;
278
  */
279
  public function getStylesheet(FlattenException $exception)
280
  {
 
 
 
 
 
 
 
 
281
  return <<<'EOF'
282
  body { background-color: #F9F9F9; color: #222; font: 14px/1.4 Helvetica, Arial, sans-serif; margin: 0; padding-bottom: 45px; }
283
 
@@ -362,12 +376,12 @@ EOF;
362
  }
363
 
364
  if (\is_string($fmt)) {
365
- $i = strpos($f = $fmt, '&', max(strrpos($f, '%f'), strrpos($f, '%l'))) ?: strlen($f);
366
  $fmt = array(substr($f, 0, $i)) + preg_split('/&([^>]++)>/', substr($f, $i), -1, PREG_SPLIT_DELIM_CAPTURE);
367
 
368
  for ($i = 1; isset($fmt[$i]); ++$i) {
369
  if (0 === strpos($path, $k = $fmt[$i++])) {
370
- $path = substr_replace($path, $fmt[$i], 0, strlen($k));
371
  break;
372
  }
373
  }
@@ -394,7 +408,7 @@ EOF;
394
  if ('object' === $item[0]) {
395
  $formattedValue = sprintf('<em>object</em>(%s)', $this->formatClass($item[1]));
396
  } elseif ('array' === $item[0]) {
397
- $formattedValue = sprintf('<em>array</em>(%s)', is_array($item[1]) ? $this->formatArgs($item[1]) : $item[1]);
398
  } elseif ('null' === $item[0]) {
399
  $formattedValue = '<em>null</em>';
400
  } elseif ('boolean' === $item[0]) {
@@ -405,7 +419,7 @@ EOF;
405
  $formattedValue = str_replace("\n", '', $this->escapeHtml(var_export($item[1], true)));
406
  }
407
 
408
- $result[] = is_int($key) ? $formattedValue : sprintf("'%s' => %s", $this->escapeHtml($key), $formattedValue);
409
  }
410
 
411
  return implode(', ', $result);
57
  $handler = new static($debug, $charset, $fileLinkFormat);
58
 
59
  $prev = set_exception_handler(array($handler, 'handle'));
60
+ if (\is_array($prev) && $prev[0] instanceof ErrorHandler) {
61
  restore_exception_handler();
62
  $prev[0]->setExceptionHandler(array($handler, 'handle'));
63
  }
142
  $this->caughtBuffer = null;
143
 
144
  try {
145
+ \call_user_func($this->handler, $exception);
146
  $this->caughtLength = $caughtLength;
147
  } catch (\Exception $e) {
148
  if (!$caughtLength) {
208
  $title = 'Whoops, looks like something went wrong.';
209
  }
210
 
211
+ if (!$this->debug) {
212
+ return <<<EOF
213
+ <div class="container">
214
+ <h1>$title</h1>
215
+ </div>
216
+ EOF;
217
+ }
218
+
219
  $content = '';
220
+ try {
221
+ $count = \count($exception->getAllPrevious());
222
+ $total = $count + 1;
223
+ foreach ($exception->toArray() as $position => $e) {
224
+ $ind = $count - $position + 1;
225
+ $class = $this->formatClass($e['class']);
226
+ $message = nl2br($this->escapeHtml($e['message']));
227
+ $content .= sprintf(<<<'EOF'
228
+ <div class="trace trace-as-html">
229
+ <table class="trace-details">
230
+ <thead class="trace-head"><tr><th>
231
+ <h3 class="trace-class">
232
+ <span class="text-muted">(%d/%d)</span>
233
+ <span class="exception_title">%s</span>
234
+ </h3>
235
+ <p class="break-long-words trace-message">%s</p>
236
+ </th></tr></thead>
237
+ <tbody>
 
238
  EOF
239
+ , $ind, $total, $class, $message);
240
+ foreach ($e['trace'] as $trace) {
241
+ $content .= '<tr><td>';
242
+ if ($trace['function']) {
243
+ $content .= sprintf('at <span class="trace-class">%s</span><span class="trace-type">%s</span><span class="trace-method">%s</span>(<span class="trace-arguments">%s</span>)', $this->formatClass($trace['class']), $trace['type'], $trace['function'], $this->formatArgs($trace['args']));
 
 
 
 
 
244
  }
245
+ if (isset($trace['file']) && isset($trace['line'])) {
246
+ $content .= $this->formatPath($trace['file'], $trace['line']);
247
+ }
248
+ $content .= "</td></tr>\n";
 
 
 
 
 
249
  }
250
+
251
+ $content .= "</tbody>\n</table>\n</div>\n";
252
+ }
253
+ } catch (\Exception $e) {
254
+ // something nasty happened and we cannot throw an exception anymore
255
+ if ($this->debug) {
256
+ $title = sprintf('Exception thrown when handling an exception (%s: %s)', \get_class($e), $this->escapeHtml($e->getMessage()));
257
+ } else {
258
+ $title = 'Whoops, looks like something went wrong.';
259
  }
260
  }
261
 
284
  */
285
  public function getStylesheet(FlattenException $exception)
286
  {
287
+ if (!$this->debug) {
288
+ return <<<'EOF'
289
+ body { background-color: #fff; color: #222; font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; margin: 0; }
290
+ .container { margin: 30px; max-width: 600px; }
291
+ h1 { color: #dc3545; font-size: 24px; }
292
+ EOF;
293
+ }
294
+
295
  return <<<'EOF'
296
  body { background-color: #F9F9F9; color: #222; font: 14px/1.4 Helvetica, Arial, sans-serif; margin: 0; padding-bottom: 45px; }
297
 
376
  }
377
 
378
  if (\is_string($fmt)) {
379
+ $i = strpos($f = $fmt, '&', max(strrpos($f, '%f'), strrpos($f, '%l'))) ?: \strlen($f);
380
  $fmt = array(substr($f, 0, $i)) + preg_split('/&([^>]++)>/', substr($f, $i), -1, PREG_SPLIT_DELIM_CAPTURE);
381
 
382
  for ($i = 1; isset($fmt[$i]); ++$i) {
383
  if (0 === strpos($path, $k = $fmt[$i++])) {
384
+ $path = substr_replace($path, $fmt[$i], 0, \strlen($k));
385
  break;
386
  }
387
  }
408
  if ('object' === $item[0]) {
409
  $formattedValue = sprintf('<em>object</em>(%s)', $this->formatClass($item[1]));
410
  } elseif ('array' === $item[0]) {
411
+ $formattedValue = sprintf('<em>array</em>(%s)', \is_array($item[1]) ? $this->formatArgs($item[1]) : $item[1]);
412
  } elseif ('null' === $item[0]) {
413
  $formattedValue = '<em>null</em>';
414
  } elseif ('boolean' === $item[0]) {
419
  $formattedValue = str_replace("\n", '', $this->escapeHtml(var_export($item[1], true)));
420
  }
421
 
422
+ $result[] = \is_int($key) ? $formattedValue : sprintf("'%s' => %s", $this->escapeHtml($key), $formattedValue);
423
  }
424
 
425
  return implode(', ', $result);
includes/vendor/symfony/debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php CHANGED
@@ -11,11 +11,11 @@
11
 
12
  namespace Symfony\Component\Debug\FatalErrorHandler;
13
 
14
- use Symfony\Component\Debug\Exception\ClassNotFoundException;
15
- use Symfony\Component\Debug\Exception\FatalErrorException;
16
- use Symfony\Component\Debug\DebugClassLoader;
17
  use Composer\Autoload\ClassLoader as ComposerClassLoader;
18
  use Symfony\Component\ClassLoader\ClassLoader as SymfonyClassLoader;
 
 
 
19
 
20
  /**
21
  * ErrorHandler for classes that do not exist.
@@ -29,9 +29,9 @@ class ClassNotFoundFatalErrorHandler implements FatalErrorHandlerInterface
29
  */
30
  public function handleError(array $error, FatalErrorException $exception)
31
  {
32
- $messageLen = strlen($error['message']);
33
  $notFoundSuffix = '\' not found';
34
- $notFoundSuffixLen = strlen($notFoundSuffix);
35
  if ($notFoundSuffixLen > $messageLen) {
36
  return;
37
  }
@@ -42,7 +42,7 @@ class ClassNotFoundFatalErrorHandler implements FatalErrorHandlerInterface
42
 
43
  foreach (array('class', 'interface', 'trait') as $typeName) {
44
  $prefix = ucfirst($typeName).' \'';
45
- $prefixLen = strlen($prefix);
46
  if (0 !== strpos($error['message'], $prefix)) {
47
  continue;
48
  }
@@ -85,7 +85,7 @@ class ClassNotFoundFatalErrorHandler implements FatalErrorHandlerInterface
85
  */
86
  private function getClassCandidates($class)
87
  {
88
- if (!is_array($functions = spl_autoload_functions())) {
89
  return array();
90
  }
91
 
@@ -93,14 +93,14 @@ class ClassNotFoundFatalErrorHandler implements FatalErrorHandlerInterface
93
  $classes = array();
94
 
95
  foreach ($functions as $function) {
96
- if (!is_array($function)) {
97
  continue;
98
  }
99
  // get class loaders wrapped by DebugClassLoader
100
  if ($function[0] instanceof DebugClassLoader) {
101
  $function = $function[0]->getClassLoader();
102
 
103
- if (!is_array($function)) {
104
  continue;
105
  }
106
  }
@@ -133,7 +133,7 @@ class ClassNotFoundFatalErrorHandler implements FatalErrorHandlerInterface
133
  */
134
  private function findClassInPath($path, $class, $prefix)
135
  {
136
- if (!$path = realpath($path.'/'.strtr($prefix, '\\_', '//')) ?: realpath($path.'/'.dirname(strtr($prefix, '\\_', '//'))) ?: realpath($path)) {
137
  return array();
138
  }
139
 
@@ -159,7 +159,7 @@ class ClassNotFoundFatalErrorHandler implements FatalErrorHandlerInterface
159
  {
160
  $candidates = array(
161
  // namespaced class
162
- $namespacedClass = str_replace(array($path.DIRECTORY_SEPARATOR, '.php', '/'), array('', '', '\\'), $file),
163
  // namespaced class (with target dir)
164
  $prefix.$namespacedClass,
165
  // namespaced class (with target dir and separator)
11
 
12
  namespace Symfony\Component\Debug\FatalErrorHandler;
13
 
 
 
 
14
  use Composer\Autoload\ClassLoader as ComposerClassLoader;
15
  use Symfony\Component\ClassLoader\ClassLoader as SymfonyClassLoader;
16
+ use Symfony\Component\Debug\DebugClassLoader;
17
+ use Symfony\Component\Debug\Exception\ClassNotFoundException;
18
+ use Symfony\Component\Debug\Exception\FatalErrorException;
19
 
20
  /**
21
  * ErrorHandler for classes that do not exist.
29
  */
30
  public function handleError(array $error, FatalErrorException $exception)
31
  {
32
+ $messageLen = \strlen($error['message']);
33
  $notFoundSuffix = '\' not found';
34
+ $notFoundSuffixLen = \strlen($notFoundSuffix);
35
  if ($notFoundSuffixLen > $messageLen) {
36
  return;
37
  }
42
 
43
  foreach (array('class', 'interface', 'trait') as $typeName) {
44
  $prefix = ucfirst($typeName).' \'';
45
+ $prefixLen = \strlen($prefix);
46
  if (0 !== strpos($error['message'], $prefix)) {
47
  continue;
48
  }
85
  */
86
  private function getClassCandidates($class)
87
  {
88
+ if (!\is_array($functions = spl_autoload_functions())) {
89
  return array();
90
  }
91
 
93
  $classes = array();
94
 
95
  foreach ($functions as $function) {
96
+ if (!\is_array($function)) {
97
  continue;
98
  }
99
  // get class loaders wrapped by DebugClassLoader
100
  if ($function[0] instanceof DebugClassLoader) {
101
  $function = $function[0]->getClassLoader();
102
 
103
+ if (!\is_array($function)) {
104
  continue;
105
  }
106
  }
133
  */
134
  private function findClassInPath($path, $class, $prefix)
135
  {
136
+ if (!$path = realpath($path.'/'.strtr($prefix, '\\_', '//')) ?: realpath($path.'/'.\dirname(strtr($prefix, '\\_', '//'))) ?: realpath($path)) {
137
  return array();
138
  }
139
 
159
  {
160
  $candidates = array(
161
  // namespaced class
162
+ $namespacedClass = str_replace(array($path.\DIRECTORY_SEPARATOR, '.php', '/'), array('', '', '\\'), $file),
163
  // namespaced class (with target dir)
164
  $prefix.$namespacedClass,
165
  // namespaced class (with target dir and separator)
includes/vendor/symfony/debug/FatalErrorHandler/UndefinedFunctionFatalErrorHandler.php CHANGED
@@ -11,8 +11,8 @@
11
 
12
  namespace Symfony\Component\Debug\FatalErrorHandler;
13
 
14
- use Symfony\Component\Debug\Exception\UndefinedFunctionException;
15
  use Symfony\Component\Debug\Exception\FatalErrorException;
 
16
 
17
  /**
18
  * ErrorHandler for undefined functions.
@@ -26,9 +26,9 @@ class UndefinedFunctionFatalErrorHandler implements FatalErrorHandlerInterface
26
  */
27
  public function handleError(array $error, FatalErrorException $exception)
28
  {
29
- $messageLen = strlen($error['message']);
30
  $notFoundSuffix = '()';
31
- $notFoundSuffixLen = strlen($notFoundSuffix);
32
  if ($notFoundSuffixLen > $messageLen) {
33
  return;
34
  }
@@ -38,7 +38,7 @@ class UndefinedFunctionFatalErrorHandler implements FatalErrorHandlerInterface
38
  }
39
 
40
  $prefix = 'Call to undefined function ';
41
- $prefixLen = strlen($prefix);
42
  if (0 !== strpos($error['message'], $prefix)) {
43
  return;
44
  }
11
 
12
  namespace Symfony\Component\Debug\FatalErrorHandler;
13
 
 
14
  use Symfony\Component\Debug\Exception\FatalErrorException;
15
+ use Symfony\Component\Debug\Exception\UndefinedFunctionException;
16
 
17
  /**
18
  * ErrorHandler for undefined functions.
26
  */
27
  public function handleError(array $error, FatalErrorException $exception)
28
  {
29
+ $messageLen = \strlen($error['message']);
30
  $notFoundSuffix = '()';
31
+ $notFoundSuffixLen = \strlen($notFoundSuffix);
32
  if ($notFoundSuffixLen > $messageLen) {
33
  return;
34
  }
38
  }
39
 
40
  $prefix = 'Call to undefined function ';
41
+ $prefixLen = \strlen($prefix);
42
  if (0 !== strpos($error['message'], $prefix)) {
43
  return;
44
  }
includes/vendor/symfony/debug/FatalErrorHandler/UndefinedMethodFatalErrorHandler.php CHANGED
@@ -44,7 +44,7 @@ class UndefinedMethodFatalErrorHandler implements FatalErrorHandlerInterface
44
  $candidates = array();
45
  foreach ($methods as $definedMethodName) {
46
  $lev = levenshtein($methodName, $definedMethodName);
47
- if ($lev <= strlen($methodName) / 3 || false !== strpos($definedMethodName, $methodName)) {
48
  $candidates[] = $definedMethodName;
49
  }
50
  }
44
  $candidates = array();
45
  foreach ($methods as $definedMethodName) {
46
  $lev = levenshtein($methodName, $definedMethodName);
47
+ if ($lev <= \strlen($methodName) / 3 || false !== strpos($definedMethodName, $methodName)) {
48
  $candidates[] = $definedMethodName;
49
  }
50
  }
includes/vendor/symfony/debug/Resources/ext/tests/003.phpt CHANGED
@@ -45,7 +45,7 @@ function foo()
45
  $handler = ErrorHandler::register();
46
  $handler->setExceptionHandler('print_r');
47
 
48
- if (function_exists('xdebug_disable')) {
49
  xdebug_disable();
50
  }
51
 
45
  $handler = ErrorHandler::register();
46
  $handler->setExceptionHandler('print_r');
47
 
48
+ if (\function_exists('xdebug_disable')) {
49
  xdebug_disable();
50
  }
51
 
includes/vendor/symfony/debug/Tests/ErrorHandlerTest.php CHANGED
@@ -524,7 +524,7 @@ class ErrorHandlerTest extends TestCase
524
 
525
  $handler = new ErrorHandler();
526
  $handler->setExceptionHandler(function () use (&$args) {
527
- $args = func_get_args();
528
  });
529
 
530
  $handler->handleException($exception);
@@ -562,7 +562,7 @@ class ErrorHandlerTest extends TestCase
562
  'backtrace' => array(456),
563
  );
564
 
565
- call_user_func_array(array($handler, 'handleError'), $error);
566
  $handler->handleFatalError($error);
567
  } finally {
568
  restore_error_handler();
524
 
525
  $handler = new ErrorHandler();
526
  $handler->setExceptionHandler(function () use (&$args) {
527
+ $args = \func_get_args();
528
  });
529
 
530
  $handler->handleException($exception);
562
  'backtrace' => array(456),
563
  );
564
 
565
+ \call_user_func_array(array($handler, 'handleError'), $error);
566
  $handler->handleFatalError($error);
567
  } finally {
568
  restore_error_handler();
includes/vendor/symfony/debug/Tests/Exception/FlattenExceptionTest.php CHANGED
@@ -14,19 +14,19 @@ namespace Symfony\Component\Debug\Tests\Exception;
14
  use PHPUnit\Framework\TestCase;
15
  use Symfony\Component\Debug\Exception\FlattenException;
16
  use Symfony\Component\HttpFoundation\Exception\SuspiciousOperationException;
17
- use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
18
- use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
19
- use Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException;
20
  use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
21
- use Symfony\Component\HttpKernel\Exception\NotAcceptableHttpException;
22
  use Symfony\Component\HttpKernel\Exception\ConflictHttpException;
23
- use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
24
  use Symfony\Component\HttpKernel\Exception\GoneHttpException;
25
  use Symfony\Component\HttpKernel\Exception\LengthRequiredHttpException;
 
 
 
26
  use Symfony\Component\HttpKernel\Exception\PreconditionFailedHttpException;
27
  use Symfony\Component\HttpKernel\Exception\PreconditionRequiredHttpException;
28
  use Symfony\Component\HttpKernel\Exception\ServiceUnavailableHttpException;
29
  use Symfony\Component\HttpKernel\Exception\TooManyRequestsHttpException;
 
30
  use Symfony\Component\HttpKernel\Exception\UnsupportedMediaTypeHttpException;
31
 
32
  class FlattenExceptionTest extends TestCase
@@ -236,7 +236,7 @@ class FlattenExceptionTest extends TestCase
236
  $this->assertSame(array('object', 'stdClass'), $array[$i++]);
237
  $this->assertSame(array('object', 'Symfony\Component\HttpKernel\Exception\NotFoundHttpException'), $array[$i++]);
238
  $this->assertSame(array('incomplete-object', 'BogusTestClass'), $array[$i++]);
239
- $this->assertSame(array('resource', defined('HHVM_VERSION') ? 'Directory' : 'stream'), $array[$i++]);
240
  $this->assertSame(array('resource', 'stream'), $array[$i++]);
241
 
242
  $args = $array[$i++];
14
  use PHPUnit\Framework\TestCase;
15
  use Symfony\Component\Debug\Exception\FlattenException;
16
  use Symfony\Component\HttpFoundation\Exception\SuspiciousOperationException;
17
+ use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
 
 
18
  use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
 
19
  use Symfony\Component\HttpKernel\Exception\ConflictHttpException;
 
20
  use Symfony\Component\HttpKernel\Exception\GoneHttpException;
21
  use Symfony\Component\HttpKernel\Exception\LengthRequiredHttpException;
22
+ use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
23
+ use Symfony\Component\HttpKernel\Exception\NotAcceptableHttpException;
24
+ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
25
  use Symfony\Component\HttpKernel\Exception\PreconditionFailedHttpException;
26
  use Symfony\Component\HttpKernel\Exception\PreconditionRequiredHttpException;
27
  use Symfony\Component\HttpKernel\Exception\ServiceUnavailableHttpException;
28
  use Symfony\Component\HttpKernel\Exception\TooManyRequestsHttpException;
29
+ use Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException;
30
  use Symfony\Component\HttpKernel\Exception\UnsupportedMediaTypeHttpException;
31
 
32
  class FlattenExceptionTest extends TestCase
236
  $this->assertSame(array('object', 'stdClass'), $array[$i++]);
237
  $this->assertSame(array('object', 'Symfony\Component\HttpKernel\Exception\NotFoundHttpException'), $array[$i++]);
238
  $this->assertSame(array('incomplete-object', 'BogusTestClass'), $array[$i++]);
239
+ $this->assertSame(array('resource', \defined('HHVM_VERSION') ? 'Directory' : 'stream'), $array[$i++]);
240
  $this->assertSame(array('resource', 'stream'), $array[$i++]);
241
 
242
  $args = $array[$i++];
includes/vendor/symfony/debug/Tests/ExceptionHandlerTest.php CHANGED
@@ -12,10 +12,10 @@
12
  namespace Symfony\Component\Debug\Tests;
13
 
14
  use PHPUnit\Framework\TestCase;
15
- use Symfony\Component\Debug\ExceptionHandler;
16
  use Symfony\Component\Debug\Exception\OutOfMemoryException;
17
- use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
18
  use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
 
19
 
20
  require_once __DIR__.'/HeaderMock.php';
21
 
12
  namespace Symfony\Component\Debug\Tests;
13
 
14
  use PHPUnit\Framework\TestCase;
 
15
  use Symfony\Component\Debug\Exception\OutOfMemoryException;
16
+ use Symfony\Component\Debug\ExceptionHandler;
17
  use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
18
+ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
19
 
20
  require_once __DIR__.'/HeaderMock.php';
21
 
includes/vendor/symfony/debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php CHANGED
@@ -11,18 +11,18 @@
11
 
12
  namespace Symfony\Component\Debug\Tests\FatalErrorHandler;
13
 
 
14
  use PHPUnit\Framework\TestCase;
 
15
  use Symfony\Component\Debug\Exception\FatalErrorException;
16
  use Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler;
17
- use Symfony\Component\Debug\DebugClassLoader;
18
- use Composer\Autoload\ClassLoader as ComposerClassLoader;
19
 
20
  class ClassNotFoundFatalErrorHandlerTest extends TestCase
21
  {
22
  public static function setUpBeforeClass()
23
  {
24
  foreach (spl_autoload_functions() as $function) {
25
- if (!is_array($function)) {
26
  continue;
27
  }
28
 
@@ -32,7 +32,7 @@ class ClassNotFoundFatalErrorHandlerTest extends TestCase
32
  }
33
 
34
  if ($function[0] instanceof ComposerClassLoader) {
35
- $function[0]->add('Symfony_Component_Debug_Tests_Fixtures', dirname(dirname(dirname(dirname(dirname(__DIR__))))));
36
  break;
37
  }
38
  }
11
 
12
  namespace Symfony\Component\Debug\Tests\FatalErrorHandler;
13
 
14
+ use Composer\Autoload\ClassLoader as ComposerClassLoader;
15
  use PHPUnit\Framework\TestCase;
16
+ use Symfony\Component\Debug\DebugClassLoader;
17
  use Symfony\Component\Debug\Exception\FatalErrorException;
18
  use Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler;
 
 
19
 
20
  class ClassNotFoundFatalErrorHandlerTest extends TestCase
21
  {
22
  public static function setUpBeforeClass()
23
  {
24
  foreach (spl_autoload_functions() as $function) {
25
+ if (!\is_array($function)) {
26
  continue;
27
  }
28
 
32
  }
33
 
34
  if ($function[0] instanceof ComposerClassLoader) {
35
+ $function[0]->add('Symfony_Component_Debug_Tests_Fixtures', \dirname(\dirname(\dirname(\dirname(\dirname(__DIR__))))));
36
  break;
37
  }
38
  }
includes/vendor/symfony/debug/Tests/HeaderMock.php CHANGED
@@ -27,12 +27,12 @@ function testHeader()
27
  {
28
  static $headers = array();
29
 
30
- if (!$h = func_get_args()) {
31
  $h = $headers;
32
  $headers = array();
33
 
34
  return $h;
35
  }
36
 
37
- $headers[] = func_get_args();
38
  }
27
  {
28
  static $headers = array();
29
 
30
+ if (!$h = \func_get_args()) {
31
  $h = $headers;
32
  $headers = array();
33
 
34
  return $h;
35
  }
36
 
37
+ $headers[] = \func_get_args();
38
  }
includes/vendor/symfony/debug/Tests/phpt/debug_class_loader.phpt CHANGED
@@ -9,7 +9,7 @@ use Symfony\Component\Debug\DebugClassLoader;
9
 
10
  $vendor = __DIR__;
11
  while (!file_exists($vendor.'/vendor')) {
12
- $vendor = dirname($vendor);
13
  }
14
  require $vendor.'/vendor/autoload.php';
15
 
9
 
10
  $vendor = __DIR__;
11
  while (!file_exists($vendor.'/vendor')) {
12
+ $vendor = \dirname($vendor);
13
  }
14
  require $vendor.'/vendor/autoload.php';
15
 
includes/vendor/symfony/debug/Tests/phpt/decorate_exception_hander.phpt CHANGED
@@ -7,7 +7,7 @@ namespace Symfony\Component\Debug;
7
 
8
  $vendor = __DIR__;
9
  while (!file_exists($vendor.'/vendor')) {
10
- $vendor = dirname($vendor);
11
  }
12
  require $vendor.'/vendor/autoload.php';
13
 
@@ -38,8 +38,7 @@ Did you forget a "use" statement for another namespace?"
38
  ["line":protected]=>
39
  int(%d)
40
  ["trace":"Exception":private]=>
41
- array(0) {
42
- }
43
  ["previous":"Exception":private]=>
44
  NULL
45
  ["severity":protected]=>
7
 
8
  $vendor = __DIR__;
9
  while (!file_exists($vendor.'/vendor')) {
10
+ $vendor = \dirname($vendor);
11
  }
12
  require $vendor.'/vendor/autoload.php';
13
 
38
  ["line":protected]=>
39
  int(%d)
40
  ["trace":"Exception":private]=>
41
+ array(%d) {%A}
 
42
  ["previous":"Exception":private]=>
43
  NULL
44
  ["severity":protected]=>
includes/vendor/symfony/debug/Tests/phpt/exception_rethrown.phpt CHANGED
@@ -7,7 +7,7 @@ namespace Symfony\Component\Debug;
7
 
8
  $vendor = __DIR__;
9
  while (!file_exists($vendor.'/vendor')) {
10
- $vendor = dirname($vendor);
11
  }
12
  require $vendor.'/vendor/autoload.php';
13
 
7
 
8
  $vendor = __DIR__;
9
  while (!file_exists($vendor.'/vendor')) {
10
+ $vendor = \dirname($vendor);
11
  }
12
  require $vendor.'/vendor/autoload.php';
13
 
includes/vendor/symfony/debug/Tests/phpt/fatal_with_nested_handlers.phpt CHANGED
@@ -7,7 +7,7 @@ namespace Symfony\Component\Debug;
7
 
8
  $vendor = __DIR__;
9
  while (!file_exists($vendor.'/vendor')) {
10
- $vendor = dirname($vendor);
11
  }
12
  require $vendor.'/vendor/autoload.php';
13
 
7
 
8
  $vendor = __DIR__;
9
  while (!file_exists($vendor.'/vendor')) {
10
+ $vendor = \dirname($vendor);
11
  }
12
  require $vendor.'/vendor/autoload.php';
13
 
includes/vendor/symfony/filesystem/Filesystem.php CHANGED
@@ -11,8 +11,8 @@
11
 
12
  namespace Symfony\Component\Filesystem;
13
 
14
- use Symfony\Component\Filesystem\Exception\IOException;
15
  use Symfony\Component\Filesystem\Exception\FileNotFoundException;
 
16
 
17
  /**
18
  * Provides basic utility to manipulate the file system.
@@ -44,7 +44,7 @@ class Filesystem
44
  throw new FileNotFoundException(sprintf('Failed to copy "%s" because file does not exist.', $originFile), 0, null, $originFile);
45
  }
46
 
47
- $this->mkdir(dirname($targetFile));
48
 
49
  $doCopy = true;
50
  if (!$overwriteNewerFiles && null === parse_url($originFile, PHP_URL_HOST) && is_file($targetFile)) {
@@ -121,7 +121,7 @@ class Filesystem
121
  $maxPathLength = PHP_MAXPATHLEN - 2;
122
 
123
  foreach ($this->toIterable($files) as $file) {
124
- if (strlen($file) > $maxPathLength) {
125
  throw new IOException(sprintf('Could not check if file exist because path length exceeds %d characters.', $maxPathLength), 0, null, $file);
126
  }
127
 
@@ -163,14 +163,14 @@ class Filesystem
163
  {
164
  if ($files instanceof \Traversable) {
165
  $files = iterator_to_array($files, false);
166
- } elseif (!is_array($files)) {
167
  $files = array($files);
168
  }
169
  $files = array_reverse($files);
170
  foreach ($files as $file) {
171
  if (is_link($file)) {
172
  // See https://bugs.php.net/52176
173
- if (!(self::box('unlink', $file) || '\\' !== DIRECTORY_SEPARATOR || self::box('rmdir', $file)) && file_exists($file)) {
174
  throw new IOException(sprintf('Failed to remove symlink "%s": %s.', $file, self::$lastError));
175
  }
176
  } elseif (is_dir($file)) {
@@ -222,7 +222,7 @@ class Filesystem
222
  if ($recursive && is_dir($file) && !is_link($file)) {
223
  $this->chown(new \FilesystemIterator($file), $user, true);
224
  }
225
- if (is_link($file) && function_exists('lchown')) {
226
  if (true !== @lchown($file, $user)) {
227
  throw new IOException(sprintf('Failed to chown file "%s".', $file), 0, null, $file);
228
  }
@@ -249,8 +249,8 @@ class Filesystem
249
  if ($recursive && is_dir($file) && !is_link($file)) {
250
  $this->chgrp(new \FilesystemIterator($file), $group, true);
251
  }
252
- if (is_link($file) && function_exists('lchgrp')) {
253
- if (true !== @lchgrp($file, $group) || (defined('HHVM_VERSION') && !posix_getgrnam($group))) {
254
  throw new IOException(sprintf('Failed to chgrp file "%s".', $file), 0, null, $file);
255
  }
256
  } else {
@@ -303,7 +303,7 @@ class Filesystem
303
  {
304
  $maxPathLength = PHP_MAXPATHLEN - 2;
305
 
306
- if (strlen($filename) > $maxPathLength) {
307
  throw new IOException(sprintf('Could not check if file is readable because path length exceeds %d characters.', $maxPathLength), 0, null, $filename);
308
  }
309
 
@@ -321,7 +321,7 @@ class Filesystem
321
  */
322
  public function symlink($originDir, $targetDir, $copyOnWindows = false)
323
  {
324
- if ('\\' === DIRECTORY_SEPARATOR) {
325
  $originDir = strtr($originDir, '/', '\\');
326
  $targetDir = strtr($targetDir, '/', '\\');
327
 
@@ -332,7 +332,7 @@ class Filesystem
332
  }
333
  }
334
 
335
- $this->mkdir(dirname($targetDir));
336
 
337
  if (is_link($targetDir)) {
338
  if (readlink($targetDir) === $originDir) {
@@ -387,7 +387,7 @@ class Filesystem
387
  private function linkException($origin, $target, $linkType)
388
  {
389
  if (self::$lastError) {
390
- if ('\\' === DIRECTORY_SEPARATOR && false !== strpos(self::$lastError, 'error code(1314)')) {
391
  throw new IOException(sprintf('Unable to create %s link due to error code 1314: \'A required privilege is not held by the client\'. Do you have the required Administrator-rights?', $linkType), 0, null, $target);
392
  }
393
  }
@@ -421,14 +421,14 @@ class Filesystem
421
  return;
422
  }
423
 
424
- if ('\\' === DIRECTORY_SEPARATOR) {
425
  $path = readlink($path);
426
  }
427
 
428
  return realpath($path);
429
  }
430
 
431
- if ('\\' === DIRECTORY_SEPARATOR) {
432
  return realpath($path);
433
  }
434
 
@@ -450,13 +450,13 @@ class Filesystem
450
  }
451
 
452
  // Normalize separators on Windows
453
- if ('\\' === DIRECTORY_SEPARATOR) {
454
  $endPath = str_replace('\\', '/', $endPath);
455
  $startPath = str_replace('\\', '/', $startPath);
456
  }
457
 
458
  $stripDriveLetter = function ($path) {
459
- if (strlen($path) > 2 && ':' === $path[1] && '/' === $path[2] && ctype_alpha($path[0])) {
460
  return substr($path, 2);
461
  }
462
 
@@ -474,7 +474,7 @@ class Filesystem
474
  $result = array();
475
 
476
  foreach ($pathSegments as $segment) {
477
- if ('..' === $segment && ($absolute || count($result))) {
478
  array_pop($result);
479
  } elseif ('.' !== $segment) {
480
  $result[] = $segment;
@@ -494,16 +494,16 @@ class Filesystem
494
  }
495
 
496
  // Determine how deep the start path is relative to the common path (ie, "web/bundles" = 2 levels)
497
- if (1 === count($startPathArr) && '' === $startPathArr[0]) {
498
  $depth = 0;
499
  } else {
500
- $depth = count($startPathArr) - $index;
501
  }
502
 
503
  // Repeated "../" for each level need to reach the common path
504
  $traverser = str_repeat('../', $depth);
505
 
506
- $endPathRemainder = implode('/', array_slice($endPathArr, $index));
507
 
508
  // Construct $endPath from traversing to the common path, then to the remaining $endPath
509
  $relativePath = $traverser.('' !== $endPathRemainder ? $endPathRemainder.'/' : '');
@@ -534,7 +534,7 @@ class Filesystem
534
  {
535
  $targetDir = rtrim($targetDir, '/\\');
536
  $originDir = rtrim($originDir, '/\\');
537
- $originDirLen = strlen($originDir);
538
 
539
  // Iterate in destination folder to remove obsolete entries
540
  if ($this->exists($targetDir) && isset($options['delete']) && $options['delete']) {
@@ -543,7 +543,7 @@ class Filesystem
543
  $flags = \FilesystemIterator::SKIP_DOTS;
544
  $deleteIterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($targetDir, $flags), \RecursiveIteratorIterator::CHILD_FIRST);
545
  }
546
- $targetDirLen = strlen($targetDir);
547
  foreach ($deleteIterator as $file) {
548
  $origin = $originDir.substr($file->getPathname(), $targetDirLen);
549
  if (!$this->exists($origin)) {
@@ -601,7 +601,7 @@ class Filesystem
601
  public function isAbsolutePath($file)
602
  {
603
  return strspn($file, '/\\', 0, 1)
604
- || (strlen($file) > 3 && ctype_alpha($file[0])
605
  && ':' === $file[1]
606
  && strspn($file, '/\\', 2, 1)
607
  )
@@ -671,7 +671,7 @@ class Filesystem
671
  */
672
  public function dumpFile($filename, $content)
673
  {
674
- $dir = dirname($filename);
675
 
676
  if (!is_dir($dir)) {
677
  $this->mkdir($dir);
@@ -704,7 +704,7 @@ class Filesystem
704
  */
705
  public function appendToFile($filename, $content)
706
  {
707
- $dir = dirname($filename);
708
 
709
  if (!is_dir($dir)) {
710
  $this->mkdir($dir);
@@ -726,7 +726,7 @@ class Filesystem
726
  */
727
  private function toIterable($files)
728
  {
729
- return is_array($files) || $files instanceof \Traversable ? $files : array($files);
730
  }
731
 
732
  /**
@@ -740,7 +740,7 @@ class Filesystem
740
  {
741
  $components = explode('://', $filename, 2);
742
 
743
- return 2 === count($components) ? array($components[0], $components[1]) : array(null, $components[0]);
744
  }
745
 
746
  private static function box($func)
11
 
12
  namespace Symfony\Component\Filesystem;
13
 
 
14
  use Symfony\Component\Filesystem\Exception\FileNotFoundException;
15
+ use Symfony\Component\Filesystem\Exception\IOException;
16
 
17
  /**
18
  * Provides basic utility to manipulate the file system.
44
  throw new FileNotFoundException(sprintf('Failed to copy "%s" because file does not exist.', $originFile), 0, null, $originFile);
45
  }
46
 
47
+ $this->mkdir(\dirname($targetFile));
48
 
49
  $doCopy = true;
50
  if (!$overwriteNewerFiles && null === parse_url($originFile, PHP_URL_HOST) && is_file($targetFile)) {
121
  $maxPathLength = PHP_MAXPATHLEN - 2;
122
 
123
  foreach ($this->toIterable($files) as $file) {
124
+ if (\strlen($file) > $maxPathLength) {
125
  throw new IOException(sprintf('Could not check if file exist because path length exceeds %d characters.', $maxPathLength), 0, null, $file);
126
  }
127
 
163
  {
164
  if ($files instanceof \Traversable) {
165
  $files = iterator_to_array($files, false);
166
+ } elseif (!\is_array($files)) {
167
  $files = array($files);
168
  }
169
  $files = array_reverse($files);
170
  foreach ($files as $file) {
171
  if (is_link($file)) {
172
  // See https://bugs.php.net/52176
173
+ if (!(self::box('unlink', $file) || '\\' !== \DIRECTORY_SEPARATOR || self::box('rmdir', $file)) && file_exists($file)) {
174
  throw new IOException(sprintf('Failed to remove symlink "%s": %s.', $file, self::$lastError));
175
  }
176
  } elseif (is_dir($file)) {
222
  if ($recursive && is_dir($file) && !is_link($file)) {
223
  $this->chown(new \FilesystemIterator($file), $user, true);
224
  }
225
+ if (is_link($file) && \function_exists('lchown')) {
226
  if (true !== @lchown($file, $user)) {
227
  throw new IOException(sprintf('Failed to chown file "%s".', $file), 0, null, $file);
228
  }
249
  if ($recursive && is_dir($file) && !is_link($file)) {
250
  $this->chgrp(new \FilesystemIterator($file), $group, true);
251
  }
252
+ if (is_link($file) && \function_exists('lchgrp')) {
253
+ if (true !== @lchgrp($file, $group) || (\defined('HHVM_VERSION') && !posix_getgrnam($group))) {
254
  throw new IOException(sprintf('Failed to chgrp file "%s".', $file), 0, null, $file);
255
  }
256
  } else {
303
  {
304
  $maxPathLength = PHP_MAXPATHLEN - 2;
305
 
306
+ if (\strlen($filename) > $maxPathLength) {
307
  throw new IOException(sprintf('Could not check if file is readable because path length exceeds %d characters.', $maxPathLength), 0, null, $filename);
308
  }
309
 
321
  */
322
  public function symlink($originDir, $targetDir, $copyOnWindows = false)
323
  {
324
+ if ('\\' === \DIRECTORY_SEPARATOR) {
325
  $originDir = strtr($originDir, '/', '\\');
326
  $targetDir = strtr($targetDir, '/', '\\');
327
 
332
  }
333
  }
334
 
335
+ $this->mkdir(\dirname($targetDir));
336
 
337
  if (is_link($targetDir)) {
338
  if (readlink($targetDir) === $originDir) {
387
  private function linkException($origin, $target, $linkType)
388
  {
389
  if (self::$lastError) {
390
+ if ('\\' === \DIRECTORY_SEPARATOR && false !== strpos(self::$lastError, 'error code(1314)')) {
391
  throw new IOException(sprintf('Unable to create %s link due to error code 1314: \'A required privilege is not held by the client\'. Do you have the required Administrator-rights?', $linkType), 0, null, $target);
392
  }
393
  }
421
  return;
422
  }
423
 
424
+ if ('\\' === \DIRECTORY_SEPARATOR) {
425
  $path = readlink($path);
426
  }
427
 
428
  return realpath($path);
429
  }
430
 
431
+ if ('\\' === \DIRECTORY_SEPARATOR) {
432
  return realpath($path);
433
  }
434
 
450
  }
451
 
452
  // Normalize separators on Windows
453
+ if ('\\' === \DIRECTORY_SEPARATOR) {
454
  $endPath = str_replace('\\', '/', $endPath);
455
  $startPath = str_replace('\\', '/', $startPath);
456
  }
457
 
458
  $stripDriveLetter = function ($path) {
459
+ if (\strlen($path) > 2 && ':' === $path[1] && '/' === $path[2] && ctype_alpha($path[0])) {
460
  return substr($path, 2);
461
  }
462
 
474
  $result = array();
475
 
476
  foreach ($pathSegments as $segment) {
477
+ if ('..' === $segment && ($absolute || \count($result))) {
478
  array_pop($result);
479
  } elseif ('.' !== $segment) {
480
  $result[] = $segment;
494
  }
495
 
496
  // Determine how deep the start path is relative to the common path (ie, "web/bundles" = 2 levels)
497
+ if (1 === \count($startPathArr) && '' === $startPathArr[0]) {
498
  $depth = 0;
499
  } else {
500
+ $depth = \count($startPathArr) - $index;
501
  }
502
 
503
  // Repeated "../" for each level need to reach the common path
504
  $traverser = str_repeat('../', $depth);
505
 
506
+ $endPathRemainder = implode('/', \array_slice($endPathArr, $index));
507
 
508
  // Construct $endPath from traversing to the common path, then to the remaining $endPath
509
  $relativePath = $traverser.('' !== $endPathRemainder ? $endPathRemainder.'/' : '');
534
  {
535
  $targetDir = rtrim($targetDir, '/\\');
536
  $originDir = rtrim($originDir, '/\\');
537
+ $originDirLen = \strlen($originDir);
538
 
539
  // Iterate in destination folder to remove obsolete entries
540
  if ($this->exists($targetDir) && isset($options['delete']) && $options['delete']) {
543
  $flags = \FilesystemIterator::SKIP_DOTS;
544
  $deleteIterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($targetDir, $flags), \RecursiveIteratorIterator::CHILD_FIRST);
545
  }
546
+ $targetDirLen = \strlen($targetDir);
547
  foreach ($deleteIterator as $file) {
548
  $origin = $originDir.substr($file->getPathname(), $targetDirLen);
549
  if (!$this->exists($origin)) {
601
  public function isAbsolutePath($file)
602
  {
603
  return strspn($file, '/\\', 0, 1)
604
+ || (\strlen($file) > 3 && ctype_alpha($file[0])
605
  && ':' === $file[1]
606
  && strspn($file, '/\\', 2, 1)
607
  )
671
  */
672
  public function dumpFile($filename, $content)
673
  {
674
+ $dir = \dirname($filename);
675
 
676
  if (!is_dir($dir)) {
677
  $this->mkdir($dir);
704
  */
705
  public function appendToFile($filename, $content)
706
  {
707
+ $dir = \dirname($filename);
708
 
709
  if (!is_dir($dir)) {
710
  $this->mkdir($dir);
726
  */
727
  private function toIterable($files)
728
  {
729
+ return \is_array($files) || $files instanceof \Traversable ? $files : array($files);
730
  }
731
 
732
  /**
740
  {
741
  $components = explode('://', $filename, 2);
742
 
743
+ return 2 === \count($components) ? array($components[0], $components[1]) : array(null, $components[0]);
744
  }
745
 
746
  private static function box($func)
includes/vendor/symfony/filesystem/LockHandler.php CHANGED
@@ -83,7 +83,7 @@ class LockHandler
83
 
84
  if (!$this->handle = fopen($this->file, 'r+') ?: fopen($this->file, 'r')) {
85
  if ($this->handle = fopen($this->file, 'x')) {
86
- chmod($this->file, 0444);
87
  } elseif (!$this->handle = fopen($this->file, 'r+') ?: fopen($this->file, 'r')) {
88
  usleep(100); // Give some time for chmod() to complete
89
  $this->handle = fopen($this->file, 'r+') ?: fopen($this->file, 'r');
83
 
84
  if (!$this->handle = fopen($this->file, 'r+') ?: fopen($this->file, 'r')) {
85
  if ($this->handle = fopen($this->file, 'x')) {
86
+ chmod($this->file, 0666);
87
  } elseif (!$this->handle = fopen($this->file, 'r+') ?: fopen($this->file, 'r')) {
88
  usleep(100); // Give some time for chmod() to complete
89
  $this->handle = fopen($this->file, 'r+') ?: fopen($this->file, 'r');
includes/vendor/symfony/filesystem/Tests/ExceptionTest.php CHANGED
@@ -12,8 +12,8 @@
12
  namespace Symfony\Component\Filesystem\Tests;
13
 
14
  use PHPUnit\Framework\TestCase;
15
- use Symfony\Component\Filesystem\Exception\IOException;
16
  use Symfony\Component\Filesystem\Exception\FileNotFoundException;
 
17
 
18
  /**
19
  * Test class for Filesystem.
12
  namespace Symfony\Component\Filesystem\Tests;
13
 
14
  use PHPUnit\Framework\TestCase;
 
15
  use Symfony\Component\Filesystem\Exception\FileNotFoundException;
16
+ use Symfony\Component\Filesystem\Exception\IOException;
17
 
18
  /**
19
  * Test class for Filesystem.
includes/vendor/symfony/filesystem/Tests/FilesystemTest.php CHANGED
@@ -18,8 +18,8 @@ class FilesystemTest extends FilesystemTestCase
18
  {
19
  public function testCopyCreatesNewFile()
20
  {
21
- $sourceFilePath = $this->workspace.DIRECTORY_SEPARATOR.'copy_source_file';
22
- $targetFilePath = $this->workspace.DIRECTORY_SEPARATOR.'copy_target_file';
23
 
24
  file_put_contents($sourceFilePath, 'SOURCE FILE');
25
 
@@ -34,8 +34,8 @@ class FilesystemTest extends FilesystemTestCase
34
  */
35
  public function testCopyFails()
36
  {
37
- $sourceFilePath = $this->workspace.DIRECTORY_SEPARATOR.'copy_source_file';
38
- $targetFilePath = $this->workspace.DIRECTORY_SEPARATOR.'copy_target_file';
39
 
40
  $this->filesystem->copy($sourceFilePath, $targetFilePath);
41
  }
@@ -46,12 +46,12 @@ class FilesystemTest extends FilesystemTestCase
46
  public function testCopyUnreadableFileFails()
47
  {
48
  // skip test on Windows; PHP can't easily set file as unreadable on Windows
49
- if ('\\' === DIRECTORY_SEPARATOR) {
50
  $this->markTestSkipped('This test cannot run on Windows.');
51
  }
52
 
53
- $sourceFilePath = $this->workspace.DIRECTORY_SEPARATOR.'copy_source_file';
54
- $targetFilePath = $this->workspace.DIRECTORY_SEPARATOR.'copy_target_file';
55
 
56
  file_put_contents($sourceFilePath, 'SOURCE FILE');
57
 
@@ -63,8 +63,8 @@ class FilesystemTest extends FilesystemTestCase
63
 
64
  public function testCopyOverridesExistingFileIfModified()
65
  {
66
- $sourceFilePath = $this->workspace.DIRECTORY_SEPARATOR.'copy_source_file';
67
- $targetFilePath = $this->workspace.DIRECTORY_SEPARATOR.'copy_target_file';
68
 
69
  file_put_contents($sourceFilePath, 'SOURCE FILE');
70
  file_put_contents($targetFilePath, 'TARGET FILE');
@@ -78,8 +78,8 @@ class FilesystemTest extends FilesystemTestCase
78
 
79
  public function testCopyDoesNotOverrideExistingFileByDefault()
80
  {
81
- $sourceFilePath = $this->workspace.DIRECTORY_SEPARATOR.'copy_source_file';
82
- $targetFilePath = $this->workspace.DIRECTORY_SEPARATOR.'copy_target_file';
83
 
84
  file_put_contents($sourceFilePath, 'SOURCE FILE');
85
  file_put_contents($targetFilePath, 'TARGET FILE');
@@ -97,8 +97,8 @@ class FilesystemTest extends FilesystemTestCase
97
 
98
  public function testCopyOverridesExistingFileIfForced()
99
  {
100
- $sourceFilePath = $this->workspace.DIRECTORY_SEPARATOR.'copy_source_file';
101
- $targetFilePath = $this->workspace.DIRECTORY_SEPARATOR.'copy_target_file';
102
 
103
  file_put_contents($sourceFilePath, 'SOURCE FILE');
104
  file_put_contents($targetFilePath, 'TARGET FILE');
@@ -120,12 +120,12 @@ class FilesystemTest extends FilesystemTestCase
120
  public function testCopyWithOverrideWithReadOnlyTargetFails()
121
  {
122
  // skip test on Windows; PHP can't easily set file as unwritable on Windows
123
- if ('\\' === DIRECTORY_SEPARATOR) {
124
  $this->markTestSkipped('This test cannot run on Windows.');
125
  }
126
 
127
- $sourceFilePath = $this->workspace.DIRECTORY_SEPARATOR.'copy_source_file';
128
- $targetFilePath = $this->workspace.DIRECTORY_SEPARATOR.'copy_target_file';
129
 
130
  file_put_contents($sourceFilePath, 'SOURCE FILE');
131
  file_put_contents($targetFilePath, 'TARGET FILE');
@@ -143,9 +143,9 @@ class FilesystemTest extends FilesystemTestCase
143
 
144
  public function testCopyCreatesTargetDirectoryIfItDoesNotExist()
145
  {
146
- $sourceFilePath = $this->workspace.DIRECTORY_SEPARATOR.'copy_source_file';
147
- $targetFileDirectory = $this->workspace.DIRECTORY_SEPARATOR.'directory';
148
- $targetFilePath = $targetFileDirectory.DIRECTORY_SEPARATOR.'copy_target_file';
149
 
150
  file_put_contents($sourceFilePath, 'SOURCE FILE');
151
 
@@ -162,7 +162,7 @@ class FilesystemTest extends FilesystemTestCase
162
  public function testCopyForOriginUrlsAndExistingLocalFileDefaultsToCopy()
163
  {
164
  $sourceFilePath = 'http://symfony.com/images/common/logo/logo_symfony_header.png';
165
- $targetFilePath = $this->workspace.DIRECTORY_SEPARATOR.'copy_target_file';
166
 
167
  file_put_contents($targetFilePath, 'TARGET FILE');
168
 
@@ -175,8 +175,8 @@ class FilesystemTest extends FilesystemTestCase
175
  public function testMkdirCreatesDirectoriesRecursively()
176
  {
177
  $directory = $this->workspace
178
- .DIRECTORY_SEPARATOR.'directory'
179
- .DIRECTORY_SEPARATOR.'sub_directory';
180
 
181
  $this->filesystem->mkdir($directory);
182
 
@@ -185,7 +185,7 @@ class FilesystemTest extends FilesystemTestCase
185
 
186
  public function testMkdirCreatesDirectoriesFromArray()
187
  {
188
- $basePath = $this->workspace.DIRECTORY_SEPARATOR;
189
  $directories = array(
190
  $basePath.'1', $basePath.'2', $basePath.'3',
191
  );
@@ -199,7 +199,7 @@ class FilesystemTest extends FilesystemTestCase
199
 
200
  public function testMkdirCreatesDirectoriesFromTraversableObject()
201
  {
202
- $basePath = $this->workspace.DIRECTORY_SEPARATOR;
203
  $directories = new \ArrayObject(array(
204
  $basePath.'1', $basePath.'2', $basePath.'3',
205
  ));
@@ -216,7 +216,7 @@ class FilesystemTest extends FilesystemTestCase
216
  */
217
  public function testMkdirCreatesDirectoriesFails()
218
  {
219
- $basePath = $this->workspace.DIRECTORY_SEPARATOR;
220
  $dir = $basePath.'2';
221
 
222
  file_put_contents($dir, '');
@@ -226,7 +226,7 @@ class FilesystemTest extends FilesystemTestCase
226
 
227
  public function testTouchCreatesEmptyFile()
228
  {
229
- $file = $this->workspace.DIRECTORY_SEPARATOR.'1';
230
 
231
  $this->filesystem->touch($file);
232
 
@@ -238,14 +238,14 @@ class FilesystemTest extends FilesystemTestCase
238
  */
239
  public function testTouchFails()
240
  {
241
- $file = $this->workspace.DIRECTORY_SEPARATOR.'1'.DIRECTORY_SEPARATOR.'2';
242
 
243
  $this->filesystem->touch($file);
244
  }
245
 
246
  public function testTouchCreatesEmptyFilesFromArray()
247
  {
248
- $basePath = $this->workspace.DIRECTORY_SEPARATOR;
249
  $files = array(
250
  $basePath.'1', $basePath.'2', $basePath.'3',
251
  );
@@ -259,7 +259,7 @@ class FilesystemTest extends FilesystemTestCase
259
 
260
  public function testTouchCreatesEmptyFilesFromTraversableObject()
261
  {
262
- $basePath = $this->workspace.DIRECTORY_SEPARATOR;
263
  $files = new \ArrayObject(array(
264
  $basePath.'1', $basePath.'2', $basePath.'3',
265
  ));
@@ -273,7 +273,7 @@ class FilesystemTest extends FilesystemTestCase
273
 
274
  public function testRemoveCleansFilesAndDirectoriesIteratively()
275
  {
276
- $basePath = $this->workspace.DIRECTORY_SEPARATOR.'directory'.DIRECTORY_SEPARATOR;
277
 
278
  mkdir($basePath);
279
  mkdir($basePath.'dir');
@@ -286,7 +286,7 @@ class FilesystemTest extends FilesystemTestCase
286
 
287
  public function testRemoveCleansArrayOfFilesAndDirectories()
288
  {
289
- $basePath = $this->workspace.DIRECTORY_SEPARATOR;
290
 
291
  mkdir($basePath.'dir');
292
  touch($basePath.'file');
@@ -303,7 +303,7 @@ class FilesystemTest extends FilesystemTestCase
303
 
304
  public function testRemoveCleansTraversableObjectOfFilesAndDirectories()
305
  {
306
- $basePath = $this->workspace.DIRECTORY_SEPARATOR;
307
 
308
  mkdir($basePath.'dir');
309
  touch($basePath.'file');
@@ -320,7 +320,7 @@ class FilesystemTest extends FilesystemTestCase
320
 
321
  public function testRemoveIgnoresNonExistingFiles()
322
  {
323
- $basePath = $this->workspace.DIRECTORY_SEPARATOR;
324
 
325
  mkdir($basePath.'dir');
326
 
@@ -337,7 +337,7 @@ class FilesystemTest extends FilesystemTestCase
337
  {
338
  $this->markAsSkippedIfSymlinkIsMissing();
339
 
340
- $basePath = $this->workspace.DIRECTORY_SEPARATOR.'directory'.DIRECTORY_SEPARATOR;
341
 
342
  mkdir($basePath);
343
  mkdir($basePath.'dir');
@@ -350,7 +350,7 @@ class FilesystemTest extends FilesystemTestCase
350
 
351
  // create symlink to nonexistent dir
352
  rmdir($basePath.'dir');
353
- $this->assertFalse('\\' === DIRECTORY_SEPARATOR ? @readlink($basePath.'dir-link') : is_dir($basePath.'dir-link'));
354
 
355
  $this->filesystem->remove($basePath);
356
 
@@ -359,7 +359,7 @@ class FilesystemTest extends FilesystemTestCase
359
 
360
  public function testFilesExists()
361
  {
362
- $basePath = $this->workspace.DIRECTORY_SEPARATOR.'directory'.DIRECTORY_SEPARATOR;
363
 
364
  mkdir($basePath);
365
  touch($basePath.'file1');
@@ -374,7 +374,7 @@ class FilesystemTest extends FilesystemTestCase
374
  */
375
  public function testFilesExistsFails()
376
  {
377
- if ('\\' !== DIRECTORY_SEPARATOR) {
378
  $this->markTestSkipped('Long file names are an issue on Windows');
379
  }
380
  $basePath = $this->workspace.'\\directory\\';
@@ -383,7 +383,7 @@ class FilesystemTest extends FilesystemTestCase
383
  $oldPath = getcwd();
384
  mkdir($basePath);
385
  chdir($basePath);
386
- $file = str_repeat('T', $maxPathLength - strlen($basePath) + 1);
387
  $path = $basePath.$file;
388
  exec('TYPE NUL >>'.$file); // equivalent of touch, we can not use the php touch() here because it suffers from the same limitation
389
  $this->longPathNamesWindows[] = $path; // save this so we can clean up later
@@ -393,7 +393,7 @@ class FilesystemTest extends FilesystemTestCase
393
 
394
  public function testFilesExistsTraversableObjectOfFilesAndDirectories()
395
  {
396
- $basePath = $this->workspace.DIRECTORY_SEPARATOR;
397
 
398
  mkdir($basePath.'dir');
399
  touch($basePath.'file');
@@ -407,7 +407,7 @@ class FilesystemTest extends FilesystemTestCase
407
 
408
  public function testFilesNotExistsTraversableObjectOfFilesAndDirectories()
409
  {
410
- $basePath = $this->workspace.DIRECTORY_SEPARATOR;
411
 
412
  mkdir($basePath.'dir');
413
  touch($basePath.'file');
@@ -424,7 +424,7 @@ class FilesystemTest extends FilesystemTestCase
424
 
425
  public function testInvalidFileNotExists()
426
  {
427
- $basePath = $this->workspace.DIRECTORY_SEPARATOR.'directory'.DIRECTORY_SEPARATOR;
428
 
429
  $this->assertFalse($this->filesystem->exists($basePath.time()));
430
  }
@@ -433,9 +433,9 @@ class FilesystemTest extends FilesystemTestCase
433
  {
434
  $this->markAsSkippedIfChmodIsMissing();
435
 
436
- $dir = $this->workspace.DIRECTORY_SEPARATOR.'dir';
437
  mkdir($dir);
438
- $file = $dir.DIRECTORY_SEPARATOR.'file';
439
  touch($file);
440
 
441
  $this->filesystem->chmod($file, 0400);
@@ -449,11 +449,11 @@ class FilesystemTest extends FilesystemTestCase
449
  {
450
  $this->markAsSkippedIfChmodIsMissing();
451
 
452
- if (defined('HHVM_VERSION')) {
453
  $this->markTestSkipped('chmod() changes permissions even when passing invalid modes on HHVM');
454
  }
455
 
456
- $dir = $this->workspace.DIRECTORY_SEPARATOR.'file';
457
  touch($dir);
458
 
459
  $permissions = fileperms($dir);
@@ -467,9 +467,9 @@ class FilesystemTest extends FilesystemTestCase
467
  {
468
  $this->markAsSkippedIfChmodIsMissing();
469
 
470
- $dir = $this->workspace.DIRECTORY_SEPARATOR.'dir';
471
  mkdir($dir);
472
- $file = $dir.DIRECTORY_SEPARATOR.'file';
473
  touch($file);
474
 
475
  $this->filesystem->chmod($file, 0400, 0000, true);
@@ -483,7 +483,7 @@ class FilesystemTest extends FilesystemTestCase
483
  {
484
  $this->markAsSkippedIfChmodIsMissing();
485
 
486
- $file = $this->workspace.DIRECTORY_SEPARATOR.'file';
487
  touch($file);
488
 
489
  $this->filesystem->chmod($file, 0770, 0022);
@@ -494,8 +494,8 @@ class FilesystemTest extends FilesystemTestCase
494
  {
495
  $this->markAsSkippedIfChmodIsMissing();
496
 
497
- $directory = $this->workspace.DIRECTORY_SEPARATOR.'directory';
498
- $file = $this->workspace.DIRECTORY_SEPARATOR.'file';
499
  $files = array($directory, $file);
500
 
501
  mkdir($directory);
@@ -511,8 +511,8 @@ class FilesystemTest extends FilesystemTestCase
511
  {
512
  $this->markAsSkippedIfChmodIsMissing();
513
 
514
- $directory = $this->workspace.DIRECTORY_SEPARATOR.'directory';
515
- $file = $this->workspace.DIRECTORY_SEPARATOR.'file';
516
  $files = new \ArrayObject(array($directory, $file));
517
 
518
  mkdir($directory);
@@ -528,8 +528,8 @@ class FilesystemTest extends FilesystemTestCase
528
  {
529
  $this->markAsSkippedIfChmodIsMissing();
530
 
531
- $directory = $this->workspace.DIRECTORY_SEPARATOR.'directory';
532
- $subdirectory = $directory.DIRECTORY_SEPARATOR.'subdirectory';
533
 
534
  mkdir($directory);
535
  mkdir($subdirectory);
@@ -544,7 +544,7 @@ class FilesystemTest extends FilesystemTestCase
544
  {
545
  $this->markAsSkippedIfPosixIsMissing();
546
 
547
- $dir = $this->workspace.DIRECTORY_SEPARATOR.'dir';
548
  mkdir($dir);
549
 
550
  $owner = $this->getFileOwner($dir);
@@ -557,9 +557,9 @@ class FilesystemTest extends FilesystemTestCase
557
  {
558
  $this->markAsSkippedIfPosixIsMissing();
559
 
560
- $dir = $this->workspace.DIRECTORY_SEPARATOR.'dir';
561
  mkdir($dir);
562
- $file = $dir.DIRECTORY_SEPARATOR.'file';
563
  touch($file);
564
 
565
  $owner = $this->getFileOwner($dir);
@@ -572,8 +572,8 @@ class FilesystemTest extends FilesystemTestCase
572
  {
573
  $this->markAsSkippedIfSymlinkIsMissing();
574
 
575
- $file = $this->workspace.DIRECTORY_SEPARATOR.'file';
576
- $link = $this->workspace.DIRECTORY_SEPARATOR.'link';
577
 
578
  touch($file);
579
 
@@ -589,8 +589,8 @@ class FilesystemTest extends FilesystemTestCase
589
  {
590
  $this->markAsSkippedIfLinkIsMissing();
591
 
592
- $file = $this->workspace.DIRECTORY_SEPARATOR.'file';
593
- $link = $this->workspace.DIRECTORY_SEPARATOR.'link';
594
 
595
  touch($file);
596
 
@@ -609,8 +609,8 @@ class FilesystemTest extends FilesystemTestCase
609
  {
610
  $this->markAsSkippedIfSymlinkIsMissing();
611
 
612
- $file = $this->workspace.DIRECTORY_SEPARATOR.'file';
613
- $link = $this->workspace.DIRECTORY_SEPARATOR.'link';
614
 
615
  touch($file);
616
 
@@ -626,8 +626,8 @@ class FilesystemTest extends FilesystemTestCase
626
  {
627
  $this->markAsSkippedIfLinkIsMissing();
628
 
629
- $file = $this->workspace.DIRECTORY_SEPARATOR.'file';
630
- $link = $this->workspace.DIRECTORY_SEPARATOR.'link';
631
 
632
  touch($file);
633
 
@@ -643,7 +643,7 @@ class FilesystemTest extends FilesystemTestCase
643
  {
644
  $this->markAsSkippedIfPosixIsMissing();
645
 
646
- $dir = $this->workspace.DIRECTORY_SEPARATOR.'dir';
647
  mkdir($dir);
648
 
649
  $this->filesystem->chown($dir, 'user'.time().mt_rand(1000, 9999));
@@ -653,7 +653,7 @@ class FilesystemTest extends FilesystemTestCase
653
  {
654
  $this->markAsSkippedIfPosixIsMissing();
655
 
656
- $dir = $this->workspace.DIRECTORY_SEPARATOR.'dir';
657
  mkdir($dir);
658
 
659
  $group = $this->getFileGroup($dir);
@@ -666,9 +666,9 @@ class FilesystemTest extends FilesystemTestCase
666
  {
667
  $this->markAsSkippedIfPosixIsMissing();
668
 
669
- $dir = $this->workspace.DIRECTORY_SEPARATOR.'dir';
670
  mkdir($dir);
671
- $file = $dir.DIRECTORY_SEPARATOR.'file';
672
  touch($file);
673
 
674
  $group = $this->getFileGroup($dir);
@@ -681,8 +681,8 @@ class FilesystemTest extends FilesystemTestCase
681
  {
682
  $this->markAsSkippedIfSymlinkIsMissing();
683
 
684
- $file = $this->workspace.DIRECTORY_SEPARATOR.'file';
685
- $link = $this->workspace.DIRECTORY_SEPARATOR.'link';
686
 
687
  touch($file);
688
 
@@ -698,8 +698,8 @@ class FilesystemTest extends FilesystemTestCase
698
  {
699
  $this->markAsSkippedIfLinkIsMissing();
700
 
701
- $file = $this->workspace.DIRECTORY_SEPARATOR.'file';
702
- $link = $this->workspace.DIRECTORY_SEPARATOR.'link';
703
 
704
  touch($file);
705
 
@@ -718,8 +718,8 @@ class FilesystemTest extends FilesystemTestCase
718
  {
719
  $this->markAsSkippedIfSymlinkIsMissing();
720
 
721
- $file = $this->workspace.DIRECTORY_SEPARATOR.'file';
722
- $link = $this->workspace.DIRECTORY_SEPARATOR.'link';
723
 
724
  touch($file);
725
 
@@ -735,8 +735,8 @@ class FilesystemTest extends FilesystemTestCase
735
  {
736
  $this->markAsSkippedIfLinkIsMissing();
737
 
738
- $file = $this->workspace.DIRECTORY_SEPARATOR.'file';
739
- $link = $this->workspace.DIRECTORY_SEPARATOR.'link';
740
 
741
  touch($file);
742
 
@@ -752,7 +752,7 @@ class FilesystemTest extends FilesystemTestCase
752
  {
753
  $this->markAsSkippedIfPosixIsMissing();
754
 
755
- $dir = $this->workspace.DIRECTORY_SEPARATOR.'dir';
756
  mkdir($dir);
757
 
758
  $this->filesystem->chgrp($dir, 'user'.time().mt_rand(1000, 9999));
@@ -760,8 +760,8 @@ class FilesystemTest extends FilesystemTestCase
760
 
761
  public function testRename()
762
  {
763
- $file = $this->workspace.DIRECTORY_SEPARATOR.'file';
764
- $newPath = $this->workspace.DIRECTORY_SEPARATOR.'new_file';
765
  touch($file);
766
 
767
  $this->filesystem->rename($file, $newPath);
@@ -775,8 +775,8 @@ class FilesystemTest extends FilesystemTestCase
775
  */
776
  public function testRenameThrowsExceptionIfTargetAlreadyExists()
777
  {
778
- $file = $this->workspace.DIRECTORY_SEPARATOR.'file';
779
- $newPath = $this->workspace.DIRECTORY_SEPARATOR.'new_file';
780
 
781
  touch($file);
782
  touch($newPath);
@@ -786,8 +786,8 @@ class FilesystemTest extends FilesystemTestCase
786
 
787
  public function testRenameOverwritesTheTargetIfItAlreadyExists()
788
  {
789
- $file = $this->workspace.DIRECTORY_SEPARATOR.'file';
790
- $newPath = $this->workspace.DIRECTORY_SEPARATOR.'new_file';
791
 
792
  touch($file);
793
  touch($newPath);
@@ -803,20 +803,20 @@ class FilesystemTest extends FilesystemTestCase
803
  */
804
  public function testRenameThrowsExceptionOnError()
805
  {
806
- $file = $this->workspace.DIRECTORY_SEPARATOR.uniqid('fs_test_', true);
807
- $newPath = $this->workspace.DIRECTORY_SEPARATOR.'new_file';
808
 
809
  $this->filesystem->rename($file, $newPath);
810
  }
811
 
812
  public function testSymlink()
813
  {
814
- if ('\\' === DIRECTORY_SEPARATOR) {
815
  $this->markTestSkipped('Windows does not support creating "broken" symlinks');
816
  }
817
 
818
- $file = $this->workspace.DIRECTORY_SEPARATOR.'file';
819
- $link = $this->workspace.DIRECTORY_SEPARATOR.'link';
820
 
821
  // $file does not exists right now: creating "broken" links is a wanted feature
822
  $this->filesystem->symlink($file, $link);
@@ -836,7 +836,7 @@ class FilesystemTest extends FilesystemTestCase
836
  {
837
  $this->markAsSkippedIfSymlinkIsMissing();
838
 
839
- $link = $this->workspace.DIRECTORY_SEPARATOR.'link';
840
 
841
  $this->filesystem->remove($link);
842
 
@@ -849,8 +849,8 @@ class FilesystemTest extends FilesystemTestCase
849
  {
850
  $this->markAsSkippedIfSymlinkIsMissing();
851
 
852
- $file = $this->workspace.DIRECTORY_SEPARATOR.'file';
853
- $link = $this->workspace.DIRECTORY_SEPARATOR.'link';
854
 
855
  touch($file);
856
  symlink($this->workspace, $link);
@@ -865,8 +865,8 @@ class FilesystemTest extends FilesystemTestCase
865
  {
866
  $this->markAsSkippedIfSymlinkIsMissing();
867
 
868
- $file = $this->workspace.DIRECTORY_SEPARATOR.'file';
869
- $link = $this->workspace.DIRECTORY_SEPARATOR.'link';
870
 
871
  touch($file);
872
  symlink($file, $link);
@@ -881,9 +881,9 @@ class FilesystemTest extends FilesystemTestCase
881
  {
882
  $this->markAsSkippedIfSymlinkIsMissing();
883
 
884
- $file = $this->workspace.DIRECTORY_SEPARATOR.'file';
885
- $link1 = $this->workspace.DIRECTORY_SEPARATOR.'dir'.DIRECTORY_SEPARATOR.'link';
886
- $link2 = $this->workspace.DIRECTORY_SEPARATOR.'dir'.DIRECTORY_SEPARATOR.'subdir'.DIRECTORY_SEPARATOR.'link';
887
 
888
  touch($file);
889
 
@@ -900,8 +900,8 @@ class FilesystemTest extends FilesystemTestCase
900
  {
901
  $this->markAsSkippedIfLinkIsMissing();
902
 
903
- $file = $this->workspace.DIRECTORY_SEPARATOR.'file';
904
- $link = $this->workspace.DIRECTORY_SEPARATOR.'link';
905
 
906
  touch($file);
907
  $this->filesystem->hardlink($file, $link);
@@ -917,7 +917,7 @@ class FilesystemTest extends FilesystemTestCase
917
  {
918
  $this->markAsSkippedIfLinkIsMissing();
919
 
920
- $link = $this->workspace.DIRECTORY_SEPARATOR.'link';
921
 
922
  $this->filesystem->remove($link);
923
 
@@ -928,9 +928,9 @@ class FilesystemTest extends FilesystemTestCase
928
  {
929
  $this->markAsSkippedIfLinkIsMissing();
930
 
931
- $file = $this->workspace.DIRECTORY_SEPARATOR.'file';
932
- $file2 = $this->workspace.DIRECTORY_SEPARATOR.'file2';
933
- $link = $this->workspace.DIRECTORY_SEPARATOR.'link';
934
 
935
  touch($file);
936
  touch($file2);
@@ -946,8 +946,8 @@ class FilesystemTest extends FilesystemTestCase
946
  {
947
  $this->markAsSkippedIfLinkIsMissing();
948
 
949
- $file = $this->workspace.DIRECTORY_SEPARATOR.'file';
950
- $link = $this->workspace.DIRECTORY_SEPARATOR.'link';
951
 
952
  touch($file);
953
  link($file, $link);
@@ -962,9 +962,9 @@ class FilesystemTest extends FilesystemTestCase
962
  {
963
  $this->markAsSkippedIfLinkIsMissing();
964
 
965
- $file = $this->workspace.DIRECTORY_SEPARATOR.'file';
966
- $link1 = $this->workspace.DIRECTORY_SEPARATOR.'link';
967
- $link2 = $this->workspace.DIRECTORY_SEPARATOR.'link2';
968
 
969
  touch($file);
970
 
@@ -980,8 +980,8 @@ class FilesystemTest extends FilesystemTestCase
980
  {
981
  $this->markAsSkippedIfLinkIsMissing();
982
 
983
- $file = $this->workspace.DIRECTORY_SEPARATOR.'file';
984
- $link = $this->workspace.DIRECTORY_SEPARATOR.'link';
985
 
986
  touch($file);
987
 
@@ -996,7 +996,7 @@ class FilesystemTest extends FilesystemTestCase
996
  {
997
  $this->markAsSkippedIfSymlinkIsMissing();
998
 
999
- if ('\\' === DIRECTORY_SEPARATOR) {
1000
  $this->markTestSkipped('Relative symbolic links are not supported on Windows');
1001
  }
1002
 
@@ -1038,7 +1038,7 @@ class FilesystemTest extends FilesystemTestCase
1038
  {
1039
  $this->markAsSkippedIfSymlinkIsMissing();
1040
 
1041
- if ('\\' === DIRECTORY_SEPARATOR) {
1042
  $this->markTestSkipped('Windows does not support creating "broken" symlinks');
1043
  }
1044
 
@@ -1134,7 +1134,7 @@ class FilesystemTest extends FilesystemTestCase
1134
  array('C:/../../aa/../bb/cc', 'C:/aa/dd/..', '../bb/cc/'),
1135
  );
1136
 
1137
- if ('\\' === DIRECTORY_SEPARATOR) {
1138
  $paths[] = array('c:\var\lib/symfony/src/Symfony/', 'c:/var/lib/symfony/', 'src/Symfony/');
1139
  }
1140
 
@@ -1173,8 +1173,8 @@ class FilesystemTest extends FilesystemTestCase
1173
 
1174
  public function testMirrorCopiesFilesAndDirectoriesRecursively()
1175
  {
1176
- $sourcePath = $this->workspace.DIRECTORY_SEPARATOR.'source'.DIRECTORY_SEPARATOR;
1177
- $directory = $sourcePath.'directory'.DIRECTORY_SEPARATOR;
1178
  $file1 = $directory.'file1';
1179
  $file2 = $sourcePath.'file2';
1180
 
@@ -1183,41 +1183,41 @@ class FilesystemTest extends FilesystemTestCase
1183
  file_put_contents($file1, 'FILE1');
1184
  file_put_contents($file2, 'FILE2');
1185
 
1186
- $targetPath = $this->workspace.DIRECTORY_SEPARATOR.'target'.DIRECTORY_SEPARATOR;
1187
 
1188
  $this->filesystem->mirror($sourcePath, $targetPath);
1189
 
1190
  $this->assertTrue(is_dir($targetPath));
1191
  $this->assertTrue(is_dir($targetPath.'directory'));
1192
- $this->assertFileEquals($file1, $targetPath.'directory'.DIRECTORY_SEPARATOR.'file1');
1193
  $this->assertFileEquals($file2, $targetPath.'file2');
1194
 
1195
  $this->filesystem->remove($file1);
1196
 
1197
  $this->filesystem->mirror($sourcePath, $targetPath, null, array('delete' => false));
1198
- $this->assertTrue($this->filesystem->exists($targetPath.'directory'.DIRECTORY_SEPARATOR.'file1'));
1199
 
1200
  $this->filesystem->mirror($sourcePath, $targetPath, null, array('delete' => true));
1201
- $this->assertFalse($this->filesystem->exists($targetPath.'directory'.DIRECTORY_SEPARATOR.'file1'));
1202
 
1203
  file_put_contents($file1, 'FILE1');
1204
 
1205
  $this->filesystem->mirror($sourcePath, $targetPath, null, array('delete' => true));
1206
- $this->assertTrue($this->filesystem->exists($targetPath.'directory'.DIRECTORY_SEPARATOR.'file1'));
1207
 
1208
  $this->filesystem->remove($directory);
1209
  $this->filesystem->mirror($sourcePath, $targetPath, null, array('delete' => true));
1210
  $this->assertFalse($this->filesystem->exists($targetPath.'directory'));
1211
- $this->assertFalse($this->filesystem->exists($targetPath.'directory'.DIRECTORY_SEPARATOR.'file1'));
1212
  }
1213
 
1214
  public function testMirrorCreatesEmptyDirectory()
1215
  {
1216
- $sourcePath = $this->workspace.DIRECTORY_SEPARATOR.'source'.DIRECTORY_SEPARATOR;
1217
 
1218
  mkdir($sourcePath);
1219
 
1220
- $targetPath = $this->workspace.DIRECTORY_SEPARATOR.'target'.DIRECTORY_SEPARATOR;
1221
 
1222
  $this->filesystem->mirror($sourcePath, $targetPath);
1223
 
@@ -1230,46 +1230,46 @@ class FilesystemTest extends FilesystemTestCase
1230
  {
1231
  $this->markAsSkippedIfSymlinkIsMissing();
1232
 
1233
- $sourcePath = $this->workspace.DIRECTORY_SEPARATOR.'source'.DIRECTORY_SEPARATOR;
1234
 
1235
  mkdir($sourcePath);
1236
  file_put_contents($sourcePath.'file1', 'FILE1');
1237
  symlink($sourcePath.'file1', $sourcePath.'link1');
1238
 
1239
- $targetPath = $this->workspace.DIRECTORY_SEPARATOR.'target'.DIRECTORY_SEPARATOR;
1240
 
1241
  $this->filesystem->mirror($sourcePath, $targetPath);
1242
 
1243
  $this->assertTrue(is_dir($targetPath));
1244
  $this->assertFileEquals($sourcePath.'file1', $targetPath.'link1');
1245
- $this->assertTrue(is_link($targetPath.DIRECTORY_SEPARATOR.'link1'));
1246
  }
1247
 
1248
  public function testMirrorCopiesLinkedDirectoryContents()
1249
  {
1250
  $this->markAsSkippedIfSymlinkIsMissing(true);
1251
 
1252
- $sourcePath = $this->workspace.DIRECTORY_SEPARATOR.'source'.DIRECTORY_SEPARATOR;
1253
 
1254
  mkdir($sourcePath.'nested/', 0777, true);
1255
  file_put_contents($sourcePath.'/nested/file1.txt', 'FILE1');
1256
  // Note: We symlink directory, not file
1257
  symlink($sourcePath.'nested', $sourcePath.'link1');
1258
 
1259
- $targetPath = $this->workspace.DIRECTORY_SEPARATOR.'target'.DIRECTORY_SEPARATOR;
1260
 
1261
  $this->filesystem->mirror($sourcePath, $targetPath);
1262
 
1263
  $this->assertTrue(is_dir($targetPath));
1264
  $this->assertFileEquals($sourcePath.'/nested/file1.txt', $targetPath.'link1/file1.txt');
1265
- $this->assertTrue(is_link($targetPath.DIRECTORY_SEPARATOR.'link1'));
1266
  }
1267
 
1268
  public function testMirrorCopiesRelativeLinkedContents()
1269
  {
1270
  $this->markAsSkippedIfSymlinkIsMissing(true);
1271
 
1272
- $sourcePath = $this->workspace.DIRECTORY_SEPARATOR.'source'.DIRECTORY_SEPARATOR;
1273
  $oldPath = getcwd();
1274
 
1275
  mkdir($sourcePath.'nested/', 0777, true);
@@ -1280,25 +1280,25 @@ class FilesystemTest extends FilesystemTestCase
1280
 
1281
  chdir($oldPath);
1282
 
1283
- $targetPath = $this->workspace.DIRECTORY_SEPARATOR.'target'.DIRECTORY_SEPARATOR;
1284
 
1285
  $this->filesystem->mirror($sourcePath, $targetPath);
1286
 
1287
  $this->assertTrue(is_dir($targetPath));
1288
  $this->assertFileEquals($sourcePath.'/nested/file1.txt', $targetPath.'link1/file1.txt');
1289
- $this->assertTrue(is_link($targetPath.DIRECTORY_SEPARATOR.'link1'));
1290
- $this->assertEquals('\\' === DIRECTORY_SEPARATOR ? realpath($sourcePath.'\nested') : 'nested', readlink($targetPath.DIRECTORY_SEPARATOR.'link1'));
1291
  }
1292
 
1293
  public function testMirrorContentsWithSameNameAsSourceOrTargetWithoutDeleteOption()
1294
  {
1295
- $sourcePath = $this->workspace.DIRECTORY_SEPARATOR.'source'.DIRECTORY_SEPARATOR;
1296
 
1297
  mkdir($sourcePath);
1298
  touch($sourcePath.'source');
1299
  touch($sourcePath.'target');
1300
 
1301
- $targetPath = $this->workspace.DIRECTORY_SEPARATOR.'target'.DIRECTORY_SEPARATOR;
1302
 
1303
  $oldPath = getcwd();
1304
  chdir($this->workspace);
@@ -1314,12 +1314,12 @@ class FilesystemTest extends FilesystemTestCase
1314
 
1315
  public function testMirrorContentsWithSameNameAsSourceOrTargetWithDeleteOption()
1316
  {
1317
- $sourcePath = $this->workspace.DIRECTORY_SEPARATOR.'source'.DIRECTORY_SEPARATOR;
1318
 
1319
  mkdir($sourcePath);
1320
  touch($sourcePath.'source');
1321
 
1322
- $targetPath = $this->workspace.DIRECTORY_SEPARATOR.'target'.DIRECTORY_SEPARATOR;
1323
 
1324
  mkdir($targetPath);
1325
  touch($targetPath.'source');
@@ -1452,11 +1452,11 @@ class FilesystemTest extends FilesystemTestCase
1452
  public function testTempnamOnUnwritableFallsBackToSysTmp()
1453
  {
1454
  $scheme = 'file://';
1455
- $dirname = $scheme.$this->workspace.DIRECTORY_SEPARATOR.'does_not_exist';
1456
 
1457
  $filename = $this->filesystem->tempnam($dirname, 'bar');
1458
  $realTempDir = realpath(sys_get_temp_dir());
1459
- $this->assertStringStartsWith(rtrim($scheme.$realTempDir, DIRECTORY_SEPARATOR), $filename);
1460
  $this->assertFileExists($filename);
1461
 
1462
  // Tear down
@@ -1465,10 +1465,10 @@ class FilesystemTest extends FilesystemTestCase
1465
 
1466
  public function testDumpFile()
1467
  {
1468
- $filename = $this->workspace.DIRECTORY_SEPARATOR.'foo'.DIRECTORY_SEPARATOR.'baz.txt';
1469
 
1470
  // skip mode check on Windows
1471
- if ('\\' !== DIRECTORY_SEPARATOR) {
1472
  $oldMask = umask(0002);
1473
  }
1474
 
@@ -1477,15 +1477,40 @@ class FilesystemTest extends FilesystemTestCase
1477
  $this->assertStringEqualsFile($filename, 'bar');
1478
 
1479
  // skip mode check on Windows
1480
- if ('\\' !== DIRECTORY_SEPARATOR) {
1481
  $this->assertFilePermissions(664, $filename);
1482
  umask($oldMask);
1483
  }
1484
  }
1485
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1486
  public function testDumpFileOverwritesAnExistingFile()
1487
  {
1488
- $filename = $this->workspace.DIRECTORY_SEPARATOR.'foo.txt';
1489
  file_put_contents($filename, 'FOO BAR');
1490
 
1491
  $this->filesystem->dumpFile($filename, 'bar');
@@ -1496,12 +1521,12 @@ class FilesystemTest extends FilesystemTestCase
1496
 
1497
  public function testDumpFileWithFileScheme()
1498
  {
1499
- if (defined('HHVM_VERSION')) {
1500
  $this->markTestSkipped('HHVM does not handle the file:// scheme correctly');
1501
  }
1502
 
1503
  $scheme = 'file://';
1504
- $filename = $scheme.$this->workspace.DIRECTORY_SEPARATOR.'foo'.DIRECTORY_SEPARATOR.'baz.txt';
1505
 
1506
  $this->filesystem->dumpFile($filename, 'bar');
1507
 
@@ -1512,7 +1537,7 @@ class FilesystemTest extends FilesystemTestCase
1512
  public function testDumpFileWithZlibScheme()
1513
  {
1514
  $scheme = 'compress.zlib://';
1515
- $filename = $this->workspace.DIRECTORY_SEPARATOR.'foo'.DIRECTORY_SEPARATOR.'baz.txt';
1516
 
1517
  $this->filesystem->dumpFile($filename, 'bar');
1518
 
@@ -1523,10 +1548,10 @@ class FilesystemTest extends FilesystemTestCase
1523
 
1524
  public function testAppendToFile()
1525
  {
1526
- $filename = $this->workspace.DIRECTORY_SEPARATOR.'foo'.DIRECTORY_SEPARATOR.'bar.txt';
1527
 
1528
  // skip mode check on Windows
1529
- if ('\\' !== DIRECTORY_SEPARATOR) {
1530
  $oldMask = umask(0002);
1531
  }
1532
 
@@ -1538,7 +1563,7 @@ class FilesystemTest extends FilesystemTestCase
1538
  $this->assertStringEqualsFile($filename, 'foobar');
1539
 
1540
  // skip mode check on Windows
1541
- if ('\\' !== DIRECTORY_SEPARATOR) {
1542
  $this->assertFilePermissions(664, $filename);
1543
  umask($oldMask);
1544
  }
@@ -1546,12 +1571,12 @@ class FilesystemTest extends FilesystemTestCase
1546
 
1547
  public function testAppendToFileWithScheme()
1548
  {
1549
- if (defined('HHVM_VERSION')) {
1550
  $this->markTestSkipped('HHVM does not handle the file:// scheme correctly');
1551
  }
1552
 
1553
  $scheme = 'file://';
1554
- $filename = $scheme.$this->workspace.DIRECTORY_SEPARATOR.'foo'.DIRECTORY_SEPARATOR.'baz.txt';
1555
  $this->filesystem->dumpFile($filename, 'foo');
1556
 
1557
  $this->filesystem->appendToFile($filename, 'bar');
@@ -1563,7 +1588,7 @@ class FilesystemTest extends FilesystemTestCase
1563
  public function testAppendToFileWithZlibScheme()
1564
  {
1565
  $scheme = 'compress.zlib://';
1566
- $filename = $this->workspace.DIRECTORY_SEPARATOR.'foo'.DIRECTORY_SEPARATOR.'baz.txt';
1567
  $this->filesystem->dumpFile($filename, 'foo');
1568
 
1569
  // Zlib stat uses file:// wrapper so remove it
@@ -1577,17 +1602,17 @@ class FilesystemTest extends FilesystemTestCase
1577
 
1578
  public function testAppendToFileCreateTheFileIfNotExists()
1579
  {
1580
- $filename = $this->workspace.DIRECTORY_SEPARATOR.'foo'.DIRECTORY_SEPARATOR.'bar.txt';
1581
 
1582
  // skip mode check on Windows
1583
- if ('\\' !== DIRECTORY_SEPARATOR) {
1584
  $oldMask = umask(0002);
1585
  }
1586
 
1587
  $this->filesystem->appendToFile($filename, 'bar');
1588
 
1589
  // skip mode check on Windows
1590
- if ('\\' !== DIRECTORY_SEPARATOR) {
1591
  $this->assertFilePermissions(664, $filename);
1592
  umask($oldMask);
1593
  }
@@ -1600,7 +1625,7 @@ class FilesystemTest extends FilesystemTestCase
1600
  {
1601
  $this->markAsSkippedIfChmodIsMissing();
1602
 
1603
- $filename = $this->workspace.DIRECTORY_SEPARATOR.'foo.txt';
1604
  file_put_contents($filename, 'FOO BAR');
1605
  chmod($filename, 0745);
1606
 
@@ -1613,8 +1638,8 @@ class FilesystemTest extends FilesystemTestCase
1613
  {
1614
  $this->markAsSkippedIfChmodIsMissing();
1615
 
1616
- $sourceFilePath = $this->workspace.DIRECTORY_SEPARATOR.'copy_source_file';
1617
- $targetFilePath = $this->workspace.DIRECTORY_SEPARATOR.'copy_target_file';
1618
 
1619
  file_put_contents($sourceFilePath, 'SOURCE FILE');
1620
  chmod($sourceFilePath, 0745);
@@ -1633,6 +1658,6 @@ class FilesystemTest extends FilesystemTestCase
1633
  */
1634
  private function normalize($path)
1635
  {
1636
- return str_replace('/', DIRECTORY_SEPARATOR, $path);
1637
  }
1638
  }
18
  {
19
  public function testCopyCreatesNewFile()
20
  {
21
+ $sourceFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_source_file';
22
+ $targetFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_target_file';
23
 
24
  file_put_contents($sourceFilePath, 'SOURCE FILE');
25
 
34
  */
35
  public function testCopyFails()
36
  {
37
+ $sourceFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_source_file';
38
+ $targetFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_target_file';
39
 
40
  $this->filesystem->copy($sourceFilePath, $targetFilePath);
41
  }
46
  public function testCopyUnreadableFileFails()
47
  {
48
  // skip test on Windows; PHP can't easily set file as unreadable on Windows
49
+ if ('\\' === \DIRECTORY_SEPARATOR) {
50
  $this->markTestSkipped('This test cannot run on Windows.');
51
  }
52
 
53
+ $sourceFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_source_file';
54
+ $targetFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_target_file';
55
 
56
  file_put_contents($sourceFilePath, 'SOURCE FILE');
57
 
63
 
64
  public function testCopyOverridesExistingFileIfModified()
65
  {
66
+ $sourceFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_source_file';
67
+ $targetFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_target_file';
68
 
69
  file_put_contents($sourceFilePath, 'SOURCE FILE');
70
  file_put_contents($targetFilePath, 'TARGET FILE');
78
 
79
  public function testCopyDoesNotOverrideExistingFileByDefault()
80
  {
81
+ $sourceFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_source_file';
82
+ $targetFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_target_file';
83
 
84
  file_put_contents($sourceFilePath, 'SOURCE FILE');
85
  file_put_contents($targetFilePath, 'TARGET FILE');
97
 
98
  public function testCopyOverridesExistingFileIfForced()
99
  {
100
+ $sourceFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_source_file';
101
+ $targetFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_target_file';
102
 
103
  file_put_contents($sourceFilePath, 'SOURCE FILE');
104
  file_put_contents($targetFilePath, 'TARGET FILE');
120
  public function testCopyWithOverrideWithReadOnlyTargetFails()
121
  {
122
  // skip test on Windows; PHP can't easily set file as unwritable on Windows
123
+ if ('\\' === \DIRECTORY_SEPARATOR) {
124
  $this->markTestSkipped('This test cannot run on Windows.');
125
  }
126
 
127
+ $sourceFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_source_file';
128
+ $targetFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_target_file';
129
 
130
  file_put_contents($sourceFilePath, 'SOURCE FILE');
131
  file_put_contents($targetFilePath, 'TARGET FILE');
143
 
144
  public function testCopyCreatesTargetDirectoryIfItDoesNotExist()
145
  {
146
+ $sourceFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_source_file';
147
+ $targetFileDirectory = $this->workspace.\DIRECTORY_SEPARATOR.'directory';
148
+ $targetFilePath = $targetFileDirectory.\DIRECTORY_SEPARATOR.'copy_target_file';
149
 
150
  file_put_contents($sourceFilePath, 'SOURCE FILE');
151
 
162
  public function testCopyForOriginUrlsAndExistingLocalFileDefaultsToCopy()
163
  {
164
  $sourceFilePath = 'http://symfony.com/images/common/logo/logo_symfony_header.png';
165
+ $targetFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_target_file';
166
 
167
  file_put_contents($targetFilePath, 'TARGET FILE');
168
 
175
  public function testMkdirCreatesDirectoriesRecursively()
176
  {
177
  $directory = $this->workspace
178
+ .\DIRECTORY_SEPARATOR.'directory'
179
+ .\DIRECTORY_SEPARATOR.'sub_directory';
180
 
181
  $this->filesystem->mkdir($directory);
182
 
185
 
186
  public function testMkdirCreatesDirectoriesFromArray()
187
  {
188
+ $basePath = $this->workspace.\DIRECTORY_SEPARATOR;
189
  $directories = array(
190
  $basePath.'1', $basePath.'2', $basePath.'3',
191
  );
199
 
200
  public function testMkdirCreatesDirectoriesFromTraversableObject()
201
  {
202
+ $basePath = $this->workspace.\DIRECTORY_SEPARATOR;
203
  $directories = new \ArrayObject(array(
204
  $basePath.'1', $basePath.'2', $basePath.'3',
205
  ));
216
  */
217
  public function testMkdirCreatesDirectoriesFails()
218
  {
219
+ $basePath = $this->workspace.\DIRECTORY_SEPARATOR;
220
  $dir = $basePath.'2';
221
 
222
  file_put_contents($dir, '');
226
 
227
  public function testTouchCreatesEmptyFile()
228
  {
229
+ $file = $this->workspace.\DIRECTORY_SEPARATOR.'1';
230
 
231
  $this->filesystem->touch($file);
232
 
238
  */
239
  public function testTouchFails()
240
  {
241
+ $file = $this->workspace.\DIRECTORY_SEPARATOR.'1'.\DIRECTORY_SEPARATOR.'2';
242
 
243
  $this->filesystem->touch($file);
244
  }
245
 
246
  public function testTouchCreatesEmptyFilesFromArray()
247
  {
248
+ $basePath = $this->workspace.\DIRECTORY_SEPARATOR;
249
  $files = array(
250
  $basePath.'1', $basePath.'2', $basePath.'3',
251
  );
259
 
260
  public function testTouchCreatesEmptyFilesFromTraversableObject()
261
  {
262
+ $basePath = $this->workspace.\DIRECTORY_SEPARATOR;
263
  $files = new \ArrayObject(array(
264
  $basePath.'1', $basePath.'2', $basePath.'3',
265
  ));
273
 
274
  public function testRemoveCleansFilesAndDirectoriesIteratively()
275
  {
276
+ $basePath = $this->workspace.\DIRECTORY_SEPARATOR.'directory'.\DIRECTORY_SEPARATOR;
277
 
278
  mkdir($basePath);
279
  mkdir($basePath.'dir');
286
 
287
  public function testRemoveCleansArrayOfFilesAndDirectories()
288
  {
289
+ $basePath = $this->workspace.\DIRECTORY_SEPARATOR;
290
 
291
  mkdir($basePath.'dir');
292
  touch($basePath.'file');
303
 
304
  public function testRemoveCleansTraversableObjectOfFilesAndDirectories()
305
  {
306
+ $basePath = $this->workspace.\DIRECTORY_SEPARATOR;
307
 
308
  mkdir($basePath.'dir');
309
  touch($basePath.'file');
320
 
321
  public function testRemoveIgnoresNonExistingFiles()
322
  {
323
+ $basePath = $this->workspace.\DIRECTORY_SEPARATOR;
324
 
325
  mkdir($basePath.'dir');
326
 
337
  {
338
  $this->markAsSkippedIfSymlinkIsMissing();
339
 
340
+ $basePath = $this->workspace.\DIRECTORY_SEPARATOR.'directory'.\DIRECTORY_SEPARATOR;
341
 
342
  mkdir($basePath);
343
  mkdir($basePath.'dir');
350
 
351
  // create symlink to nonexistent dir
352
  rmdir($basePath.'dir');
353
+ $this->assertFalse('\\' === \DIRECTORY_SEPARATOR ? @readlink($basePath.'dir-link') : is_dir($basePath.'dir-link'));
354
 
355
  $this->filesystem->remove($basePath);
356
 
359
 
360
  public function testFilesExists()
361
  {
362
+ $basePath = $this->workspace.\DIRECTORY_SEPARATOR.'directory'.\DIRECTORY_SEPARATOR;
363
 
364
  mkdir($basePath);
365
  touch($basePath.'file1');
374
  */
375
  public function testFilesExistsFails()
376
  {
377
+ if ('\\' !== \DIRECTORY_SEPARATOR) {
378
  $this->markTestSkipped('Long file names are an issue on Windows');
379
  }
380
  $basePath = $this->workspace.'\\directory\\';
383
  $oldPath = getcwd();
384
  mkdir($basePath);
385
  chdir($basePath);
386
+ $file = str_repeat('T', $maxPathLength - \strlen($basePath) + 1);
387
  $path = $basePath.$file;
388
  exec('TYPE NUL >>'.$file); // equivalent of touch, we can not use the php touch() here because it suffers from the same limitation
389
  $this->longPathNamesWindows[] = $path; // save this so we can clean up later
393
 
394
  public function testFilesExistsTraversableObjectOfFilesAndDirectories()
395
  {
396
+ $basePath = $this->workspace.\DIRECTORY_SEPARATOR;
397
 
398
  mkdir($basePath.'dir');
399
  touch($basePath.'file');
407
 
408
  public function testFilesNotExistsTraversableObjectOfFilesAndDirectories()
409
  {
410
+ $basePath = $this->workspace.\DIRECTORY_SEPARATOR;
411
 
412
  mkdir($basePath.'dir');
413
  touch($basePath.'file');
424
 
425
  public function testInvalidFileNotExists()
426
  {
427
+ $basePath = $this->workspace.\DIRECTORY_SEPARATOR.'directory'.\DIRECTORY_SEPARATOR;
428
 
429
  $this->assertFalse($this->filesystem->exists($basePath.time()));
430
  }
433
  {
434
  $this->markAsSkippedIfChmodIsMissing();
435
 
436
+ $dir = $this->workspace.\DIRECTORY_SEPARATOR.'dir';
437
  mkdir($dir);
438
+ $file = $dir.\DIRECTORY_SEPARATOR.'file';
439
  touch($file);
440
 
441
  $this->filesystem->chmod($file, 0400);
449
  {
450
  $this->markAsSkippedIfChmodIsMissing();
451
 
452
+ if (\defined('HHVM_VERSION')) {
453
  $this->markTestSkipped('chmod() changes permissions even when passing invalid modes on HHVM');
454
  }
455
 
456
+ $dir = $this->workspace.\DIRECTORY_SEPARATOR.'file';
457
  touch($dir);
458
 
459
  $permissions = fileperms($dir);
467
  {
468
  $this->markAsSkippedIfChmodIsMissing();
469
 
470
+ $dir = $this->workspace.\DIRECTORY_SEPARATOR.'dir';
471
  mkdir($dir);
472
+ $file = $dir.\DIRECTORY_SEPARATOR.'file';
473
  touch($file);
474
 
475
  $this->filesystem->chmod($file, 0400, 0000, true);
483
  {
484
  $this->markAsSkippedIfChmodIsMissing();
485
 
486
+ $file = $this->workspace.\DIRECTORY_SEPARATOR.'file';
487
  touch($file);
488
 
489
  $this->filesystem->chmod($file, 0770, 0022);
494
  {
495
  $this->markAsSkippedIfChmodIsMissing();
496
 
497
+ $directory = $this->workspace.\DIRECTORY_SEPARATOR.'directory';
498
+ $file = $this->workspace.\DIRECTORY_SEPARATOR.'file';
499
  $files = array($directory, $file);
500
 
501
  mkdir($directory);
511
  {
512
  $this->markAsSkippedIfChmodIsMissing();
513
 
514
+ $directory = $this->workspace.\DIRECTORY_SEPARATOR.'directory';
515
+ $file = $this->workspace.\DIRECTORY_SEPARATOR.'file';
516
  $files = new \ArrayObject(array($directory, $file));
517
 
518
  mkdir($directory);
528
  {
529
  $this->markAsSkippedIfChmodIsMissing();
530
 
531
+ $directory = $this->workspace.\DIRECTORY_SEPARATOR.'directory';
532
+ $subdirectory = $directory.\DIRECTORY_SEPARATOR.'subdirectory';
533
 
534
  mkdir($directory);
535
  mkdir($subdirectory);
544
  {
545
  $this->markAsSkippedIfPosixIsMissing();
546
 
547
+ $dir = $this->workspace.\DIRECTORY_SEPARATOR.'dir';
548
  mkdir($dir);
549
 
550
  $owner = $this->getFileOwner($dir);
557
  {
558
  $this->markAsSkippedIfPosixIsMissing();
559
 
560
+ $dir = $this->workspace.\DIRECTORY_SEPARATOR.'dir';
561
  mkdir($dir);
562
+ $file = $dir.\DIRECTORY_SEPARATOR.'file';
563
  touch($file);
564
 
565
  $owner = $this->getFileOwner($dir);
572
  {
573
  $this->markAsSkippedIfSymlinkIsMissing();
574
 
575
+ $file = $this->workspace.\DIRECTORY_SEPARATOR.'file';
576
+ $link = $this->workspace.\DIRECTORY_SEPARATOR.'link';
577
 
578
  touch($file);
579
 
589
  {
590
  $this->markAsSkippedIfLinkIsMissing();
591
 
592
+ $file = $this->workspace.\DIRECTORY_SEPARATOR.'file';
593
+ $link = $this->workspace.\DIRECTORY_SEPARATOR.'link';
594
 
595
  touch($file);
596
 
609
  {
610
  $this->markAsSkippedIfSymlinkIsMissing();
611
 
612
+ $file = $this->workspace.\DIRECTORY_SEPARATOR.'file';
613
+ $link = $this->workspace.\DIRECTORY_SEPARATOR.'link';
614
 
615
  touch($file);
616
 
626
  {
627
  $this->markAsSkippedIfLinkIsMissing();
628
 
629
+ $file = $this->workspace.\DIRECTORY_SEPARATOR.'file';
630
+ $link = $this->workspace.\DIRECTORY_SEPARATOR.'link';
631
 
632
  touch($file);
633
 
643
  {
644
  $this->markAsSkippedIfPosixIsMissing();
645
 
646
+ $dir = $this->workspace.\DIRECTORY_SEPARATOR.'dir';
647
  mkdir($dir);
648
 
649
  $this->filesystem->chown($dir, 'user'.time().mt_rand(1000, 9999));
653
  {
654
  $this->markAsSkippedIfPosixIsMissing();
655
 
656
+ $dir = $this->workspace.\DIRECTORY_SEPARATOR.'dir';
657
  mkdir($dir);
658
 
659
  $group = $this->getFileGroup($dir);
666
  {
667
  $this->markAsSkippedIfPosixIsMissing();
668
 
669
+ $dir = $this->workspace.\DIRECTORY_SEPARATOR.'dir';
670
  mkdir($dir);
671
+ $file = $dir.\DIRECTORY_SEPARATOR.'file';
672
  touch($file);
673
 
674
  $group = $this->getFileGroup($dir);
681
  {
682
  $this->markAsSkippedIfSymlinkIsMissing();
683
 
684
+ $file = $this->workspace.\DIRECTORY_SEPARATOR.'file';
685
+ $link = $this->workspace.\DIRECTORY_SEPARATOR.'link';
686
 
687
  touch($file);
688
 
698
  {
699
  $this->markAsSkippedIfLinkIsMissing();
700
 
701
+ $file = $this->workspace.\DIRECTORY_SEPARATOR.'file';
702
+ $link = $this->workspace.\DIRECTORY_SEPARATOR.'link';
703
 
704
  touch($file);
705
 
718
  {
719
  $this->markAsSkippedIfSymlinkIsMissing();
720
 
721
+ $file = $this->workspace.\DIRECTORY_SEPARATOR.'file';
722
+ $link = $this->workspace.\DIRECTORY_SEPARATOR.'link';
723
 
724
  touch($file);
725
 
735
  {
736
  $this->markAsSkippedIfLinkIsMissing();
737
 
738
+ $file = $this->workspace.\DIRECTORY_SEPARATOR.'file';
739
+ $link = $this->workspace.\DIRECTORY_SEPARATOR.'link';
740
 
741
  touch($file);
742
 
752
  {
753
  $this->markAsSkippedIfPosixIsMissing();
754
 
755
+ $dir = $this->workspace.\DIRECTORY_SEPARATOR.'dir';
756
  mkdir($dir);
757
 
758
  $this->filesystem->chgrp($dir, 'user'.time().mt_rand(1000, 9999));
760
 
761
  public function testRename()
762
  {
763
+ $file = $this->workspace.\DIRECTORY_SEPARATOR.'file';
764
+ $newPath = $this->workspace.\DIRECTORY_SEPARATOR.'new_file';
765
  touch($file);
766
 
767
  $this->filesystem->rename($file, $newPath);
775
  */
776
  public function testRenameThrowsExceptionIfTargetAlreadyExists()
777
  {
778
+ $file = $this->workspace.\DIRECTORY_SEPARATOR.'file';
779
+ $newPath = $this->workspace.\DIRECTORY_SEPARATOR.'new_file';
780
 
781
  touch($file);
782
  touch($newPath);
786
 
787
  public function testRenameOverwritesTheTargetIfItAlreadyExists()
788
  {
789
+ $file = $this->workspace.\DIRECTORY_SEPARATOR.'file';
790
+ $newPath = $this->workspace.\DIRECTORY_SEPARATOR.'new_file';
791
 
792
  touch($file);
793
  touch($newPath);
803
  */
804
  public function testRenameThrowsExceptionOnError()
805
  {
806
+ $file = $this->workspace.\DIRECTORY_SEPARATOR.uniqid('fs_test_', true);
807
+ $newPath = $this->workspace.\DIRECTORY_SEPARATOR.'new_file';
808
 
809
  $this->filesystem->rename($file, $newPath);
810
  }
811
 
812
  public function testSymlink()
813
  {
814
+ if ('\\' === \DIRECTORY_SEPARATOR) {
815
  $this->markTestSkipped('Windows does not support creating "broken" symlinks');
816
  }
817
 
818
+ $file = $this->workspace.\DIRECTORY_SEPARATOR.'file';
819
+ $link = $this->workspace.\DIRECTORY_SEPARATOR.'link';
820
 
821
  // $file does not exists right now: creating "broken" links is a wanted feature
822
  $this->filesystem->symlink($file, $link);
836
  {
837
  $this->markAsSkippedIfSymlinkIsMissing();
838
 
839
+ $link = $this->workspace.\DIRECTORY_SEPARATOR.'link';
840
 
841
  $this->filesystem->remove($link);
842
 
849
  {
850
  $this->markAsSkippedIfSymlinkIsMissing();
851
 
852
+ $file = $this->workspace.\DIRECTORY_SEPARATOR.'file';
853
+ $link = $this->workspace.\DIRECTORY_SEPARATOR.'link';
854
 
855
  touch($file);
856
  symlink($this->workspace, $link);
865
  {
866
  $this->markAsSkippedIfSymlinkIsMissing();
867
 
868
+ $file = $this->workspace.\DIRECTORY_SEPARATOR.'file';
869
+ $link = $this->workspace.\DIRECTORY_SEPARATOR.'link';
870
 
871
  touch($file);
872
  symlink($file, $link);
881
  {
882
  $this->markAsSkippedIfSymlinkIsMissing();
883
 
884
+ $file = $this->workspace.\DIRECTORY_SEPARATOR.'file';
885
+ $link1 = $this->workspace.\DIRECTORY_SEPARATOR.'dir'.\DIRECTORY_SEPARATOR.'link';
886
+ $link2 = $this->workspace.\DIRECTORY_SEPARATOR.'dir'.\DIRECTORY_SEPARATOR.'subdir'.\DIRECTORY_SEPARATOR.'link';
887
 
888
  touch($file);
889
 
900
  {
901
  $this->markAsSkippedIfLinkIsMissing();
902
 
903
+ $file = $this->workspace.\DIRECTORY_SEPARATOR.'file';
904
+ $link = $this->workspace.\DIRECTORY_SEPARATOR.'link';
905
 
906
  touch($file);
907
  $this->filesystem->hardlink($file, $link);
917
  {
918
  $this->markAsSkippedIfLinkIsMissing();
919
 
920
+ $link = $this->workspace.\DIRECTORY_SEPARATOR.'link';
921
 
922
  $this->filesystem->remove($link);
923
 
928
  {
929
  $this->markAsSkippedIfLinkIsMissing();
930
 
931
+ $file = $this->workspace.\DIRECTORY_SEPARATOR.'file';
932
+ $file2 = $this->workspace.\DIRECTORY_SEPARATOR.'file2';
933
+ $link = $this->workspace.\DIRECTORY_SEPARATOR.'link';
934
 
935
  touch($file);
936
  touch($file2);
946
  {
947
  $this->markAsSkippedIfLinkIsMissing();
948
 
949
+ $file = $this->workspace.\DIRECTORY_SEPARATOR.'file';
950
+ $link = $this->workspace.\DIRECTORY_SEPARATOR.'link';
951
 
952
  touch($file);
953
  link($file, $link);
962
  {
963
  $this->markAsSkippedIfLinkIsMissing();
964
 
965
+ $file = $this->workspace.\DIRECTORY_SEPARATOR.'file';
966
+ $link1 = $this->workspace.\DIRECTORY_SEPARATOR.'link';
967
+ $link2 = $this->workspace.\DIRECTORY_SEPARATOR.'link2';
968
 
969
  touch($file);
970
 
980
  {
981
  $this->markAsSkippedIfLinkIsMissing();
982
 
983
+ $file = $this->workspace.\DIRECTORY_SEPARATOR.'file';
984
+ $link = $this->workspace.\DIRECTORY_SEPARATOR.'link';
985
 
986
  touch($file);
987
 
996
  {
997
  $this->markAsSkippedIfSymlinkIsMissing();
998
 
999
+ if ('\\' === \DIRECTORY_SEPARATOR) {
1000
  $this->markTestSkipped('Relative symbolic links are not supported on Windows');
1001
  }
1002
 
1038
  {
1039
  $this->markAsSkippedIfSymlinkIsMissing();
1040
 
1041
+ if ('\\' === \DIRECTORY_SEPARATOR) {
1042
  $this->markTestSkipped('Windows does not support creating "broken" symlinks');
1043
  }
1044
 
1134
  array('C:/../../aa/../bb/cc', 'C:/aa/dd/..', '../bb/cc/'),
1135
  );
1136
 
1137
+ if ('\\' === \DIRECTORY_SEPARATOR) {
1138
  $paths[] = array('c:\var\lib/symfony/src/Symfony/', 'c:/var/lib/symfony/', 'src/Symfony/');
1139
  }
1140
 
1173
 
1174
  public function testMirrorCopiesFilesAndDirectoriesRecursively()
1175
  {
1176
+ $sourcePath = $this->workspace.\DIRECTORY_SEPARATOR.'source'.\DIRECTORY_SEPARATOR;
1177
+ $directory = $sourcePath.'directory'.\DIRECTORY_SEPARATOR;
1178
  $file1 = $directory.'file1';
1179
  $file2 = $sourcePath.'file2';
1180
 
1183
  file_put_contents($file1, 'FILE1');
1184
  file_put_contents($file2, 'FILE2');
1185
 
1186
+ $targetPath = $this->workspace.\DIRECTORY_SEPARATOR.'target'.\DIRECTORY_SEPARATOR;
1187
 
1188
  $this->filesystem->mirror($sourcePath, $targetPath);
1189
 
1190
  $this->assertTrue(is_dir($targetPath));
1191
  $this->assertTrue(is_dir($targetPath.'directory'));
1192
+ $this->assertFileEquals($file1, $targetPath.'directory'.\DIRECTORY_SEPARATOR.'file1');
1193
  $this->assertFileEquals($file2, $targetPath.'file2');
1194
 
1195
  $this->filesystem->remove($file1);
1196
 
1197
  $this->filesystem->mirror($sourcePath, $targetPath, null, array('delete' => false));
1198
+ $this->assertTrue($this->filesystem->exists($targetPath.'directory'.\DIRECTORY_SEPARATOR.'file1'));
1199
 
1200
  $this->filesystem->mirror($sourcePath, $targetPath, null, array('delete' => true));
1201
+ $this->assertFalse($this->filesystem->exists($targetPath.'directory'.\DIRECTORY_SEPARATOR.'file1'));
1202
 
1203
  file_put_contents($file1, 'FILE1');
1204
 
1205
  $this->filesystem->mirror($sourcePath, $targetPath, null, array('delete' => true));
1206
+ $this->assertTrue($this->filesystem->exists($targetPath.'directory'.\DIRECTORY_SEPARATOR.'file1'));
1207
 
1208
  $this->filesystem->remove($directory);
1209
  $this->filesystem->mirror($sourcePath, $targetPath, null, array('delete' => true));
1210
  $this->assertFalse($this->filesystem->exists($targetPath.'directory'));
1211
+ $this->assertFalse($this->filesystem->exists($targetPath.'directory'.\DIRECTORY_SEPARATOR.'file1'));
1212
  }
1213
 
1214
  public function testMirrorCreatesEmptyDirectory()
1215
  {
1216
+ $sourcePath = $this->workspace.\DIRECTORY_SEPARATOR.'source'.\DIRECTORY_SEPARATOR;
1217
 
1218
  mkdir($sourcePath);
1219
 
1220
+ $targetPath = $this->workspace.\DIRECTORY_SEPARATOR.'target'.\DIRECTORY_SEPARATOR;
1221
 
1222
  $this->filesystem->mirror($sourcePath, $targetPath);
1223
 
1230
  {
1231
  $this->markAsSkippedIfSymlinkIsMissing();
1232
 
1233
+ $sourcePath = $this->workspace.\DIRECTORY_SEPARATOR.'source'.\DIRECTORY_SEPARATOR;
1234
 
1235
  mkdir($sourcePath);
1236
  file_put_contents($sourcePath.'file1', 'FILE1');
1237
  symlink($sourcePath.'file1', $sourcePath.'link1');
1238
 
1239
+ $targetPath = $this->workspace.\DIRECTORY_SEPARATOR.'target'.\DIRECTORY_SEPARATOR;
1240
 
1241
  $this->filesystem->mirror($sourcePath, $targetPath);
1242
 
1243
  $this->assertTrue(is_dir($targetPath));
1244
  $this->assertFileEquals($sourcePath.'file1', $targetPath.'link1');
1245
+ $this->assertTrue(is_link($targetPath.\DIRECTORY_SEPARATOR.'link1'));
1246
  }
1247
 
1248
  public function testMirrorCopiesLinkedDirectoryContents()
1249
  {
1250
  $this->markAsSkippedIfSymlinkIsMissing(true);
1251
 
1252
+ $sourcePath = $this->workspace.\DIRECTORY_SEPARATOR.'source'.\DIRECTORY_SEPARATOR;
1253
 
1254
  mkdir($sourcePath.'nested/', 0777, true);
1255
  file_put_contents($sourcePath.'/nested/file1.txt', 'FILE1');
1256
  // Note: We symlink directory, not file
1257
  symlink($sourcePath.'nested', $sourcePath.'link1');
1258
 
1259
+ $targetPath = $this->workspace.\DIRECTORY_SEPARATOR.'target'.\DIRECTORY_SEPARATOR;
1260
 
1261
  $this->filesystem->mirror($sourcePath, $targetPath);
1262
 
1263
  $this->assertTrue(is_dir($targetPath));
1264
  $this->assertFileEquals($sourcePath.'/nested/file1.txt', $targetPath.'link1/file1.txt');
1265
+ $this->assertTrue(is_link($targetPath.\DIRECTORY_SEPARATOR.'link1'));
1266
  }
1267
 
1268
  public function testMirrorCopiesRelativeLinkedContents()
1269
  {
1270
  $this->markAsSkippedIfSymlinkIsMissing(true);
1271
 
1272
+ $sourcePath = $this->workspace.\DIRECTORY_SEPARATOR.'source'.\DIRECTORY_SEPARATOR;
1273
  $oldPath = getcwd();
1274
 
1275
  mkdir($sourcePath.'nested/', 0777, true);
1280
 
1281
  chdir($oldPath);
1282
 
1283
+ $targetPath = $this->workspace.\DIRECTORY_SEPARATOR.'target'.\DIRECTORY_SEPARATOR;
1284
 
1285
  $this->filesystem->mirror($sourcePath, $targetPath);
1286
 
1287
  $this->assertTrue(is_dir($targetPath));
1288
  $this->assertFileEquals($sourcePath.'/nested/file1.txt', $targetPath.'link1/file1.txt');
1289
+ $this->assertTrue(is_link($targetPath.\DIRECTORY_SEPARATOR.'link1'));
1290
+ $this->assertEquals('\\' === \DIRECTORY_SEPARATOR ? realpath($sourcePath.'\nested') : 'nested', readlink($targetPath.\DIRECTORY_SEPARATOR.'link1'));
1291
  }
1292
 
1293
  public function testMirrorContentsWithSameNameAsSourceOrTargetWithoutDeleteOption()
1294
  {
1295
+ $sourcePath = $this->workspace.\DIRECTORY_SEPARATOR.'source'.\DIRECTORY_SEPARATOR;
1296
 
1297
  mkdir($sourcePath);
1298
  touch($sourcePath.'source');
1299
  touch($sourcePath.'target');
1300
 
1301
+ $targetPath = $this->workspace.\DIRECTORY_SEPARATOR.'target'.\DIRECTORY_SEPARATOR;
1302
 
1303
  $oldPath = getcwd();
1304
  chdir($this->workspace);
1314
 
1315
  public function testMirrorContentsWithSameNameAsSourceOrTargetWithDeleteOption()
1316
  {
1317
+ $sourcePath = $this->workspace.\DIRECTORY_SEPARATOR.'source'.\DIRECTORY_SEPARATOR;
1318
 
1319
  mkdir($sourcePath);
1320
  touch($sourcePath.'source');
1321
 
1322
+ $targetPath = $this->workspace.\DIRECTORY_SEPARATOR.'target'.\DIRECTORY_SEPARATOR;
1323
 
1324
  mkdir($targetPath);
1325
  touch($targetPath.'source');
1452
  public function testTempnamOnUnwritableFallsBackToSysTmp()
1453
  {
1454
  $scheme = 'file://';
1455
+ $dirname = $scheme.$this->workspace.\DIRECTORY_SEPARATOR.'does_not_exist';
1456
 
1457
  $filename = $this->filesystem->tempnam($dirname, 'bar');
1458
  $realTempDir = realpath(sys_get_temp_dir());
1459
+ $this->assertStringStartsWith(rtrim($scheme.$realTempDir, \DIRECTORY_SEPARATOR), $filename);
1460
  $this->assertFileExists($filename);
1461
 
1462
  // Tear down
1465
 
1466
  public function testDumpFile()
1467
  {
1468
+ $filename = $this->workspace.\DIRECTORY_SEPARATOR.'foo'.\DIRECTORY_SEPARATOR.'baz.txt';
1469
 
1470
  // skip mode check on Windows
1471
+ if ('\\' !== \DIRECTORY_SEPARATOR) {
1472
  $oldMask = umask(0002);
1473
  }
1474
 
1477
  $this->assertStringEqualsFile($filename, 'bar');
1478
 
1479
  // skip mode check on Windows
1480
+ if ('\\' !== \DIRECTORY_SEPARATOR) {
1481
  $this->assertFilePermissions(664, $filename);
1482
  umask($oldMask);
1483
  }
1484
  }
1485
 
1486
+ public function testDumpFileWithArray()
1487
+ {
1488
+ $filename = $this->workspace.\DIRECTORY_SEPARATOR.'foo'.\DIRECTORY_SEPARATOR.'baz.txt';
1489
+
1490
+ $this->filesystem->dumpFile($filename, array('bar'));
1491
+
1492
+ $this->assertFileExists($filename);
1493
+ $this->assertStringEqualsFile($filename, 'bar');
1494
+ }
1495
+
1496
+ public function testDumpFileWithResource()
1497
+ {
1498
+ $filename = $this->workspace.\DIRECTORY_SEPARATOR.'foo'.\DIRECTORY_SEPARATOR.'baz.txt';
1499
+
1500
+ $resource = fopen('php://memory', 'rw');
1501
+ fwrite($resource, 'bar');
1502
+ fseek($resource, 0);
1503
+
1504
+ $this->filesystem->dumpFile($filename, $resource);
1505
+
1506
+ fclose($resource);
1507
+ $this->assertFileExists($filename);
1508
+ $this->assertStringEqualsFile($filename, 'bar');
1509
+ }
1510
+
1511
  public function testDumpFileOverwritesAnExistingFile()
1512
  {
1513
+ $filename = $this->workspace.\DIRECTORY_SEPARATOR.'foo.txt';
1514
  file_put_contents($filename, 'FOO BAR');
1515
 
1516
  $this->filesystem->dumpFile($filename, 'bar');
1521
 
1522
  public function testDumpFileWithFileScheme()
1523
  {
1524
+ if (\defined('HHVM_VERSION')) {
1525
  $this->markTestSkipped('HHVM does not handle the file:// scheme correctly');
1526
  }
1527
 
1528
  $scheme = 'file://';
1529
+ $filename = $scheme.$this->workspace.\DIRECTORY_SEPARATOR.'foo'.\DIRECTORY_SEPARATOR.'baz.txt';
1530
 
1531
  $this->filesystem->dumpFile($filename, 'bar');
1532
 
1537
  public function testDumpFileWithZlibScheme()
1538
  {
1539
  $scheme = 'compress.zlib://';
1540
+ $filename = $this->workspace.\DIRECTORY_SEPARATOR.'foo'.\DIRECTORY_SEPARATOR.'baz.txt';
1541
 
1542
  $this->filesystem->dumpFile($filename, 'bar');
1543
 
1548
 
1549
  public function testAppendToFile()
1550
  {
1551
+ $filename = $this->workspace.\DIRECTORY_SEPARATOR.'foo'.\DIRECTORY_SEPARATOR.'bar.txt';
1552
 
1553
  // skip mode check on Windows
1554
+ if ('\\' !== \DIRECTORY_SEPARATOR) {
1555
  $oldMask = umask(0002);
1556
  }
1557
 
1563
  $this->assertStringEqualsFile($filename, 'foobar');
1564
 
1565
  // skip mode check on Windows
1566
+ if ('\\' !== \DIRECTORY_SEPARATOR) {
1567
  $this->assertFilePermissions(664, $filename);
1568
  umask($oldMask);
1569
  }
1571
 
1572
  public function testAppendToFileWithScheme()
1573
  {
1574
+ if (\defined('HHVM_VERSION')) {
1575
  $this->markTestSkipped('HHVM does not handle the file:// scheme correctly');
1576
  }
1577
 
1578
  $scheme = 'file://';
1579
+ $filename = $scheme.$this->workspace.\DIRECTORY_SEPARATOR.'foo'.\DIRECTORY_SEPARATOR.'baz.txt';
1580
  $this->filesystem->dumpFile($filename, 'foo');
1581
 
1582
  $this->filesystem->appendToFile($filename, 'bar');
1588
  public function testAppendToFileWithZlibScheme()
1589
  {
1590
  $scheme = 'compress.zlib://';
1591
+ $filename = $this->workspace.\DIRECTORY_SEPARATOR.'foo'.\DIRECTORY_SEPARATOR.'baz.txt';
1592
  $this->filesystem->dumpFile($filename, 'foo');
1593
 
1594
  // Zlib stat uses file:// wrapper so remove it
1602
 
1603
  public function testAppendToFileCreateTheFileIfNotExists()
1604
  {
1605
+ $filename = $this->workspace.\DIRECTORY_SEPARATOR.'foo'.\DIRECTORY_SEPARATOR.'bar.txt';
1606
 
1607
  // skip mode check on Windows
1608
+ if ('\\' !== \DIRECTORY_SEPARATOR) {
1609
  $oldMask = umask(0002);
1610
  }
1611
 
1612
  $this->filesystem->appendToFile($filename, 'bar');
1613
 
1614
  // skip mode check on Windows
1615
+ if ('\\' !== \DIRECTORY_SEPARATOR) {
1616
  $this->assertFilePermissions(664, $filename);
1617
  umask($oldMask);
1618
  }
1625
  {
1626
  $this->markAsSkippedIfChmodIsMissing();
1627
 
1628
+ $filename = $this->workspace.\DIRECTORY_SEPARATOR.'foo.txt';
1629
  file_put_contents($filename, 'FOO BAR');
1630
  chmod($filename, 0745);
1631
 
1638
  {
1639
  $this->markAsSkippedIfChmodIsMissing();
1640
 
1641
+ $sourceFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_source_file';
1642
+ $targetFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_target_file';
1643
 
1644
  file_put_contents($sourceFilePath, 'SOURCE FILE');
1645
  chmod($sourceFilePath, 0745);
1658
  */
1659
  private function normalize($path)
1660
  {
1661
+ return str_replace('/', \DIRECTORY_SEPARATOR, $path);
1662
  }
1663
  }
includes/vendor/symfony/filesystem/Tests/FilesystemTestCase.php CHANGED
@@ -42,13 +42,13 @@ class FilesystemTestCase extends TestCase
42
 
43
  public static function setUpBeforeClass()
44
  {
45
- if ('\\' === DIRECTORY_SEPARATOR) {
46
  self::$linkOnWindows = true;
47
  $originFile = tempnam(sys_get_temp_dir(), 'li');
48
  $targetFile = tempnam(sys_get_temp_dir(), 'li');
49
  if (true !== @link($originFile, $targetFile)) {
50
  $report = error_get_last();
51
- if (is_array($report) && false !== strpos($report['message'], 'error code(1314)')) {
52
  self::$linkOnWindows = false;
53
  }
54
  } else {
@@ -60,7 +60,7 @@ class FilesystemTestCase extends TestCase
60
  $targetDir = tempnam(sys_get_temp_dir(), 'sl');
61
  if (true !== @symlink($originDir, $targetDir)) {
62
  $report = error_get_last();
63
- if (is_array($report) && false !== strpos($report['message'], 'error code(1314)')) {
64
  self::$symlinkOnWindows = false;
65
  }
66
  } else {
@@ -129,37 +129,37 @@ class FilesystemTestCase extends TestCase
129
 
130
  protected function markAsSkippedIfLinkIsMissing()
131
  {
132
- if (!function_exists('link')) {
133
  $this->markTestSkipped('link is not supported');
134
  }
135
 
136
- if ('\\' === DIRECTORY_SEPARATOR && false === self::$linkOnWindows) {
137
  $this->markTestSkipped('link requires "Create hard links" privilege on windows');
138
  }
139
  }
140
 
141
  protected function markAsSkippedIfSymlinkIsMissing($relative = false)
142
  {
143
- if ('\\' === DIRECTORY_SEPARATOR && false === self::$symlinkOnWindows) {
144
  $this->markTestSkipped('symlink requires "Create symbolic links" privilege on Windows');
145
  }
146
 
147
  // https://bugs.php.net/bug.php?id=69473
148
- if ($relative && '\\' === DIRECTORY_SEPARATOR && 1 === PHP_ZTS) {
149
  $this->markTestSkipped('symlink does not support relative paths on thread safe Windows PHP versions');
150
  }
151
  }
152
 
153
  protected function markAsSkippedIfChmodIsMissing()
154
  {
155
- if ('\\' === DIRECTORY_SEPARATOR) {
156
  $this->markTestSkipped('chmod is not supported on Windows');
157
  }
158
  }
159
 
160
  protected function markAsSkippedIfPosixIsMissing()
161
  {
162
- if (!function_exists('posix_isatty')) {
163
  $this->markTestSkipped('Function posix_isatty is required.');
164
  }
165
  }
42
 
43
  public static function setUpBeforeClass()
44
  {
45
+ if ('\\' === \DIRECTORY_SEPARATOR) {
46
  self::$linkOnWindows = true;
47
  $originFile = tempnam(sys_get_temp_dir(), 'li');
48
  $targetFile = tempnam(sys_get_temp_dir(), 'li');
49
  if (true !== @link($originFile, $targetFile)) {
50
  $report = error_get_last();
51
+ if (\is_array($report) && false !== strpos($report['message'], 'error code(1314)')) {
52
  self::$linkOnWindows = false;
53
  }
54
  } else {
60
  $targetDir = tempnam(sys_get_temp_dir(), 'sl');
61
  if (true !== @symlink($originDir, $targetDir)) {
62
  $report = error_get_last();
63
+ if (\is_array($report) && false !== strpos($report['message'], 'error code(1314)')) {
64
  self::$symlinkOnWindows = false;
65
  }
66
  } else {
129
 
130
  protected function markAsSkippedIfLinkIsMissing()
131
  {
132
+ if (!\function_exists('link')) {
133
  $this->markTestSkipped('link is not supported');
134
  }
135
 
136
+ if ('\\' === \DIRECTORY_SEPARATOR && false === self::$linkOnWindows) {
137
  $this->markTestSkipped('link requires "Create hard links" privilege on windows');
138
  }
139
  }
140
 
141
  protected function markAsSkippedIfSymlinkIsMissing($relative = false)
142
  {
143
+ if ('\\' === \DIRECTORY_SEPARATOR && false === self::$symlinkOnWindows) {
144
  $this->markTestSkipped('symlink requires "Create symbolic links" privilege on Windows');
145
  }
146
 
147
  // https://bugs.php.net/bug.php?id=69473
148
+ if ($relative && '\\' === \DIRECTORY_SEPARATOR && 1 === PHP_ZTS) {
149
  $this->markTestSkipped('symlink does not support relative paths on thread safe Windows PHP versions');
150
  }
151
  }
152
 
153
  protected function markAsSkippedIfChmodIsMissing()
154
  {
155
+ if ('\\' === \DIRECTORY_SEPARATOR) {
156
  $this->markTestSkipped('chmod is not supported on Windows');
157
  }
158
  }
159
 
160
  protected function markAsSkippedIfPosixIsMissing()
161
  {
162
+ if (!\function_exists('posix_isatty')) {
163
  $this->markTestSkipped('Function posix_isatty is required.');
164
  }
165
  }
includes/vendor/symfony/filesystem/Tests/LockHandlerTest.php CHANGED
@@ -48,7 +48,7 @@ class LockHandlerTest extends TestCase
48
  public function testErrorHandlingInLockIfLockPathBecomesUnwritable()
49
  {
50
  // skip test on Windows; PHP can't easily set file as unreadable on Windows
51
- if ('\\' === DIRECTORY_SEPARATOR) {
52
  $this->markTestSkipped('This test cannot run on Windows.');
53
  }
54
 
@@ -79,7 +79,7 @@ class LockHandlerTest extends TestCase
79
  $fs->remove($lockPath);
80
  }
81
 
82
- $this->assertInstanceOf('Symfony\Component\Filesystem\Exception\IOException', $e, sprintf('Expected IOException to be thrown, got %s instead.', get_class($e)));
83
  $this->assertNull($wrongMessage, sprintf('Expected exception message to contain "Permission denied", got "%s" instead.', $wrongMessage));
84
  }
85
 
48
  public function testErrorHandlingInLockIfLockPathBecomesUnwritable()
49
  {
50
  // skip test on Windows; PHP can't easily set file as unreadable on Windows
51
+ if ('\\' === \DIRECTORY_SEPARATOR) {
52
  $this->markTestSkipped('This test cannot run on Windows.');
53
  }
54
 
79
  $fs->remove($lockPath);
80
  }
81
 
82
+ $this->assertInstanceOf('Symfony\Component\Filesystem\Exception\IOException', $e, sprintf('Expected IOException to be thrown, got %s instead.', \get_class($e)));
83
  $this->assertNull($wrongMessage, sprintf('Expected exception message to contain "Permission denied", got "%s" instead.', $wrongMessage));
84
  }
85
 
includes/vendor/symfony/finder/Comparator/Comparator.php CHANGED
@@ -64,7 +64,7 @@ class Comparator
64
  $operator = '==';
65
  }
66
 
67
- if (!in_array($operator, array('>', '<', '>=', '<=', '==', '!='))) {
68
  throw new \InvalidArgumentException(sprintf('Invalid operator "%s".', $operator));
69
  }
70
 
64
  $operator = '==';
65
  }
66
 
67
+ if (!\in_array($operator, array('>', '<', '>=', '<=', '==', '!='))) {
68
  throw new \InvalidArgumentException(sprintf('Invalid operator "%s".', $operator));
69
  }
70
 
includes/vendor/symfony/finder/Finder.php CHANGED
@@ -541,7 +541,7 @@ class Finder implements \IteratorAggregate, \Countable
541
  foreach ((array) $dirs as $dir) {
542
  if (is_dir($dir)) {
543
  $resolvedDirs[] = $this->normalizeDir($dir);
544
- } elseif ($glob = glob($dir, (defined('GLOB_BRACE') ? GLOB_BRACE : 0) | GLOB_ONLYDIR)) {
545
  $resolvedDirs = array_merge($resolvedDirs, array_map(array($this, 'normalizeDir'), $glob));
546
  } else {
547
  throw new \InvalidArgumentException(sprintf('The "%s" directory does not exist.', $dir));
@@ -564,11 +564,11 @@ class Finder implements \IteratorAggregate, \Countable
564
  */
565
  public function getIterator()
566
  {
567
- if (0 === count($this->dirs) && 0 === count($this->iterators)) {
568
  throw new \LogicException('You must call one of in() or append() methods before iterating over a Finder.');
569
  }
570
 
571
- if (1 === count($this->dirs) && 0 === count($this->iterators)) {
572
  return $this->searchInDirectory($this->dirs[0]);
573
  }
574
 
@@ -601,7 +601,7 @@ class Finder implements \IteratorAggregate, \Countable
601
  $this->iterators[] = $iterator->getIterator();
602
  } elseif ($iterator instanceof \Iterator) {
603
  $this->iterators[] = $iterator;
604
- } elseif ($iterator instanceof \Traversable || is_array($iterator)) {
605
  $it = new \ArrayIterator();
606
  foreach ($iterator as $file) {
607
  $it->append($file instanceof \SplFileInfo ? $file : new \SplFileInfo($file));
541
  foreach ((array) $dirs as $dir) {
542
  if (is_dir($dir)) {
543
  $resolvedDirs[] = $this->normalizeDir($dir);
544
+ } elseif ($glob = glob($dir, (\defined('GLOB_BRACE') ? GLOB_BRACE : 0) | GLOB_ONLYDIR)) {
545
  $resolvedDirs = array_merge($resolvedDirs, array_map(array($this, 'normalizeDir'), $glob));
546
  } else {
547
  throw new \InvalidArgumentException(sprintf('The "%s" directory does not exist.', $dir));
564
  */
565
  public function getIterator()
566
  {
567
+ if (0 === \count($this->dirs) && 0 === \count($this->iterators)) {
568
  throw new \LogicException('You must call one of in() or append() methods before iterating over a Finder.');
569
  }
570
 
571
+ if (1 === \count($this->dirs) && 0 === \count($this->iterators)) {
572
  return $this->searchInDirectory($this->dirs[0]);
573
  }
574
 
601
  $this->iterators[] = $iterator->getIterator();
602
  } elseif ($iterator instanceof \Iterator) {
603
  $this->iterators[] = $iterator;
604
+ } elseif ($iterator instanceof \Traversable || \is_array($iterator)) {
605
  $it = new \ArrayIterator();
606
  foreach ($iterator as $file) {
607
  $it->append($file instanceof \SplFileInfo ? $file : new \SplFileInfo($file));
includes/vendor/symfony/finder/Glob.php CHANGED
@@ -51,7 +51,7 @@ class Glob
51
  $escaping = false;
52
  $inCurlies = 0;
53
  $regex = '';
54
- $sizeGlob = strlen($glob);
55
  for ($i = 0; $i < $sizeGlob; ++$i) {
56
  $car = $glob[$i];
57
  if ($firstByte && $strictLeadingDot && '.' !== $car) {
51
  $escaping = false;
52
  $inCurlies = 0;
53
  $regex = '';
54
+ $sizeGlob = \strlen($glob);
55
  for ($i = 0; $i < $sizeGlob; ++$i) {
56
  $car = $glob[$i];
57
  if ($firstByte && $strictLeadingDot && '.' !== $car) {
includes/vendor/symfony/finder/Iterator/CustomFilterIterator.php CHANGED
@@ -32,7 +32,7 @@ class CustomFilterIterator extends FilterIterator
32
  public function __construct(\Iterator $iterator, array $filters)
33
  {
34
  foreach ($filters as $filter) {
35
- if (!is_callable($filter)) {
36
  throw new \InvalidArgumentException('Invalid PHP callback.');
37
  }
38
  }
@@ -51,7 +51,7 @@ class CustomFilterIterator extends FilterIterator
51
  $fileinfo = $this->current();
52
 
53
  foreach ($this->filters as $filter) {
54
- if (false === call_user_func($filter, $fileinfo)) {
55
  return false;
56
  }
57
  }
32
  public function __construct(\Iterator $iterator, array $filters)
33
  {
34
  foreach ($filters as $filter) {
35
+ if (!\is_callable($filter)) {
36
  throw new \InvalidArgumentException('Invalid PHP callback.');
37
  }
38
  }
51
  $fileinfo = $this->current();
52
 
53
  foreach ($this->filters as $filter) {
54
+ if (false === \call_user_func($filter, $fileinfo)) {
55
  return false;
56
  }
57
  }
includes/vendor/symfony/finder/Iterator/PathFilterIterator.php CHANGED
@@ -28,7 +28,7 @@ class PathFilterIterator extends MultiplePcreFilterIterator
28
  {
29
  $filename = $this->current()->getRelativePathname();
30
 
31
- if ('\\' === DIRECTORY_SEPARATOR) {
32
  $filename = str_replace('\\', '/', $filename);
33
  }
34
 
28
  {
29
  $filename = $this->current()->getRelativePathname();
30
 
31
+ if ('\\' === \DIRECTORY_SEPARATOR) {
32
  $filename = str_replace('\\', '/', $filename);
33
  }
34
 
includes/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php CHANGED
@@ -52,8 +52,8 @@ class RecursiveDirectoryIterator extends \RecursiveDirectoryIterator
52
  parent::__construct($path, $flags);
53
  $this->ignoreUnreadableDirs = $ignoreUnreadableDirs;
54
  $this->rootPath = $path;
55
- if ('/' !== DIRECTORY_SEPARATOR && !($flags & self::UNIX_PATHS)) {
56
- $this->directorySeparator = DIRECTORY_SEPARATOR;
57
  }
58
  }
59
 
52
  parent::__construct($path, $flags);
53
  $this->ignoreUnreadableDirs = $ignoreUnreadableDirs;
54
  $this->rootPath = $path;
55
+ if ('/' !== \DIRECTORY_SEPARATOR && !($flags & self::UNIX_PATHS)) {
56
+ $this->directorySeparator = \DIRECTORY_SEPARATOR;
57
  }
58
  }
59
 
includes/vendor/symfony/finder/Iterator/SortableIterator.php CHANGED
@@ -63,7 +63,7 @@ class SortableIterator implements \IteratorAggregate
63
  $this->sort = function ($a, $b) {
64
  return $a->getMTime() - $b->getMTime();
65
  };
66
- } elseif (is_callable($sort)) {
67
  $this->sort = $sort;
68
  } else {
69
  throw new \InvalidArgumentException('The SortableIterator takes a PHP callable or a valid built-in sort algorithm as an argument.');
63
  $this->sort = function ($a, $b) {
64
  return $a->getMTime() - $b->getMTime();
65
  };
66
+ } elseif (\is_callable($sort)) {
67
  $this->sort = $sort;
68
  } else {
69
  throw new \InvalidArgumentException('The SortableIterator takes a PHP callable or a valid built-in sort algorithm as an argument.');
includes/vendor/symfony/finder/Tests/FinderTest.php CHANGED
@@ -58,7 +58,7 @@ class FinderTest extends Iterator\RealIteratorTestCase
58
 
59
  public function testSymlinksNotResolved()
60
  {
61
- if ('\\' === DIRECTORY_SEPARATOR) {
62
  $this->markTestSkipped('symlinks are not supported on Windows');
63
  }
64
 
@@ -265,7 +265,7 @@ class FinderTest extends Iterator\RealIteratorTestCase
265
 
266
  public function testFollowLinks()
267
  {
268
- if ('\\' == DIRECTORY_SEPARATOR) {
269
  $this->markTestSkipped('symlinks are not supported on Windows');
270
  }
271
 
@@ -280,9 +280,9 @@ class FinderTest extends Iterator\RealIteratorTestCase
280
  $iterator = $finder->files()->name('*.php')->depth('< 1')->in(array(self::$tmpDir, __DIR__))->getIterator();
281
 
282
  $expected = array(
283
- self::$tmpDir.DIRECTORY_SEPARATOR.'test.php',
284
- __DIR__.DIRECTORY_SEPARATOR.'FinderTest.php',
285
- __DIR__.DIRECTORY_SEPARATOR.'GlobTest.php',
286
  );
287
 
288
  $this->assertIterator($expected, $iterator);
@@ -384,7 +384,7 @@ class FinderTest extends Iterator\RealIteratorTestCase
384
  $paths[] = $file->getRelativePathname();
385
  }
386
 
387
- $ref = array('test.php', 'toto', 'test.py', 'foo', 'foo'.DIRECTORY_SEPARATOR.'bar.tmp', 'foo bar');
388
 
389
  sort($paths);
390
  sort($ref);
@@ -395,7 +395,7 @@ class FinderTest extends Iterator\RealIteratorTestCase
395
  public function testAppendWithAFinder()
396
  {
397
  $finder = $this->buildFinder();
398
- $finder->files()->in(self::$tmpDir.DIRECTORY_SEPARATOR.'foo');
399
 
400
  $finder1 = $this->buildFinder();
401
  $finder1->directories()->in(self::$tmpDir);
@@ -408,7 +408,7 @@ class FinderTest extends Iterator\RealIteratorTestCase
408
  public function testAppendWithAnArray()
409
  {
410
  $finder = $this->buildFinder();
411
- $finder->files()->in(self::$tmpDir.DIRECTORY_SEPARATOR.'foo');
412
 
413
  $finder->append($this->toAbsolute(array('foo', 'toto')));
414
 
@@ -423,7 +423,7 @@ class FinderTest extends Iterator\RealIteratorTestCase
423
  public function testAppendDoesNotRequireIn()
424
  {
425
  $finder = $this->buildFinder();
426
- $finder->in(self::$tmpDir.DIRECTORY_SEPARATOR.'foo');
427
 
428
  $finder1 = Finder::create()->append($finder);
429
 
@@ -444,7 +444,7 @@ class FinderTest extends Iterator\RealIteratorTestCase
444
 
445
  public function testCountFiles()
446
  {
447
- $files = Finder::create()->files()->in(__DIR__.DIRECTORY_SEPARATOR.'Fixtures');
448
  $i = 0;
449
 
450
  foreach ($files as $file) {
@@ -460,7 +460,7 @@ class FinderTest extends Iterator\RealIteratorTestCase
460
  public function testCountWithoutIn()
461
  {
462
  $finder = Finder::create()->files();
463
- count($finder);
464
  }
465
 
466
  public function testHasResults()
@@ -483,7 +483,7 @@ class FinderTest extends Iterator\RealIteratorTestCase
483
  public function testContains($matchPatterns, $noMatchPatterns, $expected)
484
  {
485
  $finder = $this->buildFinder();
486
- $finder->in(__DIR__.DIRECTORY_SEPARATOR.'Fixtures')
487
  ->name('*.txt')->sortByName()
488
  ->contains($matchPatterns)
489
  ->notContains($noMatchPatterns);
@@ -546,15 +546,15 @@ class FinderTest extends Iterator\RealIteratorTestCase
546
  {
547
  $locations = array(
548
  __DIR__.'/Fixtures/one',
549
- self::$tmpDir.DIRECTORY_SEPARATOR.'toto',
550
  );
551
 
552
  $finder = $this->buildFinder();
553
  $finder->in($locations)->depth('< 10')->name('*.neon');
554
 
555
  $expected = array(
556
- __DIR__.'/Fixtures/one'.DIRECTORY_SEPARATOR.'b'.DIRECTORY_SEPARATOR.'c.neon',
557
- __DIR__.'/Fixtures/one'.DIRECTORY_SEPARATOR.'b'.DIRECTORY_SEPARATOR.'d.neon',
558
  );
559
 
560
  $this->assertIterator($expected, $finder);
@@ -575,10 +575,10 @@ class FinderTest extends Iterator\RealIteratorTestCase
575
  public function testRegexSpecialCharsLocationWithPathRestrictionContainingStartFlag()
576
  {
577
  $finder = $this->buildFinder();
578
- $finder->in(__DIR__.DIRECTORY_SEPARATOR.'Fixtures'.DIRECTORY_SEPARATOR.'r+e.gex[c]a(r)s')
579
  ->path('/^dir/');
580
 
581
- $expected = array('r+e.gex[c]a(r)s'.DIRECTORY_SEPARATOR.'dir', 'r+e.gex[c]a(r)s'.DIRECTORY_SEPARATOR.'dir'.DIRECTORY_SEPARATOR.'bar.dat');
582
  $this->assertIterator($this->toAbsoluteFixtures($expected), $finder);
583
  }
584
 
@@ -612,7 +612,7 @@ class FinderTest extends Iterator\RealIteratorTestCase
612
  public function testPath($matchPatterns, $noMatchPatterns, array $expected)
613
  {
614
  $finder = $this->buildFinder();
615
- $finder->in(__DIR__.DIRECTORY_SEPARATOR.'Fixtures')
616
  ->path($matchPatterns)
617
  ->notPath($noMatchPatterns);
618
 
@@ -624,41 +624,41 @@ class FinderTest extends Iterator\RealIteratorTestCase
624
  return array(
625
  array('', '', array()),
626
  array('/^A\/B\/C/', '/C$/',
627
- array('A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'C'.DIRECTORY_SEPARATOR.'abc.dat'),
628
  ),
629
  array('/^A\/B/', 'foobar',
630
  array(
631
- 'A'.DIRECTORY_SEPARATOR.'B',
632
- 'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'C',
633
- 'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'ab.dat',
634
- 'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'C'.DIRECTORY_SEPARATOR.'abc.dat',
635
  ),
636
  ),
637
  array('A/B/C', 'foobar',
638
  array(
639
- 'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'C',
640
- 'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'C'.DIRECTORY_SEPARATOR.'abc.dat',
641
- 'copy'.DIRECTORY_SEPARATOR.'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'C',
642
- 'copy'.DIRECTORY_SEPARATOR.'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'C'.DIRECTORY_SEPARATOR.'abc.dat.copy',
643
  ),
644
  ),
645
  array('A/B', 'foobar',
646
  array(
647
  //dirs
648
- 'A'.DIRECTORY_SEPARATOR.'B',
649
- 'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'C',
650
- 'copy'.DIRECTORY_SEPARATOR.'A'.DIRECTORY_SEPARATOR.'B',
651
- 'copy'.DIRECTORY_SEPARATOR.'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'C',
652
  //files
653
- 'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'ab.dat',
654
- 'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'C'.DIRECTORY_SEPARATOR.'abc.dat',
655
- 'copy'.DIRECTORY_SEPARATOR.'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'ab.dat.copy',
656
- 'copy'.DIRECTORY_SEPARATOR.'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'C'.DIRECTORY_SEPARATOR.'abc.dat.copy',
657
  ),
658
  ),
659
  array('/^with space\//', 'foobar',
660
  array(
661
- 'with space'.DIRECTORY_SEPARATOR.'foo.txt',
662
  ),
663
  ),
664
  );
@@ -666,7 +666,7 @@ class FinderTest extends Iterator\RealIteratorTestCase
666
 
667
  public function testAccessDeniedException()
668
  {
669
- if ('\\' === DIRECTORY_SEPARATOR) {
670
  $this->markTestSkipped('chmod is not supported on Windows');
671
  }
672
 
@@ -674,7 +674,7 @@ class FinderTest extends Iterator\RealIteratorTestCase
674
  $finder->files()->in(self::$tmpDir);
675
 
676
  // make 'foo' directory non-readable
677
- $testDir = self::$tmpDir.DIRECTORY_SEPARATOR.'foo';
678
  chmod($testDir, 0333);
679
 
680
  if (false === $couldRead = is_readable($testDir)) {
@@ -706,7 +706,7 @@ class FinderTest extends Iterator\RealIteratorTestCase
706
 
707
  public function testIgnoredAccessDeniedException()
708
  {
709
- if ('\\' === DIRECTORY_SEPARATOR) {
710
  $this->markTestSkipped('chmod is not supported on Windows');
711
  }
712
 
@@ -714,7 +714,7 @@ class FinderTest extends Iterator\RealIteratorTestCase
714
  $finder->files()->ignoreUnreadableDirs()->in(self::$tmpDir);
715
 
716
  // make 'foo' directory non-readable
717
- $testDir = self::$tmpDir.DIRECTORY_SEPARATOR.'foo';
718
  chmod($testDir, 0333);
719
 
720
  if (false === ($couldRead = is_readable($testDir))) {
58
 
59
  public function testSymlinksNotResolved()
60
  {
61
+ if ('\\' === \DIRECTORY_SEPARATOR) {
62
  $this->markTestSkipped('symlinks are not supported on Windows');
63
  }
64
 
265
 
266
  public function testFollowLinks()
267
  {
268
+ if ('\\' == \DIRECTORY_SEPARATOR) {
269
  $this->markTestSkipped('symlinks are not supported on Windows');
270
  }
271
 
280
  $iterator = $finder->files()->name('*.php')->depth('< 1')->in(array(self::$tmpDir, __DIR__))->getIterator();
281
 
282
  $expected = array(
283
+ self::$tmpDir.\DIRECTORY_SEPARATOR.'test.php',
284
+ __DIR__.\DIRECTORY_SEPARATOR.'FinderTest.php',
285
+ __DIR__.\DIRECTORY_SEPARATOR.'GlobTest.php',
286
  );
287
 
288
  $this->assertIterator($expected, $iterator);
384
  $paths[] = $file->getRelativePathname();
385
  }
386
 
387
+ $ref = array('test.php', 'toto', 'test.py', 'foo', 'foo'.\DIRECTORY_SEPARATOR.'bar.tmp', 'foo bar');
388
 
389
  sort($paths);
390
  sort($ref);
395
  public function testAppendWithAFinder()
396
  {
397
  $finder = $this->buildFinder();
398
+ $finder->files()->in(self::$tmpDir.\DIRECTORY_SEPARATOR.'foo');
399
 
400
  $finder1 = $this->buildFinder();
401
  $finder1->directories()->in(self::$tmpDir);
408
  public function testAppendWithAnArray()
409
  {
410
  $finder = $this->buildFinder();
411
+ $finder->files()->in(self::$tmpDir.\DIRECTORY_SEPARATOR.'foo');
412
 
413
  $finder->append($this->toAbsolute(array('foo', 'toto')));
414
 
423
  public function testAppendDoesNotRequireIn()
424
  {
425
  $finder = $this->buildFinder();
426
+ $finder->in(self::$tmpDir.\DIRECTORY_SEPARATOR.'foo');
427
 
428
  $finder1 = Finder::create()->append($finder);
429
 
444
 
445
  public function testCountFiles()
446
  {
447
+ $files = Finder::create()->files()->in(__DIR__.\DIRECTORY_SEPARATOR.'Fixtures');
448
  $i = 0;
449
 
450
  foreach ($files as $file) {
460
  public function testCountWithoutIn()
461
  {
462
  $finder = Finder::create()->files();
463
+ \count($finder);
464
  }
465
 
466
  public function testHasResults()
483
  public function testContains($matchPatterns, $noMatchPatterns, $expected)
484
  {
485
  $finder = $this->buildFinder();
486
+ $finder->in(__DIR__.\DIRECTORY_SEPARATOR.'Fixtures')
487
  ->name('*.txt')->sortByName()
488
  ->contains($matchPatterns)
489
  ->notContains($noMatchPatterns);
546
  {
547
  $locations = array(
548
  __DIR__.'/Fixtures/one',
549
+ self::$tmpDir.\DIRECTORY_SEPARATOR.'toto',
550
  );
551
 
552
  $finder = $this->buildFinder();
553
  $finder->in($locations)->depth('< 10')->name('*.neon');
554
 
555
  $expected = array(
556
+ __DIR__.'/Fixtures/one'.\DIRECTORY_SEPARATOR.'b'.\DIRECTORY_SEPARATOR.'c.neon',
557
+ __DIR__.'/Fixtures/one'.\DIRECTORY_SEPARATOR.'b'.\DIRECTORY_SEPARATOR.'d.neon',
558
  );
559
 
560
  $this->assertIterator($expected, $finder);
575
  public function testRegexSpecialCharsLocationWithPathRestrictionContainingStartFlag()
576
  {
577
  $finder = $this->buildFinder();
578
+ $finder->in(__DIR__.\DIRECTORY_SEPARATOR.'Fixtures'.\DIRECTORY_SEPARATOR.'r+e.gex[c]a(r)s')
579
  ->path('/^dir/');
580
 
581
+ $expected = array('r+e.gex[c]a(r)s'.\DIRECTORY_SEPARATOR.'dir', 'r+e.gex[c]a(r)s'.\DIRECTORY_SEPARATOR.'dir'.\DIRECTORY_SEPARATOR.'bar.dat');
582
  $this->assertIterator($this->toAbsoluteFixtures($expected), $finder);
583
  }
584
 
612
  public function testPath($matchPatterns, $noMatchPatterns, array $expected)
613
  {
614
  $finder = $this->buildFinder();
615
+ $finder->in(__DIR__.\DIRECTORY_SEPARATOR.'Fixtures')
616
  ->path($matchPatterns)
617
  ->notPath($noMatchPatterns);
618
 
624
  return array(
625
  array('', '', array()),
626
  array('/^A\/B\/C/', '/C$/',
627
+ array('A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C'.\DIRECTORY_SEPARATOR.'abc.dat'),
628
  ),
629
  array('/^A\/B/', 'foobar',
630
  array(
631
+ 'A'.\DIRECTORY_SEPARATOR.'B',
632
+ 'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C',
633
+ 'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'ab.dat',
634
+ 'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C'.\DIRECTORY_SEPARATOR.'abc.dat',
635
  ),
636
  ),
637
  array('A/B/C', 'foobar',
638
  array(
639
+ 'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C',
640
+ 'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C'.\DIRECTORY_SEPARATOR.'abc.dat',
641
+ 'copy'.\DIRECTORY_SEPARATOR.'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C',
642
+ 'copy'.\DIRECTORY_SEPARATOR.'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C'.\DIRECTORY_SEPARATOR.'abc.dat.copy',
643
  ),
644
  ),
645
  array('A/B', 'foobar',
646
  array(
647
  //dirs
648
+ 'A'.\DIRECTORY_SEPARATOR.'B',
649
+ 'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C',
650
+ 'copy'.\DIRECTORY_SEPARATOR.'A'.\DIRECTORY_SEPARATOR.'B',
651
+ 'copy'.\DIRECTORY_SEPARATOR.'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C',
652
  //files
653
+ 'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'ab.dat',
654
+ 'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C'.\DIRECTORY_SEPARATOR.'abc.dat',
655
+ 'copy'.\DIRECTORY_SEPARATOR.'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'ab.dat.copy',
656
+ 'copy'.\DIRECTORY_SEPARATOR.'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C'.\DIRECTORY_SEPARATOR.'abc.dat.copy',
657
  ),
658
  ),
659
  array('/^with space\//', 'foobar',
660
  array(
661
+ 'with space'.\DIRECTORY_SEPARATOR.'foo.txt',
662
  ),
663
  ),
664
  );
666
 
667
  public function testAccessDeniedException()
668
  {
669
+ if ('\\' === \DIRECTORY_SEPARATOR) {
670
  $this->markTestSkipped('chmod is not supported on Windows');
671
  }
672
 
674
  $finder->files()->in(self::$tmpDir);
675
 
676
  // make 'foo' directory non-readable
677
+ $testDir = self::$tmpDir.\DIRECTORY_SEPARATOR.'foo';
678
  chmod($testDir, 0333);
679
 
680
  if (false === $couldRead = is_readable($testDir)) {
706
 
707
  public function testIgnoredAccessDeniedException()
708
  {
709
+ if ('\\' === \DIRECTORY_SEPARATOR) {
710
  $this->markTestSkipped('chmod is not supported on Windows');
711
  }
712
 
714
  $finder->files()->ignoreUnreadableDirs()->in(self::$tmpDir);
715
 
716
  // make 'foo' directory non-readable
717
+ $testDir = self::$tmpDir.\DIRECTORY_SEPARATOR.'foo';
718
  chmod($testDir, 0333);
719
 
720
  if (false === ($couldRead = is_readable($testDir))) {
includes/vendor/symfony/finder/Tests/GlobTest.php CHANGED
@@ -32,9 +32,9 @@ class GlobTest extends TestCase
32
  $regex = Glob::toRegex('/**/*.neon');
33
 
34
  foreach ($finder->in(__DIR__) as $k => $v) {
35
- $k = str_replace(DIRECTORY_SEPARATOR, '/', $k);
36
- if (preg_match($regex, substr($k, strlen(__DIR__)))) {
37
- $match[] = substr($k, 10 + strlen(__DIR__));
38
  }
39
  }
40
  sort($match);
@@ -49,9 +49,9 @@ class GlobTest extends TestCase
49
  $regex = Glob::toRegex('/**/*.neon', false);
50
 
51
  foreach ($finder->in(__DIR__) as $k => $v) {
52
- $k = str_replace(DIRECTORY_SEPARATOR, '/', $k);
53
- if (preg_match($regex, substr($k, strlen(__DIR__)))) {
54
- $match[] = substr($k, 10 + strlen(__DIR__));
55
  }
56
  }
57
  sort($match);
@@ -66,9 +66,9 @@ class GlobTest extends TestCase
66
  $regex = Glob::toRegex('/Fixtures/one/**');
67
 
68
  foreach ($finder->in(__DIR__) as $k => $v) {
69
- $k = str_replace(DIRECTORY_SEPARATOR, '/', $k);
70
- if (preg_match($regex, substr($k, strlen(__DIR__)))) {
71
- $match[] = substr($k, 10 + strlen(__DIR__));
72
  }
73
  }
74
  sort($match);
@@ -83,9 +83,9 @@ class GlobTest extends TestCase
83
  $regex = Glob::toRegex('/Fixtures/one/**', false);
84
 
85
  foreach ($finder->in(__DIR__) as $k => $v) {
86
- $k = str_replace(DIRECTORY_SEPARATOR, '/', $k);
87
- if (preg_match($regex, substr($k, strlen(__DIR__)))) {
88
- $match[] = substr($k, 10 + strlen(__DIR__));
89
  }
90
  }
91
  sort($match);
32
  $regex = Glob::toRegex('/**/*.neon');
33
 
34
  foreach ($finder->in(__DIR__) as $k => $v) {
35
+ $k = str_replace(\DIRECTORY_SEPARATOR, '/', $k);
36
+ if (preg_match($regex, substr($k, \strlen(__DIR__)))) {
37
+ $match[] = substr($k, 10 + \strlen(__DIR__));
38
  }
39
  }
40
  sort($match);
49
  $regex = Glob::toRegex('/**/*.neon', false);
50
 
51
  foreach ($finder->in(__DIR__) as $k => $v) {
52
+ $k = str_replace(\DIRECTORY_SEPARATOR, '/', $k);
53
+ if (preg_match($regex, substr($k, \strlen(__DIR__)))) {
54
+ $match[] = substr($k, 10 + \strlen(__DIR__));
55
  }
56
  }
57
  sort($match);
66
  $regex = Glob::toRegex('/Fixtures/one/**');
67
 
68
  foreach ($finder->in(__DIR__) as $k => $v) {
69
+ $k = str_replace(\DIRECTORY_SEPARATOR, '/', $k);
70
+ if (preg_match($regex, substr($k, \strlen(__DIR__)))) {
71
+ $match[] = substr($k, 10 + \strlen(__DIR__));
72
  }
73
  }
74
  sort($match);
83
  $regex = Glob::toRegex('/Fixtures/one/**', false);
84
 
85
  foreach ($finder->in(__DIR__) as $k => $v) {
86
+ $k = str_replace(\DIRECTORY_SEPARATOR, '/', $k);
87
+ if (preg_match($regex, substr($k, \strlen(__DIR__)))) {
88
+ $match[] = substr($k, 10 + \strlen(__DIR__));
89
  }
90
  }
91
  sort($match);
includes/vendor/symfony/finder/Tests/Iterator/DateRangeFilterIteratorTest.php CHANGED
@@ -11,8 +11,8 @@
11
 
12
  namespace Symfony\Component\Finder\Tests\Iterator;
13
 
14
- use Symfony\Component\Finder\Iterator\DateRangeFilterIterator;
15
  use Symfony\Component\Finder\Comparator\DateComparator;
 
16
 
17
  class DateRangeFilterIteratorTest extends RealIteratorTestCase
18
  {
11
 
12
  namespace Symfony\Component\Finder\Tests\Iterator;
13
 
 
14
  use Symfony\Component\Finder\Comparator\DateComparator;
15
+ use Symfony\Component\Finder\Iterator\DateRangeFilterIterator;
16
 
17
  class DateRangeFilterIteratorTest extends RealIteratorTestCase
18
  {
includes/vendor/symfony/finder/Tests/Iterator/IteratorTestCase.php CHANGED
@@ -19,9 +19,9 @@ abstract class IteratorTestCase extends TestCase
19
  {
20
  // set iterator_to_array $use_key to false to avoid values merge
21
  // this made FinderTest::testAppendWithAnArray() fail with GnuFinderAdapter
22
- $values = array_map(function (\SplFileInfo $fileinfo) { return str_replace('/', DIRECTORY_SEPARATOR, $fileinfo->getPathname()); }, iterator_to_array($iterator, false));
23
 
24
- $expected = array_map(function ($path) { return str_replace('/', DIRECTORY_SEPARATOR, $path); }, $expected);
25
 
26
  sort($values);
27
  sort($expected);
@@ -52,7 +52,7 @@ abstract class IteratorTestCase extends TestCase
52
 
53
  foreach ($expected as $subarray) {
54
  $temp = array();
55
- while (count($values) && count($temp) < count($subarray)) {
56
  $temp[] = array_shift($values);
57
  }
58
  sort($temp);
19
  {
20
  // set iterator_to_array $use_key to false to avoid values merge
21
  // this made FinderTest::testAppendWithAnArray() fail with GnuFinderAdapter
22
+ $values = array_map(function (\SplFileInfo $fileinfo) { return str_replace('/', \DIRECTORY_SEPARATOR, $fileinfo->getPathname()); }, iterator_to_array($iterator, false));
23
 
24
+ $expected = array_map(function ($path) { return str_replace('/', \DIRECTORY_SEPARATOR, $path); }, $expected);
25
 
26
  sort($values);
27
  sort($expected);
52
 
53
  foreach ($expected as $subarray) {
54
  $temp = array();
55
+ while (\count($values) && \count($temp) < \count($subarray)) {
56
  $temp[] = array_shift($values);
57
  }
58
  sort($temp);
includes/vendor/symfony/finder/Tests/Iterator/MockSplFileInfo.php CHANGED
@@ -25,9 +25,9 @@ class MockSplFileInfo extends \SplFileInfo
25
 
26
  public function __construct($param)
27
  {
28
- if (is_string($param)) {
29
  parent::__construct($param);
30
- } elseif (is_array($param)) {
31
  $defaults = array(
32
  'name' => 'file.txt',
33
  'contents' => null,
@@ -92,7 +92,7 @@ class MockSplFileInfo extends \SplFileInfo
92
 
93
  public function setType($type)
94
  {
95
- if (is_string($type)) {
96
  switch ($type) {
97
  case 'directory':
98
  case 'd':
25
 
26
  public function __construct($param)
27
  {
28
+ if (\is_string($param)) {
29
  parent::__construct($param);
30
+ } elseif (\is_array($param)) {
31
  $defaults = array(
32
  'name' => 'file.txt',
33
  'contents' => null,
92
 
93
  public function setType($type)
94
  {
95
+ if (\is_string($type)) {
96
  switch ($type) {
97
  case 'directory':
98
  case 'd':
includes/vendor/symfony/finder/Tests/Iterator/PathFilterIteratorTest.php CHANGED
@@ -31,37 +31,37 @@ class PathFilterIteratorTest extends IteratorTestCase
31
  //PATH: A/B/C/abc.dat
32
  $inner[] = new MockSplFileInfo(array(
33
  'name' => 'abc.dat',
34
- 'relativePathname' => 'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'C'.DIRECTORY_SEPARATOR.'abc.dat',
35
  ));
36
 
37
  //PATH: A/B/ab.dat
38
  $inner[] = new MockSplFileInfo(array(
39
  'name' => 'ab.dat',
40
- 'relativePathname' => 'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'ab.dat',
41
  ));
42
 
43
  //PATH: A/a.dat
44
  $inner[] = new MockSplFileInfo(array(
45
  'name' => 'a.dat',
46
- 'relativePathname' => 'A'.DIRECTORY_SEPARATOR.'a.dat',
47
  ));
48
 
49
  //PATH: copy/A/B/C/abc.dat.copy
50
  $inner[] = new MockSplFileInfo(array(
51
  'name' => 'abc.dat.copy',
52
- 'relativePathname' => 'copy'.DIRECTORY_SEPARATOR.'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'C'.DIRECTORY_SEPARATOR.'abc.dat',
53
  ));
54
 
55
  //PATH: copy/A/B/ab.dat.copy
56
  $inner[] = new MockSplFileInfo(array(
57
  'name' => 'ab.dat.copy',
58
- 'relativePathname' => 'copy'.DIRECTORY_SEPARATOR.'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'ab.dat',
59
  ));
60
 
61
  //PATH: copy/A/a.dat.copy
62
  $inner[] = new MockSplFileInfo(array(
63
  'name' => 'a.dat.copy',
64
- 'relativePathname' => 'copy'.DIRECTORY_SEPARATOR.'A'.DIRECTORY_SEPARATOR.'a.dat',
65
  ));
66
 
67
  return array(
31
  //PATH: A/B/C/abc.dat
32
  $inner[] = new MockSplFileInfo(array(
33
  'name' => 'abc.dat',
34
+ 'relativePathname' => 'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C'.\DIRECTORY_SEPARATOR.'abc.dat',
35
  ));
36
 
37
  //PATH: A/B/ab.dat
38
  $inner[] = new MockSplFileInfo(array(
39
  'name' => 'ab.dat',
40
+ 'relativePathname' => 'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'ab.dat',
41
  ));
42
 
43
  //PATH: A/a.dat
44
  $inner[] = new MockSplFileInfo(array(
45
  'name' => 'a.dat',
46
+ 'relativePathname' => 'A'.\DIRECTORY_SEPARATOR.'a.dat',
47
  ));
48
 
49
  //PATH: copy/A/B/C/abc.dat.copy
50
  $inner[] = new MockSplFileInfo(array(
51
  'name' => 'abc.dat.copy',
52
+ 'relativePathname' => 'copy'.\DIRECTORY_SEPARATOR.'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C'.\DIRECTORY_SEPARATOR.'abc.dat',
53
  ));
54
 
55
  //PATH: copy/A/B/ab.dat.copy
56
  $inner[] = new MockSplFileInfo(array(
57
  'name' => 'ab.dat.copy',
58
+ 'relativePathname' => 'copy'.\DIRECTORY_SEPARATOR.'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'ab.dat',
59
  ));
60
 
61
  //PATH: copy/A/a.dat.copy
62
  $inner[] = new MockSplFileInfo(array(
63
  'name' => 'a.dat.copy',
64
+ 'relativePathname' => 'copy'.\DIRECTORY_SEPARATOR.'A'.\DIRECTORY_SEPARATOR.'a.dat',
65
  ));
66
 
67
  return array(
includes/vendor/symfony/finder/Tests/Iterator/RealIteratorTestCase.php CHANGED
@@ -18,7 +18,7 @@ abstract class RealIteratorTestCase extends IteratorTestCase
18
 
19
  public static function setUpBeforeClass()
20
  {
21
- self::$tmpDir = realpath(sys_get_temp_dir()).DIRECTORY_SEPARATOR.'symfony_finder';
22
 
23
  self::$files = array(
24
  '.git/',
@@ -44,7 +44,7 @@ abstract class RealIteratorTestCase extends IteratorTestCase
44
  }
45
 
46
  foreach (self::$files as $file) {
47
- if (DIRECTORY_SEPARATOR === $file[strlen($file) - 1]) {
48
  mkdir($file);
49
  } else {
50
  touch($file);
@@ -84,24 +84,24 @@ abstract class RealIteratorTestCase extends IteratorTestCase
84
  * Without the call to setUpBeforeClass() property can be null.
85
  */
86
  if (!self::$tmpDir) {
87
- self::$tmpDir = realpath(sys_get_temp_dir()).DIRECTORY_SEPARATOR.'symfony_finder';
88
  }
89
 
90
- if (is_array($files)) {
91
  $f = array();
92
  foreach ($files as $file) {
93
- if (is_array($file)) {
94
  $f[] = self::toAbsolute($file);
95
  } else {
96
- $f[] = self::$tmpDir.DIRECTORY_SEPARATOR.str_replace('/', DIRECTORY_SEPARATOR, $file);
97
  }
98
  }
99
 
100
  return $f;
101
  }
102
 
103
- if (is_string($files)) {
104
- return self::$tmpDir.DIRECTORY_SEPARATOR.str_replace('/', DIRECTORY_SEPARATOR, $files);
105
  }
106
 
107
  return self::$tmpDir;
@@ -111,7 +111,7 @@ abstract class RealIteratorTestCase extends IteratorTestCase
111
  {
112
  $f = array();
113
  foreach ($files as $file) {
114
- $f[] = realpath(__DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'Fixtures'.DIRECTORY_SEPARATOR.$file);
115
  }
116
 
117
  return $f;
18
 
19
  public static function setUpBeforeClass()
20
  {
21
+ self::$tmpDir = realpath(sys_get_temp_dir()).\DIRECTORY_SEPARATOR.'symfony_finder';
22
 
23
  self::$files = array(
24
  '.git/',
44
  }
45
 
46
  foreach (self::$files as $file) {
47
+ if (\DIRECTORY_SEPARATOR === $file[\strlen($file) - 1]) {
48
  mkdir($file);
49
  } else {
50
  touch($file);
84
  * Without the call to setUpBeforeClass() property can be null.
85
  */
86
  if (!self::$tmpDir) {
87
+ self::$tmpDir = realpath(sys_get_temp_dir()).\DIRECTORY_SEPARATOR.'symfony_finder';
88
  }
89
 
90
+ if (\is_array($files)) {
91
  $f = array();
92
  foreach ($files as $file) {
93
+ if (\is_array($file)) {
94
  $f[] = self::toAbsolute($file);
95
  } else {
96
+ $f[] = self::$tmpDir.\DIRECTORY_SEPARATOR.str_replace('/', \DIRECTORY_SEPARATOR, $file);
97
  }
98
  }
99
 
100
  return $f;
101
  }
102
 
103
+ if (\is_string($files)) {
104
+ return self::$tmpDir.\DIRECTORY_SEPARATOR.str_replace('/', \DIRECTORY_SEPARATOR, $files);
105
  }
106
 
107
  return self::$tmpDir;
111
  {
112
  $f = array();
113
  foreach ($files as $file) {
114
+ $f[] = realpath(__DIR__.\DIRECTORY_SEPARATOR.'..'.\DIRECTORY_SEPARATOR.'Fixtures'.\DIRECTORY_SEPARATOR.$file);
115
  }
116
 
117
  return $f;
includes/vendor/symfony/finder/Tests/Iterator/RecursiveDirectoryIteratorTest.php CHANGED
@@ -43,8 +43,8 @@ class RecursiveDirectoryIteratorTest extends IteratorTestCase
43
  }
44
 
45
  $contains = array(
46
- 'ftp://speedtest.tele2.net'.DIRECTORY_SEPARATOR.'1000GB.zip',
47
- 'ftp://speedtest.tele2.net'.DIRECTORY_SEPARATOR.'100GB.zip',
48
  );
49
  $actual = array();
50
 
43
  }
44
 
45
  $contains = array(
46
+ 'ftp://speedtest.tele2.net'.\DIRECTORY_SEPARATOR.'1000GB.zip',
47
+ 'ftp://speedtest.tele2.net'.\DIRECTORY_SEPARATOR.'100GB.zip',
48
  );
49
  $actual = array();
50
 
includes/vendor/symfony/finder/Tests/Iterator/SizeRangeFilterIteratorTest.php CHANGED
@@ -11,8 +11,8 @@
11
 
12
  namespace Symfony\Component\Finder\Tests\Iterator;
13
 
14
- use Symfony\Component\Finder\Iterator\SizeRangeFilterIterator;
15
  use Symfony\Component\Finder\Comparator\NumberComparator;
 
16
 
17
  class SizeRangeFilterIteratorTest extends RealIteratorTestCase
18
  {
11
 
12
  namespace Symfony\Component\Finder\Tests\Iterator;
13
 
 
14
  use Symfony\Component\Finder\Comparator\NumberComparator;
15
+ use Symfony\Component\Finder\Iterator\SizeRangeFilterIterator;
16
 
17
  class SizeRangeFilterIteratorTest extends RealIteratorTestCase
18
  {
includes/vendor/symfony/finder/Tests/Iterator/SortableIteratorTest.php CHANGED
@@ -30,10 +30,10 @@ class SortableIteratorTest extends RealIteratorTestCase
30
  */
31
  public function testAccept($mode, $expected)
32
  {
33
- if (!is_callable($mode)) {
34
  switch ($mode) {
35
  case SortableIterator::SORT_BY_ACCESSED_TIME:
36
- if ('\\' === DIRECTORY_SEPARATOR) {
37
  touch(self::toAbsolute('.git'));
38
  } else {
39
  file_get_contents(self::toAbsolute('.git'));
@@ -62,7 +62,7 @@ class SortableIteratorTest extends RealIteratorTestCase
62
  || SortableIterator::SORT_BY_CHANGED_TIME === $mode
63
  || SortableIterator::SORT_BY_MODIFIED_TIME === $mode
64
  ) {
65
- if ('\\' === DIRECTORY_SEPARATOR && SortableIterator::SORT_BY_MODIFIED_TIME !== $mode) {
66
  $this->markTestSkipped('Sorting by atime or ctime is not supported on Windows');
67
  }
68
  $this->assertOrderedIteratorForGroups($expected, $iterator);
30
  */
31
  public function testAccept($mode, $expected)
32
  {
33
+ if (!\is_callable($mode)) {
34
  switch ($mode) {
35
  case SortableIterator::SORT_BY_ACCESSED_TIME:
36
+ if ('\\' === \DIRECTORY_SEPARATOR) {
37
  touch(self::toAbsolute('.git'));
38
  } else {
39
  file_get_contents(self::toAbsolute('.git'));
62
  || SortableIterator::SORT_BY_CHANGED_TIME === $mode
63
  || SortableIterator::SORT_BY_MODIFIED_TIME === $mode
64
  ) {
65
+ if ('\\' === \DIRECTORY_SEPARATOR && SortableIterator::SORT_BY_MODIFIED_TIME !== $mode) {
66
  $this->markTestSkipped('Sorting by atime or ctime is not supported on Windows');
67
  }
68
  $this->assertOrderedIteratorForGroups($expected, $iterator);
includes/vendor/symfony/polyfill-ctype/composer.json CHANGED
@@ -22,10 +22,13 @@
22
  "psr-4": { "Symfony\\Polyfill\\Ctype\\": "" },
23
  "files": [ "bootstrap.php" ]
24
  },
 
 
 
25
  "minimum-stability": "dev",
26
  "extra": {
27
  "branch-alias": {
28
- "dev-master": "1.8-dev"
29
  }
30
  }
31
  }
22
  "psr-4": { "Symfony\\Polyfill\\Ctype\\": "" },
23
  "files": [ "bootstrap.php" ]
24
  },
25
+ "suggest": {
26
+ "ext-ctype": "For best performance"
27
+ },
28
  "minimum-stability": "dev",
29
  "extra": {
30
  "branch-alias": {
31
+ "dev-master": "1.9-dev"
32
  }
33
  }
34
  }
includes/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 anothers
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
- $s = preg_replace_callback('/\b\p{Ll}/u', array(__CLASS__, 'title_case_upper'), $s);
285
- $s = preg_replace_callback('/\B[\p{Lu}\p{Lt}]+/u', array(__CLASS__, 'title_case_lower'), $s);
 
 
 
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 title_case_lower(array $s)
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[0], MB_CASE_UPPER, 'UTF-8');
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)
includes/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';
includes/vendor/symfony/polyfill-mbstring/composer.json CHANGED
@@ -28,7 +28,7 @@
28
  "minimum-stability": "dev",
29
  "extra": {
30
  "branch-alias": {
31
- "dev-master": "1.8-dev"
32
  }
33
  }
34
  }
28
  "minimum-stability": "dev",
29
  "extra": {
30
  "branch-alias": {
31
+ "dev-master": "1.9-dev"
32
  }
33
  }
34
  }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://wp-statistics.com/donate/
4
  Tags: analytics, wordpress analytics, stats, statistics, visit, visitors, hits, chart, browser, today, yesterday, week, month, year, total, post, page, sidebar, google, live visit, search word, agent, google analytics, webmasters, google webmasters, geoip, location
5
  Requires at least: 3.0
6
  Tested up to: 4.9
7
- Stable tag: 12.4.0
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -196,6 +196,11 @@ We implement GDPR into the WP-Statistics. for more information read [the blog po
196
  Important: with this update, Opt-out feature is removed.
197
 
198
  == Changelog ==
 
 
 
 
 
199
  = 12.4.0 =
200
  * Removed The Opt-Out removed.
201
  * Added Anonymize IP addresses option in the Setting > Privacy.
4
  Tags: analytics, wordpress analytics, stats, statistics, visit, visitors, hits, chart, browser, today, yesterday, week, month, year, total, post, page, sidebar, google, live visit, search word, agent, google analytics, webmasters, google webmasters, geoip, location
5
  Requires at least: 3.0
6
  Tested up to: 4.9
7
+ Stable tag: 12.4.1
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
196
  Important: with this update, Opt-out feature is removed.
197
 
198
  == Changelog ==
199
+ = 12.4.1 =
200
+ * Implemented the `do_welcome()` function.
201
+ * Updated Libraries to latest version.
202
+ * Added `delete_transient()` for deleting transients when uninstalling the plugin.
203
+
204
  = 12.4.0 =
205
  * Removed The Opt-Out removed.
206
  * Added Anonymize IP addresses option in the Setting > Privacy.
wp-statistics.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: WP Statistics
4
  * Plugin URI: https://wp-statistics.com/
5
  * Description: Complete WordPress Analytics and Statistics for your site!
6
- * Version: 12.4.0
7
  * Author: Verona Labs
8
  * Author URI: http://veronalabs.com/
9
  *
3
  * Plugin Name: WP Statistics
4
  * Plugin URI: https://wp-statistics.com/
5
  * Description: Complete WordPress Analytics and Statistics for your site!
6
+ * Version: 12.4.1
7
  * Author: Verona Labs
8
  * Author URI: http://veronalabs.com/
9
  *