Download the PHP package sergeant/drupal-project without Composer
On this page you can find all versions of the php package sergeant/drupal-project. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sergeant/drupal-project
More information about sergeant/drupal-project
Files in sergeant/drupal-project
Package drupal-project
Short Description SGT Project template for Drupal 9.5+ projects with composer
License
Informations about the package drupal-project
Composer template for Sergeant Drupal projects
This is the fork of Composer template for Drupal projects. All documentation regarding this project is available on given url. The notes bellow are addition/override of the source documentation. The updates from forked project has to be implemented manually.
Lead maintainer: Zan Vidmar (contact)
Maintainer: Aljosa Furlanic (contact)
Usage
Access
For successful installation of Sergeant modules, read access to Sergeant private repositories is needed.
Sergeant workflow
Sergeant drupal project init article (private)
Installation (!)
Initialize project with command line generator
Initialize project just with composer
First you need to install composer.
- After that you can create the project:
Change the some-directory
with your directory where the project will be.
In case if something is not installed correctly try to clear composer cache first (composer clear-cache
), and than report an issue.
-
Install Drupal with the Installation Profile (everything is handled by sgt_installation_profile module).
- Create new checklist
/admin/config/sergeant/sgt_checklist
and go trough all checklist items.
Settings
- For global setting use
/web/sites/*/settings.php
- For environment settings use
/web/sites/*/settings.local.php
- For development services use
/web/sites/default/local.services.yml
(do not use this on production!)
Development local.services.yml example:
Updating Drupal project itself
That will update some settings in composer.json file and also some other Drupal project related files.
Updates are handled by sergeant/sgt_drupal_project_update
;
To update drupal project to last version:
or to update it to specific project version:
Keep local "repositories" in composer.json file as they are
In case you would not like to update "repositories" data (for example: if you change library version for given project only) use:
add keep-local-repositories-data=true
flag.
Example
Updates (!)
Every time when Drupal core is updated, we have to update Drupal module Sergeant core (sgt_installation_profile). Sergeant Installation Profile holds all currently active patches for Drupal core and modules required by Sergeant Installation Profile. All other patches has to be handled on project level.
What does this template adds to forked drupal-composer/drupal-project
Packages required by default (wiht its dependency tree)
All modules listed below in dependency tree are required by default. sergeant/sgt_installation_profille module handles all other required contributed Drupal modules.
Sergeant Drupal project (composer project)
- sgt_core (module)
- sgt_checklist
- entity_creator_api
- sgt_handbook
- sgt_paragraphs
- sgt_field_paragraph_settings
- sgt_checklist
- sgt_ignite (theme)
- sgt_ignite_components
- sgt_ignite_features
- sgt_installation_profille (profile)
- all required Drupal modules
Included repositories
This only include package sources, the installation is optional and always made by developer.
- sergeant/sgt_devel
- sergeant/sgt_filter_query_api
- sergeant/sgt_media_colorbox_field_formatter
- sergeant/sgt_media_crop
- sergeant/sgt_tiles
Included Sergeant private repositories:
- sergeant/entity_creator_api (repo)
- sergeant/sgt_checklist (repo)
- sergeant/sgt_core (repo)
- sergeant/devel (repo)
- sergeant/sgt_drupal_project_update (repo)
- sergeant/sgt_field_paragraph_settings (repo)
- sergeant/sgt_filter_query_api (repo)
- sergeant/sgt_handbook (repo)
- sergeant/sgt_ignite (repo)
- sergeant/sgt_ignite_components (repo)
- sergeant/sgt_ignite_features (repo)
- sergeant/sgt_installation_profile (repo)
- sergeant/sgt_media_colorbox_field_formatter (repo)
- sergeant/sgt_media_crop (repo)
- sergeant/sgt_paragraphs (repo)
- sergeant/sgt_tiles (repo)
Required contrib packages (JS libraries)
- harvesthq/chosen is required via sgt_installation_profille => drupal/chosen. Drupal project composer.json file includes requrements mentioned in drupal/chosen readme file. (repo, docs)
Included contrib packages (JS libraries)
- gfranko/jquery.tocify.js
composer require gfranko/jquery.tocify.js
(repo, docs) - jackmoore/colorbox
composer require jackmoore/colorbox
(repo, docs)
Composer file modifications
Installer paths
Installer paths are changed to a non standard paths, to met the Sergeant workflow with Sergeant modules and Sergeant Ignite theme.
All Sergeant modules are placed in web/modules/sgt/
directory.
The structure of module folder:
- contrib
web/modules/contrib/
(for Drupal contrib modules, git ignored, managed by composer) - custom
web/modules/custom/
(for Drupal custom modules per project, git managed) - sgt
web/modules/sgt/
(for Sergeant Drupal contrib modules, git ignored, managed by composer)
Sergeant Ignite theme is placed in web/themes/sgt_ignite/
directory.
Sergeant installation profile is placed in in web/profiles/sgt/
directory.
Other modifications
- Custom folders ("private", "tmp") are added into $dir array in
scripts/composer/ScriptHandler.php
file. - to accept patches from dependencies
"enable-patching": true
was added toextra
section (source: composer-patches) - Create the files directory with chmod 0775 instead of 0777
- ScriptHandler (with related json autoload => classmap) has additional function that copy all configuration files from Drupal standard profile to Sergeant Installation Profile.
PHP version
This template by default requires at least PHP 8.1
DDEV setup
Troubleshooting
In case of denied acces to private repos add keys to ddev container by ddev auth ssh
command
All versions of drupal-project with dependencies
composer/installers Version ^1.9
cweagans/composer-patches Version ^1.7
drupal/console Version ^1.0.2
drupal/core Version ^9
drupal/core-composer-scaffold Version ^9.5
drupal/core-recommended Version ^9.5
drush/drush Version ^10.6
harvesthq/chosen Version ^1.8
sergeant/sgt_core Version >=3.3.0
sergeant/sgt_ignite Version ~4.0
vlucas/phpdotenv Version ^5.1
webflo/drupal-finder Version ^1.2
zaporylie/composer-drupal-optimizations Version ^1.0
sergeant/sgt_drupal_project_update Version >=3.0
sergeant/sgt_installation_profile Version ~6.0