-
-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #640 from lucatume/35-base
3.5 base work
- Loading branch information
Showing
163 changed files
with
6,621 additions
and
772 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,3 +18,5 @@ | |
/todo.txt export-ignore | ||
/var export-ignore | ||
/vendor export-ignore | ||
|
||
*.php diff=php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
{ | ||
"name": "lucatume/wp-browser", | ||
"type": "library", | ||
"description": "A set of Codeception modules to test WordPress projects.", | ||
"keywords": [ | ||
"wordpress", | ||
"codeception" | ||
], | ||
"homepage": "https://github.com/lucatume/wp-browser", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "theAverageDev (Luca Tumedei)", | ||
"email": "luca@theaveragedev.com", | ||
"homepage": "https://theaveragedev.com", | ||
"role": "Developer" | ||
} | ||
], | ||
"minimum-stability": "dev", | ||
"prefer-stable": true, | ||
"require": { | ||
"php": ">=7.1 <8.0", | ||
"ext-pdo": "*", | ||
"ext-mysqli": "*", | ||
"ext-fileinfo": "*", | ||
"ext-json": "*", | ||
"ext-curl": "*", | ||
"ext-zip": "*", | ||
"composer-runtime-api": "^2.2", | ||
"codeception/codeception": "^4", | ||
"codeception/module-asserts": "^1.0", | ||
"codeception/module-phpbrowser": "^1.0", | ||
"codeception/module-webdriver": "^1.0", | ||
"codeception/module-db": "^1.0", | ||
"codeception/module-filesystem": "^1.0", | ||
"codeception/module-cli": "^1.0", | ||
"symfony/process": ">=3.4.47 <7.0", | ||
"symfony/filesystem": ">=3.4.47 <7.0", | ||
"vlucas/phpdotenv": "^4.3", | ||
"ifsnop/mysqldump-php": "^2.12" | ||
}, | ||
"require-dev": { | ||
"gumlet/php-image-resize": "^1.6", | ||
"szepeviktor/phpstan-wordpress": "^0.7", | ||
"phpstan/extension-installer": "^1.0", | ||
"phpstan/phpstan-symfony": "^0.12.44", | ||
"squizlabs/php_codesniffer": "^3.7", | ||
"lucatume/codeception-snapshot-assertions": "^0.4" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"lucatume\\WPBrowser\\": [ | ||
"src/", | ||
"src/Deprecated" | ||
], | ||
"Hautelook\\Phpass\\": "includes/Hautelook/Phpass", | ||
"lucatume\\WPBrowser\\Opis\\Closure\\" : "includes/opis/closure/src" | ||
}, | ||
"files": [ | ||
"src/version-4-aliases.php", | ||
"src/Deprecated/deprecated-functions.php", | ||
"src/functions.php", | ||
"src/shim.php" | ||
] | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"lucatume\\WPBrowser\\Tests\\": "tests/_support" | ||
} | ||
}, | ||
"extra": { | ||
"_hash": "484f861f69198089cab0e642f27e5653" | ||
}, | ||
"config": { | ||
"platform": { | ||
"php": "7.1" | ||
}, | ||
"allow-plugins": { | ||
"phpstan/extension-installer": true, | ||
"webdriver-binary/binary-chromedriver": true | ||
} | ||
}, | ||
"scripts": { | ||
"stan": [ | ||
"phpstan analyse --memory-limit=4G --no-progress --no-interaction --ansi -c config/phpstan.neon.dist" | ||
], | ||
"stan-pro": [ | ||
"phpstan analyse --memory-limit=4G --no-progress --no-interaction --ansi -c config/phpstan.neon.dist --pro --watch" | ||
], | ||
"cs": [ | ||
"phpcs --standard=config/phpcs.xml src" | ||
], | ||
"cs-fix": [ | ||
"phpcbf --standard=config/phpcs.xml src" | ||
] | ||
}, | ||
"suggest": { | ||
"ext-sqlite3": "For SQLite database support.", | ||
"ext-pdo_sqlite": "For SQLite database support." | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use Codeception\TestInterface; | ||
use lucatume\Rector\RemoveTypeHinting; | ||
use lucatume\Rector\SwapEventDispatcherEventNameParameters; | ||
use Rector\Config\RectorConfig; | ||
use Rector\DowngradePhp72\Rector\ClassMethod\DowngradeParameterTypeWideningRector; | ||
use Rector\Renaming\Rector\MethodCall\RenameMethodRector; | ||
use Rector\Renaming\Rector\Name\RenameClassRector; | ||
use Rector\Renaming\Rector\PropertyFetch\RenamePropertyRector; | ||
use Rector\Renaming\ValueObject\MethodCallRename; | ||
use Rector\Renaming\ValueObject\RenameProperty; | ||
use Rector\Set\ValueObject\DowngradeLevelSetList; | ||
use Rector\TypeDeclaration\Rector\ClassMethod\ArrayShapeFromConstantArrayReturnRector; | ||
use Rector\TypeDeclaration\Rector\Closure\AddClosureReturnTypeRector; | ||
|
||
return static function (RectorConfig $rectorConfig): void { | ||
$rectorConfig->paths([ | ||
dirname(__DIR__) . '/includes', | ||
dirname(__DIR__) . '/src', | ||
dirname(__DIR__) . '/tests', | ||
]); | ||
|
||
$rectorConfig->ruleWithConfiguration(RenameClassRector::class, [ | ||
'Symfony\Contracts\EventDispatcher\Event' => 'Symfony\Component\EventDispatcher\Event', | ||
'Psr\EventDispatcher\EventDispatcherInterface' => 'Symfony\Component\EventDispatcher\EventDispatcherInterface' | ||
]); | ||
$rectorConfig->ruleWithConfiguration(RenamePropertyRector::class, [ | ||
new RenameProperty( | ||
'lucatume\WPBrowser\TestCase\WPTestCase', | ||
'backupStaticAttributesExcludeList', | ||
'backupStaticAttributesBlacklist' | ||
), | ||
new RenameProperty( | ||
'lucatume\WPBrowser\TestCase\WPTestCase', | ||
'backupGlobalsExcludeList', | ||
'backupGlobalsBlacklist' | ||
) | ||
]); | ||
$rectorConfig->ruleWithConfiguration(RenameMethodRector::class, [ | ||
new MethodCallRename('PHPUnit\Framework\Assert', 'assertMatchesRegularExpression', 'assertRegExp'), | ||
new MethodCallRename('PHPUnit\Framework\Assert', 'assertDoesNotMatchRegularExpression', 'assertNotRegExp'), | ||
new MethodCallRename('PHPUnit\Framework\Assert', 'assertFileDoesNotExist', 'assertFileNotExists') | ||
]); | ||
|
||
$rectorConfig->rule(SwapEventDispatcherEventNameParameters::class); | ||
|
||
$rectorConfig->sets([DowngradeLevelSetList::DOWN_TO_PHP_71]); | ||
$rectorConfig->skip([DowngradeParameterTypeWideningRector::class]); | ||
|
||
$rectorConfig->ruleWithConfiguration(RemoveTypeHinting::class, [ | ||
'lucatume\WPBrowser\Module\WPDb' => [ | ||
'_cleanup' => [ | ||
// from: public function _cleanup(string $databaseKey = null, array $databaseConfig = null): void | ||
// to: public function _cleanup($databaseKey = null, $databaseConfig = null) | ||
RemoveTypeHinting::REMOVE_ALL => true | ||
], | ||
'_loadDump' => [ | ||
// from: public function _loadDump(string $databaseKey = null, array $databaseConfig = null): void | ||
// public function _loadDump($databaseKey = null, $databaseConfig = null) | ||
RemoveTypeHinting::REMOVE_ALL => true | ||
], | ||
'loadDumpUsingDriver' => [ | ||
// from: protected function loadDumpUsingDriver(string $databaseKey): void | ||
// to: protected function loadDumpUsingDriver($databaseKey) | ||
RemoveTypeHinting::REMOVE_ALL => true | ||
] | ||
], | ||
'lucatume\WPBrowser\Module\WPFilesystem' => [ | ||
// from: public function _failed(TestInterface $test, Exception $fail): void | ||
// to: public function _failed(TestInterface $test, Exception $fail) | ||
'_failed' => [ | ||
RemoveTypeHinting::REMOVE_RETURN_TYPE_HINTING => true, | ||
RemoveTypeHinting::REMOVE_PARAM_TYPE_HINTING => ['fail'] | ||
], | ||
// from: public function assertDirectoryExists(string $directory, string $message = ''): void | ||
// to: protected function assertDirectoryExists($directory, $message = '') | ||
'assertDirectoryExists' => [ | ||
RemoveTypeHinting::REMOVE_ALL => true | ||
] | ||
] | ||
]); | ||
}; |
Oops, something went wrong.