Skip to content

AbstractUnitObject.php (Line 542): Call to a member function getAttribute() on null #190

@throup

Description

@throup

Getting the following error when trying to generate documentation after clearing the cache.

phpDox 0.7.0-64-gd70cae2 - Copyright (C) 2010 - 2015 by Arne Blankerts

[07.01.2015 - 16:17:36] Using config file 'build/phpdox.xml'
[07.01.2015 - 16:17:36] Registered collector backend 'parser'
[07.01.2015 - 16:17:36] Registered enricher 'build'
[07.01.2015 - 16:17:36] Registered enricher 'git'
[07.01.2015 - 16:17:36] Registered enricher 'checkstyle'
[07.01.2015 - 16:17:36] Registered enricher 'phpcs'
[07.01.2015 - 16:17:36] Registered enricher 'pmd'
[07.01.2015 - 16:17:36] Registered enricher 'phpunit'
[07.01.2015 - 16:17:36] Registered enricher 'phploc'
[07.01.2015 - 16:17:36] Registered output engine 'xml'
[07.01.2015 - 16:17:36] Registered output engine 'html'
[07.01.2015 - 16:17:36] Starting to process project 'project'
[07.01.2015 - 16:17:36] Starting collector
[07.01.2015 - 16:17:36] Scanning directory '/var/lib/jenkins/workspace/project/build/..' for files to process

..................................................  [50]
..................................................  [100]
...............................                     [131]

[07.01.2015 - 16:17:46] Saving results to directory '/var/lib/jenkins/workspace/project/build/logs/phpdox/xml'
[07.01.2015 - 16:17:50] Resolving inheritance

............................................

Oups... phpDox encountered a problem and has terminated!

It most likely means you've found a bug, so please file a report for this
and paste the following details and the stacktrace (if given) along:

PHP Version: 5.6.4 (Linux)
PHPDox Version: 0.7.0-64-gd70cae2
ErrorException: E_ERROR 
Location: /var/lib/jenkins/workspace/project/vendor/theseer/phpdox/src/collector/project/AbstractUnitObject.php (Line 542)

Call to a member function getAttribute() on null

No stacktrace available

If I run phpdox again (now some caches exist) it compiles the documentation:

phpDox 0.7.0-64-gd70cae2 - Copyright (C) 2010 - 2015 by Arne Blankerts

[07.01.2015 - 16:23:05] Using config file 'build/phpdox.xml'
[07.01.2015 - 16:23:05] Registered collector backend 'parser'
[07.01.2015 - 16:23:05] Registered enricher 'build'
[07.01.2015 - 16:23:05] Registered enricher 'git'
[07.01.2015 - 16:23:05] Registered enricher 'checkstyle'
[07.01.2015 - 16:23:05] Registered enricher 'phpcs'
[07.01.2015 - 16:23:05] Registered enricher 'pmd'
[07.01.2015 - 16:23:05] Registered enricher 'phpunit'
[07.01.2015 - 16:23:05] Registered enricher 'phploc'
[07.01.2015 - 16:23:05] Registered output engine 'xml'
[07.01.2015 - 16:23:05] Registered output engine 'html'
[07.01.2015 - 16:23:05] Starting to process project 'project'
[07.01.2015 - 16:23:05] Starting collector
[07.01.2015 - 16:23:05] Scanning directory '/var/lib/jenkins/workspace/project/build/..' for files to process

cccccccccccccccccccccccccccccccccccccccccccccccccc  [50]
cccccccccccccccccccccccccccccccccccccccccccccccccc  [100]
ccccccccccccccccccccccccccccccc                     [131]

[07.01.2015 - 16:23:05] Saving results to directory '/var/lib/jenkins/workspace/project/build/logs/phpdox/xml'
[07.01.2015 - 16:23:05] Collector process completed

[07.01.2015 - 16:23:05] Starting generator
[07.01.2015 - 16:23:05] Loading enrichers
[07.01.2015 - 16:23:05] Enricher Build Information initialized successfully
[07.01.2015 - 16:23:05] Starting event loop.

..................................................  [50]
..................................................  [100]
..................................................  [150]
..................................................  [200]
..................................................  [250]
..................................................  [300]
..................................................  [350]
..................................................  [400]
..................................................  [450]
..................................................  [500]
..................................................  [550]
..................................................  [600]
..................................................  [650]
..................................................  [700]
..................................................  [750]
..................................................  [800]
..................................................  [850]
..................................................  [900]
..................................................  [950]
..................................................  [1000]
..................................................  [1050]
..................................................  [1100]
..................................................  [1150]
..................................................  [1200]
..................................................  [1250]
..................................................  [1300]
..................................................  [1350]
..................................................  [1400]
..................................................  [1450]
..................................................  [1500]
..................................................  [1550]
..................................................  [1600]
..................................................  [1650]
..................................................  [1700]
..................................................  [1750]
..................................................  [1800]
..................................................  [1850]
..................................................  [1900]
..................................................  [1950]
..................................................  [2000]
..................................................  [2050]
..................                                  [2068]

[07.01.2015 - 16:23:28] Generator process completed
[07.01.2015 - 16:23:28] Processing project 'project' completed.


Time: 23.49 seconds, Memory: 3.00Mb

However, the finished documentation does not include any content from the enrichers.

In case it is relevant, my config file:

<?xml version="1.0" encoding="utf-8" ?>
<phpdox xmlns="http://xml.phpdox.net/config" silent="false">
    <project name="project" source="${basedir}/.." workdir="${basedir}/logs/phpdox/xml">
        <collector publiconly="false" backend="parser">
            <include mask="*/application/**.php" />
            <include mask="*/library/**.php" />
            <exclude mask="*/tests/**" />
            <exclude mask="*/vendor/**" />
            <inheritance resolve="true"/>
        </collector>
        <generator output="${basedir}/docs">
            <enrich base="${basedir}/logs">
                <source type="build" />
                <source type="phploc" />
                <source type="git">
                    <git binary="/usr/bin/git" />
                    <history enabled="true" limit="15" cache="${phpDox.project.workdir}/gitlog.xml" />
                </source>
                <source type="phpcs">
                    <file name="phpcs.xml" />
                </source>
                <source type="pmd">
                    <file name="pmd.xml" />
                </source>
                <source type="phpunit">
                    <coverage path="phpunit/coverage" />
                    <filter directory="${phpDox.project.source}" />
                </source>
            </enrich>
            <build engine="html" enabled="true" output="phpdox">
                <template dir="${phpDox.home}/templates/html" />
                <file extension="xhtml" />
            </build>
        </generator>
    </project>
</phpdox>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions