Skip to content

Commit

Permalink
[TASK] Remove rector
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminkott committed Nov 21, 2024
1 parent 86544c6 commit eff9204
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 167 deletions.
39 changes: 0 additions & 39 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,44 +153,6 @@ jobs:
- name: Lint PHP files
run: composer ci:php:lint

php_rector:
name: PHP Rector
needs:
- php_lint
runs-on: ubuntu-latest
steps:

- name: Checkout
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
tools: composer:2

- name: Get Composer Cache Directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-latest-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-latest-
${{ runner.os }}-composer-
- name: Setup authentication for Composer
run: composer config github-oauth.github.com ${{ secrets.GITHUB_TOKEN }}

- name: Install dependencies
run: composer install --prefer-dist --ansi --no-interaction --no-progress

- name: Validation of Rector rules for PHP files
run: composer ci:php:rector

php_coding_standards:
name: PHP Coding Standards
needs:
Expand Down Expand Up @@ -363,7 +325,6 @@ jobs:
- php_coding_standards
- php_sniff
- php_stan
- php_rector
if: ${{ github.event_name == 'push' }}
uses: ./.github/workflows/deployment.yml
secrets:
Expand Down
1 change: 0 additions & 1 deletion .mage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ magephp:
- ./phpstan.neon
- ./phpunit.xml.dist
- ./README.md
- ./rector.php
environments:
develop:
user: get-stage
Expand Down
5 changes: 0 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -202,14 +202,12 @@
"ci:json:lint": "@php jsonlint -q composer.json",
"ci:php": [
"@ci:php:lint",
"@ci:php:rector",
"@ci:php:cs-fixer",
"@ci:php:sniff",
"@ci:php:stan"
],
"ci:php:cs-fixer": "@php php-cs-fixer fix -v --dry-run --diff",
"ci:php:lint": "@php phplint --no-progress",
"ci:php:rector": "@php rector process --dry-run --no-progress-bar || true",
"ci:php:sniff": "@php phpcs --standard=PSR12 src tests || true",
"ci:php:stan": "@php phpstan analyse --no-progress",
"ci:static": [
Expand All @@ -232,11 +230,9 @@
"@fix:php"
],
"fix:php": [
"@fix:php:rector",
"@fix:php:cs-fixer"
],
"fix:php:cs-fixer": "@php php-cs-fixer fix",
"fix:php:rector": "@php rector process --no-diffs",
"fix:php:sniff": "phpcbf src",
"satis:install": [
"rm -fr satis",
Expand All @@ -245,7 +241,6 @@
"satis:update": [
"@satis:install"
],
"tools:php:rector": "@php rector process --dry-run",
"tools:setup:clean": "rm -r tools/**/composer.lock tools/**/vendor",
"tools:setup:install": "@composer bin all install --ansi",
"tools:setup:update": "@composer bin all update --ansi"
Expand Down
108 changes: 0 additions & 108 deletions rector.php

This file was deleted.

3 changes: 0 additions & 3 deletions src/Entity/Release.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@ class Release implements JsonSerializable, Stringable
#[Serializer\Type("DateTime<'Y-m-d\\TH:i:sP'>")]
private DateTimeInterface $date;

/**
* @noRector
*/
#[Assert\Choice(callback: [ReleaseTypeEnum::class, 'getAvailableOptions'])]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING)]
#[Serializer\Groups(['data'])]
Expand Down
2 changes: 0 additions & 2 deletions src/Entity/Requirement.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ public function __construct(
#[ORM\JoinColumn(name: 'version', referencedColumnName: 'version')]
private ?MajorVersion $version,
/**
* @noRector
*
* @OA\Property(example="database")
*/
#[Assert\Choice(callback: [RequirementCategoryEnum::class, 'getAvailableOptions'])]
Expand Down
3 changes: 0 additions & 3 deletions src/Service/CacheWarmupService.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ public function warmUp(string $cacheDir): array

$this->warmUpMajorVersions();

/** @noRector */
$versions = $this->releases->findAll();
$routes = [
'release_show',
Expand Down Expand Up @@ -115,7 +114,6 @@ function ($response) use ($url): void {

private function warmUpActiveMajorVersions(): void
{
/** @noRector */
$versions = $this->majorVersions->findAllActive();
$routes = [
'majorVersion_show',
Expand All @@ -125,7 +123,6 @@ private function warmUpActiveMajorVersions(): void

private function warmUpMajorVersions(): void
{
/** @noRector */
$versions = $this->majorVersions->findAll();
$routes = [
'app_api_majorversion_releases_getreleasesbymajorversion',
Expand Down
1 change: 0 additions & 1 deletion tests/Functional/DatabasePrimer.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ public static function prime(KernelInterface $kernel): void
}

// Get the entity manager from the service container
/** @noRector */
$entityManager = $kernel->getContainer()->get('doctrine.orm.entity_manager');
if (!$entityManager instanceof EntityManagerInterface) {
throw new LogicException('EntityManager could not be retrieved');
Expand Down
5 changes: 0 additions & 5 deletions tools/rector/composer.json

This file was deleted.

0 comments on commit eff9204

Please sign in to comment.