claudiu-cristea / drupal-project
Allows to keep all Drupal code outside of web root
Installs: 2
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Type:composer-plugin
pkg:composer/claudiu-cristea/drupal-project
Requires
- composer-plugin-api: ^2.0
Requires (Dev)
- composer/composer: ^2.0
- phpstan/phpstan: ^2.1
- squizlabs/php_codesniffer: ^4.0
This package is auto-updated.
Last update: 2025-10-20 16:52:31 UTC
README
Allows to keep all Drupal code outside of web root.
The package provides a Composer plugin that scaffolds the custom code directories and settings for a Drupal project. The main idea is to keep all custom code outside the web root.
When running Composer install or update, the following directories and files will be created, if they don't exist. Under web root symlinks are created in the proper location. For instance src/Drupal/Modules
is symlinked as web/modules/custom
, files/public
is symlinked as web/sites/default/files
and so on.
Directory/file Symlinked as
├─ files
│ ├─ private
│ ├─ public -> web/sites/default/files
│ └─ .gitignore Both, private and public, are ignored
...
├─ src
│ └─ Drupal
│ ├─ Modules -> web/modules/custom
│ ├─ Profiles -> web/profiles/custom
│ ├─ Settings
│ │ ├─ settings.php -> web/sites/default/settings.php
│ │ ├─ settings.local.php -> web/sites/default/settings.local.php
│ │ └─ .gitignore settings.local.php is ignored
│ └─ Themes -> web/themes/custom
The webroot directory (web/
) is also added to the project's .gitignore
if it isn't yet there.