Rename validator methods to `validate` unless there different methods for different events

Created on 15 February 2023, almost 2 years ago
Updated 21 February 2023, almost 2 years ago

Problem/Motivation

package_manager/src/Validator/PreOperationStageValidatorInterface.php has been delete

We used the name validateStagePreOperation many places because we use implement this interface

Steps to reproduce

Proposed resolution

In all validators where there is only 1 method is subscribed to 1 or more events rename that method to validate(). Usually not that method is validateStagePreOperation but not always. Replace all the {@inheritdoc} comments that are left over from when validateStagePreOperation was part of an interface

Examples

In cases like LockFileValidator where we have

PreCreateEvent::class => 'storeHash',
      PreRequireEvent::class => 'validateStagePreOperation',
      PreApplyEvent::class => 'validateStagePreOperation',
      StatusCheckEvent::class => 'validateStagePreOperation',
      PostDestroyEvent::class => 'deleteHash',

Cases like \Drupal\package_manager\Validator\StageNotInActiveValidator::checkNotInActive should also be renamed to validate()

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

Version

3.0

Component

Code

Created by

🇺🇸United States tedbow Ithaca, NY, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024