Hey guys,
We are currently integrating our project with travis-ci but stumped upon the problem that the autoloader does not want to work for some reason. We have the current travis file:
language: php
php:
- 5.3
- 5.4
services:
- memcached
before_install:
- phpenv config-add tests/memcache.ini
before_script:
- git clone -q https://github.com/phalcon/cphalcon.git
- (cd cphalcon/build/32bits; export CFLAGS="-g3 -O1 -fno-delete-null-pointer-checks"; phpize && ./configure --enable-phalcon && make -j2 && sudo make install && phpenv config-add ../../../tests/phalcon.ini)
- wget https://getcomposer.org/composer.phar
- php composer.phar install
script: (cd tests; phpunit --debug)
This is our autoloader:
$loader = new \Phalcon\Loader();
/**
* We're a registering a set of directories taken from the configuration file
*/
$loader->registerDirs(
array(
$config->application->controllersDir,
$config->application->modelsDir
)
);
/**
* Register primary namespaces
*/
$loader->registerNamespaces(
array(
'PH' => $config->application->libraryDir . 'PH',
'Phalcon' => $config->application->libraryDir . 'Phalcon'
)
);
$loader->register();
// autoload the dependencies found in composer
include __DIR__ . "/../../vendor/autoload.php";
For some reason, it does not register any namespace, nor can i load classes (in travis CI). Locally and on our ubuntu server everything seems to work fine.
The directories are readable on Travis (i checked).
Is there something we are doing wrong?