Skip to content

Commit

Permalink
VACMS-16241: Post-D10 Cleanup (#16431)
Browse files Browse the repository at this point in the history
* VACMS-16241: removed empty files

* VACMS-16241: removed seven theme, updated entity_diff_ui

* VACMS-16241: fixed formating

* VACMS-16241: refactored subscriber for future use/expansion

* VACMS-16241: disabled ckeditor 4

* VACMS-16241: removed twig alias, no longer needed

* VACMS-16241: updated documentation for D10 and composer aliasing

* VACMS-16241: updated composer.lock
  • Loading branch information
edmund-dunn authored Dec 14, 2023
1 parent 4d78f27 commit d5516ac
Show file tree
Hide file tree
Showing 11 changed files with 55 additions and 111 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,18 +88,18 @@ The VA.gov CMS Team

### About the CMS

This repository hosts the source code for the _Content Management System_ (**CMS** or **CMS-API**) utilized by [VA.gov](https://www.va.gov).
This repository hosts the source code for the _Content Management System_ (**CMS** or **CMS-API**) utilized by [VA.gov](https://www.va.gov).

The production instance can be found at [prod.cms.va.gov](https://prod.cms.va.gov/). Please note that access to the production CMS is limited; refer to [Getting Access](READMES/access.md) for more information.

Built on [Drupal 9.5](https://www.drupal.org), the **CMS** employs the [Composer](https://getcomposer.org) package management system. To get started, consult [Getting Started](READMES/getting-started.md).
Built on [Drupal 10.1](https://www.drupal.org), the **CMS** employs the [Composer](https://getcomposer.org) package management system. To get started, consult [Getting Started](READMES/getting-started.md).

### Contributing

All of the source code used for generating VA.gov is open source, listed under the [department-of-veterans-affairs](https://github.com/department-of-veterans-affairs)
organization on GitHub:

- **CMS**: [github.com/department-of-veterans-affairs/va.gov-cms](https://github.com/department-of-veterans-affairs/va.gov-cms) - Drupal 9.5
- **CMS**: [github.com/department-of-veterans-affairs/va.gov-cms](https://github.com/department-of-veterans-affairs/va.gov-cms) - Drupal 10.1
- **vets-website**: [github.com/department-of-veterans-affairs/vets-website](https://github.com/department-of-veterans-affairs/vets-website) - Node.js
- **vets-api**: [github.com/department-of-veterans-affairs/vets-api](https://github.com/department-of-veterans-affairs/vets-api) - Ruby
- **content-build**: [github.com/department-of-veterans-affairs/vagov-content](https://github.com/department-of-veterans-affairs/vagov-content) - Node.js, Metalsmith
Expand All @@ -112,7 +112,7 @@ All development on these projects is done via Pull Requests.

The public-facing website at [VA.gov](https://www.va.gov) is a static site hosted on S3, composed of HTML, CSS, JavaScript, and images.

[This codebase](https://github.com/department-of-veterans-affairs/va.gov-cms) is dedicated to the CMS, built on Drupal 9.
[This codebase](https://github.com/department-of-veterans-affairs/va.gov-cms) is dedicated to the CMS, built on Drupal 10.

The source code for generating the public site is located in the [vets-website](https://github.com/department-of-veterans-affairs/vets-website) repository. The component responsible for extracting raw content from the CMS and converting it to HTML is developed in a separate repository, [content-build](https://github.com/department-of-veterans-affairs/content-build).

Expand Down
5 changes: 5 additions & 0 deletions READMES/upstream-dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,8 @@ The following services can affect the deployment process' ability to fully build
| [Github](https://github.com) | | [https://www.githubstatus.com/](https://www.githubstatus.com/) | Use the #github_information channel in DSVA slack | The codebase is stored in github, and the deployment process depends on it to pull code and push status and code quality messages to our pull requests. |
| [ZenHub](https://www.zenhub.com) | | https://twitter.com/zenhubstatus | | ZenHub is a project management layer on top of GitHub Issues that we use. |
| [Docker Hub](https://hub.docker.com/) | | [https://status.docker.com/](https://status.docker.com/) | Contact [email protected] and/or tweet [@Docker](https://twitter.com/Docker) | We use Docker Hub to pull down container images for our CI environments in Tugboat. |

## Composer
There are a number of services that Composer uses to download and install dependencies. These services are used during the build process and are not required for runtime.

We are currently aliasing several packages because of lingering dependencies on Drupal 9. We are working to remove these aliases.
4 changes: 1 addition & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"drupal/entity_browser": "^2.4",
"drupal/entity_browser_table": "^1.4",
"drupal/entity_clone": "^2.0@alpha",
"drupal/entity_diff_ui": "1.0.x-dev@dev",
"drupal/entity_diff_ui": "^2.0@alpha",
"drupal/entity_field_fetch": "^1.0@beta",
"drupal/entity_reference_hierarchy": "^1.0@beta",
"drupal/entity_reference_revisions": "^1.7",
Expand Down Expand Up @@ -166,7 +166,6 @@
"drupal/schemata": "^1.0@beta",
"drupal/search_api": "^1.29.0",
"drupal/seckit": "^2.0",
"drupal/seven": "^1.0@alpha",
"drupal/simplesamlphp_auth": "^4.0@RC",
"drupal/sitewide_alert": "^2.0",
"drupal/slack": "^1.3",
Expand Down Expand Up @@ -220,7 +219,6 @@
"symfony/phpunit-bridge": "^5.1",
"symfony/process": "^6.3",
"symfony/routing": "^6.3",
"twig/twig": "3.7.0 as 3.6",
"va-gov/content-build": "^0.0.3405",
"vlucas/phpdotenv": "^5.3",
"webflo/drupal-finder": "^1.0.0",
Expand Down
108 changes: 22 additions & 86 deletions composer.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "58b8d1517a64990d5e5c614a54eabc98",
"content-hash": "5076eab84ec9f08c56247c3fc868efef",
"packages": [
{
"name": "asm89/stack-cors",
Expand Down Expand Up @@ -5450,27 +5450,30 @@
},
{
"name": "drupal/entity_diff_ui",
"version": "dev-1.0.x",
"version": "2.0.0-alpha1",
"source": {
"type": "git",
"url": "https://git.drupalcode.org/project/entity_diff_ui.git",
"reference": "2eb18091039d747fd36ab5120fe94ac1d3511212"
"reference": "2.0.0-alpha1"
},
"dist": {
"type": "zip",
"url": "https://ftp.drupal.org/files/projects/entity_diff_ui-2.0.0-alpha1.zip",
"reference": "2.0.0-alpha1",
"shasum": "ba7ce7c7f8ee03c98ee326706901274fc62b4439"
},
"require": {
"drupal/core": "^8.7.7 || ^9 || ^10",
"drupal/diff": "^1.0"
"drupal/core": "^9.3.0 || ^10",
"drupal/diff": "^1.1"
},
"type": "drupal-module",
"extra": {
"branch-alias": {
"dev-1.0.x": "1.0.x-dev"
},
"drupal": {
"version": "1.0.2+1-dev",
"datestamp": "1701893668",
"version": "2.0.0-alpha1",
"datestamp": "1701889658",
"security-coverage": {
"status": "not-covered",
"message": "Dev releases are not covered by Drupal security advisories."
"message": "Alpha releases are not covered by Drupal security advisories."
}
}
},
Expand All @@ -5488,7 +5491,7 @@
"homepage": "https://www.drupal.org/user/1096864"
}
],
"description": "Provide UI plugins of diff for entities.",
"description": "Provides the capabilities to compare the difference between entity revisions.",
"homepage": "https://www.drupal.org/project/entity_diff_ui",
"support": {
"source": "https://git.drupalcode.org/project/entity_diff_ui"
Expand Down Expand Up @@ -12037,66 +12040,6 @@
"issues": "http://drupal.org/project/issues/seckit"
}
},
{
"name": "drupal/seven",
"version": "1.0.0",
"source": {
"type": "git",
"url": "https://git.drupalcode.org/project/seven.git",
"reference": "1.0.0"
},
"dist": {
"type": "zip",
"url": "https://ftp.drupal.org/files/projects/seven-1.0.0.zip",
"reference": "1.0.0",
"shasum": "88e86926388c7e6cf66b0502d13a0470ce2399cd"
},
"require": {
"drupal/core": "^9 || ^10"
},
"type": "drupal-theme",
"extra": {
"drupal": {
"version": "1.0.0",
"datestamp": "1683652106",
"security-coverage": {
"status": "covered",
"message": "Covered by Drupal's security advisory policy"
}
}
},
"notification-url": "https://packages.drupal.org/8/downloads",
"license": [
"GPL-2.0-or-later"
],
"authors": [
{
"name": "bnjmnm",
"homepage": "https://www.drupal.org/user/2369194"
},
{
"name": "lauriii",
"homepage": "https://www.drupal.org/user/1078742"
},
{
"name": "mcrittenden",
"homepage": "https://www.drupal.org/user/420631"
},
{
"name": "mrfelton",
"homepage": "https://www.drupal.org/user/305669"
},
{
"name": "TravisCarden",
"homepage": "https://www.drupal.org/user/236758"
}
],
"description": "The Seven theme from Drupal 8/9 moved to contrib",
"homepage": "https://www.drupal.org/project/seven",
"support": {
"source": "https://git.drupalcode.org/project/seven"
}
},
{
"name": "drupal/simple_oauth",
"version": "5.2.4",
Expand Down Expand Up @@ -25814,16 +25757,16 @@
},
{
"name": "twig/twig",
"version": "v3.7.0",
"version": "v3.6.1",
"source": {
"type": "git",
"url": "https://github.com/twigphp/Twig.git",
"reference": "5cf942bbab3df42afa918caeba947f1b690af64b"
"reference": "7e7d5839d4bec168dfeef0ac66d5c5a2edbabffd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/5cf942bbab3df42afa918caeba947f1b690af64b",
"reference": "5cf942bbab3df42afa918caeba947f1b690af64b",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/7e7d5839d4bec168dfeef0ac66d5c5a2edbabffd",
"reference": "7e7d5839d4bec168dfeef0ac66d5c5a2edbabffd",
"shasum": ""
},
"require": {
Expand Down Expand Up @@ -25869,7 +25812,7 @@
],
"support": {
"issues": "https://github.com/twigphp/Twig/issues",
"source": "https://github.com/twigphp/Twig/tree/v3.7.0"
"source": "https://github.com/twigphp/Twig/tree/v3.6.1"
},
"funding": [
{
Expand All @@ -25881,7 +25824,7 @@
"type": "tidelift"
}
],
"time": "2023-07-26T07:16:09+00:00"
"time": "2023-06-08T12:52:13+00:00"
},
{
"name": "va-gov/content-build",
Expand Down Expand Up @@ -26908,12 +26851,6 @@
"version": "1.1.1.0",
"alias": "0.9.1",
"alias_normalized": "0.9.1.0"
},
{
"package": "twig/twig",
"version": "3.7.0.0",
"alias": "3.6",
"alias_normalized": "3.6.0.0"
}
],
"minimum-stability": "dev",
Expand All @@ -26927,7 +26864,7 @@
"drupal/danse_content_moderation": 10,
"drupal/entity_block": 10,
"drupal/entity_clone": 15,
"drupal/entity_diff_ui": 20,
"drupal/entity_diff_ui": 15,
"drupal/entity_field_fetch": 10,
"drupal/entity_reference_hierarchy": 10,
"drupal/entity_reference_validators": 15,
Expand All @@ -26952,7 +26889,6 @@
"drupal/pathologic": 15,
"drupal/prometheus_exporter": 10,
"drupal/schemata": 10,
"drupal/seven": 15,
"drupal/simplesamlphp_auth": 5,
"drupal/styleguide": 10,
"drupal/user_history": 15,
Expand Down
1 change: 0 additions & 1 deletion config/sync/core.extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ module:
breakpoint: 0
cer: 0
change_labels: 0
ckeditor: 0
ckeditor5: 0
ckeditor_abbreviation: 0
codit_menu_tools: 0
Expand Down
Empty file.
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class StaticEncoder implements SerializerAwareInterface, EncoderInterface {
* The string translation service.
*/
public function __construct(MessengerInterface $messenger, TranslationInterface $string_translation) {
$this->messenger = $messenger;
$this->messenger = $messenger;
$this->stringTranslation = $string_translation;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Drupal\va_gov_views\EventSubscriber;

use Drupal\Core\Form\FormStateInterface;
use Drupal\core_event_dispatcher\Event\Form\FormAlterEvent;
use Drupal\core_event_dispatcher\FormHookEvents;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
Expand All @@ -11,6 +12,15 @@
*/
class ViewsBulkOpsSubscriber implements EventSubscriberInterface {

/**
* {@inheritdoc}
*/
public static function getSubscribedEvents() {
return [
FormHookEvents::FORM_ALTER => 'formAlter',
];
}

/**
* Form alter Event call.
*
Expand All @@ -20,6 +30,18 @@ class ViewsBulkOpsSubscriber implements EventSubscriberInterface {
public function formAlter(FormAlterEvent $event): void {
$form = &$event->getForm();
$form_state = $event->getFormState();
$this->viewsFormContentPageTwoAlter($form, $form_state);
}

/**
* Alter the views form for content_page_2.
*
* @param array $form
* The form.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The form state.
*/
private function viewsFormContentPageTwoAlter(array &$form, FormStateInterface $form_state): void {
$id = $form_state->getFormObject()->getFormId();

if ($id === 'views_form_content_page_2') {
Expand All @@ -30,13 +52,4 @@ public function formAlter(FormAlterEvent $event): void {
}
}

/**
* {@inheritdoc}
*/
public static function getSubscribedEvents() {
return [
FormHookEvents::FORM_ALTER => 'formAlter',
];
}

}

This file was deleted.

6 changes: 0 additions & 6 deletions docroot/modules/custom/va_gov_views/va_gov_views.module

This file was deleted.

0 comments on commit d5516ac

Please sign in to comment.