Skip to content

Commit

Permalink
Fix: Remove rector/rector
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Nov 22, 2024
1 parent e97da99 commit a6cda12
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 177 deletions.
12 changes: 0 additions & 12 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,6 @@ make dependency-analysis

to run a dependency analysis.

## Refactoring

We use [`rector/rector`](https://github.com/rectorphp/rector) to automatically refactor code.

Run

```sh
make refactoring
```

to automatically refactor code.

## Security Analysis

We use [`composer`](https://github.com/composer/composer) to run a security analysis.
Expand Down
1 change: 0 additions & 1 deletion .github/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ branches:
- context: "Code Coverage (8.1, locked)"
- context: "Coding Standards (8.1, locked)"
- context: "Dependency Analysis (8.1, locked)"
- context: "Refactoring (8.1, locked)"
- context: "Security Analysis (8.1, locked)"
- context: "Static Code Analysis (8.1, locked)"
- context: "Tests (8.1, highest)"
Expand Down
59 changes: 0 additions & 59 deletions .github/workflows/integrate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -198,65 +198,6 @@ jobs:
- name: "Run maglnet/composer-require-checker"
run: ".phive/composer-require-checker check --ansi --config-file=$(pwd)/composer-require-checker.json --verbose"

refactoring:
name: "Refactoring"

runs-on: "ubuntu-latest"

timeout-minutes: 5

strategy:
matrix:
php-version:
- "8.1"

dependencies:
- "locked"

steps:
- name: "Checkout"
uses: "actions/[email protected]"

- name: "Set up PHP"
uses: "shivammathur/[email protected]"
with:
coverage: "none"
extensions: "none, ctype, curl, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter"
php-version: "${{ matrix.php-version }}"

- name: "Set up problem matchers for PHP"
run: "echo \"::add-matcher::${{ runner.tool_cache }}/php.json\""

- name: "Validate composer.json and composer.lock"
run: "composer validate --ansi --strict"

- name: "Determine composer cache directory"
uses: "ergebnis/.github/actions/composer/[email protected]"

- name: "Cache dependencies installed with composer"
uses: "actions/[email protected]"
with:
path: "${{ env.COMPOSER_CACHE_DIR }}"
key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}"
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"

- name: "Install ${{ matrix.dependencies }} dependencies with composer"
uses: "ergebnis/.github/actions/composer/[email protected]"
with:
dependencies: "${{ matrix.dependencies }}"

- name: "Cache cache directory for rector/rector"
uses: "actions/[email protected]"
with:
path: ".build/rector"
key: "php-${{ matrix.php-version }}-rector-${{ github.ref_name }}"
restore-keys: |
php-${{ matrix.php-version }}-rector-main
php-${{ matrix.php-version }}-rector-
- name: "Run automated refactoring with rector/rector"
run: "vendor/bin/rector --ansi --config=rector.php --dry-run"

security-analysis:
name: "Security Analysis"

Expand Down
6 changes: 1 addition & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.PHONY: it
it: refactoring coding-standards security-analysis static-code-analysis tests ## Runs the refactoring, coding-standards, security-analysis, static-code-analysis, and tests targets
it: coding-standards security-analysis static-code-analysis tests ## Runs the coding-standards, security-analysis, static-code-analysis, and tests targets

.PHONY: code-coverage
code-coverage: vendor ## Collects coverage from running integration tests with phpunit/phpunit
Expand All @@ -24,10 +24,6 @@ help: ## Displays this list of targets with descriptions
phive: .phive ## Installs dependencies with phive
PHIVE_HOME=.build/phive phive install --trust-gpg-keys 0x033E5F8D801A2F8D

.PHONY: refactoring
refactoring: vendor ## Runs automated refactoring with rector/rector
vendor/bin/rector process --config=rector.php

.PHONY: security-analysis
security-analysis: vendor ## Runs a security analysis with composer
composer audit
Expand Down
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
"phpunit/phpunit": "^10.5.26",
"psalm/plugin-phpunit": "~0.19.0",
"psr/container": "^2.0.2",
"rector/rector": "^1.2.10",
"vimeo/psalm": "^5.26.1"
},
"autoload": {
Expand Down
65 changes: 3 additions & 62 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<projectFiles>
<directory name="src/" />
<directory name="test/" />
<file name="rector.php" />
<ignoreFiles>
<directory name="test/Fixture/" />
<directory name="vendor/" />
Expand Down
36 changes: 0 additions & 36 deletions rector.php

This file was deleted.

0 comments on commit a6cda12

Please sign in to comment.