LogoLogo
10.0.x
10.0.x
  • Overview
    • About Varbase
    • Roadmap
    • Release Cycle and Supported Versions
    • How to Get Support
  • Developers
    • Getting Started
    • Installing Varbase
      • Requirements
      • Installing Varbase locally with DDEV
      • Installing Varbase locally with Lando
    • Understanding Varbase
      • Basic Concepts
      • Core Components
        • Varbase Core
          • Varbase Admin
          • Varbase Page
          • Varbase Security
          • Varbase Webform
          • Varbase Default Content
          • Varbase Tour
        • Varbase Media
        • Varbase Editor
        • Varbase Email
        • Varbase SEO
        • Varbase Workflow
        • Varbase Dashboards
        • Varbase Layout Builder
          • Varbase Landing page (Layout Builder)
          • Varbase Heading Block
          • Varbase Rich Text Block
          • Varbase HTML Code Block
          • Varbase Media (Image/Video) Block
          • Varbase Gallery Block
        • Varbase Components
        • Vartheme Claro
        • Vartheme BS5
      • Optional Components
        • Varbase AI
          • Varbase AI Default recipe
          • Varbase AI Editor Assistant recipe
          • Varbase AI Image Alt recipe
          • Varbase AI Taxonomy Tagging recipe
          • Varbase AI Agents recipe
        • Varbase API
        • Varbase Internationalization
        • Varbase Hero Slider
        • Varbase Carousels
        • Varbase Blog
        • Varbase Search
        • Varbase Social Single Sign-On
        • Varbase Media Twitter
        • Varbase Media Instagram
        • Varbase Content Planner
        • Varbase Bootstrap Paragraphs
          • Varbase Bootstrap Paragraphs Text and Image
        • Varbase Landing Page (Paragraphs)
      • Additional Components
        • Varbase Media Header
        • Varbase FAQs
        • Varbase Reports
        • Varbase Commerce
        • Varbase YouTube Import
      • Development Components
        • Varbase Development
        • Reroute Email
        • Varbase Updates Helper
      • Deprecated Components
        • Varbase Media Hero Slider
        • Varbase Style Guide
        • Vartheme BS4
        • Varbase Total Control Dashboard
    • Configuring a Varbase Site
      • Navigation
        • Defining Active Menu Trail Using Menu Position
      • Using View Modes Inventory
      • Content Moderation and Workflows
      • URL Aliases in Varbase/Drupal
        • Configuring URL Aliases
        • Managing URL Aliases
      • Managing URL Patterns for Multilingual Websites
      • Managing Date and Time Formats to Display Across the Site
      • Using Varbase Layout Builder
        • Creating a Landing Page With Varbase Layout Builder
        • Activating Varbase Layout Builder for Content Types
      • Configuring Pathologic When Going Live
      • Configuring SEO Features
        • Disallow Oembed Media Links
      • Configuring Security Features
        • Spam Protection
        • Password Policies
        • Other Security Kits
        • Flood Contorl
        • Enable HTTP Password Authentication
      • Configuring JSON:API Features
      • Configure Varbase Media Hero Slider
      • Configuring Varbase Media Header
      • Configuring Varbase Mailer Settings
        • Configure Symfony Mailer
      • Configure Level of Logging and Errors
      • Entity Definition Update Manager Class
      • Module Installer Factory Class
      • Configure Ckeditor 5 Media Embed
    • Theme Development with Varbase
      • Understanding The Vartheme Starterkit Theme
      • Creating Your Own Theme
      • Integration of Varbase with Storybook 1.0 - CL Server
      • Integration of Varbase with Storybook 2.0
      • Customize a Varbase Single Directory Components (SDC) In a Custom Theme
      • Local Tasks and Moderation Sidebar
      • Add Preloaded Fonts in Vartheme
      • Command to Install Needed Theming Tools
      • Manually Install Needed Theming Tools
    • Launching a Varbase Site to Production
    • Updating a Varbase Site
      • Understanding Varbase Updater Package
      • Handling Patches When Updating
      • Handling Configuration Updates
      • Updating Varbase to work with Composer 2.0
      • Updating Drush to the Latest Stable Version
      • Version Update Guides
        • Updating Varbase ~9.0 to Drupal 10
        • Updating from Varbase 8.x to 9.x
    • Varbase Patches
    • Frequently Asked Questions (FAQs)
    • Extending Varbase
      • Overriding Varbase
      • Creating Your Own Feature
      • Install Needed YARN and Webpack Tools
      • Compiling Provided Component Styles
      • Check Standards/Practice Coding And Linting
  • Content Designers
    • Accessing the Administration Area
      • Website Environments
    • Dashboard
      • Reports
    • Content Management
      • Create Content
        • Rich-Text Editor “WYSIWYG”
      • Modify Content
      • Delete Content
      • Preview Content
      • Bulk Edit Content
      • Publish Content
      • Authoring Information
    • Content Structure
      • EntityQueues
        • Add a New Term
      • Menu Management
        • Add Menu Items
        • Update Menu Items
        • Adding a Page to the Menu
      • Taxonomies
        • List Terms
        • Add Terms
        • Reorder and Edit Terms
    • Content Translation
      • Translating Content
      • Language Switcher
      • Deleting a Translation
      • Editing a Translation
    • Content Workflow
    • Layout Builder
      • Section
        • Section Styles
      • Block Management
        • Block Styles
      • Reordering Blocks
    • Webforms
      • Create New Webform View
      • Setting up Emails Handler Conditions
      • Setting up Confirmations Message Settings Types
    • Media Management
      • Accessing the Media Library
      • Uploading Media Files
        • Image
        • Remote Video
        • Video
      • Applying Metadata and Descriptions
      • Resizing Images
    • User Management
      • Login & Registration
      • Add User
      • Edit User
      • Delete User
      • Simulating Another User
      • Default Roles and Site Personas
        • Edit Roles' Permissions
        • Managing Roles
    • URL Management
      • URL Aliases
      • Generating URL Alias
      • URL Redirects
      • Domain Redirects
    • SEO Management
      • XML Sitemap
      • Meta Tags in Varbase
      • Disallow Indexing for Content Items
    • Site Configuration
      • System
        • Clearing Varbase Cache
        • Google Analytics
        • Mail Templates
      • User Interface
        • Coffee
        • External Links
        • Gin Moderation Sidebar
        • Layout Builder Modal
        • Moderation Sidebar
        • Shortcuts
        • Taxonomy Manager
        • Tours
        • CL Components
        • Antibot
        • Responsive Preview
        • Navigation Settings
      • Development
      • Varbase Settings
      • Web Services
        • OpenAPI
    • Additional Tips
      • Content Uploading Standards
      • Common Error Handling Tips
      • Glossary
  • Contributing
    • Contributing to Documentation
Powered by GitBook
On this page
  • Background
  • Patching Scenarios
  • How Vardot Will Handle Those Cases
  • Installing Vardot's composer-patches Package
  1. Developers
  2. Updating a Varbase Site

Handling Patches When Updating

PreviousUnderstanding Varbase Updater PackageNextHandling Configuration Updates

Last updated 1 year ago

Background

Most Drupal distributions use a Composer patching package called . This package handles the patching mechanism nicely.

However, there are a number of problems we have had while maintaining Varbase and building sites on Varbase. Those problems are:

  • There's no logging mechanism for failed patches

  • Patches most of the times get included in new releases, there's no way this package can detect if the patch is already included in the new release

These issues become quite irritating and when maintaining a Drupal site, as Varbase and other Drupal distros rely on patches to work well.

Therefore, we have thought of a better way to handle patching (it's now implemented in Varbase 8.6.3 and above). You'll need to to make use of this patching mechanism.

Now Varbase offers a forked and upgraded version of composer-patches package.

If you have it will be automatically included. Or see to add it manually.

You can find it on

Patching Scenarios

When you execute composer update or composer require vendor/xyz command, newer versions of modules or core are downloaded. If patches for those modules are included, there are 3 possible scenarios:

Patch Applying Scenario

Patch is Still Needed?

Patch Will Apply?

Manual Action Needed?

1. Best Case: Patch has not been included, and new version did not break the patch.

Yes

Yes

✅ Nothing needed

2. Average Case: Patch has been included in the new version.

No

No

❌ You have to remove the patch from composer.jsonor add the patch to patches-ignore list incomposer.json

3. Worst Case: Patch has not been included, and new version did break the patch.

Yes

No

❌ You have to manually re-roll the patch, handle conflict, and fix it yourself

How Vardot Will Handle Those Cases

Based on the scenarios mentioned above, we have forked the "cweagans/composer-patches" package, and added an Event Dispatcher on patch failure. The Event Dispatcher will dispatch an Event that will prompt you to perform an action depending on the scenarios above. Thus:

Best Case: Patch has not been included, and new version did not break the patch.

Nothing will happen.

Average Case: Patch has been included in the new version.

The Varbase Updater will detect that the patch has been applied and ask you if you want to remove it from your composer.json file. If the patch is not in the root composer.json file, then Varbase Updater will ask to add it to the patches-ignore list instead.

Example screenshot below:

Worst Case: Patch has not been included, and new version did break the patch.

The Varbase Updater will log failed patches to a file named varbase_failed_patches.log You can review it and try to handle those patches yourself.

Example screenshot of varbase_failed_patches.log below:

Installing Vardot's composer-patches Package

Varbase 8.6.3 or greater

If you're using Varbase 8.6.3 or greater, just run composer update and it will work.

Varbase 8.6.2 or older

  1. From a command prompt window, navigate to your project: cd /path/to/YOUR_PROJECT

  2. Add Vardot's composer-patches repository to use our forked package instead of the cweagans's. composer config repositories.composer-patches vcs https://github.com/vardot/composer-patches

  3. Run composer update to get the new package and start applying the new patching mechanism.

If you're using Varbase 8.6.2 or older, you can and make use of this functionality, or by running the following commands:

Require the Varbase Updater package. (Requiring the package only without running the update command will add the Composer plugins for patching but won't update Varbase. To update, you need to ). composer require vardot/varbase-updater

update to the most recent version of Varbase 8.6.x
"cweagans/composer-patches"
update your Varbase version
https://github.com/Vardot/composer-patches
installing Vardot's version of composer-patches
updated to Varbase 8.6.3 or newer
run the update command