« Previous | Next » 

Revision a2135899

Parent 0b4d60fe
Child 0e47b609

Added by Bastian Waidelich over 7 years ago

[BUGFIX] Fix PSR-4 support for Flow packages

Basic support for ``PSR-4`` structured packages has been added with
Flow 2.2 (see I9b2dae7761ef48389d9915c1269df2fdf771af8c).

However, automatic re-reflection didn't work for PSR-4 Flow packages.
Besides, custom ``Package.php`` files were expected to be located at
``Acme.PackageKey/Classes/Acme/PackageKey/Package.php`` which is not in
sync with PSR-4.

This change fixes the two issues by extracting the actual class name
from the actual PHP files instead of trying to defer it from the file
path. Besides it replaces the static lookup path for custom
``Package.php`` files taking the ``autoload`` property of the composer
manifest into account.

Note: While this fixes basic support for PSR-4 Flow still doesn't support
all composer features. Primarily there is a 1:1 mapping from package to
autoloading type and classes path while composer manifests support
multiple mappings by namespace.

Change-Id: I9c613df54a8b650c53b4ab8e03071432e13d3c4e
Releases: master, 3.0
Related: FLOW-238

  • added
  • modified
  • copied
  • renamed
  • deleted