36faf696 | 21-Jan-2020 |
Michael Große <mic.grosse@googlemail.com> |
Split out temporary code style excludes
Splitting them out allows for plugins to use _test/phpcs.xml as the basis for their own linting without having an overly permissive coding standard. Also, thi
Split out temporary code style excludes
Splitting them out allows for plugins to use _test/phpcs.xml as the basis for their own linting without having an overly permissive coding standard. Also, this makes it more obvious and painful that these are just intended as temporary exceptions and should be actually fixed.
The rule `Generic.ControlStructures.InlineControlStructure.NotAllowed` has its comment adjust to make it clear that this is an intended deviation from the PSR-2/PSR-12 coding standard.
The rule `PSR1.Classes.ClassDeclaration.MissingNamespace` has to remain in the DokuWiki coding standard as the plugin base classes can currently not reasonably be in namespaces.
show more ...
|
4352f974 | 22-Jan-2020 |
Andreas Gohr <gohr@cosmocode.de> |
Better callable support in Event default actions
Instead of parsing the passed callback ourselves, this patch relies on call_user_func_array() instead to call an Event's default action. This ensures
Better callable support in Event default actions
Instead of parsing the passed callback ourselves, this patch relies on call_user_func_array() instead to call an Event's default action. This ensures all possible ways to define a callback (including static methods) can be used.
This should fix a problem mentioned in #2943
show more ...
|
c083b3ca | 20-Jan-2020 |
Satoshi Sahara <sahara.satoshi@gmail.com> |
create PluginUtils.test.php |
2f5645ef | 19-Jan-2020 |
Phy <git@phy25.com> |
add trim, and polish test_quotes of css_compress, again
An edge case that space at the beginning won't get removed. |
74be1290 | 19-Jan-2020 |
Phy <git@phy25.com> |
polish test_quotes of css_compress
Now the testcase string should be clearer to read |
c52c9e2b | 19-Jan-2020 |
Henry Pan <git@phy25.com> |
Add test_escapedQuotes to css_compress
Thank you @micgro42!
Co-Authored-By: Michael Große <mic.grosse@googlemail.com> |
903d43fe | 31-Dec-2019 |
Michael Große <mic.grosse@googlemail.com> |
Check code style against PSR12
In 2019 PSR-12 was officially released and PSR-2 deprecated. We should adapt to that and check our files against that new coding standard. |
6225b270 | 28-Dec-2019 |
Michael Große <mic.grosse@googlemail.com> |
Extract dokuwiki\Search\Indexer class
Not sure why Doku_Indexer caused phpcs to complain about the class name not being in PascalCase, but Doku_Handler didn't.
The namespace and new class name w
Extract dokuwiki\Search\Indexer class
Not sure why Doku_Indexer caused phpcs to complain about the class name not being in PascalCase, but Doku_Handler didn't.
The namespace and new class name was selected to be compatible with the upcoming changes in #2943. This should hpopefully reduce the overall hassle of touching the same code base.
show more ...
|
cc8fc761 | 28-Dec-2019 |
Michael Große <mic.grosse@googlemail.com> |
Ignore some more definitions
Some of the files are still having both logic and side-effects for legacy reasons. We are excluding them for now and might deal with them later. |
e3cafdc2 | 28-Dec-2019 |
Michael Große <mic.grosse@googlemail.com> |
Check our code style for every PR
This excludes the currently failing checks with automatic fixes, as they are out of scope of this commit. The current goal is automatically reject pull requests tha
Check our code style for every PR
This excludes the currently failing checks with automatic fixes, as they are out of scope of this commit. The current goal is automatically reject pull requests that don't me the standards that the rest of our code base already follows.
show more ...
|
68491db9 | 01-Dec-2019 |
Phy <git@phy25.com> |
PHP8 fix part 5: Trying to access array offset on value of type bool/null |
fc21b37b | 31-Oct-2019 |
Andreas Gohr <gohr@cosmocode.de> |
Ignore certain HTML validity errors
We use the ugc (user generated content) value for no-follow links since #2855 this is not yet supported in the validator.
This patch introduces a list of ignored
Ignore certain HTML validity errors
We use the ugc (user generated content) value for no-follow links since #2855 this is not yet supported in the validator.
This patch introduces a list of ignored error messages.
show more ...
|
63b6cc52 | 30-Oct-2019 |
Syntaxseed <825423+syntaxseed@users.noreply.github.com> |
Fix curly brace deprecations in _test/ directory. |
dbdd6a0c | 21-Oct-2019 |
Phy <git@phy25.com> |
clientIP: modify test to assume trusted proxy be included in IP array |
445b9378 | 21-Oct-2019 |
Phy <git@phy25.com> |
clientIP: Add tests addressing #2828
We cannot trust any IP not included in $conf['trustedproxy']. |
60ea9a07 | 20-Oct-2019 |
Phy <git@phy25.com> |
getGoogleQuery: add tests |
768be5a3 | 16-Sep-2019 |
Phy <git@phy25.com> |
Add "default" keyword support for interwiki links
Thank you @selfthinker for the suggestion!
If nothing is found in default, it will still fall back to "". Test is added as well.
Meantime I fixed
Add "default" keyword support for interwiki links
Thank you @selfthinker for the suggestion!
If nothing is found in default, it will still fall back to "". Test is added as well.
Meantime I fixed a problem that Scrutinizer complained about.
show more ...
|
abde5980 | 18-Jun-2019 |
Phy <git@phy25.com> |
Remove Google Lucky for non-existing interwiki links
For compatibility renderer will return string '' of $shortcut and $url instead of NULL when seeing a non-existing interwiki link. In the meantime
Remove Google Lucky for non-existing interwiki links
For compatibility renderer will return string '' of $shortcut and $url instead of NULL when seeing a non-existing interwiki link. In the meantime, media and link output in xhtml renderer is adjusted, to show title text instead when src/href is null. In interwiki case, the title will be the "reference" part of the interwiki link.
This makes it possible to also support no URL cases in `interwiki.conf`. Before it will output a URL as `rawurlencode($reference)`, which doesn't make too much sense since it's encoded. However, I am not sure the use case under the current behavior (no URL, but text as `$reference`).
Docs needs to be added to warn renderer plugin developers of this situation.
This fixes #2588.
show more ...
|
5fdc2ff2 | 17-Sep-2019 |
Phy <git@phy25.com> |
css_compress: quote placeholder to simply quote protection
There are two ways of doing this:
1. "doku" > STR1 > "doku" 2. "doku" > "1" > "doku"
#1 is what I did before. I did replace STRN with a n
css_compress: quote placeholder to simply quote protection
There are two ways of doing this:
1. "doku" > STR1 > "doku" 2. "doku" > "1" > "doku"
#1 is what I did before. I did replace STRN with a new placeholder in the previous implementation so that there is no conflict. However #2 is more elegant, so this commit implements it.
Test is updated to address splitbrain's concern about placeholder string in the original text.
show more ...
|
a9bd2f2f | 10-Jan-2019 |
Phy <git@phy25.com> |
add quotes test for #2517 |
fe52a7ca | 17-Oct-2019 |
Mark Janssen <mpc.janssen@gmail.com> |
Add failing unit test for #2883 |
0af8c6fb | 15-Oct-2019 |
Andreas Gohr <gohr@cosmocode.de> |
added group internet to html validity checks
Because we use an online validator |
4af692c2 | 15-Oct-2019 |
Andreas Gohr <gohr@cosmocode.de> |
Avoid flaky tests by waiting full seconds
The waitForTick() method tried to be clever and return early if a second had passed since the last call already. Unfortunatel this did not work reliably in
Avoid flaky tests by waiting full seconds
The waitForTick() method tried to be clever and return early if a second had passed since the last call already. Unfortunatel this did not work reliably in our tests and we often had failures on tests that required unique revision numbers.
Pull requests for a reliable version welcome. Until the we wait a second on each call.
show more ...
|
5706b907 | 09-Sep-2019 |
Phy <git@phy25.com> |
lock fetch PHPUnit version to 7 for PHP5 |
457a5f78 | 16-Aug-2019 |
Andreas Gohr <andi@splitbrain.org> |
use a script to fetch the correct phpunit
We should replace this with a composer dev dependency some time.
There's still a failing mysql test. Gotta figure out what's happening there. But at least
use a script to fetch the correct phpunit
We should replace this with a composer dev dependency some time.
There's still a failing mysql test. Gotta figure out what's happening there. But at least the tests work at all again
show more ...
|