定制 crell/planedo-bundle 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

crell/planedo-bundle

Composer 安装命令:

composer require crell/planedo-bundle

包简介

Feed aggregator bundle for Symfony 6 and later.

README 文档

README

Latest Version on Packagist Software License Total Downloads

Planedo is a blog aggregator bundle for Symfony 6. It aims to be a mostly out-of-the-box setup for a Planet-style blog aggregator, or as close to that as Bundles allow anyway.

"Planedo" is Esperanto for "Planet," as in blog-aggregator "planet."

Installation

There are two ways to set up Planedo Bundle.

If you want to just use Planedo as a stand-alone application and be done with it, install the Planedo application.

composer project-create crell/planedo

That will create a new project pre-configured to use with Planedo. Nearly all meaningful functionality is in the bundle, so you can modify the application itself to your heart's content. Future updates to Planedo itself will come via updating the bundle through Composer.

Alternatively, you may install Planedo Bundle directly in Symfony 5.4/6 application of your choice, via composer.

composer require crell/planedo-bundle

If you take this approach, there are a few manual steps necessary to wire the bundle into the application.

Add a dev-dependency

At this time, Planedo uses the pre-release version of PSR-20 from the PHP-FIG. It is not yet on Packagist, so you will need to include the following in your main application's composer.json:

{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/php-fig/clock.git"
    }
  ]
}

That will allow Composer to download the appropriate package. This step will be unnecessary once PSR-20 is released.

Enable the bundle

Add the bundle to your bundles.php file:

Crell\Bundle\Planedo\PlanedoBundle::class => ['all' => true],

Routing

Create a new file named config/routes/planedo.yaml and give it the following content:

# config/routes/planedo.yaml

planedo_admin:
    resource: '@PlanedoBundle/config/routes_admin.yaml'
    prefix: ''

planedo_public:
    resource: '@PlanedoBundle/config/routes_public.yaml'
    prefix: ''

The above setup assumes that you want Planedo's routes to be at the root of your site. If not, add a prefix for either the front-end or admin routes as you prefer.

User and password management

Planedo provides its own user accounts and password handling. A mechanism to disable is coming soon.

You may also choose to ignore the provided user system and use your own. In that case, ensure that users who should have access to the Planedo administrative area are given the ROLE_ADMIN role. How you end up doing that is up to you.

Configuration

Planedo includes its own minimal configuration in config/planedo.yaml. There are three configuration options, all optional. The defaults should be reasonable for most circumstances.

  • items_per_page (default 10): This integer specifies how many feed entries will be shown per page on HTML lists, and will be shown total in RSS and Atom feeds.
  • purge_before (default -30 days): Every time the purge cron job runs, any entries dated older than this will be deleted. Entries older than this will also not be imported. You may use any string that is valid according to PHP's relative date format.
  • use_plain_text (default false): If set to true, RSS and Atom feeds will use a text/plain mime type instead of their appropriate XML mime type. This is mainly useful for debugging and can be ignored 99% of the time.

For example:

# config/planedo.yaml

planedo:
    items_per_page: 20
    purge_before: -60 days

Initial setup

Once Planedo is set up, you will need to create the first admin user. A CLI command is provided for that purpose.

bin/console planedo:create-user --email you@example.com

You will be prompted for a password, or you may provide one on the command line. See the command's help text for more details.

You may now go to <planedo admin prefix>/admin to login, then start adding feeds.

Setting up cron tasks

Regardless of how you run Planedo, you will need to setup two cron tasks through the cron runner of your choice. How often you run them is up to you, but at least daily is recommended.

The first update refetches feeds to get new entries:

bin/console planedo:update-all

The second update deletes old entries (where "old" is defined by the purge_before configuration setting):

bin/console planedo:purge-old

Queues

Planedo runs most tasks through Symfony's Message Bus system. That allows it to be deferred to a queue. While not required, it is strongly recommended that you wire the following messages to an async backend:

  • Crell\Bundle\Planedo\Message\ApproveEntries
  • Crell\Bundle\Planedo\Message\PurgeOldEntries
  • Crell\Bundle\Planedo\Message\RejectEntries
  • Crell\Bundle\Planedo\Message\UpdateFeed

Theming

Out of the box, Planedo comes with barely any theming. It works, but it's not pretty.

You are free to retheme any of the templates as you wish. See the templates/ directory for the full set that can be overridden.

Contributing

Please see CONTRIBUTING and CODE_OF_CONDUCT for details.

Security

If you discover any security related issues, please email larry at garfieldtech dot com instead of using the issue tracker.

Credits

License

The Affero GPL version 3 or later. Please see License File for more information.

crell/planedo-bundle 适用场景与选型建议

crell/planedo-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 71 次下载、GitHub Stars 达 1, 最近一次更新时间为 2022 年 02 月 09 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 crell/planedo-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 crell/planedo-bundle 我们能提供哪些服务?
定制开发 / 二次开发

基于 crell/planedo-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 71
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: AGPL-3.0-or-later
  • 更新时间: 2022-02-09