Download the PHP package khalyomede/dependency-scanner without Composer
On this page you can find all versions of the php package khalyomede/dependency-scanner. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download khalyomede/dependency-scanner
More information about khalyomede/dependency-scanner
Files in khalyomede/dependency-scanner
Package dependency-scanner
Short Description Returns a list of packages available for updates.
License MIT
Informations about the package dependency-scanner
dependency-scanner
Returns a list of packages available for updates.
Summary
- About
- Features
- Requirements
- Installation
- Examples
- API
- Changelog
About
I searched for a package that could provide the same feature some package offer using the command line.
My goal is to display a web page on my web app with a vision of package up to date to help (advanced) users require the administrator help to update packages if needed.
Features
- Scan for your installed packages in the
composer.lock
file and returns the last available version for it - Respect your
composer.json
requirements version
Requirements
- PHP >= 7.0.0
composer.lock
alongside yourcomposer.json
published and ready to be read- An internet connection (because this library requests Packagist API)
Installation
In your console, install this package.
Examples
- 1. Getting started
- 2. Specify custom file paths
1. Getting started
In this example, we will use the default configuration to find the file composer.json
and composer.lock
and get a list of key pair of out of date packages.
2. Specify custom file paths
In this example, we will use custom path (in case your run this script in a certain location where the default file path is not valid anymore).
API
- class
DependencyScanner
getComposerFilePath
getLockFilePath
getOutdatedDependencies
setComposerFilePath
setLockFilePath
getComposerFilePath
Get the path to the composer.json
file.
getLockFilePath
Get the path to the composer.lock
file.
getOutdatedDependencies
Get a array of key pairs (name associated with the last available version) of your outdated dependencies.
throws
Khalyomede\Exception\HttpException
: If we can't connect to the Packagist API.Khalyomede\Exception\JsonDecodeException
: If an error occured while parsing the content of the composer or lock file or while decoding the JSON response of the Packagist API.Khalyomede\Exception\FileNotFoundException
: If the composer or lock file cannot be found in the disk.Khalyomede\Exception\FileNotReadableException
: if the composer or lock file is not readable.Khalyomede\Exception\FileReadFailedException
: If an error occured while reading the composer or lock file (usingfile_get_contents()
).
setComposerFilePath
Set the path to the composer.json
file.
setLockFilePath
Set the path to the composer.lock
file.