Skip to content

Commit d1a2b23

Browse files
authored
Merge pull request #1273 from cloudfoundry/fix-composer-security-advisory-failures
Remove cf-helper-php from test fixtures to fix Composer 2.9.8 failures
2 parents a825da5 + 27b077f commit d1a2b23

3 files changed

Lines changed: 6 additions & 28 deletions

File tree

fixtures/with_amqp/composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"require": {
3-
"ext-amqp": "*",
4-
"cloudfoundry-community/cf-helper-php": "1.6.*"
3+
"ext-amqp": "*"
54
}
65
}
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"require": {
33
"ext-redis": "*",
4-
"ext-igbinary": "*",
5-
"cloudfoundry-community/cf-helper-php": "1.6.*"
4+
"ext-igbinary": "*"
65
}
76
}

fixtures/with_phpredis/index.php

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,13 @@
55
<body>
66
<h1>This page initiates a Redis connection and displays Redis info via the phpredis client.</h1>
77
<?php
8-
require_once 'vendor/autoload.php';
9-
use CfCommunity\CfHelper\CfHelper;
10-
$cfHelper = CfHelper::getInstance();
11-
12-
# Try to fetch Redis VCAP_SERVICES values
13-
$serviceManager = $cfHelper->getServiceManager();
14-
$redisService = $serviceManager->getService('.*redis.*');
15-
16-
$defaultUrl = "localhost";
17-
$defaulPort = 6379;
18-
$defaulPassword = "password";
19-
20-
# Prevent PHP Errors if no service is bound
21-
if (is_null($redisService)){
22-
$redisUrl = $defaultUrl;
23-
$redisPort = $defaulPort;
24-
$redisPassword = $defaulPassword;
25-
}
26-
else {
27-
$redisUrl = $redisService->getValue('hostname');
28-
$redisPort = $redisService->getValue('port');
29-
$redisPassword = $redisService->getValue('password');
30-
}
8+
$redisUrl = "localhost";
9+
$redisPort = 6379;
10+
$redisPassword = "password";
3111

3212
print "<p>RedisUrl: $redisUrl</p>";
3313
print "<p>RedisPort: $redisPort</p>";
34-
print "<p>RedisUrl: redacted</p>";
14+
print "<p>RedisPassword: redacted</p>";
3515

3616
# Establish Redis connection and authenticate
3717
$redis = new Redis();

0 commit comments

Comments
 (0)