Tag1 Consulting: Migrating Your Data from Drupal 7 to Drupal 10: Customizing the generated migration
Previously, we explored generating migrations using the Migrate Upgrade module and managing them with Migrate Plus. Today, we cover migration plugins from Drupal Core. The two main methods differ in file patterns, locations, and change detection. Learn how to organize your code effectively and customize your approach for optimal results. This article is packed with practical tips and insights to make your migration smoother and more efficient. Get ahead of the curve – read our guide and migrate with confidence!
Read more mauricio Thu, 06/27/2024 - 04:00Consensus Enterprises: Drupal 10 on Aegir 3: A Step-by-Step Guide
ImageX: The ECA Module: Setting Up Automated Actions For Various Scenarios on Your Drupal Website
Authored by Nadiia Nykolaichuk.
Your Drupal website is an advanced, powerful, and intelligent system capable of performing remarkable tasks. One of them is triggering automatic actions in response to certain events, which opens a treasure trove of options to meet your needs.
Security public service announcements: 3rd Party Libraries and Supply Chains - PSA-2024-06-26
Following on from previous PSAs on 3rd Party code in the Drupal ecosystem:
- PSA-2011-002 - External libraries and plugins
- Various 3rd Party Vulnerabilities - PSA-2019-09-04 | Drupal.org
It is the policy of the Drupal Security Team that site owners are responsible for monitoring and maintaining the security of 3rd party libraries.
Supply chains are increasingly complex, and managing the associated risks is challenging. Website owners should actively manage their dependencies, potentially leveraging a Software Bill of Materials (SBOM) or scanner services. Other relevant tools include CSP and SRI.
Concerns around polyfill.io
The most recent case that has affected some contributed Drupal projects relates to the polyfill.io service.
Recently, a new organization acquired and updated the polyfill.io service. The new service appears to be serving malicious content from the polyfill.io endpoints under specific circumstances.
- https://thehackernews.com/2024/06/over-110000-websites-affected-by.html
- https://sansec.io/research/polyfill-supply-chain-attack
- https://github.com/polyfillpolyfill/polyfill-service/issues/2873
In response to these concerns, several trusted providers of Javascript libraries are now also serving replacements for the polyfill.io service. Website owners should update their site to incorporate a newer, more reliable source for the polyfill.io files.
- https://community.fastly.com/t/new-options-for-polyfill-io-users/2540
- https://blog.cloudflare.com/polyfill-io-now-available-on-cdnjs-reduce-yo...
On the other hand, the polyfills may no longer be necessary in many cases, and it may be possible to remove them from sites rather than rely on a new source.
Multiple Drupal projects utilize this service in various ways; several of which require code changes and new releases to switch to alternative providers. As this relates to 3rd party libraries, the Drupal Security Team will not be issuing Security Advisories for these projects and work has been done in the public issue queues (note this may not be a complete list of all affected projects).
There have been significant changes in the way that 3rd party code is utilized in the Drupal ecosystem since PSA-2011-002 linked to above, but the remit of the Drupal Security Team remains limited to code hosted on drupal.org’s systems.
Reported By: Coordinated By:- Drew Webber of the Drupal Security Team
- Greg Knaddison of the Drupal Security Team
- Cathy Theys of the Drupal Security Team
- Juraj Nemec of the Drupal Security Team
- Michael Hess of the Drupal Security Team
The Drop Times: Embracing the AI Revolution: A Drupal Developer's Perspective
Dries Buytaert: Drupal upgrades: tools and workflow
When a new major version of Drupal is released, custom code often requires updates to align with API changes, including the removal of deprecated APIs.
Because I keep forgetting certain aspects of this workflow, I decided to document it for future reference.
Tools overview
Tool Interface Functionality Target Audience Upgrade Status module UI in Drupal Identifies deprecated code, hosting environment compatibility, and more Site administrators and developers Drupal Check Command-line Identifies deprecated code Developers, especially during coding and continuous integration (CI)Upgrade Status module
The Upgrade Status module assesses a Drupal site's readiness for major version upgrades by checking for deprecated code and other compatibility issues.
Install the Upgrade Status module like you would install any other Drupal module:
[code bash]$ ddev composer require –dev drupal/upgrade_status[/code]Here,
ddev
is the tool I prefer for managing my local development environment.composer
is a dependency manager for PHP, commonly used to install Drupal modules. The–dev
option specifies that the module should be installed as a development requirement, meaning it is necessary for development environments but not installed on production environments.Enable the Upgrade Status module:
[code bash]$ ddev drush pm-enable upgrade_status[/code]drush
stands for "Drupal shell" and is a command-line utility for managing Drupal sites. The commandpm:enable
(wherepm
stands for "package manager") is used to enable a module in Drupal.- After enabling the module, you can access its features by navigating to the Admin > Reports > Upgrade status page at
/admin/reports/upgrade-status
.
Upgrading PHP and MySQL using DDEV
The Upgrade Status module might recommend updating PHP and MySQL, per Drupal's system requirements.
To update the PHP version of DDEV, use the following command:
[code bash]$ ddev config –-php-version 8.3[/code]To upgrade the MySQL version of DDEV and migrate your database content, use the following command:
[code bash]$ ddev debug migrate-database mariadb:10.11[/code]After updating these settings, I restart DDEV and run my PHPUnit tests. Although these tests are integrated into my CI/CD workflow, I also run them locally on my development machine using DDEV for immediate feedback.
Drupal Check
Drupal Check is a command-line tool that scans Drupal projects for deprecated code and compatibility issues.
I always run drupal-check
before updating my Drupal site's code and third-party dependencies. This helps ensure there are no compatibility issues with the current codebase before upgrading. I also run drupal-check
after the update to identify any new issues introduced by the updated code.
Installation:
[code bash]$ ddev composer require –dev mglaman/drupal-check[/code]Run Drupal Check from the root of your Drupal installation:
[code bash]$ ./vendor/bin/drupal-check –-memory-limit 500M docroot/modules/custom[/code]I usually have to increase the memory limit, hence the
--memory-limit 500M
.
Using PHPStan directly
In the future, I'd like to evaluate whether using PHPStan directly is simpler. This is a TODO for myself. Drupal Check is essentially a wrapper around PHPStan, offering default configuration such as automatically running at level 2. To achieve the same result with PHPStan, I should be able to simply run:
[code bash]$ php vendor/bin/phpstan analyze -l 2 docroot/modules/custom[/code]Tag1 Consulting: Tag1's Recap of DrupalCon Portland 2024: Gander, Migrations & Human Connections
At the beginning of May, over a thousand people converged on the Oregon Convention Center in Portland, Oregon, for four days packed with announcements, learning opportunities, and comradery with the larger Drupal community. Among the many attendees, twenty-eight members of the Tag1 Team joined sessions, discussions, and led three impactful presentations – including the introduction of Gander as part of the Initiatives Keynote. Now that our team has slept off the jetlag and unpacked their bags, we’re reflecting on DrupalCon Portland and, specifically, Tag1’s highlights. Initiatives Keynote: Introducing Gander Tag1’s Strategic Growth and Innovation Manager, Janez Urevc , was invited to speak as part of the Drupal Project Initiatives Keynote on Day 3 of the conference. Gander was a hit! It was standing room only, and attentive attendees took notes and snagged the links to review more information at a later time. “While I presented at many DrupalCons in the past,” Janez said, “this was my first DrupalCon keynote. I spent significantly more time (and it was more stressful) preparing for those 6.5 minutes than for my entire 45-minute talk. But it was all worth it and I really enjoyed doing it at the end.” Janez introduced Gander , the...
Read more Jeremy Tue, 06/25/2024 - 06:57