From 0f051104f3de1eae536cd256740158c371647866 Mon Sep 17 00:00:00 2001 From: geonymous Date: Thu, 3 May 2012 18:45:46 +0800 Subject: [PATCH 1/4] Array key fixes When calling count_all() before find_all(), some table field names will be missing because of array key collisions. --- classes/Kohana/ORM.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/Kohana/ORM.php b/classes/Kohana/ORM.php index 462ea72..9ab6e25 100644 --- a/classes/Kohana/ORM.php +++ b/classes/Kohana/ORM.php @@ -1582,7 +1582,7 @@ public function count_all() if ($method['name'] == 'select') { // Ignore any selected columns for now - $selects[] = $method; + $selects[$key] = $method; unset($this->_db_pending[$key]); } } From 276f05ed39ab190ec43df087ae3b7fd2b2c52882 Mon Sep 17 00:00:00 2001 From: Andrew Coulton Date: Wed, 17 Sep 2014 17:38:25 +0100 Subject: [PATCH 2/4] Configure standalone travis build Adds and configures kohana/koharness to build a skeleton Kohana application and then uses that environment to run the unit tests on travis (and locally, if required). Continues kohana/kohana#50 --- .gitignore | 4 ++++ .travis.yml | 24 ++++++++++++++++++++++++ composer.json | 11 ++++++++++- koharness.php | 8 ++++++++ 4 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 .travis.yml create mode 100644 koharness.php diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c359b56 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +composer.lock +vendor/* +koharness_bootstrap.php + diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..8f9e0fc --- /dev/null +++ b/.travis.yml @@ -0,0 +1,24 @@ +language: php + +php: + - 5.3 + - 5.4 + - 5.5 + - 5.6 + - hhvm + +before_script: + - composer install --prefer-dist + - vendor/bin/koharness + +script: + - cd /tmp/koharness && ./vendor/bin/phpunit --bootstrap=modules/unittest/bootstrap.php modules/unittest/tests.php + +notifications: + irc: + channels: + - "irc.freenode.org#kohana" + template: + - "%{repository}/%{branch} (%{commit}) - %{author}: %{message}" + - "Build details: %{build_url}" + email: false diff --git a/composer.json b/composer.json index faa776f..41f4928 100644 --- a/composer.json +++ b/composer.json @@ -25,10 +25,19 @@ "kohana/database": ">=3.3", "php": ">=5.3.3" }, + "require-dev": { + "kohana/core": "3.3.*@dev", + "kohana/database": "3.3.*@dev", + "kohana/unittest": "3.3.*@dev", + "kohana/koharness": "*@dev" + }, "extra": { "branch-alias": { "dev-3.3/develop": "3.3.x-dev", "dev-3.4/develop": "3.4.x-dev" - } + }, + "installer-paths": { + "vendor/{$vendor}/{$name}": ["type:kohana-module"] + } } } diff --git a/koharness.php b/koharness.php new file mode 100644 index 0000000..e2c0b77 --- /dev/null +++ b/koharness.php @@ -0,0 +1,8 @@ + array( + 'orm' => __DIR__, + 'unittest' => __DIR__ . '/vendor/kohana/unittest' + ), +); From 442ccfdaa1459ea4cad4da9aa6c6f23ae430b86e Mon Sep 17 00:00:00 2001 From: Andrew Coulton Date: Mon, 22 Sep 2014 17:58:32 +0100 Subject: [PATCH 3/4] Disable IRC notifications for kohana builds --- .travis.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8f9e0fc..1313e37 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,10 +15,4 @@ script: - cd /tmp/koharness && ./vendor/bin/phpunit --bootstrap=modules/unittest/bootstrap.php modules/unittest/tests.php notifications: - irc: - channels: - - "irc.freenode.org#kohana" - template: - - "%{repository}/%{branch} (%{commit}) - %{author}: %{message}" - - "Build details: %{build_url}" email: false From c5ee33aa57f4dbda09e9d49a9d0993a078dd2066 Mon Sep 17 00:00:00 2001 From: Andrew Coulton Date: Fri, 10 Oct 2014 15:38:27 +0100 Subject: [PATCH 4/4] Add travis build badges [skip ci] --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..fd6bc83 --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +# Kohana - ORM module + +| ver | Stable | Develop | +|-------|----------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------| +| 3.3.x | [![Build Status - 3.3/master](https://travis-ci.org/kohana/orm.svg?branch=3.3%2Fmaster)](https://travis-ci.org/kohana/orm) | [![Build Status - 3.3/develop](https://travis-ci.org/kohana/orm.svg?branch=3.3%2Fdevelop)](https://travis-ci.org/kohana/orm) | +| 3.4.x | [![Build Status - 3.4/master](https://travis-ci.org/kohana/orm.svg?branch=3.4%2Fmaster)](https://travis-ci.org/kohana/orm) | [![Build Status - 3.4/develop](https://travis-ci.org/kohana/orm.svg?branch=3.4%2Fdevelop)](https://travis-ci.org/kohana/orm) |