Packages may be updated over time, introducing newer versions.
When you need to update a package in your application,
you can use the update
command to easily update to a specific version or the latest version.
To update a package to its latest version, simply run the update command and pass the package's git URL:
phpkg update https://github.com/{owner}/{repo}.git
You can also specify a specific version to update to by passing the version tag to the update command:
phpkg update https://github.com/{owner}/{repo}.git --version={version-tag}
You may also define an alias for a package and use that alias to update the package:
phpkg alias my-package https://github.com/{owner}/{repo}.git
phpkg update my-package
Note For more information about the
alias
command, please read this documentation.
Assuming we have the test-runner
package in our application, with the owner php-repos
and repo name test-runner
,
we can update it to the latest version with the following command:
phpkg update https://github.com/php-repos/test-runner.git
To update to a specific version, we can specify the version number:
phpkg update https://github.com/php-repos/test-runner.git --version=v1.0.1
If you defined an alias for the package, then you can use the alias for updating the package.
Let's assume we defined a test-runner
alias for this package. Then you can run the following command:
phpkg update test-runner
For updating to a specific version:
phpkg update test-runner --version=v1.0.1
We believe that PHP has enormous untapped potential, and we are dedicated to creating tools that empower developers to harness its full power and capabilities. We aim to unlock this potential by creating tools that help developers harness PHP's full capabilities and extend its power to new heights. To this end, we developed phpkg, a cutting-edge package manager that simplifies the process of using PHP to its fullest extent. With phpkg, developers can take advantage of all that PHP has to offer and build more efficient, scalable, and powerful applications.