adrum/lsif-php

Language Server Indexing Format (LSIF) generator for PHP

Maintainers

👁 adrum

Package info

github.com/adrum/lsif-php

pkg:composer/adrum/lsif-php

Statistics

Installs: 14

Dependents: 0

Suggesters: 0

Stars: 0

v1.0.2 2026-04-26 15:54 UTC

Requires

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT a7a56a8dcd903396ef6f9f4707f0447caecc78af

lsif

This package is auto-updated.

Last update: 2026-06-26 16:16:12 UTC


README

👁 CI
👁 Coverage
👁 License: MIT
👁 Packagist Version
👁 PHP Version
👁 Docker Image Version
👁 Docker Image Size

Language Server Indexing Format (LSIF) generator for PHP

This repository is indexed using itself and available on Sourcegraph.

Requirements

lsif-php needs the composer.json and composer.lock file of the project to index present in the current directory. It uses the autoload and autoload-dev properties to determine which directories to scan.

Usage

To use a self-hosted Sourcegraph instance, set the SRC_ENDPOINT and SRC_ACCESS_TOKEN environment variables.

GitHub Actions

Add the following job to your workflow:

on:
 - push

jobs:
 lsif-php:
 runs-on: ubuntu-latest
 container: adrum/lsif-php:main
 steps:
 - uses: actions/checkout@v3
 - name: Generate LSIF data
 run: lsif-php
 - name: Apply container owner mismatch workaround
 run: |
 # FIXME: see https://github.com/actions/checkout/issues/760
 git config --global --add safe.directory ${GITHUB_WORKSPACE}
 - name: Upload LSIF data
 run: src code-intel upload -github-token=${{ secrets.GITHUB_TOKEN }}

GitLab CI/CD

Add the following job to your pipeline:

code_navigation:
 image: adrum/lsif-php:main
 artifacts:
 reports:
 lsif: dump.lsif
 script:
 - lsif-php
 - src code-intel upload

Manual

Install lsif-php with composer and the src binary. Then generate the LSIF data and upload it:

$ composer require --dev adrum/lsif-php
$ vendor/bin/lsif-php
$ src code-intel upload

Acknowledgements

This project is a fork of davidrjenni/lsif-php. Huge thanks to David R. Jenni for creating the original tool and laying the groundwork that made this fork possible.