Thomas Bruederli
2014-08-27 a98a4f8bb56eacffff1765ff09dd29af26e5fc12
Remove 3rd party libs from our repository and define the dependencies in composer.json-dist.
Also remove the ancient utf8 lib and replace it with 'Patchwork UTF-8 for PHP'.

For direct git checkouts, copy composer.json-dist into composer.json and run
`php composer.phar install` to install the dependencies.
6 files modified
65 files deleted
50024 ■■■■■ changed files
composer.json-dist 39 ●●●●● patch | view | raw | blame | history
installer/check.php 15 ●●●●● patch | view | raw | blame | history
installer/index.php 9 ●●●● patch | view | raw | blame | history
program/include/iniset.php 15 ●●●●● patch | view | raw | blame | history
program/lib/Auth/SASL.php 125 ●●●●● patch | view | raw | blame | history
program/lib/Auth/SASL/Anonymous.php 71 ●●●●● patch | view | raw | blame | history
program/lib/Auth/SASL/Common.php 105 ●●●●● patch | view | raw | blame | history
program/lib/Auth/SASL/CramMD5.php 68 ●●●●● patch | view | raw | blame | history
program/lib/Auth/SASL/DigestMD5.php 197 ●●●●● patch | view | raw | blame | history
program/lib/Auth/SASL/External.php 63 ●●●●● patch | view | raw | blame | history
program/lib/Auth/SASL/Login.php 65 ●●●●● patch | view | raw | blame | history
program/lib/Auth/SASL/Plain.php 63 ●●●●● patch | view | raw | blame | history
program/lib/Auth/SASL/SCRAM.php 306 ●●●●● patch | view | raw | blame | history
program/lib/Crypt/GPG.php 2386 ●●●●● patch | view | raw | blame | history
program/lib/Crypt/GPG/ByteUtils.php 105 ●●●●● patch | view | raw | blame | history
program/lib/Crypt/GPG/DecryptStatusHandler.php 344 ●●●●● patch | view | raw | blame | history
program/lib/Crypt/GPG/Engine.php 2006 ●●●●● patch | view | raw | blame | history
program/lib/Crypt/GPG/Exceptions.php 598 ●●●●● patch | view | raw | blame | history
program/lib/Crypt/GPG/Key.php 223 ●●●●● patch | view | raw | blame | history
program/lib/Crypt/GPG/KeyGenerator.php 790 ●●●●● patch | view | raw | blame | history
program/lib/Crypt/GPG/KeyGeneratorErrorHandler.php 121 ●●●●● patch | view | raw | blame | history
program/lib/Crypt/GPG/KeyGeneratorStatusHandler.php 173 ●●●●● patch | view | raw | blame | history
program/lib/Crypt/GPG/PinEntry.php 875 ●●●●● patch | view | raw | blame | history
program/lib/Crypt/GPG/ProcessControl.php 150 ●●●●● patch | view | raw | blame | history
program/lib/Crypt/GPG/Signature.php 427 ●●●●● patch | view | raw | blame | history
program/lib/Crypt/GPG/SubKey.php 672 ●●●●● patch | view | raw | blame | history
program/lib/Crypt/GPG/UserId.php 373 ●●●●● patch | view | raw | blame | history
program/lib/Crypt/GPG/VerifyStatusHandler.php 216 ●●●●● patch | view | raw | blame | history
program/lib/Crypt/GPGAbstract.php 508 ●●●●● patch | view | raw | blame | history
program/lib/Mail/mime.php 1499 ●●●●● patch | view | raw | blame | history
program/lib/Mail/mimeDecode.php 1003 ●●●●● patch | view | raw | blame | history
program/lib/Mail/mimePart.php 1260 ●●●●● patch | view | raw | blame | history
program/lib/Net/IDNA2.php 3402 ●●●●● patch | view | raw | blame | history
program/lib/Net/IDNA2/Exception.php 4 ●●●● patch | view | raw | blame | history
program/lib/Net/IDNA2/Exception/Nameprep.php 6 ●●●●● patch | view | raw | blame | history
program/lib/Net/LDAP3.php 2618 ●●●●● patch | view | raw | blame | history
program/lib/Net/LDAP3/Result.php 152 ●●●●● patch | view | raw | blame | history
program/lib/Net/SMTP.php 1338 ●●●●● patch | view | raw | blame | history
program/lib/Net/Sieve.php 1274 ●●●●● patch | view | raw | blame | history
program/lib/Net/Socket.php 686 ●●●●● patch | view | raw | blame | history
program/lib/PEAR.php 1137 ●●●●● patch | view | raw | blame | history
program/lib/PEAR5.php 33 ●●●●● patch | view | raw | blame | history
program/lib/Roundcube/bootstrap.php 6 ●●●●● patch | view | raw | blame | history
program/lib/Roundcube/rcube_charset.php 26 ●●●● patch | view | raw | blame | history
program/lib/encoding/CP1250.map 274 ●●●●● patch | view | raw | blame | history
program/lib/encoding/CP1251.map 274 ●●●●● patch | view | raw | blame | history
program/lib/encoding/CP1252.map 274 ●●●●● patch | view | raw | blame | history
program/lib/encoding/CP1253.map 274 ●●●●● patch | view | raw | blame | history
program/lib/encoding/CP1254.map 274 ●●●●● patch | view | raw | blame | history
program/lib/encoding/CP1255.map 274 ●●●●● patch | view | raw | blame | history
program/lib/encoding/CP1256.map 274 ●●●●● patch | view | raw | blame | history
program/lib/encoding/CP1257.map 274 ●●●●● patch | view | raw | blame | history
program/lib/encoding/CP1258.map 274 ●●●●● patch | view | raw | blame | history
program/lib/encoding/ISO-8859-1.map 303 ●●●●● patch | view | raw | blame | history
program/lib/encoding/ISO-8859-10.map 303 ●●●●● patch | view | raw | blame | history
program/lib/encoding/ISO-8859-11.map 297 ●●●●● patch | view | raw | blame | history
program/lib/encoding/ISO-8859-13.map 299 ●●●●● patch | view | raw | blame | history
program/lib/encoding/ISO-8859-14.map 301 ●●●●● patch | view | raw | blame | history
program/lib/encoding/ISO-8859-15.map 303 ●●●●● patch | view | raw | blame | history
program/lib/encoding/ISO-8859-16.map 299 ●●●●● patch | view | raw | blame | history
program/lib/encoding/ISO-8859-2.map 303 ●●●●● patch | view | raw | blame | history
program/lib/encoding/ISO-8859-3.map 296 ●●●●● patch | view | raw | blame | history
program/lib/encoding/ISO-8859-4.map 303 ●●●●● patch | view | raw | blame | history
program/lib/encoding/ISO-8859-5.map 303 ●●●●● patch | view | raw | blame | history
program/lib/encoding/ISO-8859-6.map 260 ●●●●● patch | view | raw | blame | history
program/lib/encoding/ISO-8859-7.map 308 ●●●●● patch | view | raw | blame | history
program/lib/encoding/ISO-8859-8.map 270 ●●●●● patch | view | raw | blame | history
program/lib/encoding/ISO-8859-9.map 307 ●●●●● patch | view | raw | blame | history
program/lib/encoding/KOI8R.map 302 ●●●●● patch | view | raw | blame | history
program/lib/encoding/KSC5601.map 17078 ●●●●● patch | view | raw | blame | history
program/lib/utf8.class.php 171 ●●●●● patch | view | raw | blame | history
composer.json-dist
@@ -4,13 +4,50 @@
    "license": "GPL-3.0+",
    "repositories": [
        {
            "type": "pear",
            "url": "http://pear.php.net/"
        },
        {
            "type": "composer",
            "url": "http://plugins.roundcube.net/"
        },
        {
            "type": "vcs",
            "url": "git@github.com:roundcube/sample-plugin.git"
        },
        {
            "type": "vcs",
            "url": "git://git.kolab.org/git/pear/Net_LDAP3"
        },
        {
            "type": "package",
            "package": {
                "name": "Net_SMTP",
                "version": "dev-master",
                "source": {
                    "url": "http://github.com/pear/Net_SMTP",
                    "type": "git",
                    "reference": "master"
                }
            }
        }
    ],
    "require": {
        "php": ">=5.3.0",
        "roundcube/plugin-installer": ">=0.1.3"
        "roundcube/plugin-installer": ">=0.1.3",
        "pear/mail_mime": ">=1.8.9",
        "pear/mail_mime-decode": ">=1.5.5",
        "pear/net_smtp": "dev-master",
        "pear-pear.php.net/auth_sasl": ">=1.0.6",
        "pear-pear.php.net/net_idna2": ">=0.1.1",
        "pear-pear.php.net/net_sieve": ">=1.3.2",
        "pear-pear.php.net/net_ldap2": ">=2.0.12",
        "kolab/Net_LDAP3": "dev-master",
        "patchwork/utf8": "1.2.x"
    },
    "require-dev": {
        "pear-pear.php.net/crypt_gpg": "*",
        "phpunit/phpunit": "*"
    },
    "minimum-stability": "dev"
}
installer/check.php
@@ -28,10 +28,13 @@
);
$required_libs = array(
    'PEAR'      => 'PEAR.php',
    'Net_SMTP'  => 'Net/SMTP.php',
    'Net_IDNA2' => 'Net/IDNA2.php',
    'Mail_mime' => 'Mail/mime.php',
    'PEAR'      => 'pear.php.net',
    'Auth_SASL' => 'pear.php.net',
    'Net_SMTP'  => 'pear.php.net',
    'Net_IDNA2' => 'pear.php.net',
    'Net_LDAP3' => 'git.kolab.org',
    'Mail_mime' => 'pear.php.net',
    'Mail_mimeDecode' => 'pear.php.net',
);
$ini_checks = array(
@@ -160,13 +163,13 @@
<?php
foreach ($required_libs as $classname => $file) {
foreach ($required_libs as $classname => $vendor) {
    @include_once $file;
    if (class_exists($classname)) {
        $RCI->pass($classname);
    }
    else {
        $RCI->fail($classname, "Failed to load $file", $source_urls[$classname]);
        $RCI->fail($classname, "Failed to load class $classname from $vendor", $source_urls[$classname]);
    }
    echo "<br />";
}
installer/index.php
@@ -3,9 +3,9 @@
/*
 +-------------------------------------------------------------------------+
 | Roundcube Webmail setup tool                                            |
 | Version 0.9-git                                                         |
 | Version 1.1-git                                                         |
 |                                                                         |
 | Copyright (C) 2009-2013, The Roundcube Dev Team                         |
 | Copyright (C) 2009-2014, The Roundcube Dev Team                         |
 |                                                                         |
 | This program is free software: you can redistribute it and/or modify    |
 | it under the terms of the GNU General Public License (with exceptions   |
@@ -49,6 +49,11 @@
set_include_path($include_path);
// include composer autoloader (if available)
if (@file_exists(INSTALL_PATH . 'vendor/autoload.php')) {
    require INSTALL_PATH . 'vendor/autoload.php';
}
require_once 'Roundcube/bootstrap.php';
// deprecated aliases (to be removed)
require_once 'bc.php';
program/include/iniset.php
@@ -54,20 +54,25 @@
// (does not work in safe mode)
@set_time_limit(120);
// include composer autoloader (if available)
if (@file_exists('vendor/autoload.php')) {
    require 'vendor/autoload.php';
}
// include Roundcube Framework
require_once 'Roundcube/bootstrap.php';
// register autoloader for rcmail app classes
spl_autoload_register('rcmail_autoload');
// include composer autoloader (if available)
if (@file_exists('vendor/autoload.php')) {
    require 'vendor/autoload.php';
}
// backward compatybility (to be removed)
require_once INSTALL_PATH . 'program/include/bc.php';
// load the UTF-8 portablity layer from Patchwor
if (!function_exists('iconv') || !function_exists('utf8_encode') || !extension_loaded('mbstring')) {
    \Patchwork\Utf8\Bootup::initAll();
}
/**
 * PHP5 autoloader routine for dynamic class loading
program/lib/Auth/SASL.php
File was deleted
program/lib/Auth/SASL/Anonymous.php
File was deleted
program/lib/Auth/SASL/Common.php
File was deleted
program/lib/Auth/SASL/CramMD5.php
File was deleted
program/lib/Auth/SASL/DigestMD5.php
File was deleted
program/lib/Auth/SASL/External.php
File was deleted
program/lib/Auth/SASL/Login.php
File was deleted
program/lib/Auth/SASL/Plain.php
File was deleted
program/lib/Auth/SASL/SCRAM.php
File was deleted
program/lib/Crypt/GPG.php
File was deleted
program/lib/Crypt/GPG/ByteUtils.php
File was deleted
program/lib/Crypt/GPG/DecryptStatusHandler.php
File was deleted
program/lib/Crypt/GPG/Engine.php
File was deleted
program/lib/Crypt/GPG/Exceptions.php
File was deleted
program/lib/Crypt/GPG/Key.php
File was deleted
program/lib/Crypt/GPG/KeyGenerator.php
File was deleted
program/lib/Crypt/GPG/KeyGeneratorErrorHandler.php
File was deleted
program/lib/Crypt/GPG/KeyGeneratorStatusHandler.php
File was deleted
program/lib/Crypt/GPG/PinEntry.php
File was deleted
program/lib/Crypt/GPG/ProcessControl.php
File was deleted
program/lib/Crypt/GPG/Signature.php
File was deleted
program/lib/Crypt/GPG/SubKey.php
File was deleted
program/lib/Crypt/GPG/UserId.php
File was deleted
program/lib/Crypt/GPG/VerifyStatusHandler.php
File was deleted
program/lib/Crypt/GPGAbstract.php
File was deleted
program/lib/Mail/mime.php
File was deleted
program/lib/Mail/mimeDecode.php
File was deleted
program/lib/Mail/mimePart.php
File was deleted
program/lib/Net/IDNA2.php
File was deleted
program/lib/Net/IDNA2/Exception.php
File was deleted
program/lib/Net/IDNA2/Exception/Nameprep.php
File was deleted
program/lib/Net/LDAP3.php
File was deleted
program/lib/Net/LDAP3/Result.php
File was deleted
program/lib/Net/SMTP.php
File was deleted
program/lib/Net/Sieve.php
File was deleted
program/lib/Net/Socket.php
File was deleted
program/lib/PEAR.php
File was deleted
program/lib/PEAR5.php
File was deleted
program/lib/Roundcube/bootstrap.php
@@ -464,16 +464,14 @@
            '/Net_(.+)/',
            '/Auth_(.+)/',
            '/^html_.+/',
            '/^rcube(.*)/',
            '/^utf8$/',
            '/^rcube(.*)/'
        ),
        array(
            'Mail/\\1',
            'Net/\\1',
            'Auth/\\1',
            'Roundcube/html',
            'Roundcube/rcube\\1',
            'utf8.class',
            'Roundcube/rcube\\1'
        ),
        $classname
    );
program/lib/Roundcube/rcube_charset.php
@@ -273,17 +273,8 @@
            else if ($from == 'ISO-8859-1' && function_exists('utf8_encode')) {
                return utf8_encode($str);
            }
            else if (class_exists('utf8')) {
                if (!$conv) {
                    $conv = new utf8($from);
                }
                else {
                    $conv->loadCharset($from);
                }
                if ($_str = $conv->strToUtf8($str)) {
                    return $_str;
                }
            else  {
                user_error("No suitable function found for UTF-8 encoding", E_USER_WARNING);
            }
        }
@@ -298,17 +289,8 @@
            else if ($to == 'ISO-8859-1' && function_exists('utf8_decode')) {
                return utf8_decode($str);
            }
            else if (class_exists('utf8')) {
                if (!$conv) {
                    $conv = new utf8($to);
                }
                else {
                    $conv->loadCharset($from);
                }
                if ($_str = $conv->strToUtf8($str)) {
                    return $_str;
                }
            else {
                user_error("No suitable function found for UTF-8 decoding", E_USER_WARNING);
            }
        }
program/lib/encoding/CP1250.map
File was deleted
program/lib/encoding/CP1251.map
File was deleted
program/lib/encoding/CP1252.map
File was deleted
program/lib/encoding/CP1253.map
File was deleted
program/lib/encoding/CP1254.map
File was deleted
program/lib/encoding/CP1255.map
File was deleted
program/lib/encoding/CP1256.map
File was deleted
program/lib/encoding/CP1257.map
File was deleted
program/lib/encoding/CP1258.map
File was deleted
program/lib/encoding/ISO-8859-1.map
File was deleted
program/lib/encoding/ISO-8859-10.map
File was deleted
program/lib/encoding/ISO-8859-11.map
File was deleted
program/lib/encoding/ISO-8859-13.map
File was deleted
program/lib/encoding/ISO-8859-14.map
File was deleted
program/lib/encoding/ISO-8859-15.map
File was deleted
program/lib/encoding/ISO-8859-16.map
File was deleted
program/lib/encoding/ISO-8859-2.map
File was deleted
program/lib/encoding/ISO-8859-3.map
File was deleted
program/lib/encoding/ISO-8859-4.map
File was deleted
program/lib/encoding/ISO-8859-5.map
File was deleted
program/lib/encoding/ISO-8859-6.map
File was deleted
program/lib/encoding/ISO-8859-7.map
File was deleted
program/lib/encoding/ISO-8859-8.map
File was deleted
program/lib/encoding/ISO-8859-9.map
File was deleted
program/lib/encoding/KOI8R.map
File was deleted
program/lib/encoding/KSC5601.map
File was deleted
program/lib/utf8.class.php
File was deleted