Problem/Motivation

  • Refactor to use static closure
CommentFileSizeAuthor
#14 3356158-14.patch970 bytesyas

Issue fork cloud-3356158

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

yas created an issue. See original summary.

yas’s picture

Status: Needs work » Needs review

@baldwinlouie, @xiaohua-guan, @masami, @sekinet

Can you please review the patch? Thanks!

sekinet’s picture

@yas

It looks good to me. Thanks.

baldwinlouie’s picture

@yas, Thank you for the patch. It looks good to me.

xiaohua guan’s picture

@yas

Thanks for the patch. It looks good to me.

masami’s picture

Status: Needs review » Reviewed & tested by the community

The patch looks good to me, so I change the status to RTBC.

yas’s picture

@sekinet @baldwinlouie @xiaohua-guan @masami

Thank you for your review. I'll merge the patch to 4.x, 5.x and 6.x, and close this issue as Fixed.

  • yas committed 79bcdb0c on 6.x
    Issue #3356158 by yas, sekinet, baldwinlouie, Xiaohua Guan, Masami:...

  • yas committed df745f12 on 5.x
    Issue #3356158 by yas, sekinet, baldwinlouie, Xiaohua Guan, Masami:...

  • yas committed 9b71aa27 on 4.x
    Issue #3356158 by yas, sekinet, baldwinlouie, Xiaohua Guan, Masami:...
yas’s picture

Status: Reviewed & tested by the community » Fixed
yas’s picture

Status: Fixed » Needs work

We need to fix the following error:

Error: Using $this when not in object context in Drupal\aws_cloud\Plugin\Block\LowUtilizationInstancesBlock::Drupal\aws_cloud\Plugin\Block\{closure}() (line 217 of /var/www/cloud_orchestrator/docroot/modules/contrib/cloud/modules/cloud_service_providers/aws_cloud/src/Plugin/Block/LowUtilizationInstancesBlock.php)
#0 [internal function]: Drupal\aws_cloud\Plugin\Block\LowUtilizationInstancesBlock::Drupal\aws_cloud\Plugin\Block\{closure}(Object(Drupal\aws_cloud\Entity\Ec2\Instance))
#1 /var/www/cloud_orchestrator/docroot/modules/contrib/cloud/modules/cloud_service_providers/aws_cloud/src/Plugin/Block/LowUtilizationInstancesBlock.php(216): array_map(Object(Closure), Array)
#2 /var/www/cloud_orchestrator/docroot/modules/contrib/cloud/modules/cloud_service_providers/aws_cloud/src/Plugin/Block/LowUtilizationInstancesBlock.php(191): Drupal\aws_cloud\Plugin\Block\LowUtilizationInstancesBlock->buildInstanceList()
#3 /var/www/cloud_orchestrator/docroot/profiles/contrib/cloud_orchestrator/src/Controller/DashboardController.php(263): Drupal\aws_cloud\Plugin\Block\LowUtilizationInstancesBlock->build()
#4 /var/www/cloud_orchestrator/docroot/profiles/contrib/cloud_orchestrator/src/Controller/DashboardController.php(165): Drupal\cloud_orchestrator\Controller\DashboardController->getBlock('aws_cloud_low_u...', Array)
#5 /var/www/cloud_orchestrator/docroot/profiles/contrib/cloud_orchestrator/src/Controller/DashboardController.php(54): Drupal\cloud_orchestrator\Controller\DashboardController->getAwsBlocks()
#6 [internal function]: Drupal\cloud_orchestrator\Controller\DashboardController->getDashboard()
yas’s picture

Status: Needs work » Needs review
StatusFileSize
new970 bytes

This is the hotfix.

yas’s picture

Status: Needs review » Reviewed & tested by the community

@all The tests have been passed successfully, so I'll merge the patch to 4.x, 5.x and 6.x, and close this issue as Fixed.

  • yas committed bc4fc1ed on 5.x
    Issue #3356158 by yas: Hotfix - Refactor to use static closure (2)
    

  • yas committed be3016f2 on 6.x
    Issue #3356158 by yas: Hotfix - Refactor to use static closure (2)
    

  • yas committed bee470d0 on 4.x
    Issue #3356158 by yas: Hotfix - Refactor to use static closure (2)
    
yas’s picture

Status: Reviewed & tested by the community » Fixed
yas’s picture

Issue tags: +chatgpt

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.