diff --git a/src/php/lib/Grpc/AbstractCall.php b/src/php/lib/Grpc/AbstractCall.php index b813d16470d3a650c9b1d999b891de857da74266..d7c32630403b1291f5e3bfcf7fb5505d46fddac2 100644 --- a/src/php/lib/Grpc/AbstractCall.php +++ b/src/php/lib/Grpc/AbstractCall.php @@ -33,7 +33,7 @@ */ namespace Grpc; -require_once realpath(dirname(__FILE__) . '/../autoload.php'); +require_once realpath(dirname(__FILE__) . '/../../vendor/autoload.php'); abstract class AbstractCall { diff --git a/src/php/lib/Grpc/BaseStub.php b/src/php/lib/Grpc/BaseStub.php index 9bc1711110686cdb45a5b5dcecfafd4a4fbd538b..83e992ae709414ababb9275346b41049238dc86e 100755 --- a/src/php/lib/Grpc/BaseStub.php +++ b/src/php/lib/Grpc/BaseStub.php @@ -32,7 +32,7 @@ * */ namespace Grpc; -require_once realpath(dirname(__FILE__) . '/../autoload.php'); +require_once realpath(dirname(__FILE__) . '/../../vendor/autoload.php'); /** * Base class for generated client stubs. Stub methods are expected to call diff --git a/src/php/lib/Grpc/BidiStreamingCall.php b/src/php/lib/Grpc/BidiStreamingCall.php index 0d3dd629f254825aeeca403f1019decdce407b7f..d45fd21510e558e9543400fcede9b683fdc087c0 100644 --- a/src/php/lib/Grpc/BidiStreamingCall.php +++ b/src/php/lib/Grpc/BidiStreamingCall.php @@ -32,7 +32,7 @@ * */ namespace Grpc; -require_once realpath(dirname(__FILE__) . '/../autoload.php'); +require_once realpath(dirname(__FILE__) . '/../../vendor/autoload.php'); /** * Represents an active call that allows for sending and recieving messages in diff --git a/src/php/lib/Grpc/ClientStreamingCall.php b/src/php/lib/Grpc/ClientStreamingCall.php index 4b3abcbdec5a9ffe8c5b492c77f843cd94a16d31..17c85b4c2babfa88863286345d64a7491569bf9c 100644 --- a/src/php/lib/Grpc/ClientStreamingCall.php +++ b/src/php/lib/Grpc/ClientStreamingCall.php @@ -32,7 +32,7 @@ * */ namespace Grpc; -require_once realpath(dirname(__FILE__) . '/../autoload.php'); +require_once realpath(dirname(__FILE__) . '/../../vendor/autoload.php'); /** * Represents an active call that sends a stream of messages and then gets a diff --git a/src/php/lib/Grpc/ServerStreamingCall.php b/src/php/lib/Grpc/ServerStreamingCall.php index 7458f28bcbfae4563561fe7e6359976e71cfc7a7..ac5e02eb5320c8b4d5b18814ddb7af0a81da257d 100644 --- a/src/php/lib/Grpc/ServerStreamingCall.php +++ b/src/php/lib/Grpc/ServerStreamingCall.php @@ -33,7 +33,7 @@ */ namespace Grpc; -require_once realpath(dirname(__FILE__) . '/../autoload.php'); +require_once realpath(dirname(__FILE__) . '/../../vendor/autoload.php'); /** * Represents an active call that sends a single message and then gets a stream diff --git a/src/php/lib/Grpc/UnaryCall.php b/src/php/lib/Grpc/UnaryCall.php index bbf9cfb5883f2be0281fa50b3fc2be6b33cfa5f3..14c024085c2117ef4e1d7e0857717ad39500d4a0 100644 --- a/src/php/lib/Grpc/UnaryCall.php +++ b/src/php/lib/Grpc/UnaryCall.php @@ -33,7 +33,7 @@ */ namespace Grpc; -require_once realpath(dirname(__FILE__) . '/../autoload.php'); +require_once realpath(dirname(__FILE__) . '/../../vendor/autoload.php'); /** * Represents an active call that sends a single message and then gets a single diff --git a/src/php/lib/autoload.php b/src/php/lib/autoload.php deleted file mode 100755 index 42eb33d65b72a18764ec0ff85458957bc9bd6874..0000000000000000000000000000000000000000 --- a/src/php/lib/autoload.php +++ /dev/null @@ -1,53 +0,0 @@ -<?php -/* - * - * Copyright 2015, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ -function grpcAutoloader($class) { - $prefix = 'Grpc\\'; - - $base_dir = __DIR__ . '/Grpc/'; - - $len = strlen($prefix); - if (strncmp($prefix, $class, $len) !== 0) { - return; - } - - $relative_class = substr($class, $len); - - $file = $base_dir . str_replace('\\', '/', $relative_class) . '.php'; - - if (file_exists($file)) { - include $file; - } -} - -spl_autoload_register('grpcAutoloader'); diff --git a/src/php/tests/generated_code/GeneratedCodeTest.php b/src/php/tests/generated_code/GeneratedCodeTest.php index cb2c0e6d10624dd62f6947aec5a395850f224224..afd7f21de42be4c7ca70510e2ba3bfb3473302eb 100755 --- a/src/php/tests/generated_code/GeneratedCodeTest.php +++ b/src/php/tests/generated_code/GeneratedCodeTest.php @@ -31,7 +31,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -require_once realpath(dirname(__FILE__) . '/../../lib/autoload.php'); +require_once realpath(dirname(__FILE__) . '/../../vendor/autoload.php'); require 'DrSlump/Protobuf.php'; \DrSlump\Protobuf::autoload(); require 'math.php'; diff --git a/src/php/tests/interop/interop_client.php b/src/php/tests/interop/interop_client.php index 7ee089e241541345491f9ca1577806a63e96eb30..873fa00b827619d9e54aa5ce502f1b84153963f2 100755 --- a/src/php/tests/interop/interop_client.php +++ b/src/php/tests/interop/interop_client.php @@ -31,7 +31,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -require_once realpath(dirname(__FILE__) . '/../../lib/autoload.php'); +require_once realpath(dirname(__FILE__) . '/../../vendor/autoload.php'); require 'DrSlump/Protobuf.php'; \DrSlump\Protobuf::autoload(); require 'empty.php';