-
Notifications
You must be signed in to change notification settings - Fork 470
Description
Description:
- Include specific context details that have been discovered that surround this developer task.
- Link related tickets
I'm not well versed in PHP so this might not be an issue but I've noticed that the GitHub Actions runs are showing missing locale keys for Validator tests. I think the reason is that it passes is because it is asserting false but I don't think it is failing for the right reasons. Could we take a look at these validator AssertFalse tests so they aren't throwing so many missing keys.
Sample code where they are being tested in the PHPunit Tests
Steps to test the changes:
- Run the phpunit tests and it should pass validator tests with correct validation rule.
Solution: What the proposed solutions are and additional affected areas
Either we can remove these validator checks or we can add a rule so that it passes without missing locale keys. I gave a reason for what is happening. I'm not sure if this is expected but when going through these logs it seems like the test isn't doing what it should be doing.
What application are you using?
OJS 3.5 and main but GitHub Actions all PHPunit test runs.
Additional information
Please add any screenshots, videos or other information we can use to understand this dev task report.
After parsing the key with the rule it returns with a key that isn't available so it concatenates to an unknown gibberish key like "validation.values.value.anything else". This will return false because of a missing key and still assert true because the test is expected to fail. I am not sure if the intent of this isValid method is correctly being asserted by this test
PRs
Stable-3.5.0
ojs --> pkp/ojs#4966
ops --> pkp/ops#1043
omp --> pkp/omp#2056
pkp-lib --> #11597
ojs --> pkp/ojs#4978 [TEST ONLY]
omp --> pkp/omp#2075 [TEST ONLY]
ops --> pkp/ops#1062 [TEST ONLY]
main
pkp-lib --> #12016
ojs --> pkp/ojs#5174
omp --> pkp/omp#2186
ops --> pkp/ops#1154
staticPages --> pkp/staticPages#89
webFeed --> pkp/webFeed#16
googleScholar --> pkp/googleScholar#33
customBlockManager --> pkp/customBlockManager#92
googleAnalytics --> pkp/googleAnalytics#62
tinymce --> pkp/tinymce#97
browse --> pkp/browse#15
crossref-ojs --> pkp/crossref-ojs#78
crossref-ops --> pkp/crossref-ops#57
PR Impacts [main (upcoming 3.6)]:
What has changed
- const
PKP_STRICT_MODEhas been removed - The
class_aliasis removed so form now on need to use fully qualified namespace for classes - Unit test will always run in strict mode backed by specific const
PKP_PHPUNIT_STRICT_MODEinphpunit-bootstrap.php - Deprecated
instantiatehas been removed. PluginRegistry::deprecatedInstantiatePluginhas been removed so plugin instantiation using deprecated approach will not work- Locale missing log will be only available when the app running in strict mode
- All the dot notation class paths (e.g. classes::classes.submission.Submission) specifically related to filters has been updated with proper namespace path
For Plugin development
- Plugin should follow the proper namespace path
- Plugins not following proper namespace path will need to have wrapper
index.phpin the plugin path - Plugin not following proper namespace and not having a wrapper
index.phpwill be failed to initialize
NOTE : require to run the migration PKP\migration\upgrade\v3_6_0\I11583_ClassNamespaceFromDotNotationClassPath as
php lib/pkp/tools/migration.php "PKP\\migration\\upgrade\\v3_6_0\\I11583_ClassNamespaceFromDotNotationClassPath" up
