Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the placeholder for the sluggable extension when generating a slug for an identifier field #2768

Merged
merged 1 commit into from
Jun 9, 2024

Conversation

mbabker
Copy link
Contributor

@mbabker mbabker commented Feb 14, 2024

Ref: #2708

In doctrine/orm#10785 (shipped in ORM 2.16.0) a check was added to the UnitOfWork to prevent ID collisions in its internal map, which was then changed to a deprecation in doctrine/orm#10878 (shipped in ORM 2.16.1) due to its disruptiveness. That check is back in 3.0.

This PR avoids the issue by changing the ID placeholder used by the sluggable extension when it is configured to generate slugs for an identifier field to a placeholder based on uniqid() and fixes the last PHPUnit error on my hack-it-together-ORM-3-support branch.

Copy link

codecov bot commented Feb 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.91%. Comparing base (0632ab1) to head (6076c5a).
Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2768      +/-   ##
==========================================
+ Coverage   78.75%   78.91%   +0.16%     
==========================================
  Files         163      163              
  Lines        8593     8502      -91     
==========================================
- Hits         6767     6709      -58     
+ Misses       1826     1793      -33     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mbabker mbabker force-pushed the random-placeholder branch from 6ea497a to 6076c5a Compare March 8, 2024 14:40
@mbabker mbabker mentioned this pull request Mar 26, 2024
@mbabker mbabker mentioned this pull request Apr 5, 2024
@franmomu franmomu merged commit b31d2cf into doctrine-extensions:main Jun 9, 2024
18 checks passed
@franmomu
Copy link
Collaborator

franmomu commented Jun 9, 2024

Thanks @mbabker!

@mbabker mbabker deleted the random-placeholder branch June 9, 2024 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants