Skip to content

Instantly share code, notes, and snippets.

View wotaen's full-sized avatar
🐢

Michal Holub wotaen

🐢
View GitHub Profile

Keybase proof

I hereby claim:

  • I am wotaen on github.
  • I am wotaen (https://keybase.io/wotaen) on keybase.
  • I have a public key whose fingerprint is C36D 1027 D28B C7BE D243 4650 8701 313A AC38 2EA3

To claim this, I am signing this object:

@wotaen
wotaen / parseLock.php
Created September 21, 2022 06:52 — forked from filda/parseLock.php
Read composer.lock file and generate useful commands to help install packages in another project
<?php
$cmsJsonFile = file_get_contents('composer.json');
$cmsJsonArray = json_decode($cmsJsonFile, true);
$libsLockFile = file_get_contents('../libraries/composer.lock');
$libsLockArray = json_decode($libsLockFile, true);
$cmsRequires = $cmsJsonArray['require'];
$libsPackages = $libsLockArray['packages'];