Rebuild a composer json file from vendor

Hello everyone,

I know, this is not an octobercms issue, but I inherited from a customer an old octobercms installation (ver 1.0) that lacks of composer json and lock files. Is there a safe and simple way to rebuild them starting from the vendor folder?

Hi @BobCasarini

Spin over the plugins directory 2 levels deep and take inventory of all the plugins that are installed.

Convert the plugin directory to a plugin code:

/plugins/acme/blog → acme.blog

Run the install for each plugin

php artisan plugin:install acme.blog

When finished, run to make sure all dependencies are installed.

php artisan plugin:check

This will add each plugin to your composer.json file and build it up for you.

Thank @daftspunky, but my problem was to rebuild composer json in order to update vendor and module sections.
For some mysterious reasons the developer who created the project decided to eliminate the composer files, so I was unable to upgrade the project.
I have tried to use a composer.lock file from another project of octobercms ver 1, reinstalled the vendor with composer install command, and it seems to work