Skip to content

Commit

Permalink
Caching composer packages in appveyor
Browse files Browse the repository at this point in the history
Some debugging code for appveyor

More debugging for appveyor

Better cache folder for appveyor

More debugging code for appveyor
  • Loading branch information
lorenzo committed Dec 31, 2015
1 parent c8ccdf5 commit 1afee11
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion appveyor.yml
Expand Up @@ -3,6 +3,9 @@ shallow_clone: false
platform: 'x86'
clone_folder: c:\projects\cakephp

cache:
- '%LOCALAPPDATA%\Composer'

branches:
only:
- master
Expand Down Expand Up @@ -80,4 +83,4 @@ before_test:
test_script:
- sqlcmd -S ".\SQL2012SP1" -U sa -P Password12! -Q "create database cakephp;"
- cd C:\projects\cakephp
- vendor\bin\phpunit.bat
- vendor\bin\phpunit.bat --stop-on-error --filter testPaginateQueryWithBindValue
3 changes: 3 additions & 0 deletions src/ORM/Query.php
Expand Up @@ -723,11 +723,13 @@ protected function _performCount()
count($query->clause('union')) ||
$query->clause('having')
);
debug($complex);

if (!$complex) {
// Expression fields could have bound parameters.
foreach ($query->clause('select') as $field) {
if ($field instanceof ExpressionInterface) {
debug($field);
$complex = true;
break;
}
Expand All @@ -737,6 +739,7 @@ protected function _performCount()
if (!$complex && $this->_valueBinder !== null) {
$order = $this->clause('order');
$complex = $order === null ? false : $order->hasNestedExpression();
debug($complex);
}

$count = ['count' => $query->func()->count('*')];
Expand Down

0 comments on commit 1afee11

Please sign in to comment.