Unrecognized variant "assets" within "framework", symfony 3

Can you help me solve this problem ?, I am trying to load a logo and when I type any command I get this exception in Symfony v 3.2.8.

Unrecognized option "assets" within "framework"

in config.yml

@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(

            ));
}

      

+3


source to share


1 answer


Delete assets

inconfig.yml

framework:
    //...
    http_method_override: true
    php_errors:
    //...

      



Then print the application / console output --version, resource component is available from > symfony 2.7

, make sure you are not using a different version on the command line.

+1


source







All Articles