Patch #5 tested successfully.
1) Adding patch with `core_version_requirement` in services_test.info to make the module D9 compatible.
2) "services\src\Plugin\ServiceDefinition\AliasGet.php" contains deprecated interface Drupal\Core\Path\AliasManagerInterface. this should be fixed as well.

Tested it on D8.9.0 as well as D9, installs successfully after applying the attached patch.

Comments

nicola85 created an issue. See original summary.

nicola85’s picture

StatusFileSize
new18.96 KB
ravimane23’s picture

Issue tags: +Drupal 9 compatibility
himanshu_sindhwani’s picture

Status: Active » Needs review
Issue tags: +Drupal 9 readiness
nicola85’s picture

StatusFileSize
new20.24 KB
steinmb’s picture

Version: 8.x-4.0-beta5 » 8.x-4.x-dev
marco.deligios’s picture

@nicola85: è possibile mettersi in contatto con te? marco.deligios at globogis.it

RiddhiKhetani’s picture

Issue summary: View changes
StatusFileSize
new1.88 KB
new22.22 KB

Patch #5 Tested.
1)Adding patch with `core_version_requirement` in services_test.info.yml to make the module D9 compatible.
2)The "services\src\Plugin\ServiceDefinition\AliasGet.php" contains deprecated interface Drupal\Core\Path\AliasManagerInterface that should be fixed as well.

Tested it on D8.9.0 as well as D9, installs successfully after applying the attached patch.

harshit ghediya’s picture

Status: Needs review » Reviewed & tested by the community

Patch #8 works for me.
Installed successfully in D9 and works for D8 (8.9.3) as well.

florisg’s picture

Thank you so much for the collaborative effort <3.
I can now use BAT in Drupal 9.
Process in a clean Drupal 9 install:

composer require cweagans/composer-patches
composer require drupal/services:4.x-dev --no-update

Now edit composer.json add 'fake core'
Just under `"drupal/core-recommended": "~9",`

        "drupal/core": "9.0.5 as 8.9.0",

and patches section in the "extra" section:

       "enable-patching": true,
        "patches": {
          "drupal/services": {
            "Services in Drupal 9": "https://www.drupal.org/files/issues/2020-09-02/services-drupal9-3154535-8_0.patch"
          }
        },

Now you can update lock and use composer normally until this patch is committed to services module.

composer update --lock
composer update --with-dependencies
tyler.frankenstein’s picture

Would anyone like to be the maintainer of Drupal 9 + Services? Please contact me to discuss.

Honestly, Drupal 8 + Services needs someone to maintain it too.

I am still heavily invested in Drupal 7 + Services and feel confident in maintaining it.

EDIT: I updated the project's maintenance status to indicate the need for a co-maintainer.

kylebrowning’s picture

So cool, let me know if anyone needs help!

mybiit’s picture

Hi There.
1) IS there, at last, any latest Service Module released for Drupal 9?
2) If there is none, what are the list of all the affected files that need to be amended?

"services\src\Plugin\ServiceDefinition\AliasGet.php" contains deprecated interface Drupal\Core\Path\AliasManagerInterface. this should be fixed as well. How do you fix it?

benjarlett’s picture

