Developer documentation

Getting started with Genelet PHP

Use the verified guruperl/php repository. Its README's clone example still names an older repository owner; the command below uses the source reviewed for this website.

1. Check out the source

git clone --branch master https://github.com/guruperl/php.git genelet-php
cd genelet-php
git rev-parse HEAD

The package is named genelet/php in composer.json. The metadata uses Twig, PDO-related application code and other Composer dependencies; it does not declare an explicit minimum PHP version. The repository's Docker image uses PHP 8.3.

2. Choose a test environment

If Docker is available, the README documents an isolated framework harness:

./scripts/test-docker.sh

The script builds the PHP test image, starts disposable MySQL 8, installs dependencies, lints source/tests and runs PHPUnit. Review the script before running it and reserve this workflow for a development environment.

With local PHP, Composer and the required test database, the documented path is:

composer install
composer test

The local default expects a MySQL database named test and user genelet_test with a blank password. Those are test defaults, not production account settings. Do not run this against a database containing real data.

3. Explore the complete sample

samples/project-php contains configuration and seed SQL, application models/filters, templates, tests and public entrypoints. From the repository root, its dedicated harness is:

./scripts/test-sample-project-php.sh

The sample uses the local framework through a Composer path repository. The harness imports sample SQL and overrides database configuration for the disposable database. Review the sample README before trying the alternative local setup.

4. Understand what to change for your application

Check one route and output format before extending the schema or adding multiple components. Confirm Composer loads the classes you edited.

5. Keep historical instructions in context

The old website's PHP page contained only a Composer command. This guide adds the actual source/sample workflow. The current sample explicitly omits the former GraphQL helper, so do not assume old GraphQL examples apply. These commands were checked against source but were not executed during this restoration.