From b42b4eefb5eafbb0505eb1bdecc6c7c0f0d65e85 Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Wed, 23 Nov 2016 13:14:29 +0200 Subject: [PATCH 1/5] Improved README.md --- README.md | 45 ++++++++++++++++++++++++++++----------------- 1 file changed, 28 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index b157a49..45d06c8 100644 --- a/README.md +++ b/README.md @@ -10,15 +10,20 @@ and IMAP protocols. ## Installing - > N.b. A note on Ubuntu 14.04 (probably other Debian-based / Apt managed systems), the install of php5-imap does not enable the extension for CLI (possibly others as well), which can cause composer to report fetch requires ext-imap - ``` + + > N.b. A note on Ubuntu 14.04 (probably other Debian-based / Apt managed + > systems), the install of php5-imap does not enable the extension for CLI + > (possibly others as well), which can cause composer to report fetch + > requires `ext-imap` + + ```sh sudo ln -s /etc/php5/mods-available/imap.ini /etc/php5/cli/conf.d/30-imap.ini ``` ### Composer -Installing Fetch can be done through a variety of methods, although Composer is -recommended. +Installing Fetch can be done through a variety of methods, although Composer +is recommended. Until Fetch reaches a stable API with version 1.0 it is recommended that you review changes before even Minor updates, although bug fixes will always be @@ -26,7 +31,7 @@ backwards compatible. ``` "require": { - "tedivm/fetch": "0.6.*" + "tedivm/fetch": "0.7.*" } ``` @@ -41,27 +46,33 @@ $ pear install tedivm/Fetch ### Github -Releases of Fetch are available on [Github](https://github.com/tedious/Fetch/releases). +Releases of Fetch are available on [Github][:releases:]. ## Sample Usage -This is just a simple code to show how to access messages by using Fetch. It uses Fetch -own autoload, but it can (and should be, if applicable) replaced with the one generated -by composer. - +This is just a simple code to show how to access messages by using Fetch. It +uses Fetch own autoload, but it can (and should be, if applicable) replaced +with the one generated by composer. - $server = new \Fetch\Server('imap.example.com', 993); - $server->setAuthentication('dummy', 'dummy'); +```php +use Fetch\Server; +use Fetch\Message; +$server = new Server('imap.example.com', 993); +$server->setAuthentication('dummy', 'dummy'); - $messages = $server->getMessages(); - /** @var $message \Fetch\Message */ - foreach ($messages as $message) { - echo "Subject: {$message->getSubject()}\nBody: {$message->getMessageBody()}\n"; - } +/** @var $message Message[] */ +$messages = $server->getMessages(); +foreach ($messages as $message) { + echo "Subject: {$message->getSubject()}", PHP_EOL; + echo "Body: {$message->getMessageBody()}", PHP_EOL; +} +``` ## License Fetch is licensed under the BSD License. See the LICENSE file for details. + +[:releases:]: https://github.com/tedious/Fetch/releases From d32e4159bcfc847168c672f478a31e10f6f03f24 Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Wed, 23 Nov 2016 13:14:56 +0200 Subject: [PATCH 2/5] Fixed shell bang --- tests/runTests.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/runTests.sh b/tests/runTests.sh index 0547fd7..7a635f0 100755 --- a/tests/runTests.sh +++ b/tests/runTests.sh @@ -1,4 +1,5 @@ -#/usr/bin/env/sh +#!/usr/bin/env bash + set -e if [ ! -n "$TRAVIS" ]; then @@ -14,4 +15,4 @@ echo '' echo '' echo 'Testing for Coding Styling Compliance.' echo 'All code should follow PSR standards.' -./vendor/bin/php-cs-fixer fix ./ --level="all" -vv --dry-run \ No newline at end of file +./vendor/bin/php-cs-fixer fix ./ --level="all" -vv --dry-run From eb6ea133d94a43b5a934679fb7b4abaff2b72a91 Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Wed, 23 Nov 2016 13:15:45 +0200 Subject: [PATCH 3/5] Tune up PHPUnit --- phpunit.xml.dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 26aa323..76f4d80 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -13,7 +13,7 @@ > - ./tests + ./tests/Fetch From a273cb188a2d37a0ba5e387ac7203e424642a7ff Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Thu, 24 Nov 2016 10:49:11 +0200 Subject: [PATCH 4/5] Fixed example --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 45d06c8..d7f5de5 100644 --- a/README.md +++ b/README.md @@ -60,9 +60,9 @@ use Fetch\Server; use Fetch\Message; $server = new Server('imap.example.com', 993); -$server->setAuthentication('dummy', 'dummy'); +$server->setAuthentication('username', 'password'); -/** @var $message Message[] */ +/** @var Message[] $message */ $messages = $server->getMessages(); foreach ($messages as $message) { From 40531481583538e78de0b6db8274120b10915b6a Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Sat, 26 Nov 2016 10:23:02 +0200 Subject: [PATCH 5/5] Remove PHP 5.5 from supported list --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index bb1aede..91a847a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ language: php php: - - 5.5 - 5.6 - hhvm - hhvm-nightly