-
-
Notifications
You must be signed in to change notification settings - Fork 205
PHP 7.4: Add detection of features from the new FFI extension detection #949
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
Conversation
| FFI::load(__DIR__ . "/dummy.h"); | ||
| function FFITypeHints( FFI\CData $a, FFI\CType $b ); | ||
| try { | ||
| } catch ( FFI\Exception | FFI\ParserException $e ) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
require says php 5.4 is used in this project:
PHPCompatibility/composer.json
Line 27 in 6b0c6dc
"php" : ">=5.4",
perhaps you need PHP 7.1 in "require-dev" to indicate that tests need higher version of PHP runtime??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@glensc This is a test case file. The actual code, including the tests need PHP 5.4, but in PHP 5.4. the library should still be able to recognize PHP 7.1 code, that's what the test cases are about.
So the require settings are perfectly ok as they are.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jrfnl thanks for the prompt reply, it wasn't self-obvious from file path that it is not an actual test case but fixtures. Maybe rename the files to be in Fixtures directory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@glensc The directory layout we use for the tests now, mirrors that of the tests in PHPCS itself. In other words, it's the standard directory layout for PHPCS sniff tests.
The files ending with UnitTest.php are the actual test files.
The files ending with UnitTest.inc are the test case files. These often contain "nonsense" code, including parse errors (annotated as such), to test the sniff handling all situations we could come up with correctly (and throwing the correct error for each).
Commits:
NewIniDirectives: add FFI ini directives
Ref: https://www.php.net/manual/en/ffi.configuration.php
NewClasses: add FFI classes
Ref: https://www.php.net/manual/en/book.ffi.php