Dev utils
[email protected] ("Vasil Rangelov") Mon, 21 Jul 2014 02:05:49 +0300
| Newsgroups | php.pear.dev |
|---|---|
| Message-ID | <[email protected]> |
Hi everyone. I'd like to announce a proposal for a new PEAR2 package, that I tentatively call PEAR2_DevUtils. It abstracts away common tasks that I've tended to encounter when packaging all the PEAR2 packages I've worked on, and I believe it will be of use maybe even to packages using PEAR or Pyrus outside of pear(2).php.net. In particular: - It can generate a PHAR stub that loads an autoloader when the PHAR is used as a library, prints version information when ran without arguments, provides diagnostics based on the package.xml file, and can run a specified file when the PHAR is ran with arguments. Also includes ability to insert extra pieces of PHP code at certain events within the stub. - It can generate an $extrafiles array (more precisely - a list of files) based on all files that belong to a specified package, already installed on your dev machine. This will in turn let "pyrus make" include all of those files into your package's archive. Also includes a convenience method to take all packages (required and optional) defined in package.xml, and bundle those, assuming all are installed already. - It can add replace and EOL tasks to all files in the package. - It (re)generates the phprelease section with appropriate locations that "fix" those pesky "[role]/[package]/[role]/*" paths into proper "[role]/[package]/*". You can see the package's own scanoptions.php, packagexmlsetup.php and extrasetup.php for example usage of each class in the package - you basically use something similar in the respective file of your PEAR2 package. And yeah. this package builds its own packaging files using itself. so meta, right? :-P I'd like to hear from other PEAR2 members if they'd approve of this getting into PEAR2 under this or any other name (or perhaps offer an alternative course of action for providing similar utilities), and more generally (from ANYONE) - any other things you find yourself doing over and over again when preparing packages for a release? Any suggestions for this package? Regards, Vasil Rangelov a.k.a. boen_robot