Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 7, 2024 via composer

kylekatarnls/update-helper 1.2.1

Update helper
Package summary
Share
4
issues
4
high severity
meta
4
1
license
1
MIT
Package created
18 May 2019
Version published
7 Apr 2020
Maintainers
1
Total deps
1
Direct deps
0
License
MIT

Issues

4

4 high severity issues

high
via: kylekatarnls/update-helper@1.2.1
via: kylekatarnls/update-helper@1.2.1
via: kylekatarnls/update-helper@1.2.1
via: kylekatarnls/update-helper@1.2.1
Collapse
Expand

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:
kylekatarnls/update-helper@1.2.1
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 kylekatarnls/update-helper 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does kylekatarnls/update-helper do?

The kylekatarnls/update-helper is an invaluable tool that allows developers to facilitate update or upgrade instructions for users of their library. This package extends the utility of dependency management, particularly for those managing their own custom libraries or using third-party ones. It not only alerts the user that they have an outdated version of the library, but can generate prompts to guide them through upgrading to a more current version.

How do you use kylekatarnls/update-helper?

Utilizing the kylekatarnls/update-helper package requires a few steps with PHP code and adjustments to your project's composer.json file. First, you'll need to add it as a requirement in the composer.json file:

"require": {
    "kylekatarnls/update-helper": "^1"
},

Following that, in your composer.json file's scripts section, you'll instruct composer to check for updates after an autoload dump.

"scripts": {
    "post-autoload-dump": [
        "UpdateHelper\\UpdateHelper::check"
    ]
},

Then, you need to write a PHP class implementing UpdateHelperInterface, which will include the update rules. An example of such a class would look like:

namespace MyNamespace;

use UpdateHelper\UpdateHelper;
use UpdateHelper\UpdateHelperInterface;

class MyUpdateHelper implements UpdateHelperInterface
{
    public function check(UpdateHelper $helper)
    {
        $helper->write("You're using an old version of my-package, please consider upgrading.");

        if ($helper->isInteractive()) {
            if ($helper->getIo()->askConfirmation('Do you want us to upgrade it for you?')) {
                $helper->setDependencyVersions([
                    'my-vendor/my-package' => '^2.0.0'
                ])->update();
            }
        }
    }
}

In this PHP code, the check method prints a message stating that an older version of the package is in use, and if running in an interactive mode, it asks for user confirmation to perform the upgrade. Upon confirmation, it sets the new version and executes the update.

Please remember to replace MyNamespace and my-package with the correct values for your project.

Where are the kylekatarnls/update-helper docs?

The documentation for the kylekatarnls/update-helper can be found directly within the repositor's README file on GitHub. It provides a comprehensive guide on the package's installation, usage, and configuration. To access the docs, pull the repository from https://github.com/kylekatarnls/update-helper.git and open the README file.