[CLEANUP] ClassLoader

Add methods to better structure class information loading/creation.
This is necessary as the follow up patches will need this code
more often.

Resolves: #56797
Releases: 6.2
Change-Id: I1f15fbd262036b6b2d0159cd0e9613ad7135a296
Reviewed-on: https://review.typo3.org/28279
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
Reviewed-by: Sebastian Fischer
Reviewed-by: Patrick Broens
Tested-by: Patrick Broens
[TASK] Use prepared statements in generic persistence

While Typo3DbBackend claims to be the glue between Extbase
and TYPO3, it hardly uses the TYPO3 DB API.

This patch enhances getObjectData- and getObjectCountByQuery
- the main methods used when dealing with domain models
through a repository - to use the TYPO3 DB API. In conjunction
this enables Extbase to use the preparedStatement introduced
in TYPO3 4.5.

Because prepared queries might not be desirable in all circum-
stances, they are disabled by default. They can be enable on
a per-query-basis via
  $query->getQuerySettings()->setUsePreparedStatement(TRUE);

Prepared statements will *only* be used for SELECT queries.

* consistent use of the TYPO3 DB API
  use exec_SELECTgetRows and exec_SELECTcountRows() even for
  non-prepared queries. This should help a lot along the way
  to support DBAL.

* preparedStatement in custom statements
  When using custom statements, it's now possible to use a pre-
  pared statement in $query->statement(), instead of a query-
  string. The prepared statement has to be initialized already
  though, because Extbase cannot take care of splitting your
  custom query string. The parameters are given as array in the
  second argument as usual.

* deprecated using parameters in non-prepared custom statement
  If a custom query string is used with $query->statement(),
  giving the parameters in the second argument is deprecated.

* get count working
  Counting - especially with limit and offset - has been broken
  for quite some time now. By refactoring the limit and offset
  parameters and adapting exec_SELECTcountRows() this should
  now work again.

The next step is to separate the query parsing from the backend
and introduce an intelligent query cache. This will work as a
drop-in-replacement. The @todo-annotations are intended to stay
there for the next patch.

Resolves: #55360
Releases: 6.2
Change-Id: I91a3fd69470df178a8a5465511e50766b50d7f52
Reviewed-on: https://review.typo3.org/27426
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
Reviewed-by: Marc Bastian Heinrichs
Reviewed-by: Ernesto Baschny
Tested-by: Ernesto Baschny
[BUGFIX] Download link for absolute file path

Support FAL adapters that return absolute urls as public file url

Change-Id: I68f2675a1a5137e6d0c5cadee7b21e82e8730fdf
Resolves: #56659
Releases: 6.2
Reviewed-on: https://review.typo3.org/28168
Reviewed-by: Wouter Wolters
Reviewed-by: Christian Weiske
Tested-by: Christian Weiske
Reviewed-by: Frans Saris
Tested-by: Frans Saris
[BUGFIX] Wrong namespace in functional test of FluidTemplate cObject

Resolves: #56816
Releases: 6.2
Change-Id: I3abed35a5e27bdc9db2b18d5caa13681ef5a9305
Reviewed-on: https://review.typo3.org/28294
Reviewed-by: Wouter Wolters
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
[BUGFIX] FollowUp to #56797 in I1f15fbd262036b6b2d0159cd0e9613ad7135a296

Somehow a double $this->$this slipped into the cleanup on line 390
which now fatals. This needs to be fixed.

Resolves: #56797
Releases: 6.2
Change-Id: Ibb23b5f56c95106c4fea6e9a3ba09fbc9f9905dd
Reviewed-on: https://review.typo3.org/28296
Reviewed-by: Ernesto Baschny
Tested-by: Ernesto Baschny
[TASK] Add functional tests for generic persistence

To backup the changes in Extbase's generic persistence,
we add some functional tests.

Resolves: #55661
Related: #55360
Related: #55167
Releases: 6.2
Change-Id: I0b845618b1cec9788ca36ac59e25ea6779f01cb6
Reviewed-on: https://review.typo3.org/28262
Reviewed-by: Marc Bastian Heinrichs
Tested-by: Marc Bastian Heinrichs
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
[TASK] Follow-up to "Add functional tests for generic persistence"

Test directory changed from "Relation" to "Persistence".

Resolves: #55661
Related: #55360
Related: #55167
Releases: 6.2

Change-Id: I422dbfb6bdad4215bdc70dea775917cf3159605f
Reviewed-on: https://review.typo3.org/28297
Reviewed-by: Ernesto Baschny
Tested-by: Ernesto Baschny
[BUGFIX] InvalidArgumentException in ActionControllerTest

The cache identifier causing the exception looks like this:
randomviewobjectpattern_@package_mycontroller_myaction_myformat

However, "@package" should be "@extension" in that regard and
besides that, the cache identifier using the vendor names shall
be used in the tests.

