Download the PHP package lochmueller/sourceopt without Composer

On this page you can find all versions of the php package lochmueller/sourceopt. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sourceopt

EXT:sourceopt

Build Status Scrutinizer Code Quality Code Coverage

Installation

https://github.com/lochmueller/sourceopt/blob/2346673ee51d2b64308e1ddb1433cea2f37eafcb/composer.json#L19-L20

Configuration

Include the extension and go to the Constant Editor of a template where you find all options under PLUGIN

Performance

The PHP process need server performance, because there are several search/replace operations in the logic

Reference

Note: The following features are executed in reverse order

SourceOpt

TypoScript [constants] prepend config. at [setup] Property Type Description Default
sourceopt.enabled boolean Is the optimization enabled for this template 1
sourceopt.removeGenerator boolean Remove \<meta name="generator" content="TYPO3 CMS"> 1
sourceopt.removeComments boolean Remove HTML-Comments 1
sourceopt.removeComments.keep array Spare these listed comments: Regular expressions that match comments that should not be removed. Very useful e.g. to keep the TYPO3SEARCH-Comments so indexed_search can work properly .10
sourceopt.removeComments.keep.10 string Spare TYPO3SEARCH-Comments from removal /^TYPO3SEARCH_/usi
sourceopt.headerComment string Your additional (appended) header comment [empty]
sourceopt.formatHtml integer Formats the code beautiful and easy readable. New lines and tabs are used in the usual way of illustrating the structure of an XML code.
Optionshttps://github.com/lochmueller/sourceopt/blob/2346673ee51d2b64308e1ddb1433cea2f37eafcb/Classes/Service/CleanHtmlService.php#L156-L161
4
sourceopt.formatHtml.tabSize integer Defines the size of the tabs used for formating. If blank one tab is used. If a number is specified the specified number of blank spaces is used instead. This will only work together with formatHtml [empty]
sourceopt.formatHtml.debugComment boolean Includes a comment at the end of the html source code that points the numbers of open html tags. This will only work together with formatHtml [empty]

RegEx Replace

TypoScript [setup] incl. stdWrap

Note: both arrays will be ksort'ed in "natural order"

#### HowTo migrate
##### from [jweiland/replacer](https://github.com/jweiland-net/replacer) : `1.4 - 2.x` - regex replace `config\.tx_(?:\w*replace\w*)` to `config.replacer` - remove `config.tx_replacer.enable_regex = 1`
##### from [maxserv/replacecontent](https://github.com/MaxServ/t3ext-replacecontent) 2013 - 2017 - regex replace `config\.tx_(?:\w*replace\w*)` to `config.replacer`
##### from [typo3-ter/ja_replacer](https://extensions.typo3.org/extension/ja_replacer) 2009 - 2013 || [phorax/ja-replacer](https://github.com/phorax/ja-replacer/) 2016 & replace `config.tx_ja_replacer` to `config.tx_replacer`
##### from [typo3-ter/n84_contentreplacer](https://extensions.typo3.org/extension/n84_contentreplacer) 2016 - regex replace `config\.tx_(?:\w*replace\w*)` to `config.replacer`
##### from [typo3-ter/fereplace](https://extensions.typo3.org/extension/fereplace) 2011 & replace `plugin.fereplace.pairs` to `config.tx_replacer` .. ah .. and one regex - search `(\n\s*)(\d+)(?:{\s+|\.)old\s*=\s*([^\n]+).+?new\s*=\s*([^\n]+)` - replace `$1search.$2 = $3\n$1replace.$2 = $4`
##### from [typo3-ter/regex](https://extensions.typo3.org/extension/regex) 2009 - regex replace `config\.regex` to `config.replacer` - regex replace `(?:\s)(\w+)\s*=\s*` to `search.$1 = ` - regex replace `(\w+)\.replacement\s*=\s*` to `replace.$1 = `
##### from any other tool or just for regex - regex replace `(?:config|plugin)\.tx_any_other_tool` to `config.replacer` - inside block `search` - regex replace `\/` to `\\/` (carefully) - regex replace `\s*=\s*(.+)` to ` = /$1/` - inside block `replace` - regex replace `\s*=\s*(.+)` to ` = $1` - consider a PR for conversion specifics

SVGstore

TypoScript [constants] prepend config. at [setup] Property Type Description Default
svgstore.enabled boolean Is the SVG extract & merge enabled for this template 1
svgstore.fileSize integer Maximum file size of a SVG to include (in [byte]) 50000

ToDo:

All versions of sourceopt with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4||^8.0
typo3/cms-core Version ^9.5||^10.4||^11.5||^12.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package lochmueller/sourceopt contains the following files

Loading the files please wait ....