Skip to content

Conversation

@AlexSkrypnyk
Copy link
Member

@AlexSkrypnyk AlexSkrypnyk commented Jul 29, 2025

Closes #1875

Summary by CodeRabbit

  • Bug Fixes

    • Updated tests and configuration to ensure the absence of the update.php file in the Drupal webroot.
    • Removed assertions related to update.php being present or tracked in Git.
  • Chores

    • Deleted the update.php file from the webroot.
    • Updated composer configuration to exclude update.php from the Drupal scaffold process.

@coderabbitai
Copy link

coderabbitai bot commented Jul 29, 2025

Walkthrough

The changes remove the update.php file from the Drupal webroot and update related assertions, tests, and configuration to ensure this file is no longer expected or present. The composer configuration is modified to exclude update.php from the scaffold, and all test logic is updated to assert its absence.

Changes

Cohort / File(s) Change Summary
Test Helper Bash Scripts
.vortex/tests/bats/_helper.bash, .vortex/tests/bats/_helper.deployment.bash, .vortex/tests/bats/_helper.workflow.bash
Updated assertions to check that update.php does not exist or is not tracked, instead of the opposite.
PHP Test Trait
.vortex/tests/phpunit/Traits/AssertFilesTrait.php
Modified assertions to verify absence of update.php and removed checks for its Git tracking.
Composer Config
composer.json
Updated drupal-scaffold file-mapping to exclude update.php from the webroot.
Drupal Update Script
web/update.php
Deleted the update.php script from the Drupal webroot.

Sequence Diagram(s)

sequenceDiagram
    participant Composer
    participant Scaffold
    participant Webroot

    Composer->>Scaffold: Install/Update project
    Scaffold-->>Webroot: Scaffold files (excluding update.php)
    Note right of Webroot: update.php is not present
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Assessment against linked issues

