Skip to content

Optional dep dependencies improvment #12

@remicollet

Description

@remicollet

Discover in owncloud stack:

Owncloud pulls Monolog

  • Monolog requires aws/sdk either v2 or v3
  • aws/ask requires guzzle either v5 or v6
  • owncloud requires guzzle v5 only

For now, the workaround is to load autoloader in correct order (Guzzle v5, Aws v2, Monolog)

BTW, we don't have any way in a package (e.g. Monolog) to NOT load aws sdk if already loaded.

I mean

\Fedora\Autoloader\Dependencies::madatory(array(
        '/usr/share/php/Aws/autoload.php',
));

Will load v2 autoloader

\Fedora\Autoloader\Dependencies::optional(array(
    array(
        '/usr/share/php/Aws3/autoload.php',
        '/usr/share/php/Aws/autoload.php',
)));

Will load v3, even if v2 already loaded by a previous call.

Improving this will require to manage a static list of already included files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions