summaryrefslogtreecommitdiff
path: root/tutorial
diff options
context:
space:
mode:
authorKengo Seki <sekikn@apache.org>2019-10-09 06:53:14 +0900
committerDuru Can Celasun <dcelasun@apache.org>2019-10-08 22:53:14 +0100
commit3b5c40c6ea469ade1d537d558c43dfcd82d5d17f (patch)
tree676b1efb6dbc35fa7b571911399dd8e88dff74ca /tutorial
parentec8c7c419b1c0318e5b34a1c6e9e939b9a8681fd (diff)
downloadthrift-3b5c40c6ea469ade1d537d558c43dfcd82d5d17f.tar.gz
THRIFT-4970: PHP tutorial doesn't work with Thrift v0.12.0+
Client: php This closes #1890.
Diffstat (limited to 'tutorial')
-rwxr-xr-xtutorial/php/PhpClient.php6
-rwxr-xr-xtutorial/php/PhpServer.php6
2 files changed, 6 insertions, 6 deletions
diff --git a/tutorial/php/PhpClient.php b/tutorial/php/PhpClient.php
index 92dc3cbac..eb2c2e5ee 100755
--- a/tutorial/php/PhpClient.php
+++ b/tutorial/php/PhpClient.php
@@ -5,7 +5,7 @@ namespace tutorial\php;
error_reporting(E_ALL);
-require_once __DIR__.'/../../lib/php/lib/ClassLoader/ThriftClassLoader.php';
+require_once __DIR__.'/../../vendor/autoload.php';
use Thrift\ClassLoader\ThriftClassLoader;
@@ -13,8 +13,8 @@ $GEN_DIR = realpath(dirname(__FILE__).'/..').'/gen-php';
$loader = new ThriftClassLoader();
$loader->registerNamespace('Thrift', __DIR__ . '/../../lib/php/lib');
-$loader->registerDefinition('shared', $GEN_DIR);
-$loader->registerDefinition('tutorial', $GEN_DIR);
+$loader->registerNamespace('shared', $GEN_DIR);
+$loader->registerNamespace('tutorial', $GEN_DIR);
$loader->register();
/*
diff --git a/tutorial/php/PhpServer.php b/tutorial/php/PhpServer.php
index 5a9b49bde..749da3a0b 100755
--- a/tutorial/php/PhpServer.php
+++ b/tutorial/php/PhpServer.php
@@ -5,7 +5,7 @@ namespace tutorial\php;
error_reporting(E_ALL);
-require_once __DIR__.'/../../lib/php/lib/ClassLoader/ThriftClassLoader.php';
+require_once __DIR__.'/../../vendor/autoload.php';
use Thrift\ClassLoader\ThriftClassLoader;
@@ -13,8 +13,8 @@ $GEN_DIR = realpath(dirname(__FILE__).'/..').'/gen-php';
$loader = new ThriftClassLoader();
$loader->registerNamespace('Thrift', __DIR__ . '/../../lib/php/lib');
-$loader->registerDefinition('shared', $GEN_DIR);
-$loader->registerDefinition('tutorial', $GEN_DIR);
+$loader->registerNamespace('shared', $GEN_DIR);
+$loader->registerNamespace('tutorial', $GEN_DIR);
$loader->register();
/*