Upgrade to 1.0.0-rc371

Concerns: pushword/conversation, pushword/core, pushword/installer

Media Entity Methods Moved to Utility Class (Breaking)

The following protected methods have been removed from the Media entity and moved to a new MediaFileName utility class:

  • extractExtension()
  • slugifyPreservingExtension()

If you have a custom Media subclass that calls or overrides these methods:

Before:

$extension = $this->extractExtension($filename);
$slugified = $this->slugifyPreservingExtension($filename, $extension);

After:

use Pushword\Core\Utils\MediaFileName;

$extension = MediaFileName::extractExtension($filename);
$slugified = MediaFileName::slugifyPreservingExtension($filename, $extension);

Dimensions Value Object (Breaking)

Media::getDimensions() and the image_dimensions() Twig function now return a Dimensions object instead of an array.

PHP Code Changes:

// Before
$dimensions = $media->getDimensions();
$width = $dimensions[0];
$height = $dimensions[1];

// After
$dimensions = $media->getDimensions();
$width = $dimensions->width;
$height = $dimensions->height;
// Or use toArray() for backward compatibility:
$arr = $dimensions->toArray(); // [width, height]

Twig Template Changes:

{# Before #}
{% set width = image_dimensions(image)[0] %}
{% set height = image_dimensions(image)[1] %}

{# After #}
{% set width = image_dimensions(image).width %}
{% set height = image_dimensions(image).height %}

Installer Package Changes

The pushword/installer package is no longer removed after initial project setup. It now stays as a dependency to support automatic setup when adding new Pushword packages via composer require.

If you have orphaned scripts in your composer.json referencing Pushword\Installer classes that cause errors:

Re-add pushword/installer to your dependencies:

composer require pushword/installer

Or remove the orphaned scripts from composer.json:

"scripts": {
    "post-install-cmd": ["@auto-scripts"],
    "post-update-cmd": ["@auto-scripts"]
}

Also remove post-autoload-dump if it only contains Pushword\Installer\PostAutoloadDump::runPostAutoload.

Conversation Route Change (Breaking)

The conversation form route has changed from path-based to query-based parameters for host and locale.

Before: /conversation/{type}/{referring}/{host}/{locale}

After: /conversation/{type}/{referring}?host=...&locale=...

If you have custom templates or JavaScript that generates conversation URLs manually, update them to use query parameters instead of path segments.