AccessCheckInterface and AccessStorageInterface are useless. They have been invented for some "playing around" with interfaces. There is no benefit from them. The related methods in AccessCheck and AccessStorage need updated comments afterwards along with removed interfaces, of course.

Comments

Peter Majmesku created an issue. See original summary.

prathibhab.cdac’s picture

Unable to find AccessStorageInterface in Drupal 8.

prathibhab.cdac’s picture

StatusFileSize
new2.92 KB

Please find the patch for removing the AccessCheckInterface.

jepster_’s picture

You have removed a Drupal core interface. That is very wrong. This will break the entire Drupal system and is not related to the Permissions by Term module. Permissions by Term module is located in it's own project folder. You are lacking basic understand of Drupal.

Install Drupal, try to understand how the system works. Especially the folder structure. Documentation about the directory structure can be found at https://www.drupal.org/docs/8/understanding-drupal/directory-structure.

I suggest you, to get familiar with Drupal itself. A few good resources can be books. Like these:

prathibhab.cdac’s picture

StatusFileSize
new21.35 KB
prathibhab.cdac’s picture

How to test after removing these interfaces?

prathibhab.cdac’s picture

AccessCheckInterface appears in PermissionsByTermController class. Its used in handleviews and handlenode funtion. How to handle this part?

jepster_’s picture

AccessCheckInterface appears in PermissionsByTermController class. Its used in handleviews and handlenode funtion. How to handle this part?

As already written to you at https://www.drupal.org/node/2818105 and via IRC. I will tell you again and again:

@prathibhab.cdac: Just replace the parameter hinting with the class instead of it's interface. That's easy, since there is only 1 interface per 1 class.

How to test after removing these interfaces?

Take a look at https://www.drupal.org/docs/8/modules/permissions-by-term and scroll down to "Testing" section.

skll5l’s picture

StatusFileSize
new9.04 KB

See attached. Unit tests and most of your example Behat tests are successful. The first scenario fails; I don't think it's related.

jepster_’s picture

@Sebastian Kamil (sebkamil): Thanks for your patch! I will review it asap.

jepster_’s picture

Status: Active » Needs work

Could you please re-base your patch against the latest dev-version?

skll5l’s picture

Status: Needs work » Active
StatusFileSize
new8.99 KB

Rebased on the latest 8.x-1.x

Had one conflict. Resolved it by taking 8.x-1.x version

jepster_’s picture

Status: Active » Needs work

Thanks. Please mind that the interface-classes are containing doc-blocks with comments. These comments must be preserved. The @inheritdoc comment block works only with a corresponding interface. Since we have no interface anymore, the method comment must be moved from the interface to the corresponding class method.

prathibhab.cdac’s picture

StatusFileSize
new17.81 KB

Comments added under the respective class method.

jepster_’s picture

Status: Needs work » Fixed

Thanks! I have tweaked the changes a bit (typos, useless comments, spaces..) and commited it into the dev branch. Will come soon into next release (version 8.x-1.24).

jepster_’s picture

@prathibhab.cdac + @sebkamil: If you like to contribute, please take care of this issue: Automated Tests

Status: Fixed » Closed (fixed)

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