From aa17277cecc438a7b27e062c47b3a231006e66d0 Mon Sep 17 00:00:00 2001 From: kaioken Date: Tue, 30 Aug 2016 08:46:44 -0400 Subject: [PATCH 01/26] fix issue with queue failing after 1 call --- Library/Phalcon/Queue/Beanstalk/Extended.php | 46 +++++++++++--------- 1 file changed, 25 insertions(+), 21 deletions(-) mode change 100644 => 100755 Library/Phalcon/Queue/Beanstalk/Extended.php diff --git a/Library/Phalcon/Queue/Beanstalk/Extended.php b/Library/Phalcon/Queue/Beanstalk/Extended.php old mode 100644 new mode 100755 index 9d8637276..65722b905 --- a/Library/Phalcon/Queue/Beanstalk/Extended.php +++ b/Library/Phalcon/Queue/Beanstalk/Extended.php @@ -1,20 +1,20 @@ | - +------------------------------------------------------------------------+ ++------------------------------------------------------------------------+ +| Phalcon Framework | ++------------------------------------------------------------------------+ +| Copyright (c) 2011-2016 Phalcon Team (http://www.phalconphp.com) | ++------------------------------------------------------------------------+ +| This source file is subject to the New BSD License that is bundled | +| with this package in the file docs/LICENSE.txt. | +| | +| If you did not receive a copy of the license and are unable to | +| obtain it through the world-wide-web, please send an email | +| to license@phalconphp.com so we can send you a copy immediately. | ++------------------------------------------------------------------------+ +| Authors: Nikita Vershinin | ++------------------------------------------------------------------------+ */ namespace Phalcon\Queue\Beanstalk; @@ -141,15 +141,19 @@ public function doWork($ignoreErrors = false) $that = clone $this; // Run the worker in separate process. - $fork->call(function () use ($tube, $worker, $that, $ignoreErrors) { + $fork->call(function () use ($tube, $worker, $that, $fork, $ignoreErrors) { $that->connect(); do { $job = $that->reserveFromTube($tube); if ($job && ($job instanceof Job)) { - try { + $fork->call(function () use ($worker, $job) { call_user_func($worker, $job); + }); + + try { + $fork->wait(); try { $job->delete(); @@ -290,7 +294,7 @@ public function getTubeStats($tube) public function getJobStats($job_id) { $result = null; - $lines = $this->getResponseLines('stats-job ' . (int)$job_id); + $lines = $this->getResponseLines('stats-job ' . (int) $job_id); if (!empty($lines)) { foreach ($lines as $line) { @@ -317,7 +321,7 @@ public function getJobStats($job_id) public function ignoreTube($tube) { $result = null; - $lines = $this->getWatchingResponse('ignore ' . $this->getTubeName($tube)); + $lines = $this->getWatchingResponse('ignore ' . $this->getTubeName($tube)); if (!empty($lines)) { list($name, $value) = explode(' ', $lines); @@ -361,7 +365,7 @@ protected function getResponseLines($cmd) $this->write(trim($cmd)); $response = $this->read(); - $matches = []; + $matches = []; if (!preg_match('#^(OK (\d+))#mi', $response, $matches)) { throw new \RuntimeException(sprintf( @@ -390,12 +394,12 @@ protected function getResponseLines($cmd) */ protected function getWatchingResponse($cmd) { - $result = null; + $result = null; $nbBytes = $this->write($cmd); if ($nbBytes && ($nbBytes > 0)) { $response = $this->read($nbBytes); - $matches = []; + $matches = []; if (!preg_match('#^WATCHING (\d+).*?#', $response, $matches)) { throw new \RuntimeException(sprintf( From fff2b3ec04b9be7c092b3fbfacc15b9d2a53cb89 Mon Sep 17 00:00:00 2001 From: Aleksey Stramunin Date: Thu, 1 Sep 2016 00:48:18 +0300 Subject: [PATCH 02/26] Fix `getConfig` function in `UnitTestCase` class Now, return the Config object if service 'config' was found in the dependency injection container and variable $config not set. --- Library/Phalcon/Test/UnitTestCase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Phalcon/Test/UnitTestCase.php b/Library/Phalcon/Test/UnitTestCase.php index 708517664..dba12a2af 100755 --- a/Library/Phalcon/Test/UnitTestCase.php +++ b/Library/Phalcon/Test/UnitTestCase.php @@ -168,7 +168,7 @@ public function setConfig(Config $config) public function getConfig() { if (!$this->config instanceof Config && $this->getDI()->has('config')) { - return $this->getDI()->has('config'); + return $this->getDI()->get('config'); } return $this->config; From 7a17eb2768b3824c5f1b500ab475cf27ec1af6d0 Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Tue, 6 Sep 2016 21:30:14 +0300 Subject: [PATCH 03/26] Cleaned tests --- .../Db/Adapter/MongoDB/BulkWriteResult.php | 0 Library/Phalcon/Db/Adapter/MongoDB/Client.php | 0 .../Phalcon/Db/Adapter/MongoDB/Collection.php | 0 .../Phalcon/Db/Adapter/MongoDB/Database.php | 0 .../Db/Adapter/MongoDB/DeleteResult.php | 0 .../Exception/BadMethodCallException.php | 0 .../Adapter/MongoDB/Exception/Exception.php | 0 .../Exception/InvalidArgumentException.php | 0 .../MongoDB/Exception/RuntimeException.php | 0 .../Exception/UnexpectedValueException.php | 0 .../Phalcon/Db/Adapter/MongoDB/Functions.php | 0 .../Db/Adapter/MongoDB/GridFS/Bucket.php | 0 .../MongoDB/GridFS/CollectionWrapper.php | 0 .../GridFS/Exception/CorruptFileException.php | 0 .../Exception/FileNotFoundException.php | 0 .../Adapter/MongoDB/GridFS/ReadableStream.php | 0 .../Adapter/MongoDB/GridFS/StreamWrapper.php | 0 .../Adapter/MongoDB/GridFS/WritableStream.php | 0 .../Db/Adapter/MongoDB/InsertManyResult.php | 0 .../Db/Adapter/MongoDB/InsertOneResult.php | 0 .../Db/Adapter/MongoDB/Model/BSONArray.php | 0 .../Db/Adapter/MongoDB/Model/BSONDocument.php | 0 .../Adapter/MongoDB/Model/CollectionInfo.php | 0 .../Model/CollectionInfoCommandIterator.php | 0 .../MongoDB/Model/CollectionInfoIterator.php | 0 .../Model/CollectionInfoLegacyIterator.php | 0 .../Db/Adapter/MongoDB/Model/DatabaseInfo.php | 0 .../MongoDB/Model/DatabaseInfoIterator.php | 0 .../Model/DatabaseInfoLegacyIterator.php | 0 .../Db/Adapter/MongoDB/Model/IndexInfo.php | 0 .../MongoDB/Model/IndexInfoIterator.php | 0 .../Model/IndexInfoIteratorIterator.php | 0 .../Db/Adapter/MongoDB/Model/IndexInput.php | 0 .../Adapter/MongoDB/Operation/Aggregate.php | 0 .../Adapter/MongoDB/Operation/BulkWrite.php | 0 .../Db/Adapter/MongoDB/Operation/Count.php | 0 .../MongoDB/Operation/CreateCollection.php | 0 .../MongoDB/Operation/CreateIndexes.php | 0 .../MongoDB/Operation/DatabaseCommand.php | 0 .../Db/Adapter/MongoDB/Operation/Delete.php | 0 .../Adapter/MongoDB/Operation/DeleteMany.php | 0 .../Adapter/MongoDB/Operation/DeleteOne.php | 0 .../Db/Adapter/MongoDB/Operation/Distinct.php | 0 .../MongoDB/Operation/DropCollection.php | 0 .../MongoDB/Operation/DropDatabase.php | 0 .../Adapter/MongoDB/Operation/DropIndexes.php | 0 .../Adapter/MongoDB/Operation/Executable.php | 0 .../Db/Adapter/MongoDB/Operation/Find.php | 0 .../MongoDB/Operation/FindAndModify.php | 0 .../Db/Adapter/MongoDB/Operation/FindOne.php | 0 .../MongoDB/Operation/FindOneAndDelete.php | 0 .../MongoDB/Operation/FindOneAndReplace.php | 0 .../MongoDB/Operation/FindOneAndUpdate.php | 0 .../Adapter/MongoDB/Operation/InsertMany.php | 0 .../Adapter/MongoDB/Operation/InsertOne.php | 0 .../MongoDB/Operation/ListCollections.php | 0 .../MongoDB/Operation/ListDatabases.php | 0 .../Adapter/MongoDB/Operation/ListIndexes.php | 0 .../Adapter/MongoDB/Operation/ReplaceOne.php | 0 .../Db/Adapter/MongoDB/Operation/Update.php | 0 .../Adapter/MongoDB/Operation/UpdateMany.php | 0 .../Adapter/MongoDB/Operation/UpdateOne.php | 0 .../Db/Adapter/MongoDB/UpdateResult.php | 0 Library/Phalcon/Http/Client/Exception.php | 0 Library/Phalcon/Http/Client/Header.php | 0 Library/Phalcon/Http/Client/Provider/Curl.php | 0 .../Http/Client/Provider/Exception.php | 0 .../Phalcon/Http/Client/Provider/Stream.php | 0 Library/Phalcon/Http/Client/README.md | 0 Library/Phalcon/Http/Client/Request.php | 0 Library/Phalcon/Http/Client/Response.php | 0 Library/Phalcon/Http/README.md | 0 Library/Phalcon/Http/Uri.php | 0 Library/Phalcon/Queue/Beanstalk/Extended.php | 28 ++++++------- Library/Phalcon/Test/FunctionalTestCase.php | 0 Library/Phalcon/Test/ModelTestCase.php | 0 Library/Phalcon/Test/UnitTestCase.php | 0 tests/_ci/entrypoint.sh | 2 + tests/_support/Helper/Unit.php | 40 ++++++++++++------- .../Annotations/Adapter/MemcachedTest.php | 13 +++--- 80 files changed, 47 insertions(+), 36 deletions(-) mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/BulkWriteResult.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Client.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Collection.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Database.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/DeleteResult.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Exception/BadMethodCallException.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Exception/Exception.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Exception/InvalidArgumentException.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Exception/RuntimeException.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Exception/UnexpectedValueException.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Functions.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/GridFS/Bucket.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/GridFS/CollectionWrapper.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/GridFS/Exception/CorruptFileException.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/GridFS/Exception/FileNotFoundException.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/GridFS/ReadableStream.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/GridFS/StreamWrapper.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/GridFS/WritableStream.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/InsertManyResult.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/InsertOneResult.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Model/BSONArray.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Model/BSONDocument.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Model/CollectionInfo.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Model/CollectionInfoCommandIterator.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Model/CollectionInfoIterator.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Model/CollectionInfoLegacyIterator.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Model/DatabaseInfo.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Model/DatabaseInfoIterator.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Model/DatabaseInfoLegacyIterator.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Model/IndexInfo.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Model/IndexInfoIterator.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Model/IndexInfoIteratorIterator.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Model/IndexInput.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Operation/Aggregate.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Operation/BulkWrite.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Operation/Count.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Operation/CreateCollection.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Operation/CreateIndexes.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Operation/DatabaseCommand.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Operation/Delete.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Operation/DeleteMany.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Operation/DeleteOne.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Operation/Distinct.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Operation/DropCollection.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Operation/DropDatabase.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Operation/DropIndexes.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Operation/Executable.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Operation/Find.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Operation/FindAndModify.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Operation/FindOne.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Operation/FindOneAndDelete.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Operation/FindOneAndReplace.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Operation/FindOneAndUpdate.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Operation/InsertMany.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Operation/InsertOne.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Operation/ListCollections.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Operation/ListDatabases.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Operation/ListIndexes.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Operation/ReplaceOne.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Operation/Update.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Operation/UpdateMany.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/Operation/UpdateOne.php mode change 100755 => 100644 Library/Phalcon/Db/Adapter/MongoDB/UpdateResult.php mode change 100755 => 100644 Library/Phalcon/Http/Client/Exception.php mode change 100755 => 100644 Library/Phalcon/Http/Client/Header.php mode change 100755 => 100644 Library/Phalcon/Http/Client/Provider/Curl.php mode change 100755 => 100644 Library/Phalcon/Http/Client/Provider/Exception.php mode change 100755 => 100644 Library/Phalcon/Http/Client/Provider/Stream.php mode change 100755 => 100644 Library/Phalcon/Http/Client/README.md mode change 100755 => 100644 Library/Phalcon/Http/Client/Request.php mode change 100755 => 100644 Library/Phalcon/Http/Client/Response.php mode change 100755 => 100644 Library/Phalcon/Http/README.md mode change 100755 => 100644 Library/Phalcon/Http/Uri.php mode change 100755 => 100644 Library/Phalcon/Queue/Beanstalk/Extended.php mode change 100755 => 100644 Library/Phalcon/Test/FunctionalTestCase.php mode change 100755 => 100644 Library/Phalcon/Test/ModelTestCase.php mode change 100755 => 100644 Library/Phalcon/Test/UnitTestCase.php diff --git a/Library/Phalcon/Db/Adapter/MongoDB/BulkWriteResult.php b/Library/Phalcon/Db/Adapter/MongoDB/BulkWriteResult.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Client.php b/Library/Phalcon/Db/Adapter/MongoDB/Client.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Collection.php b/Library/Phalcon/Db/Adapter/MongoDB/Collection.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Database.php b/Library/Phalcon/Db/Adapter/MongoDB/Database.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/DeleteResult.php b/Library/Phalcon/Db/Adapter/MongoDB/DeleteResult.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Exception/BadMethodCallException.php b/Library/Phalcon/Db/Adapter/MongoDB/Exception/BadMethodCallException.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Exception/Exception.php b/Library/Phalcon/Db/Adapter/MongoDB/Exception/Exception.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Exception/InvalidArgumentException.php b/Library/Phalcon/Db/Adapter/MongoDB/Exception/InvalidArgumentException.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Exception/RuntimeException.php b/Library/Phalcon/Db/Adapter/MongoDB/Exception/RuntimeException.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Exception/UnexpectedValueException.php b/Library/Phalcon/Db/Adapter/MongoDB/Exception/UnexpectedValueException.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Functions.php b/Library/Phalcon/Db/Adapter/MongoDB/Functions.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/GridFS/Bucket.php b/Library/Phalcon/Db/Adapter/MongoDB/GridFS/Bucket.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/GridFS/CollectionWrapper.php b/Library/Phalcon/Db/Adapter/MongoDB/GridFS/CollectionWrapper.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/GridFS/Exception/CorruptFileException.php b/Library/Phalcon/Db/Adapter/MongoDB/GridFS/Exception/CorruptFileException.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/GridFS/Exception/FileNotFoundException.php b/Library/Phalcon/Db/Adapter/MongoDB/GridFS/Exception/FileNotFoundException.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/GridFS/ReadableStream.php b/Library/Phalcon/Db/Adapter/MongoDB/GridFS/ReadableStream.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/GridFS/StreamWrapper.php b/Library/Phalcon/Db/Adapter/MongoDB/GridFS/StreamWrapper.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/GridFS/WritableStream.php b/Library/Phalcon/Db/Adapter/MongoDB/GridFS/WritableStream.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/InsertManyResult.php b/Library/Phalcon/Db/Adapter/MongoDB/InsertManyResult.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/InsertOneResult.php b/Library/Phalcon/Db/Adapter/MongoDB/InsertOneResult.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Model/BSONArray.php b/Library/Phalcon/Db/Adapter/MongoDB/Model/BSONArray.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Model/BSONDocument.php b/Library/Phalcon/Db/Adapter/MongoDB/Model/BSONDocument.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Model/CollectionInfo.php b/Library/Phalcon/Db/Adapter/MongoDB/Model/CollectionInfo.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Model/CollectionInfoCommandIterator.php b/Library/Phalcon/Db/Adapter/MongoDB/Model/CollectionInfoCommandIterator.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Model/CollectionInfoIterator.php b/Library/Phalcon/Db/Adapter/MongoDB/Model/CollectionInfoIterator.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Model/CollectionInfoLegacyIterator.php b/Library/Phalcon/Db/Adapter/MongoDB/Model/CollectionInfoLegacyIterator.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Model/DatabaseInfo.php b/Library/Phalcon/Db/Adapter/MongoDB/Model/DatabaseInfo.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Model/DatabaseInfoIterator.php b/Library/Phalcon/Db/Adapter/MongoDB/Model/DatabaseInfoIterator.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Model/DatabaseInfoLegacyIterator.php b/Library/Phalcon/Db/Adapter/MongoDB/Model/DatabaseInfoLegacyIterator.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Model/IndexInfo.php b/Library/Phalcon/Db/Adapter/MongoDB/Model/IndexInfo.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Model/IndexInfoIterator.php b/Library/Phalcon/Db/Adapter/MongoDB/Model/IndexInfoIterator.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Model/IndexInfoIteratorIterator.php b/Library/Phalcon/Db/Adapter/MongoDB/Model/IndexInfoIteratorIterator.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Model/IndexInput.php b/Library/Phalcon/Db/Adapter/MongoDB/Model/IndexInput.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Operation/Aggregate.php b/Library/Phalcon/Db/Adapter/MongoDB/Operation/Aggregate.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Operation/BulkWrite.php b/Library/Phalcon/Db/Adapter/MongoDB/Operation/BulkWrite.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Operation/Count.php b/Library/Phalcon/Db/Adapter/MongoDB/Operation/Count.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Operation/CreateCollection.php b/Library/Phalcon/Db/Adapter/MongoDB/Operation/CreateCollection.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Operation/CreateIndexes.php b/Library/Phalcon/Db/Adapter/MongoDB/Operation/CreateIndexes.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Operation/DatabaseCommand.php b/Library/Phalcon/Db/Adapter/MongoDB/Operation/DatabaseCommand.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Operation/Delete.php b/Library/Phalcon/Db/Adapter/MongoDB/Operation/Delete.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Operation/DeleteMany.php b/Library/Phalcon/Db/Adapter/MongoDB/Operation/DeleteMany.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Operation/DeleteOne.php b/Library/Phalcon/Db/Adapter/MongoDB/Operation/DeleteOne.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Operation/Distinct.php b/Library/Phalcon/Db/Adapter/MongoDB/Operation/Distinct.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Operation/DropCollection.php b/Library/Phalcon/Db/Adapter/MongoDB/Operation/DropCollection.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Operation/DropDatabase.php b/Library/Phalcon/Db/Adapter/MongoDB/Operation/DropDatabase.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Operation/DropIndexes.php b/Library/Phalcon/Db/Adapter/MongoDB/Operation/DropIndexes.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Operation/Executable.php b/Library/Phalcon/Db/Adapter/MongoDB/Operation/Executable.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Operation/Find.php b/Library/Phalcon/Db/Adapter/MongoDB/Operation/Find.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Operation/FindAndModify.php b/Library/Phalcon/Db/Adapter/MongoDB/Operation/FindAndModify.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Operation/FindOne.php b/Library/Phalcon/Db/Adapter/MongoDB/Operation/FindOne.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Operation/FindOneAndDelete.php b/Library/Phalcon/Db/Adapter/MongoDB/Operation/FindOneAndDelete.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Operation/FindOneAndReplace.php b/Library/Phalcon/Db/Adapter/MongoDB/Operation/FindOneAndReplace.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Operation/FindOneAndUpdate.php b/Library/Phalcon/Db/Adapter/MongoDB/Operation/FindOneAndUpdate.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Operation/InsertMany.php b/Library/Phalcon/Db/Adapter/MongoDB/Operation/InsertMany.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Operation/InsertOne.php b/Library/Phalcon/Db/Adapter/MongoDB/Operation/InsertOne.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Operation/ListCollections.php b/Library/Phalcon/Db/Adapter/MongoDB/Operation/ListCollections.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Operation/ListDatabases.php b/Library/Phalcon/Db/Adapter/MongoDB/Operation/ListDatabases.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Operation/ListIndexes.php b/Library/Phalcon/Db/Adapter/MongoDB/Operation/ListIndexes.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Operation/ReplaceOne.php b/Library/Phalcon/Db/Adapter/MongoDB/Operation/ReplaceOne.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Operation/Update.php b/Library/Phalcon/Db/Adapter/MongoDB/Operation/Update.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Operation/UpdateMany.php b/Library/Phalcon/Db/Adapter/MongoDB/Operation/UpdateMany.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/Operation/UpdateOne.php b/Library/Phalcon/Db/Adapter/MongoDB/Operation/UpdateOne.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Db/Adapter/MongoDB/UpdateResult.php b/Library/Phalcon/Db/Adapter/MongoDB/UpdateResult.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Http/Client/Exception.php b/Library/Phalcon/Http/Client/Exception.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Http/Client/Header.php b/Library/Phalcon/Http/Client/Header.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Http/Client/Provider/Curl.php b/Library/Phalcon/Http/Client/Provider/Curl.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Http/Client/Provider/Exception.php b/Library/Phalcon/Http/Client/Provider/Exception.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Http/Client/Provider/Stream.php b/Library/Phalcon/Http/Client/Provider/Stream.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Http/Client/README.md b/Library/Phalcon/Http/Client/README.md old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Http/Client/Request.php b/Library/Phalcon/Http/Client/Request.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Http/Client/Response.php b/Library/Phalcon/Http/Client/Response.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Http/README.md b/Library/Phalcon/Http/README.md old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Http/Uri.php b/Library/Phalcon/Http/Uri.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Queue/Beanstalk/Extended.php b/Library/Phalcon/Queue/Beanstalk/Extended.php old mode 100755 new mode 100644 index 65722b905..5f401b952 --- a/Library/Phalcon/Queue/Beanstalk/Extended.php +++ b/Library/Phalcon/Queue/Beanstalk/Extended.php @@ -1,20 +1,20 @@ | -+------------------------------------------------------------------------+ + +------------------------------------------------------------------------+ + | Phalcon Framework | + +------------------------------------------------------------------------+ + | Copyright (c) 2011-2016 Phalcon Team (http://www.phalconphp.com) | + +------------------------------------------------------------------------+ + | This source file is subject to the New BSD License that is bundled | + | with this package in the file docs/LICENSE.txt. | + | | + | If you did not receive a copy of the license and are unable to | + | obtain it through the world-wide-web, please send an email | + | to license@phalconphp.com so we can send you a copy immediately. | + +------------------------------------------------------------------------+ + | Authors: Nikita Vershinin | + +------------------------------------------------------------------------+ */ namespace Phalcon\Queue\Beanstalk; diff --git a/Library/Phalcon/Test/FunctionalTestCase.php b/Library/Phalcon/Test/FunctionalTestCase.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Test/ModelTestCase.php b/Library/Phalcon/Test/ModelTestCase.php old mode 100755 new mode 100644 diff --git a/Library/Phalcon/Test/UnitTestCase.php b/Library/Phalcon/Test/UnitTestCase.php old mode 100755 new mode 100644 diff --git a/tests/_ci/entrypoint.sh b/tests/_ci/entrypoint.sh index 5aa9957ae..25a7b3d05 100755 --- a/tests/_ci/entrypoint.sh +++ b/tests/_ci/entrypoint.sh @@ -26,6 +26,8 @@ echo -e "PHP extension path: ${PURPLE}${PHP_EXTENSION_DIR}${NC}\n" ln -sf /ext/phalcon.so ${PHP_EXTENSION_DIR}/phalcon.so rm -f /etc/php/${TRAVIS_PHP_VERSION}/cli/conf.d/50-phalcon.ini +rm -f /etc/php/${TRAVIS_PHP_VERSION}/cli/conf.d/20-phalcon.ini + ln -s /app/tests/_ci/phalcon.ini /etc/php/${TRAVIS_PHP_VERSION}/cli/conf.d/50-phalcon.ini PHP_FULL_VERSION=`php -r 'echo phpversion();'` diff --git a/tests/_support/Helper/Unit.php b/tests/_support/Helper/Unit.php index 4efc9bb50..c18aa587a 100644 --- a/tests/_support/Helper/Unit.php +++ b/tests/_support/Helper/Unit.php @@ -2,9 +2,9 @@ namespace Helper; +use ReflectionClass; use Codeception\Module; -use Codeception\TestCase; -use Mockery; +use Codeception\TestInterface; /** * Unit Helper @@ -17,29 +17,20 @@ class Unit extends Module { /** - * @var \Codeception\TestCase + * @var TestInterface */ protected $test; /** * Executed before each test. * - * @param \Codeception\TestCase $test + * @param TestInterface $test */ - public function _before(TestCase $test) + public function _before(TestInterface $test) { $this->test = $test; } - /** - * Executed after each test. - * - * @param \Codeception\TestCase $test - */ - public function _after(TestCase $test) - { - } - /** * @param mixed $exceptionName * @param string $exceptionMessage @@ -49,4 +40,25 @@ public function setExpectedException($exceptionName, $exceptionMessage = '', $ex { $this->test->setExpectedException($exceptionName, $exceptionMessage, $exceptionCode); } + + public function getProtectedProperty($obj, $prop) + { + $reflection = new ReflectionClass($obj); + + $property = $reflection->getProperty($prop); + $property->setAccessible(true); + + return $property->getValue($obj); + } + + public function setProtectedProperty($obj, $prop, $value) + { + $reflection = new ReflectionClass($obj); + + $property = $reflection->getProperty($prop); + $property->setAccessible(true); + $property->setValue($obj, $value); + + $this->assertEquals($value, $property->getValue($obj)); + } } diff --git a/tests/unit/Annotations/Adapter/MemcachedTest.php b/tests/unit/Annotations/Adapter/MemcachedTest.php index a7736a32d..2962d1b9f 100644 --- a/tests/unit/Annotations/Adapter/MemcachedTest.php +++ b/tests/unit/Annotations/Adapter/MemcachedTest.php @@ -5,7 +5,6 @@ use stdClass; use UnitTester; use ReflectionMethod; -use ReflectionProperty; use Codeception\TestCase\Test; use Phalcon\Cache\Backend\Libmemcached; use Phalcon\Annotations\Adapter\Memcached; @@ -107,11 +106,11 @@ public function testShouldGetCacheBackendThroughGetter() public function testShouldGetCacheBackendThroughReflectionSetter() { $object = new Memcached(['host' => TEST_MC_HOST]); - $mock = $this->getMock(Libmemcached::class, [], [], '', false); + $mock = $this->getMockBuilder(Libmemcached::class) + ->disableOriginalConstructor() + ->getMock(); - $reflectedProperty = new ReflectionProperty(get_class($object), 'memcached'); - $reflectedProperty->setAccessible(true); - $reflectedProperty->setValue($object, $mock); + $this->tester->setProtectedProperty($object, 'memcached', $mock); $reflectedMethod = new ReflectionMethod(get_class($object), 'getCacheBackend'); $reflectedMethod->setAccessible(true); @@ -139,10 +138,8 @@ public function testShouldPrepareKey($key) public function testShouldCreateMemcachedAdapterInstanceAndSetOptions($options, $expected) { $object = new Memcached($options); - $reflectedProperty = new ReflectionProperty(get_class($object), 'options'); - $reflectedProperty->setAccessible(true); - $this->assertEquals($expected, $reflectedProperty->getValue($object)); + $this->assertEquals($expected, $this->tester->getProtectedProperty($object, 'options')); } public function providerReadWrite() From 3559c3b75ab9099090db701a817b3cca02171257 Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Fri, 30 Sep 2016 23:57:01 +0300 Subject: [PATCH 04/26] Cleaned build.sh --- tests/build.sh | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/tests/build.sh b/tests/build.sh index b4a21c305..17d2ce71b 100755 --- a/tests/build.sh +++ b/tests/build.sh @@ -2,7 +2,7 @@ # # Phalcon Framework # -# Copyright (c) 2011-2016 Phalcon Team (http://www.phalconphp.com) +# Copyright (c) 2011-2016 Phalcon Team (https://www.phalconphp.com) # # This source file is subject to the New BSD License that is bundled # with this package in the file LICENSE.txt. @@ -13,12 +13,23 @@ # # Authors: Serghei Iakovlev -docker_bin="$(which docker.io 2> /dev/null || which docker 2> /dev/null)" +docker_bin="$(which docker 2> /dev/null)" -[ -z "${TRAVIS_PHP_VERSION}" ] && echo "Need to set TRAVIS_PHP_VERSION variable. Fox example: 'export TRAVIS_PHP_VERSION=7.0'" && exit 1; -[ -z "${PHALCON_SRC_PATH}" ] && echo "Need to set PHALCON_SRC_PATH variable. Fox example: 'export PHALCON_SRC_PATH=/home/user/src/phalcon'" && exit 1; -[ -z "${TEST_BT_HOST}" ] && TEST_BT_HOST="incubator_beanstalkd" -[ -z "${TRAVIS_BUILD_DIR}" ] && TRAVIS_BUILD_DIR=$(cd $(dirname "$1") && pwd -P)/$(basename "$1") +if [ -z "${TEST_BT_HOST}" ]; then + TEST_BT_HOST="incubator_beanstalkd" +fi + +if [ -z "${TRAVIS_BUILD_DIR}" ]; then + export TRAVIS_BUILD_DIR=$(cd $(dirname "$1") && pwd -P)/$(basename "$1") +fi + +if [ -z "${TRAVIS_PHP_VERSION}" ]; then + export TRAVIS_PHP_VERSION=7.0 +fi + +if [ -z "${PHALCON_SRC_PATH}" ]; then + export PHALCON_SRC_PATH=$(cd $(dirname "$TRAVIS_BUILD_DIR") && pwd -P)/cphalcon +fi RUN_ARGS="$@" shift @@ -33,7 +44,6 @@ function zephir() { if [ ! -f ${TRAVIS_BUILD_DIR}/tests/_ci/phalcon.so ]; then echo "Phalcon extension not loaded, compiling it..." - cd ${PHALCON_SRC_PATH} zephir "fullclean" @@ -52,13 +62,15 @@ if [ ! -f ${TRAVIS_BUILD_DIR}/tests/_ci/phalcon.so ]; then fi if [ ! -f ${TRAVIS_BUILD_DIR}/tests/_ci/entrypoint.sh ]; then - echo "Unable locate docker entry point." + echo "Unable locate docker entrypoint.sh" exit 1; fi chmod +x ${TRAVIS_BUILD_DIR}/tests/_ci/entrypoint.sh -if [ -z ${TRAVIS} ]; then ${docker_bin} restart ${TEST_BT_HOST}; fi +if [ -z ${TRAVIS} ]; then + ${docker_bin} restart ${TEST_BT_HOST}; +fi ${docker_bin} run -it --rm \ --entrypoint /entrypoint.sh \ From 280c0111b18a6484d8becf061b032fac809e5673 Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Sat, 1 Oct 2016 00:15:26 +0300 Subject: [PATCH 05/26] Silent mode --- .travis.yml | 6 +++--- tests/_ci/entrypoint.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8a9963610..4e84e6f35 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,14 +25,14 @@ before_install: - phpenv config-rm xdebug.ini install: - - git clone --depth=1 --branch=${PHALCON_VERSION} https://github.com/phalcon/cphalcon.git ${PHALCON_SRC_PATH} + - git clone --depth=1 -q --branch=${PHALCON_VERSION} https://github.com/phalcon/cphalcon.git ${PHALCON_SRC_PATH} # Install Docker - sudo apt-get update -qq - sudo apt-get install -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y --force-yes docker-engine - sudo service docker restart # Install Docker Compose - sudo rm /usr/local/bin/docker-compose - - curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose + - curl -s -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose - chmod +x docker-compose - sudo mv docker-compose /usr/local/bin # Install Dependencies @@ -54,6 +54,6 @@ script: notifications: email: recipients: - - serghei@phalconphp.com + - build@phalconphp.com on_success: change on_failure: always diff --git a/tests/_ci/entrypoint.sh b/tests/_ci/entrypoint.sh index 25a7b3d05..8c8ccb22d 100755 --- a/tests/_ci/entrypoint.sh +++ b/tests/_ci/entrypoint.sh @@ -43,7 +43,7 @@ echo -e "" /app/vendor/bin/phpcs --standard=PSR2 --colors --extensions=php --encoding=utf-8 Library/ result_phpcs=$? -/app/vendor/bin/codecept run -vvv "${RUN_ARGS}" +/app/vendor/bin/codecept run "${RUN_ARGS}" result_codecept=$? if [ ${result_codecept} -ne 0 -o ${result_phpcs} -ne 0 ]; From 4ddd06b2305f47674383b39062f7eb863a515fcd Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Sun, 2 Oct 2016 20:06:50 +0300 Subject: [PATCH 06/26] Update license --- docs/LICENSE.txt => LICENSE.txt | 0 Library/Phalcon/Acl/Adapter/Database.php | 5 +-- Library/Phalcon/Acl/Adapter/Mongo.php | 5 +-- Library/Phalcon/Acl/Adapter/Redis.php | 7 ++-- Library/Phalcon/Acl/Factory/Memory.php | 5 +-- .../Phalcon/Annotations/Adapter/Aerospike.php | 5 +-- Library/Phalcon/Annotations/Adapter/Base.php | 5 +-- .../Phalcon/Annotations/Adapter/Memcached.php | 5 +-- Library/Phalcon/Annotations/Adapter/Redis.php | 5 +-- Library/Phalcon/Avatar/Avatarable.php | 30 ++++++++--------- Library/Phalcon/Avatar/Gravatar.php | 30 ++++++++--------- Library/Phalcon/Cache/Backend/Aerospike.php | 30 ++++++++--------- Library/Phalcon/Cache/Backend/Database.php | 5 +-- Library/Phalcon/Cache/Backend/Prefixable.php | 5 +-- Library/Phalcon/Cache/Backend/Wincache.php | 5 +-- Library/Phalcon/Cli/Console/Extended.php | 30 ++++++++--------- .../Phalcon/Cli/Environment/Environment.php | 30 ++++++++--------- .../Environment/EnvironmentAwareInterface.php | 30 ++++++++--------- .../Cli/Environment/EnvironmentInterface.php | 30 ++++++++--------- .../Phalcon/Cli/Input/ArgumentInterface.php | 30 ++++++++--------- Library/Phalcon/Cli/Input/OptionInterface.php | 30 ++++++++--------- .../Phalcon/Cli/Input/ParameterInterface.php | 30 ++++++++--------- Library/Phalcon/Config/Adapter/Xml.php | 31 +++++++++--------- Library/Phalcon/Config/Loader.php | 5 +-- .../Phalcon/Db/Adapter/Cacheable/Mysql.php | 2 +- Library/Phalcon/Db/Adapter/Factory.php | 5 +-- Library/Phalcon/Db/Adapter/Mongo/Client.php | 2 +- .../Phalcon/Db/Adapter/Mongo/Collection.php | 2 +- Library/Phalcon/Db/Adapter/Mongo/Cursor.php | 2 +- Library/Phalcon/Db/Adapter/Mongo/Db.php | 2 +- Library/Phalcon/Db/Adapter/Mongo/DbRef.php | 2 +- Library/Phalcon/Db/Adapter/Mongo/Document.php | 2 +- Library/Phalcon/Db/Adapter/Pdo/Oracle.php | 32 +++++++++---------- Library/Phalcon/Db/Dialect/MysqlExtended.php | 2 +- Library/Phalcon/Db/Dialect/Oracle.php | 32 +++++++++---------- Library/Phalcon/Db/Result/Serializable.php | 4 +-- Library/Phalcon/Error/Application.php | 6 ++-- Library/Phalcon/Error/Error.php | 6 ++-- Library/Phalcon/Error/Handler.php | 6 ++-- Library/Phalcon/Http/Client/Exception.php | 5 +-- Library/Phalcon/Http/Client/Header.php | 5 +-- Library/Phalcon/Http/Client/Provider/Curl.php | 6 ++-- .../Http/Client/Provider/Exception.php | 6 ++-- .../Phalcon/Http/Client/Provider/Stream.php | 6 ++-- Library/Phalcon/Http/Client/Request.php | 5 +-- Library/Phalcon/Http/Client/Response.php | 5 +-- Library/Phalcon/Http/Request/Method.php | 5 +-- Library/Phalcon/Http/Response/StatusCode.php | 5 +-- Library/Phalcon/Http/Uri.php | 5 +-- Library/Phalcon/Legacy/Crypt.php | 5 +-- Library/Phalcon/Legacy/Crypt/Exception.php | 5 +-- Library/Phalcon/Legacy/CryptInterface.php | 5 +-- Library/Phalcon/Logger/Adapter/Database.php | 5 +-- .../Phalcon/Logger/Adapter/File/Multiple.php | 21 +++++++++--- Library/Phalcon/Logger/Adapter/Firelogger.php | 25 ++++++++++++--- Library/Phalcon/Logger/Adapter/Udplogger.php | 8 ++--- .../Phalcon/Logger/Formatter/Firelogger.php | 30 +++++++++++++---- Library/Phalcon/Mailer/Manager.php | 5 +-- Library/Phalcon/Mailer/Message.php | 5 +-- Library/Phalcon/Mvc/MongoCollection.php | 30 ++++++++--------- .../Mvc/View/Engine/Twig/CoreExtension.php | 28 ++++++++++------ .../Mvc/View/Engine/Twig/Environment.php | 28 ++++++++++------ .../Mvc/View/Engine/Twig/Nodes/Assets.php | 28 ++++++++++------ .../View/Engine/Twig/TokenParsers/Assets.php | 28 ++++++++++------ Library/Phalcon/Paginator/Pager.php | 28 ++++++++++------ Library/Phalcon/Paginator/Pager/Layout.php | 28 ++++++++++------ .../Paginator/Pager/Layout/Bootstrap.php | 28 ++++++++++------ Library/Phalcon/Paginator/Pager/Range.php | 28 ++++++++++------ .../Phalcon/Paginator/Pager/Range/Jumping.php | 28 ++++++++++------ .../Phalcon/Paginator/Pager/Range/Sliding.php | 28 ++++++++++------ Library/Phalcon/Queue/Beanstalk/Extended.php | 30 ++++++++--------- Library/Phalcon/Session/Adapter/Aerospike.php | 30 ++++++++--------- Library/Phalcon/Session/Adapter/Database.php | 6 ++-- Library/Phalcon/Session/Adapter/Mongo.php | 6 ++-- Library/Phalcon/Test/FunctionalTestCase.php | 5 +-- Library/Phalcon/Test/ModelTestCase.php | 5 +-- Library/Phalcon/Test/UnitTestCase.php | 5 +-- .../Phalcon/Translate/Adapter/Database.php | 5 +-- Library/Phalcon/Utils/Slug.php | 9 +++--- .../Validation/Validator/CardNumber.php | 5 +-- .../Validation/Validator/ConfirmationOf.php | 8 ++--- .../Validation/Validator/Db/Uniqueness.php | 5 +-- .../Phalcon/Validation/Validator/MongoId.php | 5 +-- .../Validation/Validator/PasswordStrength.php | 8 ++--- .../Validation/Validator/ReCaptcha.php | 5 +-- docs/LICENSE.md | 14 -------- 86 files changed, 642 insertions(+), 486 deletions(-) rename docs/LICENSE.txt => LICENSE.txt (100%) delete mode 100644 docs/LICENSE.md diff --git a/docs/LICENSE.txt b/LICENSE.txt similarity index 100% rename from docs/LICENSE.txt rename to LICENSE.txt diff --git a/Library/Phalcon/Acl/Adapter/Database.php b/Library/Phalcon/Acl/Adapter/Database.php index 220a0e269..35a8ddf10 100644 --- a/Library/Phalcon/Acl/Adapter/Database.php +++ b/Library/Phalcon/Acl/Adapter/Database.php @@ -1,12 +1,13 @@ | - +------------------------------------------------------------------------+ - */ + +------------------------------------------------------------------------+ + | Phalcon Framework | + +------------------------------------------------------------------------+ + | Copyright (c) 2011-2016 Phalcon Team (https://www.phalconphp.com) | + +------------------------------------------------------------------------+ + | This source file is subject to the New BSD License that is bundled | + | with this package in the file LICENSE.txt. | + | | + | If you did not receive a copy of the license and are unable to | + | obtain it through the world-wide-web, please send an email | + | to license@phalconphp.com so we can send you a copy immediately. | + +------------------------------------------------------------------------+ + | Authors: Serghei Iakovlev | + +------------------------------------------------------------------------+ +*/ namespace Phalcon\Avatar; diff --git a/Library/Phalcon/Avatar/Gravatar.php b/Library/Phalcon/Avatar/Gravatar.php index 325fecc24..938d7c00b 100644 --- a/Library/Phalcon/Avatar/Gravatar.php +++ b/Library/Phalcon/Avatar/Gravatar.php @@ -1,21 +1,21 @@ | - +------------------------------------------------------------------------+ - */ + +------------------------------------------------------------------------+ + | Phalcon Framework | + +------------------------------------------------------------------------+ + | Copyright (c) 2011-2016 Phalcon Team (https://www.phalconphp.com) | + +------------------------------------------------------------------------+ + | This source file is subject to the New BSD License that is bundled | + | with this package in the file LICENSE.txt. | + | | + | If you did not receive a copy of the license and are unable to | + | obtain it through the world-wide-web, please send an email | + | to license@phalconphp.com so we can send you a copy immediately. | + +------------------------------------------------------------------------+ + | Authors: Serghei Iakovlev | + +------------------------------------------------------------------------+ +*/ namespace Phalcon\Avatar; diff --git a/Library/Phalcon/Cache/Backend/Aerospike.php b/Library/Phalcon/Cache/Backend/Aerospike.php index 1956b001c..814b5222f 100644 --- a/Library/Phalcon/Cache/Backend/Aerospike.php +++ b/Library/Phalcon/Cache/Backend/Aerospike.php @@ -1,21 +1,21 @@ | - +------------------------------------------------------------------------+ - */ + +------------------------------------------------------------------------+ + | Phalcon Framework | + +------------------------------------------------------------------------+ + | Copyright (c) 2011-2016 Phalcon Team (https://www.phalconphp.com) | + +------------------------------------------------------------------------+ + | This source file is subject to the New BSD License that is bundled | + | with this package in the file LICENSE.txt. | + | | + | If you did not receive a copy of the license and are unable to | + | obtain it through the world-wide-web, please send an email | + | to license@phalconphp.com so we can send you a copy immediately. | + +------------------------------------------------------------------------+ + | Authors: Serghei Iakovlev | + +------------------------------------------------------------------------+ +*/ namespace Phalcon\Cache\Backend; diff --git a/Library/Phalcon/Cache/Backend/Database.php b/Library/Phalcon/Cache/Backend/Database.php index 5908e194a..f92e73262 100644 --- a/Library/Phalcon/Cache/Backend/Database.php +++ b/Library/Phalcon/Cache/Backend/Database.php @@ -1,12 +1,13 @@ | - +------------------------------------------------------------------------+ - */ + +------------------------------------------------------------------------+ + | Phalcon Framework | + +------------------------------------------------------------------------+ + | Copyright (c) 2011-2016 Phalcon Team (https://www.phalconphp.com) | + +------------------------------------------------------------------------+ + | This source file is subject to the New BSD License that is bundled | + | with this package in the file LICENSE.txt. | + | | + | If you did not receive a copy of the license and are unable to | + | obtain it through the world-wide-web, please send an email | + | to license@phalconphp.com so we can send you a copy immediately. | + +------------------------------------------------------------------------+ + | Authors: Sebastian Arrubia | + +------------------------------------------------------------------------+ +*/ namespace Phalcon\Cli\Console; diff --git a/Library/Phalcon/Cli/Environment/Environment.php b/Library/Phalcon/Cli/Environment/Environment.php index ef5663909..bc7e095bf 100644 --- a/Library/Phalcon/Cli/Environment/Environment.php +++ b/Library/Phalcon/Cli/Environment/Environment.php @@ -1,21 +1,21 @@ | - +------------------------------------------------------------------------+ - */ + +------------------------------------------------------------------------+ + | Phalcon Framework | + +------------------------------------------------------------------------+ + | Copyright (c) 2011-2016 Phalcon Team (https://www.phalconphp.com) | + +------------------------------------------------------------------------+ + | This source file is subject to the New BSD License that is bundled | + | with this package in the file LICENSE.txt. | + | | + | If you did not receive a copy of the license and are unable to | + | obtain it through the world-wide-web, please send an email | + | to license@phalconphp.com so we can send you a copy immediately. | + +------------------------------------------------------------------------+ + | Authors: Serghei Iakovlev | + +------------------------------------------------------------------------+ +*/ namespace Phalcon\Cli\Environment; diff --git a/Library/Phalcon/Cli/Environment/EnvironmentAwareInterface.php b/Library/Phalcon/Cli/Environment/EnvironmentAwareInterface.php index d6989fb0a..5dafb7b9d 100644 --- a/Library/Phalcon/Cli/Environment/EnvironmentAwareInterface.php +++ b/Library/Phalcon/Cli/Environment/EnvironmentAwareInterface.php @@ -1,21 +1,21 @@ | - +------------------------------------------------------------------------+ - */ + +------------------------------------------------------------------------+ + | Phalcon Framework | + +------------------------------------------------------------------------+ + | Copyright (c) 2011-2016 Phalcon Team (https://www.phalconphp.com) | + +------------------------------------------------------------------------+ + | This source file is subject to the New BSD License that is bundled | + | with this package in the file LICENSE.txt. | + | | + | If you did not receive a copy of the license and are unable to | + | obtain it through the world-wide-web, please send an email | + | to license@phalconphp.com so we can send you a copy immediately. | + +------------------------------------------------------------------------+ + | Authors: Serghei Iakovlev | + +------------------------------------------------------------------------+ +*/ namespace Phalcon\Cli\Environment; diff --git a/Library/Phalcon/Cli/Environment/EnvironmentInterface.php b/Library/Phalcon/Cli/Environment/EnvironmentInterface.php index ffc275135..dfd907959 100644 --- a/Library/Phalcon/Cli/Environment/EnvironmentInterface.php +++ b/Library/Phalcon/Cli/Environment/EnvironmentInterface.php @@ -1,21 +1,21 @@ | - +------------------------------------------------------------------------+ - */ + +------------------------------------------------------------------------+ + | Phalcon Framework | + +------------------------------------------------------------------------+ + | Copyright (c) 2011-2016 Phalcon Team (https://www.phalconphp.com) | + +------------------------------------------------------------------------+ + | This source file is subject to the New BSD License that is bundled | + | with this package in the file LICENSE.txt. | + | | + | If you did not receive a copy of the license and are unable to | + | obtain it through the world-wide-web, please send an email | + | to license@phalconphp.com so we can send you a copy immediately. | + +------------------------------------------------------------------------+ + | Authors: Serghei Iakovlev | + +------------------------------------------------------------------------+ +*/ namespace Phalcon\Cli\Environment; diff --git a/Library/Phalcon/Cli/Input/ArgumentInterface.php b/Library/Phalcon/Cli/Input/ArgumentInterface.php index 17503ce12..421d38bff 100644 --- a/Library/Phalcon/Cli/Input/ArgumentInterface.php +++ b/Library/Phalcon/Cli/Input/ArgumentInterface.php @@ -1,21 +1,21 @@ | - +------------------------------------------------------------------------+ - */ + +------------------------------------------------------------------------+ + | Phalcon Framework | + +------------------------------------------------------------------------+ + | Copyright (c) 2011-2016 Phalcon Team (https://www.phalconphp.com) | + +------------------------------------------------------------------------+ + | This source file is subject to the New BSD License that is bundled | + | with this package in the file LICENSE.txt. | + | | + | If you did not receive a copy of the license and are unable to | + | obtain it through the world-wide-web, please send an email | + | to license@phalconphp.com so we can send you a copy immediately. | + +------------------------------------------------------------------------+ + | Authors: Serghei Iakovlev | + +------------------------------------------------------------------------+ +*/ namespace Phalcon\Cli\Input; diff --git a/Library/Phalcon/Cli/Input/OptionInterface.php b/Library/Phalcon/Cli/Input/OptionInterface.php index fcb29fab0..6e3313b2d 100644 --- a/Library/Phalcon/Cli/Input/OptionInterface.php +++ b/Library/Phalcon/Cli/Input/OptionInterface.php @@ -1,21 +1,21 @@ | - +------------------------------------------------------------------------+ - */ + +------------------------------------------------------------------------+ + | Phalcon Framework | + +------------------------------------------------------------------------+ + | Copyright (c) 2011-2016 Phalcon Team (https://www.phalconphp.com) | + +------------------------------------------------------------------------+ + | This source file is subject to the New BSD License that is bundled | + | with this package in the file LICENSE.txt. | + | | + | If you did not receive a copy of the license and are unable to | + | obtain it through the world-wide-web, please send an email | + | to license@phalconphp.com so we can send you a copy immediately. | + +------------------------------------------------------------------------+ + | Authors: Serghei Iakovlev | + +------------------------------------------------------------------------+ +*/ namespace Phalcon\Cli\Input; diff --git a/Library/Phalcon/Cli/Input/ParameterInterface.php b/Library/Phalcon/Cli/Input/ParameterInterface.php index 5fd9297ca..ac41c0997 100644 --- a/Library/Phalcon/Cli/Input/ParameterInterface.php +++ b/Library/Phalcon/Cli/Input/ParameterInterface.php @@ -1,21 +1,21 @@ | - +------------------------------------------------------------------------+ - */ + +------------------------------------------------------------------------+ + | Phalcon Framework | + +------------------------------------------------------------------------+ + | Copyright (c) 2011-2016 Phalcon Team (https://www.phalconphp.com) | + +------------------------------------------------------------------------+ + | This source file is subject to the New BSD License that is bundled | + | with this package in the file LICENSE.txt. | + | | + | If you did not receive a copy of the license and are unable to | + | obtain it through the world-wide-web, please send an email | + | to license@phalconphp.com so we can send you a copy immediately. | + +------------------------------------------------------------------------+ + | Authors: Serghei Iakovlev | + +------------------------------------------------------------------------+ +*/ namespace Phalcon\Cli\Input; diff --git a/Library/Phalcon/Config/Adapter/Xml.php b/Library/Phalcon/Config/Adapter/Xml.php index ddd875c2a..e44e9c717 100644 --- a/Library/Phalcon/Config/Adapter/Xml.php +++ b/Library/Phalcon/Config/Adapter/Xml.php @@ -1,22 +1,21 @@ | - | Serghei Iakovlev | - +------------------------------------------------------------------------+ - */ + +------------------------------------------------------------------------+ + | Phalcon Framework | + +------------------------------------------------------------------------+ + | Copyright (c) 2011-2016 Phalcon Team (https://www.phalconphp.com) | + +------------------------------------------------------------------------+ + | This source file is subject to the New BSD License that is bundled | + | with this package in the file LICENSE.txt. | + | | + | If you did not receive a copy of the license and are unable to | + | obtain it through the world-wide-web, please send an email | + | to license@phalconphp.com so we can send you a copy immediately. | + +------------------------------------------------------------------------+ + | Authors: Andres Gutierrez | + +------------------------------------------------------------------------+ +*/ namespace Phalcon\Config\Adapter; diff --git a/Library/Phalcon/Config/Loader.php b/Library/Phalcon/Config/Loader.php index f795d670a..85fd27488 100644 --- a/Library/Phalcon/Config/Loader.php +++ b/Library/Phalcon/Config/Loader.php @@ -1,12 +1,13 @@ | - | Eduar Carvajal | - +------------------------------------------------------------------------+ - */ + +------------------------------------------------------------------------+ + | Phalcon Framework | + +------------------------------------------------------------------------+ + | Copyright (c) 2011-2016 Phalcon Team (https://www.phalconphp.com) | + +------------------------------------------------------------------------+ + | This source file is subject to the New BSD License that is bundled | + | with this package in the file LICENSE.txt. | + | | + | If you did not receive a copy of the license and are unable to | + | obtain it through the world-wide-web, please send an email | + | to license@phalconphp.com so we can send you a copy immediately. | + +------------------------------------------------------------------------+ + | Authors: Andres Gutierrez | + | Eduar Carvajal | + +------------------------------------------------------------------------+ +*/ namespace Phalcon\Db\Adapter\Pdo; diff --git a/Library/Phalcon/Db/Dialect/MysqlExtended.php b/Library/Phalcon/Db/Dialect/MysqlExtended.php index 278568c42..8f66738e4 100644 --- a/Library/Phalcon/Db/Dialect/MysqlExtended.php +++ b/Library/Phalcon/Db/Dialect/MysqlExtended.php @@ -7,7 +7,7 @@ | Copyright (c) 2011-2016 Phalcon Team (http://www.phalconphp.com) | +------------------------------------------------------------------------+ | This source file is subject to the New BSD License that is bundled | - | with this package in the file docs/LICENSE.txt. | + | with this package in the file LICENSE.txt. | | | | If you did not receive a copy of the license and are unable to | | obtain it through the world-wide-web, please send an email | diff --git a/Library/Phalcon/Db/Dialect/Oracle.php b/Library/Phalcon/Db/Dialect/Oracle.php index a6698e25b..417b09597 100644 --- a/Library/Phalcon/Db/Dialect/Oracle.php +++ b/Library/Phalcon/Db/Dialect/Oracle.php @@ -1,22 +1,22 @@ | - | Eduar Carvajal | - +------------------------------------------------------------------------+ - */ + +------------------------------------------------------------------------+ + | Phalcon Framework | + +------------------------------------------------------------------------+ + | Copyright (c) 2011-2016 Phalcon Team (http://www.phalconphp.com) | + +------------------------------------------------------------------------+ + | This source file is subject to the New BSD License that is bundled | + | with this package in the file LICENSE.txt. | + | | + | If you did not receive a copy of the license and are unable to | + | obtain it through the world-wide-web, please send an email | + | to license@phalconphp.com so we can send you a copy immediately. | + +------------------------------------------------------------------------+ + | Authors: Andres Gutierrez | + | Eduar Carvajal | + +------------------------------------------------------------------------+ +*/ namespace Phalcon\Db\Dialect; diff --git a/Library/Phalcon/Db/Result/Serializable.php b/Library/Phalcon/Db/Result/Serializable.php index 579b3df25..c5c80f076 100644 --- a/Library/Phalcon/Db/Result/Serializable.php +++ b/Library/Phalcon/Db/Result/Serializable.php @@ -1,4 +1,5 @@ | +------------------------------------------------------------------------+ */ - namespace Phalcon\Db\Result; /** diff --git a/Library/Phalcon/Error/Application.php b/Library/Phalcon/Error/Application.php index f85e4421a..51a1870da 100644 --- a/Library/Phalcon/Error/Application.php +++ b/Library/Phalcon/Error/Application.php @@ -1,12 +1,13 @@ | +------------------------------------------------------------------------+ */ + namespace Phalcon\Error; use Phalcon\Config; diff --git a/Library/Phalcon/Error/Error.php b/Library/Phalcon/Error/Error.php index ae8685ab9..bd944c77a 100644 --- a/Library/Phalcon/Error/Error.php +++ b/Library/Phalcon/Error/Error.php @@ -1,12 +1,13 @@ | +------------------------------------------------------------------------+ */ + namespace Phalcon\Error; /** diff --git a/Library/Phalcon/Error/Handler.php b/Library/Phalcon/Error/Handler.php index 275d760d6..ebe9debbf 100644 --- a/Library/Phalcon/Error/Handler.php +++ b/Library/Phalcon/Error/Handler.php @@ -1,12 +1,13 @@ | +------------------------------------------------------------------------+ */ + namespace Phalcon\Error; use Phalcon\Di; diff --git a/Library/Phalcon/Http/Client/Exception.php b/Library/Phalcon/Http/Client/Exception.php index 8f96cc7b5..dbc60d7ba 100644 --- a/Library/Phalcon/Http/Client/Exception.php +++ b/Library/Phalcon/Http/Client/Exception.php @@ -1,12 +1,13 @@ | +------------------------------------------------------------------------+ */ + namespace Phalcon\Http\Client\Provider; use Phalcon\Http\Client\Exception as HttpException; diff --git a/Library/Phalcon/Http/Client/Provider/Exception.php b/Library/Phalcon/Http/Client/Provider/Exception.php index ebeb710cc..79b80a585 100644 --- a/Library/Phalcon/Http/Client/Provider/Exception.php +++ b/Library/Phalcon/Http/Client/Provider/Exception.php @@ -1,12 +1,13 @@ | +------------------------------------------------------------------------+ */ + namespace Phalcon\Http\Client\Provider; class Exception extends \Phalcon\Http\Client\Exception diff --git a/Library/Phalcon/Http/Client/Provider/Stream.php b/Library/Phalcon/Http/Client/Provider/Stream.php index d8e0f7f20..c35e3c82d 100644 --- a/Library/Phalcon/Http/Client/Provider/Stream.php +++ b/Library/Phalcon/Http/Client/Provider/Stream.php @@ -1,12 +1,13 @@ | +------------------------------------------------------------------------+ */ + namespace Phalcon\Http\Client\Provider; use Phalcon\Http\Client\Exception as HttpException; diff --git a/Library/Phalcon/Http/Client/Request.php b/Library/Phalcon/Http/Client/Request.php index f8a052340..8773b6e8b 100644 --- a/Library/Phalcon/Http/Client/Request.php +++ b/Library/Phalcon/Http/Client/Request.php @@ -1,12 +1,13 @@ | + +------------------------------------------------------------------------+ +*/ + namespace Phalcon\Logger\Adapter\File; use Phalcon\Logger\Exception as LoggerException; @@ -13,10 +30,6 @@ * Adapter to save logs into multiple log files based on their level. * * TODO Implement transactions. - * - * @version 0.1 - * @author Richard Laffers - * @license The BSD 3-Clause License {@link http://opensource.org/licenses/BSD-3-Clause} */ class Multiple extends FileLogger implements AdapterInterface { diff --git a/Library/Phalcon/Logger/Adapter/Firelogger.php b/Library/Phalcon/Logger/Adapter/Firelogger.php index 2af3ab2fd..297357210 100644 --- a/Library/Phalcon/Logger/Adapter/Firelogger.php +++ b/Library/Phalcon/Logger/Adapter/Firelogger.php @@ -1,4 +1,22 @@ | + +------------------------------------------------------------------------+ +*/ + namespace Phalcon\Logger\Adapter; use Phalcon\Logger\Formatter\Firelogger as FireloggerFormatter; @@ -9,10 +27,7 @@ * Phalcon\Logger\Adapter\Firelogger * Sends messages to the Firelogger extension in Firefox. * - * @link http://firelogger.binaryage.com/ - * @version 0.1 - * @author Richard Laffers - * @license The BSD 3-Clause License {@link http://opensource.org/licenses/BSD-3-Clause} + * @link http://firelogger.binaryage.com/ */ class Firelogger extends LoggerAdapter implements AdapterInterface { @@ -240,7 +255,7 @@ protected function checkPassword() $serverHash = md5("#FireLoggerPassword#" . $this->options['password'] . "#"); if ($clientHash !== $serverHash) { // passwords do not match $this->enabled = false; - + if ($this->options['triggerError']) { trigger_error( "FireLogger passwords do not match. Have you specified correct password FireLogger extension?" diff --git a/Library/Phalcon/Logger/Adapter/Udplogger.php b/Library/Phalcon/Logger/Adapter/Udplogger.php index 117324716..cdda9dd16 100644 --- a/Library/Phalcon/Logger/Adapter/Udplogger.php +++ b/Library/Phalcon/Logger/Adapter/Udplogger.php @@ -1,12 +1,13 @@ */ class Udplogger extends LoggerAdapter implements AdapterInterface { diff --git a/Library/Phalcon/Logger/Formatter/Firelogger.php b/Library/Phalcon/Logger/Formatter/Firelogger.php index ba352dc5a..243b48729 100644 --- a/Library/Phalcon/Logger/Formatter/Firelogger.php +++ b/Library/Phalcon/Logger/Formatter/Firelogger.php @@ -1,19 +1,35 @@ | + +------------------------------------------------------------------------+ +*/ + namespace Phalcon\Logger\Formatter; -use \Phalcon\Logger\Exception; -use \Phalcon\Logger as Logger; +use Phalcon\Logger\Formatter; +use Phalcon\Logger as Logger; +use Phalcon\Logger\FormatterInterface; /** * Phalcon\Logger\Formatter\Firelogger * Formats messages to be sent to Firelogger * - * @link http://firelogger.binaryage.com/ - * @version 0.1 - * @author Richard Laffers - * @license The BSD 3-Clause License {@link http://opensource.org/licenses/BSD-3-Clause} + * @link http://firelogger.binaryage.com/ */ -class Firelogger extends \Phalcon\Logger\Formatter implements \Phalcon\Logger\FormatterInterface +class Firelogger extends Formatter implements FormatterInterface { /** * Holds name of this logger. diff --git a/Library/Phalcon/Mailer/Manager.php b/Library/Phalcon/Mailer/Manager.php index 3ae0dca78..8c8b315b0 100644 --- a/Library/Phalcon/Mailer/Manager.php +++ b/Library/Phalcon/Mailer/Manager.php @@ -1,12 +1,13 @@ | - +------------------------------------------------------------------------+ - */ + +------------------------------------------------------------------------+ + | Phalcon Framework | + +------------------------------------------------------------------------+ + | Copyright (c) 2011-2016 Phalcon Team (https://www.phalconphp.com) | + +------------------------------------------------------------------------+ + | This source file is subject to the New BSD License that is bundled | + | with this package in the file LICENSE.txt. | + | | + | If you did not receive a copy of the license and are unable to | + | obtain it through the world-wide-web, please send an email | + | to license@phalconphp.com so we can send you a copy immediately. | + +------------------------------------------------------------------------+ + | Authors: Ben Casey | + +------------------------------------------------------------------------+ +*/ namespace Phalcon\Mvc; diff --git a/Library/Phalcon/Mvc/View/Engine/Twig/CoreExtension.php b/Library/Phalcon/Mvc/View/Engine/Twig/CoreExtension.php index 5463d03fc..89a0bf2b4 100644 --- a/Library/Phalcon/Mvc/View/Engine/Twig/CoreExtension.php +++ b/Library/Phalcon/Mvc/View/Engine/Twig/CoreExtension.php @@ -1,14 +1,22 @@ - */ + +/* + +------------------------------------------------------------------------+ + | Phalcon Framework | + +------------------------------------------------------------------------+ + | Copyright (c) 2011-2016 Phalcon Team (https://www.phalconphp.com) | + +------------------------------------------------------------------------+ + | This source file is subject to the New BSD License that is bundled | + | with this package in the file LICENSE.txt. | + | | + | If you did not receive a copy of the license and are unable to | + | obtain it through the world-wide-web, please send an email | + | to license@phalconphp.com so we can send you a copy immediately. | + +------------------------------------------------------------------------+ + | Authors: Nikita Vershinin | + +------------------------------------------------------------------------+ +*/ + namespace Phalcon\Mvc\View\Engine\Twig; /** diff --git a/Library/Phalcon/Mvc/View/Engine/Twig/Environment.php b/Library/Phalcon/Mvc/View/Engine/Twig/Environment.php index 0f60828c3..b7bee941f 100644 --- a/Library/Phalcon/Mvc/View/Engine/Twig/Environment.php +++ b/Library/Phalcon/Mvc/View/Engine/Twig/Environment.php @@ -1,14 +1,22 @@ - */ + +/* + +------------------------------------------------------------------------+ + | Phalcon Framework | + +------------------------------------------------------------------------+ + | Copyright (c) 2011-2016 Phalcon Team (https://www.phalconphp.com) | + +------------------------------------------------------------------------+ + | This source file is subject to the New BSD License that is bundled | + | with this package in the file LICENSE.txt. | + | | + | If you did not receive a copy of the license and are unable to | + | obtain it through the world-wide-web, please send an email | + | to license@phalconphp.com so we can send you a copy immediately. | + +------------------------------------------------------------------------+ + | Authors: Nikita Vershinin | + +------------------------------------------------------------------------+ +*/ + namespace Phalcon\Mvc\View\Engine\Twig; use Phalcon\DiInterface; diff --git a/Library/Phalcon/Mvc/View/Engine/Twig/Nodes/Assets.php b/Library/Phalcon/Mvc/View/Engine/Twig/Nodes/Assets.php index f733b0663..98e4e971a 100644 --- a/Library/Phalcon/Mvc/View/Engine/Twig/Nodes/Assets.php +++ b/Library/Phalcon/Mvc/View/Engine/Twig/Nodes/Assets.php @@ -1,14 +1,22 @@ - */ + +/* + +------------------------------------------------------------------------+ + | Phalcon Framework | + +------------------------------------------------------------------------+ + | Copyright (c) 2011-2016 Phalcon Team (https://www.phalconphp.com) | + +------------------------------------------------------------------------+ + | This source file is subject to the New BSD License that is bundled | + | with this package in the file LICENSE.txt. | + | | + | If you did not receive a copy of the license and are unable to | + | obtain it through the world-wide-web, please send an email | + | to license@phalconphp.com so we can send you a copy immediately. | + +------------------------------------------------------------------------+ + | Authors: Nikita Vershinin | + +------------------------------------------------------------------------+ +*/ + namespace Phalcon\Mvc\View\Engine\Twig\Nodes; /** diff --git a/Library/Phalcon/Mvc/View/Engine/Twig/TokenParsers/Assets.php b/Library/Phalcon/Mvc/View/Engine/Twig/TokenParsers/Assets.php index 55cd19c4a..ee6807b83 100644 --- a/Library/Phalcon/Mvc/View/Engine/Twig/TokenParsers/Assets.php +++ b/Library/Phalcon/Mvc/View/Engine/Twig/TokenParsers/Assets.php @@ -1,14 +1,22 @@ - */ + +/* + +------------------------------------------------------------------------+ + | Phalcon Framework | + +------------------------------------------------------------------------+ + | Copyright (c) 2011-2016 Phalcon Team (https://www.phalconphp.com) | + +------------------------------------------------------------------------+ + | This source file is subject to the New BSD License that is bundled | + | with this package in the file LICENSE.txt. | + | | + | If you did not receive a copy of the license and are unable to | + | obtain it through the world-wide-web, please send an email | + | to license@phalconphp.com so we can send you a copy immediately. | + +------------------------------------------------------------------------+ + | Authors: Nikita Vershinin | + +------------------------------------------------------------------------+ +*/ + namespace Phalcon\Mvc\View\Engine\Twig\TokenParsers; use Phalcon\Mvc\View\Engine\Twig\Nodes\Assets as Node; diff --git a/Library/Phalcon/Paginator/Pager.php b/Library/Phalcon/Paginator/Pager.php index 6e10e84a5..563727755 100644 --- a/Library/Phalcon/Paginator/Pager.php +++ b/Library/Phalcon/Paginator/Pager.php @@ -1,14 +1,22 @@ - */ + +/* + +------------------------------------------------------------------------+ + | Phalcon Framework | + +------------------------------------------------------------------------+ + | Copyright (c) 2011-2016 Phalcon Team (https://www.phalconphp.com) | + +------------------------------------------------------------------------+ + | This source file is subject to the New BSD License that is bundled | + | with this package in the file LICENSE.txt. | + | | + | If you did not receive a copy of the license and are unable to | + | obtain it through the world-wide-web, please send an email | + | to license@phalconphp.com so we can send you a copy immediately. | + +------------------------------------------------------------------------+ + | Authors: Nikita Vershinin | + +------------------------------------------------------------------------+ +*/ + namespace Phalcon\Paginator; /** diff --git a/Library/Phalcon/Paginator/Pager/Layout.php b/Library/Phalcon/Paginator/Pager/Layout.php index 46a841856..76c13108a 100644 --- a/Library/Phalcon/Paginator/Pager/Layout.php +++ b/Library/Phalcon/Paginator/Pager/Layout.php @@ -1,14 +1,22 @@ - */ + +/* + +------------------------------------------------------------------------+ + | Phalcon Framework | + +------------------------------------------------------------------------+ + | Copyright (c) 2011-2016 Phalcon Team (https://www.phalconphp.com) | + +------------------------------------------------------------------------+ + | This source file is subject to the New BSD License that is bundled | + | with this package in the file LICENSE.txt. | + | | + | If you did not receive a copy of the license and are unable to | + | obtain it through the world-wide-web, please send an email | + | to license@phalconphp.com so we can send you a copy immediately. | + +------------------------------------------------------------------------+ + | Authors: Nikita Vershinin | + +------------------------------------------------------------------------+ +*/ + namespace Phalcon\Paginator\Pager; use Phalcon\Paginator\Pager; diff --git a/Library/Phalcon/Paginator/Pager/Layout/Bootstrap.php b/Library/Phalcon/Paginator/Pager/Layout/Bootstrap.php index 418e20567..10d5ef0ad 100644 --- a/Library/Phalcon/Paginator/Pager/Layout/Bootstrap.php +++ b/Library/Phalcon/Paginator/Pager/Layout/Bootstrap.php @@ -1,14 +1,22 @@ - */ + +/* + +------------------------------------------------------------------------+ + | Phalcon Framework | + +------------------------------------------------------------------------+ + | Copyright (c) 2011-2016 Phalcon Team (https://www.phalconphp.com) | + +------------------------------------------------------------------------+ + | This source file is subject to the New BSD License that is bundled | + | with this package in the file LICENSE.txt. | + | | + | If you did not receive a copy of the license and are unable to | + | obtain it through the world-wide-web, please send an email | + | to license@phalconphp.com so we can send you a copy immediately. | + +------------------------------------------------------------------------+ + | Authors: Nikita Vershinin | + +------------------------------------------------------------------------+ +*/ + namespace Phalcon\Paginator\Pager\Layout; use Phalcon\Paginator\Pager\Layout; diff --git a/Library/Phalcon/Paginator/Pager/Range.php b/Library/Phalcon/Paginator/Pager/Range.php index 387d92344..5c86018a0 100644 --- a/Library/Phalcon/Paginator/Pager/Range.php +++ b/Library/Phalcon/Paginator/Pager/Range.php @@ -1,14 +1,22 @@ - */ + +/* + +------------------------------------------------------------------------+ + | Phalcon Framework | + +------------------------------------------------------------------------+ + | Copyright (c) 2011-2016 Phalcon Team (https://www.phalconphp.com) | + +------------------------------------------------------------------------+ + | This source file is subject to the New BSD License that is bundled | + | with this package in the file LICENSE.txt. | + | | + | If you did not receive a copy of the license and are unable to | + | obtain it through the world-wide-web, please send an email | + | to license@phalconphp.com so we can send you a copy immediately. | + +------------------------------------------------------------------------+ + | Authors: Nikita Vershinin | + +------------------------------------------------------------------------+ +*/ + namespace Phalcon\Paginator\Pager; use Phalcon\Paginator\Pager; diff --git a/Library/Phalcon/Paginator/Pager/Range/Jumping.php b/Library/Phalcon/Paginator/Pager/Range/Jumping.php index 8db9b9c56..799475ce7 100644 --- a/Library/Phalcon/Paginator/Pager/Range/Jumping.php +++ b/Library/Phalcon/Paginator/Pager/Range/Jumping.php @@ -1,14 +1,22 @@ - */ + +/* + +------------------------------------------------------------------------+ + | Phalcon Framework | + +------------------------------------------------------------------------+ + | Copyright (c) 2011-2016 Phalcon Team (https://www.phalconphp.com) | + +------------------------------------------------------------------------+ + | This source file is subject to the New BSD License that is bundled | + | with this package in the file LICENSE.txt. | + | | + | If you did not receive a copy of the license and are unable to | + | obtain it through the world-wide-web, please send an email | + | to license@phalconphp.com so we can send you a copy immediately. | + +------------------------------------------------------------------------+ + | Authors: Nikita Vershinin | + +------------------------------------------------------------------------+ +*/ + namespace Phalcon\Paginator\Pager\Range; use Phalcon\Paginator\Pager\Range; diff --git a/Library/Phalcon/Paginator/Pager/Range/Sliding.php b/Library/Phalcon/Paginator/Pager/Range/Sliding.php index 2c852711d..54a44cf5e 100644 --- a/Library/Phalcon/Paginator/Pager/Range/Sliding.php +++ b/Library/Phalcon/Paginator/Pager/Range/Sliding.php @@ -1,14 +1,22 @@ - */ + +/* + +------------------------------------------------------------------------+ + | Phalcon Framework | + +------------------------------------------------------------------------+ + | Copyright (c) 2011-2016 Phalcon Team (https://www.phalconphp.com) | + +------------------------------------------------------------------------+ + | This source file is subject to the New BSD License that is bundled | + | with this package in the file LICENSE.txt. | + | | + | If you did not receive a copy of the license and are unable to | + | obtain it through the world-wide-web, please send an email | + | to license@phalconphp.com so we can send you a copy immediately. | + +------------------------------------------------------------------------+ + | Authors: Nikita Vershinin | + +------------------------------------------------------------------------+ +*/ + namespace Phalcon\Paginator\Pager\Range; use Phalcon\Paginator\Pager\Range; diff --git a/Library/Phalcon/Queue/Beanstalk/Extended.php b/Library/Phalcon/Queue/Beanstalk/Extended.php index 5f401b952..1c423c3b0 100644 --- a/Library/Phalcon/Queue/Beanstalk/Extended.php +++ b/Library/Phalcon/Queue/Beanstalk/Extended.php @@ -1,21 +1,21 @@ | - +------------------------------------------------------------------------+ - */ + +------------------------------------------------------------------------+ + | Phalcon Framework | + +------------------------------------------------------------------------+ + | Copyright (c) 2011-2016 Phalcon Team (https://www.phalconphp.com) | + +------------------------------------------------------------------------+ + | This source file is subject to the New BSD License that is bundled | + | with this package in the file LICENSE.txt. | + | | + | If you did not receive a copy of the license and are unable to | + | obtain it through the world-wide-web, please send an email | + | to license@phalconphp.com so we can send you a copy immediately. | + +------------------------------------------------------------------------+ + | Authors: Nikita Vershinin | + +------------------------------------------------------------------------+ +*/ namespace Phalcon\Queue\Beanstalk; diff --git a/Library/Phalcon/Session/Adapter/Aerospike.php b/Library/Phalcon/Session/Adapter/Aerospike.php index 90aea41d5..4871e27ef 100644 --- a/Library/Phalcon/Session/Adapter/Aerospike.php +++ b/Library/Phalcon/Session/Adapter/Aerospike.php @@ -1,21 +1,21 @@ | - +------------------------------------------------------------------------+ - */ + +------------------------------------------------------------------------+ + | Phalcon Framework | + +------------------------------------------------------------------------+ + | Copyright (c) 2011-2016 Phalcon Team (https://www.phalconphp.com) | + +------------------------------------------------------------------------+ + | This source file is subject to the New BSD License that is bundled | + | with this package in the file LICENSE.txt. | + | | + | If you did not receive a copy of the license and are unable to | + | obtain it through the world-wide-web, please send an email | + | to license@phalconphp.com so we can send you a copy immediately. | + +------------------------------------------------------------------------+ + | Authors: Serghei Iakovlev | + +------------------------------------------------------------------------+ +*/ namespace Phalcon\Session\Adapter; diff --git a/Library/Phalcon/Session/Adapter/Database.php b/Library/Phalcon/Session/Adapter/Database.php index ee771432b..47dc61f40 100644 --- a/Library/Phalcon/Session/Adapter/Database.php +++ b/Library/Phalcon/Session/Adapter/Database.php @@ -1,12 +1,13 @@ | +------------------------------------------------------------------------+ */ + namespace Phalcon\Session\Adapter; use Phalcon\Db; diff --git a/Library/Phalcon/Session/Adapter/Mongo.php b/Library/Phalcon/Session/Adapter/Mongo.php index b75a0d9fa..bf3663106 100644 --- a/Library/Phalcon/Session/Adapter/Mongo.php +++ b/Library/Phalcon/Session/Adapter/Mongo.php @@ -1,12 +1,13 @@ | +------------------------------------------------------------------------+ */ + namespace Phalcon\Session\Adapter; use Phalcon\Session\Adapter; diff --git a/Library/Phalcon/Test/FunctionalTestCase.php b/Library/Phalcon/Test/FunctionalTestCase.php index 9be7edf17..3ab941eca 100644 --- a/Library/Phalcon/Test/FunctionalTestCase.php +++ b/Library/Phalcon/Test/FunctionalTestCase.php @@ -1,12 +1,13 @@ | | Nikolaos Dimopoulos | | Ilgıt Yıldırım | +------------------------------------------------------------------------+ */ + namespace Phalcon\Utils; use Phalcon\Exception; diff --git a/Library/Phalcon/Validation/Validator/CardNumber.php b/Library/Phalcon/Validation/Validator/CardNumber.php index cf76a842d..5cc70877f 100644 --- a/Library/Phalcon/Validation/Validator/CardNumber.php +++ b/Library/Phalcon/Validation/Validator/CardNumber.php @@ -1,12 +1,13 @@ | + | Authors: David Hubner | +------------------------------------------------------------------------+ - */ +*/ namespace Phalcon\Validation\Validator; diff --git a/Library/Phalcon/Validation/Validator/Db/Uniqueness.php b/Library/Phalcon/Validation/Validator/Db/Uniqueness.php index 8f41a4d48..9fe0e035f 100644 --- a/Library/Phalcon/Validation/Validator/Db/Uniqueness.php +++ b/Library/Phalcon/Validation/Validator/Db/Uniqueness.php @@ -1,12 +1,13 @@ | + | Authors: David Hubner | +------------------------------------------------------------------------+ - */ +*/ namespace Phalcon\Validation\Validator; diff --git a/Library/Phalcon/Validation/Validator/ReCaptcha.php b/Library/Phalcon/Validation/Validator/ReCaptcha.php index 301724602..3cf5fc9a6 100644 --- a/Library/Phalcon/Validation/Validator/ReCaptcha.php +++ b/Library/Phalcon/Validation/Validator/ReCaptcha.php @@ -1,12 +1,13 @@ Date: Sun, 2 Oct 2016 20:08:15 +0300 Subject: [PATCH 07/26] amended README.md --- README.md | 7 ++++--- docs/TESTING.md => TESTING.md | 0 2 files changed, 4 insertions(+), 3 deletions(-) rename docs/TESTING.md => TESTING.md (100%) diff --git a/README.md b/README.md index d2dec3270..6423fe0a1 100644 --- a/README.md +++ b/README.md @@ -83,11 +83,11 @@ $loader->register(); ## Testing -See [TESTING.md](docs/TESTING.md) +See [TESTING.md](TESTING.md) # Contributing -See [CONTRIBUTING.md](docs/CONTRIBUTING.md) +See [CONTRIBUTING.md](CONTRIBUTING.md) ## Contributions Index @@ -193,4 +193,5 @@ See [CONTRIBUTING.md](docs/CONTRIBUTING.md) ## License -Incubator is open-sourced software licensed under the [New BSD License](docs/LICENSE.md). © Phalcon Framework Team and contributors +Incubator is open-sourced software licensed under the [New BSD License](LICENSE.txt).
+© 2011-2016, Phalcon Framework Team diff --git a/docs/TESTING.md b/TESTING.md similarity index 100% rename from docs/TESTING.md rename to TESTING.md From 21e18b2436c60a77d6c1555d902b58ba447459b2 Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Sun, 2 Oct 2016 20:09:28 +0300 Subject: [PATCH 08/26] Fixed issue #438 [ci skip] --- .github/ISSUE_TEMPLATE.md | 26 +++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 21 +++++++++ CONTRIBUTING.md | 75 ++++++++++++++++++++++++++++++++ docs/CONTRIBUTING.md | 28 ------------ 4 files changed, 122 insertions(+), 28 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 CONTRIBUTING.md delete mode 100644 docs/CONTRIBUTING.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 000000000..7171a4bd7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,26 @@ +> Questions should go to https://forum.phalconphp.com +> Documentation issues should go to https://github.com/phalcon/docs/issues + +### Expected and Actual Behavior + +> **Describe what you are trying to achieve and what goes wrong.** + +> Provide output if related + +```php +// paste output here +``` +> Provide minimal script to reproduce the issue + +```php +// paste code +``` + +### Details + +* Phalcon Framework version: (`php --ri phalcon`) +* Phalcon Incubator version: (branch, composer version) +* PHP Version: (`php -v`) +* Operating System: +* Server: Nginx | Apache | Other +* Other related info (Database, table schema): diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 000000000..bf4fdcc44 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,21 @@ +Hello! + +* Type: bug fix | new feature | code quality | documentation +* Link to issue: + +This pull request affects the following components: **(please check boxes)** + +* [ ] Library +* [ ] Code Style +* [ ] Documentation +* [ ] Testing + +**In raising this pull request, I confirm the following (please check boxes):** + +- [ ] I have read and understood the [Contributing Guidelines](https://github.com/phalcon/incubator/blob/master/CONTRIBUTING.md)? +- [ ] I have checked that another pull request for this purpose does not exist. +- [ ] I wrote some tests for this PR. + +Small description of change: + +Thanks diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..459e31dde --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,75 @@ +# Contributing to Phalcon Incubator + +Phalcon Incubator is an open source project and a volunteer effort. +Phalcon Incubator welcomes contribution from everyone. + +## Contributions + +Contributions to Phalcon Incubator should be made in the form of [GitHub pull requests][pr]. +Each pull request will be reviewed by a core contributor (someone with permission to land patches) and either landed in +the main tree or given feedback for changes that would be required before it can be merged. All contributions should +follow this format, even those from core contributors. + +## Not All Commits Need CI Builds + +Sometimes all you are changing is the `README.md`, some documentation or other things which have no effect on the tests. +In this case, you may not want a build to be created for that commit. To do this, all you need to do is to add `[ci skip]` +somewhere in the commit message. + +Commits that have `[ci skip]` anywhere in the commit messages will be ignored. `[ci skip]` does not have to appear on the +first line, so it is possible to use it without polluting your project's history. + +Alternatively, you can also use `[skip ci]`. + +## Questions & Support + +*We only accept bug reports, new feature requests and pull requests in GitHub*. +For questions regarding the usage of the Phalcon Developer Tools or support requests please visit the +[official forums][forum]. IDE stubs must not be modified manually, if you want to improve them please submit a PR +to [Phalcon Framework][cphalcon]. + +## Bug Report Checklist + +- Make sure you are using the latest released version of Phalcon Framework and Phalcon Developer Tools + before submitting a bug report. Bugs in versions older than the latest released one will not be addressed by the + core team + +- If you have found a bug it is important to add relevant reproducibility information to your issue to allow us + to reproduce the bug and fix it quicker. Add a script, small program or repository providing the necessary code to + make everyone reproduce the issue reported easily. If a bug cannot be reproduced by the development it would be + difficult provide corrections and solutions. [Submit Reproducible Test][srt] for more information. + +- Be sure that information such as OS, Phalcon Framework and Phalcon Developer Tools versions and PHP version are + part of the bug report + +- If you're submitting a Segmentation Fault error, we would require a backtrace, please see [Generating a Backtrace][gb] + +## Pull Request Checklist + +- Don't submit your pull requests to the `master` branch. Branch from the required branch and, + if needed, rebase to the proper branch before submitting your pull request. + If it doesn't merge cleanly with master you may be asked to rebase your changes + +- Don't put submodule updates, composer.lock, etc in your pull request unless they are to landed commits + +- Make sure that the code you write fits with the general style and coding standards of the [Accepted PHP Standards][psr] + +## Getting Support + +If you have a question about how to use Phalcon, please see the [support page][support]. + +## Requesting Features + +If you have a change or new feature in mind, please fill an [NFR][nfr]. + +Thanks!
+Phalcon Team + +[pr]: https://help.github.com/articles/using-pull-requests/ +[forum]: https://forum.phalconphp.com/ +[cphalcon]: https://github.com/phalcon/cphalcon +[srt]: https://github.com/phalcon/cphalcon/wiki/Submit-Reproducible-Test +[gb]: https://github.com/phalcon/cphalcon/wiki/Generating-a-backtrace +[support]: https://phalconphp.com/support +[nfr]: https://github.com/phalcon/cphalcon/wiki/New-Feature-Request---NFR +[psr]: http://www.php-fig.org/psr/ diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md deleted file mode 100644 index c17503a33..000000000 --- a/docs/CONTRIBUTING.md +++ /dev/null @@ -1,28 +0,0 @@ -# Contributing to Phalcon Incubator - -Phalcon Incubator is an open source project and a volunteer effort. Phalcon Incubator welcomes contribution from everyone. - -Contributions to Phalcon Incubator should be made in the form of GitHub pull requests. -*We only accept bug reports, new feature requests and pull requests in GitHub*. - -## Not All Commits Need CI Builds - -Sometimes all you are changing is the README, some documentation or other things which have no effect on the tests. -In this case, you may not want a build to be created for that commit. To do this, all you need to do is to add `[ci skip]` -somewhere in the commit message. - -Commits that have `[ci skip]` anywhere in the commit messages will be ignored. `[ci skip]` does not have to appear on the -first line, so it is possible to use it without polluting your project's history. - -Alternatively, you can also use `[skip ci]`. - -## Getting Support - -For questions regarding the usage of the framework or support requests please visit the [official forums](http://forum.phalconphp.com/). - -## Requesting Features - -If you have a change or new feature in mind, please fill an [NFR](https://github.com/phalcon/cphalcon/wiki/New-Feature-Request---NFR). - -Thanks!
-Phalcon Team From 9a1776152f43bd04ccfef60fa6f4508dd70c5efb Mon Sep 17 00:00:00 2001 From: Craig Duncan Date: Sun, 16 Oct 2016 16:21:39 +0100 Subject: [PATCH 09/26] Update the beanstalk queue to use duncan3dc/fork-helper:2.0 --- .travis.yml | 2 +- Library/Phalcon/Queue/Beanstalk/Extended.php | 20 ++++++++++++++++---- tests/unit/Queue/Beanstalk/ExtendedTest.php | 14 ++++++++++---- 3 files changed, 27 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8a9963610..f0a181436 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,7 +38,7 @@ install: # Install Dependencies - composer self-update - travis_retry composer install --ignore-platform-reqs --prefer-source --no-interaction - - travis_retry composer require --ignore-platform-reqs "duncan3dc/fork-helper:*" + - travis_retry composer require --ignore-platform-reqs duncan3dc/fork-helper:$(if [[ "${TRAVIS_PHP_VERSION:0:1}" = "7" ]]; then echo "^2.0"; else echo "^1.0"; fi) # Pull images - docker pull phalconphp/php:${TRAVIS_PHP_VERSION} - docker pull phalconphp/zephir:${TRAVIS_PHP_VERSION} diff --git a/Library/Phalcon/Queue/Beanstalk/Extended.php b/Library/Phalcon/Queue/Beanstalk/Extended.php index 9d8637276..5b3435243 100644 --- a/Library/Phalcon/Queue/Beanstalk/Extended.php +++ b/Library/Phalcon/Queue/Beanstalk/Extended.php @@ -19,7 +19,8 @@ namespace Phalcon\Queue\Beanstalk; -use duncan3dc\Helpers\Fork; +use duncan3dc\Forker\Exception as ForkException; +use duncan3dc\Forker\Fork; use Phalcon\Logger\Adapter as LoggerAdapter; use Phalcon\Queue\Beanstalk as Base; @@ -134,8 +135,13 @@ public function doWork($ignoreErrors = false) declare (ticks = 1); set_time_limit(0); - $fork = new Fork(); - $fork->ignoreErrors = $ignoreErrors; + # Check if we are using Fork1.0 (php < 7) + if (class_exists('duncan3dc\Helpers\Fork')) { + $fork = new \duncan3dc\Helpers\Fork; + $fork->ignoreErrors = $ignoreErrors; + } else { + $fork = new Fork; + } foreach ($this->workers as $tube => $worker) { $that = clone $this; @@ -186,7 +192,13 @@ public function doWork($ignoreErrors = false) }); } - $fork->wait(); + try { + $fork->wait(); + } catch (ForkException $e) { + if (!$ignoreErrors) { + throw $e; + } + } } /** diff --git a/tests/unit/Queue/Beanstalk/ExtendedTest.php b/tests/unit/Queue/Beanstalk/ExtendedTest.php index 295475dd5..cd4a4d065 100644 --- a/tests/unit/Queue/Beanstalk/ExtendedTest.php +++ b/tests/unit/Queue/Beanstalk/ExtendedTest.php @@ -123,10 +123,10 @@ public function testShouldGetTubes() */ public function testShouldDoWork() { - if (!class_exists('\duncan3dc\Helpers\Fork')) { + if (!class_exists('\duncan3dc\Helpers\Fork') && !class_exists('\duncan3dc\Forker\Fork')) { $this->markTestSkipped(sprintf( - '%s used as a dependency \duncan3dc\Helpers\Fork. You can install it by using' . - 'composer require "duncan3dc/fork-helper":"*"', + '%s uses fork-helper as a dependency. You can install it by running: ' . + 'composer require duncan3dc/fork-helper', get_class($this->client) )); } @@ -144,7 +144,13 @@ public function testShouldDoWork() 'test-tube-2' => '2', ]; - $fork = new \duncan3dc\Helpers\Fork(); + # Check if we are using Fork1.0 (php < 7) + if (class_exists('duncan3dc\Helpers\Fork')) { + $fork = new \duncan3dc\Helpers\Fork; + } else { + $fork = new \duncan3dc\Forker\Fork; + } + $fork->call(function () use ($expected) { foreach ($expected as $tube => $value) { $this->client->addWorker($tube, function (Job $job) { From 9ac9440dcb71c99a9d8df9a1b76e33645ede268e Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Sun, 16 Oct 2016 22:24:10 +0300 Subject: [PATCH 10/26] Fixed Phalcon\Acl\Adapter\Redis --- Library/Phalcon/Acl/Adapter/Redis.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Library/Phalcon/Acl/Adapter/Redis.php b/Library/Phalcon/Acl/Adapter/Redis.php index 8b13091cb..9b4063a99 100644 --- a/Library/Phalcon/Acl/Adapter/Redis.php +++ b/Library/Phalcon/Acl/Adapter/Redis.php @@ -18,19 +18,19 @@ +------------------------------------------------------------------------+ */ -namespacePhalcon\Acl\Adapter; +namespace Phalcon\Acl\Adapter; -use Phalcon\Db; +use Phalcon\Acl; +use Phalcon\Acl\Role; use Phalcon\Acl\Adapter; use Phalcon\Acl\Exception; use Phalcon\Acl\Resource; -use Phalcon\Acl; -use Phalcon\Acl\Role; use Phalcon\Acl\RoleInterface; /** - * Phalcon\Acl\Adapter\Database - * Manages ACL lists in memory + * \Phalcon\Acl\Adapter\Redis + * + * Manages ACL lists in Redis Database */ class Redis extends Adapter { @@ -348,7 +348,6 @@ protected function rolePermission($resource, $access, $allowOrDeny) * @param string $resourceName * @param array|string $access * @param mixed $func - * @return boolean */ public function deny($role, $resource, $access, $func = null) { From 4fb5a57591ba964a6b73c0d82770c233eeca5822 Mon Sep 17 00:00:00 2001 From: Tao Pan Date: Tue, 18 Oct 2016 11:56:39 +0800 Subject: [PATCH 11/26] Bug Fix: curl response content contains header --- Library/Phalcon/Http/Client/Provider/Curl.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Library/Phalcon/Http/Client/Provider/Curl.php b/Library/Phalcon/Http/Client/Provider/Curl.php index 13780fe91..85a3cc7cb 100644 --- a/Library/Phalcon/Http/Client/Provider/Curl.php +++ b/Library/Phalcon/Http/Client/Provider/Curl.php @@ -118,6 +118,8 @@ protected function send($customHeader = [], $fullResponse = false) $header[] = 'Expect:'; } + $this->responseHeader = ''; + $this->setOption(CURLOPT_HEADERFUNCTION, [$this, 'headerFunction']); $this->setOption(CURLOPT_HTTPHEADER, $header); @@ -131,9 +133,9 @@ protected function send($customHeader = [], $fullResponse = false) $response->header->parse($this->responseHeader); if ($fullResponse) { - $response->body = $this->responseHeader . $content; - } else { $response->body = $content; + } else { + $response->body = substr($content, strlen($this->responseHeader)); } return $response; From 494fbca6311a958d43ce2b2aacb0c25b89d93482 Mon Sep 17 00:00:00 2001 From: Ark4ne Date: Wed, 19 Oct 2016 12:44:55 +0200 Subject: [PATCH 12/26] fix(Http\Client\Provider\Curl): CURLOPT_HEADER doesn't need to be set to true when CURLOPT_HEADERFUNCTION is used. (cherry picked from commit 884909f) --- Library/Phalcon/Http/Client/Provider/Curl.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Phalcon/Http/Client/Provider/Curl.php b/Library/Phalcon/Http/Client/Provider/Curl.php index 13780fe91..5a22a9f47 100644 --- a/Library/Phalcon/Http/Client/Provider/Curl.php +++ b/Library/Phalcon/Http/Client/Provider/Curl.php @@ -77,7 +77,7 @@ private function initOptions() CURLOPT_AUTOREFERER => true, CURLOPT_FOLLOWLOCATION => true, CURLOPT_MAXREDIRS => 20, - CURLOPT_HEADER => true, + CURLOPT_HEADER => false, CURLOPT_PROTOCOLS => CURLPROTO_HTTP | CURLPROTO_HTTPS, CURLOPT_REDIR_PROTOCOLS => CURLPROTO_HTTP | CURLPROTO_HTTPS, CURLOPT_USERAGENT => 'Phalcon HTTP/' . self::VERSION . ' (Curl)', From 045e40a01685542b833860007febaa983b642f5f Mon Sep 17 00:00:00 2001 From: Sid Roberts Date: Sat, 22 Oct 2016 10:39:05 +0100 Subject: [PATCH 13/26] Fixed recursive method call (see phalcon/cphalcon#12328). --- .../Phalcon/Mvc/Model/EagerLoading/QueryBuilder.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Library/Phalcon/Mvc/Model/EagerLoading/QueryBuilder.php b/Library/Phalcon/Mvc/Model/EagerLoading/QueryBuilder.php index 95c1d9e8c..7984b785c 100644 --- a/Library/Phalcon/Mvc/Model/EagerLoading/QueryBuilder.php +++ b/Library/Phalcon/Mvc/Model/EagerLoading/QueryBuilder.php @@ -18,6 +18,15 @@ public function columns($columns) public function where($conditions, $bindParams = null, $bindTypes = null) { - return $this->andWhere($conditions, $bindParams, $bindTypes); + $currentConditions = $this->_conditions; + + /** + * Nest the condition to current ones or set as unique + */ + if ($currentConditions) { + $conditions = "(" . $currentConditions . ") AND (" . $conditions . ")"; + } + + return parent::where($conditions, $bindParams, $bindTypes); } } From 9227d5d0ed0561d511d6f25d3e118f907e7549fa Mon Sep 17 00:00:00 2001 From: cottton Date: Tue, 8 Nov 2016 00:40:35 +0100 Subject: [PATCH 14/26] Improving usage of parameter 1 "customHeader". Parameter 1 `$customHeader` must be type of array. Try to include `'Expect:`' also in `$customHeader` to get correct response. Note: providing `$customHeader` without field `'Expect:`' currently messes up the response if the server sends a 100 continue. F.e. the status code on a 200 OK response would be 100. --- Library/Phalcon/Http/Client/Provider/Curl.php | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/Library/Phalcon/Http/Client/Provider/Curl.php b/Library/Phalcon/Http/Client/Provider/Curl.php index 5f8c96168..ee779f066 100755 --- a/Library/Phalcon/Http/Client/Provider/Curl.php +++ b/Library/Phalcon/Http/Client/Provider/Curl.php @@ -104,7 +104,26 @@ public function setConnectTimeout($timeout) $this->setOption(CURLOPT_CONNECTTIMEOUT, $timeout); } - protected function send($customHeader = [], $fullResponse = false) + /** + * Sends the request and returns the response. + * + * + * // using custom headers: + * $customHeader = array( + * 0 => 'Accept: text/plain', + * 1 => 'X-Foo: bar', + * 2 => 'X-Bar: baz', + * ); + * $response = $this->send($customHeader); + * + * + * @param array $customHeader An array of values. If not empty then previously added headers gets ignored. + * @param bool $fullResponse If true returns the full response (including headers). + * + * @return Response + * @throws HttpException + */ + protected function send(array $customHeader = [], $fullResponse = false) { if (!empty($customHeader)) { $header = $customHeader; @@ -113,8 +132,9 @@ protected function send($customHeader = [], $fullResponse = false) if (count($this->header) > 0) { $header = $this->header->build(); } - $header[] = 'Expect:'; } + $header[] = 'Expect:'; + $header = array_unique($header, SORT_STRING); $this->setOption(CURLOPT_HEADERFUNCTION, [$this, 'headerFunction']); $this->setOption(CURLOPT_HTTPHEADER, $header); From e9582ae6bf814644a2791189fdc803cfb60a73d3 Mon Sep 17 00:00:00 2001 From: Stanimir Genov Date: Thu, 10 Nov 2016 18:53:02 +0200 Subject: [PATCH 15/26] Fix an issue with double quotes The storage type of the field is Bin, which means it does not need to be serialized. This simplifies things and saves a few CPU clicks. --- Library/Phalcon/Cache/Backend/Aerospike.php | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/Library/Phalcon/Cache/Backend/Aerospike.php b/Library/Phalcon/Cache/Backend/Aerospike.php index 1956b001c..c7f002665 100644 --- a/Library/Phalcon/Cache/Backend/Aerospike.php +++ b/Library/Phalcon/Cache/Backend/Aerospike.php @@ -179,11 +179,7 @@ public function save($keyName = null, $content = null, $lifetime = null, $stopBu $aKey = $this->buildKey($prefixedKey); - if (is_numeric($cachedContent)) { - $bins = ['value' => $cachedContent]; - } else { - $bins = ['value' => $this->_frontend->beforeStore($cachedContent)]; - } + $bins['value'] = $cachedContent; $status = $this->db->put( $aKey, @@ -261,11 +257,7 @@ public function get($keyName, $lifetime = null) $cachedContent = $cache['bins']['value']; - if (is_numeric($cachedContent)) { - return $cachedContent; - } - - return $this->_frontend->afterRetrieve($cachedContent); + return $cachedContent; } /** From 5569a8e839a24f839061d78705ae6e658dbca3ac Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Tue, 18 Oct 2016 09:24:00 +0300 Subject: [PATCH 16/26] Fixed #684 issue --- Library/Phalcon/Http/Client/Header.php | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/Library/Phalcon/Http/Client/Header.php b/Library/Phalcon/Http/Client/Header.php index 81897c5fd..38eff4b3d 100644 --- a/Library/Phalcon/Http/Client/Header.php +++ b/Library/Phalcon/Http/Client/Header.php @@ -24,7 +24,7 @@ class Header implements \Countable { private $fields = []; - public $version = '1.0'; + public $version = '1.0.1'; public $statusCode = 0; public $statusMessage = ''; public $status = ''; @@ -54,12 +54,24 @@ public function setMultiple(array $fields) } /** - * @param array $fields + * Adds multiple headers. + * + * + * $headers = [ + * 'X-Foo' => 'bar', + * 'Content-Type' => 'application/json', + * ]; + * + * $curl->addMultiple($headers); + * + * + * @param array $fields An array of name => value pairs. * @return $this */ public function addMultiple(array $fields) { - $this->fields = array_combine($this->fields, $fields); + $this->fields = array_merge($this->fields, $fields); + return $this; } From 65de9998c7c44babc14159fe07443b121cd11326 Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Thu, 10 Nov 2016 23:44:33 +0200 Subject: [PATCH 17/26] Fixed #689 issue --- Library/Phalcon/Http/Client/Provider/Curl.php | 2 ++ tests/_ci/entrypoint.sh | 1 + 2 files changed, 3 insertions(+) diff --git a/Library/Phalcon/Http/Client/Provider/Curl.php b/Library/Phalcon/Http/Client/Provider/Curl.php index cfe9c0c83..baf506c99 100644 --- a/Library/Phalcon/Http/Client/Provider/Curl.php +++ b/Library/Phalcon/Http/Client/Provider/Curl.php @@ -145,6 +145,8 @@ protected function send(array $customHeader = [], $fullResponse = false) $content = curl_exec($this->handle); + $this->setOption(CURLOPT_HEADERFUNCTION, null); + if ($errno = curl_errno($this->handle)) { throw new HttpException(curl_error($this->handle), $errno); } diff --git a/tests/_ci/entrypoint.sh b/tests/_ci/entrypoint.sh index 8c8ccb22d..d55f0e25a 100755 --- a/tests/_ci/entrypoint.sh +++ b/tests/_ci/entrypoint.sh @@ -43,6 +43,7 @@ echo -e "" /app/vendor/bin/phpcs --standard=PSR2 --colors --extensions=php --encoding=utf-8 Library/ result_phpcs=$? +echo -e "Run: /app/vendor/bin/codecept run ${RUN_ARGS}" /app/vendor/bin/codecept run "${RUN_ARGS}" result_codecept=$? From b835a627cb5a1889161ba5e4176d7514558d2fea Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Fri, 11 Nov 2016 00:03:46 +0200 Subject: [PATCH 18/26] Fix codeception bug --- tests/_ci/entrypoint.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/_ci/entrypoint.sh b/tests/_ci/entrypoint.sh index d55f0e25a..fa506f3dd 100755 --- a/tests/_ci/entrypoint.sh +++ b/tests/_ci/entrypoint.sh @@ -43,8 +43,7 @@ echo -e "" /app/vendor/bin/phpcs --standard=PSR2 --colors --extensions=php --encoding=utf-8 Library/ result_phpcs=$? -echo -e "Run: /app/vendor/bin/codecept run ${RUN_ARGS}" -/app/vendor/bin/codecept run "${RUN_ARGS}" +/app/vendor/bin/codecept run -- "${RUN_ARGS}" result_codecept=$? if [ ${result_codecept} -ne 0 -o ${result_phpcs} -ne 0 ]; From 6609210756420b5c2f704c3a8188cc409aa731bd Mon Sep 17 00:00:00 2001 From: Stanimir Genov Date: Fri, 11 Nov 2016 12:47:46 +0200 Subject: [PATCH 19/26] Update composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index c2cb125a6..dc3c38696 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "phalcon/incubator", + "name": "sgenov/incubator", "type": "library", "description": "Adapters, prototypes or functionality that can be potentially incorporated to the C-framework.", "keywords": ["framework", "phalcon", "incubator"], From 71021d367b05ced97d015e85be3f5d32d442d51a Mon Sep 17 00:00:00 2001 From: Stanimir Genov Date: Fri, 11 Nov 2016 12:53:40 +0200 Subject: [PATCH 20/26] Update composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index dc3c38696..c2cb125a6 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "sgenov/incubator", + "name": "phalcon/incubator", "type": "library", "description": "Adapters, prototypes or functionality that can be potentially incorporated to the C-framework.", "keywords": ["framework", "phalcon", "incubator"], From de71a6deb0a636d46d9f32112c95142ba04ddaaf Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Sun, 13 Nov 2016 22:23:29 +0200 Subject: [PATCH 21/26] Updated Db docs [ci skip] --- Library/Phalcon/Db/Dialect/MysqlExtended.php | 6 ++--- Library/Phalcon/Db/Dialect/Oracle.php | 12 +++++++++ Library/Phalcon/Db/Dialect/README.md | 27 +++++++++++++++----- 3 files changed, 35 insertions(+), 10 deletions(-) diff --git a/Library/Phalcon/Db/Dialect/MysqlExtended.php b/Library/Phalcon/Db/Dialect/MysqlExtended.php index 8f66738e4..fb553971f 100644 --- a/Library/Phalcon/Db/Dialect/MysqlExtended.php +++ b/Library/Phalcon/Db/Dialect/MysqlExtended.php @@ -32,14 +32,14 @@ * * * use Phalcon\Db\Adapter\Pdo\Mysql; - * use Phalcon\Db\Adapter\Pdo\MysqlExtended; + * use Phalcon\Db\Dialect\MysqlExtended; * * $connection = new Mysql([ * 'host' => 'localhost', * 'username' => 'root', * 'password' => 'secret', * 'dbname' => 'enigma', - * 'dialectClass' => MysqlExtended::class + * 'dialectClass' => MysqlExtended::class, * ]); * * @@ -86,7 +86,7 @@ public function getSqlExpression(array $expression, $escapeChar = null, $bindCou case "'YEAR'": return 'INTERVAL ' . $this->getSqlExpression($expression["arguments"][0]) . ' YEAR'; default: - throw new \Exception('DATE_INTERVAL unit is not supported'); + throw new Exception('DATE_INTERVAL unit is not supported'); } break; diff --git a/Library/Phalcon/Db/Dialect/Oracle.php b/Library/Phalcon/Db/Dialect/Oracle.php index 417b09597..7f2288c18 100644 --- a/Library/Phalcon/Db/Dialect/Oracle.php +++ b/Library/Phalcon/Db/Dialect/Oracle.php @@ -33,6 +33,18 @@ * * Generates database specific SQL for the Oracle RDBMS. * + * + * use Phalcon\Db\Adapter\Pdo\Oracle; + * use Phalcon\Db\Adapter\Pdo\Oracle as Connection; + * + * $connection = new Connection([ + * 'dbname' => '//localhost/enigma', + * 'username' => 'oracle', + * 'password' => 'secret', + * 'dialectClass' => Oracle::class, + * ]); + * + * * @package Phalcon\Db\Dialect */ class Oracle extends Dialect diff --git a/Library/Phalcon/Db/Dialect/README.md b/Library/Phalcon/Db/Dialect/README.md index 6aa998b75..21140664f 100644 --- a/Library/Phalcon/Db/Dialect/README.md +++ b/Library/Phalcon/Db/Dialect/README.md @@ -10,16 +10,15 @@ these syntax you can use these functions: ```php use Phalcon\Db\Adapter\Pdo\Mysql; -use Phalcon\Db\Adapter\Pdo\MysqlExtended; +use Phalcon\Db\Dialect\MysqlExtended; $di->set('db', function() { - /** @var \Phalcon\DiInterface $this */ return new Mysql([ - 'host' => $this->getShared('config')->database->host, - 'username' => $this->getShared('config')->database->username, - 'password' => $this->getShared('config')->database->password, - 'dbname' => $this->getShared('config')->database->name, - 'dialectClass' => MysqlExtended::class + 'host' => 'localhost', + 'username' => 'root', + 'password' => 'secret', + 'dbname' => 'enigma', + 'dialectClass' => MysqlExtended::class, ]); }); ``` @@ -53,3 +52,17 @@ $data = $this->modelsManager->executeQuery( ## Oracle Generates database specific SQL for the Oracle RDBMS. + +```php +use Phalcon\Db\Adapter\Pdo\Oracle; +use Phalcon\Db\Adapter\Pdo\Oracle as Connection; + +$di->set('db', function() { + return new Connection([ + 'dbname' => '//localhost/enigma', + 'username' => 'oracle', + 'password' => 'secret', + 'dialectClass' => Oracle::class, + ]); +}); +``` From 87d0536b929c37db793c48fde28d760fd2cf297e Mon Sep 17 00:00:00 2001 From: Stanimir Genov Date: Mon, 14 Nov 2016 10:20:02 +0200 Subject: [PATCH 22/26] Update AerospikeTest.php Fixing the test's checking parameters, since serialization is removed for Aerospike in Backend Caching --- tests/unit/Cache/Backend/AerospikeTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/Cache/Backend/AerospikeTest.php b/tests/unit/Cache/Backend/AerospikeTest.php index ce25a8b06..4a9df515b 100644 --- a/tests/unit/Cache/Backend/AerospikeTest.php +++ b/tests/unit/Cache/Backend/AerospikeTest.php @@ -121,11 +121,11 @@ public function testShouldSaveData() $data = [1, 2, 3, 4, 5]; $cache->save('test-data', $data); - $this->tester->seeInAerospike('test-data', serialize($data)); + $this->tester->seeInAerospike('test-data', $data); $data = "sure, nothing interesting"; $cache->save('test-data', $data); - $this->tester->seeInAerospike('test-data', serialize($data)); + $this->tester->seeInAerospike('test-data', $data); } public function testShouldDeleteData() From 75d421316deece74f798d00eb646117d9b0dde84 Mon Sep 17 00:00:00 2001 From: Stanimir Genov Date: Mon, 14 Nov 2016 10:36:40 +0200 Subject: [PATCH 23/26] Data is being serialized twice --- tests/unit/Session/Adapter/AerospikeTest.php | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/tests/unit/Session/Adapter/AerospikeTest.php b/tests/unit/Session/Adapter/AerospikeTest.php index 10803eb39..67579d33a 100644 --- a/tests/unit/Session/Adapter/AerospikeTest.php +++ b/tests/unit/Session/Adapter/AerospikeTest.php @@ -65,13 +65,11 @@ public function testShouldWriteSession() $sessionId = 'abcdef123458'; $session = new SessionHandler($this->getConfig()); - $data = serialize( - [ + $data = [ 321 => microtime(true), 'def' => '678', 'xyz' => 'zyx' - ] - ); + ]; $this->assertTrue($session->write($sessionId, $data)); $this->tester->seeInAerospike($sessionId, serialize($data)); @@ -82,13 +80,11 @@ public function testShouldReadSession() $sessionId = 'some_session_key'; $session = new SessionHandler($this->getConfig()); - $data = serialize( - [ + $data = [ 321 => microtime(true), 'def' => '678', 'xyz' => 'zyx' - ] - ); + ]; $this->tester->haveInAerospike($sessionId, serialize($data)); $this->keys[] = $sessionId; @@ -101,13 +97,11 @@ public function testShouldDestroySession() $sessionId = 'abcdef123457'; $session = new SessionHandler($this->getConfig()); - $data = serialize( - [ + $data = [ 'abc' => 345, 'def' => ['foo' => 'bar'], 'zyx' => 'xyz' - ] - ); + ]; $this->tester->haveInAerospike($sessionId, serialize($data)); $session->destroy($sessionId); From fb06311eb89053041aa6cc8e7f26637b25af9882 Mon Sep 17 00:00:00 2001 From: Stanimir Genov Date: Mon, 14 Nov 2016 11:07:43 +0200 Subject: [PATCH 24/26] Update AerospikeTest.php --- tests/unit/Session/Adapter/AerospikeTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/unit/Session/Adapter/AerospikeTest.php b/tests/unit/Session/Adapter/AerospikeTest.php index 67579d33a..4eebc6551 100644 --- a/tests/unit/Session/Adapter/AerospikeTest.php +++ b/tests/unit/Session/Adapter/AerospikeTest.php @@ -72,7 +72,7 @@ public function testShouldWriteSession() ]; $this->assertTrue($session->write($sessionId, $data)); - $this->tester->seeInAerospike($sessionId, serialize($data)); + $this->tester->seeInAerospike($sessionId, $data); } public function testShouldReadSession() @@ -86,7 +86,7 @@ public function testShouldReadSession() 'xyz' => 'zyx' ]; - $this->tester->haveInAerospike($sessionId, serialize($data)); + $this->tester->haveInAerospike($sessionId, $data); $this->keys[] = $sessionId; $this->assertEquals($data, $session->read($sessionId)); @@ -103,7 +103,7 @@ public function testShouldDestroySession() 'zyx' => 'xyz' ]; - $this->tester->haveInAerospike($sessionId, serialize($data)); + $this->tester->haveInAerospike($sessionId, $data); $session->destroy($sessionId); $this->tester->dontSeeInAerospike($sessionId); } From 8cd7521340261949d58326cce416c3286ae18e89 Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Sun, 27 Nov 2016 09:53:24 +0200 Subject: [PATCH 25/26] Added Phalcon 3.0.2 test support --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 38dcb9aeb..9d0b5e1bf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,6 +15,7 @@ env: - PHALCON_VERSION="3.0.x" - PHALCON_VERSION="v3.0.0" - PHALCON_VERSION="v3.0.1" + - PHALCON_VERSION="v3.0.2" before_install: - sudo service memcached stop From bee79f53b2726fe95cb11dde30d805935ac7a542 Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Sun, 27 Nov 2016 10:25:05 +0200 Subject: [PATCH 26/26] Fixed Aerospike tests --- .travis.yml | 6 ++--- docker-compose.yml | 4 +-- tests/_ci/aerospike.conf | 53 ---------------------------------------- 3 files changed, 4 insertions(+), 59 deletions(-) delete mode 100644 tests/_ci/aerospike.conf diff --git a/.travis.yml b/.travis.yml index 9d0b5e1bf..e0a7a4458 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,11 +10,9 @@ dist: trusty env: global: - - DOCKER_COMPOSE_VERSION="1.7.0" PHALCON_SRC_PATH="${TRAVIS_BUILD_DIR}/cphalcon" + - DOCKER_COMPOSE_VERSION="1.8.1" PHALCON_SRC_PATH="${TRAVIS_BUILD_DIR}/cphalcon" matrix: - PHALCON_VERSION="3.0.x" - - PHALCON_VERSION="v3.0.0" - - PHALCON_VERSION="v3.0.1" - PHALCON_VERSION="v3.0.2" before_install: @@ -47,6 +45,8 @@ install: before_script: - stty cols 160 - docker-compose -p incubator up -d + - docker-compose -p incubator ps + - docker logs incubator_aerospike - sleep 1 script: diff --git a/docker-compose.yml b/docker-compose.yml index 1050ca5d8..41906bfe0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -38,7 +38,7 @@ services: aerospike: restart: always - image: aerospike + image: aerospike:3.10.1 container_name: incubator_aerospike expose: - "3000" @@ -50,8 +50,6 @@ services: - "3001:3001" - "3002:3002" - "3003:3003" - volumes: - - ./tests/_ci/aerospike.conf:/etc/aerospike/aerospike.conf mongodb: restart: always diff --git a/tests/_ci/aerospike.conf b/tests/_ci/aerospike.conf deleted file mode 100644 index d7edaa87a..000000000 --- a/tests/_ci/aerospike.conf +++ /dev/null @@ -1,53 +0,0 @@ -service { - user root - group root - paxos-single-replica-limit 1 - pidfile /var/run/aerospike/asd.pid - service-threads 4 - transaction-queues 4 - transaction-threads-per-queue 4 - proto-fd-max 15000 -} - -logging { - file /var/log/aerospike/aerospike.log { - context any info - } - - console { - context any critical - } -} - -network { - service { - address any - port 3000 - } - - heartbeat { - mode mesh - port 3002 - interval 150 - timeout 10 - } - - fabric { - port 3001 - } - - info { - port 3003 - } -} - -namespace test { - replication-factor 2 - memory-size 100M - default-ttl 5d # 5 days, use 0 to never expire/evict. - storage-engine device { - file /opt/aerospike/data/test.dat - filesize 1G - data-in-memory true # Store data in memory in addition to file. - } -}