Skip to content

Add support template types - #218

Merged
mbonneau merged 1 commit into
ReactiveX:masterfrom
WyriHaximus-secret-labs:template-types
Nov 16, 2026
Merged

mbonneau merged 1 commit into
ReactiveX:masterfrom
WyriHaximus-secret-labs:template-types

Conversation

@WyriHaximus

@WyriHaximus WyriHaximus commented Aug 7, 2023 •

Copy link
Copy Markdown
Contributor

Depends on #217

  • Add template types, making observables usable as generics
  • Introduce PHPStan (v2)
  • Added type tests under tests/types/
  • Run PHPStan at max level and put everything not related to the template types into a baseline
  • Add PHP8.6 to the CI test matrix
  • Removed unused Coveralls package

@WyriHaximus
WyriHaximus force-pushed the template-types branch 11 times, most recently from 022ee96 to 006cb2a Compare November 27, 2023 22:51
WyriHaximus added a commit to WyriHaximus/reactphp-awaitable-observable that referenced this pull request Nov 30, 2023
@WyriHaximus
WyriHaximus force-pushed the template-types branch 3 times, most recently from 9c0ae45 to 63ee9a6 Compare December 2, 2023 18:40
@WyriHaximus
WyriHaximus marked this pull request as ready for review December 2, 2023 18:44
Comment thread phpstan.neon.dist

paths:
- src/
- test/types/

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't widen this to include the entire test directory because that would add 1752 errors to solve. This PR alone was already almost 1K.

Comment thread src/Operator/ThrottleOperator.php Resolved
@WyriHaximus
WyriHaximus force-pushed the template-types branch 2 times, most recently from e0d57b2 to af34b8d Compare December 2, 2023 20:29
@WyriHaximus WyriHaximus changed the title [WIP] Add support template types [Add support template types Dec 2, 2023
@WyriHaximus

Copy link
Copy Markdown
Contributor Author

@davidwdan && @mbonneau This covers the basics ( 😅 ) and is ready for review. Is there anything you want me to add in the test/types/ set of type tests? Will do some package type testing tomorrow in WyriHaximus/reactphp-awaitable-observable#65

WyriHaximus added a commit to WyriHaximus/reactphp-awaitable-observable that referenced this pull request Dec 3, 2023
WyriHaximus added a commit to WyriHaximus/reactphp-awaitable-observable that referenced this pull request Dec 3, 2023
@WyriHaximus

Copy link
Copy Markdown
Contributor Author

@WyriHaximus WyriHaximus changed the title [Add support template types Add support template types Dec 6, 2023
WyriHaximus added a commit to WyriHaximus/reactphp-awaitable-observable that referenced this pull request Dec 13, 2023
@WyriHaximus
WyriHaximus force-pushed the template-types branch 2 times, most recently from 71c425e to 02173c9 Compare July 18, 2026 21:18
WyriHaximus added a commit to WyriHaximus/reactphp-awaitable-observable that referenced this pull request Jul 20, 2026
WyriHaximus added a commit to WyriHaximus/reactphp-awaitable-observable that referenced this pull request Jul 21, 2026
@WyriHaximus
WyriHaximus force-pushed the template-types branch 12 times, most recently from f61049c to 6dfed01 Compare September 18, 2026 21:29
@WyriHaximus
WyriHaximus force-pushed the template-types branch 3 times, most recently from 65f47f6 to e54162d Compare October 14, 2026 15:20

@mbonneau mbonneau left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing all this work.

The only thing I see is the InternalPriorityQueue item. Right now, PriorityQueue.php always loads first, but anything that autoloads InternalPriorityQueue directly (optimized classmap, reflection, PHPStan) will get an error.

Once that is updated, everything else looks good to me.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this class was an internal class pulled out of PriorityQueue, but a copy is still left there. We should probably just remove that copy and mark this one internal.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the old copy 👍

Comment thread composer.json
"react/promise": "^3 || ~2.2"
},
"require-dev": {
"satooshi/php-coveralls": "~1.0",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This dev dependency got removed because attempting to install it yields this error:

our requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires satooshi/php-coveralls ~1.0 -> satisfiable by satooshi/php-coveralls[v1.0.0, v1.0.1, v1.0.2, v1.1.0].
    - satooshi/php-coveralls v1.0.0 requires symfony/yaml ^2.1|^3.0 -> found symfony/yaml[v2.1.0, ..., v2.8.52, v3.0.0, ..., v3.4.47] but these were not loaded, because they are affected by security advisories ("PKSA-v5yj-8nmz-sk2q", "PKSA-ft77-7h5f-p3r6", "PKSA-b14r-zh1d-vdrc", "PKSA-xxgb-wq2d-7gpg"). Go to https://packagist.org/security-advisories/ to find advisory details. To ignore the advisories, add their IDs to the "policy.advisories.ignore-id" config or add the package to "policy.advisories.ignore". To turn the feature off entirely, you can set "policy.advisories.block" to false.
    - satooshi/php-coveralls v1.0.1 requires symfony/yaml ^2.0|^3.0 -> found symfony/yaml[2.0.4, ..., v2.8.52, v3.0.0, ..., v3.4.47] but these were not loaded, because they are affected by security advisories ("PKSA-v5yj-8nmz-sk2q", "PKSA-ft77-7h5f-p3r6", "PKSA-b14r-zh1d-vdrc", "PKSA-xxgb-wq2d-7gpg", "PKSA-4y51-dgkc-x4zc"). Go to https://packagist.org/security-advisories/ to find advisory details. To ignore the advisories, add their IDs to the "policy.advisories.ignore-id" config or add the package to "policy.advisories.ignore". To turn the feature off entirely, you can set "policy.advisories.block" to false.
    - satooshi/php-coveralls[v1.0.2, ..., v1.1.0] require php ^5.3.3 || ^7.0 -> your php version (8.6.0-dev) does not satisfy that requirement.

There is a v2 but the whole package is marked abadoned and suggests https://packagist.org/packages/php-coveralls/php-coveralls instead. But I can't find any usage in this repository for it except the readme badge. Do you want me to swap it out with the new package or leave it out?

* Add template types, making observables usable as generics
* Introduce PHPStan (v2)
* Added type tests under `tests/types/`
* Run PHPStan at `max` level and put everything not related to the template types into a baseline
* Add PHP8.6 to the CI test matrix
* Removed unused Coveralls package
@WyriHaximus

Copy link
Copy Markdown
Contributor Author

Thanks for doing all this work.

The only thing I see is the InternalPriorityQueue item. Right now, PriorityQueue.php always loads first, but anything that autoloads InternalPriorityQueue directly (optimized classmap, reflection, PHPStan) will get an error.

Once that is updated, everything else looks good to me.

Np! Addressed that PriorityQueue issue; added one comment about coveralls and pushed my latest changes.

@WyriHaximus
WyriHaximus requested a review from mbonneau October 16, 2026 11:23
@mbonneau
mbonneau merged commit 06fb2fc into ReactiveX:master Nov 16, 2026
12 checks passed
WyriHaximus added a commit to WyriHaximus/reactphp-awaitable-observable that referenced this pull request Nov 19, 2026
WyriHaximus added a commit to WyriHaximus/reactphp-awaitable-observable that referenced this pull request Nov 19, 2026
WyriHaximus added a commit to WyriHaximus/reactphp-awaitable-observable that referenced this pull request Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants