Re: PhD using Composer - proof of concept and a few questions

From: Date: Fri, 09 Dec 2016 23:47:15 +0000
Subject: Re: PhD using Composer - proof of concept and a few questions
References: 1 2 3  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969386444@lists.php.net to get a copy of this message
Hi Peter! W dniu 09.12.2016 o 19:55, Peter Cowburn pisze:
On 9 December 2016 at 17:56, Maciej Sobaczewski <sobak@php.net <mailto:sobak@php.net>> wrote:
    Oh, I forgot. Another question: does such change affect our pman
    releases in any way? Peter, you seem to handle it in the past.
It shouldn't affect pman at all. If it does, we're doing something wrong.
That's great. It seems I only need to revert removal of package-pman.php then.
    W dniu 09.12.2016 o 18:52, Maciej Sobaczewski pisze:
        Hello.
        I would like to bring a topic to discussion - switching PhD (our
        docs
        building script) from PEAR to Composer. I briefly discussed it
        last year
        and Hannes (its creator) gave me green light to try it (with
        making it a
        monolithic package included).
        Today, I finally found some time to present you working proof of
        concept. You can find it at:
        https://github.com/Sobak/phd/tree/composer
        <https://github.com/Sobak/phd/tree/composer>
        (diff of all changes made is available here -
        https://github.com/php/phd/compare/master...Sobak:composer
        <https://github.com/php/phd/compare/master...Sobak:composer>)
        ATM it's not hosted on packagist so to install it locally as a
        Composer
        package you need to clone it, find (or create)
        COMPOSER_HOME/config.json
        and add:
        {
            "repositories": [
                {
                    "type":"vcs",
                    "url":"D:\\WWW\\htdocs\\forks\\phd"
                }
            ]
        }
        Then you can $ composer global require php/phd dev-composer
        It should work exactly like before (try phd --help or phd
        --version to
        test it). Manual is building fine on my local machine (I didn't
        touch
        rendering/building logic at all).
        I would love to see that implemented on PHP.net.  I think it
        would make
        releasing new versions much easier. But first, I need to ask a few
        questions (I allowed myself to cc systems@ as some of them are
        related
        to our infrastructure).
Releasing new versions isn't *difficult* in anyway, so there is not a huge scope to make it much easier. That said, tagging and pushing *is* slightly fewer steps than our current release process. The real problem, as with all things, is getting someone to do it.
Sure, it's not a rocket science. But it's always a bit less work to do.
        1) Do I understand it correctly that in fact PHP Manual is build
        only on
        two boxes? docs.php.net <http://docs.php.net> (euk2) and rsync
        (sc2)?
That is my understanding, for the PHP manual at least.
        2) Are there any circumstances that prevent such change? Other
        than "it
        always worked", please ;) Composer requires only PHP 5.3.2 and that
        requirement is met on euk2 box - I don't know about sc2 though.
        3) Assuming that we want such change. Under whose account should
        it be
        kept on Packagist. There is one named "php" but I don't think it
        belogs
        to any of us. Maybe new account like "phpnet" or "phpdotnet". Or
        maybe
        Hannes would like to have it assigned, as its main creator?
It's a shame that someone took the "php" vendor name, from a very quick look I couldn't find contact information (other than for the individual packages in there).
It seems that I just got it wrong, sorry for the confusion! See Christian's reply.
        4) Any other problems I'm not aware of?
What are your plans, thoughts, ideas, for letting everybody who currently uses the PEAR package know about moving away from there?
Hmm. Maybe we could release new version on PEAR which would be just "dummy package" showing message about migration to Composer/Packagist? AFAIK similar kind of "placeholder" is used by npm when popular packages are removed from their registry. That plus more detailed information on doc.php.net/phd/. Since the PEAR channel URL is doc.php.net people will now where to look for it, I suppose. Or maybe even a news on http://doc.php.net main page so that "Latest news" would contain something more than one entry.
        5) Any implementation suggestions/concerns? I would happily  address
        them. Just please be aware that it's only a proof of concept at
        the moment.
How crazy would it be if we, temporarily*, released through both the PEAR channel *and* composer/packagist? (* Around here, "temporary" things do tend to become permanent things.)
If we agree on solution suggested above, I think we could keep it for a year or so (as it wouldn't do any harm) and then drop it completely.
        I'm hoping for a fruitfull discussion. Constructive criticism is
        always
        welcome, as well.
        Cheers!
        Maciej.
Thanks, Maciej.

« previous php.doc (#969386444) next »