Skip to content

Playgrounds

Playgrounds are minimal, working applications demonstrating ADP integration with specific PHP frameworks. Each playground installs the corresponding ADP adapter, configures collectors, and exposes demo endpoints that generate debug data.

Available Playgrounds

PlaygroundFrameworkPortAdapter
yii3-appYii 38101app-dev-panel/adapter-yii3versiondownloadsapp-dev-panel/adapter-yii3View on Packagistversiondownloadslicensephp version
symfony-appSymfony 78102app-dev-panel/adapter-symfonyversiondownloadsapp-dev-panel/adapter-symfonyView on Packagistversiondownloadslicensephp version
yii2-basic-appYii 28103app-dev-panel/adapter-yii2versiondownloadsapp-dev-panel/adapter-yii2View on Packagistversiondownloadslicensephp version
laravel-appLaravel 128104app-dev-panel/adapter-laravelversiondownloadsapp-dev-panel/adapter-laravelView on Packagistversiondownloadslicensephp version

Running Playgrounds

Install Dependencies

bash
make install-playgrounds

Start Servers

Each playground runs on its own port. Start in separate terminals:

bash
cd playground/symfony-app && PHP_CLI_SERVER_WORKERS=3 php -S 127.0.0.1:8102 -t public

TIP

PHP_CLI_SERVER_WORKERS=3 is required for SSE — one worker handles the SSE stream, others handle API requests.

Common URLs

All playgrounds expose the same URL structure:

PathPurpose
/Home / demo page
/debug/api/Debug entry list (JSON)
/debug/api/view/{id}Full debug entry data
/debug/api/summary/{id}Entry summary
/inspect/api/*Inspector endpoints
/test/fixtures/*Test fixture endpoints

Integration Methods

Each framework uses a different adapter registration approach:

FrameworkIntegrationRegistration
Yii 3Config pluginAutomatic via yiisoft/config
SymfonyBundleManual in config/bundles.php (dev/test only)
LaravelPackage discoveryAutomatic via extra.laravel.providers
Yii 2Module + BootstrapAuto-bootstrap via extra.bootstrap in composer

Storage Paths

FrameworkPathResolution
Yii 3runtime/debug/@runtime alias
Symfonyvar/debug/%kernel.project_dir%
Laravelstorage/debug/storage_path('debug')
Yii2runtime/debug/@runtime alias

Running Test Fixtures

Fixtures are automated test endpoints that exercise each collector:

bash
make fixtures              # All playgrounds in parallel
make fixtures-yii3         # Yii 3 only
make fixtures-symfony      # Symfony only
make fixtures-yii2         # Yii2 only
make fixtures-laravel      # Laravel only

For PHPUnit E2E tests (requires running servers):

bash
make test-fixtures         # All playgrounds
make test-fixtures-yii3    # Yii 3 only

Adding a New Playground

To add a playground for a new framework:

  1. Create playground/<framework>-app/ with a minimal application using the framework's official skeleton
  2. Install ADP packages using path repositories:
json
{
    "repositories": [
        {"type": "path", "url": "../../libs/Kernel"},
        {"type": "path", "url": "../../libs/API"},
        {"type": "path", "url": "../../libs/Adapter/<Framework>"}
    ],
    "require": {
        "app-dev-panel/adapter-<framework>": "*"
    }
}
  1. Configure collectors, storage, and API routes per the adapter's documentation
  2. Implement /test/fixtures/* endpoints matching FixtureRegistry (see Contributing)
  3. Add Makefile targets for serve, fixtures, and Mago checks
  4. Assign the next available port (8105+)

Port Allocation

PortAssignment
8100Frontend dev server
8101Yii 3
8102Symfony
8103Yii2
8104Laravel
8105+Available

Released under the MIT License.