Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix - Call to undefined function Composer\Autoload\includeFile() #2

Closed
johanjanssens opened this issue Jun 19, 2015 · 1 comment
Closed
Labels

Comments

@johanjanssens
Copy link
Member

Joomla 3.4 is extending Composer\Autoload\ClassLoader to make sure JLoader::applyAliasFor($class); is called when a class is being loaded.

Description

The implementation in Joomla 3.4 prevents to use composer in your own extension and requires developers to implement a workaround first.

To resolve this the PR rewrites the implementation and instead of extending Composer\Autoload\ClassLoader it decorates it. This is the advised approach to handle this scenario by the Composer team. For details see following discussion.

Additionally the fix brings the Composer integration in Joomla more inline with Composer itself. The specialised composer_autoload.php file is removed in favour of the autoload.php file generated by Composer.

List of changes

  • Remove /libraries/composer_autoload.php use default /libraries/vendor/autoload.php as per composer specification
  • Decorate \Composer\Autoload\ClassLoader through JClassLoader
  • Unregister default class loader and register decorator during Joomla Cms bootstrapping

Testing instructions

Make sure Joomla still works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant