adachsoft / code-search-contract
v0.2.0
2026-10-26 12:52 UTC
Requires
- php: ^8.3
- adachsoft/collection: ^3.0
Requires (Dev)
- adachsoft/changelog-linter: ^0.3.0
- adachsoft/php-code-style: 0.3.0
- friendsofphp/php-cs-fixer: ^3.68
- justinrainbow/json-schema: ^5.2
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^12.4
- rector/rector: ^2.3
- twig/twig: ^3.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is not auto-updated.
Last update: 2026-10-26 11:55:30 UTC
README
A contract library for searching symbols in PHP code.
Purpose
This library defines a stable, extensible contract (interfaces, DTOs, value objects, collections, and exceptions) for searching symbols in PHP code:
- types (classes, interfaces, traits, enums, and anonymous classes),
- methods,
- type relationships (implements and extends, including descendant searches).
It does not include an indexing or search implementation.
Installation
composer require adachsoft/code-search-contract
Main facade
use AdachSoft\CodeSearchContract\CodeSearchFacadeInterface;
An implementation of this facade is provided by a separate library.
Quick start
composer install
composer test
API scope
CodeSearchFacadeInterfaceis the main facade.- DTOs and value objects are in the
AdachSoft\CodeSearchContractnamespace and its subnamespaces. - Collections are based on
adachsoft/collection; public APIs do not expose arrays. - Exceptions are the primary mechanism for signaling errors.
See the src/ directory for the source structure.