src/Listeners/Renderer/Debug/ReportFileRenderer.php
/**
     * Renders the data to some output, e. g. the console or a logger.
     *
     * @param string $serial The serial of the import to render the dump artefacts for
     *
     * @return void
     */
Renders the data to some output, e. g. the console or a logger.
@param string $serial The serial of the import to render the dump artefacts for

@return void
Renders the data to some output e . g . the console or a logger . @param string $serial The serial of the import to render the dump artefacts for @return void
public function render(string $serial = null)
    {
        $status = $this->getRegistryProcessor()->getAttribute(RegistryKeys::STATUS);
        clearstatcache();
        if (!is_dir($sourceDir = $status[RegistryKeys::SOURCE_DIRECTORY])) {
            throw new \Exception(sprintf('Configured source directory %s is not available!', $sourceDir));
        }
        $lines = array();
        $lines[] = sprintf('Magento Edition: %s', $this->getConfiguration()->getMagentoEdition());
        $lines[] = sprintf('Magento Version: %s', $this->getConfiguration()->getMagentoVersion());
        $lines[] = sprintf('PHP Version: %s', phpversion());
        $lines[] = sprintf('App Version: %s', $this->getApplicationVersion());
        $lines[] = sprintf('Memory Limit: %s', ini_get('memory_limit'));
        $lines[] = sprintf('Executed Command: %s', implode(' ', $_SERVER['argv']));
        $lines[] = sprintf('Working Directory: %s', getcwd());
        $lines[] = '-------------------- Loaded Extensions -----------------------';
        $lines[] = implode(', ', get_loaded_extensions());
        $lines[] = '------------------- Executed Operations ----------------------';
        $lines[] = implode(' > ', $this->getConfiguration()->getOperationNames());
        $this->write(implode(PHP_EOL, $lines), sprintf('%s/debug-report.txt', $sourceDir));
    }
public function render ( string $ serial = null ) { $ status = $ this -> getRegistryProcessor ( ) -> getAttribute ( RegistryKeys :: STATUS ) ; clearstatcache ( ) ; if ( ! is_dir ( $ sourceDir = $ status [ RegistryKeys :: SOURCE_DIRECTORY ] ) ) { throw new \ Exception ( sprintf ( 'Configured source directory %s is not available!' , $ sourceDir ) ) ; } $ lines = array ( ) ; $ lines [ ] = sprintf ( 'Magento Edition: %s' , $ this -> getConfiguration ( ) -> getMagentoEdition ( ) ) ; $ lines [ ] = sprintf ( 'Magento Version: %s' , $ this -> getConfiguration ( ) -> getMagentoVersion ( ) ) ; $ lines [ ] = sprintf ( 'PHP Version: %s' , phpversion ( ) ) ; $ lines [ ] = sprintf ( 'App Version: %s' , $ this -> getApplicationVersion ( ) ) ; $ lines [ ] = sprintf ( 'Memory Limit: %s' , ini_get ( 'memory_limit' ) ) ; $ lines [ ] = sprintf ( 'Executed Command: %s' , implode ( ' ' , $ _SERVER [ 'argv' ] ) ) ; $ lines [ ] = sprintf ( 'Working Directory: %s' , getcwd ( ) ) ; $ lines [ ] = '-------------------- Loaded Extensions -----------------------' ; $ lines [ ] = implode ( ', ' , get_loaded_extensions ( ) ) ; $ lines [ ] = '------------------- Executed Operations ----------------------' ; $ lines [ ] = implode ( ' > ' , $ this -> getConfiguration ( ) -> getOperationNames ( ) ) ; $ this -> write ( implode ( PHP_EOL , $ lines ) , sprintf ( '%s/debug-report.txt' , $ sourceDir ) ) ; }
Renders the data to some output, e. g. the console or a logger.
Renders the data to some output e . g . the console or a logger .
// load the actual status // clear the filecache // query whether or not the configured source directory is available // initialize the array for the lines // log the Magento + the system's PHP configuration // finally write the debug report to a file in the source directory