Skip to content

RelativeSlugHandler with urilize set to true #2990

@alcohol

Description

@alcohol

See #2985 (comment) also.

It seems a missing test scenario caused a bug to sneak in.

Environment

Package

show

$ composer show --latest gedmo/doctrine-extensions
name     : gedmo/doctrine-extensions
descrip. : Doctrine behavioral extensions
keywords : Blameable, behaviors, doctrine, extensions, gedmo, loggable, nestedset, odm, orm, sluggable, sortable, timestampable, translatable, tree, uploadable
versions : * v3.21.0
released : 2025-09-22, last week
latest   : v3.21.0 released 2025-09-22, last week
type     : library
license  : MIT License (MIT) (OSI approved) https://spdx.org/licenses/MIT.html#licenseText
homepage : http://gediminasm.org/
source   : [git] https://github.com/doctrine-extensions/DoctrineExtensions.git eb53dfcb2b592327b76ac5226fbb003d32aea37e
dist     : [zip] https://api.github.com/repos/doctrine-extensions/DoctrineExtensions/zipball/eb53dfcb2b592327b76ac5226fbb003d32aea37e eb53dfcb2b592327b76ac5226fbb003d32aea37e
path     : /workdir/vendor/gedmo/doctrine-extensions
names    : gedmo/doctrine-extensions

Doctrine packages

show

$ composer show --latest 'doctrine/*'
Direct dependencies required in composer.json:
doctrine/doctrine-bundle            2.16.2 2.16.2 Symfony DoctrineBundle
doctrine/doctrine-fixtures-bundle   4.1.0  4.1.0  Symfony DoctrineFixturesBundle
doctrine/doctrine-migrations-bundle 3.4.2  3.4.2  Symfony DoctrineMigrationsBundle
doctrine/orm                        3.5.2  3.5.2  Object-Relational-Mapper for PHP

Transitive dependencies not required in composer.json:
doctrine/collections                2.3.0  2.3.0  PHP Doctrine Collections library that adds additional functionality on top of PHP arrays.
doctrine/data-fixtures              2.1.0  2.1.0  Data Fixtures for all Doctrine Object Managers
doctrine/dbal                       4.3.3  4.3.3  Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.
doctrine/deprecations               1.1.5  1.1.5  A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.
doctrine/event-manager              2.0.1  2.0.1  The Doctrine Event Manager is a simple PHP event system that was built to be used with the various Doctrine projects.
doctrine/inflector                  2.1.0  2.1.0  PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.
doctrine/instantiator               2.0.0  2.0.0  A small, lightweight utility to instantiate objects in PHP without invoking their constructors
doctrine/lexer                      3.0.1  3.0.1  PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.
doctrine/migrations                 3.9.4  3.9.4  PHP Doctrine Migrations project offer additional functionality on top of the database abstraction layer (DBAL) for versioning your database schema and easily deploying changes to it. It is a very easy to use and a powerful tool.
doctrine/persistence                4.1.0  4.1.0  The Doctrine Persistence project is a set of shared interfaces and functionality that the different Doctrine object mappers share.
doctrine/sql-formatter              1.5.2  1.5.2  a PHP SQL highlighting library

PHP version

$ php -v
PHP 8.4.12 (cli) (built: Aug 28 2025 18:19:24) (NTS)
Copyright (c) The PHP Group
Built by https://github.com/docker-library/php
Zend Engine v4.4.12, Copyright (c) Zend Technologies
    with Zend OPcache v8.4.12, Copyright (c), by Zend Technologies

Subject

When using the RelativeSlugHandler with the option urilize set to true, it no longer applies the same transformation as before version v3.21.0.

Minimal repository with the bug

Steps to reproduce

Upgrade from an older version to v3.21.0.

Expected results

Apply the transformation as always.

Actual results

Transformation is not (fully) apply to the relative field.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions