Comments (6)
Any arbitrary function could be killed that way, we can't check all of them before calling throughout the codebase :)
It probably could be extension_loaded
but I'd kinda want a compelling argument to make the change as this seems like something that'll vary across platforms/distros in ways we can't anticipate
from behat.
Requiring ext-pcntl
as a mandatory requirement would make Behat incompatible with PHP on Windows as ext-pcntl is an extension that does not exist on Windows.
The goal is not to support disable_functions
here (if you are on Unix and don't want the pcntl functions in your runtime, disable the extensions instead of disabling functions one by one)
from behat.
It's really just trying to detect whether the PCNTL extension is loaded, I think
from behat.
Couldn't this be done with extension_loaded()
? But that wouldn't cover the case that either of the functions are disabled in a php-cli.ini
, e.g.
disable_functions = pcntl_async_signals
from behat.
Sorry, I don't understand the argument to not implement this. How would checking if the function exists vary across platforms and distros? This is common practice in other packages already (monolog being one such example), and we are already checking for one of the functions. Whilse it is true that any function could be killed that way, it's only common practice and in some cases the default configuration (thecodingmachine/docker-images-php#168 is one example I found) to set the pcntl functions to disabled.
from behat.
Frankly both approaches described here feel wrong - you should just check for the pcntl extension, ideally via composer dependencies ("require": {"ext-pcntl": "*"}
).
If you/users are mucking up the PHP install with disble_functions
or worse (runkit, fake functions etc), it's kinda your/their fault.
(the docker image example was also doing it wrong IMO, which is why I guess they changed it later)
from behat.
Related Issues (20)
- SSL certificate problem: unable to get local issuer certificate HOT 3
- Symfony 7 support HOT 1
- [bug] jUnit formatter returns time as int but should use float HOT 1
- [Bug] jUnit formatter produces empty testsuite names, it could use feature file as suite name HOT 5
- Parallelization of tests HOT 4
- [Bug?] Reruns of Scenario outlines lead to potentially confusing scenario names HOT 2
- Exception thrown when test fails with junit formatter HOT 1
- Documentation for StepEvent hooks in Behat 3.0 HOT 8
- Add support for Rule keyword (Gherkin 6) HOT 2
- Skip or improve translation process
- how to have a context/class per feature ?
- New release for Symfony 7 HOT 8
- Can't use %paths.base% inside extensions: Failed opening required '%paths.base%' HOT 2
- phar is broken for the 3.14.0 release HOT 4
- Extension for auto naming parameters HOT 2
- Better documentation for `filters` key
- Is behat dead? HOT 7
- Progress vs pretty output -- Progress is WAY slower! HOT 4
- getScenario() has to return a Scenario but returns an ExampleNode so the getTitle() function didn't works as expected HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from behat.