PHP 8.4: Pspell extension moved from PHP Core to PECL
The Pspell extension provides spell-checking features to PHP using Pspell or Aspell. The dependencies of this extension have not received any updates for the past few years, and the Pspell extension was moved away from PHP core to a PECL extension in PHP 8.4.
Since PHP 8.4, the Pspell extension is no longer bundled with PHP core. It is possible to install Pspell as a PECL extension.
Depending on software repositories, the Pspell extension might be available as an installable package. For example, software repositories of Debian/Ubuntu or Fedora/RHEL-based systems might continue to provide Pspell as an installable package.
The Enchant extension (part of PHP core) is another extension providing spell-checking functionality to PHP. Unlike Pspell which only supported Pspell and Aspell, Enchant provides support for a wide list of backends including Hunspell and Ispell as well as Pspell/Aspell. The Enchant extension is not a direct drop-in replacement for Pspell extension functionality.
The --with-pspell
configure flag is no longer supported. Passing this flag in the ./configure
script results in a warning:
configure: WARNING: unrecognized options: --with-pspell
Replacements for Pspell Extension
The Pspell extension is still available to install as a PECL extension. Installing the Pspell PECL extension will be the easiest upgrade path for existing PHP applications that depend on the Pspell extension.
Alternately, consider migrating to the Enchant extension.
Spell-checking libraries written in PHP might not be as complete or fast as Enchant extension, but provide a higher degree of portability.