gammamatrix / site-playground

Playground:此软件包提供使用 Sanctum 进行身份验证和授权的 Laravel 网站,并使用 Blade 进行 UI 开发。同时提供内容管理系统、用户和设置管理。

dev-develop / 73.x-dev 2024-03-25 05:55 UTC

This package is auto-updated.

Last update: 2024-09-25 07:07:57 UTC


README

Playground CI Workflow Test Coverage PHPStan Level 9 src and tests

网站:适用于 Laravel v11 应用程序的 Playground 包。

更多信息请参阅Read the Docs 上的 Playground 文档。

注意:Playground 使用 declare(strict_types=1);

注意:此软件包旨在被分支、克隆或使用 composer create-project 使用。

使用 composer create-project 安装软件包

composer create-project gammamatrix/site-playground site-example --stability dev
  • 注意:尚未部署稳定版本。

已安装的 Playground 软件包

已安装的支持 Playground 软件包

测试

此应用程序支持使用已安装的 Playground 软件包运行集成测试。

<testsuites>
  <testsuite name="Unit">
    <directory>tests/Unit</directory>
    <directory>vendor/gammamatrix/playground/tests/Unit</directory>
    <directory>vendor/gammamatrix/playground-auth/tests/Unit</directory>
    <directory>vendor/gammamatrix/playground-blade/tests/Unit</directory>
    <directory>vendor/gammamatrix/playground-admin/tests/Unit</directory>
    <directory>vendor/gammamatrix/playground-admin-resource/tests/Unit</directory>
    <directory>vendor/gammamatrix/playground-cms/tests/Unit</directory>
    <directory>vendor/gammamatrix/playground-cms-resource/tests/Unit</directory>
    <directory>vendor/gammamatrix/playground-http/tests/Unit</directory>
    <directory>vendor/gammamatrix/playground-test/tests/Unit</directory>
  </testsuite>
  <testsuite name="Feature">
    <directory>tests/Feature</directory>
    <directory>vendor/gammamatrix/playground/tests/Feature</directory>
    <directory>vendor/gammamatrix/playground-auth/tests/Feature</directory>
    <directory>vendor/gammamatrix/playground-blade/tests/Feature</directory>
    <directory>vendor/gammamatrix/playground-admin/tests/Feature</directory>
    <directory>vendor/gammamatrix/playground-admin-resource/tests/Feature</directory>
    <directory>vendor/gammamatrix/playground-cms/tests/Feature</directory>
    <directory>vendor/gammamatrix/playground-cms-resource/tests/Feature</directory>
    <directory>vendor/gammamatrix/playground-login-blade/tests/Feature</directory>
    <directory>vendor/gammamatrix/playground-http/tests/Feature</directory>
    <directory>vendor/gammamatrix/playground-site-blade/tests/Feature</directory>
    <directory>vendor/gammamatrix/playground-test/tests/Feature</directory>
  </testsuite>
</testsuites>

<source>
  <include>
    <directory>app</directory>
    <directory suffix=".php">vendor/gammamatrix/playground/src</directory>
    <directory suffix=".php">vendor/gammamatrix/playground-auth/src</directory>
    <directory suffix=".php">vendor/gammamatrix/playground-blade/src</directory>
    <directory suffix=".php">vendor/gammamatrix/playground-admin/src</directory>
    <directory suffix=".php">vendor/gammamatrix/playground-admin-resource/src</directory>
    <directory suffix=".php">vendor/gammamatrix/playground-cms/src</directory>
    <directory suffix=".php">vendor/gammamatrix/playground-cms-resource/src</directory>
    <directory suffix=".php">vendor/gammamatrix/playground-login-blade/src</directory>
    <directory suffix=".php">vendor/gammamatrix/playground-site-blade/src</directory>
    <directory suffix=".php">vendor/gammamatrix/playground-http/src</directory>
    <directory suffix=".php">vendor/gammamatrix/playground-test/src</directory>
  </include>
</source>
composer test

测试示例

phpunit --coverage-text --teamcity --filter 'PageRevision\\ModelTest::test_verify_model_relationships'
--testsuite Feature

phpunit --coverage-text --teamcity --filter 'Backlog\\ModelTest::test_verify_model_relationships' --testsuite Feature
phpunit --coverage-text --filter ModelTest
phpunit --coverage-text --filter RouteTest
phpunit --coverage-text --filter InstanceTest
phpunit --coverage-text --filter Policy
phpunit --coverage-text --filter Resource
phpunit --coverage-text  --filter Login
phpunit --coverage-text  --filter Cms
phpunit --coverage-text --filter Matrix

代码覆盖率

注意:如果您使用此存储库用于生产网站,请确保隐藏 public/tests 中链接的代码覆盖率。

Playground 的 phpunit 文件支持集成和软件包测试。

screenshot of Test reports for Site Playground.

网站 Playground 的代码覆盖率

screenshot of Code Coverage for Site Playground.

网站 Playground:GammaMatrix 软件包的代码覆盖率

screenshot of Code Coverage for Site Playground: GammaMatrix Packages.

PHPStan

在以下级别的测试:9

  • app/
  • config/
  • database/
  • resources/views/
  • tests/Feature/
  • tests/Unit/
  • 以及 Playground 软件包。
composer analyse

编码标准

composer format

主题

playground-blade 提供了使用 CSS 变量的 Bootstrap 5 主题。

screenshot of Editing a Page with the dark theme. screenshot of Editing a Page with the wheat theme.

screenshot of the sitemap with the wheat theme.

artisan about

Playground 在 artisan about 命令中提供信息。

screenshot of artisan about command with Site Playground.

变更日志

请参阅 CHANGELOG 了解最近的变化。

致谢

许可证

MIT 许可证 (MIT)。有关更多信息,请参阅 许可证文件