Page MenuHomePhabricator

discernatron 'composer install' fails on two dependencies
Closed, DeclinedPublic

Description

I have cloned wikimedia/discovery/discernatron and ran composer install it fails installing the plasmaconduit/either dependency. The dict tarball is not existent, the fallback to a git clone fails asking for username/password.

https://github.com/JosephMoniz/php-either does not exists and I could not find anything related under https://github.com/plasmaconduit/

Composer install:

Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Installing plasmaconduit/either (0.2.2)
    Downloading: Failed       
    Failed to download plasmaconduit/either from dist: The "https://api.github.com/repos/JosephMoniz/php-either/zipball/8cf8f82f4486bc9c17372f535a41db110fcb4772" file could not be downloaded (HTTP/1.1 404 Not Found)
    Now trying to download from source
  - Installing plasmaconduit/either (0.2.2)
    Cloning 8cf8f82f4486bc9c17372f535a41db110fcb4772

                                                                                                           
  [RuntimeException]                                                                                       
  Failed to clone https://github.com/JosephMoniz/php-either.git via https, ssh protocols, aborting.        
  - https://github.com/JosephMoniz/php-either.git                                                          
    Cloning into 'projects/wikimedia/discovery/discernatron/vendor/plasmaconduit/either'...  
    remote: Invalid username or password.                                                                  
    fatal: Authentication failed for 'https://github.com/JosephMoniz/php-either.git/'
                      
  - git@github.com:JosephMoniz/php-either.git                                                              
    Cloning into 'projects/wikimedia/discovery/discernatron/vendor/plasmaconduit/either'...  
    ERROR: Repository not found.                                                                           
    fatal: Could not read from remote repository.                                                          
                                                                                                           
    Please make sure you have the correct access rights                                                    
    and the repository exists.

Event Timeline

Note Google cache has a copy of https://github.com/JosephMoniz/php-either/tree/master/spec/PlasmaConduit/either from November 21st. Maybe the author got fed up with PHP and deleted the github repository, leaving them registered at packagist.org.

plasmaconduit/option is similar. It is still in packagist: https://packagist.org/packages/plasmaconduit/option but the referenced github repository has disappeared: https://github.com/JosephMoniz/php-option 404

It is a pity since Monads are quite nice to have. Maybe there is another popular implementation you can migrate to? I can imagine more than a handful of PHP developers want to do some functional programming.

Not much activity on that repository. I have too many tasks in the field.

A quick fix for this problem for me was to use vashnt707's mirrors of the projects taken down by JosephMoniz. I did this by adding the following to my composer.json:

"repositories": [                                                                                                                                                                                                                          
  {                                                                                                                                                                                                                                        
    "type": "vcs",                                                                                                                                                                                                                         
    "url": "https://github.com/vashnt707/php-map"                                                                                                                                                                                          
  },                                                                                                                                                                                                                                       
  {                                                                                                                                                                                                                                        
    "type": "vcs",                                                                                                                                                                                                                         
    "url": "https://github.com/vashnt707/php-either"                                                                                                                                                                                       
  },                                                   
  {                                                    
    "type": "vcs",                                     
    "url": "https://github.com/vashnt707/php-option"
  }                                                    
],

I'd be happy to submit this as a patch if the authors are interested.

Change 471321 had a related patch set uploaded (by Hashar; owner: EBernhardson):
[wikimedia/discovery/discernatron@master] Convert to phpoption

https://gerrit.wikimedia.org/r/471321

I am not sure discernatron is still used / maintained. Eventually there is an open change to migrate to a different library:

Change 471321 merged by DCausse:
[wikimedia/discovery/discernatron@master] Convert to phpoption

https://gerrit.wikimedia.org/r/471321