Parent issue: #2337283: Add a composer.json file to every component

Problem/Motivation

Part of the parent parent issue: #1826054: [Meta] Expose Drupal Components outside of Drupal

Each of the \Drupal\Component\ namespaces need their own composer.json file, so that they can eventually be offered to the world as a library.

Proposed resolution

Add the LICENSE.txt, README.txt, TESTING.txt, and composer.json files from the template in this patch: https://www.drupal.org/node/2337283#comment-9706563

Verify the various dependencies of the component, so they can be included as requirements.

Add the component's directory to \Drupal\Tests\ComposerIntegrationTest:: getPaths().

Use composer validate in the component directory to make sure the composer.json file is valid.

Remaining tasks

User interface changes

API changes

Contributor tasks needed
Task Novice task? Contributor instructions Complete?
Create a patch Instructions
Reroll the patch if it no longer applies. Instructions
Update the issue summary noting if allowed during the rc Template
Update the patch to incorporate feedback from reviews (include an interdiff) Instructions
Manually test the patch Novice Instructions
Review patch to ensure that it fixes the issue, stays within scope, is properly documented, and follows coding standards Instructions

Comments

Mile23 created an issue. See original summary.

rakesh.gectcr’s picture

Status: Active » Needs review
StatusFileSize
new20.7 KB
mile23’s picture

Status: Needs review » Needs work
  1. +++ b/core/lib/Drupal/Component/Datetime/TESTING.txt
    @@ -0,0 +1,19 @@
    +$ cd ./core
    +$ ./vendor/bin/phpunit --group Datetime
    

    These instructions are wrong. See discussion in #2600718: Add composer.json to \Drupal\Component\Bridge component.

    Should be $ ./vendor/bin/phpunit -c core --group Datetime

  2. +++ b/core/lib/Drupal/Component/Datetime/composer.json
    @@ -0,0 +1,15 @@
    +  "description": "Datetime.",
    

    This needs a better description.

    Let's just steal from the single class:

    "This class wraps the PHP DateTime class with more flexible initialization parameters, allowing a date to be created from an existing date object, a timestamp, a string with an unknown format, a string with a known format, or an array of date parts. It also adds an errors array and a __toString() method to the date object."

rakesh.gectcr’s picture

Assigned: Unassigned » rakesh.gectcr
rakesh.gectcr’s picture

StatusFileSize
new21.06 KB
new1.72 KB

@Mile23

I have done the changes you mentioned.

rakesh.gectcr’s picture

Status: Needs work » Needs review

The last submitted patch, 2: 2600720-1.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 5: 2600720-5.patch, failed testing.

rakesh.gectcr’s picture

StatusFileSize
new21.06 KB
rakesh.gectcr’s picture

rakesh.gectcr’s picture

Status: Needs work » Needs review

The last submitted patch, 2: 2600720-1.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 9: 2600720-9.patch, failed testing.

rakesh.gectcr’s picture

Status: Needs work » Needs review
StatusFileSize
new21.06 KB
new1.72 KB

I don't know, y this test getting fails, So created a new patch again.

Status: Needs review » Needs work

The last submitted patch, 14: 2600720-14.patch, failed testing.

snehi’s picture

@rakesh.gectcr Thanks for the patch :)
Please do not upload patch again and again, but you can add test later. Otherwise it will become difficult for the reviewer to choose the correct one patch.

Thanks for contributing in Drupal !!!

alexpott’s picture

Version: 8.0.x-dev » 8.1.x-dev
Status: Needs work » Closed (duplicate)

Closing this in favour of a single patch on #2600720: Add composer.json to \Drupal\Component\Datetime component. as all the patches listed on the meta issue are going to conflict.