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

add PHPDOX_HOME, instead of PHPDOX_PHAR #180

Merged
merged 2 commits into from
Nov 29, 2014

Conversation

remicollet
Copy link
Contributor

Everywhere, this constant is used as 'phar://' . PHPDOX_PHAR

Having PHPDOX_HOME will make downstream distribution easier, just having to define its value with the path of static files (outside the library "src" dir) in the launcher (probably '/usr/share/phpdox')

The only remaining usage of PHPDOX_PHAR is

   $phpdoxNode->setAttribute('phar', defined('PHPDOX_PHAR') ? 'yes' : 'no');

This could easily be removed

   $phpdoxNode->setAttribute('phar', 
        defined('PHPDOX_HOME') && strpos(PHPDOX_HOME, 'phar:')===0 ? 'yes' : 'no');

But perhaps, if you want to be aware of origin of "phpdox" command used, something more generic can be use instead

   $phpdoxNode->setAttribute('distribution', defined('PHPDOX_DIST') ? PHPDOX_DIST : 'src');

And of course, you have to define it as 'phar' in phar/autoload.in, and downstream to 'rpm', 'deb', or whatever else.

theseer added a commit that referenced this pull request Nov 29, 2014
add PHPDOX_HOME, instead of PHPDOX_PHAR
@theseer theseer merged commit 2f00227 into theseer:master Nov 29, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants