diff --git a/.travis.yml b/.travis.yml index 50a6276..4757706 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,7 @@ php: - '5.6' - '5.5' - '5.4' +before_install: echo "extension=ldap.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini install: composer install script: './vendor/bin/phpcs --standard=PSR2 --ignore=vendor/*,docs/* -p .' after_success: diff --git a/README.md b/README.md index 6a3edd8..f85c41e 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,14 @@ This small library provides access to ldap functions in a nice, object-oriented `composer require dreamscapes/ldap-core:dev-master` (visit [Packagist](https://packagist.org/packages/Dreamscapes/ldap-core) for list of all available versions) +#### Installing on Travis-CI + +Since Composer will not allow you to install a library on a system which does not meet the system requirements listed in *composer.json*, it is necessary that you enable the ldap extension **before** invoking `composer install`, i.e. in the *before_install* build lifecycle: + +`echo "extension=ldap.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini` + +See the [Travis docs](http://docs.travis-ci.com/user/languages/php/#Custom-PHP-configuration) for detailed information. + ## Usage There are two classes - `Dreamscapes\Ldap\Core\Ldap` and `Dreamscapes\Ldap\Core\ResultResource`, each of which implement part of the native ldap functions as instance methods (some functions which do not operate on the resource objects are static). The differentiating principle is simple - if the function deals with the state of the ldap connection, it is implemented in the first, whereas functions dealing with the data returned from ldap server (the result resource) are implemented in the latter class. diff --git a/composer.json b/composer.json index 0ddba86..72cf01f 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,8 @@ "psr-0": { "Dreamscapes\\": "." } }, "require": { - "php": ">=5.4.0" + "php": ">=5.4.0", + "ext-ldap": "*" }, "require-dev": { "squizlabs/php_codesniffer": "~2", diff --git a/composer.lock b/composer.lock index 797ebf8..9f9a2ad 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "c7a409c97e7d32a02567e4d01a88631e", + "hash": "347263e4214894fc4a75a199f93ada7d", "packages": [], "packages-dev": [ { @@ -2956,7 +2956,8 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=5.4.0" + "php": ">=5.4.0", + "ext-ldap": "*" }, "platform-dev": [] }