Appearance
<div style="display: none;" hidden="true" aria-hidden="true">Are you an LLM? You can read better optimized documentation at /changelog/Changelog.4.127.md for this page in Markdown format</div>
Version 4
version 4.127
- [4.127.0] fix(migrations): fail pull requests that add two migrations with the same version, instead of failing at deploy (#920). A migration's version is the leading digits of its filename, and Phinx aborts both
migrateandstatuswhen two files share one, soinit_migrate.phpexited non-zero at deploy and the database was never provisioned. Upstream and client forks create migrations independently (often with round-hour timestamps), so an upstream merge into a fork could bring in such a clash and nobody noticed before deploy. A new script,.docker/scripts/ci/check-migration-versions.sh, now runs on every pull request in both pipelines (Bitbucket "Migration Version Gate", GitHubmigration-version-gate), lists every shared version with all its files, and exits non-zero. The resolution rule (upstream keeps its version, the fork renumbers its own migration and fixes the log row of databases where it already ran) is documented indocs/guides/Migrations.md, section "Version collisions (client forks)". - [4.127.0] feat(rest/checkout): PayPal for headless clients (#916).
paypaladvancedcan be selected for external frontends.confirm-paymentnow captures the approved PayPal order and confirms only when its completed captures come to exactly the order total in the order currency. An approved order whose amount is not the order total is not captured (the buyer is not charged; the client seesconfirmed: false) and is logged at error level, as are completed captures that do not match. A repeated call does not capture twice. PayPal shows the merchant'ssite_nameinstead ofAdvEshop, for both PayPal adapters (an empty name is omitted, so PayPal shows the business name of the merchant's PayPal account). A payment confirmed at the gateway for an order that is no longerPENDINGis logged at error level for a refund.PayPalRestApisends explicit timeouts (connect 3 s, request 15 s) and authenticates on first use instead of in its constructor (#544). The incomplete-orders job no longer cancels a pendingpaypaladvancedorder before 180 minutes (#555 item 4). REST 1.114. - [4.127.0] fix(checkout): CardLink payments from a headless client no longer overflow the bank's callback field (#915). The client
returnUrl/cancelUrlfromPOST /rest/checkout/place-orderwere appended to the gateway callback as?advReturnUrl=(#734), and CardLink (alpha,eurobank) sends that callback asconfirmUrl/cancelUrl, capped by the bank at 128 characters, so a realistic client URL made the field over-long. Both URLs are now stored on the order (shop_order.client_return_url/client_cancel_url), the callbacks are the bare legacy routes again, and the callback arms read the stored URL for their leg (alpha/eurobankboth legs,ethniki/ethniki_eesuccess). A valid CardLink callback for an order that is no longerPENDING(the bank's delayed background copy, or a repeated POST) now also redirects a REST customer there instead of showing the payment-inactive page. Storefront orders leave the columns NULL and render exactly as before. Customer erasure clears both columns. REST 1.113. - [4.127.0] feat(rest/checkout):
GET /rest/checkout/payment-methodssays how to present each payway (#732). Every entry gainskind(offline,bank_code,redirect,embedded,widget; open-ended) andredirectMethod(GET/POSTforredirect, elsenull), so a headless client no longer needs its own payway table and can tell an unpaidpaybybankorder from a completed offline one.requiresRedirectstays, now derived fromkind. Every registrable payway has an Englishlabel. REST API version 1.112. - [4.127.0] feat(notifications): push notifications for the mobile apps, for order updates and for marketing (#559). A new
Advisable\Domains\Notificationservice registers app installs (signed in or not), stores consent per category (orderson by default;promosandnewsonly after an express opt-in), queues one delivery per device and sends through FCM HTTP v1 after the response and from the newDispatchNotificationsjob (every minute), with retries, dead-token handling and a log row per customer in the message history (message_typePUSH). Every send is re-checked against the device as it is then: a withdrawn consent, or a device now signed in as someone else, skips it. Order pushes follow the order emails and SMS the customer already gets (Adv_mailer::order_complete / order_has_been_updated / order_is_on_store,sendSmsForOrder()andsendSmsForOrderId()), at most one per order per save. Settings → Customer notifications (now open to the Admin role) gains a push switch, a marketing daily cap, quiet hours, test customers, retention periods and a per-event table: customer email on/off, push mode (off / alongside email or SMS / instead of SMS for app users) and editable push texts with{serial}and{status}. A new ecommercen Plus → Marketing → Push notifications page lets the Marketing role compose, target (everyone who opted in, an Audience, one customer), schedule, test-send, send and cancel pushes and see sent / failed / opened counts. The dailyPruneNotificationsjob deletes devices inactive for 90 days and delivery history older than 12 months (both editable), and deleting a customer account deletes their notification data. OneSignal is deprecated. REST API version 1.111. Nothing is sent until a shop enables push and theFCM_SERVICE_ACCOUNT_JSONsecret is deployed. - [4.127.0] feat(rest/product):
GET /rest/product/product(and/item) acceptsfilter[averageRatingGte]andfilter[reviewCountGte], inclusive lower bounds onshop_product.average_rating/review_count, so a «4 stars and up» tier is one server-side request (#787).filter[averageRatingGte]=4returns products rated 4.0, 4.5 and 5.0. The exactfilter[averageRating]/filter[reviewCount]keys are unchanged. A non-numeric bound is ignored for that key only, like the #642 price bounds. The discount half of #787 is deliberately not added: the yes/no Omnibusfilter[priceDrop](REST 1.106) serves the discount facet, and a bound on the rawdiscount_percentcolumn would disagree with the displayed discount inside a special window. REST API version 1.110. - [4.127.0] feat(rest/auth): refresh tokens rotate with reuse detection:
POST /rest/auth/customer/refreshand/rest/auth/admin/refreshreturn a newrefresh_tokenthat lives a full refresh lifetime from the refresh, so a customer who keeps using the app stays signed in (Advisable-com/ecommercen#790) - [4.127.0] fix/perf(eshop): related products on the product page no longer run the category and vendor queries on every product view (#913).
Adv_related_product_model::getRelatedProductsCategory()andgetRelatedProductsVendor()now read through pscache (default L2 TTL, cleared by the admin "products" cache clear), keyed per category / per vendor, via new public uncached model methodscategoryTopProducts()andvendorTopProducts(). They fetch limit+1 rows and drop the current product in PHP, so the cache key does not depend on the product. On Evripidis the uncached category query took 4.5 s on a 233k-product category; it now runs once per category per language per TTL instead of once per product view. - [4.127.0] fix(eshop): the category tier now filters
shop_vendor_muiby language; multilingual shops could previously showvendor_name/vendor_slugin another language. - [4.127.0] Behaviour changes: a product hand-linked to itself is no longer shown in its own related list (Lp tier). With a null category id, the category tier now uses the product's most specific category (not the parent of another of its categories; lowest id on ties) instead of an arbitrary one.
- [4.127.0] Hardening:
fixWhere()now reads the escape flag from index 2 of a condition array (was index 1); product ids are cast to int in all four tiers (Lp, line, category, vendor). - [4.127.0] fix(eshop):
Adv_product_model::get_mui_records()no longer always sorts withORDER BY RAND(). The$randomparameter defaults tofalse, but the check was!is_null($random), so every call sorted randomly and MySQL had to sort the whole matching set. The random order now applies only when a caller passes a truthy$random. No caller in main uses this method; behaviour only changes for callers that did not ask for a random order. - [4.127.0] perf(price-tracking): storefront product parser no longer builds the full price-drop timeline for every product on every render (#912).
Adv_product_parser_model::get()built a day-by-day timeline per product on each parse; measured ~14 ms PHP per 40-product parse on a 1.71M-product catalogue (SQL ~1.2 ms), multiplied by 3-4 parses per request with a cart. New storefront-only methodsGraphService::storefrontPricesBulk(array $productIds)andGraphService::storefrontPrices(int $productId)(andPriceDropVerdictCalculator::noClaimVerdict()) skip that work, andAdv_product_parser_model::setPriceTracking()now callsstorefrontPrices(). The tail ofPriceDropVerdictCalculator::parseResponse()was extracted into a newprotected applyCurrentPrice(). Behaviour: withPRICE_TRACK.ENABLEDoff and all four graph settings off (ENABLED_GRAPH,ENABLED_ALL_GRAPH,ENABLED_GRAPH_PRODUCT_CARD,ENABLED_GRAPH_PRODUCT_PAGE), the parser makes no price-tracking DB calls and every product gets the empty verdict. WithPRICE_TRACK.ENABLEDon and no graph setting on, a product that cannot show a price-drop claim getsprices = []instead of its timeline;referencePrice,saveValue,shouldDisplayanddiscountPassare unchanged. With any graph setting on, output is unchanged (full verdict, includingprices), whateverPRICE_TRACK.ENABLEDis. RESTGET /rest/product/price-tracking/graph*, legacy/api/priceTracking/*and the TrackPrices job (PriceDropRefresher) are untouched and keep usingproductPricesBulk()/productPrices(). - [4.127.0] fix(http): verify outbound TLS in development against the current CA store instead of the 2018
cacert.pembundle (#908). Development only: inENVIRONMENT=developmentintegrations verified TLS againstapplication/config/cacert.pem, a Mozilla bundle frozen at 2018-06-20, so services with newer roots failed locally withcURL error 60(for example the VIES VAT lookupPOST /rest/checkout/vat-numberansweredunverified). A new helperAdvisable\Support\Http\TlsVerify::option()(backed by the new direct dependencycomposer/ca-bundle) returns the OS/PHP-configured CA store when present (for exampleopenssl.cafile), otherwise the package's bundled Mozilla list, in development, andtrueotherwise. All 30src/Guzzle clients that setverifynow call it (Apifon, Cloudflare, Domains/Tax VIES/AADE, Europharmacy, Manago, Marketdata, Moosend, Omni, OpenStreetMaps, PayByBank, Jcc, Klarna, PayPal, Public2P, Recaptcha, Advisable Services trait, Shopflix, Shopify, Skroutz, the Acs/Asap/BoxNow/DailyCourier/Dhl/GenikiV2/Qualco/Skroutz transporters, BunnyStream, VivaWallet, Yuboto). Staging and production behaviour is unchanged (verify => true).application/config/cacert.pemis kept and refreshed to the current Mozilla bundle (as of 2026-08-13) because some client forks read it directly; main no longer reads it.
Notes
- [4.127.0] Client forks: after merging this release, the fork's PR pipelines run the gate. A collision already present in a fork will now fail its pull requests until the fork's migration is renumbered as described in
docs/guides/Migrations.md. A fork with a customizedbitbucket-pipelines.ymlshould keep the new "Migration Version Gate" step when resolving merge conflicts. - [4.127.0] The duplicate-migration-version gate (#920) needs no migration, REST contract change or config key.
- [4.127.0] Check for overrides:
PayPalAdapter::__construct()andPayPalExpressAdapter::__construct()now require$brandName. A fork that builds either adapter itself must pass it, for exampleconfig_item('site_name').PayPalRestApi::__construct()gains optional$timeout,$connectTimeoutand$client, and makes no network call, so a fork that relied on construction failing fast on bad credentials now sees the failure on the first call (logged, same return values). - [4.127.0] Storefront PayPal Advanced: its abandoned orders are now cancelled after 180 minutes instead of on the next 5-minute run, and only when PayPal answers that nothing was captured: a failed PayPal read or a capture PayPal holds for review no longer cancels the order, it is checked again on the next run. An order PayPal answers
404for (unknown on the configured account) is still cancelled. A completed capture on an order still pending after the 180 minutes is logged at error level on every run, for a manual decision or a refund. The legacypaypal(NVP) payway is unchanged. - [4.127.0] REQUIRES
php migrator.php migrate:20261010120000_add_client_return_urls_to_shop_order.php— two nullableTEXTcolumns onshop_order(#915).20261009120000_create_notification_tables.php— sixnotification_*tables (#559).
- [4.127.0] Check for overrides: a fork that overrides
PaymentCallbackUrlBuilder::confirmationUrl()/failureUrl()and appends a client URL itself, or overridesAdv_checkout::redirectToClientReturnUrl()(now(object $order, bool $succeeded)), must follow the new shape;PaymentCallbackUrlBuilder::CLIENT_RETURN_URL_PARAMis removed. - [4.127.0] Deploy window: an order placed before the deploy whose gateway callback arrives after it renders this deployment's page instead of redirecting to the client; it is settled normally.
- [4.127.0] Check for overrides:
Advisable\Domains\Checkout\Payment\PaymentAdapterInterface::supportsRedirect()is replaced bypresentation(): PaymentPresentation. ACustom\payment adapter in a fork is a load-time fatal until it implementspresentation(); return the presentation itsinitializePayment()actually produces (for examplePaymentPresentation::redirect(PaymentPresentation::METHOD_POST)when it builds a POSTPaymentRedirect). - [4.127.0] Throttle: device registration and consent saves (
rest/notification/devices,rest/notification/preferences) are limited per device and per IP (REST_NOTIFICATION_THROTTLE_*in.env.example: 20 per device, 120 per IP per 10 minutes) and answer 429 withRetry-Afterbeyond that. - [4.127.0] Secret: set
FCM_SERVICE_ACCOUNT_JSONto the JSON key of a service account that holds only the Firebase Cloud Messaging API Admin role in the shop's app project (Google Cloud console → IAM & Admin → Service accounts), not the Firebase Admin SDK account, which reaches every Firebase product. A deployment secret, never the registry: it can push to every device of the app. The DI container reads it when it is compiled, so rebuild the container (deletecache/container.php) after setting or changing it. - [4.127.0] Check for overrides — jobs: forks with their own
application/config/jobs.phpmust add thenotificationsgroup withDispatchNotifications(every minute) andPruneNotifications(daily), and theirgetOptions()lines, or queued pushes are only sent right after the request that queued them and nothing is ever pruned. - [4.127.0] Check for overrides — REST routes: forks with their own
rest_routes.phpmust add the tenrest/notification/*routes (and their(\w{2})/twins). - [4.127.0] Check for overrides — mailer and SMS: a fork overriding
Adv_mailer::order_complete(),order_has_been_updated()ororder_is_on_store()must wrap its customer email in$this->orderEmailEnabled(...)and call$this->notifyOrderEvent(...); a fork overridingsendSmsForOrder()orsendSmsForOrderId()must callOrderNotifier::replacesSms()before sending andorderEvent()after (orderNotifierOrNull()inshopmodule_helper.phpfetches it), as the upstream functions now do. These forks define their ownsendSmsForOrder()inapplication/helpers/shopmodule_helper.php, which wins over upstream's through thefunction_existsguard, so they skip the push hook silently and no merge conflict shows it (Bitbucket code search, 2026-10-13): v4-wecare, v4-inatural, v4-smilepharmacy, v4-heals, v4-pharmado, v4-central, v4-pharm16, v4-pharmacy-discount, v4-optika-liolios, v4-anatomicline. Port the hook into each before enabling push for that shop. - [4.127.0] Check for overrides — REST policies:
application/config/rest_policies.phpgains a guest (auth: guest) entry forNotification::class. The global default isauth: backend, so a fork whose copy diverges from upstream and lacks the entry answers every app call torest/notification/*with 401; add it by hand. A copy identical to upstream gets it from the 3-way merge. - [4.127.0] Check for overrides — admin routes and menu: forks whose
application/config/routes.phporapplication/config/admin_menu.phpdiverge from upstream must add thepush_notifications_adminroutes and the ecommercen Plus → Marketing → Push notifications menu entry by hand. - [4.127.0] Check for overrides — account deletion:
CustomerErasuregainsNotificationRecordsStep; a fork that registers its own step list in the container must add it. - [4.127.0] UI Update:
application/views/admin/settings/notification_settings.phpgains the push panel (switch, daily cap, quiet hours, test customers, retention), the per-event table and a deprecation note on the OneSignal fields, andAdv_settings::notification_settings()saves them; a fork overriding that view orAdv_settingsmust merge both, or the controls are missing. The page's menu entry now includes the Admin role. - [4.127.0] Behaviour on merge: none until push is enabled, except that
PruneNotificationsand account deletion act on the (empty) new tables. Every order email stays on by default; the email switches only change something once an admin turns one off. - [4.127.0] Deprecated: the
ONE_SIGNALsettings (enable, app id, Safari web id). App push goes through FCM; the fields are removed in a later release. - [4.127.0]
shop_customer_message_history.message_typegains the valuePUSH(MessageChannel::PUSH). - [4.127.0] No migration, no schema change, no response-field change. Purely additive filter keys on the modern Product domain; no legacy file touched, so no fork override is affected.
- [4.127.0] UI Update: REST contract note 1.115 (rotation).
POST /rest/auth/customer/refresh(and/admin/refresh) now answers200 { "access_token", "refresh_token" }. A client MUST store therefresh_tokenfrom every refresh response and use it for the next refresh and for logout; the one it sent is superseded. A client that keeps its first token still works for the grace window (JWT_REFRESH_TOKEN_GRACE, 60 s): the old token then returns the current one. After that, presenting the old token is treated as theft: every refresh token of the user is deleted and the answer is401, so the customer signs in again. A lost response is safe to retry with the same token within the window. A retry with the old token AFTER the grace window (for example a client that was offline when the response was lost) counts as reuse and signs the customer out; product has accepted this for the standard 60 s window. Treat401from refresh as signed out. For the WeCare app: the Tauriauth_refreshcommand andserver/api/auth/refresh.post.tsmust persist the returned token before this is deployed. - [4.127.0] Behaviour change: the refresh lifetime now slides (
JWT_REFRESH_TOKEN_EXPIRYcounted from the latest refresh, 7 days by default), so an active customer is no longer signed out 7 days after login. A customer still has one REST session: a new login replaces it. Logout, a password reset and a storefront password change end the whole session, whichever of its tokens is presented. The migration20261001120000_add_rotation_columns_to_refresh_tokensaddsrotated_at,replaced_byand an index ontoken; run it before deploying (existing tokens stay valid). New optional envJWT_REFRESH_TOKEN_GRACE(seconds, 0..3600, default 60);0turns the grace window off, so a superseded token is always treated as reuse. - [4.127.0] Check for overrides:
Advisable\Rest\Auth\TokensgainedrotateRefreshToken();RefreshTokenModelgainedrotate()andrevoke()now deletes every row of the token's user and type.Advisable\Rest\Auth\Confighas a new last constructor argumentrefreshGraceSeconds(default 60); a fork that buildsConfigitself or aliases the service needs therest.auth.refresh_graceparameter. A fork that overridesCustomerAuth::refresh()orAdminAuth::refresh()must callrotateRefreshToken()and return itsrefresh_token, otherwise its clients are signed out when the grace window ends. A fork that ownsrefresh_tokensqueries (reports, cleanup) will now see several rows per customer; the current one hasrotated_atNULL. - [4.127.0] Not in scope: hashing refresh tokens at rest and multi-device sessions are follow-ups on #790.
- [4.127.0] Check for overrides: forks overriding
getRelatedProductsCategory()orgetRelatedProductsVendor()inRelated_product_modelbypass the new cache (Evripidis today, commitae5fc6784; review whether its override can be dropped). - [4.127.0] Check for overrides: forks overriding
fixWhere()should take the index-2 escape fix. - [4.127.0] Check for overrides: forks overriding
getRelatedProductsLp()(Heals, Nautilus) do not get the new self-exclusion guard or the(int)cast on the product id; both still interpolate{$productId}raw into their SQL. - [4.127.0] Random order is now cached: if a shop sets registry
OTHER.RELATED_PRODUCTS_ORDERto a random order (e.g.RAND()), the order is cached. It stays the same for the cache lifetime (default L2 TTL, 86400 s) and is shared by every product in the same category / vendor. Clear the products cache to reshuffle. - [4.127.0] Stock and active changes lag: the cached list applies the stock (
product_codes.stock > 0 OR negative_stock = 1),price > 0andactivefilters when it is built. A product that sells out or is deactivated can stay in a related list until the entry expires or the products cache is cleared. Price and stock shown on each card are still loaded fresh. - [4.127.0] No DB migration, no config key.
- [4.127.0] Check for overrides: Megastore's
SyncCategoryArabatzisjob (application/modules/job/libraries/SyncCategoryArabatzis.php) is the only known fork caller; it reads the full set and ignores the order, so it simply stops paying for the random sort. A fork that relied on the accidental random order must now passrandom: true. - [4.127.0] The
get_mui_records()random-order fix needs no migration, REST contract change or config key. - [4.127.0] Check for overrides: Blustore, Edructer, Flioukas, Nautilus, OptikaLiolios and Smile override
Product_parser_model::get()and call$this->setPriceTracking($product)per product. None overridesetPriceTracking(), so they get the fast path automatically on their next upstream merge (still one call per product; a per-fork switch tostorefrontPricesBulk()would batch it). - [4.127.0] Check for overrides: a fork view that reads
priceTracking['shouldDisplay']or['prices']under a graph setting withoutPRICE_TRACK.ENABLED(e.g. ThePharmacist's product page, underENABLED_GRAPH_PRODUCT_PAGE) keeps working: any graph setting keeps the full verdict. - [4.127.0] Check for overrides: a fork that overrides
get()and callsproductPricesBulk()directly stays on the full path; switch it tostorefrontPricesBulk(). - [4.127.0] Check for overrides: a fork that overrides
PriceDropVerdictCalculator::parseResponse()or customises theverdict()rules must checkapplyCurrentPrice()andnoClaimVerdict()(which hard-codes "the newest tracked price is the reference" for products that cannot qualify). As of this change no fork subclassesGraphServiceorPriceDropVerdictCalculator. - [4.127.0] The price-tracking storefront fast path (#912) needs no migration or REST contract change and changes no existing public signature.
- [4.127.0] REQUIRES
composer install: new direct dependencycomposer/ca-bundle(^1.5, locked 1.5.14). - [4.127.0] Check for overrides: forks with their own code that sets Guzzle
verifytoAPPPATH . 'config/cacert.pem'should switch to\Advisable\Support\Http\TlsVerify::option(). Known instances: AdvisableSite and Anatomicline (application/modules/eshop/libraries/Acs.php), Services (application/libraries/Everhour.php,application/modules/api/controllers/Api_services_customer_aggregate.php), Smile (custom/Ai/Bedrock/ClientOptions.php). They keep working in the meantime thanks to the refreshedcacert.pem. - [4.127.0] Upstream merge,
cacert.pemconflict: Services carries its own modifiedapplication/config/cacert.pem, so the merge conflicts on it. Take upstream's version (the 2026-08-13 Mozilla bundle). Other forks either match the base file or don't track it, and merge cleanly. - [4.127.0] Upstream merge,
composer.lockconflict: every fork has its owncomposer.json/composer.lockwithoutcomposer/ca-bundle. Resolve the conflict by re-runningcomposer update composer/ca-bundle(rather than hand-merging the lock). A fork that takes thesrc/change without the dependency fails with "class CaBundle not found" in development. - [4.127.0] The dev CA bundle change (#908) needs no migration, REST contract change or config key; only the
composer installabove.