-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
244 changed files
with
8,734 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
[*.yaml] | ||
indent_size = 2 | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
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,7 @@ | ||
.editorconfig export-ignore | ||
.gitattributes export-ignore | ||
.gitignore export-ignore | ||
pint.json export-ignore | ||
phpstan.neon export-ignore | ||
phpunit.xml export-ignore | ||
tests export-ignore |
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,51 @@ | ||
name: Code Analysis | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
env: | ||
COMPOSER_ROOT_VERSION: "dev-main" | ||
|
||
jobs: | ||
code_analysis: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
actions: | ||
- | ||
name: 'Composer Validate' | ||
run: composer validate | ||
|
||
- | ||
name: 'Pint' | ||
run: composer pint-test | ||
|
||
- | ||
name: 'Rector Dry Run' | ||
run: composer rector-dry-run | ||
|
||
- | ||
name: 'PHPStan' | ||
run: composer phpstan | ||
|
||
- | ||
name: 'PHPUnit' | ||
run: composer phpunit | ||
|
||
name: ${{ matrix.actions.name }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.3 | ||
coverage: none | ||
|
||
- uses: ramsey/composer-install@v2 | ||
|
||
- run: ${{ matrix.actions.run }} |
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,4 @@ | ||
/vendor | ||
.idea/ | ||
.phpunit.result.cache | ||
.phpunit.cache |
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,26 @@ | ||
# Rector Rules for WordPress | ||
|
||
This package is a [Rector](https://github.com/rectorphp/rector) extension developed to provide upgrades rules for WordPress. | ||
|
||
## Install | ||
|
||
Install the `rector-wordpress` package as dependency: | ||
|
||
```bash | ||
composer require fsylum/rector-wordpress --dev | ||
``` | ||
|
||
## Use Sets | ||
|
||
To add a set to your config, use `Fsylum\RectorWordPress\Set\WordPressSetList` class and pick one of the constants: | ||
|
||
```php | ||
use Fsylum\RectorWordPress\Set\WordPressSetList; | ||
use Rector\Config\RectorConfig; | ||
|
||
return static function (RectorConfig $rectorConfig): void { | ||
$rectorConfig->sets([ | ||
WordPressSetList::WP_6_4 | ||
]); | ||
}; | ||
``` |
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,44 @@ | ||
{ | ||
"name": "fsylum/rector-wordpress", | ||
"description": "Rector upgrades rules for WordPress", | ||
"type": "rector-extension", | ||
"license": "MIT", | ||
"autoload": { | ||
"psr-4": { | ||
"Fsylum\\RectorWordPress\\": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Fsylum\\RectorWordPress\\Tests\\": "tests" | ||
} | ||
}, | ||
"minimum-stability": "dev", | ||
"prefer-stable": true, | ||
"require": { | ||
"php": ">=8.2", | ||
"rector/rector": "^0.19.2" | ||
}, | ||
"require-dev": { | ||
"phpunit/phpunit": "^10.5", | ||
"phpstan/phpstan": "^1.10", | ||
"laravel/pint": "^1.13", | ||
"phpstan/extension-installer": "^1.3", | ||
"phpstan/phpstan-webmozart-assert": "^1.2", | ||
"phpstan/phpstan-strict-rules": "^1.5", | ||
"webmozart/assert": "^1.11" | ||
}, | ||
"scripts": { | ||
"phpstan": "vendor/bin/phpstan analyse --ansi", | ||
"phpunit": "vendor/bin/phpunit tests", | ||
"pint-test": "vendor/bin/pint --test", | ||
"pint": "vendor/bin/pint", | ||
"rector-dry-run": "vendor/bin/rector process --dry-run --ansi", | ||
"rector": "vendor/bin/rector process --ansi" | ||
}, | ||
"config": { | ||
"allow-plugins": { | ||
"phpstan/extension-installer": true | ||
} | ||
} | ||
} |
Oops, something went wrong.