vdf-parser
vdf-parser copied to clipboard
Add this package to composer
It would be nice to have this added to packagist.org
Hi, I am not familiar with packagist.org
Can you give me an example of importing the library in some php code?
Thanks
Usually PHP applications using Composer also use its autoloader. In this case the file vdf.php will be autoloaded. However this is polluting the global namespace (you can't do exports like JS) so I'd wrap it in a class.
Importing a library with composer is as simple as running:
composer require rossengeorgiev/vdf-parser
From what I've looked briefly, there are namespaces and such, so this PR needs more work.
Yeah, this would need to follow some PSR and have its own repository or at least branch so people don't download unnecessary files.
Here's an example of my PSR-4 package: https://github.com/kbkk/php-steam-auth/blob/master/composer.json
Does it download all files? Can I put the php stuff in a separate directory?
Seems like it will always download the whole repository branch/tag. So the best option would be to open another repository for the PHP version.