Repository navigation
Fix #4627: Replace deprecated is_integer() calls with is_int() for PHP 8.6 - #4627
Merged
Merged
Conversation
samdark
reviewed
Sep 4, 2026
samdark
approved these changes
Sep 4, 2026
There was a problem hiding this comment.
🟢 Approval recommended
The changes are straightforward alias substitutions, and a repository-wide search shows no remaining is_integer( call sites outside the CHANGELOG note.
Pull request overview
This PR updates the Yii 1.1 framework codebase to avoid PHP 8.6 deprecation warnings by replacing deprecated is_integer() usage with the canonical alias is_int(), without changing runtime behavior.
Changes:
- Replaced
is_integer()withis_int()across framework code paths that branch on integer keys/values. - Updated
yiilite.php(lite bundle) to keep it consistent with the source framework classes. - Added a CHANGELOG entry documenting the compatibility fix for PHP 8.6.
File summaries
| File | Description |
|---|---|
| framework/zii/widgets/CListView.php | Uses is_int() when interpreting sorter attribute keys. |
| framework/yiilite.php | Updates bundled/lite copies of the affected logic to is_int(). |
| framework/web/helpers/CJavaScript.php | Uses is_int() when encoding integer values to JS. |
| framework/db/schema/CDbCriteria.php | Uses is_int() when merging scopes/with arrays by integer keys. |
| framework/db/ar/CActiveRecord.php | Uses is_int() in attribute/scopes handling for integer-keyed arrays. |
| framework/collections/CMap.php | Uses is_int() in recursive array merge logic for integer-keyed elements. |
| CHANGELOG | Documents the deprecation replacement under 1.1.33 development. |
Review details
- Files reviewed: 7/7 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
is_integer() calls with is_int() for PHP 8.6
Member
|
👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace all framework calls to
is_integer()with the canonicalis_int()alias.Motivation
PHP 8.6 deprecates
is_integer()and recommendsis_int()instead.RFC:
https://wiki.php.net/rfc/deprecations_php_8_6#deprecate_is_integer
Tests
Relevant framework tests: 19 tests, 47 assertions.