can you help me to resolve this problem ? . I am trying to upload logo and when i type any command i get this exception in Symfony v 3.2.8
Unrecognized option "assets" under "framework"
@Route("/admin/logo", name="logoCreatePage")
public function logoCreateAction( Request $request ) {
$logos = new Logorama();
if( $request -> isMethod( 'POST' ) ) {
$image = $request -> files -> get( 'logourl' );
if( ( $image instanceof UploadedFile ) && ( $image -> getError() == '0' ) ) {
if( ! ( $image -> getSize() < 5000000 ) ) {
$name_array = explode( '.', $image -> getClientOriginalName());
$fileType = $name_array[sizeof($name_array) - 1];
$validFiletypes = array('jpg', 'jpeg', 'bmp', 'png');
if (in_array(strtolower($fileType), $validFiletypes)) {
$logoramarandom = rand(1000,10000);
$logoName = $logoramarandom . '.' . $name_array[1];
$image -> move(
$this -> getParameter('logo_directory'),$logoName
);
$logos -> setLogourl($logoName);
}
}
$em = $this -> getDoctrine() -> getManager();
$em -> persist($logos);
$em -> flush();
return $this -> redirectToRoute('indexPage');
}
}
return $this -> render('admin/logo.html.twig', array(
));
}
Remove
assets
in your config.ymlThen give the output of app/console --version, assets component is available from
> symfony 2.7
ensure you are not using a different version in the command line.