From 9e752c1d293272a9a10fcbbe48c670c7652b3ac0 Mon Sep 17 00:00:00 2001 From: Diogo Oliveira de Melo Date: Mon, 23 Nov 2015 20:11:42 -0200 Subject: [PATCH 1/4] It works when Pico is installed as a dependency --- index.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index 40b811a..5920eb4 100644 --- a/index.php +++ b/index.php @@ -1,6 +1,14 @@ Date: Mon, 23 Nov 2015 20:29:33 -0200 Subject: [PATCH 2/4] update CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 991b2ec..b6810a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ Released: - (RFC 3986) in `Page::evaluateRequestUrl()` * [Fixed] #272: Encode URLs using `rawurlencode()` in `Pico::getPageUrl()` * [Fixed] #274: Prevent double slashes in `base_url` +* [Fixed] #285: Make `index.php` work when installed as a composer dependency ``` ### Version 1.0.0-beta.1 From 70d813eafeeaf313ed59b2ab21ed810626d412f8 Mon Sep 17 00:00:00 2001 From: Diogo Oliveira de Melo Date: Fri, 27 Nov 2015 02:16:06 -0200 Subject: [PATCH 3/4] change the way to call autoload.php. - As suggested by @theshka, this code first verify if Pico is being used as local composer install, then verify if it is being used as a composer library. --- index.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/index.php b/index.php index 5920eb4..24225b8 100644 --- a/index.php +++ b/index.php @@ -1,14 +1,16 @@ Date: Fri, 27 Nov 2015 12:27:45 -0600 Subject: [PATCH 4/4] * [New] added PHP_VERSION check to Pico::run() --- lib/Pico.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/Pico.php b/lib/Pico.php index ccc0d55..0073a7e 100644 --- a/lib/Pico.php +++ b/lib/Pico.php @@ -271,6 +271,11 @@ class Pico */ public function run() { + // check PHP version + if (version_compare(PHP_VERSION, '5.3.6', '<')) { + die('Sorry, Pico requires PHP 5.3.6 or above to run!'); + } + // lock Pico $this->locked = true;