Add the composer.json file

Created on 26 August 2023, 10 months ago
Updated 26 September 2023, 9 months ago

Since the module depends from an external package, it should have a composer.json file which at least would allow to easily download the
Microsoft Graph SDK for PHP. It would also allow to suggest the Mail System module when Composer is used.

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇹Italy apaderno Brescia, 🇮🇹

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @apaderno
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • Status changed to Fixed 10 months ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • Automatically closed - issue fixed for 2 weeks with no activity.

  • Status changed to Active 9 months ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    This should be done for the 1.0.x branch too. For the 2.0.x branch, I used the following content for the composer.json file.

    {
        "name": "drupal/graph_mail",
        "type": "drupal-module",
        "description": "Allows to change the default mail sender with one that uses the Microsoft Graph API.",
        "keywords": ["Drupal", "mail"],
        "license": "GPL-2.0-or-later",
        "homepage": "https://www.drupal.org/project/graph_mail",
        "minimum-stability": "dev",
        "prefer-stable": true,
        "support": {
            "issues": "https://www.drupal.org/project/issues/graph_mail",
            "source": "https://cgit.drupalcode.org/graph_mail"
        },
        "require": {
            "drupal/core": " ^10",
            "microsoft/microsoft-graph": "^1.34.0"
        },
        "suggest": {
            "drupal/mailsystem": "It provides an administrative UI and developers API for managing the used mail backend/plugin."
        }
    }
    

    Either the microsoft/microsoft-graph is still the same, or it needs to be updated to be compatible with Drupal 8 and Drupal 9.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • 🇧🇪Belgium BramDriesen Belgium 🇧🇪

    What's actually the difference between the two branches?

  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    The 2.0.x branch runs only on Drupal 10; the 1.0.x branch could run on Drupal 8, 9, or 10 (theoretically, as it is not possible to keep the module compatible with all the Drupal releases.)

  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    The requirements for microsoft/microsoft-graph 1.34.0 are:

    • php: ^8.0 || ^7.3
    • ext-json: *
    • guzzlehttp/guzzle: ^6.0 || ^7.0

    Except for the PHP version, those requirements are full-filled for Drupal 8.9 too. (They would be all full-filled for Drupal 9.x.)

    I would rather drop the support for Drupal 8.x, considering that sites should at least running on Drupal 9.x, by now. In that case, microsoft/microsoft-graph 1.34.0 could be used from the 1.0.x branch too.

  • 🇧🇪Belgium BramDriesen Belgium 🇧🇪

    I think that's fair and perfectly fine actually!

  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    I take I have wrongly interpreted the Drupal 8.9 requirements: "php": "^7.0.8" would mean that at least PHP 7.0 is required. Plus, Drupal PHP requirements says that PHP 7.3 is supported starting from Drupal 8.6.4.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    OK, let's change the minimum Drupal version required from the 1.0.x branch.

  • 🇧🇪Belgium BramDriesen Belgium 🇧🇪

    But then again PHP 7.3 and 7.4 are no longer supported. :)

    Given the small amount installs I don't think we will do much damage here.

    • apaderno committed 0bf740b2 on 1.0.x
      Issue #3383542 by apaderno, BramDriesen: Add the composer.json file
      
  • Status changed to Fixed 9 months ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024