Resolves: #56822
Releases: 6.2
Change-Id: Ic78a8690559486efcbc7f5da7219a445f3f6707f
Reviewed-on: https://review.typo3.org/28300
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Markus Klein
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
[BUGFIX] Missing localizeChildrenAtParentLocalization for CSV tests

The "localizeChildrenAtParentLocalization" behaviour needs to be
set to automatically localize children for IRRE CSV functional
tests as well.

Resolves: #56819
Releases: 6.2
Change-Id: I14a09e715ad9674922776de450d519583770e0f5
Reviewed-on: https://review.typo3.org/28299
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
[BUGFIX] Use last result line of identify command

In GraphicalFunctions::imageMagickIdentify() the last line returned by
the executed command will be used as result.

This prevents the system from using possible error messages printed
before the actual result for further processing.

Resolves: #56574
Releases: 6.2
Change-Id: Ic179e0b68c7fa9a4f0f4b2342cb381c54fb740b9
[TASK] Unify data for jump URL hash generation

The jump URL generation is unified and moved to a new JumpUrlUtility
class. All methods in the ContentObjectRenderer are now using the same
method for creating jump URLs.

The handling of file and directory names with special characters is
improved and FAL file records with special characters in their file names
will also be URL encoded.

Additionally Unit Tests are added to verify the jump URL function.

Resolves: #52156
Releases: 6.2
Change-Id: I7d2d8cec005aae56a118850071ca669ef9740c9d
[TASK] Unify NULL default value handling

If a field is configured to allow NULL values ("eval" is set to "null")
and the default value in the TCA is explicitly set to NULL the value
will not be converted to a string.

Additionally the mode setting "useOrOverridePlaceholder" will not have
any influence any more on the default value when creating new records.

Resolves: #54412
Releases: 6.2
Change-Id: Ica43a1af33e6f86dd042b66781acc0e9cd904cf9
[BUGFIX] Correct order of key / field deletion

Prevent a SQL error when deleting a key and the field belonging
to the key in the install tool at the same time.

Therefore the order for deleting keys and fields is changed from
field first and key second to key first and field second.

Resolves: #50450
Releases: 6.2
Change-Id: I30aff6ea6c2bf01dec6197eec8fd3aa7306cfcbb
[BUGFIX] Prevent exclude field mixup in FromEngine

Use a local variable for storing the excluded fields in the
FormEngine to prevent the configuration from being overwritten
by the inline form element renderer.

Fixes: #47359
Releases: 6.2, 6.1, 6.0, 4.7, 4.5
Change-Id: I5a7a2de16d767f854b4d3f89d599deec28266092
[BUGFIX] Correct file language overlay for pages

This patch corrects the fields the FILES content object is using for
doing the language overlay for file references for fields in the pages
table.

Instead of the _LOCALIZED_UID that is only available for other record
types the _PAGES_OVERLAY_UID field is now used to check if there
is a translated version available.

Resolves: #47869
Releases: 6.2, 6.1, 6.0
Change-Id: I2465a9e3ccd49223cc44885ffba8484788e1b669
[TASK] Reusable getCategoryFieldsForTable itemsProcFunc

Allow the usage of the method
\TYPO3\CMS\Core\Category\CategoryRegistry->getCategoryFieldsForTable
that can be used as itemsProcFunc for select fields in the TCA in
multiple context by introducing a new categorizedTable configuration key
in the config section of a column in the TCA.

This configuration key can either consist of a single string containing
the name of the table or a configuration array to define additional
conditions that need to be true so that a configured table is used.

Resolves: #53045
Releases: 6.2
Change-Id: I128cbeb6747a8f83e68cdaaaafbc3ab5901353d4
[BUGFIX] Type check fix in linkhandler link type

To determine if a link should by handled by the linkhandler link type
in the linkvalidator the "type" entry in the $value array will be
checked instead of the $type variable which is always empty.

Resolves: #38639
Releases: 6.2
Change-Id: I8183bfca0e4662518063f0d3ec9ba6bab0ff58bf
[FEATURE] Provide TSConfig to link checkers

The currently active TSConfig for the linkvalidator will be passed
to the link checker instances if they implement the required
setTSConfig() method.

Resolves: #54518
Releases: 6.2
Change-Id: I59d1de5fb3f818d340f499260589edf9a45d3148
[FEATURE] Report links to disabled linkhandler records

A new TSConfig setting is introduced to mod.linkvalidator that is called
linkhandler.reportHiddenRecords.

If this setting is enabled an error will be triggerd in the linkhandler
link checker of the linkvalidator Extension if a linked record is not
enabled.

Resolves: #54519
Releases: 6.2
Change-Id: Ib95cff1f9bdc67b0636cf38e6d9f33a8cbbdff75
[BUGFIX] No invalid TSConfig usage in linkvalidator

To display the linkvalidator error messages for linkhandler link types
the name of the linked table is read from the TCA instead from Page
TSConfig from a hardcoded page UID 1.

Resolves: #54523
Releases: 6.2
Change-Id: I165813a03cd4574c20981e35a9e53cfdeacfc421