Bree is a modern PHP framework designed to enhance development with strong typing, advanced object-oriented features, and a powerful templating system inspired by Blade. π‘β¨
Install Bree via Composer with:
composer global require bree/bree:dev-mainCreate a hello.bg file:
Hello, $name!
Run it with:
bree run hello --name=BreeThis displays: Hello, Bree! π
Bree is a cutting-edge PHP framework that introduces:
β Strong typing for better code reliability π β Advanced OOP features for maintainable applications ποΈ β A powerful templating system for seamless UI rendering π¨ β Full PHP compatibility ensuring easy adoption π
- π Enhances PHP without breaking compatibility β Upgrade your projects without major rewrites.
- βοΈ No need for PHPDoc & annotations β Types are enforced at both transpilation and runtime.
- β‘ Inspired by TypeScript β Offers both static and dynamic typing for flexibility.
- π Blade-like templating β Clean and structured HTML rendering.
- π‘οΈ Strong Typing β Enforces types at compile-time and runtime.
- ποΈ Advanced OOP β Expands PHPβs object-oriented capabilities.
- π Dynamic & Static Typing β Inspired by TypeScript.
- π₯οΈ Integrated Templating Engine β A Blade-like system for clean HTML rendering.
- π§© Seamless PHP Integration β 100% compatible with existing PHP code.
πΉ PHP 8.4 or higher (8.4.3+ recommended)
πΉ Composer
πΉ Git
πΉ Node.js (Optional)
Install Bree from Packagist using Composer:
composer global require bree/bree:dev-mainBree transpiles .bg files into .php, introducing enhanced features while maintaining PHP compatibility.
bree source.breeThis converts source.bg into an optimized PHP file.
<?php
// Strongly-typed function in Bree
function greet<T extends string>(T $name): T {
return "Hello, $name!";
}
echo greet("World");<?php
function greet(string $name): string {
return "Hello, $name!";
}
echo greet("World");
?>Bree ensures type safety at transpilation, making PHP development more robust. π‘οΈ
We welcome contributions! π Whether it's bug fixes, new features, or documentation improvements, feel free to contribute.
- π΄ Fork the repository.
- π± Create a new branch.
- π οΈ Implement your changes and add tests.
- π€ Submit a pull request.
Please follow our coding style and contribution guidelines. π
Bree is licensed under the MIT License. See the LICENSE.md file for details.
For questions, issues, or feedback:
- π Open an issue
- π¬ Join our discussions