protected function varnishCheckCommand()
    {
        $this->readProperties();

        $drushVersion = $this->taskDrushStack()
            ->drupalRootDirectory($this->getConfig()->get('digipolis.root.web'))
            ->getVersion();
        if (version_compare($drushVersion, '9.0', '<')) {
            return 'bash -c "[[ '
                . '\'$ENABLED_MODULES\' =~ \((varnish|purge)\) '
                . '&& \'$ENABLED_MODULES\' =~ \(page_cache\)'
                . ' ]]" && exit 1 || :';
        }
        return 'bash -c "[[ '
            . '\'$ENABLED_MODULES\' =~ (varnish|purge) '
            . '&& \'$ENABLED_MODULES\' =~ page_cache'
            . ' ]]" && exit 1 || :';
    }
protected function varnishCheckCommand()
    {
        $this->readProperties();

        $drushVersion = $this->taskDrushStack()
            ->drupalRootDirectory($this->getConfig()->get('digipolis.root.web'))
            ->getVersion();
        if (version_compare($drushVersion, '9.0', '<')) {
            return 'bash -c "[[ '
                . '\'$ENABLED_MODULES\' =~ \((varnish|purge)\) '
                . '&& \'$ENABLED_MODULES\' =~ \(page_cache\)'
                . ' ]]" && exit 1 || :';
        }
        return 'bash -c "[[ '
            . '\'$ENABLED_MODULES\' =~ (varnish|purge) '
            . '&& \'$ENABLED_MODULES\' =~ page_cache'
            . ' ]]" && exit 1 || :';
    }
protected function varnishCheckCommand ( ) { $ this -> readProperties ( ) ; $ drushVersion = $ this -> taskDrushStack ( ) -> drupalRootDirectory ( $ this -> getConfig ( ) -> get ( 'digipolis.root.web' ) ) -> getVersion ( ) ; if ( version_compare ( $ drushVersion , '9.0' , '<' ) ) { return 'bash -c "[[ ' . '\'$ENABLED_MODULES\' =~ \((varnish|purge)\) ' . '&& \'$ENABLED_MODULES\' =~ \(page_cache\)' . ' ]]" && exit 1 || :' ; } return 'bash -c "[[ ' . '\'$ENABLED_MODULES\' =~ (varnish|purge) ' . '&& \'$ENABLED_MODULES\' =~ page_cache' . ' ]]" && exit 1 || :' ; }
Get the command to check if the page_cache module and varnish are not
enabled simultaneously. Command differs for Drush 9 vs Drush 8.

@return string
Get the command to check if the page_cache module and varnish are not enabled simultaneously . Command differs for Drush 9 vs Drush 8 .