Skip to content

fix(isbn13): update ISBN-13 generation logic and examples#1052

Open
Hikingyo wants to merge 2 commits into
FakerPHP:1.24from
Hikingyo:1051_ibsn13_and_ismn
Open

fix(isbn13): update ISBN-13 generation logic and examples#1052
Hikingyo wants to merge 2 commits into
FakerPHP:1.24from
Hikingyo:1051_ibsn13_and_ismn

Conversation

@Hikingyo
Copy link
Copy Markdown

@Hikingyo Hikingyo commented Apr 17, 2026

What is the reason for this PR?

Author's checklist

FakerPHP/fakerphp.github.io#119

Summary of changes

Bug fix

isbn13() could generate codes starting with 9790, which is the reserved
prefix for ISMN (International Standard Music Number), not ISBN-13.

The generation logic now correctly restricts the 979 prefix range to
97919799.

New feature

A dedicated ismn() method has been added to generate valid ISMN codes
(prefix 9790 + 8 digits + EAN-13 checksum).

Review checklist

  • All checks have passed
  • Changes are added to the CHANGELOG.md
  • Changes are approved by maintainer

@Hikingyo Hikingyo marked this pull request as ready for review April 17, 2026 10:20
@Hikingyo Hikingyo changed the base branch from 2.0 to 1.24 April 17, 2026 15:12
@Hikingyo Hikingyo force-pushed the 1051_ibsn13_and_ismn branch from 6effca0 to 84d71d7 Compare April 17, 2026 15:35
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.

Barcode::isbn13() can generate ISMN codes (prefix 9790)

1 participant