THRIFT-4474: Use PSR-4 autoloader by default
Client: php
This closes #1479
diff --git a/lib/php/test/JsonSerialize/JsonSerializeTest.php b/lib/php/test/JsonSerialize/JsonSerializeTest.php
index 8c64595..c668652 100644
--- a/lib/php/test/JsonSerialize/JsonSerializeTest.php
+++ b/lib/php/test/JsonSerialize/JsonSerializeTest.php
@@ -22,9 +22,8 @@
use PHPUnit\Framework\TestCase;
use stdClass;
-use Thrift\ClassLoader\ThriftClassLoader;
-require_once __DIR__ . '/../../../../vendor/autoload.php';
+require __DIR__ . '/../../../../vendor/autoload.php';
/**
* @runTestsInSeparateProcesses
@@ -36,9 +35,9 @@
if (version_compare(phpversion(), '5.4', '<')) {
$this->markTestSkipped('Requires PHP 5.4 or newer!');
}
- $loader = new ThriftClassLoader();
- $loader->registerDefinition('ThriftTest', __DIR__ . '/../packages/phpjs');
- $loader->register();
+ /** @var \Composer\Autoload\ClassLoader $loader */
+ $loader = require __DIR__ . '/../../../../vendor/autoload.php';
+ $loader->addPsr4('', __DIR__ . '/../packages/phpjs');
}
public function testEmptyStruct()