Skip to content

Commit

Permalink
Merge pull request #11 from ondrejmirtes/patch-3
Browse files Browse the repository at this point in the history
 Better ignore-by-php-version.neon.php
  • Loading branch information
Seldaek committed Feb 24, 2022
2 parents 5bcd1d7 + 907a0b0 commit 6b3902b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions phpstan/ignore-by-php-version.neon.php
@@ -1,14 +1,12 @@
<?php declare(strict_types = 1);

use PHPStan\DependencyInjection\NeonAdapter;

$adapter = new NeonAdapter();

// more inspiration at https://github.com/phpstan/phpstan-src/blob/master/build/ignore-by-php-version.neon.php
$config = [];
$includes = [];
if (PHP_VERSION_ID >= 80000) {
$config = array_merge_recursive($config, $adapter->load(__DIR__ . '/baseline-8.1.neon'));
$includes[] = __DIR__ . '/baseline-8.1.neon';
}

$config['includes'] = $includes;
$config['parameters']['phpVersion'] = PHP_VERSION_ID;

return $config;
2 changes: 1 addition & 1 deletion src/Composer/Repository/Vcs/GitLabDriver.php
Expand Up @@ -82,7 +82,7 @@ class GitLabDriver extends VcsDriver
*/
private $hasNonstandardOrigin = false;

private const URL_REGEX = '#^(?:(?P<scheme>https?)://(?P<domain>.+?)(?::(?P<port>[0-9]+))?/|git@(?P<domain2>[^:]+):)(?P<parts>.+)/(?P<repo>[^/]+?)(?:\.git|/)?$#';
public const URL_REGEX = '#^(?:(?P<scheme>https?)://(?P<domain>.+?)(?::(?P<port>[0-9]+))?/|git@(?P<domain2>[^:]+):)(?P<parts>.+)/(?P<repo>[^/]+?)(?:\.git|/)?$#';

/**
* Extracts information from the repository url.
Expand Down

0 comments on commit 6b3902b

Please sign in to comment.