smartbox / core-bundle
Smartbox 核心包
v1.8.0
2020-05-11 07:39 UTC
Requires
- php: >=7.0
- jms/serializer: ~1.0|~2.0
- symfony/console: ~2.8|~3.0
- symfony/expression-language: ~2.8|~3.0
- symfony/framework-bundle: ~2.8|~3.0
- symfony/property-access: ~2.8|~3.0
Requires (Dev)
- jms/serializer-bundle: ^2.0.0
- predis/predis: ^1.0
- snc/redis-bundle: ~2.0
- symfony/monolog-bundle: ~2.4|~3.0
- symfony/phpunit-bridge: ^4.2
- symfony/validator: ~2.8|~3.0
- dev-master
- v1.8.0
- v1.7.0
- v1.6.0
- v1.5.0
- v1.4.0
- v1.3.0
- v1.2.0
- v1.1.1
- v1.1.0
- v1.0.0
- dev-core-bundle-new
- dev-MINT-6013
- dev-MINT-6013-V2
- dev-smoke-tests-label
- dev-release/2.0.0
- dev-feature/dep-cleanup
- dev-feature/update_jms_serializer
- dev-feature/add-smoke-tests-documentation
- dev-feature/add-coveralls-badget
- dev-bugfix/php-memory-limit-for-travis
- dev-feature/symfony2_8
- dev-bugfix/datetimeformat
- dev-feature/improve-hydrator-error-message
- dev-bugfix/change-travis-build-url
This package is auto-updated.
Last update: 2024-09-29 05:01:22 UTC
README
核心功能
安装和使用
要安装包,您只需
- 将存储库添加到Composer中,如下所示
"require": {
"smartbox/core-bundle": "dev-master"
},
-
将其添加到您的AppKernel.php文件中,new Smartbox\CoreBundle\SmartboxCoreBundle(),
-
配置包
php console.php config:dump-reference smartbox_core
\# Default configuration for extension with alias: "smartbox_core"
smartbox_core:
# Base path to store/lookup the entity fixtures
fixtures_path: null
# Namespaces to look for entity classes
entities_namespaces: []
# Configure cache drivers.
#
# 1) predis (predefined driver which requires https://github.com/snc/SncRedisBundle and predis library/extension)
# - add packages to composer.json:
# "snc/redis-bundle": "^1.1"
# "predis/predis": "^1.0"
#
# - register bundle in AppKernel.php:
# new Snc\RedisBundle\SncRedisBundle(),
#
# - define "cache" client for SncRedisBundle:
# snc_redis:
# clients:
# cache:
# type: predis
# alias: default
# dsn: redis://
#
# - add configuration to your config.yml:
# smartbox_core:
# cache_drivers:
# predis:
# service: ~
#
# - you can access this driver by service reference @smartcore.cache_driver.predis
#
# 2) null (predefined driver just to simulate the cache - nothing is stored in cache)
# - add configuration to your config.yml:
# smartbox_core:
# cache_drivers:
# null:
# service: ~
#
# - you can access this driver by service reference @smartcore.cache_driver.null
#
# 3) custom driver with any name
# - create your own cache service which implements Smartbox\CoreBundle\Utils\Cache\CacheServiceInterface
# class MyCacheService implements Smartbox\CoreBundle\Utils\Cache\CacheServiceInterface
# {
# // implement methods
# }
#
# - register service
# my_cache_driver_service_id:
# class: MyCacheService
#
# - add configuration to your config.yml:
# smartbox_core:
# cache_drivers:
# my_cache_driver:
# service: "@my_cache_driver_service_id"
#
# - you can access this driver by service reference @smartcore.cache_driver.my_cache_driver
#
cache_drivers: # Required
# Prototype
driver_name:
# Service id for the cache driver (@service_id or just service_id)
service: ~ # Required
# If any of drivers is marked as default, the first defined driver will be taken. Otherwise the last one marked as default will be used.
default: ~
# Configure serialization cache
serialization_cache:
# Enable or disable serialization cache.
enabled: false
# Driver name: predis or any other custom driver configured in "smartbox_core.cache_drivers".
cache_driver: smartcore.cache_service
工具
smartbox:core:generate:random-fixture
生成一个随机测试数据集。该数据集可以看作是与视图和主要实体相关联的示例数据。
用法: php app/console smartbox:core:generate:random-fixture --help
示例: php app/console smartbox:core:generate:random-fixture NiceBoxEntity --entity-group the-view-for-a-nice-box --entity-version v0
smartbox:smoke-test
运行所有带有“smartcore.smoke_test”标签的服务。
用法: php app/console smartbox:smoke-test --help
示例
php app/console smartbox:smoke-test --list
php app/console smartbox:smoke-test
php app/console smartbox:smoke-test test my_project.producers.my_producer.connectivity_smoke_test_run
贡献
- 分支它!
- 创建您的功能分支:
git checkout -b my-new-feature
- 提交您的更改:
git commit -am '添加一些功能'
- 推送到分支:
git push origin my-new-feature
- 提交拉取请求 :D
测试
查看Tests/Fixtures/app中的小型测试应用程序
历史
贡献者
Jose Rufino, Marcin Skurski, Luciano Mammino, Alberto Rodrigo, David Camprubi, Arthur Thevenet, Bertrand Drouhard, Mel McCann, Shane McKinley.