Objective Addressed Explanation
Remove update.php Drupal scaffold file from the template (#1875)

Suggested labels

Confirmed

Poem

A rabbit hopped through Drupal’s gate,
Saw update.php—“That’s out of date!”
With a twitch of its nose and a whisk of its paw,
It cleared the file without a flaw.
Now the code is neat, the risk is low,
The garden’s safe, and updates still flow! 🐇✨

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 phpcs (3.7.2)
.vortex/tests/phpunit/Traits/AssertFilesTrait.php

ERROR: Referenced sniff "Drupal" does not exist

Run "phpcs --help" for usage information


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between be34a71 and f9a3ad5.

⛔ Files ignored due to path filters (6)
  • .vortex/installer/tests/Fixtures/install/_baseline/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/web/update.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/update.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/web/-.htaccess is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/web/-update.php is excluded by !.vortex/installer/tests/Fixtures/**
📒 Files selected for processing (6)
  • .vortex/tests/bats/_helper.bash (1 hunks)
  • .vortex/tests/bats/_helper.deployment.bash (1 hunks)
  • .vortex/tests/bats/_helper.workflow.bash (0 hunks)
  • .vortex/tests/phpunit/Traits/AssertFilesTrait.php (1 hunks)
  • composer.json (1 hunks)
  • web/update.php (0 hunks)
💤 Files with no reviewable changes (2)
  • .vortex/tests/bats/_helper.workflow.bash
  • web/update.php
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: CR
PR: drevops/vortex#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-28T03:30:12.283Z
Learning: Applies to {composer.json,composer.lock} : Composer dependencies should be updated automatically with compatibility checks
composer.json (2)

Learnt from: CR
PR: drevops/vortex#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-28T03:30:12.283Z
Learning: Applies to {composer.json,composer.lock} : Composer dependencies should be updated automatically with compatibility checks

Learnt from: CR
PR: drevops/vortex#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-28T03:30:12.283Z
Learning: Applies to web/themes/custom//{package.json,yarn.lock} : Node.js dependencies should be updated in theme directories (web/themes/custom/)

.vortex/tests/bats/_helper.deployment.bash (3)

Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.

Learnt from: AlexSkrypnyk
PR: #1697
File: .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docs/onboarding.md:16-17
Timestamp: 2025-06-02T00:41:36.321Z
Learning: DO NOT EVER REVIEW FILES IN .vortex/installer/tests/Fixtures/ directory - these are test fixtures and should not be reviewed under any circumstances.

Learnt from: AlexSkrypnyk
PR: #1693
File: .vortex/installer/tests/Fixtures/install/hosting_acquia/docs/deployment.md:6-8
Timestamp: 2025-06-01T08:09:18.993Z
Learning: Do not review files in test fixture directories (e.g., files under paths containing /tests/Fixtures/ or similar test fixture patterns). These files are used for testing purposes and should remain as-is.

.vortex/tests/phpunit/Traits/AssertFilesTrait.php (2)

Learnt from: AlexSkrypnyk
PR: #1693
File: .vortex/installer/tests/Fixtures/install/hosting_acquia/docs/deployment.md:6-8
Timestamp: 2025-06-01T08:09:18.993Z
Learning: Do not review files in test fixture directories (e.g., files under paths containing /tests/Fixtures/ or similar test fixture patterns). These files are used for testing purposes and should remain as-is.

Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.

.vortex/tests/bats/_helper.bash (3)

Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.

Learnt from: AlexSkrypnyk
PR: #1697
File: .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docs/onboarding.md:16-17
Timestamp: 2025-06-02T00:41:36.321Z
Learning: DO NOT EVER REVIEW FILES IN .vortex/installer/tests/Fixtures/ directory - these are test fixtures and should not be reviewed under any circumstances.

Learnt from: AlexSkrypnyk
PR: #1693
File: .vortex/installer/tests/Fixtures/install/hosting_acquia/docs/deployment.md:6-8
Timestamp: 2025-06-01T08:09:18.993Z
Learning: Do not review files in test fixture directories (e.g., files under paths containing /tests/Fixtures/ or similar test fixture patterns). These files are used for testing purposes and should remain as-is.

🔇 Additional comments (4)
composer.json (1)

110-110: LGTM! Correctly excludes update.php from Drupal scaffold.

The change properly excludes update.php from the Drupal scaffold file mapping, which is the standard approach to prevent Drupal core from creating or maintaining this file. This aligns with the security objective of removing the UI update functionality.

.vortex/tests/bats/_helper.deployment.bash (1)

65-65: LGTM! Correctly updates deployment test assertion.

The assertion has been properly updated to expect that update.php does not exist in deployment artifacts, which is consistent with removing it from the Drupal scaffold configuration.

.vortex/tests/phpunit/Traits/AssertFilesTrait.php (1)

267-267: LGTM! Correctly updates PHPUnit assertion.

The assertion has been properly updated to use assertFileDoesNotExist for update.php, which correctly reflects the expectation that this file should not be present in the Drupal webroot after the scaffold changes.

.vortex/tests/bats/_helper.bash (1)

510-510: LGTM! Maintains test consistency across the suite.

The assertion has been correctly updated to expect that update.php does not exist, which maintains consistency with the changes in other test files and the composer.json scaffold configuration.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/1875-remove-update-php

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot temporarily deployed to commit July 29, 2025 05:42 Inactive
@codecov
Copy link

codecov bot commented Jul 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.79%. Comparing base (be34a71) to head (f9a3ad5).
⚠️ Report is 2 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1876      +/-   ##
===========================================
- Coverage    74.80%   74.79%   -0.01%     
===========================================
  Files           85       85              
  Lines         4925     4924       -1     
  Branches        35       35              
===========================================
- Hits          3684     3683       -1     
  Misses        1241     1241              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@AlexSkrypnyk
Copy link
Member Author

@coderabbitai full review

@coderabbitai
Copy link

coderabbitai bot commented Jul 29, 2025

✅ Actions performed

Full review triggered.

@AlexSkrypnyk AlexSkrypnyk merged commit 691a368 into develop Jul 29, 2025
44 of 46 checks passed
@AlexSkrypnyk AlexSkrypnyk deleted the feature/1875-remove-update-php branch July 29, 2025 06:55
@github-project-automation github-project-automation bot moved this from BACKLOG to Release queue in Vortex Jul 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Remove update.php Drupal scaffold file from the template.

2 participants