-
Notifications
You must be signed in to change notification settings - Fork 69
Metapackage Installation Guide
The current repository contains modules that belong to Security Package functionality only. To provide the ability to develop the project locally we introduced a development workflow that can help external developers work with the project.
-
Clone the
magento2
git repository and check out the2.4-develop
branch. You may also check out and use any2.4
release tags.git clone [email protected]:magento/magento2.git magento2
-
Create an
ext
directory in the root of themagento2
project directory:cd magento2 mkdir ext
-
Clone the
security-package
repository into the appropriate directory insideext
:git clone [email protected]:magento/security-package.git ext/magento/security-package
-
Update Composer settings for the project to allow a better development workflow:
-
minimum-stability
for packages is updated todev
value. This allows installation of development modules:composer config minimum-stability dev
-
To be able to work with stable packages enable the
prefer-stable
property:prefer-stable: true
. It should be included right above theminimum-stability
setting. -
Next we configure Composer so that it knows where to find new modules. The following command will configure any extension code inside the
ext
directory to be treated as a package and symlinked to thevendor
directory:composer config repositories.ext path "./ext/*/*/*"
-
-
Finally, install the
security-package
metapackage:composer require magento/security-package
At this point, all of the security-package
modules are symlinked inside the vendor
directory, which allows both running a Magento installation with additional modules as well as doing development using the standard git workflow.
You may need to ensure that there are no security-package*
modules are listed as disabled when you run bin/magento module:status
. If they are, follow the docs on how to enable modules.
In order to improve the developer experience when working with this repository structure, a few additional items may be configured:
-
Exclude
ext
directories from root directory Git:echo ext >> ./.git/info/exclude
-
Skip root directory
composer.*
files to avoid committing them by mistake:git update-index --skip-worktree composer.json git update-index --skip-worktree composer.lock
This operation is reversible, if needed:
git update-index --no-skip-worktree composer.json git update-index --no-skip-worktree composer.lock