mirror of
https://github.com/composer/composer
synced 2025-05-09 00:22:53 +00:00
Remove some dead code and deprecate JsonFormatter, JsonFile::JSON_* constants, and TlsHelper
This commit is contained in:
parent
36da81bec2
commit
7e50f37b87
13 changed files with 38 additions and 206 deletions
|
@ -29,6 +29,7 @@ class TlsHelperTest extends TestCase
|
|||
$certificate['subject']['commonName'] = $expectedCn = array_shift($certNames);
|
||||
$certificate['extensions']['subjectAltName'] = $certNames ? 'DNS:'.implode(',DNS:', $certNames) : '';
|
||||
|
||||
// @phpstan-ignore-next-line
|
||||
$result = TlsHelper::checkCertificateHost($certificate, $hostname, $foundCn);
|
||||
|
||||
if (true === $expectedResult) {
|
||||
|
@ -71,6 +72,7 @@ class TlsHelperTest extends TestCase
|
|||
$certificate['subject']['commonName'] = 'example.net';
|
||||
$certificate['extensions']['subjectAltName'] = 'DNS: example.com, IP: 127.0.0.1, DNS: getcomposer.org, Junk: blah, DNS: composer.example.org';
|
||||
|
||||
// @phpstan-ignore-next-line
|
||||
$names = TlsHelper::getCertificateNames($certificate);
|
||||
|
||||
$this->assertSame('example.net', $names['cn']);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue