You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
It appears zend.assertions is set to 0 or -1 by default with setup-php.
As you can see on this build I messed up because I didn't have assertions enabled locally so I didn't realize I had broken assertions, and when I pushed only some builds failed, which was even weirder.
OK I see, feel free to close then, looking forward to v3 :) It's not a huge deal so I rather not edit all my workflows for this, as long as it's on your radar 👍🏻
I support this change. setup-php is used for CI testing a lot and only very few users set production mode or zend.assertions php.ini manually.
Having zend.assertions enabled by default will imply performance negligibly but having them disabled (which is the case now) is making a lot of people think they have their assert() directives tested.
Also, per https://www.php.net/manual/en/function.assert.php the zend.assertions is enabled by default when no production/development flavoured php.ini is used. This is quite important fact, as because of this official Docker images https://github.com/docker-library/php have zend.assertions enabled. So setup-php should have zend.assertions enabled as default as well.
Describe the bug
It appears zend.assertions is set to 0 or -1 by default with setup-php.
As you can see on this build I messed up because I didn't have assertions enabled locally so I didn't realize I had broken assertions, and when I pushed only some builds failed, which was even weirder.
Per https://www.php.net/manual/en/function.assert.php you can see the recommended development value is
1
.Version
v1
orv2
.v2
v1
Runners
Operating systems
ALL
PHP versions
7+
To Reproduce
<?php assert(false);
Expected behavior
It should throw but it doesn't on php7+
Screenshots/Logs
https://github.com/Seldaek/jsonlint/runs/5788312601
Additional context
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: