Maho gets ready for PHP 8.6 and the one-step checkout settles down
PHP 8.6, one-step checkout, the admin queue, PostgreSQL and SQLite: the Maho roundup of what was merged from 13 to 20 November, with the fixes already backported to the 26.11 line.
A week of work under the bonnet. Maho gets ready for PHP 8.6 with the deprecations handled and the Composer lock updated, the one-step checkout stops losing the card method and stops saving the same click several times, and imports, feeds and price rules read a little less from the database. A good part of this work is already backported to the 26.11 line, so it ships with the next patch.
Highlights
- Ready for the next PHP version
- The one-step checkout keeps the card method
- The queue actions open the right page
- Fewer database reads in imports, feeds and price rules
- PostgreSQL and SQLite as first-class databases
- Bundle options keep the other titles
- Complete SOAP responses and admin texts in the right language
- Changelog
Ready for the next PHP version
#1875 by ugoparsi fixes the PHP 8.6 deprecation notices in model saves, in catalog price rules applied to the cart, in admin activity tracking and in the database helpers. The same pull request lets Composer verify the production lock against PHP 8.6 and makes the SQLite jobs of the Pest workflow run every suite on PHP 8.6, while MySQL, MariaDB and PostgreSQL stay on PHP 8.5, which is the minimum version.
#1887, again by ugoparsi, brings the runtime and dependency part of that work back to the 26.11 line. The production lock of 26.11.3 and of 26.11 selected Laminas ACL 2.18 and Lcobucci JWT 5.6, which declare support up to PHP 8.5: the updated lock touches only Laminas ACL, now 2.19.0, and Lcobucci JWT, now 5.7.0. The PHP 8.5.1 minimum stays where it is.
Two smaller fixes belong to the same effort.
#1884
removes the warning PHP 8.6 raises when it decodes an empty string: the core helper returns an empty
array for null and '' before decoding anything, and an Advanced Dataflow profile whose wizard
data is empty still opens and saves.
#1879
puts the localized options back in order: in a French store the country selector of the Create New
Customer Account page lists Canada, Égypte and Zambie in that order, and the same holds for the
country, locale, time zone and currency options in System > Configuration and for the region
lists the server sorts, such as the region filter of the admin customer grid.
For a production store the message is simple: Maho does not ask for PHP 8.6, but when the hosting offers it the code is ready, and the fixes are already on the 26.11 line for those who do not want to jump to 26.12.
The one-step checkout keeps the card method
#1896 by fballiano fixes an annoyance that showed in the one-step checkout: a customer who picked a card payment method, Authorize.net, Braintree or eWAY for instance, lost it at the next section reload. After a change of the address or of the shipping method, the payment section selected the old method again and closed the card form. The chosen method now stays selected until the order is placed.
#1895, by the same author, takes care of the other side of the coin: a click on a payment or shipping method sent one save request for every earlier reload of that section, so the checkout got slower with every address change. One click now sends one save, and a short section reload no longer flashes the white overlay: the overlay and the spinner show only when the reload takes more than 0.6 seconds.
Both fixes are backported to 26.11, so they arrive with the next patch without waiting for a new release.
The queue actions open the right page
#1881 by
fballiano untangles a
routing mistake that made the queue actions unusable from the admin. Every admin route has a
/{catchall} suffix, but the queue index route was the only admin index route with a short path,
/admin/queue, so its pattern also caught the other actions of the controller, and the index method,
declared first, handled all of them. The route becomes /{adminFrontName}/queue/{catchall} and the
grid, view, retry and other actions answer for themselves again.
Fewer database reads in imports, feeds and price rules
Three pull requests by ugoparsi remove repeated work where nobody noticed it before, because the result was right and only the time was not.
- #1891
reads fewer product and region records in
./maho import:orderswhen the file holds configurable variants or repeated regions. The orders, documents and addresses it creates stay the same: the importer passes the cart service the parent product it already loaded for that line, andResolver::regionId()keeps the result of each region lookup, found or not. - #1878
makes product feed generation lighter: each page of products reads the parent products of that
page only, not of the whole feed, and an XML feed reads its item template once instead of once per
product. The generated files do not change, and the gain covers both
./maho feed:generateand the feeds the admin and the cron generate. - #1885 cuts the time to rebuild the catalog price rule index. The indexer used to copy the growing insert batch every time it finished a product and a customer group; it now appends that group’s rows in order. The batch threshold, the rule order and the final insert stay as they were.
#1889
goes in the same direction: after Mage::reset() the message queue uses the current database
connection, so the messages sent during a product save take part in that save’s transaction. The
minute-long wait seen while saving products with new gallery images in the SQLite browser suite is
gone.
PostgreSQL and SQLite as first-class databases
#1890 by
ugoparsi removes a blocker
in the installation: a PostgreSQL or SQLite install could pass the Composer requirements and reach
the Configuration form of the web installer with its own PDO driver, but the page stopped at the
missing pdomysql error. The database connection step now checks the driver of the engine that was
selected.
#1888
fixes four bugs in the batch upserts of insertOnDuplicate(), which catalog search indexing and the
product and customer imports use. A row listing its keys in an order that is not the order of the
first row stored its values in the wrong columns, on every database, and a row with a key the first
row does not have failed with a database error instead of “Invalid data for insert”, with the
repeated key case belonging to PostgreSQL.
Bundle options keep the other titles
#1874 by
ugoparsi fixes the save of
an option of a bundle product, which deleted the default titles of unrelated options, including the
options of other bundle products, and did it even when saving in the default store view. The bug is
present in 26.11.3 and in main: the database adapter now wraps each WHERE term in parentheses
before joining them with AND, restoring the ZendDb behaviour the code comes from.
Complete SOAP responses and admin texts in the right language
#1886 by
ugoparsi fixes the truncated
responses of /api/v2soap, in plain SOAP v2 and in WS-I mode alike: a standard PHP SOAP client now
reads the full response. PHP’s SoapServer sets the length of the XML before Maho formats it, and
the adapters remove that earlier header to send the length of the final XML, keeping the formatting.
#1901 by fballiano fixes the language of the admin texts after a store email is sent. When the admin sent an order, invoice, shipment or credit memo email, a product alert or a wishlist share, the rest of that request used the storefront translations, and it happened when the admin and the store share the same locale. Messages and blocks rendered after the email use the admin translations again. OpenMage has the same defect.
Changelog
Merged to main this week:
- #1901 by fballiano: admin texts use the admin translations again after a store email is sent.
- #1896 by fballiano: the one-step checkout keeps the card method when a section reloads.
- #1895 by fballiano: one click saves a method once, and the overlay shows past 0.6 seconds.
- #1891
by ugoparsi: fewer product
and region reads in
./maho import:orders. - #1889
by ugoparsi: the queue
uses the current connection after
Mage::reset(). - #1888 by ugoparsi: batch upserts with the right columns and keys.
- #1890 by ugoparsi: PostgreSQL and SQLite installs without the MySQL PDO driver.
- #1885 by ugoparsi: faster catalog price rule reindex.
- #1887 by ugoparsi: PHP 8.6 compatibility backported to the 26.11 line.
- #1884 by ugoparsi: no warning when decoding empty data on PHP 8.6.
- #1878 by ugoparsi: less repeated work in product feed generation.
- #1879 by ugoparsi: localized country and region sorting on PHP 8.6.
- #1880 by ugoparsi: date-dependent tests around midnight UTC, with no change to application code.
- #1881 by fballiano: the queue actions open the right page.
- #1875 by ugoparsi: PHP 8.6 deprecations fixed and SQLite suites run on PHP 8.6.
- #1874 by ugoparsi: bundle options keep the titles of the other options.
- #1886 by ugoparsi: complete SOAP v2 and WS-I responses.
Backported to the 26.11 line by the backport bot, ready for the next patch: #1903, #1902, #1904, #1899, #1898, #1897, #1893, #1892, #1883, #1882, #1877.
Text prepared with the help of AI and checked against the source before publication. It can still contain mistakes: if you find one, report it.Read the manifesto
Does your store still sell?
Tell us where you are starting from: we reply with a first assessment, no strings attached.
Ask for the store assessment