Skip to content

2.7.1 updates#82

Merged
mambax7 merged 2 commits into
XOOPS:masterfrom
mambax7:feature/start_version_update_2.7.1
May 30, 2026
Merged

2.7.1 updates#82
mambax7 merged 2 commits into
XOOPS:masterfrom
mambax7:feature/start_version_update_2.7.1

Conversation

@mambax7
Copy link
Copy Markdown
Contributor

@mambax7 mambax7 commented May 29, 2026

Summary by Sourcery

Update language constants and version metadata for the 2.7.1 beta release.

Bug Fixes:

  • Align block cloning validation to use the correct INVALID_CLONE language constant instead of the deprecated name.
  • Ensure Debugbar logger loads its language file before normalizing Smarty data.

Enhancements:

  • Bump core XOOPS version string to 2.7.1-Beta1.

Summary by CodeRabbit

  • New Features

    • Updated to version 2.7.1-Beta1
  • Bug Fixes

    • Corrected block cloning validation message constant naming in the system blocks admin module
  • Tests

    • Updated test bootstrap to dynamically load version from configuration
    • Relaxed version assertion to support patch-level updates

Review Change Stack

Copilot AI review requested due to automatic review settings May 29, 2026 08:13
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented May 29, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Aligns block clone validation with a renamed language constant, ensures Debugbar logger loads language strings before processing Smarty data, and updates the core version to 2.7.1-Beta1.

Sequence diagram for DebugbarLogger addSmarty language loading

sequenceDiagram
    actor Admin
    participant DebugbarLogger
    participant Helper

    Admin->>DebugbarLogger: addSmarty()
    DebugbarLogger->>Helper: getInstance()
    Helper-->>DebugbarLogger: helper
    DebugbarLogger->>Helper: loadLanguage(main)
    DebugbarLogger->>DebugbarLogger: [normalize data for display]
Loading

File-Level Changes

Change Details Files
Align block clone validation with renamed language constant
  • Replaced uses of the old invalid-clone message constant in blocksadmin with the new constant name
  • Updated the English admin language file to define the new constant instead of the old one
htdocs/modules/system/admin/blocksadmin/main.php
htdocs/modules/system/language/english/admin/blocksadmin.php
Ensure Debugbar logger has language context when adding Smarty data
  • Obtained Debugbar module helper instance in addSmarty
  • Loaded the module's main language file before normalizing and logging Smarty data
htdocs/modules/debugbar/class/DebugbarLogger.php
Bump framework version identifier for 2.7.1 beta release
  • Changed XOOPS_VERSION constant from 2.7.0 to 2.7.1-Beta1
htdocs/include/version.php

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 29, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 81ed00b9-48a2-43b5-9f20-fdc57b0f4bf2

📥 Commits

Reviewing files that changed from the base of the PR and between 7ebca3b and f8838e4.

📒 Files selected for processing (2)
  • tests/bootstrap.php
  • tests/unit/htdocs/include/VersionTest.php

Walkthrough

This PR prepares the 2.7.1-Beta1 release by bumping the kernel version constant, standardizing block admin language constant naming with an underscore prefix, synchronizing test bootstrap and assertions to track the shipped version, initializing language context in Debugbar, and documenting changelog entries.

Changes

Release 2.7.1-Beta1 Preparation

Layer / File(s) Summary
Version bump and test infrastructure alignment
htdocs/include/version.php, tests/bootstrap.php, tests/unit/htdocs/include/VersionTest.php
XOOPS_VERSION is bumped to 2.7.1-Beta1. Test bootstrap now requires the shipped version.php instead of duplicating the constant, eliminating hard-coded version strings. Version test assertion is relaxed to validate only the XOOPS 2.7. major/minor prefix, allowing patch and pre-release variants within the line.
Block admin language constant standardization
htdocs/modules/system/language/english/admin/blocksadmin.php, htdocs/modules/system/admin/blocksadmin/main.php
Language constant is renamed from _AM_SYSTEM_BLOCKS_INVALIDCLONE to _AM_SYSTEM_BLOCKS_INVALID_CLONE to follow underscore-prefix naming convention. All three validation error redirects in blocksadmin (invalid $clone_dirname, invalid $clone_func_file/$clone_template, invalid $clone_show_func/$clone_edit_func) are updated to use the new constant name.
Debugbar Smarty template variable language initialization
htdocs/modules/debugbar/class/DebugbarLogger.php
The addSmarty() method now initializes the XOOPS Helper singleton and loads the main language before normalizing Smarty template variables for display. This ensures proper language context during debug variable collection.
Release documentation and changelog
docs/lang_diff.txt
A new 2026/05/17: Version 2.7.1-Betas section is added to document the block admin constant rename. Prior 2025/03/30: Version 2.7.0-Betas section entries for install-time language constants remain listed for version history tracking.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • XOOPS/XoopsCore27#32: Both PRs change htdocs/include/version.php by updating the XOOPS_VERSION constant to a different 2.7.x pre-release string.
  • XOOPS/XoopsCore27#54: Both PRs touch the shared htdocs/include/version.php by changing the XOOPS_VERSION constant value (main PR bumps to 2.7.1-Beta1, retrieved PR adjusts toward/within the 2.7.0 line).
  • XOOPS/XoopsCore27#5: Both PRs modify the same test coverage around XOOPS_VERSION in tests/unit/htdocs/include/VersionTest.php by adjusting testXoopsVersionValue expectations to align with the 2.7.x version line.
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title "2.7.1 updates" is vague and generic, using non-descriptive language that doesn't clearly convey the specific nature of the changes (version bump, language constant rename, and bug fixes). Consider a more specific title like "Bump to 2.7.1-Beta1 and fix block cloning validation constant" to better describe the primary changes and intent.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • Renaming _AM_SYSTEM_BLOCKS_INVALIDCLONE to _AM_SYSTEM_BLOCKS_INVALID_CLONE only in the English language file and a few call sites may leave other locales or modules still using the old key; consider grepping for the old constant name across the project and updating all remaining references for consistency.
  • Helper::getInstance()->loadLanguage('main') in DebugbarLogger::addSmarty() will now run on every call; if this method is invoked frequently, consider caching the fact that the language has been loaded (or moving the call to a one-time initialization path) to avoid repeated work.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Renaming `_AM_SYSTEM_BLOCKS_INVALIDCLONE` to `_AM_SYSTEM_BLOCKS_INVALID_CLONE` only in the English language file and a few call sites may leave other locales or modules still using the old key; consider grepping for the old constant name across the project and updating all remaining references for consistency.
- `Helper::getInstance()->loadLanguage('main')` in `DebugbarLogger::addSmarty()` will now run on every call; if this method is invoked frequently, consider caching the fact that the language has been loaded (or moving the call to a one-time initialization path) to avoid repeated work.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 29, 2026

Codecov Report

❌ Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 18.19%. Comparing base (62d52ff) to head (f8838e4).
⚠️ Report is 9 commits behind head on master.

Files with missing lines Patch % Lines
htdocs/modules/system/admin/blocksadmin/main.php 0.00% 3 Missing ⚠️
htdocs/include/version.php 0.00% 1 Missing ⚠️
...ules/system/language/english/admin/blocksadmin.php 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master      #82      +/-   ##
============================================
+ Coverage     18.13%   18.19%   +0.05%     
- Complexity     7854     7861       +7     
============================================
  Files           666      667       +1     
  Lines         43208    43259      +51     
============================================
+ Hits           7837     7872      +35     
- Misses        35371    35387      +16     

☔ 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.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the XOOPS version to 2.7.1-Beta1, renames the language constant _AM_SYSTEM_BLOCKS_INVALIDCLONE to _AM_SYSTEM_BLOCKS_INVALID_CLONE across the codebase and documentation, and ensures the 'main' language file is loaded in the DebugbarLogger. There are no review comments, so I have no feedback to provide.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Small maintenance PR preparing the 2.7.1-Beta1 release: bumps the core version string, fixes a constant-name mismatch between the blocksadmin language file and its three clone-validation redirects, and ensures Debugbar's logger loads its language file before consuming _MD_DEBUGBAR_* constants in addSmarty(). Also updates the language-diff doc to record the renamed constant under a new 2.7.1-Betas section.

