You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We run into issues when using the snowplow tracker when we run psalm on our code. This yields an error, that we cannot fix in our own code but relies on the vendor code (of snowplow-tracker)
STR
Make a new project, run composer require snowplow/snowplow-tracker vimeo/psalm. Create a new source file src/MyEmitter.php with the following contents:
Now run ./vendor/bin/psalm --init followed by ./vendor/bin/psalm, and then ./vendor/bin/psalm again (the second call uses the cache, that is critical in this case).
What I expect that psalm does not fail, for there is no error in my code. However, it fails because it is unable to determine the type.
When I apply the following patch:
diff --git a/vendor/snowplow/snowplow-tracker/src/Tracker.php b/vendor/snowplow/snowplow-tracker/src/Tracker.php
index d9ffa25..c1d3097 100644
--- a/vendor/snowplow/snowplow-tracker/src/Tracker.php
+++ b/vendor/snowplow/snowplow-tracker/src/Tracker.php
@@ -36,7 +36,7 @@ class Tracker extends Constants {
/**
* Constructs a new tracker object with emitter(s) and a subject.
*
- * @param emitter|array $emitter - Emitter object, used for sending event payloads to for processing
+ * @param Emitter|array $emitter - Emitter object, used for sending event payloads to for processing
* @param subject $subject - Subject object, contains extra information which is parcelled with the event
* @param string|null $namespace
* @param string|null $app_id
psalm no longer returns failures.
Environment is linux, might be relevant since this is an issue with casing and linux have a case-sensitive filesystem by default. Also see #136
The text was updated successfully, but these errors were encountered:
We run into issues when using the snowplow tracker when we run psalm on our code. This yields an error, that we cannot fix in our own code but relies on the vendor code (of snowplow-tracker)
STR
Make a new project, run
composer require snowplow/snowplow-tracker vimeo/psalm
. Create a new source filesrc/MyEmitter.php
with the following contents:Now run
./vendor/bin/psalm --init
followed by./vendor/bin/psalm
, and then./vendor/bin/psalm
again (the second call uses the cache, that is critical in this case).What I expect that psalm does not fail, for there is no error in my code. However, it fails because it is unable to determine the type.
When I apply the following patch:
psalm no longer returns failures.
Environment is linux, might be relevant since this is an issue with casing and linux have a case-sensitive filesystem by default. Also see #136
The text was updated successfully, but these errors were encountered: