PHP Packages Upgrading PEAR Packages - Supercoders | Web Development and Design | Tutorial for Java, PHP, HTML, Javascript PHP Packages Upgrading PEAR Packages - Supercoders | Web Development and Design | Tutorial for Java, PHP, HTML, Javascript

Breaking

Post Top Ad

Post Top Ad

Thursday, July 18, 2019

PHP Packages Upgrading PEAR Packages

PHP Packages



Upgrading PEAR Packages

Problem

You want to upgrade a package on your system to the latest version for additional functionality and bug fixes.

Solution

Find out if any upgrades are available and then tell Pyrus to upgrade the packages you want:

       % php pyrus.phar list-upgrades
       % pear upgrade pear/Package_Name

Discussion

Upgrading to a new version of a package is a simple task with Pyrus. If you know a specific package is out of date, you can upgrade it directly. However, you may also just want to check periodically to see if any new releases are available.

To do this, use the list-upgrades command, which prints out a table showing the channel server of the package, package name, local version number and state, version number and state of the remote upgrade, and size of the download of the upgrade:

       % php pyrus.phar list-upgrades
       Pyrus version 2.0.0a4 SHA-1: 72271D92C3AA1FA96DF9606CD538868544609A52
       Using PEAR installation found at /Users/rasmus/lib
       (no packages installed in channel __uri)
       (no packages installed in channel doc.php.net)
       (no upgrades for packages installed in channel pear.drush.org)
       Upgrades for channel pear.php.net:
            XML_Beautifier 1.2.2 (stable, released 2010-10-25)
            Console_Getopt 1.3.1 (stable, released 2011-03-08)
            Archive_Tar 1.3.11 (stable, released 2013-02-09)
       (no packages installed in channel pecl.php.net)

To upgrade a particular package, use the upgrade command. For example:

       % php pyrus.phar upgrade pear/XML_Beautifier-1.2.2
       Pyrus version 2.0.0a4 SHA-1: 72271D92C3AA1FA96DF9606CD538868544609A52
       Using PEAR installation found at /Users/rasmus/lib
       Downloading pear.php.net/XML_Beautifier
       Mime-type: application/octet-stream
       Installed pear.php.net/XML_Beautifier-1.2.2=======>] 100% (14/14 kb)

The short command for list-upgrades is lu; for upgrade it’s up.

PEAR also has an RSS feed listing new and upgraded packages.

No comments:

Post a Comment

Post Top Ad