Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed AppVeyor build configuration and the issue on SQL Server #3452

Merged
merged 2 commits into from
Feb 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,17 +131,25 @@ before_test:
}

test_script:
- cd C:\projects\dbal
- ps: >-
if ($env:db_version) {
$env:phpunit_config = "tests\appveyor\$($env:db).$($env:db_version).$($env:driver).appveyor.xml"
} else {
$env:phpunit_config = "tests\appveyor\$($env:db).$($env:driver).appveyor.xml"
}
- ps: >-

if ($env:coverage -eq "yes") {
vendor\bin\phpunit -c $($env:phpunit_config) --coverage-clover clover.xml
appveyor-retry ocular code-coverage:upload --format=php-clover clover.xml
} else {
vendor\bin\phpunit -c $($env:phpunit_config)
}

if ($LastExitCode -ne 0) {
$host.SetShouldExit($LastExitCode)
}

after_test:
- ps: >-
if ($env:coverage -eq "yes") {
appveyor-retry ocular code-coverage:upload --format=php-clover clover.xml
}
2 changes: 1 addition & 1 deletion lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php
Original file line number Diff line number Diff line change
Expand Up @@ -1278,7 +1278,7 @@ protected function doModifyLimitQuery($query, $limit, $offset = null)
// Even if the TOP n is very large, the use of a CTE will
// allow the SQL Server query planner to optimize it so it doesn't
// actually scan the entire range covered by the TOP clause.
if (! preg_match('/^(\s*SELECT\s+(?:DISTINCT\s+)?)(.*)$/im', $query, $matches)) {
if (! preg_match('/^(\s*SELECT\s+(?:DISTINCT\s+)?)(.*)$/is', $query, $matches)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woah, nice catch! Annoying that Powershell doesn't have a stricter default

return $query;
}

Expand Down