If you ever missing composer.json but the packages are already installed, there are many ways to recover.
You can parse json from this file, then grab the package name or version.
Run the recover.py and customize as you like.
If you ever missing composer.json but the packages are already installed, there are many ways to recover.
You can parse json from this file, then grab the package name or version.
Run the recover.py and customize as you like.
askvortsov/flarum-copy-links v0.1.1 Copy Discussion and Post links in Flarum | |
askvortsov/flarum-help-tags v0.1.4 Allow members to post in a tag, but only see discuss... | |
askvortsov/flarum-pwa v1.0.3 Turn your flarum site into a progressive web app! | |
axy/backtrace 1.0.7 Tracing in PHP | |
axy/codecs-base64vlq 1.0.1 Codec for VLQ (variable-length quantity) Base64 algo... | |
axy/errors 1.0.5 Exceptions in PHP | |
axy/sourcemap 0.1.5 Work with JavaScript/CSS Source Map | |
components/font-awesome 5.9.0 Font Awesome, the iconic SVG, font, and CSS framework. | |
dflydev/fig-cookies v1.0.2 Cookies for PSR-7 HTTP Message Interface. | |
doctrine/cache 1.10.2 PHP Doctrine Cache library is a popular cache implem... |
import re | |
composer_string = open('list-installed-packages.txt', 'r') | |
for installed in composer_string: | |
package = re.search("^[a-z0-9]+(?:/[a-z0-9-.]+)", installed) | |
version = re.search("(\d+\.)(\d+\.)(\d+)", installed) | |
if package and version: | |
print(package.group(), end=" ") | |
# print(package.group(), version.group()) | |
# print([package.group(), version.group()]) | |
# print('"{}": "^{}"'.format(package.group(), version.group())) |