Trivial fixes for PHP 8.2 support
s/php/PHP
Merge pull request #28 from etsy/php82-support
Trivial fixes for PHP 8.2 support
PHP 8.2 support
Trivial fixes for PHP 8.2 support
s/php/PHP
s/php/PHP
PHP 8.2 support
Tests are failing because they rely on phpspec/prophecy
and that isn't in your composer.json
but that is not related to my changes.
Avoid passing null
to str_pad()
and declare the missing fromHeader
property in SpanContext.php
A couple of PHP 8.2 fixes
fix: PHP 7.4 Compatibility Fix (#259)
Deprecated: Array and string offset access syntax with curly braces is deprecated in...
feat: add PHP 8 compatibility (#270)
chore: prepare 0.3.0 ext release (#271)
chore: fix integration tests. (#278)
ext: Increase the minimum PHP version to 7.1. (#277)
Fix misspelling in README
This trivial merge request fixes a misspelling or typo in the README.
Merge pull request #19 from esabol/patch-1
Fix misspelling in README
This trivial merge request fixes a misspelling or typo in the README.
Fix typo 'dolow' and mixed null
Merge pull request #15 from BlueTM/fix-typo-and-mixed
Fix typo 'dolow' and mixed null
Fix method name typo, from 'dolow' to 'doLow'. Fix mixed type, mixed types cannot be nullable, 'null' is already part of the mixed type.
Hello,
In the previous repository, there was an issue around addServer
making connections for \GearmanClient
which was resolved with a new 3rd parameter. (See https://github.com/wcgallego/pecl-gearman/issues/59)
Is there any plan to also support this for addServer()
and addServers()
for the \GearmanWorker
class as well? I was able to migrate my code to use the 3rd parameter for \GearmanClient
and avoided the GearmanException: Failed to set exception option
for that case.
However, for \GearmanWorker
I'm still getting an error.
PHP Fatal error: Uncaught GearmanException: Failed to set exception option in Gearman.php:33
Stack trace:
#0 /home/dev/app/Util/Gearman.php(33): GearmanWorker->addServer('127.0.0.1', 4730)
And trying to add the 3rd parameter (set to false), I am getting:
Warning: GearmanWorker::addServer() expects at most 2 parameters, 3 given in /home/dev/app/Util/Gearman.php on line 33
gearman extension version => 2.1.0 libgearman version => 1.1.19.1
Thanks for any input!
Param to skip exception handling setup in addServer/addServers in GeamanWorker class
Fixes #7
Merge pull request #8 from oleg-st/worker-exceptions
Param to skip exception handling setup in addServer/addServers in GearmanWorker class
Fixes #7
Added to GearmanWorker
the same as added to GearmanClient
in https://github.com/wcgallego/pecl-gearman/commit/d948be1a937b1ebbfd5ad5ab84214398ec4ad777.
$setupExceptionHandler
param to addServer
/addServers
and enableExceptionHandler
method.
Any reason not to do add a check like this to hasDynamicProperties()
to make the allow_missing_properties=false
setting aware of the AllowDynamicProperties attribute?
diff --git a/src/Phan/Language/Element/Clazz.php b/src/Phan/Language/Element/Clazz.php
index 507ba7a8c..2ff519290 100644
--- a/src/Phan/Language/Element/Clazz.php
+++ b/src/Phan/Language/Element/Clazz.php
@@ -2302,6 +2302,11 @@ class Clazz extends AddressableElement
*/
public function hasDynamicProperties(CodeBase $code_base): bool
{
+ foreach($this->attribute_list as $attr) {
+ if ((string)$attr === '\AllowDynamicProperties') {
+ return true;
+ }
+ }
return $this->hasFlagsRecursive($code_base, Flags::CLASS_HAS_DYNAMIC_PROPERTIES);
}
merged
Add AllowDynamicProperties attribute to class attributes and check in hasDynamicPropertie()
Since PHP 7.2, exif_read_data()
function's $file
parameter is resource|string
.
However, the change is not applied to FunctionSignatureMap.php.
ref: https://www.php.net/manual/en/function.exif-read-data.php
I tried the following code:
<?php
declare(strict_types=1);
$fp = fopen("image.jpg", "rb");
if ($fp !== false) {
var_export(exif_read_data($fp));
}
and the following issue is shown:
/Users/akm/Desktop/test.php:6 PhanTypeMismatchArgumentInternal Argument 1 ($file) is $fp of type resource but \exif_read_data() takes string
But I expect Phan doesn't report this.
Phan 5.4.2-dev php-ast version 1.1.0 PHP version used to run Phan: 8.1.13
OS: macOS 12.6.2 Composer version 2.5.1
fix signature of exif_read_data()
Merge pull request #4759 from akamah/signature-exif_read_data
Fix signature of exif_read_data()
Fix https://github.com/phan/phan/issues/4758