Fennec is a toolchain for PHP that aims to provide a set of tools to help developers write better code. It is inspired by the Rust programming language and its toolchain, and aims to provide similar functionality for PHP.
Warning
Fennec is in an early stage of development. Many features are not yet implemented, and existing functionality may change, break, or stop working without notice. While we are not actively promoting or advertising the project, we are working in public to share our progress with the community.
- String Interning:
crates/interner
- Lexer:
crates/lexer
crates/token
- AST:
crates/ast
- Parser:
crates/parser
- Source Management:
crates/source
- AST Traversal / Walk:
crates/traverser
crates/walker
- Name Resolution:
crates/names
- Code Fixer:
crates/fixer
- Error Reporting:
crates/reporting
- Semantic Analysis:
crates/semantics
- Symbol Table:
crates/symbol-table
- Linter:
crates/linter
- Services:
crates/service
- String Case Conversion:
crates/casing
- Reflections:
crates/reflection
- Reflector:
crates/reflector
,crates/scanner
- Type Inference:
crates/inference
- Formatter
- Static Analyzer
- Refactoring
- Code Generation
- Documentation Generation
- Docblock Parser
crates/docblock
- Test Runner
- CLI Tool:
crates/cli
- Web Interface
- Language Server Protocol
- Editor Integration
cargo install --git https://github.com/carthage-software/fennec
git clone https://github.com/carthage-software/fennec
cd fennec
cargo install --path .
For a quick start, you can refer to the example configuration files provided:
- Simple configuration:
examples/fennec.toml
- Full configuration with all possible options:
examples/fennec-full.toml
You can try Fennec by navigating to the examples
directory and running the linter on the sample PHP files:
cd examples
fennec lint
This will analyze the PHP files located in the examples/src/
directory and display any linting errors.
Fennec is a community-driven project, and we’d love for you to join us! Here are some ways you can contribute:
- Suggest Ideas: Have an idea for Fennec? We’re open to suggestions that can make the toolchain even better!
- Help Write Documentation: Clear, user-friendly documentation is key to making Fennec accessible to everyone. If you enjoy writing or organizing docs, we'd love your help.
- Contribute Code: Join us in building Fennec! Please discuss any feature or bug fixes in the issues first to ensure we coordinate effectively.
- Sponsor the Project: If you’d like to support Fennec financially, consider sponsoring @azjezz. Every contribution helps!
- Help with Art: Fennec could use a logo! We’d appreciate the help of a skilled artist to create an original logo for Fennec. (Please note that AI-generated art will not be accepted.)
Fennec is inspired by several tools and projects that have significantly contributed to the development community:
- Clippy: A collection of lints to catch common mistakes and improve your Rust code.
- OXC: A JavaScript toolchain written in Rust.
- php-rust-tools/parser: A PHP parser written in Rust, which influenced our parsing approach.
- slackhq/hakana: A static analysis tool for HackLang written in Rust, by the creator of Psalm.
These tools have inspired us and helped shape Fennec's design and functionality.
We would like to acknowledge the following PHP tools that have greatly helped hundreds of thousands of PHP developers in their journey, ourselves included:
- PHP CS Fixer: A tool to automatically fix PHP Coding Standards issues.
- Psalm: A static analysis tool for finding errors in PHP applications.
- PHPStan: PHP Static Analysis Tool.
- PHP_CodeSniffer: Detects violations of a defined set of coding standards.
While Fennec is intended to be a comprehensive toolchain that may eventually replace some of these tools, we deeply appreciate their contributions and the foundation they have built for the PHP community.
Fennec is licensed under either of
- MIT License (MIT) - see LICENSE-MIT file for details
- Apache License, Version 2.0 (Apache-2.0) - see LICENSE-APACHE file for details
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Fennec by you shall be dual licensed as above, without any additional terms or conditions.
Thank you for your interest in Fennec. We look forward to sharing our progress and collaborating with the community as the project evolves.