dependabot-linguist 0.212.0 → 0.217.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (215) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +38 -2
  3. data/Gemfile.lock +100 -108
  4. data/Makefile +4 -2
  5. data/README.md +32 -4
  6. data/SECURITY.md +3 -2
  7. data/dependabot-linguist.gemspec +9 -7
  8. data/exe/dependabot-linguist +1 -1
  9. data/lib/dependabot/linguist/dependabot_file_validator.rb +43 -7
  10. data/lib/dependabot/linguist/dependabot_patch.rb +14 -2
  11. data/lib/dependabot/linguist/file_fetchers/bundler.rb +54 -0
  12. data/lib/dependabot/linguist/file_fetchers/git_submodules.rb +9 -7
  13. data/lib/dependabot/linguist/file_fetchers/go_modules.rb +2 -2
  14. data/lib/dependabot/linguist/language.rb +18 -14
  15. data/lib/dependabot/linguist/languages_to_ecosystems/contexts.rb +22 -21
  16. data/lib/dependabot/linguist/languages_to_ecosystems/languages.yaml +172 -21
  17. data/lib/dependabot/linguist/languages_to_ecosystems/manager_ecosystem_maps.rb +17 -17
  18. data/lib/dependabot/linguist/linguist_patch.rb +1 -1
  19. data/lib/dependabot/linguist/repository.rb +7 -2
  20. data/lib/dependabot/linguist/version.rb +1 -1
  21. metadata +17 -210
  22. data/lib/dependabot/linguist/file_fetchers/base.rb +0 -48
  23. data/smoke-test/README.md +0 -58
  24. data/smoke-test/bundler/Gemfile +0 -9
  25. data/smoke-test/bundler/Gemfile.lock +0 -47
  26. data/smoke-test/bundler/dependabot-all-updates-test-staging.gemspec +0 -10
  27. data/smoke-test/cargo/Cargo.lock +0 -90
  28. data/smoke-test/cargo/Cargo.toml +0 -8
  29. data/smoke-test/composer/composer.json +0 -5
  30. data/smoke-test/composer/composer.lock +0 -72
  31. data/smoke-test/composer/vendor/autoload.php +0 -7
  32. data/smoke-test/composer/vendor/composer/ClassLoader.php +0 -445
  33. data/smoke-test/composer/vendor/composer/LICENSE +0 -21
  34. data/smoke-test/composer/vendor/composer/autoload_classmap.php +0 -13
  35. data/smoke-test/composer/vendor/composer/autoload_namespaces.php +0 -9
  36. data/smoke-test/composer/vendor/composer/autoload_psr4.php +0 -9
  37. data/smoke-test/composer/vendor/composer/autoload_real.php +0 -55
  38. data/smoke-test/composer/vendor/composer/autoload_static.php +0 -23
  39. data/smoke-test/composer/vendor/composer/installed.json +0 -57
  40. data/smoke-test/composer/vendor/phpmailer/phpmailer/.gitignore +0 -3
  41. data/smoke-test/composer/vendor/phpmailer/phpmailer/LICENSE +0 -504
  42. data/smoke-test/composer/vendor/phpmailer/phpmailer/README.md +0 -112
  43. data/smoke-test/composer/vendor/phpmailer/phpmailer/changelog.md +0 -530
  44. data/smoke-test/composer/vendor/phpmailer/phpmailer/class.phpmailer.php +0 -2758
  45. data/smoke-test/composer/vendor/phpmailer/phpmailer/class.pop3.php +0 -417
  46. data/smoke-test/composer/vendor/phpmailer/phpmailer/class.smtp.php +0 -1075
  47. data/smoke-test/composer/vendor/phpmailer/phpmailer/composer.json +0 -32
  48. data/smoke-test/composer/vendor/phpmailer/phpmailer/docs/Callback_function_notes.txt +0 -17
  49. data/smoke-test/composer/vendor/phpmailer/phpmailer/docs/DomainKeys_notes.txt +0 -55
  50. data/smoke-test/composer/vendor/phpmailer/phpmailer/docs/Note_for_SMTP_debugging.txt +0 -23
  51. data/smoke-test/composer/vendor/phpmailer/phpmailer/docs/extending.html +0 -148
  52. data/smoke-test/composer/vendor/phpmailer/phpmailer/docs/faq.html +0 -67
  53. data/smoke-test/composer/vendor/phpmailer/phpmailer/docs/generatedocs.sh +0 -4
  54. data/smoke-test/composer/vendor/phpmailer/phpmailer/docs/pop3_article.txt +0 -39
  55. data/smoke-test/composer/vendor/phpmailer/phpmailer/docs/use_gmail.txt +0 -44
  56. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/contents.html +0 -20
  57. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/images/phpmailer.gif +0 -0
  58. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/images/phpmailer_mini.gif +0 -0
  59. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/index.html +0 -50
  60. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_db_smtp_basic.php +0 -58
  61. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_mail_advanced.php +0 -30
  62. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_mail_basic.php +0 -41
  63. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_pop_before_smtp_advanced.php +0 -39
  64. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_pop_before_smtp_basic.php +0 -49
  65. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_sendmail_advanced.php +0 -33
  66. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_sendmail_basic.php +0 -43
  67. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_smtp_advanced.php +0 -42
  68. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_smtp_advanced_no_auth.php +0 -36
  69. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_smtp_basic.php +0 -58
  70. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_smtp_basic_no_auth.php +0 -53
  71. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_smtp_gmail_advanced.php +0 -42
  72. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_smtp_gmail_basic.php +0 -59
  73. data/smoke-test/composer/vendor/phpmailer/phpmailer/extras/class.html2text.inc +0 -489
  74. data/smoke-test/composer/vendor/phpmailer/phpmailer/extras/htmlfilter.php +0 -861
  75. data/smoke-test/composer/vendor/phpmailer/phpmailer/extras/ntlm_sasl_client.php +0 -185
  76. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ar.php +0 -26
  77. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-br.php +0 -25
  78. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ca.php +0 -25
  79. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ch.php +0 -25
  80. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-cz.php +0 -24
  81. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-de.php +0 -24
  82. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-dk.php +0 -25
  83. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-es.php +0 -25
  84. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-et.php +0 -25
  85. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-fi.php +0 -26
  86. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-fo.php +0 -26
  87. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-fr.php +0 -24
  88. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-hu.php +0 -24
  89. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-it.php +0 -26
  90. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ja.php +0 -25
  91. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-nl.php +0 -24
  92. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-no.php +0 -24
  93. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-pl.php +0 -24
  94. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ro.php +0 -26
  95. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ru.php +0 -24
  96. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-se.php +0 -25
  97. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-sk.php +0 -25
  98. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-tr.php +0 -26
  99. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh.php +0 -25
  100. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh_cn.php +0 -25
  101. data/smoke-test/composer/vendor/phpmailer/phpmailer/test/contents.html +0 -10
  102. data/smoke-test/composer/vendor/phpmailer/phpmailer/test/phpmailerTest.php +0 -1084
  103. data/smoke-test/composer/vendor/phpmailer/phpmailer/test/test.png +0 -0
  104. data/smoke-test/composer/vendor/phpmailer/phpmailer/test/test_callback.php +0 -84
  105. data/smoke-test/composer/vendor/phpmailer/phpmailer/test/testemail.php +0 -48
  106. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/LGPLv3.txt +0 -165
  107. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/contents.html +0 -14
  108. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/images/aikido.gif +0 -0
  109. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/images/bkgrnd.gif +0 -0
  110. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/images/phpmailer.gif +0 -0
  111. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/index.php +0 -427
  112. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/clipboard.swf +0 -0
  113. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushBash.js +0 -59
  114. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushCSharp.js +0 -64
  115. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushCpp.js +0 -99
  116. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushCss.js +0 -93
  117. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushDelphi.js +0 -57
  118. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushDiff.js +0 -43
  119. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushGroovy.js +0 -69
  120. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushJScript.js +0 -51
  121. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushJava.js +0 -55
  122. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushPerl.js +0 -74
  123. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushPhp.js +0 -91
  124. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushPlain.js +0 -35
  125. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushPython.js +0 -56
  126. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushRuby.js +0 -57
  127. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushScala.js +0 -53
  128. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushSql.js +0 -68
  129. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushVb.js +0 -58
  130. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushXml.js +0 -71
  131. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shCore.js +0 -30
  132. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shLegacy.js +0 -30
  133. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/src/shCore.js +0 -1949
  134. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/src/shLegacy.js +0 -172
  135. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/help.png +0 -0
  136. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/magnifier.png +0 -0
  137. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/page_white_code.png +0 -0
  138. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/page_white_copy.png +0 -0
  139. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/printer.png +0 -0
  140. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/shCore.css +0 -321
  141. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/shThemeDefault.css +0 -191
  142. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/shThemeDjango.css +0 -193
  143. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/shThemeEmacs.css +0 -192
  144. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/shThemeFadeToGrey.css +0 -193
  145. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/shThemeMidnight.css +0 -192
  146. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/shThemeRDark.css +0 -192
  147. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/wrapping.png +0 -0
  148. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/test.html +0 -46
  149. data/smoke-test/dependabot-file/no-config/.github/TARGET.yaml +0 -14
  150. data/smoke-test/dependabot-file/no-config/bundler/Gemfile +0 -9
  151. data/smoke-test/dependabot-file/no-config/bundler/Gemfile.lock +0 -47
  152. data/smoke-test/dependabot-file/no-config/bundler/dependabot-all-updates-test-staging.gemspec +0 -10
  153. data/smoke-test/dependabot-file/no-config/cargo/Cargo.lock +0 -90
  154. data/smoke-test/dependabot-file/no-config/cargo/Cargo.toml +0 -8
  155. data/smoke-test/dependabot-file/no-config/composer/composer.json +0 -5
  156. data/smoke-test/dependabot-file/no-config/composer/composer.lock +0 -72
  157. data/smoke-test/dependabot-file/over-config/.github/TARGET.yaml +0 -17
  158. data/smoke-test/dependabot-file/over-config/.github/dependabot.yaml +0 -12
  159. data/smoke-test/dependabot-file/over-config/bundler/Gemfile +0 -9
  160. data/smoke-test/dependabot-file/over-config/bundler/Gemfile.lock +0 -47
  161. data/smoke-test/dependabot-file/over-config/bundler/dependabot-all-updates-test-staging.gemspec +0 -10
  162. data/smoke-test/dependabot-file/over-config/cargo/Cargo.lock +0 -90
  163. data/smoke-test/dependabot-file/over-config/cargo/Cargo.toml +0 -8
  164. data/smoke-test/dependabot-file/over-config/composer/composer.json +0 -5
  165. data/smoke-test/dependabot-file/over-config/composer/composer.lock +0 -72
  166. data/smoke-test/dependabot-file/overer-config/.github/TARGET.yaml +0 -19
  167. data/smoke-test/dependabot-file/overer-config/.github/dependabot.yaml +0 -12
  168. data/smoke-test/dependabot-file/overer-config/bundler/Gemfile +0 -9
  169. data/smoke-test/dependabot-file/overer-config/bundler/Gemfile.lock +0 -47
  170. data/smoke-test/dependabot-file/overer-config/bundler/dependabot-all-updates-test-staging.gemspec +0 -10
  171. data/smoke-test/dependabot-file/overer-config/cargo/Cargo.lock +0 -90
  172. data/smoke-test/dependabot-file/overer-config/cargo/Cargo.toml +0 -8
  173. data/smoke-test/dependabot-file/overer-config/composer/composer.json +0 -5
  174. data/smoke-test/dependabot-file/overer-config/composer/composer.lock +0 -72
  175. data/smoke-test/dependabot-file/partial-config/.github/TARGET.yaml +0 -17
  176. data/smoke-test/dependabot-file/partial-config/.github/dependabot.yaml +0 -7
  177. data/smoke-test/dependabot-file/partial-config/bundler/Gemfile +0 -9
  178. data/smoke-test/dependabot-file/partial-config/bundler/Gemfile.lock +0 -47
  179. data/smoke-test/dependabot-file/partial-config/bundler/dependabot-all-updates-test-staging.gemspec +0 -10
  180. data/smoke-test/dependabot-file/partial-config/cargo/Cargo.lock +0 -90
  181. data/smoke-test/dependabot-file/partial-config/cargo/Cargo.toml +0 -8
  182. data/smoke-test/dependabot-file/partial-config/composer/composer.json +0 -5
  183. data/smoke-test/dependabot-file/partial-config/composer/composer.lock +0 -72
  184. data/smoke-test/docker/Dockerfile +0 -19
  185. data/smoke-test/elm/elm-package.json +0 -15
  186. data/smoke-test/elm/elm.json +0 -31
  187. data/smoke-test/github-actions/both/.github/workflows/this.yaml +0 -11
  188. data/smoke-test/github-actions/both/yaml/action.yml +0 -13
  189. data/smoke-test/github-actions/invalid/invalid_file.yaml +0 -0
  190. data/smoke-test/github-actions/workflow/.github/workflows/this.yaml +0 -11
  191. data/smoke-test/github-actions/yaml/action.yml +0 -13
  192. data/smoke-test/gitsubmodule/.gitmodules +0 -4
  193. data/smoke-test/gomod/go.mod +0 -16
  194. data/smoke-test/gomod/go.sum +0 -18
  195. data/smoke-test/gomod/gomain.go +0 -14
  196. data/smoke-test/gradle/.gitignore +0 -1
  197. data/smoke-test/gradle/build.gradle +0 -65
  198. data/smoke-test/maven/pom.xml +0 -65
  199. data/smoke-test/mix/mix.exs +0 -24
  200. data/smoke-test/mix/mix.lock +0 -5
  201. data/smoke-test/npm/package-lock.json +0 -166
  202. data/smoke-test/npm/package.json +0 -22
  203. data/smoke-test/npm/removed/package-lock.json +0 -44
  204. data/smoke-test/npm/removed/package.json +0 -15
  205. data/smoke-test/nuget/project.csproj +0 -14
  206. data/smoke-test/pip/pip/requirements.txt +0 -5
  207. data/smoke-test/pip/pip-compile/requirements.in +0 -2
  208. data/smoke-test/pip/pip-compile/requirements.txt +0 -16
  209. data/smoke-test/pip/pipenv/Pipfile +0 -13
  210. data/smoke-test/pip/pipenv/Pipfile.lock +0 -86
  211. data/smoke-test/pip/poetry/poetry.lock +0 -33
  212. data/smoke-test/pip/poetry/pyproject.toml +0 -18
  213. data/smoke-test/pub/pubspec.lock +0 -40
  214. data/smoke-test/pub/pubspec.yaml +0 -10
  215. data/smoke-test/terraform/main.tf +0 -143
