Skip to content

Port the missing 6.18.0 changes and changelog to development - #1985

Merged
jakejackson1 merged 7 commits into
developmentfrom
chore/port-6.18.0
Oct 28, 2026
Merged

jakejackson1 merged 7 commits into
developmentfrom
chore/port-6.18.0

Conversation

@gravitypdf-bot

@gravitypdf-bot gravitypdf-bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Several fixes merged into hot-patch-6.18.0 before the "development first" workflow never reached development, and its changelog stopped at the template uploader entries. This PR ports everything from the 6.18.0 release that development is missing and still needs. Each change follows the code that shipped in 6.18.0, with the tests rewritten for the integration suite.

Try it

yarn test:js
yarn test:php
yarn test:php:multisite
git diff origin/development -- CHANGELOG.md

Test plan

  • The 6.18.0 and 6.17.2 changelog sections match hot-patch-6.18.0
  • With Debug Mode on, export entries with a PDF column for an inactive PDF: the cell is empty
  • Template Manager: upload a .txt renamed to .zip, then a zip with no template. Each shows its reason, and the second links to the docs
  • The docs link under Add New Template is a plain underlined link, and still works with DISALLOW_FILE_MODS
  • Font Manager: upload a bad font file, then replace it with a valid one. The malformed font banner clears
  • CI is green
More info

How the gap was found. Every PR merged into hot-patch-6.18.0 was matched to its development counterpart, by PR body or by checking the code on development. Most were built on development first, or forward-ported as with #1863. These weren't, and still apply.

Left out on purpose:

Behaviour notes for 7.0:

  • mPDF now comes from GravityPDF/mpdf dev-gravitypdf-v6 (locked at e7f7b2a8, 3 CI-only commits past the 2a88146a that 6.18.0 locks). It is upstream development at a981bb7b plus Drop float records the layout has already buried (v6) mpdf#819 (float pruning) and Clear mPDF cache when font is deleted #820 (Cache accepts a share that is_writable() calls read-only), so it also picks up the upstream fixes since 389e19e7. If 7.0 moves to a different fork branch, keep those two fixes.
  • The newer upstream mPDF adds an $importExternalLinks argument to importPage(). GFPDF\Helper\Mpdf\Mpdf::importPage() now takes mPDF's own arguments, and still treats a non-string second argument, or more than four arguments, as the mPDF 7 form legacy templates use. Previously a call in mPDF's form lost its box and flags (importPage( 1, 'MediaBox' ) imported the CropBox). The change drops two PHPStan baseline entries. It may be worth a 7.0 changelog line.
  • A site upgrading from 6.17.x straight to 7.0 runs the 6.18.0 upgrade block, so it gets the rich text merge tag flag. A site already on 6.18.0 has it from that upgrade. Fresh installs skip the 6.18.0 block ($old_version !== ''), as on the hot-patch.
  • convertDeprecationsToExceptions is safe on development, because its bootstrap already masks E_DEPRECATED only while Gravity Forms loads, then restores it. Full single-site and multisite runs pass with it on.
  • tests/phpunit/snapshots/public-api.txt gains Helper_Abstract_Fields::PROCESS_SUBMITTED_RICH_TEXT_MERGE_TAGS (inherited by every field class) and the two Helper_Templates message methods.
  • The template upload endpoint now answers with wp_send_json() instead of wp_die( wp_json_encode() ), matching 6.18.0.

Local runs (PHP 8.5, WP integration env): PHPUnit single site 2,103 tests passing. Multisite 2,090 passing on the last run. Multisite has one intermittent error in Test_Controller_Custom_Fonts::test_delete_item_with_font_reference_gone_success (add_pdf_font() returned no font). It fails about 2 in 12 runs of that class, on the previous upstream-mPDF build too, so it's an existing flake and not caused by the fork. Jest 501 passing. One earlier single-site run failed Test_PDF::test_cleanup_tmp_dir_uncached_max_age_is_filterable, which passed in isolation, in its class, and in a full rerun, so it looks like an ordering flake that this diff doesn't touch.

Brings over the 6.18.0 fixes that were merged into hot-patch-6.18.0 but never
reached development (#1841, #1842, #1843, #1849, #1926, #1927, #1980, #1981,
#1978), the monolog 2.11.1 / fpdi 2.6.9 bumps from #1924, and the 6.18.0 and
6.17.2 changelog sections. Tests are rewritten for the integration suite, and
the public API snapshot picks up the new constant and template message helpers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gravitypdf-bot gravitypdf-bot added Bug dependencies Pull requests that update a dependency file run-tests labels Oct 28, 2026
@socket-security

socket-security Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedcomposer/​monolog/​monolog@​2.11.0.0 ⏵ 2.11.1.010010090100100

View full report

@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Coverage report for commit: b23e67f
File: ./tmp/jest-coverage/clover.xml

Cover ┌─────────────────────────┐ Freq.
   0% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  10% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  20% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  30% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  40% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  50% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  60% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  70% │ █░░░░░░░░░░░░░░░░░░░░░░ │  1.5%
  80% │ ██░░░░░░░░░░░░░░░░░░░░░ │  6.0%
  90% │ ███████░░░░░░░░░░░░░░░░ │ 19.4%
 100% │ ███████████████████████ │ 73.1%
      └─────────────────────────┘
 *Legend:* █ = Current Distribution 
Summary - Lines: 93.55% | Methods: 88.95% | Branches: 82.60%
FilesLinesMethodsBranches
src/assets/js/react/actions
   coreFonts.js100.00%100.00%100.00%
   fontManager.js100.00%100.00%100.00%
   templates.js100.00%100.00%100.00%
src/assets/js/react/components/Alert
   Alert.js100.00%100.00%100.00%
src/assets/js/react/components/CoreFonts
   CoreFontContainer.js100.00%100.00%91.43%
   CoreFontCounter.js100.00%100.00%100.00%
   CoreFontListResults.js100.00%100.00%85.71%
   CoreFontListSpacer.js100.00%100.00%100.00%
src/assets/js/react/components
   CustomHashRouter.js100.00%100.00%100.00%
   Empty.js100.00%100.00%100.00%
   ShowMessage.js80.65%80.00%72.22%
   Spinner.js100.00%100.00%100.00%
src/assets/js/react/components/FontManager
   AddFont.js100.00%100.00%100.00%
   AddUpdateFontFooter.js85.37%50.00%88.89%
   AdvancedButton.js100.00%100.00%100.00%
   FontList.js100.00%50.00%65.22%
   FontListAlertMessage.js100.00%100.00%100.00%
   FontListHeader.js100.00%100.00%100.00%
   FontListIcon.js100.00%100.00%100.00%
   FontListItems.js85.39%64.00%68.66%
   FontListSkeleton.js100.00%100.00%100.00%
   FontManager.js77.78%57.14%50.00%
   FontManagerBody.js96.30%96.43%90.29%
   FontManagerHeader.js100.00%100.00%100.00%
   FontVariant.js90.00%60.00%70.00%
   FontVariantLabel.js100.00%100.00%100.00%
   InitialAddUpdateState.js100.00%100.00%100.00%
   SearchBox.js90.00%66.67%69.23%
   TemplateTooltip.js100.00%75.00%100.00%
   UpdateFont.js75.00%50.00%75.00%
src/assets/js/react/components/Modal
   CloseDialog.js93.33%66.67%70.59%
src/assets/js/react/components/Template
   TemplateActivateButton.js100.00%100.00%100.00%
   TemplateButton.js85.71%66.67%100.00%
   TemplateContainer.js71.43%66.67%25.00%
   TemplateDeleteButton.js100.00%100.00%70.00%
   TemplateDocsLink.js100.00%100.00%100.00%
   TemplateFooterActions.js100.00%100.00%100.00%
   TemplateHeaderNavigation.js82.35%85.71%70.00%
   TemplateHeaderTitle.js100.00%100.00%100.00%
   TemplateList.js100.00%100.00%100.00%
   TemplateListItem.js100.00%100.00%92.86%
   TemplateListItemComponents.js100.00%100.00%100.00%
   TemplateManagerClosed.js100.00%100.00%100.00%
   TemplateScreenshot.js100.00%100.00%100.00%
   TemplateScreenshots.js100.00%100.00%50.00%
   TemplateSearch.js93.75%88.89%50.00%
   TemplateSingle.js100.00%100.00%100.00%
   TemplateSingleComponents.js100.00%100.00%75.00%
   TemplateUploader.js100.00%100.00%95.00%
   TemplateUploaderContext.js100.00%100.00%100.00%
   TemplateUploaderTile.js100.00%100.00%100.00%
src/assets/js/react/reducers
   coreFontReducer.js95.65%100.00%88.00%
   fontManagerReducer.js86.25%75.00%75.71%
   index.js100.00%100.00%100.00%
   templateReducer.js100.00%100.00%100.00%
src/assets/js/react/sagas
   coreFonts.js91.67%100.00%75.00%
   fontManager.js86.96%90.00%83.33%
   index.js100.00%100.00%100.00%
   templates.js91.30%100.00%100.00%
src/assets/js/react/selectors
   getTemplates.js91.11%100.00%83.33%
src/assets/js/react/utilities/FontManager
   adjustFontListHeight.js100.00%100.00%100.00%
   associatedFontManagerSelectBox.js94.44%100.00%66.67%
   fontManagerReducer.js100.00%100.00%100.00%
   getTabLocation.js100.00%100.00%100.00%
   toggleUpdateFont.js100.00%100.00%100.00%
src/assets/js/react/utilities/Template
   hasPendingUpload.js100.00%100.00%100.00%
src/assets/js/react/utilities
   withRouterHooks.js100.00%100.00%100.00%

🤖 Jest coverage report

@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Coverage report for commit: b23e67f
File: tmp/coverage/report-xml/merged.xml

Cover ┌─────────────────────────┐ Freq.
   0% │ ██████░░░░░░░░░░░░░░░░░ │  8.7%
  10% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  20% │ █░░░░░░░░░░░░░░░░░░░░░░ │  0.5%
  30% │ █░░░░░░░░░░░░░░░░░░░░░░ │  1.4%
  40% │ █░░░░░░░░░░░░░░░░░░░░░░ │  0.5%
  50% │ ███████░░░░░░░░░░░░░░░░ │  9.2%
  60% │ █░░░░░░░░░░░░░░░░░░░░░░ │  0.9%
  70% │ ██░░░░░░░░░░░░░░░░░░░░░ │  2.8%
  80% │ ████████████░░░░░░░░░░░ │ 17.4%
  90% │ ███████████████████████ │ 33.5%
 100% │ ██████████████████░░░░░ │ 25.2%
      └─────────────────────────┘
 *Legend:* █ = Current Distribution 
Summary - Lines: 88.43% | Methods: 95.16%
FilesLinesMethodsBranches
/var/www/html/wp-content/plugins/gravity-pdf
   api.php98.06%100.00%100.00%
   gravity-pdf-updater.php53.97%100.00%100.00%
   pdf.php59.82%81.25%100.00%
/var/www/html/wp-content/plugins/gravity-pdf/src/Controller
   Controller_Actions.php99.07%100.00%100.00%
   Controller_Activation.php95.65%100.00%100.00%
   Controller_Custom_Fonts.php94.04%100.00%100.00%
   Controller_Debug.php100.00%100.00%100.00%
   Controller_Export_Entries.php96.77%100.00%100.00%
   Controller_Form_Settings.php87.37%90.00%100.00%
   Controller_Install.php100.00%100.00%100.00%
   Controller_Mergetags.php100.00%100.00%100.00%
   Controller_PDF.php81.46%100.00%100.00%
   Controller_Pdf_Cache.php100.00%100.00%100.00%
   Controller_Pdf_Queue.php85.27%87.50%100.00%
   Controller_Save_Core_Fonts.php88.89%100.00%100.00%
   Controller_Settings.php86.90%100.00%100.00%
   Controller_Shortcodes.php100.00%100.00%100.00%
   Controller_System_Report.php100.00%100.00%100.00%
   Controller_Templates.php100.00%100.00%100.00%
   Controller_Uninstaller.php83.33%77.78%100.00%
   Controller_Upgrade_Routines.php93.90%100.00%100.00%
   Controller_Webhooks.php100.00%100.00%100.00%
   Controller_Zapier.php100.00%100.00%100.00%
/var/www/html/wp-content/plugins/gravity-pdf/src/Exceptions
   GravityPdfDatabaseUpdateException.php50.00%100.00%100.00%
   GravityPdfDomainException.php50.00%100.00%100.00%
   GravityPdfException.php50.00%100.00%100.00%
   GravityPdfFontNotFoundException.php50.00%100.00%100.00%
   GravityPdfIdException.php50.00%100.00%100.00%
   GravityPdfModelNotUpdatedException.php50.00%100.00%100.00%
   GravityPdfNotATemplateException.php50.00%100.00%100.00%
   GravityPdfRuntimeException.php50.00%100.00%100.00%
   GravityPdfShortcodeEntryIdException.php50.00%100.00%100.00%
   GravityPdfShortcodePdfConditionalLogicFailedException.php50.00%100.00%100.00%
   GravityPdfShortcodePdfConfigNotFoundException.php50.00%100.00%100.00%
   GravityPdfShortcodePdfInactiveException.php50.00%100.00%100.00%
/var/www/html/wp-content/plugins/gravity-pdf/src/Helper/Fields
   Field_Address.php92.86%100.00%100.00%
   Field_Chainedselect.php66.67%75.00%100.00%
   Field_Checkbox.php94.44%100.00%100.00%
   Field_Consent.php94.74%100.00%100.00%
   Field_Coupon.php--100.00%
   Field_Creditcard.php83.33%100.00%100.00%
   Field_Date.php83.33%100.00%100.00%
   Field_Default.php83.33%100.00%100.00%
   Field_Discount.php44.00%75.00%100.00%
   Field_Email.php83.33%100.00%100.00%
   Field_Fg_Ls_Consent.php92.86%100.00%100.00%
   Field_Fg_Ls_Signature.php73.08%66.67%100.00%
   Field_Fileupload.php95.83%100.00%100.00%
   Field_Form.php90.91%100.00%100.00%
   Field_Hidden.php81.82%100.00%100.00%
   Field_Html.php89.47%100.00%100.00%
   Field_Image_Choice.php86.67%100.00%100.00%
   Field_Likert.php97.22%100.00%100.00%
   Field_List.php92.41%100.00%100.00%
   Field_Multi_Choice.php50.00%100.00%100.00%
   Field_Multiselect.php92.59%100.00%100.00%
   Field_Name.php84.62%100.00%100.00%
   Field_Number.php83.33%100.00%100.00%
   Field_Option.php96.15%100.00%100.00%
   Field_Page.php83.33%100.00%100.00%
   Field_Phone.php94.55%100.00%100.00%
   Field_Poll.php93.75%100.00%100.00%
   Field_Post_Category.php85.00%100.00%100.00%
   Field_Post_Content.php82.35%100.00%100.00%
   Field_Post_Custom_Field.php50.00%100.00%100.00%
   Field_Post_Excerpt.php81.82%100.00%100.00%
   Field_Post_Image.php94.00%100.00%100.00%
   Field_Post_Tags.php90.91%100.00%100.00%
   Field_Post_Title.php81.82%100.00%100.00%
   Field_Product.php92.31%100.00%100.00%
   Field_Products.php84.32%100.00%100.00%
   Field_Quantity.php84.62%100.00%100.00%
   Field_Quiz.php89.74%100.00%100.00%
   Field_Radio.php94.74%100.00%100.00%
   Field_Rank.php95.24%100.00%100.00%
   Field_Rating.php95.24%100.00%100.00%
   Field_Repeater.php97.39%100.00%100.00%
   Field_Section.php90.74%100.00%100.00%
   Field_Select.php94.12%100.00%100.00%
   Field_Shipping.php92.86%100.00%100.00%
   Field_Signature.php71.11%100.00%100.00%
   Field_Slim.php82.35%100.00%100.00%
   Field_Slim_Post.php91.30%100.00%100.00%
   Field_Subtotal.php65.38%75.00%100.00%
   Field_Survey.php95.00%100.00%100.00%
   Field_Tax.php32.00%50.00%100.00%
   Field_Text.php81.82%100.00%100.00%
   Field_Textarea.php91.18%100.00%100.00%
   Field_Time.php81.82%100.00%100.00%
   Field_Tos.php92.68%100.00%100.00%
   Field_Total.php88.00%100.00%100.00%
   Field_Website.php85.71%100.00%100.00%
/var/www/html/wp-content/plugins/gravity-pdf/src/Helper/Fonts
   FlushCache.php92.31%100.00%100.00%
   LocalFile.php88.89%100.00%100.00%
   LocalFilesystem.php66.67%100.00%100.00%
   SupportsOtl.php87.50%100.00%100.00%
   TtfFontValidation.php84.62%100.00%100.00%
/var/www/html/wp-content/plugins/gravity-pdf/src/Helper
   Helper_Abstract_Addon.php94.09%100.00%100.00%
   Helper_Abstract_Config_Settings.php75.00%100.00%100.00%
   Helper_Abstract_Controller.php-100.00%100.00%
   Helper_Abstract_Field_Products.php89.47%66.67%100.00%
   Helper_Abstract_Fields.php96.10%95.83%100.00%
   Helper_Abstract_Fields_Input_Type.php84.00%100.00%100.00%
   Helper_Abstract_Form.php--100.00%
   Helper_Abstract_Model.php100.00%100.00%100.00%
   Helper_Abstract_Options.php77.13%79.66%100.00%
   Helper_Abstract_Pdf_Shortcode.php94.67%95.65%100.00%
   Helper_Abstract_View.php96.77%100.00%100.00%
   Helper_Async_Notifications.php64.29%100.00%100.00%
   Helper_Data.php98.29%100.00%100.00%
   Helper_Field_Container.php92.31%100.00%100.00%
   Helper_Field_Container_Gf25.php92.00%100.00%100.00%
   Helper_Field_Container_Void.php16.67%-100.00%
   Helper_Form.php80.65%64.29%100.00%
   Helper_Interface_Actions.php-100.00%100.00%
   Helper_Interface_Config.php50.00%100.00%100.00%
   Helper_Interface_Config_Settings.php50.00%100.00%100.00%
   Helper_Interface_Deprecated_Features.php-100.00%100.00%
   Helper_Interface_Extension_Settings.php-100.00%100.00%
   Helper_Interface_Extension_Uninstaller.php-100.00%100.00%
   Helper_Interface_Field_Pdf_Config.php50.00%100.00%100.00%
   Helper_Interface_Filters.php-100.00%100.00%
   Helper_Interface_Setup_TearDown.php50.00%100.00%100.00%
   Helper_Interface_Url_Signer.php-100.00%100.00%
   Helper_Logger.php-100.00%100.00%
   Helper_Misc.php89.17%100.00%100.00%
   Helper_Mpdf.php50.00%100.00%100.00%
   Helper_Notices.php92.98%100.00%100.00%
   Helper_Options_Fields.php98.13%100.00%100.00%
   Helper_PDF.php88.89%97.50%100.00%
   Helper_PDF_List_Table.php84.50%92.31%100.00%
   Helper_Pdf_Queue.php84.31%100.00%100.00%
   Helper_QueryPath.php80.00%100.00%100.00%
   Helper_Render_Health.php85.71%100.00%100.00%
   Helper_Sha256_Url_Signer.php90.91%100.00%100.00%
   Helper_Singleton.php100.00%100.00%100.00%
   Helper_Templates.php97.29%100.00%100.00%
   Helper_Trait_Logger.php25.00%-100.00%
   Helper_Trait_Removed_Methods.php100.00%100.00%100.00%
   Helper_Url_Signer.php84.82%100.00%100.00%
/var/www/html/wp-content/plugins/gravity-pdf/src/Helper/Licensing
   EDD_SL_Plugin_Updater.php94.83%100.00%100.00%
/var/www/html/wp-content/plugins/gravity-pdf/src/Helper/Log
   Context_Logger.php80.00%100.00%100.00%
Table truncated to fit comment

🤖 PHPUnit coverage report

gravitypdf-bot and others added 2 commits October 28, 2026 16:03
PHPStan only counted the calls before $file was assigned as throw points, so it
read $file as always null in the catch and flagged the new upload error check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gravitypdf-bot gravitypdf-bot added the update-visual-baselines Refresh Lost Pixel visual baselines from this PR's run (pair with run-tests) label Oct 28, 2026
github-actions Bot and others added 2 commits October 28, 2026 05:08
…alls read-only

6.18.0 ships this as a php-scoper patcher (#1812), later moved into the mPDF fork
(#1951). Development still bundles upstream mPDF, and the #1819 port left the
patcher out, so 7.0 would bring back the "Temporary files directory is not
writable" error that the 6.18.0 changelog says is fixed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gravitypdf-bot gravitypdf-bot removed the update-visual-baselines Refresh Lost Pixel visual baselines from this PR's run (pair with run-tests) label Oct 28, 2026
gravitypdf-bot and others added 2 commits October 28, 2026 16:21
Development still locked upstream mPDF, so 7.0 lacked the two fixes 6.18.0 ships
from the fork (#1951): GravityPDF/mpdf#819 drops float records a new float has
buried, which PDF for GravityView 2.0+ relies on for long directory PDFs, and
GravityPDF/mpdf#820 stops Cache rejecting a writable network share that
is_writable() calls read-only. That makes the scoper patcher from the previous
commit unnecessary, so it goes again. Ports #1951's float pruning tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…F 7 ones

The fork's mPDF (upstream a981bb7b) adds an $importExternalLinks argument to
importPage(), which PHPStan flagged against our override's mPDF 7 $crop_w. The
override only understood the mPDF 7 form, so a caller using mPDF's own form
lost its box and flags: importPage( 1, 'MediaBox' ) imported the CropBox.

The override now takes mPDF's arguments and treats a non-string second argument
or more than four arguments as the mPDF 7 form, as before. This also drops the
two baseline entries the old signature needed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jakejackson1
jakejackson1 merged commit 9e631e9 into development Oct 28, 2026
19 checks passed
@jakejackson1
jakejackson1 deleted the chore/port-6.18.0 branch October 28, 2026 05:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug dependencies Pull requests that update a dependency file run-tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants