[TASK] Add Runtime Cache to Reflection\ObjectAccess

Using Reflection\ObjectAccess during validation or f.e. JsonView in an
extensive way you soon will end up with thousands of calls to functions
of that class.

By adding a runtime cache this can be sped up.

Change-Id: I2abbbd5924cd0177ad8a31cb01c2953dd5ba39fd
Resolves: #42723
Releases: master
[BUGFIX] Flow CLI again works for Windows command prompt

Probably introduced with Ibd70e2dc8ff3a958a33ad0eb422060dc0fd8b799,
the Flow CLI call via the provided .bat file didn't work anymore
because the used ``$_SERVER['PHP_SELF']`` will behave differently
for the flow shell and the flow.bat file: in case of the shell,
the actual ``Scripts/flow.php`` file will be *included*, while in
case of the .bat file, the ``Scripts/flow.php`` file is immediately
called with PHP. This results in a different PHP_SELF value.

The ``FLOW_ROOTPATH`` value which has to be determined, now is built
manually in case of a ``DIRECTORY_SEPARATOR`` equaling a
Windows one.

Additionally, in order to still allow calling the flow executable
from arbitrary locations also for Windows, the flow.bat file
is adjusted a bit in order to not rely on being at the root
path when calling the file.

Change-Id: Icc55e90ba4aff11efab1e2b8307fdbbe41b35735
Fixes: #44000
Related: #31642
Releases: master, 2.0
[BUGFIX] Exception thrown in TypeHandling (follow up)

When using isCollectionType() on an string, a warning is thrown.
The change id Iae59221cbd72677e6c18ad0a383792a798447253 introduced this.

Change-Id: Idb1a18fddae425fe03c4c1102c22133d716a6b65
Resolves: #45876
Releases: master, 2.0, 1.1
[BUGFIX] Remove unneeded filesystem calls

This change removes a call to is_dir in the FileMonitor
which is duplicate as the ReadDirectoryRecursively does
exactly the same and throws an error in this case.

Also 2 calls to file_exists are removed as they're not
necessary at this point as filemtime() will just return
FALSE if something goes wrong.

Change-Id: I93c624cf5d5684d0fe33e8fdf348c535b742d54a
Resolves: #46290
Releases: master, 2.0
[TASK] Change order of accessing identity in getIdentifierByObject

This change improves the performance of getIdentifierByObject since
the EntityManager contains method is rather slow.

Change-Id: Ib6e1eda1ac38677e84c46a441d099b2c5c1e6e24
Releases: master, 2.0
[TASK] Remove file_get_contents call in Cache FileBackend

Releases: master, 2.0
Fixes: #46343
Change-Id: I8181ee30632a1f0513708a418d977d98bea7144d
[!!!][FEATURE] Lazy Dependency Injection

This introduces lazy dependency injection for dependencies injected
through Property Injection. Instead of loading the respective class
and instantiating the dependency right away, a proxy object is
injected which automatically replaces itself with the real dependency
once a method is called on it.

The @Inject annotation now accepts an optional argument "lazy" which
allows for turning off lazy dependency injection in specific cases.

Please read the new section in the Object Management chapter of
the Flow manual, included in this change set.

Change-Id: Ia61e40708cdb3d00210df9a5630e64aa8f89b82a
Resolves: #43819
Releases: master, 2.0
Merge "[BUGFIX] Exception thrown in TypeHandling (follow up)"
[TASK] Optimize I18N service

This change makes the I18N service usable for lazy loading by removing
it from the default runtime. Additionally the Locale class is marked
as non-proxyable to prevent calls to the wakeup function.

Change-Id: I263019d65bfb8dc6e63721807e31025a239ca5da
Releases: master, 2.0
[TASK] Use property injection where possible

This change refactors setter injection to property injection to allow
lazy dependency injection.

Change-Id: I9dfa4b24bb865f36f03561b8a1bf2901150732d2
Releases: master, 2.0
Merge "[!!!][FEATURE] Lazy Dependency Injection"
Merge "[TASK] Optimize I18N service"
Merge "[TASK] Use property injection where possible"
Merge "[BUGFIX] Remove unneeded filesystem calls"
[TASK] Optimize Validation to improve performance

The validation result object traverses the whole result-
tree everytime someone checks for errors, notices or
warnings.

This patch refactors the Result object to cache the result
internally and propagate changes to the parent result object.

In addition the heavy merge actions use this cached
information to prevent unneccesary operations.

Furthermore the validators are reworked to prevent
superfluous object creation.

Releases: 2.0, master
Resolves: #46340
Change-Id: I52ddadd84c39ba67fe87d5b82917360ad24f607e
Merge "[TASK] Remove file_get_contents call in Cache FileBackend"
Merge "[TASK] Change order of accessing identity in getIdentifierByObject"
[TASK] Remove cache has call in router caching aspect

This change removes a call to "has" on the cache frontend, which is not
needed if we want to use the entry with "get". This improves the
performance when building a larger number of URIs.

Change-Id: I3bc4a8055b488646453b69cebcde04a0d69c547e
Releases: master, 2.0
Merge "[TASK] Remove cache has call in router caching aspect"
[BUGFIX] Fix getIdentifierByObject for lazy doctrine proxy

This bug was introduces with Ib6e1eda1ac38677e84c46a441d099b2c5c1e6e24
and causes the content security functional test to fail. There was no
unit test or other indication for this behaviour, so this change adds
a unit test for the Doctrine persistence manager.

Change-Id: Ieba053c290e486678b7c7aefc35b9ca39556de7e
Releases: master, 2.0