PHP-EWS文件夹完全不匹配PHP-EWS代码



使用作曲家安装了php-ews

{
  "minimum-stability": "dev",
  "prefer-stable": true,
  "require":
  {
    "php-ews/php-ews": "dev-master"
  }
}

安装通过了。

在我的项目代码中提出了这个简单的请求:

require_once 'composer/vendor/autoload.php';
use php-ewsphp-ewssrcClient;
$host = 'my.server.co.il';
$username = 'user@server.co.il';
$password = 'myPass';
$version = Client::VERSION_2010;
$client = new Client($host, $username, $password, $version);

,但PHP在其use命令路径中不接受连字符( - ),我有错误:

php解析错误:语法错误,意外' - ',期望',''或;''在/var/www/html

然后我注意到,php-ews项目的所有代码文件中use短语的路径,完全不匹配使用作曲家安装的项目文件。例如,在 create.php 文件中有 use短语:

use jamesiarmesPhpEwsClient;
use jamesiarmesPhpEwsRequestCreateItemType;
use jamesiarmesPhpEwsArrayTypeNonEmptyArrayOfAllItemsType;
use jamesiarmesPhpEwsArrayTypeNonEmptyArrayOfAttendeesType;
use jamesiarmesPhpEwsEnumerationBodyTypeType;
use jamesiarmesPhpEwsEnumerationCalendarItemCreateOrDeleteOperationType;
use jamesiarmesPhpEwsEnumerationResponseClassType;
use jamesiarmesPhpEwsEnumerationRoutingType;

上述路径根本根本不存在。作曲家安装的项目文件和文件夹,它们内部与代码userequire短语不匹配。

我是否做错了安装?是否有其他方法可以使用 composer.json 文件,以便我可以正确安装项目,而没有连字符(php-ews)?

php-ews版本已安装:

"packages": [{
  "name": "jamesiarmes/php-ntlm",
  "version": "1.0.0-beta.1",
  "extra": {
    "branch-alias": {
      "dev-master": "1.0.x-dev"
    }
  }
}]

Linux Centos 7
PHP版本:5.4.16
Microsoft Exchange版本:2010

安装似乎正确。 require != use使用是一个命名空间,这是在自动加载的client.php中定义的。Client.php第6行: namespace jamesiarmesPhpEws;

最新更新