Comments (5)
The easiest way is replacing "never" with "void" when code is generated until it breaks signature when method overrides parent or it is implementation of the interface :)
from kahlan.
If I get it right the never type require an exit() or die() call somehow.
It's possible to handle them with the Quit
plugin to return an exception instead of exiting the process.
I added the following in the dev branch to handle the never type.
978cd05#diff-11276323115a69c417f67dba6efcf525db29f062902c991f7e2763954d70fae2R94
You should be able to test it by using kahlan/kahlan:dev-dev
as dependencies.
Make sure once updated to run kahlan -cc
to clear caches so they can be regenerated.
Does that solve the issue you were talking about ?
from kahlan.
Thank you for your super fast reply. That patch completely solves the problem.
For accuracy never specifies functions that call exit(), throw an exception or are an infinite loop. All these cases work correctly with this change.
from kahlan.
@michalfelski thank you for verify, I will create new release for it π
from kahlan.
kahlan 5.2.3 released for it https://github.com/kahlan/kahlan/releases/tag/5.2.3
from kahlan.
Related Issues (20)
- Throw exception test failed with Pipeline CI/CD HOT 2
- How to mock ZipArchive behavior HOT 4
- Expect to throw a `TypeError` got failed, `actual: TypeError, expected: TypeError` HOT 4
- Error with PHP 8 HOT 1
- Unable to run the tests when `XDEBUG_MODE` have multiple values HOT 1
- Feature Request: Support focusing a specific test or suite with command line arguments
- php 8.1 support HOT 2
- PHP Fatal error: Type of Kahlan\PhpErrorException::$file must be string (as in class Exception) in... HOT 3
- toBeCalled within Class Static Methods HOT 1
- Breakpoint; debugging tests HOT 4
- Missing default value 0 for int properties with PHP8 attributes in single line HOT 1
- Unable to stub without overriding function HOT 5
- Process exit with code 1 in github action HOT 2
- stub / Modify constante HOT 1
- PHP 8.2: dynamic properties HOT 3
- PHP 8.2 Function utf8_decode() is deprecated HOT 1
- Cannot exclude autoloaded files from monkey patching
- Multiple _T_ATTRIBUTE tokens in single line HOT 1
- Bug: toHaveLength() does not work with accented letters and multi-byte strings 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 kahlan.