Skip to content

Test phpstan /w restricted open_basedir and disabled proc_open#7518

Merged
ondrejmirtes merged 1 commit intophpstan:1.7.xfrom
mvorisek:test_no_proc_open
Jun 23, 2022
Merged

Test phpstan /w restricted open_basedir and disabled proc_open#7518
ondrejmirtes merged 1 commit intophpstan:1.7.xfrom
mvorisek:test_no_proc_open

Conversation

@mvorisek
Copy link
Contributor

@mvorisek mvorisek commented Jun 23, 2022

composer install
../../../phpstan.phar analyse
# test phpstan/4147 (restricted open_basedir) and phpstan-src/1451 (disabled proc_open)
php -d open_basedir="$(pwd):/tmp" -d disable_functions="pcntl_exec,pcntl_fork,exec,passthru,proc_open,shell_exec,system,popen" ../../../phpstan.phar analyse
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Separate matrix item please

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even if it will checkout (and composer install) the Lavarel twice then?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need to test it with Laravel, just create a new directory with a small "project" specific to this test.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No because of two things:

for ex. the https://github.com/slevomat/coding-standard.git is already analysed twice in .github/workflows/integration-tests.yml /w different configurations

with this reasoning, is it ok to keep the 2nd reanalyse of Lavarel here too?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't want to misuse Laravel for this, I'm testing Laravel for a different reason. The assumption might change for a different reason.

just create a new directory with a small "project" specific to this test.

You can force multiple child processes for a smaller amount of files if you tweak these settings https://phpstan.org/config-reference#parallel-processing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, all feedback addressed. phpstan/phpstan-src#1466 must be merged first.

@mvorisek mvorisek marked this pull request as ready for review June 23, 2022 15:30
@ondrejmirtes ondrejmirtes merged commit 94ff394 into phpstan:1.7.x Jun 23, 2022
@ondrejmirtes
Copy link
Member

Thank you.

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