-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add this package to composer #6
Comments
Hi, 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. |
It would be nice to have this added to packagist.org
The text was updated successfully, but these errors were encountered: