Problem/Motivation
The PHPStan job fails with seven errors, all of them saying that a Paragraphs class cannot be found: Drupal\paragraphs\ParagraphInterface in the plugin, and Drupal\paragraphs\Entity\Paragraph and Drupal\paragraphs\Entity\ParagraphsType in the test.
These are not type errors. The job runs PHPStan at level 0, where nothing but symbol resolution is checked, so the only thing the report is saying is that the Paragraphs module is not present in the build at all.
It is not present because the module has no composer.json. The info file declares "paragraphs:paragraphs" as a dependency, but that tells Drupal, not Composer. The continuous integration build is Composer driven: it expands the project composer.json and runs composer install, and the script that does the expanding only ever reads composer.json, never the info file. With no composer.json to read, Composer is never told to install Paragraphs.
The same gap affects anyone installing the module with Composer, not only the pipeline. Requiring drupal/paragraphs_condition would pull in a module that cannot work, because its only real dependency is missing.
Steps to reproduce
1. Push any commit and look at the phpstan job.
2. It reports seven class.notFound errors, every one of them a Drupal\paragraphs class.
Proposed resolution
Add a composer.json declaring drupal/paragraphs in require, alongside the usual project metadata: name, description, type, licence, homepage and support links.
The version constraint is ^1.15. Paragraphs has no 2.x release, and the classes this module uses have been stable since 1.0, so the floor is set by Drupal 10 support rather than by the API. Widen it when a 2.x appears.
Comments
Comment #3
trebormc