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

Rest of file silently ignored after a certain string literal [PHP] #9520

Closed
Krinkle opened this issue Aug 16, 2022 · 5 comments
Closed

Rest of file silently ignored after a certain string literal [PHP] #9520

Krinkle opened this issue Aug 16, 2022 · 5 comments

Comments

@Krinkle
Copy link
Contributor

Krinkle commented Aug 16, 2022

Describe the bug
Rest of file silently ignored after a certain string literal.

Expected behavior

Warnings about a problem, or, for it to work as-is.

Screenshots

Code from https://github.com/wikimedia/mediawiki/blob/2ec4f75dd60ea687f23867d9170fa7e38aa75659/includes/MainConfigSchema.php output at https://doc.wikimedia.org/mediawiki-core/master/php/classMediaWiki_1_1MainConfigSchema.html. About half the file's members are missing from the documentation index.

I've attached an isolated example using a very short file, and a near-empty Doxyfile. In further brief, this is what the issue looks like:

	/**
	 * This works.
	 */
	public const NamespaceAliases = [
		'default' => [],
		'type' => 'map',
	];

	/**
	 * This is and the rest of the file is ignored.
	 */
	public const LegalTitleChars = [
		'default' => ' %!"$&\'()*,\\-.\\/0-9:;=?@A-Z\\\\^_`a-z~\\x80-\\xFF+',
	];

	/**
	 * Gone.
	 */
	public const InterwikiExpiry = [
		'default' => 10800,
	];

Screenshot 2022-08-16 at 15 01 58

To Reproduce
Archive.zip

Version
1.9.1 is affected
1.9.5 is also affected.

Additional context

Looks related in impact to #8569. Might be unrelated in cause, though.

@albert-github
Copy link
Collaborator

albert-github commented Aug 16, 2022

I don't think the problem has to do with the issue #8569 as that is a comments.
Here the problem looks like to be in the line:

'default' => ' %!"$&\'()*,\\-.\\/0-9:;=?@A-Z\\\\^_`a-z~\\x80-\\xFF+',

where the " is not handled properly in the scanner.l. as when removing the " it is processed properly.

A mean workaround is:

'default' => ' %!"$&\'()*,\\-.\\/0-9:;=?@A-Z\\\\^_`a-z~\\x80-\\xFF+', //"

though in the documentation this will give an incorrect initial value
image

albert-github added a commit to albert-github/doxygen that referenced this issue Aug 16, 2022
…ng literal [PHP]

For PHP we also have to handle in the square brackets the `'...'` string.
@albert-github
Copy link
Collaborator

I've just pushed a proposed patch, pull request #9521

@albert-github
Copy link
Collaborator

Small remark about the issue itself, when specifying a doxygen version and especially with the master version specify the full version from doxygen -v.
I saw the problem still present in 1.9.5 (d3a03e7 so based my work upon this version.

doxygen added a commit that referenced this issue Aug 17, 2022
issue #9520 Rest of file silently ignored after a certain string literal [PHP]
@albert-github albert-github added the fixed but not released Bug is fixed in github, but still needs to make its way to an official release label Aug 17, 2022
@albert-github
Copy link
Collaborator

Code has been integrated in master on GitHub (please don't close the issue as this will be done at the moment of an official release).

@doxygen
Copy link
Owner

doxygen commented Aug 26, 2022

This issue was previously marked 'fixed but not released',
which means it should be fixed in doxygen version 1.9.5.
Please verify if this is indeed the case. Reopen the
issue if you think it is not fixed and please include any additional information
that you think can be relevant (preferably in the form of a self-contained example).

@doxygen doxygen removed the fixed but not released Bug is fixed in github, but still needs to make its way to an official release label Aug 26, 2022
@doxygen doxygen closed this as completed Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants