From 68514c11c24746da2f4e94d7c064c8338b6fb743 Mon Sep 17 00:00:00 2001 From: Stefan Vetsch Date: Sat, 14 Mar 2015 10:50:06 +0100 Subject: [PATCH 1/7] Add simple composer.json --- composer.json | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 composer.json diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..e1ff974 --- /dev/null +++ b/composer.json @@ -0,0 +1,29 @@ +{ + "name": "singpolyma/openpgp-php", + "description": "Pure-PHP implementation of the OpenPGP Message Format (RFC 4880)", + "minimum-stability": "stable", + "license": "Unlicense", + "authors": [ + { + "name": "Arto Bendiken", + "email": "arto.bendiken@gmail.com" + }, + { + "name": "Stephen Paul Weber", + "email": "singpolyma@singpolyma.net" + } + ], + "require": { + "phpseclib/phpseclib": "~0.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "autoload": { + "psr-0": { + "OpenPGP": "lib/" + }, + "files": [ + ] + } +} \ No newline at end of file From ae21dd0f566e7ce867505daedd396de5830ffc01 Mon Sep 17 00:00:00 2001 From: Stefan Vetsch Date: Sat, 14 Mar 2015 10:59:21 +0100 Subject: [PATCH 2/7] Make autoload work for phpunit tests --- phpunit.xml | 2 +- tests/bootstrap.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 tests/bootstrap.php diff --git a/phpunit.xml b/phpunit.xml index a071d34..a38403e 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,4 +1,4 @@ - + tests/suite.php diff --git a/tests/bootstrap.php b/tests/bootstrap.php new file mode 100644 index 0000000..744fe6b --- /dev/null +++ b/tests/bootstrap.php @@ -0,0 +1,2 @@ + Date: Sat, 14 Mar 2015 13:22:14 +0100 Subject: [PATCH 3/7] Make use of the classmap, the current class/file structure does not allow for PSR-0 autoloading. --- composer.json | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/composer.json b/composer.json index e1ff974..52e2f52 100644 --- a/composer.json +++ b/composer.json @@ -20,10 +20,6 @@ "phpunit/phpunit": "~4.0" }, "autoload": { - "psr-0": { - "OpenPGP": "lib/" - }, - "files": [ - ] + "classmap": ["lib/"] } } \ No newline at end of file From ec8df93d1923cf867b0e789c3ba3164dc30961fd Mon Sep 17 00:00:00 2001 From: Stefan Vetsch Date: Sat, 14 Mar 2015 17:17:28 +0100 Subject: [PATCH 4/7] Don't make a scene if there is no autoload.php (if someone isn't using composer). --- tests/bootstrap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 744fe6b..1980dd4 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -1,2 +1,2 @@ Date: Sat, 14 Mar 2015 17:41:25 +0100 Subject: [PATCH 5/7] Not needed at this point --- composer.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 52e2f52..a310173 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,6 @@ { "name": "singpolyma/openpgp-php", "description": "Pure-PHP implementation of the OpenPGP Message Format (RFC 4880)", - "minimum-stability": "stable", "license": "Unlicense", "authors": [ { @@ -22,4 +21,4 @@ "autoload": { "classmap": ["lib/"] } -} \ No newline at end of file +} From 2fb1666bb5eb40f99be2ce7c7752003a04294fae Mon Sep 17 00:00:00 2001 From: Stefan Vetsch Date: Sat, 14 Mar 2015 19:36:35 +0100 Subject: [PATCH 6/7] Use composer to load dependencies --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4cfe693..debd056 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,5 +3,4 @@ php: - "5.4" - "5.3" before_script: - - git clone git://github.com/phpseclib/phpseclib.git phpseclib - - mv phpseclib/phpseclib/* ./ + - composer install --prefer-source --dev From 9d6d736a5dab5d10e48227e3974eec263bc9f330 Mon Sep 17 00:00:00 2001 From: Stefan Vetsch Date: Sun, 15 Mar 2015 21:55:40 +0100 Subject: [PATCH 7/7] Add newline before end-of-file (PSR-2) --- tests/bootstrap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 1980dd4..9635a9c 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -1,2 +1,2 @@