Changes:

  • Rename _AM_SYSTEM_BLOCKS_INVALIDCLONE_AM_SYSTEM_BLOCKS_INVALID_CLONE in the language file and update the three redirect_header() call sites in blocksadmin clone validation.
  • Load the Debugbar main language file at the top of DebugbarLogger::addSmarty() so the display constants are guaranteed to be defined.
  • Bump XOOPS_VERSION to XOOPS 2.7.1-Beta1 and document the language-string move in docs/lang_diff.txt.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
htdocs/modules/system/language/english/admin/blocksadmin.php Renames constant to _AM_SYSTEM_BLOCKS_INVALID_CLONE.
htdocs/modules/system/admin/blocksadmin/main.php Updates the three clone-validation redirects to the renamed constant.
htdocs/modules/debugbar/class/DebugbarLogger.php Loads debugbar main language file before normalizing Smarty values.
htdocs/include/version.php Bumps XOOPS_VERSION to XOOPS 2.7.1-Beta1.
docs/lang_diff.txt Adds 2.7.1-Betas section documenting the renamed language constant.

* Define XOOPS version
*/
define('XOOPS_VERSION', 'XOOPS 2.7.0');
define('XOOPS_VERSION', 'XOOPS 2.7.1-Beta1');
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 8 changed files in this pull request and generated no new comments.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/lang_diff.txt`:
- Line 7: Update the release label string in the changelog entry currently
reading "Version 2.7.1-Betas" to match the shipped version "Version
2.7.1-Beta1"; locate the text "Version 2.7.1-Betas" in docs/lang_diff.txt and
replace it with "Version 2.7.1-Beta1" to ensure the release label matches the
actual release tag.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: f999fccd-105e-4ac9-9d8b-938ee512a5a4

📥 Commits

Reviewing files that changed from the base of the PR and between b65dfb6 and 7ebca3b.

📒 Files selected for processing (8)
  • .gitignore
  • docs/lang_diff.txt
  • htdocs/include/version.php
  • htdocs/modules/debugbar/class/DebugbarLogger.php
  • htdocs/modules/system/admin/blocksadmin/main.php
  • htdocs/modules/system/language/english/admin/blocksadmin.php
  • tests/bootstrap.php
  • tests/unit/htdocs/include/VersionTest.php

Comment thread docs/lang_diff.txt
Below are language differences from a version to next version.

================================
2026/05/17: Version 2.7.1-Betas
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Align release label with the shipped version string.

Version 2.7.1-Betas is inconsistent with the actual release target (2.7.1-Beta1), which can cause changelog ambiguity.

Suggested doc fix
-2026/05/17: Version 2.7.1-Betas
+2026/05/17: Version 2.7.1-Beta1
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
2026/05/17: Version 2.7.1-Betas
2026/05/17: Version 2.7.1-Beta1
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/lang_diff.txt` at line 7, Update the release label string in the
changelog entry currently reading "Version 2.7.1-Betas" to match the shipped
version "Version 2.7.1-Beta1"; locate the text "Version 2.7.1-Betas" in
docs/lang_diff.txt and replace it with "Version 2.7.1-Beta1" to ensure the
release label matches the actual release tag.

…rs the real value

  bootstrap.php hardcoded 'XOOPS 2.7.0-RC1', shadowing version.php's
  unconditional define(). VersionTest therefore validated the stale fixture
  instead of the file, leaving the 2.7.1-Beta1 bump untested (0% patch
  coverage on version.php). Load the real version.php in the bootstrap and
  relax the exact-version assertion to the 2.7. line so future patch and
  pre-release bumps within the line don't churn the test.

  Two optional follow-ups still open from the review, neither blocking:
  - docs/lang_diff.txt could record the constant change as a rename rather than a delete-from-2.7.0 + add-to-2.7.1 (cosmetic, since no 2.7.0 stable
  shipped).
  - The Debugbar 3 lines remain uncoverable by Codecov because htdocs/modules/debugbar isn't in the <source> include in tests/phpunit.xml.dist — expected,
  not something this PR needs to fix.
@mambax7 mambax7 force-pushed the feature/start_version_update_2.7.1 branch from 7ebca3b to f8838e4 Compare May 30, 2026 01:55
@mambax7 mambax7 requested a review from Copilot May 30, 2026 01:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.

@mambax7 mambax7 merged commit 393ee18 into XOOPS:master May 30, 2026
11 of 12 checks passed
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.

2 participants