@@ -1,72 +0,0 @@
1
- {
2
- "_readme": [
3
- "This file locks the dependencies of your project to a known state",
4
- "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
5
- "This file is @generated automatically"
6
- ],
7
- "content-hash": "d9618a62db23d0cc400a40547ca61955",
8
- "packages": [
9
- {
10
- "name": "phpmailer/phpmailer",
11
- "version": "v5.2.2",
12
- "source": {
13
- "type": "git",
14
- "url": "https://github.com/PHPMailer/PHPMailer.git",
15
- "reference": "10c57b72fe4476901d1b3f5ccf3f5cedb4b3c8b1"
16
- },
17
- "dist": {
18
- "type": "zip",
19
- "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/10c57b72fe4476901d1b3f5ccf3f5cedb4b3c8b1",
20
- "reference": "10c57b72fe4476901d1b3f5ccf3f5cedb4b3c8b1",
21
- "shasum": ""
22
- },
23
- "require": {
24
- "php": ">=5.0.0"
25
- },
26
- "require-dev": {
27
- "phpdocumentor/phpdocumentor": "*",
28
- "phpunit/phpunit": "*"
29
- },
30
- "type": "library",
31
- "autoload": {
32
- "classmap": [
33
- "class.phpmailer.php",
34
- "class.pop3.php",
35
- "class.smtp.php"
36
- ]
37
- },
38
- "notification-url": "https://packagist.org/downloads/",
39
- "license": [
40
- "LGPL-2.1"
41
- ],
42
- "authors": [
43
- {
44
- "name": "Jim Jagielski",
45
- "email": "jimjag@gmail.com"
46
- },
47
- {
48
- "name": "Marcus Bointon",
49
- "email": "phpmailer@synchromedia.co.uk"
50
- },
51
- {
52
- "name": "Andy Prevost",
53
- "email": "codeworxtech@users.sourceforge.net"
54
- },
55
- {
56
- "name": "Brent R. Matzelle"
57
- }
58
- ],
59
- "description": "PHPMailer is a full-featured email creation and transfer class for PHP",
60
- "time": "2012-12-04T11:15:39+00:00"
61
- }
62
- ],
63
- "packages-dev": [],
64
- "aliases": [],
65
- "minimum-stability": "stable",
66
- "stability-flags": [],
67
- "prefer-stable": false,
68
- "prefer-lowest": false,
69
- "platform": [],
70
- "platform-dev": [],
71
- "plugin-api-version": "1.1.0"
72
- }
@@ -1,7 +0,0 @@
1
- <?php
2
-
3
- // autoload.php @generated by Composer
4
-
5
- require_once __DIR__ . '/composer/autoload_real.php';
6
-
7
- return ComposerAutoloaderInit0ceac13d49cab8ed98cfbf3f2634c685::getLoader();
@@ -1,445 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * This file is part of Composer.
5
- *
6
- * (c) Nils Adermann <naderman@naderman.de>
7
- * Jordi Boggiano <j.boggiano@seld.be>
8
- *
9
- * For the full copyright and license information, please view the LICENSE
10
- * file that was distributed with this source code.
11
- */
12
-
13
- namespace Composer\Autoload;
14
-
15
- /**
16
- * ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
17
- *
18
- * $loader = new \Composer\Autoload\ClassLoader();
19
- *
20
- * // register classes with namespaces
21
- * $loader->add('Symfony\Component', __DIR__.'/component');
22
- * $loader->add('Symfony', __DIR__.'/framework');
23
- *
24
- * // activate the autoloader
25
- * $loader->register();
26
- *
27
- * // to enable searching the include path (eg. for PEAR packages)
28
- * $loader->setUseIncludePath(true);
29
- *
30
- * In this example, if you try to use a class in the Symfony\Component
31
- * namespace or one of its children (Symfony\Component\Console for instance),
32
- * the autoloader will first look for the class under the component/
33
- * directory, and it will then fallback to the framework/ directory if not
34
- * found before giving up.
35
- *
36
- * This class is loosely based on the Symfony UniversalClassLoader.
37
- *
38
- * @author Fabien Potencier <fabien@symfony.com>
39
- * @author Jordi Boggiano <j.boggiano@seld.be>
40
- * @see http://www.php-fig.org/psr/psr-0/
41
- * @see http://www.php-fig.org/psr/psr-4/
42
- */
43
- class ClassLoader
44
- {
45
- // PSR-4
46
- private $prefixLengthsPsr4 = array();
47
- private $prefixDirsPsr4 = array();
48
- private $fallbackDirsPsr4 = array();
49
-
50
- // PSR-0
51
- private $prefixesPsr0 = array();
52
- private $fallbackDirsPsr0 = array();
53
-
54
- private $useIncludePath = false;
55
- private $classMap = array();
56
- private $classMapAuthoritative = false;
57
- private $missingClasses = array();
58
- private $apcuPrefix;
59
-
60
- public function getPrefixes()
61
- {
62
- if (!empty($this->prefixesPsr0)) {
63
- return call_user_func_array('array_merge', $this->prefixesPsr0);
64
- }
65
-
66
- return array();
67
- }
68
-
69
- public function getPrefixesPsr4()
70
- {
71
- return $this->prefixDirsPsr4;
72
- }
73
-
74
- public function getFallbackDirs()
75
- {
76
- return $this->fallbackDirsPsr0;
77
- }
78
-
79
- public function getFallbackDirsPsr4()
80
- {
81
- return $this->fallbackDirsPsr4;
82
- }
83
-
84
- public function getClassMap()
85
- {
86
- return $this->classMap;
87
- }
88
-
89
- /**
90
- * @param array $classMap Class to filename map
91
- */
92
- public function addClassMap(array $classMap)
93
- {
94
- if ($this->classMap) {
95
- $this->classMap = array_merge($this->classMap, $classMap);
96
- } else {
97
- $this->classMap = $classMap;
98
- }
99
- }
100
-
101
- /**
102
- * Registers a set of PSR-0 directories for a given prefix, either
103
- * appending or prepending to the ones previously set for this prefix.
104
- *
105
- * @param string $prefix The prefix
106
- * @param array|string $paths The PSR-0 root directories
107
- * @param bool $prepend Whether to prepend the directories
108
- */
109
- public function add($prefix, $paths, $prepend = false)
110
- {
111
- if (!$prefix) {
112
- if ($prepend) {
113
- $this->fallbackDirsPsr0 = array_merge(
114
- (array) $paths,
115
- $this->fallbackDirsPsr0
116
- );
117
- } else {
118
- $this->fallbackDirsPsr0 = array_merge(
119
- $this->fallbackDirsPsr0,
120
- (array) $paths
121
- );
122
- }
123
-
124
- return;
125
- }
126
-
127
- $first = $prefix[0];
128
- if (!isset($this->prefixesPsr0[$first][$prefix])) {
129
- $this->prefixesPsr0[$first][$prefix] = (array) $paths;
130
-
131
- return;
132
- }
133
- if ($prepend) {
134
- $this->prefixesPsr0[$first][$prefix] = array_merge(
135
- (array) $paths,
136
- $this->prefixesPsr0[$first][$prefix]
137
- );
138
- } else {
139
- $this->prefixesPsr0[$first][$prefix] = array_merge(
140
- $this->prefixesPsr0[$first][$prefix],
141
- (array) $paths
142
- );
143
- }
144
- }
145
-
146
- /**
147
- * Registers a set of PSR-4 directories for a given namespace, either
148
- * appending or prepending to the ones previously set for this namespace.
149
- *
150
- * @param string $prefix The prefix/namespace, with trailing '\\'
151
- * @param array|string $paths The PSR-4 base directories
152
- * @param bool $prepend Whether to prepend the directories
153
- *
154
- * @throws \InvalidArgumentException
155
- */
156
- public function addPsr4($prefix, $paths, $prepend = false)
157
- {
158
- if (!$prefix) {
159
- // Register directories for the root namespace.
160
- if ($prepend) {
161
- $this->fallbackDirsPsr4 = array_merge(
162
- (array) $paths,
163
- $this->fallbackDirsPsr4
164
- );
165
- } else {
166
- $this->fallbackDirsPsr4 = array_merge(
167
- $this->fallbackDirsPsr4,
168
- (array) $paths
169
- );
170
- }
171
- } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
172
- // Register directories for a new namespace.
173
- $length = strlen($prefix);
174
- if ('\\' !== $prefix[$length - 1]) {
175
- throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
176
- }
177
- $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
178
- $this->prefixDirsPsr4[$prefix] = (array) $paths;
179
- } elseif ($prepend) {
180
- // Prepend directories for an already registered namespace.
181
- $this->prefixDirsPsr4[$prefix] = array_merge(
182
- (array) $paths,
183
- $this->prefixDirsPsr4[$prefix]
184
- );
185
- } else {
186
- // Append directories for an already registered namespace.
187
- $this->prefixDirsPsr4[$prefix] = array_merge(
188
- $this->prefixDirsPsr4[$prefix],
189
- (array) $paths
190
- );
191
- }
192
- }
193
-
194
- /**
195
- * Registers a set of PSR-0 directories for a given prefix,
196
- * replacing any others previously set for this prefix.
197
- *
198
- * @param string $prefix The prefix
199
- * @param array|string $paths The PSR-0 base directories
200
- */
201
- public function set($prefix, $paths)
202
- {
203
- if (!$prefix) {
204
- $this->fallbackDirsPsr0 = (array) $paths;
205
- } else {
206
- $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
207
- }
208
- }
209
-
210
- /**
211
- * Registers a set of PSR-4 directories for a given namespace,
212
- * replacing any others previously set for this namespace.
213
- *
214
- * @param string $prefix The prefix/namespace, with trailing '\\'
215
- * @param array|string $paths The PSR-4 base directories
216
- *
217
- * @throws \InvalidArgumentException
218
- */
219
- public function setPsr4($prefix, $paths)
220
- {
221
- if (!$prefix) {
222
- $this->fallbackDirsPsr4 = (array) $paths;
223
- } else {
224
- $length = strlen($prefix);
225
- if ('\\' !== $prefix[$length - 1]) {
226
- throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
227
- }
228
- $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
229
- $this->prefixDirsPsr4[$prefix] = (array) $paths;
230
- }
231
- }
232
-
233
- /**
234
- * Turns on searching the include path for class files.
235
- *
236
- * @param bool $useIncludePath
237
- */
238
- public function setUseIncludePath($useIncludePath)
239
- {
240
- $this->useIncludePath = $useIncludePath;
241
- }
242
-
243
- /**
244
- * Can be used to check if the autoloader uses the include path to check
245
- * for classes.
246
- *
247
- * @return bool
248
- */
249
- public function getUseIncludePath()
250
- {
251
- return $this->useIncludePath;
252
- }
253
-
254
- /**
255
- * Turns off searching the prefix and fallback directories for classes
256
- * that have not been registered with the class map.
257
- *
258
- * @param bool $classMapAuthoritative
259
- */
260
- public function setClassMapAuthoritative($classMapAuthoritative)
261
- {
262
- $this->classMapAuthoritative = $classMapAuthoritative;
263
- }
264
-
265
- /**
266
- * Should class lookup fail if not found in the current class map?
267
- *
268
- * @return bool
269
- */
270
- public function isClassMapAuthoritative()
271
- {
272
- return $this->classMapAuthoritative;
273
- }
274
-
275
- /**
276
- * APCu prefix to use to cache found/not-found classes, if the extension is enabled.
277
- *
278
- * @param string|null $apcuPrefix
279
- */
280
- public function setApcuPrefix($apcuPrefix)
281
- {
282
- $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
283
- }
284
-
285
- /**
286
- * The APCu prefix in use, or null if APCu caching is not enabled.
287
- *
288
- * @return string|null
289
- */
290
- public function getApcuPrefix()
291
- {
292
- return $this->apcuPrefix;
293
- }
294
-
295
- /**
296
- * Registers this instance as an autoloader.
297
- *
298
- * @param bool $prepend Whether to prepend the autoloader or not
299
- */
300
- public function register($prepend = false)
301
- {
302
- spl_autoload_register(array($this, 'loadClass'), true, $prepend);
303
- }
304
-
305
- /**
306
- * Unregisters this instance as an autoloader.
307
- */
308
- public function unregister()
309
- {
310
- spl_autoload_unregister(array($this, 'loadClass'));
311
- }
312
-
313
- /**
314
- * Loads the given class or interface.
315
- *
316
- * @param string $class The name of the class
317
- * @return bool|null True if loaded, null otherwise
318
- */
319
- public function loadClass($class)
320
- {
321
- if ($file = $this->findFile($class)) {
322
- includeFile($file);
323
-
324
- return true;
325
- }
326
- }
327
-
328
- /**
329
- * Finds the path to the file where the class is defined.
330
- *
331
- * @param string $class The name of the class
332
- *
333
- * @return string|false The path if found, false otherwise
334
- */
335
- public function findFile($class)
336
- {
337
- // class map lookup
338
- if (isset($this->classMap[$class])) {
339
- return $this->classMap[$class];
340
- }
341
- if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
342
- return false;
343
- }
344
- if (null !== $this->apcuPrefix) {
345
- $file = apcu_fetch($this->apcuPrefix.$class, $hit);
346
- if ($hit) {
347
- return $file;
348
- }
349
- }
350
-
351
- $file = $this->findFileWithExtension($class, '.php');
352
-
353
- // Search for Hack files if we are running on HHVM
354
- if (false === $file && defined('HHVM_VERSION')) {
355
- $file = $this->findFileWithExtension($class, '.hh');
356
- }
357
-
358
- if (null !== $this->apcuPrefix) {
359
- apcu_add($this->apcuPrefix.$class, $file);
360
- }
361
-
362
- if (false === $file) {
363
- // Remember that this class does not exist.
364
- $this->missingClasses[$class] = true;
365
- }
366
-
367
- return $file;
368
- }
369
-
370
- private function findFileWithExtension($class, $ext)
371
- {
372
- // PSR-4 lookup
373
- $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
374
-
375
- $first = $class[0];
376
- if (isset($this->prefixLengthsPsr4[$first])) {
377
- $subPath = $class;
378
- while (false !== $lastPos = strrpos($subPath, '\\')) {
379
- $subPath = substr($subPath, 0, $lastPos);
380
- $search = $subPath . '\\';
381
- if (isset($this->prefixDirsPsr4[$search])) {
382
- $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
383
- foreach ($this->prefixDirsPsr4[$search] as $dir) {
384
- if (file_exists($file = $dir . $pathEnd)) {
385
- return $file;
386
- }
387
- }
388
- }
389
- }
390
- }
391
-
392
- // PSR-4 fallback dirs
393
- foreach ($this->fallbackDirsPsr4 as $dir) {
394
- if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
395
- return $file;
396
- }
397
- }
398
-
399
- // PSR-0 lookup
400
- if (false !== $pos = strrpos($class, '\\')) {
401
- // namespaced class name
402
- $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
403
- . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
404
- } else {
405
- // PEAR-like class name
406
- $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
407
- }
408
-
409
- if (isset($this->prefixesPsr0[$first])) {
410
- foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
411
- if (0 === strpos($class, $prefix)) {
412
- foreach ($dirs as $dir) {
413
- if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
414
- return $file;
415
- }
416
- }
417
- }
418
- }
419
- }
420
-
421
- // PSR-0 fallback dirs
422
- foreach ($this->fallbackDirsPsr0 as $dir) {
423
- if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
424
- return $file;
425
- }
426
- }
427
-
428
- // PSR-0 include paths.
429
- if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
430
- return $file;
431
- }
432
-
433
- return false;
434
- }
435
- }
436
-
437
- /**
438
- * Scope isolated include.
439
- *
440
- * Prevents access to $this/self from included files.
441
- */
442
- function includeFile($file)
443
- {
444
- include $file;
445
- }
@@ -1,21 +0,0 @@
1
-
2
- Copyright (c) Nils Adermann, Jordi Boggiano
3
-
4
- Permission is hereby granted, free of charge, to any person obtaining a copy
5
- of this software and associated documentation files (the "Software"), to deal
6
- in the Software without restriction, including without limitation the rights
7
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
- copies of the Software, and to permit persons to whom the Software is furnished
9
- to do so, subject to the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be included in all
12
- copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
- THE SOFTWARE.
21
-
@@ -1,13 +0,0 @@
1
- <?php
2
-
3
- // autoload_classmap.php @generated by Composer
4
-
5
- $vendorDir = dirname(dirname(__FILE__));
6
- $baseDir = dirname($vendorDir);
7
-
8
- return array(
9
- 'PHPMailer' => $vendorDir . '/phpmailer/phpmailer/class.phpmailer.php',
10
- 'POP3' => $vendorDir . '/phpmailer/phpmailer/class.pop3.php',
11
- 'SMTP' => $vendorDir . '/phpmailer/phpmailer/class.smtp.php',
12
- 'phpmailerException' => $vendorDir . '/phpmailer/phpmailer/class.phpmailer.php',
13
- );
@@ -1,9 +0,0 @@
1
- <?php
2
-
3
- // autoload_namespaces.php @generated by Composer
4
-
5
- $vendorDir = dirname(dirname(__FILE__));
6
- $baseDir = dirname($vendorDir);
7
-
8
- return array(
9
- );
@@ -1,9 +0,0 @@
1
- <?php
2
-
3
- // autoload_psr4.php @generated by Composer
4
-
5
- $vendorDir = dirname(dirname(__FILE__));
6
- $baseDir = dirname($vendorDir);
7
-
8
- return array(
9
- );
@@ -1,55 +0,0 @@
1
- <?php
2
-
3
- // autoload_real.php @generated by Composer
4
-
5
- class ComposerAutoloaderInit0ceac13d49cab8ed98cfbf3f2634c685
6
- {
7
- private static $loader;
8
-
9
- public static function loadClassLoader($class)
10
- {
11
- if ('Composer\Autoload\ClassLoader' === $class) {
12
- require __DIR__ . '/ClassLoader.php';
13
- }
14
- }
15
-
16
- /**
17
- * @return \Composer\Autoload\ClassLoader
18
- */
19
- public static function getLoader()
20
- {
21
- if (null !== self::$loader) {
22
- return self::$loader;
23
- }
24
-
25
- spl_autoload_register(array('ComposerAutoloaderInit0ceac13d49cab8ed98cfbf3f2634c685', 'loadClassLoader'), true, true);
26
- self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
- spl_autoload_unregister(array('ComposerAutoloaderInit0ceac13d49cab8ed98cfbf3f2634c685', 'loadClassLoader'));
28
-
29
- $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
- if ($useStaticLoader) {
31
- require_once __DIR__ . '/autoload_static.php';
32
-
33
- call_user_func(\Composer\Autoload\ComposerStaticInit0ceac13d49cab8ed98cfbf3f2634c685::getInitializer($loader));
34
- } else {
35
- $map = require __DIR__ . '/autoload_namespaces.php';
36
- foreach ($map as $namespace => $path) {
37
- $loader->set($namespace, $path);
38
- }
39
-
40
- $map = require __DIR__ . '/autoload_psr4.php';
41
- foreach ($map as $namespace => $path) {
42
- $loader->setPsr4($namespace, $path);
43
- }
44
-
45
- $classMap = require __DIR__ . '/autoload_classmap.php';
46
- if ($classMap) {
47
- $loader->addClassMap($classMap);
48
- }
49
- }
50
-
51
- $loader->register(true);
52
-
53
- return $loader;
54
- }
55
- }
@@ -1,23 +0,0 @@
1
- <?php
2
-
3
- // autoload_static.php @generated by Composer
4
-
5
- namespace Composer\Autoload;
6
-
7
- class ComposerStaticInit0ceac13d49cab8ed98cfbf3f2634c685
8
- {
9
- public static $classMap = array (
10
- 'PHPMailer' => __DIR__ . '/..' . '/phpmailer/phpmailer/class.phpmailer.php',
11
- 'POP3' => __DIR__ . '/..' . '/phpmailer/phpmailer/class.pop3.php',
12
- 'SMTP' => __DIR__ . '/..' . '/phpmailer/phpmailer/class.smtp.php',
13
- 'phpmailerException' => __DIR__ . '/..' . '/phpmailer/phpmailer/class.phpmailer.php',
14
- );
15
-
16
- public static function getInitializer(ClassLoader $loader)
17
- {
18
- return \Closure::bind(function () use ($loader) {
19
- $loader->classMap = ComposerStaticInit0ceac13d49cab8ed98cfbf3f2634c685::$classMap;
20
-
21
- }, null, ClassLoader::class);
22
- }
23
- }