线虫 / 性感字段包
Symfony SexyFieldBundle
dev-master
2021-03-13 14:52 UTC
Requires
- php: ^7.4
- ezyang/htmlpurifier: ^4.10
- symfony/dependency-injection: ^4
- symfony/http-kernel: ^4
- tardigrades/sexy-field: dev-master
- tardigrades/sexy-field-api: dev-master
- tardigrades/sexy-field-doctrine: dev-master
- tardigrades/sexy-field-entity: dev-master
- tardigrades/sexy-field-field-types-base: dev-master
- tardigrades/sexy-field-form: dev-master
Requires (Dev)
- mockery/mockery: ^0.9.9
- phpunit/phpunit: ^6.1
- squizlabs/php_codesniffer: ^2.8
This package is auto-updated.
Last update: 2024-09-30 01:17:27 UTC
README
性感字段安装
步骤 1: 下载包
打开命令行控制台,进入您的项目目录并执行以下命令以下载此包的最新稳定版本
$ composer require tardigrades/sexy-field-bundle "~1"
此命令要求您已全局安装Composer,具体请参阅Composer文档中的安装章节。
步骤 2: 启用包
然后,通过将其添加到项目中app/AppKernel.php
文件中注册的包列表来启用该包
<?php // app/AppKernel.php // ... class AppKernel extends Kernel { public function registerBundles() { $bundles = array( // ... new Tardigrades\Bundle\SexyFieldBundle(), ); // ... } // ... }
步骤 3: 执行doctrine schema命令以生成数据库结构
如果需要,启用缓存。
1: 在您的config.yml中添加以下内容,这将防止doctrine迁移删除将在下一步创建的表。
doctrine:
dbal:
schema_filter: ~^(?!cache_items)~
2: 然后运行: bin/console sf:ensure-cache
以在数据库中创建缓存表
3: 并将此服务添加到您的services.yml文件中。第二个参数(true)用于启用或禁用缓存。您可以为此创建一个变量。
Tardigrades\SectionField\Service\DefaultCache:
public: false
arguments:
- '@Symfony\Component\Cache\Adapter\TagAwareAdapter'
- true