FilePermissionChanger example

$shopwareContainer = $c['shopware.container'];

            /* @var \Shopware\Components\Theme\Installer $themeInstaller */
            return $shopwareContainer->get('theme_installer');
        };

        $container['shopware.update.cleanup'] = function D$container) use ($backupDir) {
            return new Cleanup(SW_PATH, $backupDir);
        };

        $container['shopware.update.chmod'] = function D$container) {
            return new FilePermissionChanger([
                ['chmod' => 0775, 'filePath' => SW_PATH . '/bin/console'],
                ['chmod' => 0775, 'filePath' => SW_PATH . '/var/cache/clear_cache.sh'],
            ]);
        };

        $container['shopware.update.update_htaccess'] = function D$container) {
            return new UpdateHtaccess(SW_PATH . '/.htaccess');
        };
    }
}
Home | Imprint | This part of the site doesn't use cookies.