Remove hack when DowngradeCovariantReturnTypeRector issue is fixed in Rector
leoloso opened this issue · comments
When this issue is fixed in Rector:
Then remove this hack from generate_plugins.yml
:
################################################################################
# Temporary hack: fix the return type in Trait, not yet handled by Rector
# @see https://github.com/rectorphp/rector/issues/6962
# @see https://github.com/leoloso/PoP/issues/1470
- name: Temporary hack - fix the return type in Trait
run: |
sed -i 's/function getItem($key): CacheItem/function getItem($key): \\Psr\\Cache\\CacheItemInterface/' vendor/symfony/cache/Traits/AbstractAdapterTrait.php
working-directory: ${{ matrix.pluginConfig.path }}
if: ${{ matrix.pluginConfig.scope }}
################################################################################
Would love to see Reactor building downgraded versions for each supported PHP version up to developed version. Example 7.2, 7.3, 7.4, 8.0 etc?
It can be done already, you just have to create a matrix in GitHub Actions, iterating over the PHP versions and creating the release for each (the PHP version to downgrade to can be passed as input to the downgrade script).
I considered doing it but then decided against it, and explained why not here (under title "First proposed solution: Producing two versions of the plugin")
Fixed already