Skip to content

Conversation

@AlexT-lv
Copy link
Collaborator

@AlexT-lv AlexT-lv commented Dec 2, 2019

No description provided.

// this up() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');

$this->addSql('DROP TABLE customer');
Copy link
Contributor

Choose a reason for hiding this comment

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

il faudra que tu rebase ta table pour ne pas garder customer dans ta migration

{
private $targetDirectory;

// public function __construct($targetDirectory)
Copy link
Contributor

Choose a reason for hiding this comment

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

ne merge jamais de code commenté. Si tu n'as pas besoin de se bout de code tu le vire. Si tu n'en as pas besoin dans cette PR, tu le fais dans une pr distincte. 90% du code commenté reste du code mort

// //$this->targetDirectory = $targetDirectory;
// }

public function upload(UploadedFile $file)
Copy link
Contributor

Choose a reason for hiding this comment

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

type ta sortie

);
$fileName = $safeFilename.'-'.uniqid().'.'.$file->guessExtension();

try {
Copy link
Contributor

Choose a reason for hiding this comment

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

ta méthode ne va pas car tu retourne soit ton $fileName, soit void. Dans ton cas, je retournerais toujours une string soit le filename, soit ''.

Du coup tu peux virer ton try catch qui ne te sert pas

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.

3 participants