Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VACMS-136900: implement text field migration core logic #16227

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

ndouglas
Copy link
Contributor

@ndouglas ndouglas commented Nov 28, 2023

Description

Closes #13699.

@va-cms-bot va-cms-bot temporarily deployed to Tugboat November 28, 2023 18:02 Destroyed
@github-actions github-actions bot changed the title Vacms 136900 implement text field migration core logic VACMS-136900: implement text field migration core logic Nov 28, 2023
Copy link

GitHub Workflows (.github/workflows/*.yml)

Have you...

  • pinned all affected GitHub Actions at a specific commit by SHA?
  • reviewed the source code of the action at the commit you are pinning?
  • confirmed that no GitHub security measures are being bypassed?
  • checked for any injection of user content into protected contexts?
  • reviewed Security hardening for GitHub Actions?
  • reviewed GitHub Workflows?

@va-cms-bot va-cms-bot temporarily deployed to Tugboat November 28, 2023 18:03 Destroyed
string $entityType,
string $fieldName
) {
$this->reporter = $reporter;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[PHPStan] reported by reviewdog 🐶
Access to an undefined property Drupal\va_gov_live_field_migration\Migrator\MigratorBase::$reporter.

* {@inheritDoc}
*/
protected function getReporter(): ReporterInterface {
return $this->reporter;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[PHPStan] reported by reviewdog 🐶
Access to an undefined property Drupal\va_gov_live_field_migration\Migrator\MigratorBase::$reporter.

public function run() {
$this->verifyField($this->getSourceType());
$this->backupFieldTables();
$this->fieldConfigs = [];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[PHPStan] reported by reviewdog 🐶
Access to an undefined property Drupal\va_gov_live_field_migration\Migrator\MigratorBase::$fieldConfigs.

$this->verifyField($this->getSourceType());
$this->backupFieldTables();
$this->fieldConfigs = [];
$this->formDisplayConfigs = [];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[PHPStan] reported by reviewdog 🐶
Access to an undefined property Drupal\va_gov_live_field_migration\Migrator\MigratorBase::$formDisplayConfigs.

$this->backupFieldTables();
$this->fieldConfigs = [];
$this->formDisplayConfigs = [];
$this->viewDisplayConfigs = [];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[PHPStan] reported by reviewdog 🐶
Access to an undefined property Drupal\va_gov_live_field_migration\Migrator\MigratorBase::$viewDisplayConfigs.

* The bundle.
*/
public function updateViewDisplayConfig(string $bundle): void {
$this->reporter->reportInfo("Updating view display config for field {$this->fieldName} on bundle {$bundle}...");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[PHPStan] reported by reviewdog 🐶
Access to an undefined property Drupal\va_gov_live_field_migration\Migrator\MigratorBase::$reporter.

* The config.
*/
public function updateViewDisplayConfigForMode(string $bundle, string $viewMode, array $config): void {
$this->reporter->reportInfo("Updating view display config for field {$this->fieldName} on bundle {$bundle} for view mode {$viewMode}...");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[PHPStan] reported by reviewdog 🐶
Access to an undefined property Drupal\va_gov_live_field_migration\Migrator\MigratorBase::$reporter.

* {@inheritDoc}
*/
public function runMigration(string $entityType, string $fieldName) : void {
$migrator = $this->migrationFactory->getTextToStringLongMigrator($entityType, $fieldName);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[PHPStan] reported by reviewdog 🐶
Access to an undefined property Drupal\va_gov_live_field_migration\Plugin\Migration\TextToStringLong::$migrationFactory.

* {@inheritDoc}
*/
public function rollbackMigration(string $entityType, string $fieldName) : void {
$migrator = $this->migrationFactory->getTextToStringLongMigrator($entityType, $fieldName);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[PHPStan] reported by reviewdog 🐶
Access to an undefined property Drupal\va_gov_live_field_migration\Plugin\Migration\TextToStringLong::$migrationFactory.

* {@inheritDoc}
*/
public function verifyMigration(string $entityType, string $fieldName) : void {
$migrator = $this->migrationFactory->getTextToStringLongMigrator($entityType, $fieldName);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[PHPStan] reported by reviewdog 🐶
Access to an undefined property Drupal\va_gov_live_field_migration\Plugin\Migration\TextToStringLong::$migrationFactory.

* {@inheritDoc}
*/
public function runMigration(string $entityType, string $fieldName) : void {
$migrator = $this->migrationFactory->getTextToStringLongMigrator($entityType, $fieldName);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[PHPStan] reported by reviewdog 🐶
Access to an undefined property Drupal\va_gov_live_field_migration\Plugin\Migration\TextToStringLong::$migrationFactory.

* {@inheritDoc}
*/
public function rollbackMigration(string $entityType, string $fieldName) : void {
$migrator = $this->migrationFactory->getTextToStringLongMigrator($entityType, $fieldName);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[PHPStan] reported by reviewdog 🐶
Access to an undefined property Drupal\va_gov_live_field_migration\Plugin\Migration\TextToStringLong::$migrationFactory.

* {@inheritDoc}
*/
public function verifyMigration(string $entityType, string $fieldName) : void {
$migrator = $this->migrationFactory->getTextToStringLongMigrator($entityType, $fieldName);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[PHPStan] reported by reviewdog 🐶
Access to an undefined property Drupal\va_gov_live_field_migration\Plugin\Migration\TextToStringLong::$migrationFactory.

@va-cms-bot va-cms-bot temporarily deployed to Tugboat November 29, 2023 23:28 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat December 9, 2023 16:42 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat January 29, 2025 22:51 Destroyed
Copy link

Checking composer.lock changes...

string $entityType,
string $fieldName,
string $migrationId,
string $status = NULL

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [PHP_CodeSniffer] <SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue.NullabilityTypeMissing> reported by reviewdog 🐶
Parameter $status has null default value, but is not marked as nullable.

string $entityType,
string $fieldName,
string $migrationId,
string $status = NULL

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [PHP_CodeSniffer] <Drupal.Functions.MultiLineFunctionDeclaration.MissingTrailingComma> reported by reviewdog 🐶
Multi-line function declarations must have a trailing comma after the last parameter

FieldProviderResolverInterface $fieldProviderResolver,
MigrationResolverInterface $migrationResolver,
ReporterInterface $reporter,
StateInterface $state

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [PHP_CodeSniffer] <Drupal.Functions.MultiLineFunctionDeclaration.MissingTrailingComma> reported by reviewdog 🐶
Multi-line function declarations must have a trailing comma after the last parameter

$plugin_definition,
TranslationInterface $stringTranslation,
ReporterInterface $reporter,
FactoryInterface $migratorFactory

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [PHP_CodeSniffer] <Drupal.Functions.MultiLineFunctionDeclaration.MissingTrailingComma> reported by reviewdog 🐶
Multi-line function declarations must have a trailing comma after the last parameter

ContainerInterface $container,
array $configuration,
$plugin_id,
$plugin_definition

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [PHP_CodeSniffer] <Drupal.Functions.MultiLineFunctionDeclaration.MissingTrailingComma> reported by reviewdog 🐶
Multi-line function declarations must have a trailing comma after the last parameter

* The database connection.
*/
public function __construct(
Connection $connection

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [PHP_CodeSniffer] <Drupal.Functions.MultiLineFunctionDeclaration.MissingTrailingComma> reported by reviewdog 🐶
Multi-line function declarations must have a trailing comma after the last parameter

$plugin_id,
$plugin_definition,
TranslationInterface $stringTranslation,
EntityFieldManagerInterface $entityFieldManager

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [PHP_CodeSniffer] <Drupal.Functions.MultiLineFunctionDeclaration.MissingTrailingComma> reported by reviewdog 🐶
Multi-line function declarations must have a trailing comma after the last parameter

ContainerInterface $container,
array $configuration,
$plugin_id,
$plugin_definition

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [PHP_CodeSniffer] <Drupal.Functions.MultiLineFunctionDeclaration.MissingTrailingComma> reported by reviewdog 🐶
Multi-line function declarations must have a trailing comma after the last parameter

/**
* {@inheritDoc}
*/
public function getFields(string $entityType, string $bundle = NULL) : array {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [PHP_CodeSniffer] <SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue.NullabilityTypeMissing> reported by reviewdog 🐶
Parameter $bundle has null default value, but is not marked as nullable.

/**
* {@inheritDoc}
*/
public function getFields(string $entityType, string $bundle = NULL) : array {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [PHP_CodeSniffer] <SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue.NullabilityTypeMissing> reported by reviewdog 🐶
Parameter $bundle has null default value, but is not marked as nullable.

string $entityType,
string $fieldName
) {
$this->reporter = $reporter;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[PHPStan] reported by reviewdog 🐶
Access to an undefined property Drupal\va_gov_live_field_migration\Migrator\MigratorBase::$reporter.

* {@inheritDoc}
*/
protected function getReporter(): ReporterInterface {
return $this->reporter;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[PHPStan] reported by reviewdog 🐶
Access to an undefined property Drupal\va_gov_live_field_migration\Migrator\MigratorBase::$reporter.

public function run() {
$this->verifyField($this->getSourceType());
$this->backupFieldTables();
$this->fieldConfigs = [];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[PHPStan] reported by reviewdog 🐶
Access to an undefined property Drupal\va_gov_live_field_migration\Migrator\MigratorBase::$fieldConfigs.

$this->verifyField($this->getSourceType());
$this->backupFieldTables();
$this->fieldConfigs = [];
$this->formDisplayConfigs = [];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[PHPStan] reported by reviewdog 🐶
Access to an undefined property Drupal\va_gov_live_field_migration\Migrator\MigratorBase::$formDisplayConfigs.

$this->backupFieldTables();
$this->fieldConfigs = [];
$this->formDisplayConfigs = [];
$this->viewDisplayConfigs = [];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[PHPStan] reported by reviewdog 🐶
Access to an undefined property Drupal\va_gov_live_field_migration\Migrator\MigratorBase::$viewDisplayConfigs.

* The config.
*/
public function updateViewDisplayConfigForMode(string $bundle, string $viewMode, array $config): void {
$this->reporter->reportInfo("Updating view display config for field {$this->fieldName} on bundle {$bundle} for view mode {$viewMode}...");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[PHPStan] reported by reviewdog 🐶
Access to an undefined property Drupal\va_gov_live_field_migration\Migrator\MigratorBase::$reporter.

* {@inheritDoc}
*/
public function runMigration(string $entityType, string $fieldName) : void {
$migrator = $this->migrationFactory->getTextToStringLongMigrator($entityType, $fieldName);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[PHPStan] reported by reviewdog 🐶
Access to an undefined property Drupal\va_gov_live_field_migration\Plugin\Migration\TextToStringLong::$migrationFactory.

* {@inheritDoc}
*/
public function rollbackMigration(string $entityType, string $fieldName) : void {
$migrator = $this->migrationFactory->getTextToStringLongMigrator($entityType, $fieldName);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[PHPStan] reported by reviewdog 🐶
Access to an undefined property Drupal\va_gov_live_field_migration\Plugin\Migration\TextToStringLong::$migrationFactory.

* {@inheritDoc}
*/
public function verifyMigration(string $entityType, string $fieldName) : void {
$migrator = $this->migrationFactory->getTextToStringLongMigrator($entityType, $fieldName);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[PHPStan] reported by reviewdog 🐶
Access to an undefined property Drupal\va_gov_live_field_migration\Plugin\Migration\TextToStringLong::$migrationFactory.

// When we are on Drupal 10.0.0, we can use the following:
// Error::logException($this->logger, $exception);
// Until then, we have to do this:
watchdog_exception('va_gov_live_field_migration', $exception);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[PHPStan] reported by reviewdog 🐶
Call to deprecated function watchdog_exception():

@va-cms-bot va-cms-bot temporarily deployed to Tugboat January 30, 2025 08:48 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat January 31, 2025 08:48 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 1, 2025 08:42 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 2, 2025 08:42 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 3, 2025 08:46 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 4, 2025 08:34 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 5, 2025 08:35 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 6, 2025 08:38 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 7, 2025 08:35 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 8, 2025 08:34 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 9, 2025 08:39 Destroyed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement epic text-field migration core logic.
3 participants