Change an abandoned package with Composer

Submitted by Tom Thorp on Monday, February 17, 2025 - 15:16
Modified on Monday, February 17, 2025 - 16:03
Composer logo

I recently ran into this issue with my Drupal 11 CMS with a module called 'media_entity_twitter'. ( See 'external links' below ). When I updated my CMS via composer, I got the following error :

j7mbo/twitter-api-php has been marked as abandoned, no longer maintained.

To work around this issue, I made the following change to the root Composer.json file :

   "require": {
   		.
   		.
        "tzlion/deadend-api-php": "^0.2.0"  // The replacement/forked package
    },
    "replace": {
        "j7mbo/twitter-api-php": "*"  // The abandoned package to be replaced
    },

Update your CMS again using 'composer update'. Make sure that the replacement/forked package is functionally similar to the abandoned package. Otherwise you may get erroneous errors happen in your CMS. 

 

About the author

Tom Thorp
Tom Thorp is an IT Consultant living in Miami on Queensland's Gold Coast. With over 30+ years working in the IT industry, Tom's experience is a broad canvas. The IT services Tom provides to his clients, includes :
 
Website development and hosting
Database Administration
Server Administration (Windows, Linux, Apple)
PABX Hosting and Administration
Helpdesk Support (end-user & technical).
  If you like any of my content, consider a donation via Crypto by clicking on one of the payment methods :
 
Categories

Leave a Comment