- Issue created by @granik
- ๐ฎ๐ณIndia vishal.kadam Mumbai
Thank you for applying! Reviewers will review the project files, describing what needs to be changed.
Please read Review process for security advisory coverage: What to expect โ for more details and Security advisory coverage application checklist โ to understand what reviewers look for. Tips for ensuring a smooth review gives some hints for a smoother review.
To reviewers: Please read How to review security advisory coverage applications โ , What to cover in an application review โ , and Drupal.org security advisory coverage application workflow โ .
While this application is open, only the user who opened the application can make commits to the project used for the application.
Reviewers only describe what needs to be changed; they don't provide patches to fix what reported in a review.
- Status changed to Needs work
almost 2 years ago 5:34pm 6 April 2023 - ๐ฎ๐ณIndia vishal.kadam Mumbai
1. Fix PHPCS issues.
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml file_rename/ FILE: file_rename/file_rename.module ---------------------------------------------------------------------- FOUND 2 ERRORS AFFECTING 1 LINE ---------------------------------------------------------------------- 172 | ERROR | Type hint "array" missing for $element 172 | ERROR | Type hint "array" missing for $form ---------------------------------------------------------------------- FILE: file_rename/README.md ---------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ---------------------------------------------------------------------- 47 | WARNING | Line exceeds 80 characters; contains 127 characters ---------------------------------------------------------------------- FILE: file_rename/src/Form/SettingsForm.php --------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE --------------------------------------------------------------------------- 8 | ERROR | Missing short description in doc comment ---------------------------------------------------------------------------
2. FILE: file_rename.info.yml
core_version_requirement: ^8 || ^9 || ^10
The Drupal Core versions before 8.7.7 do not recognize the core_version_requirement: key.
- ๐ฆ๐นAustria granik Vienna
@vishal.kadam Thanks for your review! I updated the repo, see the last commit please.
- Status changed to Needs review
almost 2 years ago 10:06pm 6 April 2023 - ๐ฎ๐ณIndia vishal.kadam Mumbai
@granik,
I have reviewed the changes, and they look fine to me.
Letโs wait for other reviewers to take a look and if everything goes fine, you will get the role.
Thanks
- ๐ฆ๐นAustria granik Vienna
@klausi, I think your suggestions are quite right. I've just pushed to repo, now the event is dispatched on form validation.
See my commit: https://git.drupalcode.org/project/file_rename/-/commit/13893901cac95bbf...
Thanks for your review! - Status changed to Needs work
over 1 year ago 4:09pm 27 April 2023 - ๐ช๐ธSpain alvar0hurtad0 Cรกceres
Hi,
According to EntityFormInterface, the save entity should return an integer value:
* @return int * Either SAVED_NEW or SAVED_UPDATED, depending on the operation performed. */ public function save(array $form, FormStateInterface $form_state);
but in
Form\FileRenameForm
, save() method returns also NULL:public function save(array $form, FormStateInterface $form_state) { $pathinfo = pathinfo($this->entity->getFileUri()); $filename_new = $form_state->getValue('new_filename') . '.' . $pathinfo['extension']; if ($filename_new != $this->entity->getFilename()) { $filepath_new = str_replace($this->entity->getFilename(), $filename_new, $this->entity->getFileUri()); // Invoke pre-rename hooks. $this->moduleHandler->invokeAll('file_prerename', [$this->entity]); // Rename existing file. $this->fileSystem->move($this->entity->getFileUri(), $filepath_new, FileSystemInterface::EXISTS_REPLACE); $log_args = [ '%old' => $this->entity->getFilename(), '%new' => $filename_new, ]; // Update file entity. $this->entity->setFilename($filename_new); $this->entity->setFileUri($filepath_new); $status = $this->entity->save(); // Notify and log. $this->messenger()->addStatus($this->t('File %old was renamed to %new', $log_args)); $this->logger('file_entity')->info($this->t('File %old renamed to %new'), $log_args); // Invoke hooks if there are some. $this->moduleHandler->invokeAll('file_rename', [$this->entity]); return $status; } return NULL; }
- Status changed to Needs review
over 1 year ago 4:25pm 27 April 2023 - ๐ฆ๐นAustria granik Vienna
@alvar0hurtad0, nice catch, thanks! I removed this return statement as it's not needed at all here. Just checked with codesniffer and there are still no warnings.
https://git.drupalcode.org/project/file_rename/-/commit/80cc232e6236c8ff...
- Status changed to RTBC
over 1 year ago 5:34pm 27 April 2023 - ๐ฎ๐นItaly apaderno Brescia, ๐ฎ๐น
Thank you for your contribution! I am going to update your account.
These are some recommended readings to help with excellent maintainership:
- Dries โ ' post on Responsible maintainers
- Best practices for creating and maintaining projects โ
- Maintaining a drupal.org project with Git โ
- Commit messages - providing history and credit โ
- Release naming conventions โ .
- Helping maintainers in the issue queues โ
You can find more contributors chatting on the Slack โ #contribute channel. So, come hang out and stay involved โ .
Thank you, also, for your patience with the review process.
Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review โ . I encourage you to learn more about that process and join the group of reviewers.I thank all the reviewers.
- Assigned to apaderno
- Status changed to Fixed
over 1 year ago 6:01pm 27 April 2023 - ๐ฆ๐นAustria klausi ๐ฆ๐น Vienna
Congrats granik, happy to see this one approved!
Automatically closed - issue fixed for 2 weeks with no activity.