PHP Objects, Patterns and Practice (3rd edition)

(Barry) #1
CHAPTER 15 ■ AN INTRODUCTION TO PEAR AND PYRUS

and regenerate the PEAR package

Analyzing Dialekt/AliG.php
Analyzing Dialekt/Dalek.php
Analyzing cli-dialekt.php
Analyzing Dialekt.php
Package Dialekt-1.2.1.tgz done


As before, I have a Dialekt-1.2.1.tgz package. This time, though, it's ready for the pear.appulsus.com
channel. Now I can move or upload the package to my channel directory. Then, before I run the
command to make the release, I must first check a setting in the php.ini file. If you don’t know where
that is, by the way, you can run


php --ini


from the command-line and PHP will tell you. Once I’ve looked up its location I can open up php.ini and
look for a line like this:


phar.readonly = Off


If the line is not there, or if it differs, I must add or alter it. Without this setting, my release will likely
fail. Now, at last I’m ready to make my release. I change to my channel directory and run.


php /usr/share/pearscs.phar release Dialekt-1.2.1.tgz mattz


Release successfully saved


Once again, I called the pearscs.phar file. Remember, that’s the PEAR_SimpleChannelServer
package. It requires a path to the package file, and a maintainer name. And that’s it. I now have a
channel, containing a package. I can also associate it with a category:


php /usr/share/pearscs.phar categorize Dialekt fun


Added Dialekt to fun


Figure 15.2 shows how I can confirm my new package from the browser.
Of course, the proof of the pudding is in the installing. So, from a remote system I can try just that:

pear install appulsus/Dialekt


downloading Dialekt-1.2.1.tgz ...
Starting to download Dialekt-1.2.1.tgz (1,913 bytes)
....done: 1,913 bytes
install ok: channel://pear.appulsus.com/Dialekt-1.2.1


All that’s left to do now is publicize the channel!
Free download pdf