Skip to content

Instantly share code, notes, and snippets.

@rfay
Last active October 24, 2025 23:52
Show Gist options
  • Select an option

  • Save rfay/aba08db51981b11aa31862c1f9656e86 to your computer and use it in GitHub Desktop.

Select an option

Save rfay/aba08db51981b11aa31862c1f9656e86 to your computer and use it in GitHub Desktop.
DDEV PR #7558 Manual Testing Report - composer_root support for CakePHP, CraftCMS, Laravel, Magento2, Shopware6, Symfony

PR #7558 Manual Testing Report

Test Prompt

Here we're working on ddev/ddev#7558 and we need to use the executable built here. That is all set up fine.

  • You can create test projects in ~/tmp as needed
  • The manual testing instructions are excellent. They refer to DDEV's quickstarts, which are here in quickstart.md
  • We need to do the quickstart builds, as it says in the instructions, then run the manual testing that is suggested
  • A report will be done then
  • Do these evaluations one at a time, with an intermediate report after each one.
  • You can do anything in a test project in ~/tmp/ without asking

PR Overview

PR #7558: feat: use composer_root in cakephp, craftcms, laravel, magento2, shopware6, symfony for app type detection

Issue: If the project is in a subfolder, DDEV doesn't create CMS specific files in a proper place. This behavior exists in CakePHP, Laravel, Shopware6, Symfony, CraftCMS, and Magento2.

Solution: Uses composer_root for app type and settings files detection.

Testing Methodology

Each framework was tested following the exact manual testing instructions from the PR:

  1. Follow DDEV quickstart to install the framework
  2. Run ddev poweroff and move all files/folders (except .ddev) into a subfolder (foobar)
  3. Run ddev config --composer-root=foobar --docroot=foobar/<docroot>
  4. Remove the framework-specific configuration file
  5. Run ddev start to verify the file is recreated in the correct location
  6. Run ddev config --project-type=php to set type to php
  7. Run ddev config --update to verify auto-detection works
  8. Test framework-specific commands with the modified composer_root

Test Results

✅ CakePHP Test Report

Status: All tests passed

Test Steps Completed:

  1. Initial setup: Created project with ddev config --project-type=cakephp --docroot=webroot
  2. Installation: Installed via ddev composer create-project cakephp/app:~5.0
  3. Step 2: Ran ddev poweroff and moved all files (except .ddev) to foobar/ subdirectory
  4. Step 3: Configured with ddev config --composer-root=foobar --docroot=foobar/webroot
  5. Step 4: Removed foobar/config/.env.ddev file
  6. Step 5: Ran ddev start - .env.ddev was correctly recreated in foobar/config/.env.ddev
  7. Step 6: ddev config --project-type=php set type to php
  8. Step 7: ddev config --update correctly auto-detected type as cakephp
  9. Step 8: ddev cake --version worked properly, showing version 5.2.9

Key Verification:

  • Configuration file created in correct location: foobar/config/.env.ddev
  • File contains proper database credentials and settings
  • Auto-detection correctly identifies CakePHP from subfolder
  • Framework command executes successfully

✅ CraftCMS Test Report

Status: All tests passed

Test Steps Completed:

  1. Initial setup: Created project with ddev config --project-type=craftcms --docroot=web
  2. Installation: Installed via ddev composer create-project craftcms/craft
  3. Step 2: Ran ddev poweroff and moved all files (except .ddev) to foobar/ subdirectory
  4. Step 3: Configured with ddev config --composer-root=foobar --docroot=foobar/web
  5. Step 4: Removed .ddev/.env.web file
  6. Step 5: Ran ddev start - .env.web was correctly recreated with CRAFT_WEB_ROOT="/var/www/html/foobar/web"
  7. Step 6: ddev config --project-type=php set type to php
  8. Step 7: ddev config --update correctly auto-detected type as craftcms
  9. Step 8: ddev craft help worked properly, showing Craft CMS version 5.8.18

Key Verification:

  • Configuration file created in correct location: .ddev/.env.web
  • File contains CRAFT_WEB_ROOT="/var/www/html/foobar/web" pointing to subfolder
  • Auto-detection correctly identifies CraftCMS from subfolder
  • Framework command executes successfully

✅ Laravel Test Report

Status: All tests passed

Test Steps Completed:

  1. Initial setup: Created project with ddev config --project-type=laravel --docroot=public
  2. Installation: Installed via ddev composer create-project "laravel/laravel:^12"
  3. Step 2: Ran ddev poweroff and moved all files (except .ddev) to foobar/ subdirectory
  4. Step 3: Configured with ddev config --composer-root=foobar --docroot=foobar/public
  5. Step 4: Removed foobar/.env file
  6. Step 5: Ran ddev start - .env was correctly recreated in foobar/.env with proper database settings
  7. Step 6: ddev config --project-type=php set type to php
  8. Step 7: ddev config --update correctly auto-detected type as laravel
  9. Step 8: ddev artisan --version worked properly, showing Laravel Framework 12.35.1

Key Verification:

  • Configuration file created in correct location: foobar/.env
  • File contains proper database credentials (DB_CONNECTION="mariadb", DB_HOST="db", etc.)
  • Auto-detection correctly identifies Laravel from subfolder
  • Framework command executes successfully

