Skip to content

Commit 942b532

Browse files
authored
Upgrade phpunit to ^7 (GoogleCloudPlatform#1000)
1 parent 7d828cc commit 942b532

File tree

23 files changed

+44
-40
lines changed

23 files changed

+44
-40
lines changed

appengine/flexible/analytics/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"require": {
3-
"silex/silex": "^1.3",
3+
"silex/silex": "^2.3",
44
"twig/twig": "^1.24",
55
"guzzlehttp/guzzle": "^6.3",
66
"symfony/css-selector": "^3.1"

appengine/flexible/cloudsql-mysql/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"require": {
3-
"silex/silex": "^1.3",
3+
"silex/silex": "^2.3",
44
"google/apiclient": "^2.0"
55
},
66
"require-dev": {

appengine/flexible/cloudsql-postgres/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"require": {
3-
"silex/silex": "^1.3",
3+
"silex/silex": "^2.3",
44
"google/apiclient": "^2.0"
55
},
66
"require-dev": {

appengine/flexible/datastore/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"require": {
3-
"silex/silex": "^1.3",
3+
"silex/silex": "^2.3",
44
"google/cloud-datastore": "^1.0"
55
},
66
"require-dev": {
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"require": {
33
"php": "5.6.*|7.0.*|7.1.*|7.2.*",
4-
"silex/silex": "^1.3"
4+
"silex/silex": "^2.3"
55
},
66
"require-dev": {
7-
"symfony/browser-kit": "^3.0",
8-
"symfony/http-kernel": "^3.0"
7+
"symfony/browser-kit": "^4.4",
8+
"symfony/http-kernel": "^4.4"
99
}
1010
}

appengine/flexible/mailgun/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"require": {
3-
"silex/silex": "^1.3",
3+
"silex/silex": "^2.3",
44
"mailgun/mailgun-php": "~2.0",
55
"php-http/guzzle6-adapter": "^1.0",
66
"symfony/yaml": "^3.1"

appengine/flexible/mailjet/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"require": {
3-
"silex/silex": "^1.3",
3+
"silex/silex": "^2.3",
44
"mailjet/mailjet-apiv3-php": "^1.1",
55
"guzzlehttp/guzzle": "~6.1.0"
66
},

appengine/flexible/memcache/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"require": {
3-
"silex/silex": "^1.3",
3+
"silex/silex": "^2.3",
44
"twig/twig": "^1.24"
55
},
66
"require-dev": {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"require": {
3-
"silex/silex": "^1.3",
3+
"silex/silex": "^2.3",
44
"google/cloud-core": "^1.5"
55
}
66
}

appengine/flexible/sendgrid/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"require": {
3-
"silex/silex": "^1.3",
3+
"silex/silex": "^2.3",
44
"sendgrid/sendgrid": "^5.0"
55
},
66
"require-dev": {

appengine/flexible/staticcontent/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"require": {
3-
"silex/silex": "^1.3",
3+
"silex/silex": "^2.3",
44
"twig/twig": "^1.24"
55
},
66
"require-dev": {

appengine/flexible/storage/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"require": {
3-
"silex/silex": "^1.3",
3+
"silex/silex": "^2.3",
44
"google/cloud-storage": "^1.0"
55
},
66
"require-dev": {

appengine/flexible/tasks/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"require": {
33
"symfony/console": "^3.0",
4-
"silex/silex": "^1.3",
4+
"silex/silex": "^2.3",
55
"google/apiclient": "^2.1",
66
"google/cloud-logging": "^1.5"
77
},

appengine/flexible/twilio/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"require": {
3-
"silex/silex": "^1.3",
3+
"silex/silex": "^2.3",
44
"twilio/sdk": "^4.10"
55
},
66
"require-dev": {

appengine/flexible/websockets/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"require": {
33
"cboden/ratchet": "^0.4.1",
44
"guzzlehttp/psr7": "^1.5",
5-
"silex/silex": "^1.3"
5+
"silex/silex": "^2.3"
66
},
77
"require-dev": {
88
"phpunit/phpunit": "^5",

appengine/php72/getting-started/test/CloudSqlTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class CloudSqlTest extends TestCase
2525
{
2626
use TestTrait;
2727

28-
public function setUp()
28+
public function setUp() : void
2929
{
3030
$connection = $this->requireEnv('CLOUDSQL_CONNECTION_NAME');
3131
$dbUser = $this->requireEnv('CLOUDSQL_USER');

bigquerydatatransfer/composer.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
{
22
"require": {
3-
"php": ">=5.4",
43
"google/cloud-bigquerydatatransfer": "^0.14.0"
5-
},
6-
"require-dev": {
7-
"phpunit/phpunit": "^5"
84
}
95
}

endpoints/getting-started/app.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@
4040
return $welcome;
4141
});
4242

43-
$app->post('/echo', function () use ($app) {
43+
$app->post('/echo', function (Request $request) use ($app) {
4444
// Simple echo service.
45-
$message = $app['request']->get('message');
45+
$message = $request->get('message');
4646
return $app->json(['message' => $message]);
4747
});
4848

@@ -57,9 +57,7 @@
5757
return $app->json($app['auth_info']);
5858
});
5959

60-
$app['auth_info'] = function () use ($app) {
61-
/** @var Symfony\Component\HttpFoundation\Request $request */
62-
$request = $app['request'];
60+
$app['auth_info'] = function (Request $request) use ($app) {
6361
// Retrieves the authenication information from Google Cloud Endpoints.
6462
$encoded_info = $request->headers->get('X-Endpoint-API-UserInfo');
6563

endpoints/getting-started/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"require": {
3-
"silex/silex": " ^1.3",
3+
"silex/silex": " ^2.3",
44
"symfony/console": " ^3.0",
55
"google/auth": "^1.5.1"
66
},

pubsub/app/app.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
use Silex\Application;
2121
use Silex\Provider\TwigServiceProvider;
22+
use Symfony\Component\HttpFoundation\Request;
2223
use Symfony\Component\HttpFoundation\JsonResponse;
2324
use Symfony\Component\HttpFoundation\Response;
2425
use Google\Cloud\PubSub\PubSubClient;
@@ -69,13 +70,12 @@
6970
return new JsonResponse($messages);
7071
});
7172

72-
$app->post('/receive_message', function () use ($app) {
73+
$app->post('/receive_message', function (Request $request) use ($app) {
7374
// pull the message from the post body
74-
$json = $app['request']->getContent();
75-
$request = json_decode($json, true);
75+
$json = json_decode($request->getContent(), true);
7676
if (
77-
!isset($request['message']['data'])
78-
|| !$message = base64_decode($request['message']['data'])
77+
!isset($json['message']['data'])
78+
|| !$message = base64_decode($json['message']['data'])
7979
) {
8080
return new Response('', 400);
8181
}
@@ -88,11 +88,11 @@
8888
return new Response();
8989
});
9090

91-
$app->post('/send_message', function () use ($app) {
91+
$app->post('/send_message', function (Request $request) use ($app) {
9292
$projectId = $app['project_id'];
9393
$topicName = $app['topic'];
9494
# [START gae_flex_pubsub_push]
95-
if ($message = $app['request']->get('message')) {
95+
if ($message = $request->get('message')) {
9696
// Publish the pubsub message to the topic
9797
$pubsub = new PubSubClient([
9898
'projectId' => $projectId,

pubsub/app/composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
"php": ">=5.4",
44
"google/cloud-pubsub": "^1.5",
55
"google/cloud-datastore": "^1.2",
6-
"silex/silex": "~1.3",
7-
"symfony/twig-bridge": "~2.7|3.0.*",
8-
"twig/twig": "~1.8|~2.0"
6+
"silex/silex": "^2.3",
7+
"twig/twig": "^2.12",
8+
"symfony/twig-bridge": "^4.4"
99
},
1010
"require-dev": {
1111
"paragonie/random_compat": "^2.0",

testing/composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"require": {
2+
"require-dev": {
33
"google/cloud-tools": "dev-master",
4-
"phpunit/phpunit": "^5"
4+
"phpunit/phpunit": "^7"
55
}
66
}

testing/run_test_suite.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ FLAKES=(
2828
dlp
2929
)
3030

31+
# Directories we do not want to run tests in, even if they exist
32+
SKIP_TESTS=()
33+
SKIP_TESTS+=$(find appengine/php55 -name 'phpunit.xml*' -not -path '*vendor/*' -exec dirname {} \;)
34+
# Try not skipping flex tests for now
35+
#SKIP_TESTS+=$(find appengine/flexible -name 'phpunit.xml*' -not -path '*vendor/*' -exec dirname {} \;)
36+
3137
# tests to run with grpc.so disabled
3238
REST_TESTS=(
3339
asset
@@ -134,6 +140,10 @@ do
134140
continue
135141
fi
136142
fi
143+
if [[ "${SKIP_TESTS[@]}" =~ "${DIR}" ]]; then
144+
echo "Skipping tests in $DIR (explicitly flagged to be skipped)"
145+
continue
146+
fi
137147
if [ "${RUN_REST_TESTS_ONLY}" = "true" ] && [[ ! "${REST_TESTS[@]}" =~ "${DIR}" ]]; then
138148
echo "Skipping tests in $DIR (no REST tests)"
139149
continue

0 commit comments

Comments
 (0)