From caa61b43865f65f711d4b51cb03a7e661b3621fa Mon Sep 17 00:00:00 2001 From: Michael Sanders Date: Thu, 1 Oct 2026 11:51:01 +0200 Subject: [PATCH 1/3] Make PHPStan a usable signal - Add phpstan/phpstan-mockery so Mockery-based test doubles are understood. - Generate phpstan-baseline.neon capturing the 593 pre-existing level-9 errors so the analysis exits clean and flags only new regressions; the baseline is the burn-down backlog. - Add composer scripts (test, stan, cs, cs:fix); stan bakes in --memory-limit=1G to avoid the default 128M OOM. --- composer.json | 7 +- phpstan-baseline.neon | 1136 +++++++++++++++++++++++++++++++++++++++++ phpstan.neon | 4 + 3 files changed, 1146 insertions(+), 1 deletion(-) create mode 100644 phpstan-baseline.neon diff --git a/composer.json b/composer.json index 609f6ce..9eccb3b 100644 --- a/composer.json +++ b/composer.json @@ -54,6 +54,7 @@ "mockery/mockery": "^1.2.3", "phpunit/phpunit": "~5.5|^9.0", "phpstan/phpstan": "^1.4", + "phpstan/phpstan-mockery": "^1.1", "squizlabs/php_codesniffer": "^3.9", "friendsofphp/php-cs-fixer": "^3.3", "symfony/var-dumper": "^7.0", @@ -63,7 +64,11 @@ "post-install-cmd": [ ], "post-update-cmd": [ - ] + ], + "test": "phpunit", + "stan": "phpstan analyse --memory-limit=1G", + "cs": "php-cs-fixer fix --dry-run --diff", + "cs:fix": "php-cs-fixer fix" }, "bin": [ "valet" diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon new file mode 100644 index 0000000..7a23b58 --- /dev/null +++ b/phpstan-baseline.neon @@ -0,0 +1,1136 @@ +parameters: + ignoreErrors: + - + message: "#^Method Valet\\\\Configuration\\:\\:read\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: cli/Valet/Configuration.php + + - + message: "#^Method Valet\\\\Configuration\\:\\:read\\(\\) should return array but returns mixed\\.$#" + count: 1 + path: cli/Valet/Configuration.php + + - + message: "#^Method Valet\\\\Configuration\\:\\:updateKey\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: cli/Valet/Configuration.php + + - + message: "#^Method Valet\\\\Configuration\\:\\:updateKey\\(\\) should return array but returns mixed\\.$#" + count: 1 + path: cli/Valet/Configuration.php + + - + message: "#^Parameter \\#1 \\$config of method Valet\\\\Configuration\\:\\:write\\(\\) expects array, mixed given\\.$#" + count: 3 + path: cli/Valet/Configuration.php + + - + message: "#^Parameter \\#1 \\$path of method Valet\\\\Filesystem\\:\\:isDir\\(\\) expects string, mixed given\\.$#" + count: 1 + path: cli/Valet/Configuration.php + + - + message: "#^Parameter \\#3 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#" + count: 1 + path: cli/Valet/Configuration.php + + - + message: "#^Part \\$domain \\(mixed\\) of encapsed string cannot be cast to string\\.$#" + count: 1 + path: cli/Valet/Configuration.php + + - + message: "#^Unable to resolve the template type TKey in call to function collect$#" + count: 3 + path: cli/Valet/Configuration.php + + - + message: "#^Unable to resolve the template type TValue in call to function collect$#" + count: 3 + path: cli/Valet/Configuration.php + + - + message: "#^Parameter \\#1 \\$string of function trim expects string, string\\|false given\\.$#" + count: 1 + path: cli/Valet/DevTools.php + + - + message: "#^Method Valet\\\\Drivers\\\\Specific\\\\BedrockValetDriver\\:\\:forceTrailingSlash\\(\\) has no return type specified\\.$#" + count: 1 + path: cli/Valet/Drivers/Specific/BedrockValetDriver.php + + - + message: "#^Parameter \\#1 \\$string of function substr expects string, mixed given\\.$#" + count: 1 + path: cli/Valet/Drivers/Specific/BedrockValetDriver.php + + - + message: "#^Method Valet\\\\Drivers\\\\Specific\\\\DrupalValetDriver\\:\\:addSubdirectory\\(\\) should return string but returns mixed\\.$#" + count: 1 + path: cli/Valet/Drivers/Specific/DrupalValetDriver.php + + - + message: "#^Method Valet\\\\Drivers\\\\Specific\\\\DrupalValetDriver\\:\\:possibleSubdirectories\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: cli/Valet/Drivers/Specific/DrupalValetDriver.php + + - + message: "#^Offset 'extension' does not exist on array\\{dirname\\?\\: string, basename\\: string, extension\\?\\: string, filename\\: string\\}\\.$#" + count: 1 + path: cli/Valet/Drivers/Specific/DrupalValetDriver.php + + - + message: "#^Part \\$sitePath \\(mixed\\) of encapsed string cannot be cast to string\\.$#" + count: 1 + path: cli/Valet/Drivers/Specific/DrupalValetDriver.php + + - + message: "#^Variable \\$indexPath might not be defined\\.$#" + count: 1 + path: cli/Valet/Drivers/Specific/KirbyValetDriver.php + + - + message: "#^Parameter \\#1 \\$haystack of function strpos expects string, string\\|null given\\.$#" + count: 2 + path: cli/Valet/Drivers/Specific/Magento2ValetDriver.php + + - + message: "#^Parameter \\#3 \\$subject of function preg_replace expects array\\|string, string\\|null given\\.$#" + count: 1 + path: cli/Valet/Drivers/Specific/Magento2ValetDriver.php + + - + message: "#^Cannot access offset 'path' on array\\{scheme\\?\\: string, host\\?\\: string, port\\?\\: int\\<0, 65535\\>, user\\?\\: string, pass\\?\\: string, path\\?\\: string, query\\?\\: string, fragment\\?\\: string\\}\\|false\\.$#" + count: 1 + path: cli/Valet/Drivers/Specific/StatamicV2ValetDriver.php + + - + message: "#^Method Valet\\\\Drivers\\\\Specific\\\\StatamicV2ValetDriver\\:\\:getLocales\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: cli/Valet/Drivers/Specific/StatamicV2ValetDriver.php + + - + message: "#^Variable \\$indexPath might not be defined\\.$#" + count: 1 + path: cli/Valet/Drivers/Specific/StatamicV2ValetDriver.php + + - + message: "#^Cannot access offset 'path' on array\\{scheme\\?\\: string, host\\?\\: string, port\\?\\: int\\<0, 65535\\>, user\\?\\: string, pass\\?\\: string, path\\?\\: string, query\\?\\: string, fragment\\?\\: string\\}\\|false\\.$#" + count: 1 + path: cli/Valet/Drivers/Specific/StatamicValetDriver.php + + - + message: "#^Method Valet\\\\Drivers\\\\Specific\\\\StatamicValetDriver\\:\\:frontControllerPath\\(\\) should return string but returns string\\|null\\.$#" + count: 1 + path: cli/Valet/Drivers/Specific/StatamicValetDriver.php + + - + message: "#^Method Valet\\\\Drivers\\\\Specific\\\\StatamicValetDriver\\:\\:getStaticPath\\(\\) has no return type specified\\.$#" + count: 1 + path: cli/Valet/Drivers/Specific/StatamicValetDriver.php + + - + message: "#^Parameter \\#1 \\$uri of method Valet\\\\Drivers\\\\Specific\\\\Typo3ValetDriver\\:\\:isAccessAuthorized\\(\\) expects string, string\\|null given\\.$#" + count: 1 + path: cli/Valet/Drivers/Specific/Typo3ValetDriver.php + + - + message: "#^Property Valet\\\\Drivers\\\\Specific\\\\Typo3ValetDriver\\:\\:\\$documentRoot has no type specified\\.$#" + count: 1 + path: cli/Valet/Drivers/Specific/Typo3ValetDriver.php + + - + message: "#^Property Valet\\\\Drivers\\\\Specific\\\\Typo3ValetDriver\\:\\:\\$forbiddenUriPatterns has no type specified\\.$#" + count: 1 + path: cli/Valet/Drivers/Specific/Typo3ValetDriver.php + + - + message: "#^Method Valet\\\\Drivers\\\\Specific\\\\WordPressValetDriver\\:\\:forceTrailingSlash\\(\\) should return string\\|null but returns mixed\\.$#" + count: 1 + path: cli/Valet/Drivers/Specific/WordPressValetDriver.php + + - + message: "#^Parameter \\#1 \\$string of function substr expects string, mixed given\\.$#" + count: 1 + path: cli/Valet/Drivers/Specific/WordPressValetDriver.php + + - + message: "#^Parameter \\#3 \\$uri of method Valet\\\\Drivers\\\\BasicValetDriver\\:\\:frontControllerPath\\(\\) expects string, string\\|null given\\.$#" + count: 1 + path: cli/Valet/Drivers/Specific/WordPressValetDriver.php + + - + message: "#^Cannot access offset 'require' on mixed\\.$#" + count: 1 + path: cli/Valet/Drivers/ValetDriver.php + + - + message: "#^Cannot access offset 0 on mixed\\.$#" + count: 2 + path: cli/Valet/Drivers/ValetDriver.php + + - + message: "#^Cannot access offset string on mixed\\.$#" + count: 1 + path: cli/Valet/Drivers/ValetDriver.php + + - + message: "#^Instantiated class LocalValetDriver not found\\.$#" + count: 1 + path: cli/Valet/Drivers/ValetDriver.php + + - + message: "#^Method Valet\\\\Drivers\\\\ValetDriver\\:\\:customDrivers\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: cli/Valet/Drivers/ValetDriver.php + + - + message: "#^Method Valet\\\\Drivers\\\\ValetDriver\\:\\:driversIn\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: cli/Valet/Drivers/ValetDriver.php + + - + message: "#^Method Valet\\\\Drivers\\\\ValetDriver\\:\\:specificDrivers\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: cli/Valet/Drivers/ValetDriver.php + + - + message: "#^Parameter \\#1 \\$json of function json_decode expects string, string\\|false given\\.$#" + count: 1 + path: cli/Valet/Drivers/ValetDriver.php + + - + message: "#^Parameter \\#1 \\$path of function basename expects string, mixed given\\.$#" + count: 1 + path: cli/Valet/Drivers/ValetDriver.php + + - + message: "#^Parameter \\#1 \\$callback of function call_user_func_array expects callable\\(\\)\\: mixed, array\\{mixed, string\\} given\\.$#" + count: 1 + path: cli/Valet/Facades/Facade.php + + - + message: "#^Instanceof between array\\|string and Traversable will always evaluate to false\\.$#" + count: 1 + path: cli/Valet/Filesystem.php + + - + message: "#^Method Valet\\\\Filesystem\\:\\:get\\(\\) should return string but returns string\\|false\\.$#" + count: 1 + path: cli/Valet/Filesystem.php + + - + message: "#^Method Valet\\\\Filesystem\\:\\:put\\(\\) should return string but returns int\\<0, max\\>\\|false\\.$#" + count: 1 + path: cli/Valet/Filesystem.php + + - + message: "#^Method Valet\\\\Filesystem\\:\\:readLink\\(\\) should return string but returns string\\|false\\.$#" + count: 1 + path: cli/Valet/Filesystem.php + + - + message: "#^Method Valet\\\\Filesystem\\:\\:realpath\\(\\) should return string but returns string\\|false\\.$#" + count: 1 + path: cli/Valet/Filesystem.php + + - + message: "#^Method Valet\\\\Filesystem\\:\\:scandir\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: cli/Valet/Filesystem.php + + - + message: "#^Method Valet\\\\Filesystem\\:\\:toIterator\\(\\) return type has no value type specified in iterable type Traversable\\.$#" + count: 1 + path: cli/Valet/Filesystem.php + + - + message: "#^Parameter \\#1 \\$filename of function is_link expects string, string\\|false given\\.$#" + count: 1 + path: cli/Valet/Filesystem.php + + - + message: "#^Parameter \\#1 \\$path of function readlink expects string, string\\|false given\\.$#" + count: 1 + path: cli/Valet/Filesystem.php + + - + message: "#^Parameter \\#1 \\$value of function collect expects Illuminate\\\\Contracts\\\\Support\\\\Arrayable\\\\|iterable\\\\|null, array\\\\|false given\\.$#" + count: 1 + path: cli/Valet/Filesystem.php + + - + message: "#^Part \\$domain \\(mixed\\) of encapsed string cannot be cast to string\\.$#" + count: 3 + path: cli/Valet/Mailpit.php + + - + message: "#^Cannot call method execute\\(\\) on bool\\|PDOStatement\\|null\\.$#" + count: 1 + path: cli/Valet/Mysql.php + + - + message: "#^Cannot call method fetchAll\\(\\) on PDOStatement\\|true\\.$#" + count: 1 + path: cli/Valet/Mysql.php + + - + message: "#^Cannot call method rowCount\\(\\) on bool\\|PDOStatement\\|null\\.$#" + count: 1 + path: cli/Valet/Mysql.php + + - + message: "#^Method Valet\\\\Mysql\\:\\:exportDatabase\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: cli/Valet/Mysql.php + + - + message: "#^Method Valet\\\\Mysql\\:\\:getDatabases\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: cli/Valet/Mysql.php + + - + message: "#^Method Valet\\\\Mysql\\:\\:getSystemDatabases\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: cli/Valet/Mysql.php + + - + message: "#^Method Valet\\\\Nginx\\:\\:configuredSites\\(\\) return type with generic class Illuminate\\\\Support\\\\Collection does not specify its types\\: TKey, TValue$#" + count: 1 + path: cli/Valet/Nginx.php + + - + message: "#^Parameter \\#1 \\$oldDomain of method Valet\\\\SiteSecure\\:\\:reSecureForNewDomain\\(\\) expects string, mixed given\\.$#" + count: 1 + path: cli/Valet/Nginx.php + + - + message: "#^Parameter \\#2 \\$domain of method Valet\\\\SiteSecure\\:\\:reSecureForNewDomain\\(\\) expects string, mixed given\\.$#" + count: 1 + path: cli/Valet/Nginx.php + + - + message: "#^Method Valet\\\\Ngrok\\:\\:currentTunnelUrl\\(\\) should return string\\|null but returns mixed\\.$#" + count: 1 + path: cli/Valet/Ngrok.php + + - + message: "#^Constant Valet\\\\PackageManagers\\\\Apt\\:\\:PHP_FPM_PATTERN_BY_VERSION type has no value type specified in iterable type array\\.$#" + count: 1 + path: cli/Valet/PackageManagers/Apt.php + + - + message: "#^Method Valet\\\\PackageManagers\\\\Apt\\:\\:packages\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: cli/Valet/PackageManagers/Apt.php + + - + message: "#^Offset string does not exist on array\\{\\}\\.$#" + count: 1 + path: cli/Valet/PackageManagers/Apt.php + + - + message: "#^Offset string on array\\{\\} in empty\\(\\) does not exist\\.$#" + count: 1 + path: cli/Valet/PackageManagers/Apt.php + + - + message: "#^Constant Valet\\\\PackageManagers\\\\Dnf\\:\\:PHP_FPM_PATTERN_BY_VERSION type has no value type specified in iterable type array\\.$#" + count: 1 + path: cli/Valet/PackageManagers/Dnf.php + + - + message: "#^Constant Valet\\\\PackageManagers\\\\Eopkg\\:\\:PHP_FPM_PATTERN_BY_VERSION type has no value type specified in iterable type array\\.$#" + count: 1 + path: cli/Valet/PackageManagers/Eopkg.php + + - + message: "#^Method Valet\\\\PackageManagers\\\\Eopkg\\:\\:packages\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: cli/Valet/PackageManagers/Eopkg.php + + - + message: "#^Offset string does not exist on array\\{\\}\\.$#" + count: 1 + path: cli/Valet/PackageManagers/Eopkg.php + + - + message: "#^Offset string on array\\{\\} in empty\\(\\) does not exist\\.$#" + count: 1 + path: cli/Valet/PackageManagers/Eopkg.php + + - + message: "#^Constant Valet\\\\PackageManagers\\\\PackageKit\\:\\:PHP_FPM_PATTERN_BY_VERSION type has no value type specified in iterable type array\\.$#" + count: 1 + path: cli/Valet/PackageManagers/PackageKit.php + + - + message: "#^Method Valet\\\\PackageManagers\\\\PackageKit\\:\\:packages\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: cli/Valet/PackageManagers/PackageKit.php + + - + message: "#^Offset string does not exist on array\\{\\}\\.$#" + count: 1 + path: cli/Valet/PackageManagers/PackageKit.php + + - + message: "#^Offset string on array\\{\\} in empty\\(\\) does not exist\\.$#" + count: 1 + path: cli/Valet/PackageManagers/PackageKit.php + + - + message: "#^Constant Valet\\\\PackageManagers\\\\Pacman\\:\\:PHP_FPM_PATTERN_BY_VERSION type has no value type specified in iterable type array\\.$#" + count: 1 + path: cli/Valet/PackageManagers/Pacman.php + + - + message: "#^Method Valet\\\\PackageManagers\\\\Pacman\\:\\:packages\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: cli/Valet/PackageManagers/Pacman.php + + - + message: "#^Parameter \\#2 \\$replace of function str_replace expects array\\|string, string\\|null given\\.$#" + count: 2 + path: cli/Valet/PackageManagers/Pacman.php + + - + message: "#^Constant Valet\\\\PackageManagers\\\\Yum\\:\\:PHP_FPM_PATTERN_BY_VERSION type has no value type specified in iterable type array\\.$#" + count: 1 + path: cli/Valet/PackageManagers/Yum.php + + - + message: "#^Offset string does not exist on array\\{\\}\\.$#" + count: 1 + path: cli/Valet/PackageManagers/Yum.php + + - + message: "#^Offset string on array\\{\\} in empty\\(\\) does not exist\\.$#" + count: 1 + path: cli/Valet/PackageManagers/Yum.php + + - + message: "#^Method Valet\\\\PhpFpm\\:\\:getCurrentVersion\\(\\) should return string but returns mixed\\.$#" + count: 1 + path: cli/Valet/PhpFpm.php + + - + message: "#^Method Valet\\\\PhpFpm\\:\\:validateIsolationVersion\\(\\) is unused\\.$#" + count: 1 + path: cli/Valet/PhpFpm.php + + - + message: "#^Negated boolean expression is always false\\.$#" + count: 1 + path: cli/Valet/PhpFpm.php + + - + message: "#^Parameter \\#1 \\$version of method Valet\\\\PhpFpm\\:\\:serviceName\\(\\) expects string\\|null, mixed given\\.$#" + count: 3 + path: cli/Valet/PhpFpm.php + + - + message: "#^Parameter \\#2 \\$contents of method Valet\\\\Filesystem\\:\\:put\\(\\) expects string, string\\|null given\\.$#" + count: 1 + path: cli/Valet/PhpFpm.php + + - + message: "#^Variable \\$confDir in PHPDoc tag @var does not exist\\.$#" + count: 1 + path: cli/Valet/PhpFpm.php + + - + message: "#^Method Valet\\\\Server\\:\\:allowWildcardDnsDomains\\(\\) should return string but returns string\\|null\\.$#" + count: 1 + path: cli/Valet/Server.php + + - + message: "#^Method Valet\\\\Server\\:\\:hostIsIpAddress\\(\\) should return bool but returns int\\|false\\.$#" + count: 1 + path: cli/Valet/Server.php + + - + message: "#^Method Valet\\\\Server\\:\\:show404\\(\\) has no return type specified\\.$#" + count: 1 + path: cli/Valet/Server.php + + - + message: "#^Method Valet\\\\Server\\:\\:showDirectoryListing\\(\\) has no return type specified\\.$#" + count: 1 + path: cli/Valet/Server.php + + - + message: "#^Parameter \\#1 \\$array of function usort expects TArray of array\\, array\\\\|false given\\.$#" + count: 1 + path: cli/Valet/Server.php + + - + message: "#^Parameter \\#1 \\$haystack of function strpos expects string, string\\|null given\\.$#" + count: 1 + path: cli/Valet/Server.php + + - + message: "#^Parameter \\#2 \\$array of function array_map expects array, array\\\\|false given\\.$#" + count: 1 + path: cli/Valet/Server.php + + - + message: "#^Parameter \\#2 \\$string of function explode expects string, string\\|null given\\.$#" + count: 1 + path: cli/Valet/Server.php + + - + message: "#^Property Valet\\\\Server\\:\\:\\$config type has no value type specified in iterable type array\\.$#" + count: 1 + path: cli/Valet/Server.php + + - + message: "#^Method Valet\\\\ServiceManagers\\\\LinuxService\\:\\:getRealService\\(\\) should return string but returns mixed\\.$#" + count: 1 + path: cli/Valet/ServiceManagers/LinuxService.php + + - + message: "#^Parameter \\#1 \\$value of function collect expects Illuminate\\\\Contracts\\\\Support\\\\Arrayable\\<\\(int\\|string\\), mixed\\>\\|iterable\\<\\(int\\|string\\), mixed\\>\\|null, string given\\.$#" + count: 1 + path: cli/Valet/ServiceManagers/LinuxService.php + + - + message: "#^Unable to resolve the template type TKey in call to function collect$#" + count: 1 + path: cli/Valet/ServiceManagers/LinuxService.php + + - + message: "#^Unable to resolve the template type TValue in call to function collect$#" + count: 1 + path: cli/Valet/ServiceManagers/LinuxService.php + + - + message: "#^Method Valet\\\\ServiceManagers\\\\Systemd\\:\\:getRealService\\(\\) should return string but returns mixed\\.$#" + count: 1 + path: cli/Valet/ServiceManagers/Systemd.php + + - + message: "#^Parameter \\#1 \\$callback of method Illuminate\\\\Support\\\\Collection\\<\\(int\\|string\\),mixed\\>\\:\\:first\\(\\) expects \\(callable\\(mixed, int\\|string\\)\\: bool\\)\\|null, Closure\\(mixed\\)\\: \\(int\\<0, max\\>\\|false\\) given\\.$#" + count: 1 + path: cli/Valet/ServiceManagers/Systemd.php + + - + message: "#^Parameter \\#1 \\$value of function collect expects Illuminate\\\\Contracts\\\\Support\\\\Arrayable\\<\\(int\\|string\\), mixed\\>\\|iterable\\<\\(int\\|string\\), mixed\\>\\|null, string given\\.$#" + count: 1 + path: cli/Valet/ServiceManagers/Systemd.php + + - + message: "#^Part \\$service \\(mixed\\) of encapsed string cannot be cast to string\\.$#" + count: 1 + path: cli/Valet/ServiceManagers/Systemd.php + + - + message: "#^Unable to resolve the template type TKey in call to function collect$#" + count: 1 + path: cli/Valet/ServiceManagers/Systemd.php + + - + message: "#^Unable to resolve the template type TValue in call to function collect$#" + count: 1 + path: cli/Valet/ServiceManagers/Systemd.php + + - + message: "#^Method Valet\\\\SiteIsolate\\:\\:isolatedDirectories\\(\\) return type with generic class Illuminate\\\\Support\\\\Collection does not specify its types\\: TKey, TValue$#" + count: 1 + path: cli/Valet/SiteIsolate.php + + - + message: "#^Offset 1 does not exist on array\\{0\\?\\: string, 1\\?\\: string\\}\\.$#" + count: 1 + path: cli/Valet/SiteIsolate.php + + - + message: "#^Parameter \\#1 \\$file of method Valet\\\\SiteIsolate\\:\\:nginxPath\\(\\) expects string\\|null, mixed given\\.$#" + count: 1 + path: cli/Valet/SiteIsolate.php + + - + message: "#^Parameter \\#1 \\$key of method Illuminate\\\\Support\\\\Collection\\\\:\\:contains\\(\\) expects \\(callable\\(string, int\\)\\: bool\\)\\|string, mixed given\\.$#" + count: 1 + path: cli/Valet/SiteIsolate.php + + - + message: "#^Parameter \\#1 \\$url of method Valet\\\\SiteIsolate\\:\\:isolatedPhpVersion\\(\\) expects string, mixed given\\.$#" + count: 1 + path: cli/Valet/SiteIsolate.php + + - + message: "#^Parameter \\#3 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#" + count: 1 + path: cli/Valet/SiteIsolate.php + + - + message: "#^Anonymous function has an unused use \\$domain\\.$#" + count: 1 + path: cli/Valet/SiteProxy.php + + - + message: "#^Method Valet\\\\SiteProxy\\:\\:proxies\\(\\) return type with generic class Illuminate\\\\Support\\\\Collection does not specify its types\\: TKey, TValue$#" + count: 1 + path: cli/Valet/SiteProxy.php + + - + message: "#^Offset 1 does not exist on array\\{0\\?\\: string, 1\\?\\: string\\}\\.$#" + count: 1 + path: cli/Valet/SiteSecure.php + + - + message: "#^Cannot call method isAvailable\\(\\) on mixed\\.$#" + count: 2 + path: cli/Valet/Valet.php + + - + message: "#^Method Valet\\\\Valet\\:\\:getAvailablePackageManager\\(\\) should return class\\-string but returns string\\.$#" + count: 1 + path: cli/Valet/Valet.php + + - + message: "#^Method Valet\\\\Valet\\:\\:getAvailableServiceManager\\(\\) should return class\\-string but returns string\\.$#" + count: 1 + path: cli/Valet/Valet.php + + - + message: "#^Method Valet\\\\Valet\\:\\:getRunningFpmVersions\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: cli/Valet/Valet.php + + - + message: "#^Parameter \\#1 \\$domain of static method Valet\\\\Facades\\\\DnsMasq\\:\\:install\\(\\) expects string, mixed given\\.$#" + count: 1 + path: cli/app.php + + - + message: "#^Parameter \\#1 \\$oldDomain of static method Valet\\\\Facades\\\\SiteSecure\\:\\:reSecureForNewDomain\\(\\) expects string, mixed given\\.$#" + count: 1 + path: cli/app.php + + - + message: "#^Parameter \\#1 \\$path of function basename expects string, string\\|false given\\.$#" + count: 8 + path: cli/app.php + + - + message: "#^Parameter \\#1 \\$sitePath of static method Valet\\\\Drivers\\\\ValetDriver\\:\\:assign\\(\\) expects string, string\\|false given\\.$#" + count: 1 + path: cli/app.php + + - + message: "#^Parameter \\#1 \\$target of static method Valet\\\\Facades\\\\SiteLink\\:\\:link\\(\\) expects string, string\\|false given\\.$#" + count: 1 + path: cli/app.php + + - + message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, mixed given\\.$#" + count: 1 + path: cli/app.php + + - + message: "#^Parameter \\#2 \\$array of function array_map expects array, mixed given\\.$#" + count: 1 + path: cli/app.php + + - + message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#" + count: 1 + path: cli/app.php + + - + message: "#^Parameter \\#3 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#" + count: 1 + path: cli/app.php + + - + message: "#^Static method Valet\\\\Facades\\\\Mysql\\:\\:install\\(\\) invoked with 1 parameter, 0 required\\.$#" + count: 1 + path: cli/app.php + + - + message: "#^Function Valet\\\\strArrayReplace\\(\\) has parameter \\$searchAndReplace with no value type specified in iterable type array\\.$#" + count: 1 + path: cli/includes/helpers.php + + - + message: "#^Method Valet\\\\Tests\\\\CliTest\\:\\:databaseNamesProvider\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/CliTest.php + + - + message: "#^Method Valet\\\\Tests\\\\CliTest\\:\\:directoryProvider\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/CliTest.php + + - + message: "#^Method Valet\\\\Tests\\\\CliTest\\:\\:invalidProxyDataProvider\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/CliTest.php + + - + message: "#^Method Valet\\\\Tests\\\\CliTest\\:\\:invalidUnproxyDataProvider\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/CliTest.php + + - + message: "#^Method Valet\\\\Tests\\\\CliTest\\:\\:isolateDirectoryDataProvider\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/CliTest.php + + - + message: "#^Method Valet\\\\Tests\\\\CliTest\\:\\:nginxPortDataProvider\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/CliTest.php + + - + message: "#^Method Valet\\\\Tests\\\\CliTest\\:\\:nginxProxyDataProvider\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/CliTest.php + + - + message: "#^Method Valet\\\\Tests\\\\CliTest\\:\\:nginxUnproxyDataProvider\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/CliTest.php + + - + message: "#^Method Valet\\\\Tests\\\\CliTest\\:\\:parkedDirectoryProvider\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/CliTest.php + + - + message: "#^Method Valet\\\\Tests\\\\CliTest\\:\\:secureNginxDomainProvider\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/CliTest.php + + - + message: "#^Method Valet\\\\Tests\\\\CliTest\\:\\:securedNginxDomainProvider\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/CliTest.php + + - + message: "#^Method Valet\\\\Tests\\\\CliTest\\:\\:unIsolateDirectoryDataProvider\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/CliTest.php + + - + message: "#^Method Valet\\\\Tests\\\\CliTest\\:\\:unsecureNginxDomainProvider\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/CliTest.php + + - + message: "#^Parameter \\#1 \\$path of function basename expects string, string\\|false given\\.$#" + count: 2 + path: tests/CliTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\Filesystem\\:\\:shouldNotReceive\\(\\)\\.$#" + count: 5 + path: tests/Unit/ConfigurationTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\Filesystem\\:\\:shouldReceive\\(\\)\\.$#" + count: 37 + path: tests/Unit/ConfigurationTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Unit\\\\ConfigurationTest\\:\\:configDataProvider\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Unit/ConfigurationTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Unit\\\\ConfigurationTest\\:\\:defaultConfig\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Unit/ConfigurationTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Unit\\\\ConfigurationTest\\:\\:domainDataProvider\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Unit/ConfigurationTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Unit\\\\ConfigurationTest\\:\\:updateConfigDataProvider\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Unit/ConfigurationTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\CommandLine\\:\\:shouldNotReceive\\(\\)\\.$#" + count: 1 + path: tests/Unit/DevToolsTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\CommandLine\\:\\:shouldReceive\\(\\)\\.$#" + count: 11 + path: tests/Unit/DevToolsTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\CommandLine\\:\\:shouldReceive\\(\\)\\.$#" + count: 4 + path: tests/Unit/DnsMasqTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\Contracts\\\\PackageManager\\:\\:shouldReceive\\(\\)\\.$#" + count: 2 + path: tests/Unit/DnsMasqTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\Contracts\\\\ServiceManager\\:\\:shouldReceive\\(\\)\\.$#" + count: 13 + path: tests/Unit/DnsMasqTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\Filesystem\\:\\:shouldReceive\\(\\)\\.$#" + count: 27 + path: tests/Unit/DnsMasqTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\CommandLine\\:\\:shouldReceive\\(\\)\\.$#" + count: 2 + path: tests/Unit/MailpitTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\Configuration\\:\\:shouldReceive\\(\\)\\.$#" + count: 1 + path: tests/Unit/MailpitTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\Contracts\\\\ServiceManager\\:\\:shouldReceive\\(\\)\\.$#" + count: 10 + path: tests/Unit/MailpitTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\Filesystem\\:\\:shouldReceive\\(\\)\\.$#" + count: 5 + path: tests/Unit/MailpitTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\SiteProxy\\:\\:shouldReceive\\(\\)\\.$#" + count: 1 + path: tests/Unit/MailpitTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\SiteSecure\\:\\:shouldReceive\\(\\)\\.$#" + count: 1 + path: tests/Unit/MailpitTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\CommandLine\\:\\:shouldReceive\\(\\)\\.$#" + count: 1 + path: tests/Unit/MysqlTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\Configuration\\:\\:shouldReceive\\(\\)\\.$#" + count: 4 + path: tests/Unit/MysqlTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\Contracts\\\\PackageManager\\:\\:shouldNotReceive\\(\\)\\.$#" + count: 2 + path: tests/Unit/MysqlTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\Contracts\\\\PackageManager\\:\\:shouldReceive\\(\\)\\.$#" + count: 22 + path: tests/Unit/MysqlTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\Contracts\\\\ServiceManager\\:\\:shouldNotReceive\\(\\)\\.$#" + count: 2 + path: tests/Unit/MysqlTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\Contracts\\\\ServiceManager\\:\\:shouldReceive\\(\\)\\.$#" + count: 4 + path: tests/Unit/MysqlTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Unit\\\\MysqlTest\\:\\:itWillNotOverrideWhenInstalled\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Unit/MysqlTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Unit\\\\MysqlTest\\:\\:itWillNotOverrideWhenMariaDbInstalled\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Unit/MysqlTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Unit\\\\MysqlTest\\:\\:packageDataProvider\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Unit/MysqlTest.php + + - + message: "#^Parameter \\#1 \\$pm of class Valet\\\\Mysql constructor expects Valet\\\\Contracts\\\\PackageManager, PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\Contracts\\\\PackageManager given\\.$#" + count: 5 + path: tests/Unit/MysqlTest.php + + - + message: "#^Parameter \\#2 \\$sm of class Valet\\\\Mysql constructor expects Valet\\\\Contracts\\\\ServiceManager, PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\Contracts\\\\ServiceManager given\\.$#" + count: 5 + path: tests/Unit/MysqlTest.php + + - + message: "#^Parameter \\#3 \\$cli of class Valet\\\\Mysql constructor expects Valet\\\\CommandLine, PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\CommandLine given\\.$#" + count: 5 + path: tests/Unit/MysqlTest.php + + - + message: "#^Parameter \\#4 \\$files of class Valet\\\\Mysql constructor expects Valet\\\\Filesystem, PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\Filesystem given\\.$#" + count: 5 + path: tests/Unit/MysqlTest.php + + - + message: "#^Parameter \\#5 \\$configuration of class Valet\\\\Mysql constructor expects Valet\\\\Configuration, PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\Configuration given\\.$#" + count: 5 + path: tests/Unit/MysqlTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\CommandLine\\:\\:shouldReceive\\(\\)\\.$#" + count: 3 + path: tests/Unit/NginxTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\Configuration\\:\\:shouldReceive\\(\\)\\.$#" + count: 3 + path: tests/Unit/NginxTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\Contracts\\\\PackageManager\\:\\:shouldReceive\\(\\)\\.$#" + count: 2 + path: tests/Unit/NginxTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\Contracts\\\\ServiceManager\\:\\:shouldReceive\\(\\)\\.$#" + count: 9 + path: tests/Unit/NginxTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\Filesystem\\:\\:shouldReceive\\(\\)\\.$#" + count: 31 + path: tests/Unit/NginxTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\SiteSecure\\:\\:shouldReceive\\(\\)\\.$#" + count: 1 + path: tests/Unit/NginxTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\CommandLine\\:\\:shouldReceive\\(\\)\\.$#" + count: 1 + path: tests/Unit/NgrokTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\Filesystem\\:\\:shouldNotReceive\\(\\)\\.$#" + count: 3 + path: tests/Unit/NgrokTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\Filesystem\\:\\:shouldReceive\\(\\)\\.$#" + count: 5 + path: tests/Unit/NgrokTest.php + + - + message: "#^Call to an undefined static method Valet\\\\Facades\\\\Filesystem\\:\\:ensureDirExists\\(\\)\\.$#" + count: 1 + path: tests/Unit/NgrokTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\Builder\\\\InvocationMocker\\:\\:once\\(\\)\\.$#" + count: 2 + path: tests/Unit/PhpFpmTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\CommandLine\\:\\:shouldReceive\\(\\)\\.$#" + count: 1 + path: tests/Unit/PhpFpmTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\Configuration\\:\\:shouldReceive\\(\\)\\.$#" + count: 3 + path: tests/Unit/PhpFpmTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\Contracts\\\\PackageManager\\:\\:shouldReceive\\(\\)\\.$#" + count: 15 + path: tests/Unit/PhpFpmTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\Contracts\\\\ServiceManager\\:\\:expects\\(\\)\\.$#" + count: 2 + path: tests/Unit/PhpFpmTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\Contracts\\\\ServiceManager\\:\\:shouldReceive\\(\\)\\.$#" + count: 10 + path: tests/Unit/PhpFpmTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\Filesystem\\:\\:shouldReceive\\(\\)\\.$#" + count: 13 + path: tests/Unit/PhpFpmTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\Nginx\\:\\:shouldReceive\\(\\)\\.$#" + count: 3 + path: tests/Unit/PhpFpmTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Unit\\\\PhpFpmTest\\:\\:deprecatedVersionDataProvider\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Unit/PhpFpmTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Unit\\\\PhpFpmTest\\:\\:executableVersionProvider\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Unit/PhpFpmTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Unit\\\\PhpFpmTest\\:\\:invalidVersionProvider\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Unit/PhpFpmTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Unit\\\\PhpFpmTest\\:\\:socketFileVersionProvider\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Unit/PhpFpmTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Unit\\\\PhpFpmTest\\:\\:versionDataProvider\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Unit/PhpFpmTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Unit\\\\PhpFpmTest\\:\\:versionProvider\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Unit/PhpFpmTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\CommandLine\\:\\:shouldNotReceive\\(\\)\\.$#" + count: 1 + path: tests/Unit/RequirementsTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\CommandLine\\:\\:shouldReceive\\(\\)\\.$#" + count: 2 + path: tests/Unit/RequirementsTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\Configuration\\:\\:shouldReceive\\(\\)\\.$#" + count: 6 + path: tests/Unit/SiteIsolateTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\Contracts\\\\PackageManager\\:\\:shouldReceive\\(\\)\\.$#" + count: 2 + path: tests/Unit/SiteIsolateTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\Filesystem\\:\\:shouldReceive\\(\\)\\.$#" + count: 14 + path: tests/Unit/SiteIsolateTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\Site\\:\\:shouldReceive\\(\\)\\.$#" + count: 2 + path: tests/Unit/SiteIsolateTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\SiteSecure\\:\\:shouldReceive\\(\\)\\.$#" + count: 3 + path: tests/Unit/SiteIsolateTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\Configuration\\:\\:shouldReceive\\(\\)\\.$#" + count: 4 + path: tests/Unit/SiteLinkTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\Filesystem\\:\\:shouldNotReceive\\(\\)\\.$#" + count: 1 + path: tests/Unit/SiteLinkTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\Filesystem\\:\\:shouldReceive\\(\\)\\.$#" + count: 8 + path: tests/Unit/SiteLinkTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\SiteSecure\\:\\:shouldReceive\\(\\)\\.$#" + count: 1 + path: tests/Unit/SiteLinkTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\Configuration\\:\\:shouldReceive\\(\\)\\.$#" + count: 2 + path: tests/Unit/SiteProxyTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\Filesystem\\:\\:shouldReceive\\(\\)\\.$#" + count: 5 + path: tests/Unit/SiteProxyTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\SiteSecure\\:\\:shouldReceive\\(\\)\\.$#" + count: 2 + path: tests/Unit/SiteProxyTest.php + + - + message: "#^Call to an undefined method Mockery\\\\MockInterface\\|Valet\\\\CommandLine\\:\\:shouldReceive\\(\\)\\.$#" + count: 9 + path: tests/Unit/SiteSecureTest.php + + - + message: "#^Call to an undefined method Mockery\\\\MockInterface\\|Valet\\\\Configuration\\:\\:shouldReceive\\(\\)\\.$#" + count: 4 + path: tests/Unit/SiteSecureTest.php + + - + message: "#^Call to an undefined method Mockery\\\\MockInterface\\|Valet\\\\Filesystem\\:\\:shouldReceive\\(\\)\\.$#" + count: 22 + path: tests/Unit/SiteSecureTest.php + + - + message: "#^Parameter \\#4 \\$pm of class Valet\\\\SiteSecure constructor expects Valet\\\\Contracts\\\\PackageManager, mixed given\\.$#" + count: 1 + path: tests/Unit/SiteSecureTest.php + + - + message: "#^Property Unit\\\\SiteSecureTest\\:\\:\\$pm \\(Valet\\\\Contracts\\\\PackageManager\\) does not accept mixed\\.$#" + count: 1 + path: tests/Unit/SiteSecureTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\Configuration\\:\\:shouldReceive\\(\\)\\.$#" + count: 3 + path: tests/Unit/SiteTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\Filesystem\\:\\:shouldReceive\\(\\)\\.$#" + count: 12 + path: tests/Unit/SiteTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\Contracts\\\\PackageManager\\:\\:shouldReceive\\(\\)\\.$#" + count: 7 + path: tests/Unit/ValetRedisTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\Contracts\\\\ServiceManager\\:\\:shouldReceive\\(\\)\\.$#" + count: 4 + path: tests/Unit/ValetRedisTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\CommandLine\\:\\:shouldReceive\\(\\)\\.$#" + count: 2 + path: tests/Unit/ValetTest.php + + - + message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\Filesystem\\:\\:shouldReceive\\(\\)\\.$#" + count: 6 + path: tests/Unit/ValetTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Unit\\\\ValetTest\\:\\:versionDataProvider\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Unit/ValetTest.php diff --git a/phpstan.neon b/phpstan.neon index 4ed4682..6031de2 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,3 +1,7 @@ +includes: + - vendor/phpstan/phpstan-mockery/extension.neon + - phpstan-baseline.neon + parameters: level: 9 paths: From 51dced6e3f87c232fbe509f3e6818342a199c17d Mon Sep 17 00:00:00 2001 From: Michael Sanders Date: Thu, 1 Oct 2026 11:57:39 +0200 Subject: [PATCH 2/3] Port framework-driver test suite from upstream laravel/valet The fork had zero driver tests. Adopt upstream's suite (platform-agnostic, same Valet\Drivers namespace): - Add tests/Drivers/ (BaseDriverTestCase + 23 driver tests) and the tests/Drivers/projects + tests/files fixtures. Base case namespaced Valet\Tests\Drivers, extends PHPUnit TestCase directly (no container boot), setUp() instead of the Yoast polyfill's set_up(), projects provider via plain scandir(). - Add NetteValetDriver (upstream drop-in) so the driver set matches upstream; auto-discovered by the specific-driver path scan. - Two ContaoValetDriverTest methods are marked skipped: the fork still ships the legacy Contao 3/4 driver while the upstream fixture is modern Contao; re-enable after modernizing the driver (.review U6). - Refresh phpstan-baseline.neon to absorb the new test files' level-9 errors (burn-down backlog); analysis stays green. Full suite: 305 tests, 2 skipped. php-cs-fixer clean. --- .../Drivers/Specific/NetteValetDriver.php | 44 ++ phpstan-baseline.neon | 415 ++++++++++++++++++ tests/Drivers/BaseDriverTestCase.php | 36 ++ tests/Drivers/BasicValetDriverTest.php | 72 +++ .../BasicWithPublicValetDriverTest.php | 88 ++++ tests/Drivers/BedrockValetDriverTest.php | 30 ++ tests/Drivers/CakeValetDriverTest.php | 30 ++ tests/Drivers/Concrete5ValetDriverTest.php | 30 ++ tests/Drivers/ContaoValetDriverTest.php | 34 ++ tests/Drivers/CraftValetDriverTest.php | 30 ++ tests/Drivers/DrupalValetDriverTest.php | 30 ++ tests/Drivers/JigsawValetDriverTest.php | 29 ++ tests/Drivers/JoomlaValetDriverTest.php | 30 ++ tests/Drivers/KatanaValetDriverTest.php | 29 ++ tests/Drivers/KirbyValetDriverTest.php | 30 ++ tests/Drivers/LaravelValetDriverTest.php | 30 ++ tests/Drivers/Magento2ValetDriverTest.php | 30 ++ tests/Drivers/NeosValetDriverTest.php | 30 ++ tests/Drivers/SculpinValetDriverTest.php | 29 ++ tests/Drivers/StatamicV1ValetDriverTest.php | 30 ++ tests/Drivers/StatamicV2ValetDriverTest.php | 33 ++ tests/Drivers/StatamicValetDriverTest.php | 50 +++ tests/Drivers/SymfonyValetDriverTest.php | 30 ++ tests/Drivers/Typo3ValetDriverTest.php | 30 ++ tests/Drivers/ValetDriverTest.php | 50 +++ tests/Drivers/WordPressValetDriverTest.php | 30 ++ .../projects/basic-no-public/about/index.php | 0 .../basic-no-public/assets/document.txt | 0 .../projects/basic-no-public/file-in-root.php | 0 .../projects/basic-no-public/index.php | 0 .../projects/basic-no-public/team/index.html | 0 .../projects/bedrock/config/application.php | 0 .../Drivers/projects/bedrock/web/app/.gitkeep | 0 tests/Drivers/projects/bedrock/web/index.php | 0 .../projects/bedrock/web/wp-config.php | 0 tests/Drivers/projects/cake/webroot/index.php | 0 .../concrete5/concrete/config/install/base | 0 .../Drivers/projects/contao/public/index.php | 0 tests/Drivers/projects/craft/craft | 0 tests/Drivers/projects/craft/public/index.php | 0 .../projects/drupal/public/misc/drupal.js | 0 .../projects/jigsaw/build_local/.gitkeep | 0 tests/Drivers/projects/joomla/index.php | 0 .../projects/joomla/libraries/joomla/.gitkeep | 0 tests/Drivers/projects/katana/katana | 0 tests/Drivers/projects/kirby/index.php | 0 tests/Drivers/projects/kirby/kirby/.gitkeep | 0 tests/Drivers/projects/laravel/artisan | 0 .../Drivers/projects/laravel/public/index.php | 0 tests/Drivers/projects/magento2/pub/index.php | 0 tests/Drivers/projects/neos/Web/.gitkeep | 0 tests/Drivers/projects/neos/flow | 0 .../file-in-root.php | 0 .../public/about/index.php | 0 .../public/assets/document.txt | 0 .../public/file-in-public.php | 0 .../public/index.php | 0 .../public/team/index.html | 0 tests/Drivers/projects/sculpin/composer.json | 5 + .../projects/sculpin/output_dev/.gitkeep | 0 .../Drivers/projects/sculpin/source/.gitkeep | 0 tests/Drivers/projects/statamic/artisan | 0 tests/Drivers/projects/statamic/please | 0 .../projects/statamic/public/index.php | 0 .../statamic/public/static/test_.html | 0 .../public/static/test_foo=bar&baz=qux.html | 0 .../statamicv1/_app/core/statamic.php | 0 tests/Drivers/projects/statamicv1/index.php | 0 tests/Drivers/projects/statamicv2/index.php | 0 .../projects/statamicv2/statamic/.gitkeep | 0 .../Drivers/projects/symfony/public/index.php | 0 tests/Drivers/projects/symfony/src/Kernel.php | 0 tests/Drivers/projects/symfony/web/app.php | 0 .../Drivers/projects/typo3/web/typo3/.gitkeep | 0 tests/Drivers/projects/wordpress/index.php | 0 .../Drivers/projects/wordpress/wp-config.php | 0 tests/files/Drivers/Test1ValetDriver.php | 0 tests/files/Drivers/Test2ValetDriver.php | 0 tests/files/dnsmasq.conf | 1 + tests/files/fpm.conf | 7 + tests/files/php-memory-limits.ini | 8 + tests/files/sites/has-composer/composer.json | 5 + tests/files/sites/tighten/.gitkeep | 0 83 files changed, 1355 insertions(+) create mode 100644 cli/Valet/Drivers/Specific/NetteValetDriver.php create mode 100644 tests/Drivers/BaseDriverTestCase.php create mode 100644 tests/Drivers/BasicValetDriverTest.php create mode 100644 tests/Drivers/BasicWithPublicValetDriverTest.php create mode 100644 tests/Drivers/BedrockValetDriverTest.php create mode 100644 tests/Drivers/CakeValetDriverTest.php create mode 100644 tests/Drivers/Concrete5ValetDriverTest.php create mode 100644 tests/Drivers/ContaoValetDriverTest.php create mode 100644 tests/Drivers/CraftValetDriverTest.php create mode 100644 tests/Drivers/DrupalValetDriverTest.php create mode 100644 tests/Drivers/JigsawValetDriverTest.php create mode 100644 tests/Drivers/JoomlaValetDriverTest.php create mode 100644 tests/Drivers/KatanaValetDriverTest.php create mode 100644 tests/Drivers/KirbyValetDriverTest.php create mode 100644 tests/Drivers/LaravelValetDriverTest.php create mode 100644 tests/Drivers/Magento2ValetDriverTest.php create mode 100644 tests/Drivers/NeosValetDriverTest.php create mode 100644 tests/Drivers/SculpinValetDriverTest.php create mode 100644 tests/Drivers/StatamicV1ValetDriverTest.php create mode 100644 tests/Drivers/StatamicV2ValetDriverTest.php create mode 100644 tests/Drivers/StatamicValetDriverTest.php create mode 100644 tests/Drivers/SymfonyValetDriverTest.php create mode 100644 tests/Drivers/Typo3ValetDriverTest.php create mode 100644 tests/Drivers/ValetDriverTest.php create mode 100644 tests/Drivers/WordPressValetDriverTest.php create mode 100644 tests/Drivers/projects/basic-no-public/about/index.php create mode 100644 tests/Drivers/projects/basic-no-public/assets/document.txt create mode 100644 tests/Drivers/projects/basic-no-public/file-in-root.php create mode 100644 tests/Drivers/projects/basic-no-public/index.php create mode 100644 tests/Drivers/projects/basic-no-public/team/index.html create mode 100644 tests/Drivers/projects/bedrock/config/application.php create mode 100644 tests/Drivers/projects/bedrock/web/app/.gitkeep create mode 100644 tests/Drivers/projects/bedrock/web/index.php create mode 100644 tests/Drivers/projects/bedrock/web/wp-config.php create mode 100644 tests/Drivers/projects/cake/webroot/index.php create mode 100644 tests/Drivers/projects/concrete5/concrete/config/install/base create mode 100644 tests/Drivers/projects/contao/public/index.php create mode 100644 tests/Drivers/projects/craft/craft create mode 100644 tests/Drivers/projects/craft/public/index.php create mode 100644 tests/Drivers/projects/drupal/public/misc/drupal.js create mode 100644 tests/Drivers/projects/jigsaw/build_local/.gitkeep create mode 100644 tests/Drivers/projects/joomla/index.php create mode 100644 tests/Drivers/projects/joomla/libraries/joomla/.gitkeep create mode 100644 tests/Drivers/projects/katana/katana create mode 100644 tests/Drivers/projects/kirby/index.php create mode 100644 tests/Drivers/projects/kirby/kirby/.gitkeep create mode 100644 tests/Drivers/projects/laravel/artisan create mode 100644 tests/Drivers/projects/laravel/public/index.php create mode 100644 tests/Drivers/projects/magento2/pub/index.php create mode 100644 tests/Drivers/projects/neos/Web/.gitkeep create mode 100644 tests/Drivers/projects/neos/flow create mode 100644 tests/Drivers/projects/public-with-index-non-laravel/file-in-root.php create mode 100644 tests/Drivers/projects/public-with-index-non-laravel/public/about/index.php create mode 100644 tests/Drivers/projects/public-with-index-non-laravel/public/assets/document.txt create mode 100644 tests/Drivers/projects/public-with-index-non-laravel/public/file-in-public.php create mode 100644 tests/Drivers/projects/public-with-index-non-laravel/public/index.php create mode 100644 tests/Drivers/projects/public-with-index-non-laravel/public/team/index.html create mode 100644 tests/Drivers/projects/sculpin/composer.json create mode 100644 tests/Drivers/projects/sculpin/output_dev/.gitkeep create mode 100644 tests/Drivers/projects/sculpin/source/.gitkeep create mode 100644 tests/Drivers/projects/statamic/artisan create mode 100644 tests/Drivers/projects/statamic/please create mode 100644 tests/Drivers/projects/statamic/public/index.php create mode 100644 tests/Drivers/projects/statamic/public/static/test_.html create mode 100644 tests/Drivers/projects/statamic/public/static/test_foo=bar&baz=qux.html create mode 100644 tests/Drivers/projects/statamicv1/_app/core/statamic.php create mode 100644 tests/Drivers/projects/statamicv1/index.php create mode 100644 tests/Drivers/projects/statamicv2/index.php create mode 100644 tests/Drivers/projects/statamicv2/statamic/.gitkeep create mode 100644 tests/Drivers/projects/symfony/public/index.php create mode 100644 tests/Drivers/projects/symfony/src/Kernel.php create mode 100644 tests/Drivers/projects/symfony/web/app.php create mode 100644 tests/Drivers/projects/typo3/web/typo3/.gitkeep create mode 100644 tests/Drivers/projects/wordpress/index.php create mode 100644 tests/Drivers/projects/wordpress/wp-config.php create mode 100644 tests/files/Drivers/Test1ValetDriver.php create mode 100644 tests/files/Drivers/Test2ValetDriver.php create mode 100644 tests/files/dnsmasq.conf create mode 100644 tests/files/fpm.conf create mode 100644 tests/files/php-memory-limits.ini create mode 100644 tests/files/sites/has-composer/composer.json create mode 100644 tests/files/sites/tighten/.gitkeep diff --git a/cli/Valet/Drivers/Specific/NetteValetDriver.php b/cli/Valet/Drivers/Specific/NetteValetDriver.php new file mode 100644 index 0000000..b87b591 --- /dev/null +++ b/cli/Valet/Drivers/Specific/NetteValetDriver.php @@ -0,0 +1,44 @@ +isActualFile($staticFilePath = $sitePath.'/www/'.$uri)) { + return $staticFilePath; + } + + return false; + } + + /** + * Get the fully resolved path to the application's front controller. + */ + public function frontControllerPath(string $sitePath, string $siteName, string $uri): ?string + { + $_SERVER['DOCUMENT_ROOT'] = $sitePath.'/www'; + $_SERVER['SCRIPT_FILENAME'] = $sitePath.'/www/index.php'; + $_SERVER['SCRIPT_NAME'] = '/index.php'; + $_SERVER['PHP_SELF'] = '/index.php'; + + return $sitePath.'/www/index.php'; + } +} diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 7a23b58..d81664b 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -725,6 +725,421 @@ parameters: count: 2 path: tests/CliTest.php + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\BasicValetDriverTest\\:\\:test_it_routes_to_index_if_404\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/BasicValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\BasicValetDriverTest\\:\\:test_it_serves_anything\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/BasicValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\BasicValetDriverTest\\:\\:test_it_serves_directory_with_index_html\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/BasicValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\BasicValetDriverTest\\:\\:test_it_serves_directory_with_index_php\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/BasicValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\BasicValetDriverTest\\:\\:test_it_serves_php_files_from_root\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/BasicValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\BasicValetDriverTest\\:\\:test_it_serves_static_files\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/BasicValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\BasicWithPublicValetDriverTest\\:\\:test_it_doesnt_serve_from_not_public\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/BasicWithPublicValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\BasicWithPublicValetDriverTest\\:\\:test_it_doesnt_serve_php_files_from_root\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/BasicWithPublicValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\BasicWithPublicValetDriverTest\\:\\:test_it_route_to_public_index_if_404\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/BasicWithPublicValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\BasicWithPublicValetDriverTest\\:\\:test_it_serves_anything_with_public\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/BasicWithPublicValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\BasicWithPublicValetDriverTest\\:\\:test_it_serves_directory_with_index_html\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/BasicWithPublicValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\BasicWithPublicValetDriverTest\\:\\:test_it_serves_directory_with_index_php\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/BasicWithPublicValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\BasicWithPublicValetDriverTest\\:\\:test_it_serves_php_files_from_public\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/BasicWithPublicValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\BasicWithPublicValetDriverTest\\:\\:test_it_serves_static_files\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/BasicWithPublicValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\BedrockValetDriverTest\\:\\:test_it_doesnt_serve_non_bedrock_projects\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/BedrockValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\BedrockValetDriverTest\\:\\:test_it_gets_front_controller\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/BedrockValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\BedrockValetDriverTest\\:\\:test_it_serves_bedrock_projects\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/BedrockValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\CakeValetDriverTest\\:\\:test_it_doesnt_serve_non_cake_projects\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/CakeValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\CakeValetDriverTest\\:\\:test_it_gets_front_controller\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/CakeValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\CakeValetDriverTest\\:\\:test_it_serves_cake_projects\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/CakeValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\Concrete5ValetDriverTest\\:\\:test_it_doesnt_serve_non_concrete5_projects\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/Concrete5ValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\Concrete5ValetDriverTest\\:\\:test_it_gets_front_controller\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/Concrete5ValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\Concrete5ValetDriverTest\\:\\:test_it_serves_concrete5_projects\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/Concrete5ValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\ContaoValetDriverTest\\:\\:test_it_doesnt_serve_non_contao_projects\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/ContaoValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\ContaoValetDriverTest\\:\\:test_it_gets_front_controller\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/ContaoValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\ContaoValetDriverTest\\:\\:test_it_serves_contao_projects\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/ContaoValetDriverTest.php + + - + message: "#^Unreachable statement \\- code above always terminates\\.$#" + count: 2 + path: tests/Drivers/ContaoValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\CraftValetDriverTest\\:\\:test_it_doesnt_serve_non_craft_projects\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/CraftValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\CraftValetDriverTest\\:\\:test_it_gets_front_controller\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/CraftValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\CraftValetDriverTest\\:\\:test_it_serves_craft_projects\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/CraftValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\DrupalValetDriverTest\\:\\:test_it_doesnt_serve_non_drupal_projects\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/DrupalValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\DrupalValetDriverTest\\:\\:test_it_gets_front_controller\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/DrupalValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\DrupalValetDriverTest\\:\\:test_it_serves_drupal_projects\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/DrupalValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\JigsawValetDriverTest\\:\\:test_it_doesnt_serve_non_jigsaw_projects_with_public_directory\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/JigsawValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\JigsawValetDriverTest\\:\\:test_it_mutates_uri\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/JigsawValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\JigsawValetDriverTest\\:\\:test_it_serves_jigsaw_projects\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/JigsawValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\JoomlaValetDriverTest\\:\\:test_it_doesnt_serve_non_joomla_projects_with_public_directory\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/JoomlaValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\JoomlaValetDriverTest\\:\\:test_it_gets_front_controller\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/JoomlaValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\JoomlaValetDriverTest\\:\\:test_it_serves_joomla_projects\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/JoomlaValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\KatanaValetDriverTest\\:\\:test_it_doesnt_serve_non_katana_projects_with_public_directory\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/KatanaValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\KatanaValetDriverTest\\:\\:test_it_mutates_uri\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/KatanaValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\KatanaValetDriverTest\\:\\:test_it_serves_katana_projects\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/KatanaValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\KirbyValetDriverTest\\:\\:test_it_doesnt_serve_non_kirby_projects_with_public_directory\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/KirbyValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\KirbyValetDriverTest\\:\\:test_it_gets_front_controller\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/KirbyValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\KirbyValetDriverTest\\:\\:test_it_serves_kirby_projects\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/KirbyValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\LaravelValetDriverTest\\:\\:test_it_doesnt_serve_non_laravel_projects_with_public_directory\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/LaravelValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\LaravelValetDriverTest\\:\\:test_it_gets_front_controller\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/LaravelValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\LaravelValetDriverTest\\:\\:test_it_serves_laravel_projects\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/LaravelValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\Magento2ValetDriverTest\\:\\:test_it_doesnt_serve_non_magento2_projects_with_public_directory\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/Magento2ValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\Magento2ValetDriverTest\\:\\:test_it_gets_front_controller\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/Magento2ValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\Magento2ValetDriverTest\\:\\:test_it_serves_magento2_projects\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/Magento2ValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\NeosValetDriverTest\\:\\:test_it_doesnt_serve_non_neos_projects_with_public_directory\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/NeosValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\NeosValetDriverTest\\:\\:test_it_gets_front_controller\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/NeosValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\NeosValetDriverTest\\:\\:test_it_serves_neos_projects\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/NeosValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\SculpinValetDriverTest\\:\\:test_it_doesnt_serve_non_sculpin_projects_with_public_directory\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/SculpinValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\SculpinValetDriverTest\\:\\:test_it_mutates_uri\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/SculpinValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\SculpinValetDriverTest\\:\\:test_it_serves_sculpin_projects\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/SculpinValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\StatamicV1ValetDriverTest\\:\\:test_it_doesnt_serve_non_statamicv1_projects\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/StatamicV1ValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\StatamicV1ValetDriverTest\\:\\:test_it_gets_front_controller\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/StatamicV1ValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\StatamicV1ValetDriverTest\\:\\:test_it_serves_statamicv1_projects\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/StatamicV1ValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\StatamicV2ValetDriverTest\\:\\:test_it_doesnt_serve_non_statamic_projects\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/StatamicV2ValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\StatamicV2ValetDriverTest\\:\\:test_it_gets_front_controller\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/StatamicV2ValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\StatamicV2ValetDriverTest\\:\\:test_it_serves_statamic_projects\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/StatamicV2ValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\StatamicValetDriverTest\\:\\:test_it_doesnt_serve_laravel_projects\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/StatamicValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\StatamicValetDriverTest\\:\\:test_it_doesnt_serve_non_statamic_projects_with_public_directory\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/StatamicValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\StatamicValetDriverTest\\:\\:test_it_gets_front_controller\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/StatamicValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\StatamicValetDriverTest\\:\\:test_it_serves_statamic_projects\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/StatamicValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\StatamicValetDriverTest\\:\\:test_it_serves_statically_cached_pages\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/StatamicValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\SymfonyValetDriverTest\\:\\:test_it_doesnt_serve_non_symfony_projects\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/SymfonyValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\SymfonyValetDriverTest\\:\\:test_it_gets_front_controller\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/SymfonyValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\SymfonyValetDriverTest\\:\\:test_it_serves_symfony_projects\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/SymfonyValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\Typo3ValetDriverTest\\:\\:test_it_doesnt_serve_non_typo3_projects\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/Typo3ValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\Typo3ValetDriverTest\\:\\:test_it_gets_front_controller\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/Typo3ValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\Typo3ValetDriverTest\\:\\:test_it_serves_typo3_projects\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/Typo3ValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\ValetDriverTest\\:\\:test_it_assigns_drivers_to_given_project\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/ValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\ValetDriverTest\\:\\:test_it_checks_composer_dependencies\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/ValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\ValetDriverTest\\:\\:test_it_gets_drivers_in_given_path\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/ValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\ValetDriverTest\\:\\:test_it_prioritizes_non_basic_matches\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/ValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\ValetDriverTest\\:\\:test_it_prioritizes_statamic\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/ValetDriverTest.php + + - + message: "#^Parameter \\#1 \\$object of function get_class expects object, Valet\\\\Drivers\\\\ValetDriver\\|null given\\.$#" + count: 5 + path: tests/Drivers/ValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\WordPressValetDriverTest\\:\\:test_it_doesnt_serve_non_wordpress_projects\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/WordPressValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\WordPressValetDriverTest\\:\\:test_it_gets_front_controller\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/WordPressValetDriverTest.php + + - + message: "#^Method Valet\\\\Tests\\\\Drivers\\\\WordPressValetDriverTest\\:\\:test_it_serves_wordpress_projects\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Drivers/WordPressValetDriverTest.php + - message: "#^Call to an undefined method PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\|Valet\\\\Filesystem\\:\\:shouldNotReceive\\(\\)\\.$#" count: 5 diff --git a/tests/Drivers/BaseDriverTestCase.php b/tests/Drivers/BaseDriverTestCase.php new file mode 100644 index 0000000..d4baece --- /dev/null +++ b/tests/Drivers/BaseDriverTestCase.php @@ -0,0 +1,36 @@ + + */ + public function projects(): array + { + $entries = scandir(__DIR__.'/projects') ?: []; + + return array_values(array_filter($entries, function ($file) { + return ! in_array($file, ['.', '..', '.keep', '.gitkeep', '.DS_Store'], true) + && is_dir(__DIR__.'/projects/'.$file); + })); + } + + public function projectDir(string $name): string + { + return __DIR__.'/projects/'.$name; + } +} diff --git a/tests/Drivers/BasicValetDriverTest.php b/tests/Drivers/BasicValetDriverTest.php new file mode 100644 index 0000000..ea963e1 --- /dev/null +++ b/tests/Drivers/BasicValetDriverTest.php @@ -0,0 +1,72 @@ +projects() as $projectDir) { + $this->assertTrue($driver->serves($projectDir, 'my-site', '/')); + } + } + + public function test_it_serves_php_files_from_root() + { + $projectPath = $this->projectDir('basic-no-public'); + $driver = new BasicValetDriver(); + + $this->assertEquals( + $projectPath.'/file-in-root.php', + $driver->frontControllerPath($projectPath, 'my-site', '/file-in-root.php') + ); + } + + public function test_it_serves_directory_with_index_php() + { + $projectPath = $this->projectDir('basic-no-public'); + $driver = new BasicValetDriver(); + + $this->assertEquals( + $projectPath.'/about/index.php', + $driver->frontControllerPath($projectPath, 'my-site', '/about') + ); + } + + public function test_it_routes_to_index_if_404() + { + $projectPath = $this->projectDir('basic-no-public'); + $driver = new BasicValetDriver(); + + $this->assertEquals( + $projectPath.'/index.php', + $driver->frontControllerPath($projectPath, 'my-site', '/not-a-real-url') + ); + } + + public function test_it_serves_directory_with_index_html() + { + $projectPath = $this->projectDir('basic-no-public'); + $driver = new BasicValetDriver(); + + $this->assertEquals( + $projectPath.'/team/index.html', + $driver->isStaticFile($projectPath, 'my-site', '/team') + ); + } + + public function test_it_serves_static_files() + { + $projectPath = $this->projectDir('basic-no-public'); + $driver = new BasicValetDriver(); + + $this->assertEquals( + $projectPath.'/assets/document.txt', + $driver->isStaticFile($projectPath, 'my-site', '/assets/document.txt') + ); + } +} diff --git a/tests/Drivers/BasicWithPublicValetDriverTest.php b/tests/Drivers/BasicWithPublicValetDriverTest.php new file mode 100644 index 0000000..ed24446 --- /dev/null +++ b/tests/Drivers/BasicWithPublicValetDriverTest.php @@ -0,0 +1,88 @@ +assertTrue($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/')); + } + + public function test_it_doesnt_serve_from_not_public() + { + $driver = new BasicWithPublicValetDriver(); + + $this->assertFalse($driver->serves($this->projectDir('basic-no-public'), 'my-site', '/')); + } + + public function test_it_serves_php_files_from_public() + { + $projectPath = $this->projectDir('public-with-index-non-laravel'); + $driver = new BasicWithPublicValetDriver(); + + $this->assertEquals( + $projectPath.'/public/file-in-public.php', + $driver->frontControllerPath($projectPath, 'my-site', '/file-in-public.php') + ); + } + + public function test_it_doesnt_serve_php_files_from_root() + { + $projectPath = $this->projectDir('public-with-index-non-laravel'); + $driver = new BasicWithPublicValetDriver(); + + $this->assertEquals( + $projectPath.'/public/index.php', + $driver->frontControllerPath($projectPath, 'my-site', '/file-in-root.php') + ); + } + + public function test_it_serves_directory_with_index_php() + { + $projectPath = $this->projectDir('public-with-index-non-laravel'); + $driver = new BasicWithPublicValetDriver(); + + $this->assertEquals( + $projectPath.'/public/about/index.php', + $driver->frontControllerPath($projectPath, 'my-site', '/about') + ); + } + + public function test_it_route_to_public_index_if_404() + { + $projectPath = $this->projectDir('public-with-index-non-laravel'); + $driver = new BasicWithPublicValetDriver(); + + $this->assertEquals( + $projectPath.'/public/index.php', + $driver->frontControllerPath($projectPath, 'my-site', '/not-a-real-url') + ); + } + + public function test_it_serves_directory_with_index_html() + { + $projectPath = $this->projectDir('public-with-index-non-laravel'); + $driver = new BasicWithPublicValetDriver(); + + $this->assertEquals( + $projectPath.'/public/team/index.html', + $driver->isStaticFile($projectPath, 'my-site', '/team') + ); + } + + public function test_it_serves_static_files() + { + $projectPath = $this->projectDir('public-with-index-non-laravel'); + $driver = new BasicWithPublicValetDriver(); + + $this->assertEquals( + $projectPath.'/public/assets/document.txt', + $driver->isStaticFile($projectPath, 'my-site', '/assets/document.txt') + ); + } +} diff --git a/tests/Drivers/BedrockValetDriverTest.php b/tests/Drivers/BedrockValetDriverTest.php new file mode 100644 index 0000000..364bb7f --- /dev/null +++ b/tests/Drivers/BedrockValetDriverTest.php @@ -0,0 +1,30 @@ +assertTrue($driver->serves($this->projectDir('bedrock'), 'my-site', '/')); + } + + public function test_it_doesnt_serve_non_bedrock_projects() + { + $driver = new BedrockValetDriver(); + + $this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/')); + } + + public function test_it_gets_front_controller() + { + $driver = new BedrockValetDriver(); + + $projectPath = $this->projectDir('bedrock'); + $this->assertEquals($projectPath.'/web/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/')); + } +} diff --git a/tests/Drivers/CakeValetDriverTest.php b/tests/Drivers/CakeValetDriverTest.php new file mode 100644 index 0000000..8850090 --- /dev/null +++ b/tests/Drivers/CakeValetDriverTest.php @@ -0,0 +1,30 @@ +assertTrue($driver->serves($this->projectDir('cake'), 'my-site', '/')); + } + + public function test_it_doesnt_serve_non_cake_projects() + { + $driver = new CakeValetDriver(); + + $this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/')); + } + + public function test_it_gets_front_controller() + { + $driver = new CakeValetDriver(); + + $projectPath = $this->projectDir('cake'); + $this->assertEquals($projectPath.'/webroot/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/')); + } +} diff --git a/tests/Drivers/Concrete5ValetDriverTest.php b/tests/Drivers/Concrete5ValetDriverTest.php new file mode 100644 index 0000000..7120ea7 --- /dev/null +++ b/tests/Drivers/Concrete5ValetDriverTest.php @@ -0,0 +1,30 @@ +assertTrue($driver->serves($this->projectDir('concrete5'), 'my-site', '/')); + } + + public function test_it_doesnt_serve_non_concrete5_projects() + { + $driver = new Concrete5ValetDriver(); + + $this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/')); + } + + public function test_it_gets_front_controller() + { + $driver = new Concrete5ValetDriver(); + + $projectPath = $this->projectDir('concrete5'); + $this->assertEquals($projectPath.'/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/')); + } +} diff --git a/tests/Drivers/ContaoValetDriverTest.php b/tests/Drivers/ContaoValetDriverTest.php new file mode 100644 index 0000000..14c5fdf --- /dev/null +++ b/tests/Drivers/ContaoValetDriverTest.php @@ -0,0 +1,34 @@ +markTestSkipped('Fork ships the legacy Contao 3/4 driver (expects vendor/contao + web/app.php); the upstream fixture is modern Contao 4.9+/5 (public/index.php). Re-enable after modernizing the fork driver (see .review U6).'); + + $driver = new ContaoValetDriver(); + + $this->assertTrue($driver->serves($this->projectDir('contao'), 'my-site', '/')); + } + + public function test_it_doesnt_serve_non_contao_projects() + { + $driver = new ContaoValetDriver(); + + $this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/')); + } + + public function test_it_gets_front_controller() + { + $this->markTestSkipped('Fork ships the legacy Contao 3/4 driver; its front controller is web/app.php, not the modern public/index.php. Re-enable after modernizing the fork driver (see .review U6).'); + + $driver = new ContaoValetDriver(); + + $projectPath = $this->projectDir('contao'); + $this->assertEquals($projectPath.'/public/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/')); + } +} diff --git a/tests/Drivers/CraftValetDriverTest.php b/tests/Drivers/CraftValetDriverTest.php new file mode 100644 index 0000000..528f5c6 --- /dev/null +++ b/tests/Drivers/CraftValetDriverTest.php @@ -0,0 +1,30 @@ +assertTrue($driver->serves($this->projectDir('craft'), 'my-site', '/')); + } + + public function test_it_doesnt_serve_non_craft_projects() + { + $driver = new CraftValetDriver(); + + $this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/')); + } + + public function test_it_gets_front_controller() + { + $driver = new CraftValetDriver(); + + $projectPath = $this->projectDir('craft'); + $this->assertEquals($projectPath.'/public/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/')); + } +} diff --git a/tests/Drivers/DrupalValetDriverTest.php b/tests/Drivers/DrupalValetDriverTest.php new file mode 100644 index 0000000..d9fb8d5 --- /dev/null +++ b/tests/Drivers/DrupalValetDriverTest.php @@ -0,0 +1,30 @@ +assertTrue($driver->serves($this->projectDir('drupal'), 'my-site', '/')); + } + + public function test_it_doesnt_serve_non_drupal_projects() + { + $driver = new DrupalValetDriver(); + + $this->assertFalse((bool) $driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/')); + } + + public function test_it_gets_front_controller() + { + $driver = new DrupalValetDriver(); + + $projectPath = $this->projectDir('drupal'); + $this->assertEquals($projectPath.'/public/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/')); + } +} diff --git a/tests/Drivers/JigsawValetDriverTest.php b/tests/Drivers/JigsawValetDriverTest.php new file mode 100644 index 0000000..693dea2 --- /dev/null +++ b/tests/Drivers/JigsawValetDriverTest.php @@ -0,0 +1,29 @@ +assertTrue($driver->serves($this->projectDir('jigsaw'), 'my-site', '/')); + } + + public function test_it_doesnt_serve_non_jigsaw_projects_with_public_directory() + { + $driver = new JigsawValetDriver(); + + $this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/')); + } + + public function test_it_mutates_uri() + { + $driver = new JigsawValetDriver(); + + $this->assertEquals('/build_local/about', $driver->mutateUri('/about')); + } +} diff --git a/tests/Drivers/JoomlaValetDriverTest.php b/tests/Drivers/JoomlaValetDriverTest.php new file mode 100644 index 0000000..eb947bd --- /dev/null +++ b/tests/Drivers/JoomlaValetDriverTest.php @@ -0,0 +1,30 @@ +assertTrue($driver->serves($this->projectDir('joomla'), 'my-site', '/')); + } + + public function test_it_doesnt_serve_non_joomla_projects_with_public_directory() + { + $driver = new JoomlaValetDriver(); + + $this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/')); + } + + public function test_it_gets_front_controller() + { + $driver = new JoomlaValetDriver(); + + $projectPath = $this->projectDir('joomla'); + $this->assertEquals($projectPath.'/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/')); + } +} diff --git a/tests/Drivers/KatanaValetDriverTest.php b/tests/Drivers/KatanaValetDriverTest.php new file mode 100644 index 0000000..e0cbb04 --- /dev/null +++ b/tests/Drivers/KatanaValetDriverTest.php @@ -0,0 +1,29 @@ +assertTrue($driver->serves($this->projectDir('katana'), 'my-site', '/')); + } + + public function test_it_doesnt_serve_non_katana_projects_with_public_directory() + { + $driver = new KatanaValetDriver(); + + $this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/')); + } + + public function test_it_mutates_uri() + { + $driver = new KatanaValetDriver(); + + $this->assertEquals('/public/about', $driver->mutateUri('/about')); + } +} diff --git a/tests/Drivers/KirbyValetDriverTest.php b/tests/Drivers/KirbyValetDriverTest.php new file mode 100644 index 0000000..4b08818 --- /dev/null +++ b/tests/Drivers/KirbyValetDriverTest.php @@ -0,0 +1,30 @@ +assertTrue($driver->serves($this->projectDir('kirby'), 'my-site', '/')); + } + + public function test_it_doesnt_serve_non_kirby_projects_with_public_directory() + { + $driver = new KirbyValetDriver(); + + $this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/')); + } + + public function test_it_gets_front_controller() + { + $driver = new KirbyValetDriver(); + + $projectPath = $this->projectDir('kirby'); + $this->assertEquals($projectPath.'/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/')); + } +} diff --git a/tests/Drivers/LaravelValetDriverTest.php b/tests/Drivers/LaravelValetDriverTest.php new file mode 100644 index 0000000..c49ac34 --- /dev/null +++ b/tests/Drivers/LaravelValetDriverTest.php @@ -0,0 +1,30 @@ +assertTrue($driver->serves($this->projectDir('laravel'), 'my-site', '/')); + } + + public function test_it_doesnt_serve_non_laravel_projects_with_public_directory() + { + $driver = new LaravelValetDriver(); + + $this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/')); + } + + public function test_it_gets_front_controller() + { + $driver = new LaravelValetDriver(); + + $projectPath = $this->projectDir('laravel'); + $this->assertEquals($projectPath.'/public/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/')); + } +} diff --git a/tests/Drivers/Magento2ValetDriverTest.php b/tests/Drivers/Magento2ValetDriverTest.php new file mode 100644 index 0000000..6c847e6 --- /dev/null +++ b/tests/Drivers/Magento2ValetDriverTest.php @@ -0,0 +1,30 @@ +assertTrue($driver->serves($this->projectDir('magento2'), 'my-site', '/')); + } + + public function test_it_doesnt_serve_non_magento2_projects_with_public_directory() + { + $driver = new Magento2ValetDriver(); + + $this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/')); + } + + public function test_it_gets_front_controller() + { + $driver = new Magento2ValetDriver(); + + $projectPath = $this->projectDir('magento2'); + $this->assertEquals($projectPath.'/pub/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/')); + } +} diff --git a/tests/Drivers/NeosValetDriverTest.php b/tests/Drivers/NeosValetDriverTest.php new file mode 100644 index 0000000..78b23e6 --- /dev/null +++ b/tests/Drivers/NeosValetDriverTest.php @@ -0,0 +1,30 @@ +assertTrue($driver->serves($this->projectDir('neos'), 'my-site', '/')); + } + + public function test_it_doesnt_serve_non_neos_projects_with_public_directory() + { + $driver = new NeosValetDriver(); + + $this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/')); + } + + public function test_it_gets_front_controller() + { + $driver = new NeosValetDriver(); + + $projectPath = $this->projectDir('neos'); + $this->assertEquals($projectPath.'/Web/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/')); + } +} diff --git a/tests/Drivers/SculpinValetDriverTest.php b/tests/Drivers/SculpinValetDriverTest.php new file mode 100644 index 0000000..216f2c1 --- /dev/null +++ b/tests/Drivers/SculpinValetDriverTest.php @@ -0,0 +1,29 @@ +assertTrue($driver->serves($this->projectDir('sculpin'), 'my-site', '/')); + } + + public function test_it_doesnt_serve_non_sculpin_projects_with_public_directory() + { + $driver = new SculpinValetDriver(); + + $this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/')); + } + + public function test_it_mutates_uri() + { + $driver = new SculpinValetDriver(); + + $this->assertEquals('/output_dev/about', $driver->mutateUri('/about')); + } +} diff --git a/tests/Drivers/StatamicV1ValetDriverTest.php b/tests/Drivers/StatamicV1ValetDriverTest.php new file mode 100644 index 0000000..b1a1cd3 --- /dev/null +++ b/tests/Drivers/StatamicV1ValetDriverTest.php @@ -0,0 +1,30 @@ +assertTrue($driver->serves($this->projectDir('statamicv1'), 'my-site', '/')); + } + + public function test_it_doesnt_serve_non_statamicv1_projects() + { + $driver = new StatamicV1ValetDriver(); + + $this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/')); + } + + public function test_it_gets_front_controller() + { + $driver = new StatamicV1ValetDriver(); + + $projectPath = $this->projectDir('statamicv1'); + $this->assertEquals($projectPath.'/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/')); + } +} diff --git a/tests/Drivers/StatamicV2ValetDriverTest.php b/tests/Drivers/StatamicV2ValetDriverTest.php new file mode 100644 index 0000000..5b37860 --- /dev/null +++ b/tests/Drivers/StatamicV2ValetDriverTest.php @@ -0,0 +1,33 @@ +assertTrue($driver->serves($this->projectDir('statamicv2'), 'my-site', '/')); + } + + public function test_it_doesnt_serve_non_statamic_projects() + { + $driver = new StatamicV2ValetDriver(); + + $this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/')); + } + + public function test_it_gets_front_controller() + { + $driver = new StatamicV2ValetDriver(); + + $_SERVER['REQUEST_METHOD'] = 'GET'; + $_SERVER['REQUEST_URI'] = '/about/'; + + $projectPath = $this->projectDir('statamicv2'); + $this->assertEquals($projectPath.'/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/')); + } +} diff --git a/tests/Drivers/StatamicValetDriverTest.php b/tests/Drivers/StatamicValetDriverTest.php new file mode 100644 index 0000000..aff6982 --- /dev/null +++ b/tests/Drivers/StatamicValetDriverTest.php @@ -0,0 +1,50 @@ +assertTrue($driver->serves($this->projectDir('statamic'), 'my-site', '/')); + } + + public function test_it_doesnt_serve_non_statamic_projects_with_public_directory() + { + $driver = new StatamicValetDriver(); + + $this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/')); + } + + public function test_it_doesnt_serve_laravel_projects() + { + $driver = new StatamicValetDriver(); + + $this->assertFalse($driver->serves($this->projectDir('laravel'), 'my-site', '/')); + } + + public function test_it_gets_front_controller() + { + $driver = new StatamicValetDriver(); + + $projectPath = $this->projectDir('statamic'); + $this->assertEquals($projectPath.'/public/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/')); + } + + public function test_it_serves_statically_cached_pages() + { + $driver = new StatamicValetDriver(); + + $projectPath = $this->projectDir('statamic'); + + $_SERVER['REQUEST_URI'] = '/test'; + $this->assertEquals($projectPath.'/public/static/test_.html', $driver->frontControllerPath($projectPath, 'my-site', '/test')); + + $_SERVER['REQUEST_URI'] = '/test?foo=bar&baz=qux'; + $this->assertEquals($projectPath.'/public/static/test_foo=bar&baz=qux.html', $driver->frontControllerPath($projectPath, 'my-site', '/test')); + } +} diff --git a/tests/Drivers/SymfonyValetDriverTest.php b/tests/Drivers/SymfonyValetDriverTest.php new file mode 100644 index 0000000..c544e62 --- /dev/null +++ b/tests/Drivers/SymfonyValetDriverTest.php @@ -0,0 +1,30 @@ +assertTrue($driver->serves($this->projectDir('symfony'), 'my-site', '/')); + } + + public function test_it_doesnt_serve_non_symfony_projects() + { + $driver = new SymfonyValetDriver(); + + $this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/')); + } + + public function test_it_gets_front_controller() + { + $driver = new SymfonyValetDriver(); + + $projectPath = $this->projectDir('symfony'); + $this->assertEquals($projectPath.'/web/app.php', $driver->frontControllerPath($projectPath, 'my-site', '/')); + } +} diff --git a/tests/Drivers/Typo3ValetDriverTest.php b/tests/Drivers/Typo3ValetDriverTest.php new file mode 100644 index 0000000..9b8ec98 --- /dev/null +++ b/tests/Drivers/Typo3ValetDriverTest.php @@ -0,0 +1,30 @@ +assertTrue($driver->serves($this->projectDir('typo3'), 'my-site', '/')); + } + + public function test_it_doesnt_serve_non_typo3_projects() + { + $driver = new Typo3ValetDriver(); + + $this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/')); + } + + public function test_it_gets_front_controller() + { + $driver = new Typo3ValetDriver(); + + $projectPath = $this->projectDir('typo3'); + $this->assertEquals($projectPath.'/web/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/')); + } +} diff --git a/tests/Drivers/ValetDriverTest.php b/tests/Drivers/ValetDriverTest.php new file mode 100644 index 0000000..9c7b864 --- /dev/null +++ b/tests/Drivers/ValetDriverTest.php @@ -0,0 +1,50 @@ +assertEquals(2, count($output)); + $this->assertContains('Test1ValetDriver', $output); + $this->assertContains('Test2ValetDriver', $output); + } + + public function test_it_assigns_drivers_to_given_project() + { + $assignedDriver = ValetDriver::assign($this->projectDir('bedrock'), 'my-site', '/'); + + $this->assertEquals(BedrockValetDriver::class, get_class($assignedDriver)); + } + + public function test_it_prioritizes_non_basic_matches() + { + $assignedDriver = ValetDriver::assign($this->projectDir('laravel'), 'my-site', '/'); + + $this->assertNotEquals('Valet\Drivers\BasicWithPublicValetDriver', get_class($assignedDriver)); + $this->assertNotEquals('Valet\Drivers\BasicValetDriver', get_class($assignedDriver)); + } + + public function test_it_prioritizes_statamic() + { + $assignedDriver = ValetDriver::assign($this->projectDir('statamic'), 'my-site', '/'); + $this->assertEquals('Valet\Drivers\Specific\StatamicValetDriver', get_class($assignedDriver)); + + $assignedDriver = ValetDriver::assign($this->projectDir('laravel'), 'my-site', '/'); + $this->assertEquals('Valet\Drivers\LaravelValetDriver', get_class($assignedDriver)); + } + + public function test_it_checks_composer_dependencies() + { + $driver = new BasicValetDriver(); + $this->assertTrue($driver->composerRequires(__DIR__.'/../files/sites/has-composer', 'tightenco/collect')); + $this->assertFalse($driver->composerRequires(__DIR__.'/../files/sites/has-composer', 'tightenco/ziggy')); + } +} diff --git a/tests/Drivers/WordPressValetDriverTest.php b/tests/Drivers/WordPressValetDriverTest.php new file mode 100644 index 0000000..4b55c69 --- /dev/null +++ b/tests/Drivers/WordPressValetDriverTest.php @@ -0,0 +1,30 @@ +assertTrue($driver->serves($this->projectDir('wordpress'), 'my-site', '/')); + } + + public function test_it_doesnt_serve_non_wordpress_projects() + { + $driver = new WordPressValetDriver(); + + $this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/')); + } + + public function test_it_gets_front_controller() + { + $driver = new WordPressValetDriver(); + + $projectPath = $this->projectDir('wordpress'); + $this->assertEquals($projectPath.'/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/')); + } +} diff --git a/tests/Drivers/projects/basic-no-public/about/index.php b/tests/Drivers/projects/basic-no-public/about/index.php new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/basic-no-public/assets/document.txt b/tests/Drivers/projects/basic-no-public/assets/document.txt new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/basic-no-public/file-in-root.php b/tests/Drivers/projects/basic-no-public/file-in-root.php new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/basic-no-public/index.php b/tests/Drivers/projects/basic-no-public/index.php new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/basic-no-public/team/index.html b/tests/Drivers/projects/basic-no-public/team/index.html new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/bedrock/config/application.php b/tests/Drivers/projects/bedrock/config/application.php new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/bedrock/web/app/.gitkeep b/tests/Drivers/projects/bedrock/web/app/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/bedrock/web/index.php b/tests/Drivers/projects/bedrock/web/index.php new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/bedrock/web/wp-config.php b/tests/Drivers/projects/bedrock/web/wp-config.php new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/cake/webroot/index.php b/tests/Drivers/projects/cake/webroot/index.php new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/concrete5/concrete/config/install/base b/tests/Drivers/projects/concrete5/concrete/config/install/base new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/contao/public/index.php b/tests/Drivers/projects/contao/public/index.php new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/craft/craft b/tests/Drivers/projects/craft/craft new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/craft/public/index.php b/tests/Drivers/projects/craft/public/index.php new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/drupal/public/misc/drupal.js b/tests/Drivers/projects/drupal/public/misc/drupal.js new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/jigsaw/build_local/.gitkeep b/tests/Drivers/projects/jigsaw/build_local/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/joomla/index.php b/tests/Drivers/projects/joomla/index.php new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/joomla/libraries/joomla/.gitkeep b/tests/Drivers/projects/joomla/libraries/joomla/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/katana/katana b/tests/Drivers/projects/katana/katana new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/kirby/index.php b/tests/Drivers/projects/kirby/index.php new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/kirby/kirby/.gitkeep b/tests/Drivers/projects/kirby/kirby/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/laravel/artisan b/tests/Drivers/projects/laravel/artisan new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/laravel/public/index.php b/tests/Drivers/projects/laravel/public/index.php new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/magento2/pub/index.php b/tests/Drivers/projects/magento2/pub/index.php new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/neos/Web/.gitkeep b/tests/Drivers/projects/neos/Web/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/neos/flow b/tests/Drivers/projects/neos/flow new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/public-with-index-non-laravel/file-in-root.php b/tests/Drivers/projects/public-with-index-non-laravel/file-in-root.php new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/public-with-index-non-laravel/public/about/index.php b/tests/Drivers/projects/public-with-index-non-laravel/public/about/index.php new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/public-with-index-non-laravel/public/assets/document.txt b/tests/Drivers/projects/public-with-index-non-laravel/public/assets/document.txt new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/public-with-index-non-laravel/public/file-in-public.php b/tests/Drivers/projects/public-with-index-non-laravel/public/file-in-public.php new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/public-with-index-non-laravel/public/index.php b/tests/Drivers/projects/public-with-index-non-laravel/public/index.php new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/public-with-index-non-laravel/public/team/index.html b/tests/Drivers/projects/public-with-index-non-laravel/public/team/index.html new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/sculpin/composer.json b/tests/Drivers/projects/sculpin/composer.json new file mode 100644 index 0000000..df2ca7a --- /dev/null +++ b/tests/Drivers/projects/sculpin/composer.json @@ -0,0 +1,5 @@ +{ + "require": { + "sculpin/sculpin": "1.0" + } +} diff --git a/tests/Drivers/projects/sculpin/output_dev/.gitkeep b/tests/Drivers/projects/sculpin/output_dev/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/sculpin/source/.gitkeep b/tests/Drivers/projects/sculpin/source/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/statamic/artisan b/tests/Drivers/projects/statamic/artisan new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/statamic/please b/tests/Drivers/projects/statamic/please new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/statamic/public/index.php b/tests/Drivers/projects/statamic/public/index.php new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/statamic/public/static/test_.html b/tests/Drivers/projects/statamic/public/static/test_.html new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/statamic/public/static/test_foo=bar&baz=qux.html b/tests/Drivers/projects/statamic/public/static/test_foo=bar&baz=qux.html new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/statamicv1/_app/core/statamic.php b/tests/Drivers/projects/statamicv1/_app/core/statamic.php new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/statamicv1/index.php b/tests/Drivers/projects/statamicv1/index.php new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/statamicv2/index.php b/tests/Drivers/projects/statamicv2/index.php new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/statamicv2/statamic/.gitkeep b/tests/Drivers/projects/statamicv2/statamic/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/symfony/public/index.php b/tests/Drivers/projects/symfony/public/index.php new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/symfony/src/Kernel.php b/tests/Drivers/projects/symfony/src/Kernel.php new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/symfony/web/app.php b/tests/Drivers/projects/symfony/web/app.php new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/typo3/web/typo3/.gitkeep b/tests/Drivers/projects/typo3/web/typo3/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/wordpress/index.php b/tests/Drivers/projects/wordpress/index.php new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/wordpress/wp-config.php b/tests/Drivers/projects/wordpress/wp-config.php new file mode 100644 index 0000000..e69de29 diff --git a/tests/files/Drivers/Test1ValetDriver.php b/tests/files/Drivers/Test1ValetDriver.php new file mode 100644 index 0000000..e69de29 diff --git a/tests/files/Drivers/Test2ValetDriver.php b/tests/files/Drivers/Test2ValetDriver.php new file mode 100644 index 0000000..e69de29 diff --git a/tests/files/dnsmasq.conf b/tests/files/dnsmasq.conf new file mode 100644 index 0000000..d22073c --- /dev/null +++ b/tests/files/dnsmasq.conf @@ -0,0 +1 @@ +test-contents diff --git a/tests/files/fpm.conf b/tests/files/fpm.conf new file mode 100644 index 0000000..0912902 --- /dev/null +++ b/tests/files/fpm.conf @@ -0,0 +1,7 @@ +Test contents + +user = something +group = something-else +listen = /potentially/some.socket + +more contents diff --git a/tests/files/php-memory-limits.ini b/tests/files/php-memory-limits.ini new file mode 100644 index 0000000..bd12ec0 --- /dev/null +++ b/tests/files/php-memory-limits.ini @@ -0,0 +1,8 @@ +; Max memory per instance +memory_limit = 128M + +;The maximum size of an uploaded file. +upload_max_filesize = 128M + +;Sets max size of post data allowed. This setting also affects file upload. To upload large files, this value must be larger than upload_max_filesize +post_max_size = 128M diff --git a/tests/files/sites/has-composer/composer.json b/tests/files/sites/has-composer/composer.json new file mode 100644 index 0000000..8c13f00 --- /dev/null +++ b/tests/files/sites/has-composer/composer.json @@ -0,0 +1,5 @@ +{ + "require": { + "tightenco/collect": "1.0.0" + } +} diff --git a/tests/files/sites/tighten/.gitkeep b/tests/files/sites/tighten/.gitkeep new file mode 100644 index 0000000..e69de29 From 13e19909ff1a0aab346080fe8c14f4ce65691257 Mon Sep 17 00:00:00 2001 From: Michael Sanders Date: Thu, 1 Oct 2026 14:06:14 +0200 Subject: [PATCH 3/3] Track driver test fixtures excluded by .gitignore The repo's .gitignore excludes bin/ and vendor/, which also matched three driver-suite fixtures, so they were never committed: - tests/Drivers/projects/cake/bin/cake - tests/Drivers/projects/magento2/bin/magento - tests/Drivers/projects/contao/vendor/contao/.gitkeep Force-add them so CakeValetDriverTest / Magento2ValetDriverTest (and the Contao test once modernized) see their fixtures on a fresh checkout. Caught by CI (passed locally only because the Docker mount included ignored files). --- tests/Drivers/projects/cake/bin/cake | 0 tests/Drivers/projects/contao/vendor/contao/.gitkeep | 0 tests/Drivers/projects/magento2/bin/magento | 0 3 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 tests/Drivers/projects/cake/bin/cake create mode 100644 tests/Drivers/projects/contao/vendor/contao/.gitkeep create mode 100644 tests/Drivers/projects/magento2/bin/magento diff --git a/tests/Drivers/projects/cake/bin/cake b/tests/Drivers/projects/cake/bin/cake new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/contao/vendor/contao/.gitkeep b/tests/Drivers/projects/contao/vendor/contao/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/tests/Drivers/projects/magento2/bin/magento b/tests/Drivers/projects/magento2/bin/magento new file mode 100644 index 0000000..e69de29