Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on May 18, 2024 via composer

ocramius/package-versions 2.8.0

Provides efficient querying for installed package versions (no runtime IO)
Package summary
Share
0
issues
1
license
1
MIT
Package created
25 Jan 2016
Version published
15 Sep 2023
Maintainers
1
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
ocramius/package-versions@2.8.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of ocramius/package-versions 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does ocramius/package-versions do?

The "ocramius/package-versions" is an efficient tool used to access version information of composer dependencies. It derives information from the composer.lock file which is regenerated during composer install or composer update. Beneficially, no IO occurs when calling it as it compiles the list of package versions during the composer's installation. The utility is especially useful when you want to generate assets, code, or artifacts computed from the current version of a specific dependency.

How do you use ocramius/package-versions?

To utilize the "ocramius/package-versions" tool in PHP, you can initiate it through the composer by using the following command: composer require ocramius/package-versions. For optimized loading and to prevent autoload I/O when accessing the PackageVersions\Versions API, you can include additional code in your composer.json:

"config": {
    "optimize-autoloader": true
}

If you're manually generating your autoloader via the CLI, use the --optimize flag as follows: composer dump-autoload --optimize. The package can be used within your code as follows:

$version = \PackageVersions\Versions::getVersion('ocramius/package-versions');
var_dump($version); // returns: 1.0.0@0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33

Where are the ocramius/package-versions docs?

For detailed information and complete documentation, visit the official GitHub page ocramius/package-versions. The repository's README file contains all the necessary details needed to successfully use this tool.