in-square/opendxp-post-bundle

Post bundle for OpenDXP.

Maintainers

Package info

github.com/in-square/opendxp-post-bundle

Type:opendxp-bundle

pkg:composer/in-square/opendxp-post-bundle

Statistics

Installs: 2

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-03-30 12:05 UTC

This package is not auto-updated.

Last update: 2026-03-31 10:25:05 UTC


README

Bundle provides basic blog data objects (Post, PostCategory, PostTag), archive tables for monthly counts, and tools for organizing posts by date.

Features

  • Installs PostCategory, PostTag, and Post classes (with date field).
  • Creates archive tables: post_archive_by_category, post_archive_by_tag.
  • Event-based change tracking + CRON-friendly archive rebuild.
  • Date-based folder sorting for existing posts.

Requirements

  • PHP 8.3
  • Symfony 7.4
  • OpenDXP 1.0

Installation

Install the bundle via Composer and run the OpenDXP installer:

composer require in-square/opendxp-post-bundle
php bin/console opendxp:bundle:install InSquareOpendxpPostBundle

Configuration

Create config/packages/in_square_opendxp_post.yaml in the OpenDXP project:

in_square_opendxp_post:
    post_root_folder: '/posts'
    sorting:
        enabled: true
        date_field: 'date'
    archive:
        idle_minutes: 10

Archive rebuild (CRON)

Event subscriber stores last_posts_change in cache. Run rebuild command via CRON:

* * * * * /usr/bin/php /path/to/opendxp/bin/console insquare:post-archive:rebuild

Command supports --force and --idle-minutes:

php bin/console insquare:post-archive:rebuild --force

Sorting existing posts

Use this command to move existing posts into /Y/m/d folders:

php bin/console insquare:post:sort

Development

Static analysis and coding standards:

composer phpstan
composer php-cs
composer php-cs:dry