Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95801 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 82297 invoked from network); 8 Sep 2016 15:31:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Sep 2016 15:31:58 -0000 Authentication-Results: pb1.pair.com smtp.mail=mdwheele@ncsu.edu; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=mdwheele@ncsu.edu; sender-id=unknown Received-SPF: error (pb1.pair.com: domain ncsu.edu from 209.85.217.181 cause and error) X-PHP-List-Original-Sender: mdwheele@ncsu.edu X-Host-Fingerprint: 209.85.217.181 mail-ua0-f181.google.com Received: from [209.85.217.181] ([209.85.217.181:36362] helo=mail-ua0-f181.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FA/91-61313-99D71D75 for ; Thu, 08 Sep 2016 11:02:52 -0400 Received: by mail-ua0-f181.google.com with SMTP id b7so42762884uab.3 for ; Thu, 08 Sep 2016 08:02:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ncsu-edu.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=m/Xqsz+K9qkK+xLsNOAGdYYxFEHbuEc3F0xowpN49Is=; b=BJUnocFbGCGanv246tpFcKPODHMJ/aLpfJaWEU8NjQa6DRmBY/YK8RsqMSSnKF4Rop X4CxZkaFZtz9ZDsW97bynNOqjtHT7ta4gsVB1kCzP2/3fcU81yj62lZisZHrX8hT6HOP 3aJc6OEGxPUV8NwnK+nSF3S8v8f9picjCCHPHNN5lLA1FkGlxx3Lgi3I3pbLDvynsf91 DGSBJQCRdqOSbSxO0X6V7AoReGUrR4o9zk3sNnsr1D327To+/QnOlRz4kHghea0pTcx6 uVoVfXVGgxyPh9fb3PIhB+DjR047R6Ihl8CWmOI6C/YyTEXW++TX8Ho82AuftZT+stnj YIhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=m/Xqsz+K9qkK+xLsNOAGdYYxFEHbuEc3F0xowpN49Is=; b=W1tKW846Q8HIq2rdFx1ovD8WAdgTY/MbfhVCwI20L+3xQol4IRWLkuh36EGMjJ+D+y ii5RwZbUrHivIwFDx+WAf6scQUu/pYJJuc+acLVbQQslMANoOlxI5PAa22/mtIhyDoll LqDG2kNV+1+9iu8JQNd0VX+sKleFOsZ6act9TY7LmhKP7+DW2NmyvR+rA/7iiNBeaNkd qiinW8Dy+kNAp1etvzczGajO36Nf9Z70zgbHRDqz13oYckWN6titCkaTAyvc+nrtUBR5 0siccfL5POui1CVtbLk7PtW+lloC77TEOGJvfabBGOZGt15AnXY98lK03c03Vi/Cqszp EYug== X-Gm-Message-State: AE9vXwM7F+g7CqKkKtqc7cEqaDqtSrZV7LTKwwDl9yfwB89g2K6FMcbSJrUsdnFs19NBKfLuQxEPIMVjz0rqyBEM X-Received: by 10.176.6.6 with SMTP id f6mr78069uaf.46.1473346961891; Thu, 08 Sep 2016 08:02:41 -0700 (PDT) MIME-Version: 1.0 Received: by 10.31.54.81 with HTTP; Thu, 8 Sep 2016 08:02:41 -0700 (PDT) In-Reply-To: References: <04998da0-6344-0b8b-c69a-411400e340ba@lsces.co.uk> <1473323097.1378681.719308017.2139F909@webmail.messagingengine.com> <8493a9dd-1f0e-f15f-3651-0278cf25234b@lsces.co.uk> Date: Thu, 8 Sep 2016 11:02:41 -0400 Message-ID: To: PHP Internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC] Deprecate PEAR/PECL & Replace withcomposer/pickle From: mdwheele@ncsu.edu (Dustin Wheeler) Hi Lester, > > Currently having followed the installation guide I have things working > on a home directory. This is probably what people expect today, but I > still expect tools to be available which ever login I use ... testing > different client profiles. > There are a few options, as I'm sure you're aware, haha. By default, global requirements are going into the executor's home directory. However, you can configure all of those paths at run time. My advice (if you cannot (or simply prefer not to) install these types of tools per-application) would be to configure those paths to point to some global space in (what I presume is a) shared development space where it makes sense to have these tools installed globally (phpcs, phpunit, etc). Then you would have the task of making sure that global bin-path is in each users environment when they log in. However! (and I don't know if this is "best practice" or whatever) ... you *could* decide to specify bin-dir to be some UNIX / Windows path that is in environments by default. The risk here is that you collide with pre-existing binaries / symlinks (which is a trade-off to global installations in general). Let's see what we can do... ```bash # For purposes of demonstration, I'm doing this as a user that can create # directories in /opt and can create and execute files in /usr/local/sbin # I wouldn't do this as root, I'm just lazy... $ sudo su - $ whoami root # Arbitrarily decide to install here globally $ mkdir /opt/composer # Tell composer where to install dependencies $ composer global config vendor-dir /opt/composer/vendor # Tell composer where to put "binaries" (symlinks) $ composer global config bin-dir /usr/local/sbin # Verify our settings "took" $ composer global config --list [vendor-dir] /opt/composer/vendor [bin-dir] /usr/local/sbin # Note that there are other paths that should probably be specified (where caches are stored, etc) # In this example, Composer's global config is in-fact in root's home directory. Caches are in root's # home directory. This may or may not be acceptable, but is definitely configurable to whatever you want # Install PHPCS globally and cross fingers >_< $ composer global require squizlabs/php_codesniffer # Drop elevated permissions $ exit $ whoami vagrant # Try to use PHPCS out of my home directory with no special pathiness... $ which phpcs /usr/local/sbin/phpcs $ phpcs --version PHP_CodeSniffer version 2.7.0 (stable) by Squiz (http://www.squiz.net) ``` In this way, you *can* install composer "binaries" to a global location that is accessible by default by normal users on your system. This was done on a CentOS 7 machine, but I am positive this can be equivalently applied to Windows or any environment, really. I'll admit that most folks (it seems, anecdotally) have gone the way of installing these development tools per-application using `require-dev` but I completely understand where you're coming from. I just wanted to show you what's possible. I hope this helps, Lester. -Dustin -- Dustin Wheeler | Software Developer NC State University m: mdwheele@ncsu.edu | w: 5-9786 "If you don't know where you're going, it's easy to iteratively not get there."