Skip to content

Instantly share code, notes, and snippets.

@deizel
Last active October 11, 2015 12:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deizel/2795a26bf18ad30dcba9 to your computer and use it in GitHub Desktop.
Save deizel/2795a26bf18ad30dcba9 to your computer and use it in GitHub Desktop.
Quickly set up a bunch of PHP projects (without dependencies) from Composer cache
#!/usr/bin/env bash
BUILD_PATH="${BUILD_PATH:=$(pwd)/build/projects}"
INPUT_FILE="${INPUT_FILE:=$(pwd)/packages.txt}"
while read PACKAGE_NAME; do
composer create-project "$PACKAGE_NAME" "$BUILD_PATH/$PACKAGE_NAME" --no-install "$@"
#composer create-project "$PACKAGE_NAME" "$BUILD_PATH/$PACKAGE_NAME" --no-install "$@" -s dev
done <"$INPUT_FILE"
#!/usr/bin/env bash
set -x
APIGEN=${APIGEN:-$(which apigen)}
PROJECT_PATH=${PROJECT_PATH:-$(pwd)/build/projects}
OUTPUT_PATH=${OUTPUT_PATH:-$(pwd)/build/output}
cd "$PROJECT_PATH" || exit
for PACKAGE_DIR in */*/ ; do
PACKAGE_NAME=${PACKAGE_DIR%?}
printf "\n==> %s\n" "$PACKAGE_NAME"
yes | $APIGEN generate -s "$PROJECT_PATH/$PACKAGE_NAME" -d "$OUTPUT_PATH/$PACKAGE_NAME" --debug --exclude="*/tests/*" "$@"
done
codeception/verify
guzzlehttp/promises
guzzlehttp/psr7
guzzlehttp/ringphp
hamcrest/hamcrest-php
ircmaxell/password-compat
jeremeamia/superclosure
knplabs/gaufrette
kriswallsmith/assetic
mobiledetect/mobiledetectlib
phpspec/prophecy
phpunit/php-code-coverage
phpunit/php-token-stream
robloach/component-installer
squizlabs/php_codesniffer
symfony/console
symfony/process
symfony/var-dumper
tracy/tracy
react/promise
pomm-project/Foundation
gsouf/UForm
league/climate
nikic/php-parser
phpunit/phpunit
beberlei/assert
cakephp/cakephp
codeception/codeception
codegyre/robo
league/climate
nesbot/carbon
zaninotto/faker
guzzlehttp/guzzle
nette/utils
#!/usr/bin/env bash
# Any path containing directories in format vendor/package.
# Used simply to get a list of packages.
SOURCE_PATH="${SOURCE_PATH:=$HOME/.composer/cache/files}"
OUTPUT_FILE="$(pwd)/${OUTPUT_FILE:=packages.txt}"
touch "$OUTPUT_FILE"
cd "$SOURCE_PATH"
for PACKAGE_DIR in */*/ ; do
PACKAGE_NAME=${PACKAGE_DIR%?}
printf '%s\n' "$PACKAGE_NAME" >> "$OUTPUT_FILE"
done
cat "$OUTPUT_FILE"
andrewsville/php-token-reflection
apigen/theme-bootstrap
apigen/theme-default
aura/installer-default
aura/intl
beberlei/assert
brianium/habitat
cakephp/bake
cakephp/cakephp-codesniffer
cakephp/cakephp
cakephp/codeception
cakephp/debug_kit
cakephp/migrations
cakephp/plugin-installer
camspiers/json-pretty
codeception/codeception
codeception/specify
codeception/verify
codegyre/robo
components/bootstrap
components/jquery
composer/spdx-licenses
container-interop/container-interop
dnoegel/php-xdg-base-dir
doctrine/instantiator
fabpot/goutte
facebook/webdriver
filp/whoops
friendsofcake/bootstrap-ui
friendsofcake/crud-view
friendsofcake/crud
fzaninotto/faker
gourmet/email
gourmet/faker
gourmet/robo
gourmet/whoops
guzzlehttp/guzzle
guzzlehttp/promises
guzzlehttp/psr7
guzzlehttp/ringphp
guzzlehttp/streams
hamcrest/hamcrest-php
henrikbjorn/lurker
herrera-io/box
herrera-io/json
herrera-io/phar-update
herrera-io/version
ircmaxell/password-compat
jadb/robot
jakub-onderka/php-console-color
jakub-onderka/php-console-highlighter
jdorn/sql-formatter
jeremeamia/superclosure
josegonzalez/dotenv
justinrainbow/json-schema
kbsali/redmine-api
knplabs/gaufrette
kriswallsmith/assetic
kukulich/fshl
latte/latte
league/climate
league/csv
loadsys/puphpet-release-composer-installer
loadsys/puphpet-release
markstory/asset_compress
markstory/mini-asset
michelf/php-markdown
mobiledetect/mobiledetectlib
mockery/mockery
myclabs/deep-copy
nesbot/carbon
nette/bootstrap
nette/caching
nette/di
nette/finder
nette/neon
nette/php-generator
nette/reflection
nette/utils
nikic/php-parser
phine/exception
phine/path
phpdocumentor/reflection-docblock
phpspec/prophecy
phpunit/php-code-coverage
phpunit/php-file-iterator
phpunit/php-text-template
phpunit/php-timer
phpunit/php-token-stream
phpunit/phpunit-mock-objects
phpunit/phpunit
psr/http-message
psr/log
psy/psysh
react/promise
robloach/component-installer
robmorgan/phinx
sebastian/comparator
sebastian/diff
sebastian/environment
sebastian/exporter
sebastian/global-state
sebastian/recursion-context
sebastian/resource-operations
sebastian/version
seld/cli-prompt
seld/jsonlint
seld/phar-utils
squizlabs/php_codesniffer
symfony/browser-kit
symfony/config
symfony/console
symfony/css-selector
symfony/dom-crawler
symfony/event-dispatcher
symfony/filesystem
symfony/finder
symfony/options-resolver
symfony/process
symfony/var-dumper
symfony/yaml
tedivm/jshrink
thomaspark/bootswatch
tracy/tracy
symfony/symfony
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment