Skip to content

fix!: install module via Composer path repository instead of app/code#199

Merged
Morgy93 merged 1 commit into
mainfrom
update-install
Jun 13, 2026
Merged

fix!: install module via Composer path repository instead of app/code#199
Morgy93 merged 1 commit into
mainfrom
update-install

Conversation

@Morgy93

@Morgy93 Morgy93 commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

This pull request updates the MageForge module development environment to use a read-only Docker mount and Composer path repository for local development, replacing the previous bind-mount approach. This change improves compatibility with Magento's path validator, automates dependency management, and protects the module source from accidental deletion. The documentation, Docker configuration, and install scripts have all been updated to reflect this new workflow.

Environment and Mount Changes:

  • The MageForge module is now mounted read-only into magento/mageforge-source using Docker, instead of being bind-mounted directly into app/code/. This satisfies Magento's path validator and protects the source from accidental deletion. (.ddev/docker-compose.mageforge-source.yaml, .ddev/config.yaml, docs/development.md) [1] [2] [3] [4]
  • The Docker configuration now pre-creates the mageforge-source directory on the host and shadows recursive mounts to avoid issues. (.ddev/config.yaml, .ddev/docker-compose.mageforge-source.yaml) [1] [2]

Composer and Dependency Management:

  • The install process now registers the module source as a Composer path repository and requires it as a package, allowing Composer to resolve third-party dependencies automatically. The custom script for installing module dependencies (install-module-deps) has been removed as it is no longer needed. (.ddev/commands/web/install-magento, .ddev/commands/web/install-module-deps, .ddev/config.yaml, docs/development.md) [1] [2] [3] [4] [5]

Install Script and Guard Updates:

  • The install script now checks for the presence of the mageforge-source/composer.json file to verify the mount, instead of looking for registration.php in the old bind-mount location. (.ddev/commands/web/install-magento)
  • The module is now enabled via Composer, and the script has been simplified to reflect the new installation method. (.ddev/commands/web/install-magento)

Documentation Updates:

  • All relevant documentation has been updated to explain the new mounting strategy, Composer integration, and updated troubleshooting steps. (docs/development.md) [1] [2] [3] [4]

Copilot AI review requested due to automatic review settings June 12, 2026 19:34
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Jun 12, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the local MageForge development setup to install the module into the Magento test instance via a Composer path repository (symlinked from vendor/) instead of bind-mounting it into app/code/. The module source is now mounted read-only under magento/mageforge-source/, improving compatibility with Magento’s filesystem path validation and protecting the working tree from accidental container-side deletes.

Changes:

  • Switch Docker mounting to a read-only mount of the repo root into magento/mageforge-source/, with a shadow volume to prevent recursive mounts.
  • Update ddev install-magento to register a Composer path repository and composer require openforgeproject/mageforge:@dev, removing the need for the module-deps sync script.
  • Refresh development documentation and DDEV hooks to match the new workflow.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
docs/development.md Updates setup/troubleshooting docs to describe the read-only source mount + Composer path repository install.
.ddev/docker-compose.mageforge-source.yaml Changes the module source mount from app/code to magento/mageforge-source (read-only) and adds a shadow volume to avoid recursion.
.ddev/config.yaml Updates the pre-start hook to create the new mount target and removes the post-start module dependency installer hook.
.ddev/commands/web/install-module-deps Removes the no-longer-needed dependency sync command (replaced by Composer-managed install).
.ddev/commands/web/install-magento Adds a mount guard for mageforge-source/composer.json, prunes the read-only mount from find, and installs MageForge via Composer path repository before setup:install.

@Morgy93 Morgy93 requested a review from dermatz June 12, 2026 19:37
@Morgy93 Morgy93 enabled auto-merge (rebase) June 13, 2026 07:30
@Morgy93 Morgy93 merged commit 1305ee6 into main Jun 13, 2026
13 checks passed
@Morgy93 Morgy93 deleted the update-install branch June 13, 2026 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants