Upgrade: composer error - no matching package found

Silverstripe Version:
3.6±
Question:

Trying use the ss4-upgradability-check.php script. Receive the below error:

(error) - silverstripe/buildtools dev-master requires pear-pear.php.net/versioncontrol_git * -> no matching package found

I’m in the process of upgrading from 3.6± to 4. Have gone partially through 4.0.0 – SilverStripe Documentation

I’ve used the upgrader tool and found this file: ss4-upgradability-check.php

(somewhat difficult to follow the upgrade process, as there are many places to find info on upgrading, e.g. changelogs, github, packagist, etc. If you can see a glaring error, I’d appreciate knowing.)

After running “composer require composer/semver” in terminal it says pear is missing. Cannot seem to get around this. Below is the problem. The strange thing is that pear files and pear.conf are in the php 7.1.1.2 folder (I believe as they should).

Problem 1
_ - Installation request for silverstripe/buildtools * -> satisfiable by silverstripe/buildtools[dev-master]._
_ - silverstripe/buildtools dev-master requires pear-pear.php.net/versioncontrol_git * -> no matching package found._

Below is composer.json (as best I can figure it out)


{
	"name": "myvendor/myproject",
	"require": {
		"php": "^7.0",
	        "silverstripe/recipe-cms": "^1.0",
	        "myvendor/compatible-module": "~3.0",
		"myvendor/prerelease-module": "~3.0@dev"
	},
	
	"prefer-stable": true,
	"minimum-stability": "dev"
	
	{
    "repositories": [
        {
          "type": "pear",
          "url": "https://pear2.php.net"
				}
			]
		}
}

I found downloading a fresh copy of a silverstripe 4.0 site, for a different site I want to do, and copying the root composer.json and placing in the root of the 3.x site all the packages installed without a hitch.

Can’t say if that’s the best way. But it seems to have worked. If this was a bad idea, please let me know…

You can upgrade silverstripe version using this command :
upgrade-code recompose --root-dir=var/www/yourproject-foldername --write --recipe-core-constraint=“4.1”

1 Like