README
This repository provides the basic application structure of the Claroline platform. It doesn't contain the sources nor the third-party libraries required to make the application fully functional. Those sources have to be installed following the procedure described below.
If you want to contribute or directly browse the sources of the project, here is a (non-exhaustive) list of their dedicated repositories:
- CoreBundle
- KernelBundle
- InstallationBundle
- MigrationBundle
- ForumBundle
- AnnouncementBundle
- RssReaderBundle
- ...
Project setup
Minimum requirements
-
PHP >= 5.4.1
-
PHP extensions:
- fileinfo (for mime type detection)
- curl
- mcrypt
- gd
- intl
-
MySQL >=5.0 (MariaDB should work aswell)
-
A web server like Apache or Nginx
-
A global installation of composer (for dependency management)
Configuration of php.ini
- The memory_limit must be >= 256Mb (also in cli).
- Be sure that you have a correct configuration of time zone (supported timezones).
Recommended requirements
-
A *nix OS (the dev is done on debian)
-
PHP >= 5.5
-
PHP extensions:
-
MySQL >=5.0 (MariaDB should work aswell)
-
A web server like Apache or Nginx
-
A global installation of composer (for dependency management)
-
A cache system like Varnish
Configuration of php.ini
- The memory_limit must be >= 512mb (for the webserver).
- The memory_limit must be >= 4096mb (for the cli: composer updates consume a lot of ram)
- Be sure that you have a correct configuration of time zone (supported timezones).
Development installation
Quick install
Full (and complicated) install
- git clone https://github.com/claroline/Claroline.git
- Create an app/config/parameters.yml file based on app/config/parameters.yml.dist and fill at least the main db parameters (database doesn't have to exist, but if it exists, it must be empty)
- Make the following directories (and their children) writable from the command
line and the web server (for further explanation on common permissions issues
and solutions with Symfony2, read this):
- app/sessions
- app/cache
- app/logs
- app/config
- files
- web/uploads
- Run the following commands:
$ composer require composer/composer dev-master
$ composer require claroline/bundle-recorder "~5.0"
$ cp composer.json.min composer.json
$ composer update --prefer-source
(1)$ php app/console claroline:install
(1) At this point, you can ignore the following error: Class Claroline\CoreBundle\Library\Maintenance\MaintenanceHandler is not autoloadable, can not call pre-update-cmd script
You can then create a first admin user with:
$ php app/console claroline:user:create -a
If the css doesn't work do :
- $ php app/console assetic:dump
The application is accessible in your browser via:
- [site]/web/app_dev.php (development environment)
- [site]/web/app.php (production environment)
Update
To update your installation to the last stable state, use:
$ composer update --prefer-source
$ php app/console claroline:update
Plugin installation
You can install or uninstall a plugin by adding or removing the package in the require section of your composer.json and running:
$ composer update vendor/plugin-name --prefer-source
If the plugin package is already present in your project and if you simply want to install or uninstall it locally, you can use one the following commands:
$ php app/console claroline:plugin:install FooBarBundle
$ php app/console claroline:plugin:uninstall FooBarBundle
Development tools
Testing
In order to run the test suite you must have phpunit installed on your system.
Run the complete test suite with:
$ phpunit -c app
Run the tests for a single directory with:
$ phpunit -c app src/core/Claroline/CoreBundle
Build and Static analysis
The app/build/tools directory gathers configuration files for various analysis and build tools (PHPMD, PHPCS, JSHint, Ant, etc.).
You can install and use them locally (see their respective documentation for usage) or visit our continuous integration server here.
Documentation
For development documentation, see Claroline/CoreBundle/Resources/doc/index.md.