- PHP Version: 8.0.0 - 8.1.x
- Required PHP Extensions:
- OpenSSL
- PDO
- MySQL/MariaDB
- GD
- cURL
- XML
- Zip
- MySQL Version: 5.7 - 8.x
- MariaDB Version: 10.0 - 11.0
- Apache (recommended) with mod_rewrite enabled
- Nginx (with proper rewrite rules)
- Ensure your web server is properly configured
- Make sure PHP and required extensions are installed
- Create a database for FormaLMS
- Download and extract the FormaLMS package to your web server directory
- Set proper permissions:
- Make sure the web server has write permissions to:
/html/files/directory and subdirectories/html/config.phpfile
- Make sure the web server has write permissions to:
- Navigate to your FormaLMS URL in a web browser
- Follow the installation wizard which will guide you through:
- Language selection
- System requirements check
- Database configuration
- Administrator account setup
- SMTP configuration (optional)
- Configure cron jobs if needed for scheduled tasks
- Review and adjust system settings in the admin panel
Copy and rename /test/behat/behat_config.yml.dist and change base_url to your needs, then:
# --ignore-platform-reqs use this when you don't have php >= 5.5 (tests will not run)
cd html && php ../composer.phar install [--ignore-platform-reqs]
bin/phing project:setup
bin/behat --config test/behat/behat.yml
bin/phpunit --stderr --verbose -c test/phpunit/phpunit.xml
bin/phing project:build
FormaLMS provides several make commands to help with development and maintenance tasks. These commands can be executed from the project root directory using make <command>.
Displays a list of all available make commands with brief descriptions.
Removes temporary build artifacts, including:
/html/vendordirectory/html/files/cachedirectory/tools/php-cs-fixer/vendordirectory
Installs composer dependencies:
- Sets executable permissions for composer.phar and composer-normalize.phar
- Installs dependencies in the
/htmldirectory - Installs dependencies for PHP CS Fixer in the
/tools/php-cs-fixerdirectory
Combines fix-code-style and fix-composer commands to:
- Fix code style issues
- Normalize composer.json file
Fixes code style issues using PHP CS Fixer with the configuration from /tools/php-cs-fixer/.php-cs-fixer.php.
Normalizes the composer.json file and updates dependencies:
- Normalizes
/html/composer.jsonwithout updating the lock file - Updates composer dependencies without making changes
Executes all tests after cleaning build artifacts and fixing code style issues.
Exports the changelog using the PHP script at /tools/php-changelog/changelog-upgrade.php.
Extracts and displays all Events::trigger calls from the codebase using the PHP script at /tools/php-events-extractor/extract-events.php.
Exports all events to the EVENTS.md file using the PHP script at /tools/php-events-extractor/extract-events.php.
- Available commands:
completionDump the shell completion scripthelpDisplay help for a commandlistList commands
- migrations
migrations:current[current] Outputs the current versionmigrations:diff[diff] Generate a migration by comparing your current database to your mapping information.migrations:dump-schema[dump-schema] Dump the schema for your database to a migration.migrations:execute[execute] Execute one or more migration versions up or down manually.migrations:generate[generate] Generate a blank migration class.migrations:latest[latest] Outputs the latest versionmigrations:list[list-migrations] Display a list of all available migrations and their status.migrations:migrate[migrate] Execute a migration to a specified version or the latest available version.migrations:rollup[rollup] Rollup migrations by deleting all tracked versions and insert the one version that exists.migrations:status[status] View the status of a set of migrations.migrations:sync-metadata-storage[sync-metadata-storage] Ensures that the metadata storage is at the latest version.migrations:up-to-date[up-to-date] Tells you if your schema is up-to-date.migrations:version[version] Manually add and delete migration versions from the version table.
- in the up method of the migration before or after the queries insert
\Events::trigger('platform.upgrade', [_upgradeclass_ => formatUpgradeClass(__CLASS__, "pre")]);\Events::trigger('platform.upgrade', [_upgradeclass_ => formatUpgradeClass(__CLASS__, "post")]);- To set params for the event
\Events::trigger('platform.upgrade', [_upgradeclass_ => formatUpgradeClass(__CLASS__, "pre"), "params" =>["arg1"=> "val1",...."argN" => "valN"]]);
For a complete list of all available events, see EVENTS.md.
FormaLMS follows specific branching rules for version control. For detailed information about the Git workflow, branching rules, and command examples, please refer to the GIT-WORKFLOW.md file.