[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1109613: ITP: php-nikic-php-parser -- PHP parser written in PHP for static code analysis



Package: wnpp
Severity: wishlist
Owner: Ahmed Gamal <ahmed.gamal9541@gmail.com>

* Package name    : php-nikic-php-parser
  Version         : 4.15.4
  Upstream Author : Nikita Popov <nikita.ppv@gmail.com>
* URL             : https://github.com/nikic/PHP-Parser
* License         : BSD-3-Clause
  Programming Lang: PHP
  Section         : php

Description:
 PHP parser written in PHP for static code analysis and manipulation

 The PHP Parser is a PHP 5.2 to PHP 8.2 parser written in PHP. Its purpose is to
 simplify static code analysis and manipulation of PHP code. The library provides
 the following key features:

 * Parsing PHP 5, PHP 7, and PHP 8 code into an abstract syntax tree (AST)
 * Dumping the AST in human-readable form
 * Converting an AST back to PHP code with formatting preservation
 * Infrastructure to traverse and modify ASTs
 * Resolution of namespaced names
 * Evaluation of constant expressions
 * Builders to simplify AST construction for code generation
 * Converting an AST into JSON and back

 This package is essential for PHP development tools, static analyzers, and code
 transformation utilities.

Rationale:
 This package is required as a dependency for FOSSology, an open source license
 compliance system. FOSSology uses PHP-based tools for source code analysis and
 license detection, which rely on the PHP Parser library for parsing and analyzing
 PHP source code during the compliance scanning process.

 The PHP Parser is a critical component for:
 - Static code analysis tools in FOSSology
 - License detection algorithms that need to parse PHP code
 - Code transformation utilities used in the compliance workflow
 - Development tools that analyze PHP code structure

Technical Details:
 - Requires PHP >= 7.0
 - Uses PSR-4 autoloading
 - Provides command-line tool: bin/php-parse
 - Minimal runtime dependencies (only ext-tokenizer)
 - Comprehensive test suite included
 - Well-documented with extensive examples

Dependencies:
 - php (>= 7.0)
 - php-tokenizer
 - Build dependencies: phpunit, ircmaxell/php-yacc (for development)

The package will be maintained by Ahmed Gamal <ahmed.gamal9541@gmail.com> as part
of the FOSSology packaging effort.

--
Ahmed Gamal
FOSSology Debian Packaging Team

Reply to: