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

Does not recognize page-level DocBlock on "empty" files #604

Closed
ghost opened this issue Sep 20, 2012 · 7 comments
Closed

Does not recognize page-level DocBlock on "empty" files #604

ghost opened this issue Sep 20, 2012 · 7 comments
Labels
Milestone

Comments

@ghost
Copy link

ghost commented Sep 20, 2012

I am running a basic model-view-controller approach. My project contains lots of template files that have a page-level DocBlock, but then continue in plain HTML without any PHP functionality.

Here is an example:

<?php

/**
 * 404.php
 * Copyright 2012 Jan Nikolas Jansen <email removed>
 * 
 * This file is part of Projectname
 * 
 * Projectname is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 * 
 * Projectname is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with Projectname. If not, see <http://www.gnu.org/licenses/>.
 */

?>

<h1>Oops</h1>
<p>The document you are looking for could not be found.</p>
@mvriel
Copy link
Member

mvriel commented Sep 21, 2012

I have captured this use-case in a Behat Feature file and can replicate this behaviour.
It occurs because there is no 'node' to get DocComments from. I will have to find out how this is most easily captured

@mvriel
Copy link
Member

mvriel commented Sep 21, 2012

Demoting this issue to version 2.1 of phpDocumentor; our third-party library controlling the parsing process is currently unable to provide the necessary information. As can be seen in the issue referenced above we are discussing a way to resolve this situation but I personally do not believe this to be blocking for the release of 2.0.0.

Should the issue referenced above is resolved in short notice we can opt to promote this issue back for the release of 2.0.0

@mvriel
Copy link
Member

mvriel commented Sep 21, 2012

Pushed branch 604 containing the Behat test that verifies this behaviour

@ashnazg
Copy link
Member

ashnazg commented May 26, 2017

@mvriel since the nikic/php-parser fix was put in its v2.1.0, will our fix be possible in the 2.x line? Or will the dependency requirements of Reflection to gain php-parser 2.x or 3.x end up forcing phpDocumentor to 3.x or higher?

@jaapio
Copy link
Member

jaapio commented May 26, 2017

I think we can't fix this in v2. If an upgrade of php parser is required. It will remove the option to run on php 5.3. Which we marked as a bc break.

Needs to be scheduled for v3

@jaapio jaapio added this to the 3.0.0 milestone May 26, 2017
@ashnazg
Copy link
Member

ashnazg commented May 26, 2017

Ah, so it is php-parser's own PHP minimum that changed between its 1.x and 2.x that is constraining us... ouch.

@jaapio
Copy link
Member

jaapio commented May 26, 2017

Yes, and we decided to skip php parser v2 and move to v3 directly. Since v2 does not have any additional features we need right now.

@jaapio jaapio added this to To do in Implement v3 parser Dec 26, 2017
@jaapio jaapio closed this as completed in 226eca5 Jan 3, 2019
Implement v3 parser automation moved this from To do to Done Jan 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Development

No branches or pull requests

3 participants