Skip to content
This repository has been archived by the owner on Mar 27, 2018. It is now read-only.

hoa break when installed globaly #67

Closed
mikeSimonson opened this issue Jan 13, 2015 · 3 comments · Fixed by #68
Closed

hoa break when installed globaly #67

mikeSimonson opened this issue Jan 13, 2015 · 3 comments · Fixed by #68
Assignees
Labels

Comments

@mikeSimonson
Copy link
Contributor

Hi,

The main hoa file in the Bin folder does not require the autoload from composer properly.

Here is an example.
https://github.com/tomzx/php-semver-checker/blob/master/bin/php-semver-checker

@Hywan Hywan added the bug label Jan 13, 2015
@Hywan Hywan self-assigned this Jan 13, 2015
@Hywan
Copy link
Member

Hywan commented Jan 13, 2015

@mikeSimonson How do you install Hoa? Can you me an example please because I am not able to reproduce the bug. As far as I can see,

Core/Bin/Hoa.php

Lines 46 to 52 in 9fa8258

$composer = dirname(__DIR__) . DIRECTORY_SEPARATOR .
'..' . DIRECTORY_SEPARATOR .
'..' . DIRECTORY_SEPARATOR .
'autoload.php';
if(file_exists($composer))
require_once $composer;
, Composer's autoloader is well-included :-/.

@mikeSimonson
Copy link
Contributor Author

I installed https://github.com/Halleck45/PhpMetrics/ globally with :

composer global require Halleck45/PhpMetrics

It installed hoa because it's a dependency.
But hoa is not working on it's own because it try to require the autoload.php as if it was installed in a project build with composer.
Here when installed globally the autolad.php is not in a vendor directory and it's one more level up in the directory structure.

If you look at the example I give in my first message you will see that there are 2 path indicated to find the autoload.php

@Hywan
Copy link
Member

Hywan commented Jan 13, 2015

@mikeSimonson Hmm interesting. Could you make a PR?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging a pull request may close this issue.

2 participants