bridgetphp/bridget
Composer 安装命令:
composer require bridgetphp/bridget
包简介
Bree - A modern PHP superset with strong typing and OOP enhancements
关键字:
README 文档
README
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. 💡✨
⚡ Quick Start
📦 Install Bree
Install Bree via Composer with:
composer global require bree/bree:dev-main
🎉 Try Bree
Create a hello.bg file:
Hello, $name!
Run it with:
bree run hello --name=Bree
This displays: Hello, Bree! 🎊
❓ What is 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 🔄
🔥 Why Choose Bree?
- 🚀 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.
🌟 Features
- 🛡️ 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.
📋 Requirements
🔹 PHP 8.4 or higher (8.4.3+ recommended)
🔹 Composer
🔹 Git
🔹 Node.js (Optional)
🚀 Installation
Install Bree from Packagist using Composer:
composer global require bree/bree:dev-main
🛠️ Usage
Bree transpiles .bg files into .php, introducing enhanced features while maintaining PHP compatibility.
🔧 Example Command
bree source.bree
This converts source.bg into an optimized PHP file.
📝 Example Code
<?php // Strongly-typed function in Bree function greet<T extends string>(T $name): T { return "Hello, $name!"; } echo greet("World");
🏆 Transpiled PHP Code
<?php function greet(string $name): string { return "Hello, $name!"; } echo greet("World"); ?>
Bree ensures type safety at transpilation, making PHP development more robust. 🛡️
🤝 Contributing
We welcome contributions! 💖 Whether it's bug fixes, new features, or documentation improvements, feel free to contribute.
📌 How 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. 🙌
📜 License
Bree is licensed under the MIT License. See the LICENSE.md file for details.
💬 Support & Community
For questions, issues, or feedback:
- 🚀 Open an issue
- 💬 Join our discussions
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-02-24