scssphp/source-span
scssphp/source-span is a small PHP utility for tracking and working with source code spans (start/end positions) used by scssphp and related tooling. Useful for mapping errors, locations, and ranges back to the original source during parsing and compilation.
scssphp/scssphp but can be used independently for tooling, diagnostics, or custom SCSS/Sass compilers.composer require scssphp/source-span.SourceSpan and SourceFile. A SourceSpan represents a contiguous slice of text in a SourceFile, with start/end positions (line/column-based).SourceFile::create() to represent a source file by name and contents.SourceSpan objects via SourceSpan::create($file, $start, $end) — positions are Position objects (with line, column, byteOffset).SourceSpan instances alongside error messages (e.g., in custom Sass functions or custom rule linters).@error messages or IDE language server integrations).SourceSpan can be mapped to original sources using position remapping logic.SourceSpan is immutable — always create new instances when positions change.line and column indices — verify alignment with your parser or editor (many tools use 0-based internally, leading to off-by-one bugs).SourceSpan::toString() returns the substring content; use getSourceCode() to access full source if needed.php-http/message-factory for HTTP diagnostics).SourceFile instances across multiple compilations.How can I help you explore Laravel packages today?