Skip to content

Commit

Permalink
addresses review comments'
Browse files Browse the repository at this point in the history
  • Loading branch information
bshaffer committed Sep 25, 2019
1 parent 361e540 commit e8dadd9
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 23 deletions.
5 changes: 0 additions & 5 deletions bookshelf/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@
<directory>test</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">./src</directory>
</whitelist>
</filter>
<php>
<env name="PHPUNIT_TESTS" value="1"/>
<env name="APP_ENV" value="test"/>
Expand Down
1 change: 1 addition & 0 deletions sessions/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/vendor
/.idea
35 changes: 17 additions & 18 deletions sessions/index.php
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
<?php

# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
/*
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

# [START getting_started_sessions_all]
require_once __DIR__ . '/vendor/autoload.php';

use Google\Cloud\Firestore\FirestoreClient;
use Google\Cloud\Firestore\FirestoreSessionHandler;

$projectId = getenv('GOOGLE_CLOUD_PROJECT');
# [START getting_started_sessions_register_handler]
Expand All @@ -27,9 +27,8 @@
'projectId' => $projectId,
]);

// Configure PHP to use the the Firebase session handler.
$handler = new FirestoreSessionHandler($firestore);
session_set_save_handler($handler, true);
// Configure PHP to use the the Firebase session handler.;
session_set_save_handler($firestore->sessionHandler(), true);
session_save_path('sessions');
session_start();
# [END getting_started_sessions_register_handler]
Expand Down
1 change: 1 addition & 0 deletions sessions/php.ini
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
; enable the gRPC extension
extension=grpc.so
extension=protobuf.so

0 comments on commit e8dadd9

Please sign in to comment.