Symfony 演示应用
“Symfony 演示应用”是一个参考应用,旨在展示如何遵循 Symfony 最佳实践 来开发应用程序。
您还可以在 官方 Symfony 书籍 中了解这些实践。
根据您的需求,有 3 种不同的安装此项目的方式:
选项 1. 下载 Symfony CLI,并使用安装在您计算机上的 symfony 二进制文件运行以下命令:
symfony new --demo my_project选项 2。 下载 Composer 并使用已安装的 composer 二进制文件
在你的计算机上运行这些命令:
# you can create a new project based on the Symfony Demo project...
composer create-project symfony/symfony-demo my_project
# ...or you can clone the code repository and install its dependencies
git clone https://github.com/symfony/demo.git my_project
cd my_project/
composer install用法 I am a professional English-to-Simplified Chinese translator. Please translate the user's text into fluent, natural Simplified Chinese. Preserve Markdown structure (headings, lists, links, emphasis) exactly. Do NOT translate URLs, code identifiers, package names, or brand names; keep them as-is. Output ONLY the translated text, with no explanation, no preamble, and no quotation marks. 运行该应用程序之前无需进行任何配置。 2 different ways of running this application depending on your needs: 选项 1. 下载 Symfony CLI 并运行此命令:
cd my_project/
symfony serve然后,在浏览器中通过给定的URL(默认为https://localhost:8000)访问该应用程序。 选项 2。 使用像 Nginx 或 Apache 这样的 Web 服务器来运行应用程序。 (阅读关于为Symfony配置Web服务器的文档)。 在您的本地机器上,可以运行以下命令来使用内置的 PHP Web 服务器:
cd my_project/
php -S localhost:8000 -t public/执行此命令以运行测试:
cd my_project/
./bin/phpunit暂无开放 Issues,或尚未同步最近议题。