-
Notifications
You must be signed in to change notification settings - Fork 22
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
DB2 constants are missing when setting up db factory #83
Conversation
} catch (Throwable $e) { | ||
if (stristr($e->getMessage(), 'undefined constant')) { | ||
$this->markTestSkipped(); | ||
} |
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.
Example:
But I'm thinking maybe this approach is wrong, better emulate in code the same behavior as older php versions.
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.
This class can't be even loaded:
protected $_execute_mode = DB2_AUTOCOMMIT_ON;
The exception is thrown on class construction:
zf1/packages/zend-db/library/Zend/Db.php
Line 270 in 1cfdc03
$dbAdapter = new $adapterName($config);
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.
I think the only solution here is to assign $_execute_mode
default value on the constructor. but no idea about is that backward compatible change or not.
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.
In a lot of cases with PHP8 Type and ValueErrors are thrown instead of warnings emitted. The error handling in tests needed to be modified accordingly. Signed-off-by: Elan Ruusamäe <glen@pld-linux.org> Signed-off-by: Alexander Wozniak <wozniak@oktopos.com>
With php 8.0, the class can't be constructed if constant is missing so the runtime check of extension can never be reached.
591a1ab
to
b44b445
Compare
In my opinion this will not be necessary as running I am going to close this, thank you for your investigation. |
In a lot of cases with PHP8 Type and ValueErrors are thrown instead of
warnings emitted. The error handling in tests needed to be modified
accordingly.
Changes for this discussion: