Skip to content

Add uopz extension #364

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

Open
dretsa opened this issue Apr 10, 2023 · 2 comments
Open

Add uopz extension #364

dretsa opened this issue Apr 10, 2023 · 2 comments
Labels
enhancement requested New feature suggested

Comments

@dretsa
Copy link

dretsa commented Apr 10, 2023

Expected Behavior

It would be nice if this extension is supported even more so when this image's purpose is for testing/development.

Context

It allows mocking of internal functions. My use case is mocking the DateTime constructor for unit tests.

@dretsa
Copy link
Author

dretsa commented Apr 10, 2023

Managed to install it by adding the following to my Dockerfile:

USER root
RUN apt-get update
COPY --chmod=755 docker/install_uopz.sh /usr/local/lib/thecodingmachine-php/extensions/current/uopz/install_uopz.sh
RUN cd /usr/local/lib/thecodingmachine-php/extensions/current/uopz && ./install_uopz.sh
USER docker

One important workaround is that this extension breaks check_php_env_var_changes.php, which runs on container start. To fix it, you need disable the uopz.exit in php.ini, using:

ENV PHP_INI_UOPZ__EXIT=1

You could probably add this using your docker-compose.yml file too.

@stale
Copy link

stale bot commented Jun 9, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please update it if any action still required.

@stale stale bot added the stale Issues inactives for a while (automatically) label Jun 9, 2023
@mistraloz mistraloz added enhancement requested New feature suggested and removed stale Issues inactives for a while (automatically) labels Jun 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement requested New feature suggested
Projects
None yet
Development

No branches or pull requests

2 participants