Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

285.7. kdev-php-26.08.2

PHP language support for KDevelop — parser, semantic highlighting, code completion and PHPUnit tests

26.08.2-1 · LGPL-2.0-or-later AND LGPL-2.0-only AND GPL-2.0-or-later AND (GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL) AND MIT AND CC0-1.0 · 5.7 SBU · 8.4 MiB, 34 files · 44_apps, 82 of 422 · ports/core/editors/kdev-php

Homepage: https://invent.kde.org/kdevelop/kdev-php

kdev-php is KDevelop’s PHP language plugin: a parser and semantic model of PHP (KDevelop’s DUChain, its store of every declaration and where it is used), with highlighting by meaning, code completion, navigation, refactoring, the PHP manual as documentation, and a PHPUnit test provider. It also installs KDevelop project templates for PHP.

Depends on: cmake, ninja, extra-cmake-modules, qt6-qtbase, kcmutils, ki18n, ktexteditor, threadweaver, kdevelop, kdevelop-pg-qt.

Required by (1): kde-gear-devtools.

Sources: kdev-php-26.08.2.tar.xz (1.1 MiB). Every step kpkg takes applies to this port.

Install: script/chroot/exec.sh bash -c 'source script/phases/44_apps/phase.env && kpkg install kdev-php'

build.sh:

cmake -S . -B build -G Ninja \
	-D CMAKE_INSTALL_PREFIX=/usr \
	-D KDE_INSTALL_LIBDIR=lib \
	-D CMAKE_BUILD_TYPE=Release \
	-D KDE_INSTALL_USE_QT_SYS_PATHS=ON \
	-D BUILD_TESTING=OFF \
	-D KF_SKIP_PO_PROCESSING=ON \
	-Wno-dev
cmake --build build
DESTDIR=$PKG cmake --install build

Libraries: libkdevphpcompletion.so, libkdevphpduchain.so, libkdevphpparser.so.

Directories: /usr/include/kdev-php, /usr/lib/cmake/KDevPHP, /usr/share/kdevphpsupport, /usr/share/licenses/kdev-php.

The plugin asks for KDevPlatform, from kdevelop, at its own major and minor version, 6.0. KDevelop promises binary compatibility only between patch releases (its library version changes with every minor release, and plugins are installed under a directory named for it), so kdev-php is built from the same KDE Gear release as kdevelop and the two move together. Because a port depends on it, kdevelop is built in 43_toolkits, ahead of 44_apps, which holds this plugin.

The parser is generated at build time from php.g by kdev-pg-qt, the parser generator from kdevelop-pg-qt. The configure looks for it as KDevelopPGQt 2.4 or later and otherwise requires the older KDevelop-PG-Qt 2.3 package; the port is 2.4.

The plugin installs headers and a KDevPHP CMake package, which only a KDevelop 5 build of Umbrello’s PHP importer would read.