Skip to content
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

Feature/better escaping #69

Merged
merged 3 commits into from
Jan 3, 2025
Merged

Feature/better escaping #69

merged 3 commits into from
Jan 3, 2025

Conversation

adam-vessey
Copy link
Contributor

GitHub Issue: (link)

  • Other Relevant Links (Google Groups discussion, related pull requests, Release pull requests, etc.)

What does this Pull Request do?

Allows command invocations to be passed as arrays, in order to make use of PHP's improved escaping mechanisms (as of PHP 7.4, in proc_open())

What's new?

Callers may now pass commands to be executed as an array.

  • Changes x feature to such that y
  • Added x
  • Removed y
  • Does this change require documentation to be updated? Not aware of any.
  • Does this change add any new dependencies? Not really, though the use of PHP 8.0's match() might be pulling up the minimum PHP that things will run against. We only test on 8.1+, so probably not an issue?
  • Does this change require any other modifications to be made to the repository (i.e. Regeneration activity, etc.)? No.
  • Could this change impact execution of existing code? Shouldn't, unless running PHP <8.0.

How should this be tested?

Run the tests. Can be run on each commit individually by checking out and then running. The first commit, the "string" invocations should work and the "array" invocations fail. The second commit has both working.

Additional Notes:

Any additional information that you think would be helpful when reviewing this PR.

Interested parties

Tag (@ mention) interested parties or, if unsure, @Islandora/committers

@seth-shaw-asu
Copy link
Member

Could you also update the badge and requirements section of the README? Just so we can keep it consistent.

@seth-shaw-asu
Copy link
Member

I'll try to get this tested on Monday if I run out of time today.

@adam-vessey
Copy link
Contributor Author

Could you also update the badge and requirements section of the README? Just so we can keep it consistent.

Sure thing, just noticed it actually. Had initially just looked in the composer.json for any constraints on PHP there, and not really thought any more of it. :P

@seth-shaw-asu seth-shaw-asu merged commit 0e7b0e4 into 4.x Jan 3, 2025
3 checks passed
@joecorall joecorall deleted the feature/better-escaping branch January 3, 2025 20:14
@seth-shaw-asu
Copy link
Member

Note to self (or anyone else who is interested in this); I'm trying to get better about developing in docker containers, so I made the following Dockerfile to help me run tests for this PR: https://gist.github.com/seth-shaw-asu/a07d998f2124be52abb45ce30bcc09bd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants