PR-6.2-dev Pending

User tests: Successful: Unsuccessful:

avatar Mahesh-Gite-28
Mahesh-Gite-28
19 May 2026
  • I read the Generative AI policy and my contribution
    is either not created with the help of AI or is compatible with the policy and GNU/GPL 2 or later.

Summary of Changes

Added an explicit return type hint to the getRowOffset() public method in libraries/src/Pagination/Pagination.php.

Updated method:

  • getRowOffset(): int

This improves type safety and aligns with Joomla's PHP 8 modernization efforts.

Testing Instructions

  1. Open libraries/src/Pagination/Pagination.php
  2. Verify that getRowOffset() now declares an explicit int return type
  3. Confirm that no method logic or behavior was modified
  4. Verify all CI checks pass successfully

Actual result BEFORE applying this Pull Request

getRowOffset() did not declare an explicit return type.

Expected result AFTER applying this Pull Request

getRowOffset() now declares an explicit int return type, improving type safety and static analysis support.

Link to documentations

  • No documentation changes for guide.joomla.org needed
  • No documentation changes for manual.joomla.org needed
avatar Mahesh-Gite-28 Mahesh-Gite-28 - open - 19 May 2026
avatar Mahesh-Gite-28 Mahesh-Gite-28 - change - 19 May 2026
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 19 May 2026
Category Libraries
avatar Mahesh-Gite-28 Mahesh-Gite-28 - change - 19 May 2026
Labels Added: PR-6.2-dev
avatar Mahesh-Gite-28 Mahesh-Gite-28 - change - 19 May 2026
The description was changed
avatar Mahesh-Gite-28 Mahesh-Gite-28 - edited - 19 May 2026
avatar laoneo
laoneo - comment - 19 May 2026

Is this backwards compatible?

avatar joomdonation
joomdonation - comment - 19 May 2026

In theory, adding return type for a method like that is counted as backward incompatible change. It will cause fatal error if child class extends the class and override getRowOffset method for whatever reason. Also, adding return type for only one method in the class while other methods in same class still without return type is not very useful, I think we should not go with it.

avatar Mahesh-Gite-28
Mahesh-Gite-28 - comment - 19 May 2026

You're right, this could introduce backward compatibility issues for child classes overriding the method. Thanks for pointing that out.

avatar Mahesh-Gite-28
Mahesh-Gite-28 - comment - 19 May 2026

You're right, this could introduce backward compatibility issues for child classes overriding the method. Thanks for pointing that out. I'll close this PR.

avatar Mahesh-Gite-28 Mahesh-Gite-28 - change - 19 May 2026
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2026-05-19 07:36:07
Closed_By Mahesh-Gite-28
avatar Mahesh-Gite-28 Mahesh-Gite-28 - close - 19 May 2026

Add a Comment

Login with GitHub to post a comment