Kengo Seki created THRIFT-4970:
----------------------------------

             Summary: PHP tutorial doesn't work with Thrift v0.12.0+
                 Key: THRIFT-4970
                 URL: https://issues.apache.org/jira/browse/THRIFT-4970
             Project: Thrift
          Issue Type: Bug
          Components: Tutorial
            Reporter: Kengo Seki


THRIFT-4474 made PSR-4 the default loader, but the tutorial doesn't seem to be 
updated. It works with neither {{-gen php}} nor {{-gen php:classmap}}, as 
follows:

{code}
thrift$ cd tutorial
thrift/tutorial$ ../compiler/cpp/thrift -r -gen php:server tutorial.thrift
thrift/tutorial$ php/PhpServer.php
PHP Fatal error:  Interface 'tutorial\CalculatorIf' not found in 
/home/sekikn/repos/thrift/tutorial/php/PhpServer.php on line 55
Fatal error: Interface 'tutorial\CalculatorIf' not found in 
/home/sekikn/repos/thrift/tutorial/php/PhpServer.php on line 55
thrift/tutorial$ php/PhpClient.php
PHP Fatal error:  Uncaught Error: Class 'Thrift\Transport\TSocket' not found in 
/home/sekikn/repos/thrift/tutorial/php/PhpClient.php:49
Stack trace:
#0 {main}
  thrown in /home/sekikn/repos/thrift/tutorial/php/PhpClient.php on line 49

thrift/tutorial$ rm -rf gen-php
thrift/tutorial$ ../compiler/cpp/thrift -r -gen php:classmap,server 
tutorial.thrift
thrift/tutorial$ php/PhpServer.php

PHP Fatal error:  Uncaught Error: Class 'Thrift\Transport\TBufferedTransport' 
not found in /home/sekikn/repos/thrift/tutorial/php/PhpServer.php:125
Stack trace:
#0 {main}
  thrown in /home/sekikn/repos/thrift/tutorial/php/PhpServer.php on line 125
Fatal error: Uncaught Error: Class 'Thrift\Transport\TBufferedTransport' not 
found in /home/sekikn/repos/thrift/tutorial/php/PhpServer.php:125
Stack trace:
#0 {main}
  thrown in /home/sekikn/repos/thrift/tutorial/php/PhpServer.php on line 125
thrift/tutorial$ php/PhpClient.php
PHP Fatal error:  Uncaught Error: Class 'Thrift\Transport\TSocket' not found in 
/home/sekikn/repos/thrift/tutorial/php/PhpClient.php:49
Stack trace:
#0 {main}
  thrown in /home/sekikn/repos/thrift/tutorial/php/PhpClient.php on line 49
{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to