Date: Mon, 16 May 2022 23:14:25 -0400 From: Peter Beckman <beckman@angryox.com> To: Mel Pilgrim <list_freebsd@bluerosetech.com> Cc: freebsd-ports@freebsd.org Subject: Re: How to port a PHP application that uses Composer? Message-ID: <6eaa632a-c56-f1fa-3ae2-b66e14b26ab7@angryox.com> In-Reply-To: <130ec10a-219a-ac8b-06d9-80d31261dd39@bluerosetech.com> References: <130ec10a-219a-ac8b-06d9-80d31261dd39@bluerosetech.com>
next in thread | previous in thread | raw e-mail | index | archive | help
PHP is an interpreted language, Unless there are compiled portions, there is no porting necessary. You're just running 'php composer.phar install' yes? How does the "application" run? Is it just a directory that is configured as a root directory for a webserver? If so, look at www/wordpress or databases/mantisbt. https://www.freshports.org/www/wordpress/ Mantis BT includes all of their composer dependencies in their distro. Wordpress seems to include a lot of dependencies too. Consider that it is something the installer needs to do, or build the package as a deterministic set of packages already installed. Beckman On Mon, 16 May 2022, Mel Pilgrim wrote: > Composer is a github-centric dependency management tool for PHP applications. > It works very well on its own, but I'm having trouble figuring out how to > integrate it with pkg building. > > The composer workflow is: > > 1. Clone the PHP application repo, which has a composer.json file > 2. Download composer.phar and run `php composer.phar ...` > 3. Composer examines composer.json and downloads dependencies from other > github repos > 4. Composer creates an autoloader script that does all of the require calls > for the dependencies > > The problem is that download and autoloader script part. If I ran it as part > of the pkg building process, there's a fetch-extract race as it needs network > access, but also a file extracted from the distfile. > > If I left it to user config, the autoloader script creation will change a > file managed by pkg. > > So how do I do this? Can a composer-using PHP application be ported? > > --------------------------------------------------------------------------- Peter Beckman Internet Guy beckman@angryox.com https://www.angryox.com/ ---------------------------------------------------------------------------
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6eaa632a-c56-f1fa-3ae2-b66e14b26ab7>