ext-php-rs icon indicating copy to clipboard operation
ext-php-rs copied to clipboard

feat(cargo-php)!: escalate privilege and to copy extension and edit ini file

Open dilawar opened this issue 6 months ago • 6 comments

Fixes: #481 BREAKING CHANGE: installing extensions as root user will now fail unless --bypass-root-check is provided

dilawar avatar Jul 03 '25 06:07 dilawar

Pull Request Test Coverage Report for Build 16323306954

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 48 (0.0%) changed or added relevant lines in 1 file are covered.
  • 193 unchanged lines in 10 files lost coverage.
  • Overall coverage increased (+0.6%) to 22.222%

Changes Missing Coverage Covered Lines Changed/Added Lines %
crates/cli/src/lib.rs 0 48 0.0%
<!-- Total: 0 48
Files with Coverage Reduction New Missed Lines %
crates/cli/src/lib.rs 2 0.0%
src/builders/sapi.rs 3 96.67%
src/zend/mod.rs 4 0.0%
build.rs 5 0.0%
src/args.rs 7 81.61%
src/embed/mod.rs 9 66.67%
unix_build.rs 11 0.0%
src/flags.rs 13 27.38%
src/zend/globals.rs 51 15.26%
crates/macros/src/function.rs 88 0.0%
<!-- Total: 193
Totals Coverage Status
Change from base Build 16035783050: 0.6%
Covered Lines: 870
Relevant Lines: 3915

💛 - Coveralls

coveralls avatar Jul 03 '25 13:07 coveralls

Maybe we can check if we are running with root without needing the dependency, but haven't looked into that.

I'll borrow the function from elevate/sudo crate that check if we are running as root. Knowing the uid/gui should be sufficient here.

dilawar avatar Jul 04 '25 03:07 dilawar

@dilawar Thank you! Could you update the guide documentation to include the new behaviour?

The git commit history could benefit from a cleanup as well. See the CONTRIBUTING.md.

Xenira avatar Jul 17 '25 15:07 Xenira

I'll definitely give it a shot, but I am terrible at writing! I'll rebase/cleanup git history.

dilawar avatar Jul 17 '25 18:07 dilawar

I'll definitely give it a shot, but I am terrible at writing! I'll rebase/cleanup git history.

I can do the documentation :)

Xenira avatar Jul 17 '25 18:07 Xenira

nix::unistd looks like a better fit.

kakserpom avatar Jul 19 '25 14:07 kakserpom