src/RecipePlugin.php
public function cleanupProject(Event $event)
    {
        $file = new JsonFile(Factory::getComposerFile());
        $data = $file->read();

        // Remove project and public files from project
        unset($data['extra'][self::PROJECT_FILES]);
        unset($data['extra'][self::PUBLIC_FILES]);

        // Remove redundant empty extra
        if (empty($data['extra'])) {
            unset($data['extra']);
        }

        // Save back to composer.json
        $file->write($data);
    }
public function cleanupProject(Event $event)
    {
        $file = new JsonFile(Factory::getComposerFile());
        $data = $file->read();

        // Remove project and public files from project
        unset($data['extra'][self::PROJECT_FILES]);
        unset($data['extra'][self::PUBLIC_FILES]);

        // Remove redundant empty extra
        if (empty($data['extra'])) {
            unset($data['extra']);
        }

        // Save back to composer.json
        $file->write($data);
    }
public function cleanupProject ( Event $ event ) { $ file = new JsonFile ( Factory :: getComposerFile ( ) ) ; $ data = $ file -> read ( ) ; // Remove project and public files from project unset ( $ data [ 'extra' ] [ self :: PROJECT_FILES ] ) ; unset ( $ data [ 'extra' ] [ self :: PUBLIC_FILES ] ) ; // Remove redundant empty extra if ( empty ( $ data [ 'extra' ] ) ) { unset ( $ data [ 'extra' ] ) ; } // Save back to composer.json $ file -> write ( $ data ) ; }
Cleanup the root package on create-project

@param Event $event
Cleanup the root package on create - project