1332 make plugin a ctype
Started refactoring to use CTypes for plugins
@oliverklee can you have a look into the phpstan error? I take the Class"AbstractListTypeToCTypeUpdate" from Lina Wolf https://github.com/linawolf/list-type-migration.
I try to ignore the Error directly in the phpstan.neon
-
# Ignore Interface not found for AbstractListTypeToCTypeUpdate.php
identifier: interface.notFound
path: Classes/Upgrades/AbstractListTypeToCTypeUpdate.php
did not work and I don't know how to handle this error.
@linxpinx This error means that the interface does not exist. PHPStan is right - the interface is part of the install core package, which we currently don't require. So we need to add typo3/cms-install as a production dependency for the upgrade wizard to work.
@oliverklee ah ok but the wizard works. I test it in a second TYPO3 Installation and the Wizard change from list_type to CType and the Plugin works after running the wizard. Is it possible that the Class tooks the interface from the Installation TYPO3 if there is no Interface in our Test TYPO3?
@linxpinx With Composer, a class or interface is available at any place if the package providing the class/interface is installed. For Composer, it doesn't matter whether the corresponding package is a direct dependency of the package that needs the class/interface, or it happens to be installed as a dependency of some other package (which could also be the root package). My guess is that the install tool package is installed in your test installation anyway, and hence the upgrade wizard class can use that interface.
It is a best practice to have all packages that a package uses as direct dependencies (either production or development) to ensure the corresponding packages are loaded and the classes/interfaces are available.
… and relying on transitive dependencies is recommended against as this can lead to breakage when another dependency changes their dependencies. This happened with Georg Ringer's news extension some time ago.
Pull Request Test Coverage Report for Build 17919410001
Warning: This coverage report may be inaccurate.
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
- For more information on this, see Tracking coverage changes with pull request builds.
- To avoid this issue with future PRs, see these Recommended CI Configurations.
- For a quick fix, rebase this PR at GitHub. Your next report should be accurate.
Details
- 0 of 172 (0.0%) changed or added relevant lines in 2 files are covered.
- No unchanged relevant lines lost coverage.
- Overall coverage decreased (-61.9%) to 38.129%
| Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
|---|---|---|---|
| Classes/Upgrades/ListTypeToCTypeUpdate.php | 0 | 10 | 0.0% |
| Classes/Upgrades/AbstractListTypeToCTypeUpdate.php | 0 | 162 | 0.0% |
| <!-- | Total: | 0 | 172 |
| Totals | |
|---|---|
| Change from base Build 17763885857: | -61.9% |
| Covered Lines: | 106 |
| Relevant Lines: | 278 |
💛 - Coveralls
This PR could be closed when #1811 is done. I opened a new PR from a new Branch cause this one was rotten.