parent
							
								
									7ae6452d1a
								
							
						
					
					
						commit
						744062c14e
					
				| 
						 | 
					@ -1,7 +1,8 @@
 | 
				
			||||||
# PHP Language Server
 | 
					# PHP Language Server
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[](https://packagist.org/packages/felixfbecker/language-server)
 | 
					[](https://packagist.org/packages/felixfbecker/language-server)
 | 
				
			||||||
[](https://travis-ci.org/felixfbecker/php-language-server)
 | 
					[](https://travis-ci.org/felixfbecker/php-language-server)
 | 
				
			||||||
 | 
					[](https://ci.appveyor.com/project/felixfbecker/php-language-server/branch/master)
 | 
				
			||||||
[](https://codecov.io/gh/felixfbecker/php-language-server)
 | 
					[](https://codecov.io/gh/felixfbecker/php-language-server)
 | 
				
			||||||
[](https://gemnasium.com/github.com/felixfbecker/php-language-server)
 | 
					[](https://gemnasium.com/github.com/felixfbecker/php-language-server)
 | 
				
			||||||
[](https://github.com/semantic-release/semantic-release)
 | 
					[](https://github.com/semantic-release/semantic-release)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,51 @@
 | 
				
			||||||
 | 
					version: '{build}'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					platform:
 | 
				
			||||||
 | 
					  - x64
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					skip_tags: true
 | 
				
			||||||
 | 
					skip_branch_with_pr: true
 | 
				
			||||||
 | 
					clone_depth: 1
 | 
				
			||||||
 | 
					max_jobs: 3
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					cache:
 | 
				
			||||||
 | 
					  - '%LOCALAPPDATA%\Composer'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					environment:
 | 
				
			||||||
 | 
					  ANSICON: 121x90 (121x90)
 | 
				
			||||||
 | 
					  matrix:
 | 
				
			||||||
 | 
					    - { PHP_VERSION: '7.1.11', VC_VERSION: '14', XDEBUG_VERSION: '2.5.5' }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					install:
 | 
				
			||||||
 | 
					  # Enable Windows Update service, needed to install vcredist2015 (dependency of php)
 | 
				
			||||||
 | 
					  - ps: Set-Service wuauserv -StartupType Manual
 | 
				
			||||||
 | 
					  - choco install -y php --version %PHP_VERSION%
 | 
				
			||||||
 | 
					  - choco install -y composer
 | 
				
			||||||
 | 
					  - refreshenv
 | 
				
			||||||
 | 
					  - composer install --no-interaction --no-progress --prefer-dist
 | 
				
			||||||
 | 
					  # Install XDebug for code coverage
 | 
				
			||||||
 | 
					  - ps: |
 | 
				
			||||||
 | 
					      $client = New-Object System.Net.WebClient
 | 
				
			||||||
 | 
					      $phpMinorVersion = $env:PHP_VERSION -replace '\.\d+$'
 | 
				
			||||||
 | 
					      $xdebugUrl = "https://xdebug.org/files/php_xdebug-$env:XDEBUG_VERSION-$phpMinorVersion-vc14-nts-x86_64.dll"
 | 
				
			||||||
 | 
					      $phpDir = (Get-Item (Get-Command php).Source).Directory.FullName
 | 
				
			||||||
 | 
					      $xdebugPath = Join-Path $phpDir ext\xdebug.dll
 | 
				
			||||||
 | 
					      $client.DownloadFile($xdebugUrl, $xdebugPath)
 | 
				
			||||||
 | 
					      $phpIniPath = Join-Path $phpDir php.ini
 | 
				
			||||||
 | 
					      Add-Content $phpIniPath @"
 | 
				
			||||||
 | 
					      zend_extension=$xdebugPath
 | 
				
			||||||
 | 
					      "@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					build: off
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					test_script:
 | 
				
			||||||
 | 
					  - vendor\bin\phpunit --coverage-clover=coverage/coverage.xml
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					after_test:
 | 
				
			||||||
 | 
					  - ps: |
 | 
				
			||||||
 | 
					      # Delete vendor because it causes problems with codecovs report search
 | 
				
			||||||
 | 
					      # https://github.com/codecov/codecov-bash/issues/96
 | 
				
			||||||
 | 
					      Remove-Item -Recurse -Force vendor
 | 
				
			||||||
 | 
					      $env:PATH = 'C:\msys64\usr\bin;' + $env:PATH
 | 
				
			||||||
 | 
					      Invoke-WebRequest -Uri 'https://codecov.io/bash' -OutFile codecov.sh
 | 
				
			||||||
 | 
					      bash codecov.sh -f 'coverage/coverage.xml'
 | 
				
			||||||
| 
						 | 
					@ -96,7 +96,9 @@ class ValidationTest extends TestCase
 | 
				
			||||||
        $testCasesDir = realpath(__DIR__ . '/cases');
 | 
					        $testCasesDir = realpath(__DIR__ . '/cases');
 | 
				
			||||||
        foreach ($refsAndDefs['references'] as $key => $list) {
 | 
					        foreach ($refsAndDefs['references'] as $key => $list) {
 | 
				
			||||||
            $fixedPathRefs = array_map(function ($ref) use ($testCasesDir) {
 | 
					            $fixedPathRefs = array_map(function ($ref) use ($testCasesDir) {
 | 
				
			||||||
                return str_replace($testCasesDir, '.', $ref);
 | 
					                $ref = str_replace($testCasesDir, '.', $ref);
 | 
				
			||||||
 | 
					                $ref = str_replace(DIRECTORY_SEPARATOR, '/', $ref);
 | 
				
			||||||
 | 
					                return $ref;
 | 
				
			||||||
            }, $list);
 | 
					            }, $list);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            $refsAndDefs['references']->$key = $fixedPathRefs;
 | 
					            $refsAndDefs['references']->$key = $fixedPathRefs;
 | 
				
			||||||
| 
						 | 
					@ -107,6 +109,7 @@ class ValidationTest extends TestCase
 | 
				
			||||||
            if ($def !== null && $def->symbolInformation !== null &&
 | 
					            if ($def !== null && $def->symbolInformation !== null &&
 | 
				
			||||||
                $def->symbolInformation->location !== null && $def->symbolInformation->location->uri !== null) {
 | 
					                $def->symbolInformation->location !== null && $def->symbolInformation->location->uri !== null) {
 | 
				
			||||||
                $def->symbolInformation->location->uri = str_replace($testCasesDir, '.', $def->symbolInformation->location->uri);
 | 
					                $def->symbolInformation->location->uri = str_replace($testCasesDir, '.', $def->symbolInformation->location->uri);
 | 
				
			||||||
 | 
					                $def->symbolInformation->location->uri = str_replace(DIRECTORY_SEPARATOR, '/', $def->symbolInformation->location->uri);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue