[FEATURE] Flow configuration variables settable via $_SERVER

As an alternative for environments in which setting environment
variables is not possible the ``FLOW_CONTEXT`` and
``FLOW_REWRITEURLS`` variables can be set in ``$_SERVER``. This
is possible in an apache RewriteRule for example.

Change-Id: Ic364da27b8588a52d8397538f20b918264f9351d
Fixes: FLOW-9
Releases: master
[FEATURE] UriTemplate implementation

This adds UriTemplate as per RFC 6570, allowing expansion of templates
into URI strings::

  // results in "foo/bar/baz"
  UriTemplate::expand('foo/{var}/baz', array('var' => 'bar'));

See the unit test and/or RFC for the long list of possible expansions.

Change-Id: Ie900b957de1235b11c21c6bffa4fce29559a2d9f
Releases: master
[FEATURE] Add Locale Type Converter

This adds a Type Converter which converts from locale
identifier strings to an actual I18n\Locale object.

Change-Id: I9bd4412bf79878484ac19b61eaed8ef7a13c1437
Releases: master
Merge "[FEATURE] Add Locale Type Converter"
[BUGFIX] Call to undefined method ask in Cli CommandController

When required arguments are left out in a command controller call
an undefined method exception is thrown in Cli\CommandController.
This regression was introduced in Ia77c62b41fb598bdfb7b81c530494ba819a590d1

This change updates the call to the ask() method to use the ConsoleOutput
object.

Change-Id: I5961ce3a8f4accc8d27d67acd1214805e574de82
Fixes: FLOW-93
Releases: master
[BUGFIX] Requesting /index.phpa/ breaks Uri host parameter

If the request URI contains ``index.php`` and something afterwards
before a slash, that something is included in the host being
set on the request URI that's constructed.

Problem lies in the handling of URIs containing index.php,
where that part is automatically stripped off. However it
strips it off in a way that can cause this issue, when the
``parse_url()`` is called on a broken URI.

Change-Id: Ib7fcbbfcaed3d8c2cbb437eb1a7796b7c1edd4f7
Releases: master, 2.2, 2.1, 2.0
Fixes: FLOW-92
[BUGFIX] Move file migration operation created empty folders

When the "oldPath" didn't exist the operation still created the empty "newpath".

Change-Id: I7642f5f0a3537cc9ecf352637ecd8ce0c180bae4
Related: NEOS-390
Releases: master, 2.2, 2.1
Merge "[BUGFIX] Move file migration operation created empty folders"
[TASK] Fix wrong path in documentation

Change-Id: Ideccaa4c72adb4b94ed4e61b3a16b4baa52621bf
Resolves: FLOW-91
Releases: master, 2.2, 2.1, 2.0
[BUGFIX] Allow argument with spaces in CLI shell commands

The CLI request building in Flow explodes the arguments on spaces
which leads to problems when multi word argument values are used.

This change updates the behaviour so multi word argument values
can be used when correctly quoted.

Change-Id: I110aee25bd22e0625820f243ed4561b455a2c756
Related: FLOW-102
Releases: master
[BUGFIX] Adjust regular expression to strip only first php tag

This is a follow up for I388f1a7c04139d5482203887931684f597d71e54
which changed the regular expression in a way that wrongly
removed all opening php tags in the given php file.

Change-Id: I06b1c6932fc82632176b2cb9a202102e717f2e20
Releases: master, 2.2, 2.1
Fixes: FLOW-90
[BUGFIX] Support empty arguments in CLI when passing arguments as string

Empty arguments resulted in a php notice. This is fixed by adding an
additional safeguard.

Change-Id: If5e4f97404914583302594b79ca962dd4ccf2115
Related: FLOW-102
Releases: master
[BUGFIX] Make rewriteFilenameForUri handle non-ASCII names correctly

When the filename consists completely of non-ASCII characters,
the ``rewriteFilenameForUri`` would substitute it with empty filename
like ".jpg", resulting in a broken resource link.

This change makes ``rewriteFilenameForUri`` accept unicode character.
In addition it checks if the filename is empty after the rewrite and
names it "unnamed.<fileExtension>" if needed.

Change-Id: Idf5b92e7871fda852da136362d57f8a5fb568708
Fixes: FLOW-99
Releases: master, 2.1, 2.2
[TASK] Provide behat context traits for isolated security testing

Security features mostly have to be tested in a subprocess, as
we have to recreate proxies for the specified testing policy.

This change provides a trait, to run behat steps in an isolated process,
as well as a trait to test security features.

Change-Id: I7ba61a8e49d108b685394a70be8657550c4033aa
Related: FLOW-102
Releases: master
Merge "[FEATURE] Flow configuration variables settable via $_SERVER"
Merge "[TASK] Provide behat context traits for isolated security testing"
[BUGFIX] Only include trait from TYPO3CR if available.

Besides fixing the trait include this change adds missing
@fixtures annotations to make the Behat tests pass.

Those annotations can be removed in the acl changes as by
then the typo3_flow_security_account table is not required
anymore for running those tests.

Change-Id: Ic02cf3de85bbc57ad5ecbd26936711c26d6108dd
Releases: master
[TASK] Some cleanup in functional behat test helper code

Change-Id: I4d0c98152faf8d6239c712ded55c2e969ecf3c9b
Releases: master
[BUGFIX] Adjust code migration identifier pattern to contain the full timestamp

Previously code migrations are expected to have a class name with the
pattern ``Version<YYYYMMDDhhmm>`` and the unique identifier was
determined extracting the last 12 characters of the class name (which
are expected to be the timestamp).

With this change everything after the "Version" string is considered for
the identifier, allowing the timestamp to contain seconds as well.

This also adjusts existing code migrations to use the full timestamp in
order to establish the new guideline (note: those migrations still
return the old identifier so that they won't be applied again with a
new identifier).

Change-Id: Id730f54248b224a6cd29ddaa1ee9eb0ba54af48f
Fixes: FLOW-110
Releases: master, 2.3, 2.2, 2.1, 2.0
[!!!][FEATURE] Restructure policy component to new Policy.yaml format

This change introduces the new concept for policies and
privileges. It also includes a restructuring of the privilege
voting process.

This is a breaking change mainly because it drops support for content
security and secure downloads. Both features will be re-added by new
privilege types in separate changes.
Besides it is quite likely that custom code that interacts with the
(non-public) API of the security framework won't work without
adjustments.

The new ``Policy.yaml`` syntax is covered by code migrations, so make
sure to run::

  ./flow core:migrate
  ./flow doctrine:migrate

commands and to carefully read their output.

Change-Id: I84e188e89a05ec0dd1f9ee96fe312dac81806759
Migration: TYPO3.Flow-20141113121400
Resolves: FLOW-11
Releases: master