Adding namespace to s3 module I have a drupal 7 codebase which I downloaded from a production server and set up locally (using PHP version 7). There is this amazons3.module file in which I have to add an extra namespace Drupal\amazons3 to get it running. If I remove the line, the code throws an error stating : Error: Class 'Drupal\amazons3\StreamWrapperConfiguration' not found in amazons3_upload_location() (line 345 of /xxx/yyy/sites/all/modules/amazons3/amazons3.module).. 

Why am I having to add this code when it is not there in the production version and nor in the github codebase ?
I solved this by linking to the correct path where the composer was placed (as suggested by Japo).

EDIT:

In another server setup, the same issue was fixed by adding php-curl module.