- πΊπΈUnited States jvogt Seattle, WA
Patch #4 applies cleanly to rules 7.x-2.13 with php 8.1 and core 7.95. It resolves the issue of the error message ("Deprecated function: dirname(): Passing null to parameter #1 ($path) of type string is deprecated in drupal_get_path() (line 2974 of /[...]/includes/common.inc).") I haven't tested it beyond that.
- πΊπΈUnited States RobertInOP
Patch #4 also applies cleanly to rules 7.x-2.14, with PHP 8.1 and core 7.98. The message (similar to #5) is no longer logged:
"Deprecated function: dirname(): Passing null to parameter #1 ($path) of type string is deprecated in drupal_get_path() (line 2970 of /[...]/includes/common.inc)."
- πΊπΈUnited States tr Cascadia
There are still no reviews that say anything about testing this new feature and whether it works or not.
The "Deprecated function" warning is something from PHP 8, and is a separate issue from symlinks, and has no bearing on whether this patch achieves its intended goals.
The best way to prove this works, absent community participation in testing, is to write a test case using a symlink. The test case should fail in the current version of Rules because of the problem mentioned in the original post. Then after we apply the patch the test case should now work, which proves that the patch fixes the problem.
A test case is required for new features in Drupal, and Rules is using those same criteria when adding new features. I don't plan to commit this patch without feedback from the community about whether it works, but I could skip that part if there was a good and effective test case included with the patch.
- πΊπΈUnited States tr Cascadia
This symlink issue is potentially causing all tests to fail under PHP 8 on GitLabCI (the test environment uses symlinks ...), so I've created an MR out of the patch in #4 to see if it solves those errors.
- Merge request !50Issue #2483729 by TR, das-peter, hargobind: Symlink support for _rules_discover_module() β (Merged) created by tr
- πΊπΈUnited States tr Cascadia
Restored MR to be identical to the patch + removal of the PHP 7.4 requirement from .gitlab-ci.yml.
Crediting @fjgarlin because he was the one who figured out that the testing problem might be because GitLab CI was using symlinks.
- Status changed to Fixed
4 months ago 6:00pm 8 July 2024 - πΊπΈUnited States tr Cascadia
I'm still not thrilled about committing this without tests, because it will affect about 100,000 legacy sites still running on D7.
On the other hand, I can't support anything about this module without the tests running properly on GitLabCI, so I don't really have a choice. I guess GitLabCI will have to be the practical test that symlink support is working.
Merged. Thanks to all who helped.
Automatically closed - issue fixed for 2 weeks with no activity.