Installed php-ews
using composer:
{
"minimum-stability": "dev",
"prefer-stable": true,
"require":
{
"php-ews/php-ews": "dev-master"
}
}
The installation passed fine.
Made this simple request in my project code:
require_once 'composer/vendor/autoload.php';
use \php-ews\php-ews\src\Client;
$host = 'my.server.co.il';
$username = 'user@server.co.il';
$password = 'myPass';
$version = Client::VERSION_2010;
$client = new Client($host, $username, $password, $version);
But the PHP doesn't accept hyphens (-) in its use
command path,
I got the error:
PHP Parse error: syntax error, unexpected '-', expecting ',' or ';' in /var/www/html
Then I noticed, the paths of the use
phrases in all the code files of the php-ews
project, do not match the project files that where installed using the composer at all. For example, in the create.php file there are use
phrases:
use \jamesiarmes\PhpEws\Client;
use \jamesiarmes\PhpEws\Request\CreateItemType;
use \jamesiarmes\PhpEws\ArrayType\NonEmptyArrayOfAllItemsType;
use \jamesiarmes\PhpEws\ArrayType\NonEmptyArrayOfAttendeesType;
use \jamesiarmes\PhpEws\Enumeration\BodyTypeType;
use \jamesiarmes\PhpEws\Enumeration\CalendarItemCreateOrDeleteOperationType;
use \jamesiarmes\PhpEws\Enumeration\ResponseClassType;
use \jamesiarmes\PhpEws\Enumeration\RoutingType;
The above paths do not even exist in the project at all....
The project files and folders that the composer installed, they do not match the code use
and require
phrases inside of them.
Did I make the wrong installation? is there other way to use the composer.json file so I can install the project right, without hyphens (php-ews) in the directories?
php-ews
Version installed:
"packages": [{
"name": "jamesiarmes/php-ntlm",
"version": "1.0.0-beta.1",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
}
}]
Linux Centos 7
PHP version: 5.4.16
Microsoft Exchange version: 2010