-
Notifications
You must be signed in to change notification settings - Fork 7.8k
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
Organize Zend/tests/*.phpt
tests into subdirectories for easier navigation
#15631
Comments
Hi @DanielEScherzer. That will be a pain in the butt when merging bug fixes upward. Not sure I'd be in favor. |
I hadn't thought about that. But, looking through all 8.2 commits since the start of the month, I only count 6 commits that modify or delete existing test files (rather than adding new files, which shouldn't cause problems) and all 6 are for extensions (7878a2c, 1b52ecd, 4d71580, 2829065, 6713d51, 11fbe88). In fact, I had to go all the way back to your May 6 commit f8d1864 to find an 8.2 commit that affected existing Zend test files, and the most recent for 8.3 that I could find was also from you that day, 5aa5080 My understanding from looking through the git history is that normally bug fixes only result in adding new tests, since changing existing tests suggests that the fix also modifies some stable behavior? |
Not problems, per-se. But if the idea is to split the tests, then they probably no longer belong in root and will have to be moved again. |
My proposal was just to split the tests enough to be navigable on GitHub, I'm not suggesting to create a strict hierarchy - we would still most likely end up with a bunch of tests in the top level. How about I send a demo patch to show what I'm thinking? |
Modifying the directory structure is always a bit of an issue, not only for merging, but also for Maybe we should start moving all bug*.phpt and bug* directories to a bug/ directory, and do the same for gh*. Especially the former would reduce the number of toplevel dirents considerably. And if occassionally a file is not moved into the right directory when merging up, that's not a big deal anyway. |
Move some low-hanging fruit, creating new directories for the tests for * access modifiers * `class_alias()` * constant expressions * constructor property promotion * `__debugInfo()` * dereferencing * first class callable syntax Additionally, move some tests into the existing sub directory for closure-related tests Work towards phpGH-15631
Just wanting to note that there is https://docs.github.com/en/repositories/working-with-files/using-files/viewing-a-file#ignore-commits-in-the-blame-view to allow ignoring some commits via git blame, that might satisfy the concerns I sent #15638 as a demonstration of what I was thinking - while I agree that having a top-level |
Move some low-hanging fruit, creating new directories for the tests for * access modifiers * `class_alias()` * constant expressions * constructor property promotion * `__debugInfo()` * dereferencing * first class callable syntax Additionally, move some tests into the existing sub directory for closure-related tests Work towards phpGH-15631
Move some low-hanging fruit, creating new directories for the tests for * access modifiers * `class_alias()` * constant expressions * constructor property promotion * `__debugInfo()` * dereferencing * first class callable syntax Additionally, move some tests into the existing sub directory for closure-related tests Work towards phpGH-15631
Move some low-hanging fruit, creating new directories for the tests for * access modifiers * `class_alias()` * constant expressions * constructor property promotion * `__debugInfo()` * dereferencing * first class callable syntax Additionally, move some tests into the existing subdirectory for closure-related tests Work towards GH-15631
Move more low-hanging fruit, creating new directories for the tests for * comparisons * dynamic calls * error messages * `error_reporting()` * exceptions * `foreach()` * garbage collection * group `use` statements * heredoc and nowdoc * `goto` jumps * late static binding * magic methods * namespaces * numeric literal separators * objects * oss-fuzz casse * `settype()` * cleaning of temporary values * `unset()` Additionally, move some tests into the existing sub directory for `list()` tests. Also fix some test numbers in the names of the `goto` tests. Work towards phpGH-15631
@cmb69 I see that you linked my PR as closing this issue - it was merely intended as a first step, https://github.com/php/php-src/tree/master/Zend/tests still reports
Would you mind re-opening this issue? I don't seem to have the rights to do so. |
Move more low-hanging fruit, creating new directories for the tests for * comparisons * dynamic calls * error messages * `error_reporting()` * exceptions * `foreach()` * garbage collection * group `use` statements * heredoc and nowdoc * `goto` jumps * late static binding * magic methods * namespaces * numeric literal separators * objects * oss-fuzz cases * `settype()` * cleaning of temporary values * `unset()` Additionally, move some tests into the existing sub directory for `list()` tests. Also fix some test numbers in the names of the `goto` tests. Work towards phpGH-15631
Move more low-hanging fruit, creating new directories for the tests for: * comparisons * dynamic calls * error messages * `error_reporting()` * exceptions * `foreach()` * garbage collection * group `use` statements * heredoc and nowdoc * `goto` jumps * late static binding * magic methods * namespaces * numeric literal separators * objects * `settype()` * cleaning of temporary values * `unset()` Additionally, move some tests into the existing subdirectory for `list()` tests. Drive-by fixes of some test numbers in the names of the `goto` tests. Work towards GH-15631
First pass at moving `Zend/tests/bug*` tests to existing sub directories Work towards phpGH-15631
First pass at moving `Zend/tests/bug*` tests to existing sub directories Work towards phpGH-15631
First pass at moving `Zend/tests/bug*` tests to existing sub directories Work towards phpGH-15631
First pass at moving `Zend/tests/bug*` tests to existing sub directories Work towards GH-15631
First pass at moving `Zend/tests/gh*` tests to existing sub directories Work towards phpGH-15631
First pass at moving `Zend/tests/gh*` tests to existing sub directories Work towards GH-15631
Second pass through `Zend/tests/bug*` to organize the tests. Move tests to existing sub directories, and create some new sub directories: * `ArrayAccess` * `autoload` * `clone` * `serialize` (also covers `unserialize()`) * `switch` Work towards phpGH-15631
Second pass through `Zend/tests/bug*` to organize the tests. Move tests to existing sub directories, and create some new sub directories: * `ArrayAccess` * `autoload` * `clone` * `serialize` (also covers `unserialize()`) * `switch` Work towards GH-15631
Move more tests into existing directories Work towards phpGH-15631
Move more tests into existing directories Work towards GH-15631
Create a new subdirectory for tests relating to inheritance Work towards phpGH-15631
Create a new subdirectory for tests relating to inheritance Work towards GH-15631
Create new sub directories for tests related to backtraces and for tests related to `$this` being reserved in different places and not being usable or reassignable. Work towards phpGH-15631
Description
I wanted to take a look at any of the enum-related tests, but on GitHub navigating to https://github.com/php/php-src/tree/master/Zend/tests shows
I propose that the tests that are directly in the top-level
Zend/tests/*.phpt
be organized a bit with sub directories so that they can be navigated more easily, both on GitHub and in downloaded copies of PHP. For an easy example, there are 21 different tests for creating class aliases,class_alias_001.phpt
throughclass_alias_021.phpt
- these could be grouped together in their own directory (probably just namedclass_alias
).I'm happy to send the patches to work on this reorganization if there is buy-in, but figured I should ask before I started the work. Since this doesn't affect the actual execution of PHP I didn't think it was applicable to propose on the internals list, so adding it here.
PS: this is tagged as a feature but only because that was the most applicable of the GitHub issue forms, but it isn't really a feature
The text was updated successfully, but these errors were encountered: