localgovdrupal / localgov
LocalGovDrupal distribution
Installs: 70 762
Dependents: 2
Suggesters: 0
Security: 0
Stars: 83
Watchers: 17
Forks: 18
Open Issues: 163
Type:drupal-profile
Requires
- php: >=8.1.0
- drupal/admin_toolbar: ^3.0
- drupal/content_lock: ^2.4
- drupal/core: ^10.0
- drupal/entity_browser: ^2.9
- drupal/gin: ^3.0@alpha
- drupal/gin_login: ^2.0.3
- drupal/gin_toolbar: ^1.0@beta
- drupal/masquerade: ^2.0
- drupal/preview_link: ^2.1@alpha
- drupal/redirect: ^1.10
- drupal/search_api: ^1.21
- drupal/simple_sitemap: ^4.1
- drush/drush: >=10
- localgovdrupal/localgov_alert_banner: ^1.2.0
- localgovdrupal/localgov_base: ^1.3.1
- localgovdrupal/localgov_core: ^2.12.0
- localgovdrupal/localgov_demo: ^3.0@alpha
- localgovdrupal/localgov_directories: ^3.0
- localgovdrupal/localgov_events: ^3.0
- localgovdrupal/localgov_guides: ^2.1.0
- localgovdrupal/localgov_menu_link_group: ^1.1.0
- localgovdrupal/localgov_news: ^2.3.0
- localgovdrupal/localgov_openreferral: ^2.0@beta
- localgovdrupal/localgov_paragraphs: ^2.3.0
- localgovdrupal/localgov_scarfolk: ^1.1.2
- localgovdrupal/localgov_search: ^1.2.0
- localgovdrupal/localgov_services: ^2.1.0
- localgovdrupal/localgov_step_by_step: ^2.1.0
- localgovdrupal/localgov_subsites: ^2.3.0
- localgovdrupal/localgov_workflows: ^1.2.0
Requires (Dev)
- drupal/core-dev: ^10.0
- drupal/geofield_map: ^3.0
- 3.x-dev
- 3.0.12
- 3.0.11
- 3.0.10
- 3.0.9
- 3.0.8
- 3.0.7
- 3.0.6
- 3.0.5
- 3.0.4
- 3.0.3
- 3.0.2
- 3.0.1
- 3.0.0
- 3.0.0-beta1
- 3.0.0-alpha4
- 3.0.0-alpha3
- 3.0.0-alpha2
- 3.0.0-alpha1
- 2.x-dev
- 2.3.22
- 2.3.21
- 2.3.20
- 2.3.19
- 2.3.18
- 2.3.17
- 2.3.16
- 2.3.15
- 2.3.14
- 2.3.13
- 2.3.12
- 2.3.11
- 2.3.10
- 2.3.9
- 2.3.8
- 2.3.7
- 2.3.6
- 2.3.5
- 2.3.4
- 2.3.3
- 2.3.2
- 2.3.1
- 2.3.0
- 2.2.0
- 2.1.9
- 2.1.8
- 2.1.7
- 2.1.6
- 2.1.5
- 2.1.4
- 2.1.3
- 2.1.2
- 2.1.1
- 2.1.0
- 2.0.1
- 2.0.0
- 1.x-dev
- 1.0.1
- 1.0.0
- 1.0.0-alpha4
- 1.0.0-alpha3
- 1.0.0-alpha2
- 1.0.0-alpha1
- dev-fix/test-phpstan-do-not-merge
- dev-release-3.x
- dev-feature/779-remove-patch
- dev-feature/740-test-fix-tests
- dev-feature/740/enable-localgov_base-helper-module
- dev-fix/3.x/use-phpunit
- dev-feature/content-access-by-path
- dev-674/enable-msqrole-module
- dev-726/simple-media-bulk-upload
- dev-feature/734/adds-revisions-log-view
- dev-feature/test-the-tests
- dev-feature/331-facets-patches
- dev-release-2.x
- dev-do-not-merge/3.x/geo_entity
- dev-feature/3.x/geo_entity
- dev-feature/2.x/466-543-autosave-content-lock
- dev-feature/simple-sitemap-update
- dev-feature/466-autosave
- dev-feature/479-security-policy
- dev-fix/3.x/drupal-10-install
- dev-release-1.x
This package is auto-updated.
Last update: 2024-11-08 15:32:15 UTC
README
A Drupal distribution and installation profile designed to help UK and Irish councils collaborate and share Drupal code and build a culture of publishing excellent website content for everyone.
This project is the Drupal installation profile that is best installed using composer to require a project template, localgov_project, to scaffold and build the codebase, which includes this installation profile.
Patches
Please note, if you are using Drupal core < 10.3.6, you might want to apply this patch for content moderation and workspaces.
Supported branches
We are actively developing and supporting the 3.x branch for Drupal 10.
The 2.x branch is no longer officially supported, as Drupal 9 is unsupported since 1st November 2023. We will continue to help our councils that have not yet upgraded to Drupal 10, on a best efforts basis.
The 1.x branch is no longer actively supported and not recommended for new sites.
Important: If you are still using the 1.x or 2.x branches on your site, please create an issue on Github to let us know.
Documentation
Further documentation for developers, content designers and other audiences can be found at https://docs.localgovdrupal.org/.
Requirements for installing LocalGov Drupal locally for testing and development
To install LocalGov Drupal locally you will need an appropriate versions of:
- PHP (see https://www.drupal.org/docs/system-requirements/php-requirements)
- A database server like MySQL (see https://www.drupal.org/docs/system-requirements/database-server-requirements)
- A web server like Apache2 (see https://www.drupal.org/docs/system-requirements/web-server-requirements)
Many of us use the Lando file included to run a local docker environmnent for testing and development, but some people prefer to run the web servers natively on their host machine.
We also include default DDEV configuration for developers that prefer DDEV. Visit our DDEV docs page to see how to get set up.
PHP requirements
We folllow Drupal's PHP recomendations: https://www.drupal.org/docs/system-requirements/php-requirements#versions
We currently recomend PHP 8.1 also aim to support PHP PHP 8.2 in line with Drupal 10's PHP support.
You will also need to have certain PHP extensions enabled (see https://www.drupal.org/docs/system-requirements/php-requirements#extensions) including:
- PHP mbstring
- PHP cURL
- GD library
- XML
If you see errors when running composer require, double check your PHP extensions.
Composer and Lando
To install locally, you will need Composer and we recommend using Lando for a consistent developer environment.
Please also see the Lando requirements section for details of Docker requirements for different operating systems.
https://docs.lando.dev/basics/installation.html#system-requirements
Installing LocalGov Drupal locally with composer
To install LocalGov Drupal locally for testing or development, use the Composer-based project template.
Change MY_PROJECT
to whatever you'd like your project directory to be called.
composer create-project localgovdrupal/localgov-project:^3.0 MY_PROJECT --no-install
Change directory into the MY_PROJECT directory and run lando start.
cd MY_PROJECT
lando start
Once lando has finished building, use lando to run composer install and the site installer.
lando composer install lando drush si localgov -y
Note: As you might be running a different version of PHP on your host machine from the version that Lando runs, it is advisable to run composer install from within Lando. This ensures dependencies reflect the PHP version that the webserver is actually running.
Composer notes
If developing locally and you want to force composer to clone again
from source rather than use composer cache, you can add the --no-cache
flag.
composer create-project localgovdrupal/localgov-project:^3.0 MY_PROJECT --no-cache --no-install
If you just want to pull in the latest changes to LocalGov Drupal run composer
update with the --no-cache
flag.
lando composer update --no-cache
If you want to be sure you are getting the latest commits when developing, clearing composer cache, deleting the folders and re-running composer update seems to be a solid approach:
rm -rf web/profiles/contrib/ web/modules/contrib/ web/themes/contrib/; composer clear-cache; composer update --with-dependencies --no-cache; lando start; lando drush si localgov -y;
If you run into memory limit errors
when running Composer commands, prefix the commands with COMPOSER_MEMORY_LIMIT=-1
.
For example, to install the project run:
COMPOSER_MEMORY_LIMIT=-1 composer create-project localgovdrupal/localgov-project:^3.0 MY_PROJECT
Contributing
See CONTRIBUTING.md for current contribution guidelines.
Issue tracking
In the early development stages, most issues will be tracked in this repository https://github.com/localgovdrupal/localgov/issues.
Development issues relating to specific projects or module should be tracked in the project repository. In the future we might set up a separate repository for centralised issue tracking of bug reports for end users.
Development setup
The main development environment in use is currently Lando – a Docker based development environment that works on Linux, MacOS and Windows.
@todo Document Lando setup.
Coding standards
PHP CodeSniffer is installed as a dev dependency by Composer and configured to use Drupal coding standards and best practices. It is a good idea to run these before committing any code. All code in pull requests should pass all CodeSniffer tests.
To check code using Lando run:
lando phpcs
To attempt to automatically fix coding errors in Lando run:
lando phix
Coding standards resources
Running tests
The included phpunit.xml.dist
file contains configuration for automatically
running the LocalGov Drupal test suite.
To run all LocalGov Drupal tests with Lando use:
lando phpunit
To run all the tests for a specific module use:
lando phpunit web/modules/contrib/localgov_my_module
Tests can be filtered using the --filter
option. To only run a specific test
use:
lando phpunit --filter=myTestName
Testing resources
- PHPUnit documentation
- Drupal 8 PHPUnit documentation
- Drupal 8 testing documentation
- Workshop: Automated Testing and Test Driven Development in Drupal 8
Security policy
It is important to have a way to report security issues safely and securely. Luckily this is something Drupal has done very well for many years, via the security team. We publish our distributions on drupal.org and opt in to the security advisory policy..
See https://www.drupal.org/drupal-security-team/general-information
How to report a security issue
If you discover or learn about a potential error, weakness, or threat that can compromise the security of Drupal, LocalGov Drupal or LocalGov Drupal Microsites, we ask you to keep it confidential and submit your concern to the Drupal security team.
Maintainers
This project is currently maintained by:
- Andy Broomfield: https://www.drupal.org/u/andybroomfield
- Ekes: https://www.drupal.org/u/ekes
- Finn Lewis: https://www.drupal.org/u/finn-lewis
- Maria Young: https://www.drupal.org/u/mariay-0
- Mark Conroy: https://www.drupal.org/u/markconroy
- Stephen Cox: https://www.drupal.org/u/stephen-cox