Skip to content

feat: add support for finalizing Doctrine entities - #159

Open
mairo744 wants to merge 3 commits into
rectorphp:mainfrom
mairo744:feature/finalize-doctrine-entities
Open

mairo744 wants to merge 3 commits into
rectorphp:mainfrom
mairo744:feature/finalize-doctrine-entities

Conversation

@mairo744

Copy link
Copy Markdown

#157

Allow finalize-classes to finalize Doctrine entities when the project meets the required PHP and Doctrine ORM version constraints.

Signed-off-by: mairo744 <mairo744@gmail.com>
Comment on lines +37 to +48
protected function tearDown(): void
{
chdir($this->originalWorkingDirectory);

unlink($this->entityFilePath);
rmdir(dirname($this->entityFilePath));
rmdir($this->projectDirectory . '/src');
@unlink($this->projectDirectory . '/composer.json');
rmdir($this->projectDirectory);

parent::tearDown();
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update test to simply return list of classes to be finalized and verify that?
I want to avoid e2e testing if possible, as this gets messy.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would extract public method that returns the files to finalize without writing them, and test that. Does that work for you?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds safe 👍

Signed-off-by: mairo744 <mairo744@gmail.com>
Signed-off-by: mairo744 <mairo744@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants