Add pear modules, mail and net_smtp via composer (#93)

Add pear modules, mail and net_smtp via composer, remove php 5.6 build due to phpunit 6
This commit is contained in:
Thilina Hasantha
2018-01-08 23:13:43 +01:00
committed by GitHub
parent 359e3f8382
commit e7792e7d79
2349 changed files with 117270 additions and 83170 deletions

View File

@@ -0,0 +1,23 @@
#!/bin/bash
SCENARIO=$1
ACTION=${2-install}
dir=dependencies/${SCENARIO}
if [ -z "$SCENARIO" ] ; then
SCENARIO=default
dir=.
fi
if [ ! -d "$dir" ] ; then
echo "Requested scenario '${SCENARIO}' does not exist."
exit 1
fi
echo "Switch to ${SCENARIO} scenario"
set -ex
composer -n --working-dir=$dir ${ACTION} --prefer-dist --no-scripts
composer -n --working-dir=$dir info

View File

@@ -0,0 +1,66 @@
#!/bin/bash
#
# This script is called automatically on every `composer update`.
# See "post-update-cmd" in the "scripts" section of composer.json.
#
# This script will create a derived composer.json / composer.lock
# pair for every test scenario. Test scenarios are defined in the
# "scenarios" file, which should be customized to suit the needs
# of the project.
#
SELF_DIRNAME="`dirname -- "$0"`"
source ${SELF_DIRNAME}/scenarios
echo
echo "::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::"
echo "::"
echo ":: Update dependencies for the following scenarios:"
echo "::"
echo ":: ${SCENARIOS}"
echo "::"
echo "::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::"
echo
set -ex
for SCENARIO in ${SCENARIOS} ; do
dir=dependencies/${SCENARIO}
# Define indirect variable names
stability_variable="stability_${SCENARIO}"
requirement_variable="requirement_${SCENARIO}"
platform_php_variable="platform_php_${SCENARIO}"
echo "### Create $dir/composer.json for ${SCENARIO} scenario"
mkdir -p $dir
cp composer.json $dir
# Then set our own platform php version if applicable (otherwise unset it)
composer -n --working-dir=$dir config platform.php "${!platform_php_variable---unset}"
# Temporarily set our vendor directory to 'vendor'
composer -n --working-dir=$dir config vendor-dir vendor
# Set an appropriate minimum stability for this version of Symfony
composer -n --working-dir=$dir config minimum-stability "${!stability_variable-stable}"
# Add a constraint to limit the Symfony version
composer -n --working-dir=$dir require --dev --no-update "${!requirement_variable}"
# Create the composer.lock file. Ignore the vendor directory created.
composer -n --working-dir=$dir update --no-scripts
# Set the vendor directory to its final desired location.
composer -n --working-dir=$dir config vendor-dir '../../vendor'
# The 'autoload' section specifies directory paths that are relative
# to the composer.json file. We will drop in some symlinks so that
# these paths will resolve as if the composer.json were in the root.
for target in $AUTOLOAD_DIRECTORIES ; do
ln -s -f ../../$target $dir
done
done

View File

@@ -0,0 +1,12 @@
#!/bin/bash
SCENARIOS="symfony2 symfony3 symfony4"
AUTOLOAD_DIRECTORIES='src tests'
platform_php_symfony2='5.4'
platform_php_symfony3='5.6'
requirement_symfony2='symfony/console:^2.8'
requirement_symfony3='symfony/console:^3'
requirement_symfony4='symfony/console:^4'