To attempt this (installing services in d9.1.0 with latest dev 8.x-4.0-beta5+0-dev I couldn't use the composer method in #10 as it failed:

Problem 1
- The requested package drupal/core (locked at 9.1.0, required as 9.0.5 as 8.9.0) is satisfiable by drupal/core[9.1.0] but these conflict with your requirements or minimum-stability.
Problem 2
- drupal/core-recommended 9.1.0 requires drupal/core 9.1.0 -> satisfiable by drupal/core[9.1.0] but these conflict with your requirements or minimum-stability.
- drupal/core-recommended 9.1.0 requires drupal/core 9.1.0 -> satisfiable by drupal/core[9.1.0] but these conflict with your requirements or minimum-stability.
- drupal/core-recommended 9.1.0 requires drupal/core 9.1.0 -> satisfiable by drupal/core[9.1.0] but these conflict with your requirements or minimum-stability.
- Installation request for drupal/core-recommended ^9.1 -> satisfiable by drupal/core-recommended[9.1.0].

After a bit of thinking I worked out I needed to change the fake core to the current version.

benjarlett’s picture

#13 mybiit - If you apply the patch as I did you can see which files are amended (or just look above at #14)

acnimda’s picture

Hi there,

patch #5 is working and can't apply patch #8.

Applied patch as followed git apply -v services-drupal9-3154535-8_0.patch

result: trailing whitespace and errors.

services-drupal9-3154535-8_0.patch:282: services-drupal9-3154535-8_0.patch:282: trailing whitespace.
use Drupal\Core\Entity\EntityTypeManagerInterface;
services-drupal9-3154535-8_0.patch:314: trailing whitespace.
   * @param mixed $plugin_definition
Checking patch services.info.yml...
error: while searching for:
type: module
description: A standardized solution of integrating external applications with Drupal.
core: 8.x
package: Services
dependencies:
  - ctools:ctools

error: patch failed: services.info.yml:2
error: services.info.yml: patch does not apply
Checking patch services.services.yml...
Checking patch services_test/services_test.info.yml...
error: while searching for:
type: module
description: A service provider test for the Services module.
core: 8.x
package: Services
dependencies:
  - services:services.
use Drupal\Core\Entity\EntityTypeManagerInterface;
services-drupal9-3154535-8_0.patch:314: trailing whitespace.
   * @param mixed $plugin_definition
Checking patch services.info.yml...
error: while searching for:
type: module
description: A standardized solution of integrating external applications with Drupal.
core: 8.x
package: Services
dependencies:
  - ctools:ctools

error: patch failed: services.info.yml:2
error: services.info.yml: patch does not apply
Checking patch services.services.yml...
Checking patch services_test/services_test.info.yml...
error: while searching for:
type: module
description: A service provider test for the Services module.
core: 8.x`
package: Services
dependencies:
  - services:services
gebiss’s picture

I appreciate the community effort in making this module compatible with Drupal 9. Well done! This module is the only one left that is required in order to run BAT & BEE (Bookings) and that hasn't been done for Drupal 9. Patching and the use of Composer is nor for everyone leaving them with no options for Booking engine on Drupal 9. It would be nice to see Services module for Drupal 9. Is there no way to include the patches in the release of this module for Drupal 9?

tyler.frankenstein’s picture

Version: 8.x-4.x-dev » 9.0.x-dev
Status: Reviewed & tested by the community » Fixed

I've created the 9.0.x branch, applied #8 to it, committed it, pushed it up, and added a D9 dev release.

I don't know why the automated comment related to the commit is not showing up here.

As a reminder, I am actively maintaining the D7 version of this module. If anyone would like to be the maintainer for D8+ please DM me.

gebiss’s picture

Thanks tyler.frankenstein. I can confirm the 9.0.x-dev version works with no problems on Drupal 9.1.3. Really appreciate it.

Status: Fixed » Closed (fixed)

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

jcnventura’s picture

@tyler.frankenstein You should not have created a 9.0.x version of the module. Can you please give me maintainer access and I can try to untangle this mess.

tyler.frankenstein’s picture

@jcnventura

You should not have created a 9.0.x version of the module.

What should I have done?

Can you please give me maintainer access and I can try to untangle this mess.

Done.

jcnventura’s picture

Thanks for the maintainer access.

Drupal 9 modules are the same module as Drupal 8 modules. There's no need to create a 9.x version. Only to merge the D9 readiness fixes into the D8 module.

I'll take a look and try to see what I can do. Thankfully, the 9.x version was never made public.

jcnventura’s picture

Version: 9.0.x-dev » 8.x-4.x-dev

OK. I'm merging this into the 8.x-4.x branch. After reviewing the changes, there's no need to create a new branch just yet.