Home

Awesome

scip-php

CI Coverage OpenSSF Scorecard License: MIT Packagist Version PHP Version Docker Image Version Docker Image Size Contributors

SCIP Code Intelligence Protocol (SCIP) indexer for PHP


This repository is indexed using itself and available on Sourcegraph.

And here is a Sourcegraph notebook with a demo and additional explanations.

Requirements

Usage

Manual

Install scip-php with composer and the src binary. Then generate the SCIP index and upload it:

composer require --dev davidrjenni/scip-php
vendor/bin/scip-php
src code-intel upload

Private Sourcegraph Instance

To use a private Sourcegraph instance, set the SRC_ENDPOINT and SRC_ACCESS_TOKEN environment variables first.

Contributing

See the contributing guidelines.

Development

Inspecting the Output

Bindings

The directory src/Bindings contains auto-generated bindings for SCIP. To update the bindings, download the protobuf schema for SCIP and regenerate the bindings:

wget -O src/Bindings/scip.proto https://raw.githubusercontent.com/sourcegraph/scip/main/scip.proto
composer gen-bindings

The protobuf compiler protoc must be present to generate the bindings.

See github.com/sourcegraph/scip for further information.