Problem/Motivation
The pear/archive_tar package (and its transitive dependencies pear/pear-core-minimal and pear/console_getopt) are abandoned. pear/console_getopt was officially archived on GitHub and Packagist as of February 1, 2026.
Drupal core is already working on removing pear/archive_tar in favor of PHP's native PharData class (see #3571185 and #3027290).
The Webform module directly instantiates \Archive_Tar in four places:
src/Plugin/WebformExporterBase.php-addToTarArchive()method and$archiveproperty type hintmodules/webform_devel/src/Form/WebformDevelEntityFormApiExportForm.php- tar.gz export insubmitForm()tests/src/Functional/WebformResultsExportDownloadTest.php- archive content verificationmodules/webform_entity_print/tests/src/Functional/WebformEntityPrintFunctionalTest.php- archive content verification
These should be replaced with PHP's native PharData class to eliminate the dependency on abandoned PEAR packages.
Steps to reproduce
- Run
composer why pear/console_getopt- shows the package is required transitively viapear/archive_tar. - Search the webform codebase for
\Archive_Tar- four files reference it directly.
Proposed resolution
Replace all \Archive_Tar usage with PHP's native PharData class:
- WebformExporterBase::addToTarArchive(): Replace
new \Archive_Tar($path, 'gz')withPharData. UsePharData::addFile(),PharData::addFromString(), andPharData::buildFromDirectory()for the add file/string/directory operations. Update the$archiveproperty type hint from\Archive_Tar|\ZipArchiveto\PharData|\ZipArchive. - WebformDevelEntityFormApiExportForm::submitForm(): Replace
new \Archive_Tar($path, 'gz')andaddString()calls withPharDataequivalents. - WebformResultsExportDownloadTest and WebformEntityPrintFunctionalTest: Replace
new \Archive_Tar($filepath, 'gz')andlistContent()withPharDataiteration to list archive entries.
Remaining tasks
- Create a patch replacing
\Archive_TarwithPharDatain all four files. - Verify that
PharDatacorrectly handles.tar.gzcreation, file addition, string addition, and directory addition with path modification. - Review and test.
User interface changes
None.
API changes
The protected $archive property type hint in WebformExporterBase changes from \Archive_Tar|\ZipArchive to \PharData|\ZipArchive. The addToTarArchive() method signature remains unchanged.
Data model changes
None.
Issue fork webform-3578701
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
eduardo morales albertiComment #4
eduardo morales albertiWaiting for tests
Comment #5
eduardo morales albertiPending to stabilize tests
Comment #6
eduardo morales albertiReady to review
Comment #7
eduardo morales albertiReady to review