✅ Magento2 Test Report

Status: All tests passed

Test Steps Completed:

  1. Initial setup: Created project with ddev config --project-type=magento2 --docroot=pub --disable-settings-management
  2. Installation: Installed OpenSearch addon and Magento via ddev composer create-project --repository https://repo.magento.com/ magento/project-community-edition
  3. Step 2: Ran ddev poweroff and moved all files (except .ddev) to foobar/ subdirectory
  4. Step 3: Configured with ddev config --composer-root=foobar --docroot=foobar/pub
  5. Step 4: Verified foobar/app/etc/env.php didn't exist (was removed before moving)
  6. Step 5: Ran ddev start with settings management enabled - env.php was correctly recreated in foobar/app/etc/env.php
  7. Step 6: ddev config --project-type=php set type to php
  8. Step 7: ddev config --update correctly auto-detected type as magento2
  9. Step 8: ddev magento --version worked properly, showing Magento CLI 2.4.8-p3

Key Verification:

  • Configuration file created in correct location: foobar/app/etc/env.php
  • File contains proper database configuration with host='db', dbname='db', username='db', password='db'
  • Auto-detection correctly identifies Magento2 from subfolder
  • Framework command executes successfully

Note: Settings management must be enabled (--disable-settings-management=false) for the configuration file to be created automatically.


✅ Shopware6 Test Report

Status: All tests passed

Test Steps Completed:

  1. Initial setup: Created project with ddev config --project-type=shopware6 --docroot=public
  2. Installation: Installed via ddev composer create-project shopware/production
  3. Step 2: Ran ddev poweroff and moved all files (except .ddev) to foobar/ subdirectory
  4. Step 3: Configured with ddev config --composer-root=foobar --docroot=foobar/public
  5. Step 4: Removed foobar/.env.local file
  6. Step 5: Ran ddev start - .env.local was correctly recreated in foobar/.env.local
  7. Step 6: ddev config --project-type=php set type to php
  8. Step 7: ddev config --update correctly auto-detected type as shopware6

Key Verification:

  • Configuration file created in correct location: foobar/.env.local
  • File contains proper settings: DATABASE_URL, APP_ENV, MAILER_DSN, APP_URL
  • Auto-detection correctly identifies Shopware6 from subfolder

✅ Symfony Test Report

Status: All tests passed

Test Steps Completed:

  1. Initial setup: Created project with ddev config --project-type=symfony --docroot=public
  2. Installation: Installed via ddev composer create-project symfony/skeleton followed by ddev composer require webapp
  3. Step 2: Ran ddev poweroff and moved all files (except .ddev) to foobar/ subdirectory
  4. Step 3: Configured with ddev config --composer-root=foobar --docroot=foobar/public
  5. Step 4: Removed foobar/.env.local file
  6. Step 5: Ran ddev start - .env.local was correctly recreated in foobar/.env.local
  7. Step 6: ddev config --project-type=php set type to php
  8. Step 7: ddev config --update correctly auto-detected type as symfony
  9. Step 8: ddev console --version worked properly, showing Symfony 7.3.4

Key Verification:

  • Configuration file created in correct location: foobar/.env.local
  • File contains proper database and mailer settings
  • Auto-detection correctly identifies Symfony from subfolder
  • Framework command executes successfully

Overall Summary

All six frameworks tested successfully!

Test Coverage

Framework Config File Location Auto-Detection Framework Command Status
CakePHP foobar/config/.env.ddev ddev cake PASS
CraftCMS .ddev/.env.web ddev craft PASS
Laravel foobar/.env ddev artisan PASS
Magento2 foobar/app/etc/env.php ddev magento PASS
Shopware6 foobar/.env.local N/A PASS
Symfony foobar/.env.local ddev console PASS

Key Findings

  1. Configuration Files: All framework-specific configuration files are correctly created in their expected locations within the subfolder when composer_root is set.

  2. Auto-Detection: The ddev config --update command successfully detects the correct project type even when the project files are in a subfolder, as long as composer_root is configured.

  3. Framework Commands: All framework-specific commands (ddev cake, ddev craft, ddev artisan, ddev magento, ddev console) work correctly with the composer_root configuration.

  4. Database Configuration: All configuration files contain proper database credentials pointing to DDEV's database container.

Conclusion

PR #7558 successfully implements composer_root support for all six tested frameworks. The implementation correctly:

  • Creates configuration files in the appropriate subfolder locations
  • Supports auto-detection of project types from subfolders
  • Enables framework-specific commands to execute properly
  • Maintains backward compatibility (no issues with standard installations)

Recommendation: ✅ APPROVE - This PR is ready for merge. All manual testing scenarios pass successfully.


Test Environment

  • DDEV Version: Built from PR #7558 branch
  • Test Date: October 24, 2025
  • Operating System: macOS (Darwin)
  • Test Location: ~/tmp/ directory
  • Frameworks Tested: 6 (CakePHP, CraftCMS, Laravel, Magento2, Shopware6, Symfony)

Report generated by GitHub Copilot CLI
Testing performed following PR #7558 manual testing instructions
Date: October 24, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment