Skip to content

[BUG] PHP function list fails on readonly classes #17327

@bitwise-operators

Description

@bitwise-operators

Is there an existing issue for this?

  • I have searched the existing issues

Is the issue reproducible in Notepad++ without plugin?

  • I have tried Notepad++ without plugin

Is the issue reproducible in portable version of Notepad++?

  • I have tried portable version of Notepad++

Does the issue affect SciTE?

  • I have tried SciTE

Description of the Issue

PHP 8.2 introduced readonly classes. The function list parser currently doesn't recognize those, leading to an empty function list.

I'll submit a PR for this, but I figured I'd add an issue for other people searching.

Steps To Reproduce

  1. Create PHP file
  2. Open function list
  3. Create class with some functions
  4. Make class readonly
  5. See function list disappear

Current Behavior

Function list is empty when class is marked readonly

Expected Behavior

Function list should behave the same as for normal classes

Debug Information

Notepad++ v8.8.9   (64-bit)
Build time: Dec  8 2025 - 00:04:32
Scintilla/Lexilla included: 5.5.8/5.4.6
Boost Regex included: 1_85
Path: C:\Users\micro\Documents\Personal\Programs\NotepadPlusPlus\notepad++.exe
Command Line: 
Admin mode: OFF
Local Conf mode: ON
Cloud Config: OFF
Periodic Backup: OFF
Placeholders: OFF
Scintilla Rendering Mode: SC_TECHNOLOGY_DIRECTWRITE (1)
Multi-instance Mode: multiInst
asNotepad: OFF
File Status Auto-Detection: cdEnabledNew (for current file/tab only)
Dark Mode: ON
Display Info:
    primary monitor: 3840x2160, scaling 150%
    visible monitors count: 3
    installed Display Class adapters: 
        0000: Description - AMD Radeon(TM) Graphics
        0000: DriverVersion - 32.0.11020.24001
        0001: Description - Microsoft Remote Display Adapter
        0001: DriverVersion - 10.0.26100.5074
        0002: Description - Microsoft Remote Display Adapter
        0002: DriverVersion - 10.0.26100.7309
        0003: Description - Microsoft Remote Display Adapter
        0003: DriverVersion - 10.0.26100.1150
    - warning, search has been limited to maximum number of adapter records: 4
OS Name: Windows 11 Pro (64-bit)
OS Version: 25H2
OS Build: 26200.7462
Current ANSI codepage: 1252
Plugins: 
    JsonTools (6.1.1)
    mimeTools (3.1)
    NppConverter (4.7)
    nppcrypt (1.0.1.6)
    NppExport (0.4)

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions