RE: [PEAR-DEV] Dev utils
[email protected] ("Vasil Rangelov") Mon, 21 Jul 2014 17:56:34 +0300
| Newsgroups | php.pear.dev |
|---|---|
| Message-ID | <[email protected]> |
Hi Brett. > maybe it should be incorporated into the Pyrus_Developer tools. Yeah, “maybe” is exactly what I thought too… in that I’m not sure either, which is why I left it open for discussion at the end :-D . The way I see it, there’s one pro and one con for having this be part of Pyrus_Developer: - Pro: Simpler installation for developers using Pyrus – a single “pyrus install” command to get everything you need. Maybe there could even be an option on “pyrus generate-pear2” to generate standard basic files (similar to the ones used by the package) that use those classes, making development even easier. - Con: With the exception of FileBuilder, Pyrus_Developer isn’t required, so it doesn’t make much sense to have those be there. And StubGenerator doesn’t even need Pyrus, meaning one should be able to use at least that part even if having e.g. “PEAR+Phing” instead of “Pyrus+Pyrus_Developer”. Maybe there’s some way “in between” the two extremes of “full integration” and “full separation”… Perhaps integrate FileBuilder and Bundler into Pyrus_Developer, and have StubGenerator be a separate package (PEAR2_StubGenerator? Or maybe PEAR2_PharStub?). Then have that be an optional dependency of Pyrus_Developer (you know, as a “recommendation” of sorts, which would conditionally be used at the generated scanoptions.php if installed). Thoughts? From: Brett Bieber [mailto:[email protected]] Sent: Monday, July 21, 2014 4:01 PM To: Vasil Rangelov Cc: pear-dev Subject: Re: [PEAR-DEV] Dev utils On Sun, Jul 20, 2014 at 6:05 PM, Vasil Rangelov <[email protected] <mailto:[email protected]> > wrote: 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 <http://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 I think this looks great. There's no reason it shouldn't be in the PEAR2 repo, my only thought is that maybe it should be incorporated into the Pyrus_Developer tools. I have no objections either way. The package looks useful. -- Brett Bieber