Skip to content
This repository has been archived by the owner on Nov 22, 2019. It is now read-only.

template.xml not recognizing absolute paths when phpDoc installed globally? #67

Open
lamoni opened this issue Mar 25, 2015 · 0 comments

Comments

@lamoni
Copy link

lamoni commented Mar 25, 2015

Hello all,

I'm trying to set template.xml to use an absolute path but it doesn't seem to be working. It seems to just append the absolute path to an already existing path (which in my scenario, is my /home/.composer/vendor/phpdocumentor/phpdocumentor directory).

Excerpt from output (using --template="/var/www/config/phpDocumentor/template.clean/"):

  [phpDocumentor\Transformer\Exception]                                                                                                                                                                               
  Unable to read the source file: /home/lamoni/.composer/vendor/phpdocumentor/phpdocumentor/src/phpDocumentor/Transformer/../../../../templates/abstract//var/www/config/phpDocumentor/template.clean/htaccess.dist  

And my template:

<?xml version="1.0" encoding="utf-8"?>
<template>
  <author>Mike van Riel</author>
  <email>mike@phpdoc.org</email>
  <version>1.0.0</version>
  <copyright>Mike van Riel 2013</copyright>
  <description><![CDATA[

      To improve performance you can add the following to your .htaccess:

      <ifModule mod_deflate.c>
          <filesMatch "\.(js|css|html)$">
              SetOutputFilter DEFLATE
          </filesMatch>
      </ifModule>
  ]]></description>
  <transformations>
    <transformation query="copy" writer="FileIo" source="/var/www/config/phpDocumentor/template.clean/htaccess.dist" artifact=".htaccess"/>
    <transformation query="copy" writer="FileIo" source="/var/www/config/phpDocumentor/template.clean/images" artifact="images"/>
    <transformation query="copy" writer="FileIo" source="/var/www/config/phpDocumentor/template.clean/css" artifact="css"/>
    <transformation query="copy" writer="FileIo" source="/var/www/config/phpDocumentor/template.clean/js" artifact="js"/>
    <transformation query="copy" writer="FileIo" source="/var/www/config/phpDocumentor/template.clean/font" artifact="font"/>
    <transformation writer="twig" query="namespace" source="/var/www/config/phpDocumentor/template.clean/namespace.html.twig" artifact="index.html"/>
    <transformation writer="twig" query="indexes.namespaces" source="/var/www/config/phpDocumentor/template.clean/namespace.html.twig" />
    <transformation writer="twig" query="indexes.classes" source="/var/www/config/phpDocumentor/template.clean/class.html.twig" />
    <transformation writer="twig" query="indexes.interfaces" source="/var/www/config/phpDocumentor/template.clean/interface.html.twig" />
    <transformation writer="twig" query="indexes.traits" source="/var/www/config/phpDocumentor/template.clean/class.html.twig" />
    <transformation writer="twig" query="files" source="/var/www/config/phpDocumentor/template.clean/file.html.twig" />
    <transformation writer="twig" query="files" source="/var/www/config/phpDocumentor/template.clean/file.source.txt.twig" artifact="files/{{path}}.txt"/>
    <transformation writer="twig" source="/var/www/config/phpDocumentor/template.clean/reports/markers.html.twig" artifact="reports/markers.html"/>
    <transformation writer="twig" source="/var/www/config/phpDocumentor/template.clean/reports/errors.html.twig" artifact="reports/errors.html"/>
    <transformation writer="twig" source="/var/www/config/phpDocumentor/template.clean/reports/deprecated.html.twig" artifact="reports/deprecated.html"/>
    <transformation writer="twig" source="/var/www/config/phpDocumentor/template.clean/graphs/class.html.twig" artifact="graphs/class.html"/>
    <transformation writer="Graph" source="Class" artifact="graphs/classes.svg" />
  </transformations>
</template>

Is there a correct way to override that prepended path? Or is it convention that we put the templates in that folder, or is this an actual bug?

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

No branches or pull requests

1 participant