dropbox-sign 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +26 -9
- data/VERSION +1 -0
- data/bin/release +39 -0
- data/bin/ruby +1 -0
- data/docs/BulkSendJobApi.md +5 -3
- data/docs/SignatureRequestApi.md +3 -3
- data/docs/SignatureRequestCreateEmbeddedRequest.md +1 -1
- data/docs/SignatureRequestSendRequest.md +1 -1
- data/docs/SubFormFieldsPerDocumentBase.md +1 -1
- data/docs/TeamResponse.md +1 -0
- data/docs/TemplateCreateEmbeddedDraftRequest.md +1 -1
- data/docs/TemplateResponse.md +2 -2
- data/docs/TemplateResponseDocument.md +3 -3
- data/docs/{TemplateResponseCustomField.md → TemplateResponseDocumentCustomFieldBase.md} +6 -8
- data/docs/TemplateResponseDocumentCustomFieldCheckbox.md +10 -0
- data/docs/TemplateResponseDocumentCustomFieldText.md +14 -0
- data/docs/TemplateResponseDocumentFieldGroup.md +1 -1
- data/docs/TemplateResponseDocumentFieldGroupRule.md +11 -0
- data/docs/{TemplateResponseDocumentFormField.md → TemplateResponseDocumentFormFieldBase.md} +5 -8
- data/docs/TemplateResponseDocumentFormFieldCheckbox.md +10 -0
- data/docs/TemplateResponseDocumentFormFieldDateSigned.md +10 -0
- data/docs/TemplateResponseDocumentFormFieldDropdown.md +10 -0
- data/docs/TemplateResponseDocumentFormFieldHyperlink.md +14 -0
- data/docs/TemplateResponseDocumentFormFieldInitials.md +10 -0
- data/docs/TemplateResponseDocumentFormFieldRadio.md +10 -0
- data/docs/TemplateResponseDocumentFormFieldSignature.md +10 -0
- data/docs/TemplateResponseDocumentFormFieldText.md +15 -0
- data/docs/{TemplateResponseDocumentStaticField.md → TemplateResponseDocumentStaticFieldBase.md} +6 -5
- data/docs/TemplateResponseDocumentStaticFieldCheckbox.md +10 -0
- data/docs/TemplateResponseDocumentStaticFieldDateSigned.md +10 -0
- data/docs/TemplateResponseDocumentStaticFieldDropdown.md +10 -0
- data/docs/TemplateResponseDocumentStaticFieldHyperlink.md +10 -0
- data/docs/TemplateResponseDocumentStaticFieldInitials.md +10 -0
- data/docs/TemplateResponseDocumentStaticFieldRadio.md +10 -0
- data/docs/TemplateResponseDocumentStaticFieldSignature.md +10 -0
- data/docs/TemplateResponseDocumentStaticFieldText.md +10 -0
- data/docs/TemplateResponseFieldAvgTextLength.md +1 -1
- data/docs/UnclaimedDraftApi.md +2 -2
- data/docs/UnclaimedDraftCreateEmbeddedRequest.md +1 -1
- data/docs/UnclaimedDraftCreateRequest.md +1 -1
- data/examples/SignatureRequestCreateEmbedded.rb +1 -1
- data/examples/SignatureRequestSend.rb +2 -2
- data/examples/UnclaimedDraftCreate.rb +2 -2
- data/lib/dropbox-sign/api/bulk_send_job_api.rb +6 -0
- data/lib/dropbox-sign/models/signature_request_create_embedded_request.rb +1 -1
- data/lib/dropbox-sign/models/signature_request_send_request.rb +1 -1
- data/lib/dropbox-sign/models/sub_form_fields_per_document_base.rb +1 -1
- data/lib/dropbox-sign/models/team_response.rb +17 -4
- data/lib/dropbox-sign/models/template_create_embedded_draft_request.rb +1 -1
- data/lib/dropbox-sign/models/template_response.rb +5 -5
- data/lib/dropbox-sign/models/template_response_document.rb +9 -9
- data/lib/dropbox-sign/models/{template_response_document_static_field.rb → template_response_document_custom_field_base.rb} +75 -43
- data/lib/dropbox-sign/models/template_response_document_custom_field_checkbox.rb +263 -0
- data/lib/dropbox-sign/models/template_response_document_custom_field_text.rb +306 -0
- data/lib/dropbox-sign/models/template_response_document_field_group.rb +2 -3
- data/lib/dropbox-sign/models/template_response_document_field_group_rule.rb +263 -0
- data/lib/dropbox-sign/models/{template_response_named_form_field.rb → template_response_document_form_field_base.rb} +82 -79
- data/lib/dropbox-sign/models/template_response_document_form_field_checkbox.rb +263 -0
- data/lib/dropbox-sign/models/template_response_document_form_field_date_signed.rb +263 -0
- data/lib/dropbox-sign/models/template_response_document_form_field_dropdown.rb +263 -0
- data/lib/dropbox-sign/models/template_response_document_form_field_hyperlink.rb +306 -0
- data/lib/dropbox-sign/models/template_response_document_form_field_initials.rb +263 -0
- data/lib/dropbox-sign/models/template_response_document_form_field_radio.rb +263 -0
- data/lib/dropbox-sign/models/template_response_document_form_field_signature.rb +263 -0
- data/lib/dropbox-sign/models/{template_response_document_form_field.rb → template_response_document_form_field_text.rb} +53 -132
- data/lib/dropbox-sign/models/{template_response_custom_field.rb → template_response_document_static_field_base.rb} +94 -112
- data/lib/dropbox-sign/models/template_response_document_static_field_checkbox.rb +263 -0
- data/lib/dropbox-sign/models/template_response_document_static_field_date_signed.rb +263 -0
- data/lib/dropbox-sign/models/template_response_document_static_field_dropdown.rb +263 -0
- data/lib/dropbox-sign/models/template_response_document_static_field_hyperlink.rb +263 -0
- data/lib/dropbox-sign/models/template_response_document_static_field_initials.rb +263 -0
- data/lib/dropbox-sign/models/template_response_document_static_field_radio.rb +263 -0
- data/lib/dropbox-sign/models/template_response_document_static_field_signature.rb +263 -0
- data/lib/dropbox-sign/models/template_response_document_static_field_text.rb +263 -0
- data/lib/dropbox-sign/models/template_response_field_avg_text_length.rb +1 -1
- data/lib/dropbox-sign/models/unclaimed_draft_create_embedded_request.rb +1 -1
- data/lib/dropbox-sign/models/unclaimed_draft_create_request.rb +1 -1
- data/lib/dropbox-sign/version.rb +1 -1
- data/lib/dropbox-sign.rb +22 -5
- data/openapi-config.yaml +4 -1
- data/openapi-sdk.yaml +598 -186
- data/templates/VERSION-root.mustache +1 -0
- data/test_fixtures/AccountCreateResponse.json +1 -0
- data/test_fixtures/ApiAppGetResponse.json +1 -0
- data/test_fixtures/ApiAppListResponse.json +1 -0
- data/test_fixtures/BulkSendJobGetResponse.json +8 -3
- data/test_fixtures/SignatureRequestGetResponse.json +65 -65
- data/test_fixtures/SignatureRequestListResponse.json +11 -4
- data/test_fixtures/TemplateGetResponse.json +1064 -41
- data/test_fixtures/TemplateListResponse.json +513 -44
- metadata +58 -64
- data/docs/TemplateResponseDocumentCustomField.md +0 -25
- data/docs/TemplateResponseNamedFormField.md +0 -23
- data/lib/dropbox-sign/models/template_response_document_custom_field.rb +0 -454
- data/vendor/autoload.php +0 -7
- data/vendor/bin/yaml-lint +0 -117
- data/vendor/composer/ClassLoader.php +0 -572
- data/vendor/composer/InstalledVersions.php +0 -350
- data/vendor/composer/LICENSE +0 -21
- data/vendor/composer/autoload_classmap.php +0 -10
- data/vendor/composer/autoload_files.php +0 -11
- data/vendor/composer/autoload_namespaces.php +0 -9
- data/vendor/composer/autoload_psr4.php +0 -11
- data/vendor/composer/autoload_real.php +0 -80
- data/vendor/composer/autoload_static.php +0 -46
- data/vendor/composer/installed.json +0 -239
- data/vendor/composer/installed.php +0 -50
- data/vendor/composer/platform_check.php +0 -26
- data/vendor/symfony/deprecation-contracts/.gitignore +0 -3
- data/vendor/symfony/deprecation-contracts/CHANGELOG.md +0 -5
- data/vendor/symfony/deprecation-contracts/LICENSE +0 -19
- data/vendor/symfony/deprecation-contracts/README.md +0 -26
- data/vendor/symfony/deprecation-contracts/composer.json +0 -35
- data/vendor/symfony/deprecation-contracts/function.php +0 -27
- data/vendor/symfony/polyfill-ctype/Ctype.php +0 -232
- data/vendor/symfony/polyfill-ctype/LICENSE +0 -19
- data/vendor/symfony/polyfill-ctype/README.md +0 -12
- data/vendor/symfony/polyfill-ctype/bootstrap.php +0 -50
- data/vendor/symfony/polyfill-ctype/bootstrap80.php +0 -46
- data/vendor/symfony/polyfill-ctype/composer.json +0 -41
- data/vendor/symfony/yaml/CHANGELOG.md +0 -237
- data/vendor/symfony/yaml/Command/LintCommand.php +0 -289
- data/vendor/symfony/yaml/Dumper.php +0 -140
- data/vendor/symfony/yaml/Escaper.php +0 -95
- data/vendor/symfony/yaml/Exception/DumpException.php +0 -21
- data/vendor/symfony/yaml/Exception/ExceptionInterface.php +0 -21
- data/vendor/symfony/yaml/Exception/ParseException.php +0 -132
- data/vendor/symfony/yaml/Exception/RuntimeException.php +0 -21
- data/vendor/symfony/yaml/Inline.php +0 -812
- data/vendor/symfony/yaml/LICENSE +0 -19
- data/vendor/symfony/yaml/Parser.php +0 -1305
- data/vendor/symfony/yaml/README.md +0 -13
- data/vendor/symfony/yaml/Resources/bin/yaml-lint +0 -45
- data/vendor/symfony/yaml/Tag/TaggedValue.php +0 -38
- data/vendor/symfony/yaml/Unescaper.php +0 -132
- data/vendor/symfony/yaml/Yaml.php +0 -100
- data/vendor/symfony/yaml/composer.json +0 -42
@@ -1,350 +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;
|
14
|
-
|
15
|
-
use Composer\Autoload\ClassLoader;
|
16
|
-
use Composer\Semver\VersionParser;
|
17
|
-
|
18
|
-
/**
|
19
|
-
* This class is copied in every Composer installed project and available to all
|
20
|
-
*
|
21
|
-
* See also https://getcomposer.org/doc/07-runtime.md#installed-versions
|
22
|
-
*
|
23
|
-
* To require its presence, you can require `composer-runtime-api ^2.0`
|
24
|
-
*/
|
25
|
-
class InstalledVersions
|
26
|
-
{
|
27
|
-
/**
|
28
|
-
* @var mixed[]|null
|
29
|
-
* @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}|array{}|null
|
30
|
-
*/
|
31
|
-
private static $installed;
|
32
|
-
|
33
|
-
/**
|
34
|
-
* @var bool|null
|
35
|
-
*/
|
36
|
-
private static $canGetVendors;
|
37
|
-
|
38
|
-
/**
|
39
|
-
* @var array[]
|
40
|
-
* @psalm-var array<string, array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
|
41
|
-
*/
|
42
|
-
private static $installedByVendor = array();
|
43
|
-
|
44
|
-
/**
|
45
|
-
* Returns a list of all package names which are present, either by being installed, replaced or provided
|
46
|
-
*
|
47
|
-
* @return string[]
|
48
|
-
* @psalm-return list<string>
|
49
|
-
*/
|
50
|
-
public static function getInstalledPackages()
|
51
|
-
{
|
52
|
-
$packages = array();
|
53
|
-
foreach (self::getInstalled() as $installed) {
|
54
|
-
$packages[] = array_keys($installed['versions']);
|
55
|
-
}
|
56
|
-
|
57
|
-
if (1 === \count($packages)) {
|
58
|
-
return $packages[0];
|
59
|
-
}
|
60
|
-
|
61
|
-
return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
|
62
|
-
}
|
63
|
-
|
64
|
-
/**
|
65
|
-
* Returns a list of all package names with a specific type e.g. 'library'
|
66
|
-
*
|
67
|
-
* @param string $type
|
68
|
-
* @return string[]
|
69
|
-
* @psalm-return list<string>
|
70
|
-
*/
|
71
|
-
public static function getInstalledPackagesByType($type)
|
72
|
-
{
|
73
|
-
$packagesByType = array();
|
74
|
-
|
75
|
-
foreach (self::getInstalled() as $installed) {
|
76
|
-
foreach ($installed['versions'] as $name => $package) {
|
77
|
-
if (isset($package['type']) && $package['type'] === $type) {
|
78
|
-
$packagesByType[] = $name;
|
79
|
-
}
|
80
|
-
}
|
81
|
-
}
|
82
|
-
|
83
|
-
return $packagesByType;
|
84
|
-
}
|
85
|
-
|
86
|
-
/**
|
87
|
-
* Checks whether the given package is installed
|
88
|
-
*
|
89
|
-
* This also returns true if the package name is provided or replaced by another package
|
90
|
-
*
|
91
|
-
* @param string $packageName
|
92
|
-
* @param bool $includeDevRequirements
|
93
|
-
* @return bool
|
94
|
-
*/
|
95
|
-
public static function isInstalled($packageName, $includeDevRequirements = true)
|
96
|
-
{
|
97
|
-
foreach (self::getInstalled() as $installed) {
|
98
|
-
if (isset($installed['versions'][$packageName])) {
|
99
|
-
return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
|
100
|
-
}
|
101
|
-
}
|
102
|
-
|
103
|
-
return false;
|
104
|
-
}
|
105
|
-
|
106
|
-
/**
|
107
|
-
* Checks whether the given package satisfies a version constraint
|
108
|
-
*
|
109
|
-
* e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
|
110
|
-
*
|
111
|
-
* Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
|
112
|
-
*
|
113
|
-
* @param VersionParser $parser Install composer/semver to have access to this class and functionality
|
114
|
-
* @param string $packageName
|
115
|
-
* @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
|
116
|
-
* @return bool
|
117
|
-
*/
|
118
|
-
public static function satisfies(VersionParser $parser, $packageName, $constraint)
|
119
|
-
{
|
120
|
-
$constraint = $parser->parseConstraints($constraint);
|
121
|
-
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
|
122
|
-
|
123
|
-
return $provided->matches($constraint);
|
124
|
-
}
|
125
|
-
|
126
|
-
/**
|
127
|
-
* Returns a version constraint representing all the range(s) which are installed for a given package
|
128
|
-
*
|
129
|
-
* It is easier to use this via isInstalled() with the $constraint argument if you need to check
|
130
|
-
* whether a given version of a package is installed, and not just whether it exists
|
131
|
-
*
|
132
|
-
* @param string $packageName
|
133
|
-
* @return string Version constraint usable with composer/semver
|
134
|
-
*/
|
135
|
-
public static function getVersionRanges($packageName)
|
136
|
-
{
|
137
|
-
foreach (self::getInstalled() as $installed) {
|
138
|
-
if (!isset($installed['versions'][$packageName])) {
|
139
|
-
continue;
|
140
|
-
}
|
141
|
-
|
142
|
-
$ranges = array();
|
143
|
-
if (isset($installed['versions'][$packageName]['pretty_version'])) {
|
144
|
-
$ranges[] = $installed['versions'][$packageName]['pretty_version'];
|
145
|
-
}
|
146
|
-
if (array_key_exists('aliases', $installed['versions'][$packageName])) {
|
147
|
-
$ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
|
148
|
-
}
|
149
|
-
if (array_key_exists('replaced', $installed['versions'][$packageName])) {
|
150
|
-
$ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
|
151
|
-
}
|
152
|
-
if (array_key_exists('provided', $installed['versions'][$packageName])) {
|
153
|
-
$ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
|
154
|
-
}
|
155
|
-
|
156
|
-
return implode(' || ', $ranges);
|
157
|
-
}
|
158
|
-
|
159
|
-
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
160
|
-
}
|
161
|
-
|
162
|
-
/**
|
163
|
-
* @param string $packageName
|
164
|
-
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
|
165
|
-
*/
|
166
|
-
public static function getVersion($packageName)
|
167
|
-
{
|
168
|
-
foreach (self::getInstalled() as $installed) {
|
169
|
-
if (!isset($installed['versions'][$packageName])) {
|
170
|
-
continue;
|
171
|
-
}
|
172
|
-
|
173
|
-
if (!isset($installed['versions'][$packageName]['version'])) {
|
174
|
-
return null;
|
175
|
-
}
|
176
|
-
|
177
|
-
return $installed['versions'][$packageName]['version'];
|
178
|
-
}
|
179
|
-
|
180
|
-
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
181
|
-
}
|
182
|
-
|
183
|
-
/**
|
184
|
-
* @param string $packageName
|
185
|
-
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
|
186
|
-
*/
|
187
|
-
public static function getPrettyVersion($packageName)
|
188
|
-
{
|
189
|
-
foreach (self::getInstalled() as $installed) {
|
190
|
-
if (!isset($installed['versions'][$packageName])) {
|
191
|
-
continue;
|
192
|
-
}
|
193
|
-
|
194
|
-
if (!isset($installed['versions'][$packageName]['pretty_version'])) {
|
195
|
-
return null;
|
196
|
-
}
|
197
|
-
|
198
|
-
return $installed['versions'][$packageName]['pretty_version'];
|
199
|
-
}
|
200
|
-
|
201
|
-
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
202
|
-
}
|
203
|
-
|
204
|
-
/**
|
205
|
-
* @param string $packageName
|
206
|
-
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
|
207
|
-
*/
|
208
|
-
public static function getReference($packageName)
|
209
|
-
{
|
210
|
-
foreach (self::getInstalled() as $installed) {
|
211
|
-
if (!isset($installed['versions'][$packageName])) {
|
212
|
-
continue;
|
213
|
-
}
|
214
|
-
|
215
|
-
if (!isset($installed['versions'][$packageName]['reference'])) {
|
216
|
-
return null;
|
217
|
-
}
|
218
|
-
|
219
|
-
return $installed['versions'][$packageName]['reference'];
|
220
|
-
}
|
221
|
-
|
222
|
-
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
223
|
-
}
|
224
|
-
|
225
|
-
/**
|
226
|
-
* @param string $packageName
|
227
|
-
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path.
|
228
|
-
*/
|
229
|
-
public static function getInstallPath($packageName)
|
230
|
-
{
|
231
|
-
foreach (self::getInstalled() as $installed) {
|
232
|
-
if (!isset($installed['versions'][$packageName])) {
|
233
|
-
continue;
|
234
|
-
}
|
235
|
-
|
236
|
-
return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
|
237
|
-
}
|
238
|
-
|
239
|
-
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
240
|
-
}
|
241
|
-
|
242
|
-
/**
|
243
|
-
* @return array
|
244
|
-
* @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}
|
245
|
-
*/
|
246
|
-
public static function getRootPackage()
|
247
|
-
{
|
248
|
-
$installed = self::getInstalled();
|
249
|
-
|
250
|
-
return $installed[0]['root'];
|
251
|
-
}
|
252
|
-
|
253
|
-
/**
|
254
|
-
* Returns the raw installed.php data for custom implementations
|
255
|
-
*
|
256
|
-
* @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
|
257
|
-
* @return array[]
|
258
|
-
* @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}
|
259
|
-
*/
|
260
|
-
public static function getRawData()
|
261
|
-
{
|
262
|
-
@trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
|
263
|
-
|
264
|
-
if (null === self::$installed) {
|
265
|
-
// only require the installed.php file if this file is loaded from its dumped location,
|
266
|
-
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
|
267
|
-
if (substr(__DIR__, -8, 1) !== 'C') {
|
268
|
-
self::$installed = include __DIR__ . '/installed.php';
|
269
|
-
} else {
|
270
|
-
self::$installed = array();
|
271
|
-
}
|
272
|
-
}
|
273
|
-
|
274
|
-
return self::$installed;
|
275
|
-
}
|
276
|
-
|
277
|
-
/**
|
278
|
-
* Returns the raw data of all installed.php which are currently loaded for custom implementations
|
279
|
-
*
|
280
|
-
* @return array[]
|
281
|
-
* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
|
282
|
-
*/
|
283
|
-
public static function getAllRawData()
|
284
|
-
{
|
285
|
-
return self::getInstalled();
|
286
|
-
}
|
287
|
-
|
288
|
-
/**
|
289
|
-
* Lets you reload the static array from another file
|
290
|
-
*
|
291
|
-
* This is only useful for complex integrations in which a project needs to use
|
292
|
-
* this class but then also needs to execute another project's autoloader in process,
|
293
|
-
* and wants to ensure both projects have access to their version of installed.php.
|
294
|
-
*
|
295
|
-
* A typical case would be PHPUnit, where it would need to make sure it reads all
|
296
|
-
* the data it needs from this class, then call reload() with
|
297
|
-
* `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
|
298
|
-
* the project in which it runs can then also use this class safely, without
|
299
|
-
* interference between PHPUnit's dependencies and the project's dependencies.
|
300
|
-
*
|
301
|
-
* @param array[] $data A vendor/composer/installed.php data set
|
302
|
-
* @return void
|
303
|
-
*
|
304
|
-
* @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data
|
305
|
-
*/
|
306
|
-
public static function reload($data)
|
307
|
-
{
|
308
|
-
self::$installed = $data;
|
309
|
-
self::$installedByVendor = array();
|
310
|
-
}
|
311
|
-
|
312
|
-
/**
|
313
|
-
* @return array[]
|
314
|
-
* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
|
315
|
-
*/
|
316
|
-
private static function getInstalled()
|
317
|
-
{
|
318
|
-
if (null === self::$canGetVendors) {
|
319
|
-
self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
|
320
|
-
}
|
321
|
-
|
322
|
-
$installed = array();
|
323
|
-
|
324
|
-
if (self::$canGetVendors) {
|
325
|
-
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
|
326
|
-
if (isset(self::$installedByVendor[$vendorDir])) {
|
327
|
-
$installed[] = self::$installedByVendor[$vendorDir];
|
328
|
-
} elseif (is_file($vendorDir.'/composer/installed.php')) {
|
329
|
-
$installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
|
330
|
-
if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
|
331
|
-
self::$installed = $installed[count($installed) - 1];
|
332
|
-
}
|
333
|
-
}
|
334
|
-
}
|
335
|
-
}
|
336
|
-
|
337
|
-
if (null === self::$installed) {
|
338
|
-
// only require the installed.php file if this file is loaded from its dumped location,
|
339
|
-
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
|
340
|
-
if (substr(__DIR__, -8, 1) !== 'C') {
|
341
|
-
self::$installed = require __DIR__ . '/installed.php';
|
342
|
-
} else {
|
343
|
-
self::$installed = array();
|
344
|
-
}
|
345
|
-
}
|
346
|
-
$installed[] = self::$installed;
|
347
|
-
|
348
|
-
return $installed;
|
349
|
-
}
|
350
|
-
}
|
data/vendor/composer/LICENSE
DELETED
@@ -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,11 +0,0 @@
|
|
1
|
-
<?php
|
2
|
-
|
3
|
-
// autoload_files.php @generated by Composer
|
4
|
-
|
5
|
-
$vendorDir = dirname(dirname(__FILE__));
|
6
|
-
$baseDir = dirname($vendorDir);
|
7
|
-
|
8
|
-
return array(
|
9
|
-
'6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php',
|
10
|
-
'320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
|
11
|
-
);
|
@@ -1,11 +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
|
-
'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'),
|
10
|
-
'Symfony\\Component\\Yaml\\' => array($vendorDir . '/symfony/yaml'),
|
11
|
-
);
|
@@ -1,80 +0,0 @@
|
|
1
|
-
<?php
|
2
|
-
|
3
|
-
// autoload_real.php @generated by Composer
|
4
|
-
|
5
|
-
class ComposerAutoloaderInit0deac9bd9dfee5fa1b983a774a13067a
|
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
|
-
require __DIR__ . '/platform_check.php';
|
26
|
-
|
27
|
-
spl_autoload_register(array('ComposerAutoloaderInit0deac9bd9dfee5fa1b983a774a13067a', 'loadClassLoader'), true, true);
|
28
|
-
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
29
|
-
spl_autoload_unregister(array('ComposerAutoloaderInit0deac9bd9dfee5fa1b983a774a13067a', 'loadClassLoader'));
|
30
|
-
|
31
|
-
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
32
|
-
if ($useStaticLoader) {
|
33
|
-
require __DIR__ . '/autoload_static.php';
|
34
|
-
|
35
|
-
call_user_func(\Composer\Autoload\ComposerStaticInit0deac9bd9dfee5fa1b983a774a13067a::getInitializer($loader));
|
36
|
-
} else {
|
37
|
-
$map = require __DIR__ . '/autoload_namespaces.php';
|
38
|
-
foreach ($map as $namespace => $path) {
|
39
|
-
$loader->set($namespace, $path);
|
40
|
-
}
|
41
|
-
|
42
|
-
$map = require __DIR__ . '/autoload_psr4.php';
|
43
|
-
foreach ($map as $namespace => $path) {
|
44
|
-
$loader->setPsr4($namespace, $path);
|
45
|
-
}
|
46
|
-
|
47
|
-
$classMap = require __DIR__ . '/autoload_classmap.php';
|
48
|
-
if ($classMap) {
|
49
|
-
$loader->addClassMap($classMap);
|
50
|
-
}
|
51
|
-
}
|
52
|
-
|
53
|
-
$loader->register(true);
|
54
|
-
|
55
|
-
if ($useStaticLoader) {
|
56
|
-
$includeFiles = Composer\Autoload\ComposerStaticInit0deac9bd9dfee5fa1b983a774a13067a::$files;
|
57
|
-
} else {
|
58
|
-
$includeFiles = require __DIR__ . '/autoload_files.php';
|
59
|
-
}
|
60
|
-
foreach ($includeFiles as $fileIdentifier => $file) {
|
61
|
-
composerRequire0deac9bd9dfee5fa1b983a774a13067a($fileIdentifier, $file);
|
62
|
-
}
|
63
|
-
|
64
|
-
return $loader;
|
65
|
-
}
|
66
|
-
}
|
67
|
-
|
68
|
-
/**
|
69
|
-
* @param string $fileIdentifier
|
70
|
-
* @param string $file
|
71
|
-
* @return void
|
72
|
-
*/
|
73
|
-
function composerRequire0deac9bd9dfee5fa1b983a774a13067a($fileIdentifier, $file)
|
74
|
-
{
|
75
|
-
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
76
|
-
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
77
|
-
|
78
|
-
require $file;
|
79
|
-
}
|
80
|
-
}
|
@@ -1,46 +0,0 @@
|
|
1
|
-
<?php
|
2
|
-
|
3
|
-
// autoload_static.php @generated by Composer
|
4
|
-
|
5
|
-
namespace Composer\Autoload;
|
6
|
-
|
7
|
-
class ComposerStaticInit0deac9bd9dfee5fa1b983a774a13067a
|
8
|
-
{
|
9
|
-
public static $files = array (
|
10
|
-
'6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php',
|
11
|
-
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
|
12
|
-
);
|
13
|
-
|
14
|
-
public static $prefixLengthsPsr4 = array (
|
15
|
-
'S' =>
|
16
|
-
array (
|
17
|
-
'Symfony\\Polyfill\\Ctype\\' => 23,
|
18
|
-
'Symfony\\Component\\Yaml\\' => 23,
|
19
|
-
),
|
20
|
-
);
|
21
|
-
|
22
|
-
public static $prefixDirsPsr4 = array (
|
23
|
-
'Symfony\\Polyfill\\Ctype\\' =>
|
24
|
-
array (
|
25
|
-
0 => __DIR__ . '/..' . '/symfony/polyfill-ctype',
|
26
|
-
),
|
27
|
-
'Symfony\\Component\\Yaml\\' =>
|
28
|
-
array (
|
29
|
-
0 => __DIR__ . '/..' . '/symfony/yaml',
|
30
|
-
),
|
31
|
-
);
|
32
|
-
|
33
|
-
public static $classMap = array (
|
34
|
-
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
|
35
|
-
);
|
36
|
-
|
37
|
-
public static function getInitializer(ClassLoader $loader)
|
38
|
-
{
|
39
|
-
return \Closure::bind(function () use ($loader) {
|
40
|
-
$loader->prefixLengthsPsr4 = ComposerStaticInit0deac9bd9dfee5fa1b983a774a13067a::$prefixLengthsPsr4;
|
41
|
-
$loader->prefixDirsPsr4 = ComposerStaticInit0deac9bd9dfee5fa1b983a774a13067a::$prefixDirsPsr4;
|
42
|
-
$loader->classMap = ComposerStaticInit0deac9bd9dfee5fa1b983a774a13067a::$classMap;
|
43
|
-
|
44
|
-
}, null, ClassLoader::class);
|
45
|
-
}
|
46
|
-
}
|