Skip to content

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.

2 participants