Skip to content

Conversation

dunglas
Copy link
Member

@dunglas dunglas commented Sep 6, 2017

If readable is set to false, the getter will not be generated. If writable is set to false, the mutator will not be generated.

$this->assertEquals(0, $commandTester->execute(['output' => $outputDir, 'config' => $config]));
$person = file_get_contents($outputDir.'/AppBundle/Entity/Person.php');

$person = file_get_contents($outputDir.'/AppBundle/Entity/Person.php');

Choose a reason for hiding this comment

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

question : Why concatenation here instead of sprintf method ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because it's already easy to read and it's faster (even if it doesn't matter much in a test). The fastest solution in PHP 7 would be file_get_contents("$outputDir/AppBundle/Entity/Person.php");

@dunglas dunglas merged commit 34966b8 into api-platform:master Sep 6, 2017
@dunglas dunglas deleted the writable branch September 6, 2017 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants