setono / sylius-tag-bag-plugin
插件,将 Setono/TagBagBundle 集成到您的 Sylius 项目中
v1.3.0
2022-08-09 20:10 UTC
Requires
- php: >=7.4
- setono/tag-bag-bundle: ^2.0 || ^3.0
- sylius/sylius: ^1.4
Requires (Dev)
- roave/security-advisories: dev-latest
- setono/code-quality-pack: ^1.3.1
- symfony/debug-bundle: ^4.4 || ^5.1
- symfony/dotenv: ^4.4 || ^5.1
- symfony/intl: ^4.4 || ^5.1
- symfony/web-profiler-bundle: ^4.4 || ^5.1
This package is auto-updated.
Last update: 2024-09-15 06:55:33 UTC
README
将 TagBagBundle 集成到您的 Sylius 项目的插件
创建需要 TagBagBundle 的插件
配置 composer.json
{ "type": "sylius-plugin", "keywords": ["sylius", "sylius-plugin", "setono-tagbag", "..."], "require": { "sylius/sylius": "^1.4.0", "setono/tag-bag-bundle": "^2.0" }, "suggest": { "setono/sylius-tag-bag-plugin": "Use it if you don't want to override shop's layout.html.twig" }, "require-dev": { "setono/sylius-tag-bag-plugin": "^1.0" } }
注意,setono/sylius-tag-bag-plugin
应为开发依赖,以便您的插件用户(应用程序开发者)有机会不使用它,如果他在应用程序中已经覆盖了 layout.html.twig
(由 Setono/TagBagBundle
需要),请参阅 github.com/Setono/TagBagBundle#usage。
将以下内容添加到插件的 README.md
- 要求库
# Omit setono/sylius-tag-bag-plugin if you want to # override layout.html.twig as described at https://github.com/Setono/TagBagBundle#usage composer require your/plugin setono/sylius-tag-bag-plugin
- 包含组件
<?php # config/bundles.php return [ // ... Setono\TagBagBundle\SetonoTagBagBundle::class => ['all' => true], // Use this bundle or override layout.html.twig as described at https://github.com/Setono/TagBagBundle#usage Setono\SyliusTagBagPlugin\SetonoSyliusTagBagPlugin::class => ['all' => true], // ... ];
开发
测试(手动)
- 运行
composer try
以运行测试应用程序 - 导航到任何产品(https://:8000/en_US/products/book)
- 您将看到由
app.event_subscriber.shop
添加到标签袋的 JavaScript 提示框
贡献
在推送之前,请运行 composer checks
。