Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 295979

Add a composer.json file to every component

$
0
0

git commit -m 'Issue #2337283 by hussainweb, Mile23, alexpott, dawehner, naveenvalecha, aditya_anurag, rakesh.gectcr: [meta] Add a composer.json file to every component (module, later)'

Problem/Motivation

Our extensions are based upon .info.yml files which works fine and I don't see a reason to change that (at least for now and this issue).
On the other hand though those doesn't provide any metadata you could use in order to use composer properly.

Contrib established now a policy (or people pushed it quite hard) to add composer.json files to every module:

With that and some other tricks you can use composer to build your Drupal together with the modules (this is not about the dependencies of each module) (see https://blog.erdfisch.de/node/412)

We should probably start with the Drupal\Component namespace.

Components in the Drupal\Component namespace with composer.json files:

  • Plugin
  • ProxyBuilder
  • Utility

Plugin is broken, being non-valid JSON.

Utility is an interesting case because it contains a number of different one-file classes. Other components such as Bridge and DateTime also contain only one class. We should probably move the Utility classes to their own namespace.

Proposed resolution

Add a composer.json to every module in core. This tells people that they should do that as well. On top of that the composer.json format
provides a lot of additional metadata you can use, like the maintainers, which would be a great replacement for MAINTAINERS.txt because the information
is much more in context.

Remaining tasks

  • Add composer.json files to the various components, fix existing ones which are broken.
  • Make sure they pass coding standards and have accurate information.
  • Figure out a way to test whether the composer.json files are actually meaningful.

User interface changes

API changes

Possibly changing the names of some namespaces.

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Unfrozen changesUnfrozen because it only adds metadata to the project.
DisruptionMinimal disruption to core.

Viewing all articles
Browse latest Browse all 295979

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>