Just providing a composer.json file for plugins.

Eclipse

CommentFileSizeAuthor
#12 2211633-12.patch811 bytesEclipseGc
#8 2211633-8.patch707 bytesEclipseGc
#1 2211633-1.patch646 bytesEclipseGc
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

EclipseGc’s picture

Status: Active » Needs review
FileSize
646 bytes
dawehner’s picture

+++ b/core/lib/Drupal/Component/Plugin/composer.json
@@ -0,0 +1,15 @@
+        "php": ">=5.3.10"

Now that drupal core requires php 5.4.2 I think it makes sense to do the same here to not block further improvements.

EclipseGc’s picture

We've had this conversation for Utility as well, I'll say here what I said there, a 5.3.x dependency does not in any way retard forward momentum on Plugins. Drupal itself has a 5.4 dependency but its components should specify a dependency that is truly reflective of what they actually require. Plugin currently has no need for 5.4, and until it does, I don't see the point of updating the requirement in a pre-emptive nature. For more on this, you can read my comments here: #2210257: Bump \Drupal\Component\Utility's PHP requirement to 5.4.2

Eclipse

sun’s picture

  1. +++ b/core/lib/Drupal/Component/Plugin/composer.json
    @@ -0,0 +1,15 @@
    +    "description": "Provides a set of classes and interfaces used for creating a pluggable subsystem.",
    

    "classes and interfaces" ...refers to internal PHP aspects? Seems superfluous to me.

    Does it "create" a pluggable subsystem?

    I also think you're heavily under-rating the real power of this component. Some more marketing wouldn't hurt!

    Base building block for enabling an infinitely scalable and extensible plug-in system for PHP components and application framework extensions.

  2. +++ b/core/lib/Drupal/Component/Plugin/composer.json
    @@ -0,0 +1,15 @@
    +    "keywords": ["drupal"],
    

    "plugin" would be a nice keyword? ;)

  3. +++ b/core/lib/Drupal/Component/Plugin/composer.json
    @@ -0,0 +1,15 @@
    +        "php": ">=5.3.10"
    

    Are you sure that the current code in HEAD doesn't require PHP 5.4?

Xano’s picture

Are you sure that the current code in HEAD doesn't require PHP 5.4?

HEAD does, but we've had a long discussion a while back and the conclusion was that \Drupal\Component will be separated from the rest of core more, and can have its own requirements.

dawehner’s picture

One aspect we have to keep in mind is that we have to be able to "bundle" the components with its tests. At the moment they are in totaly different directories.

dawehner’s picture

Status: Needs review » Needs work

I think at some point we for example will easily use "[]" for arrays, so we should not limit ourself to 5.3, for the sake of it.

EclipseGc’s picture

Status: Needs work » Needs review
FileSize
707 bytes

incorporated all feedback. I'd really like to see this get in.

Eclipse

dawehner’s picture

Related issue, certainly #2337283: Add a composer.json file to every component

  1. index 0000000..d925245
    --- /dev/null
    
    --- /dev/null
    +++ b/core/lib/Drupal/Component/Plugin/composer.json
    

    Did you considered to add authors (original developers etc.) into the composer.json file, see https://getcomposer.org/doc/04-schema.md#authors

  2. +++ b/core/lib/Drupal/Component/Plugin/composer.json
    @@ -0,0 +1,15 @@
    +    "require": {
    +        "php": ">=5.4.2",
    +    },
    

    Yeah, just to be clear, we even require 5.4. as we provide traits.

EclipseGc’s picture

I did not consider putting the authors on it. I did think about it, but it seems like it could have been a bit of a discussion and I wanted to streamline getting this in. As one of the Authors, I'm not horribly hung up on my name being on it or not. *shrugs* What I really want is to start offering it as a package that the rest of PHP can use, and this is the next step in making that happen.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Okay cool, let's start now.

EclipseGc’s picture

FileSize
811 bytes

Actually we need a "suggests" in here. My bad. Shouldn't affect status. The suggests if for context aware plugins.

Eclipse

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 0096eb0 and pushed to 8.0.x. Thanks!

  • alexpott committed 0096eb0 on 8.0.x
    Issue #2211633 by EclipseGc: Provide a composer.json file for Drupal\...
EclipseGc’s picture

THANK YOU!!!!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

Xano’s picture

The composer.json file contains syntax errors. Fix and tests at #2472269: Fix syntax errors in Drupal\Component\Plugin's composer.json, Add test.