From b2a77d2c14cc6b23320989ea4830edcab3d123ee Mon Sep 17 00:00:00 2001 From: Ilias Dimopoulos Date: Fri, 13 Nov 2020 13:35:44 +0200 Subject: [PATCH 1/2] ISAICP-6287: Update wording in the JLC. --- tests/features/communities/eupl/jlc.feature | 82 +++++++++---------- tests/src/Context/EuplContext.php | 12 +-- .../joinup_licence/joinup_licence.routing.yml | 6 +- .../joinup_licence/js/licence_filter.js | 8 +- .../LicenceCompatibilityController.php | 24 +++--- .../src/Entity/CompatibilityDocument.php | 26 +++--- .../Entity/CompatibilityDocumentInterface.php | 2 +- .../joinup_licence/src/Entity/Licence.php | 10 +-- .../src/Entity/LicenceInterface.php | 8 +- ...oinupLicenceCompatibilityRuleInterface.php | 6 +- ...inupLicenceCompatibilityRulePluginBase.php | 10 +-- ...pLicenceCompatibilityRulePluginManager.php | 8 +- .../IncompatibleLicences.php | 2 +- .../T01IdenticalLicence.php | 4 +- .../T02Eupl11IsCompatibleWithGpl2.php | 4 +- .../T03Eupl11IsCompatibleWithGpl3.php | 4 +- .../T04Eupl12IsCompatibleWithGpl.php | 4 +- .../T05Gpl2andGpl3AreCompatible.php | 4 +- .../T06Eupl11andEupl12AreCompatible.php | 4 +- ...CompatibleLicencesAreCompatibleWithGpl.php | 4 +- ...08Eupl11CanBeRelicensedAsGpl2AndOthers.php | 4 +- .../T09Eupl11CanBeRelicensedAsGpl3.php | 4 +- ...T10Eupl12CanBeRelicensedAsGplAndOthers.php | 4 +- ...ernmentalLicencesCanBeRelicensedAsEupl.php | 4 +- ...icenceCanRedistributePermissiveLicence.php | 4 +- ...lIsCompatibleWithGplCompatibleLicences.php | 4 +- ...anBeDistributedAsPermissiveIfUnchanged.php | 4 +- ...yLeftCanBeDistributedAsAnotherCopyLeft.php | 4 +- ...pyLeftCanBeDistributedAsLesserCopyLeft.php | 4 +- .../T17ForSoftwareVsForData.php | 4 +- .../T18ForDataVsForSoftware.php | 4 +- ...ty--licence--compatibility-check.html.twig | 8 +- 32 files changed, 142 insertions(+), 142 deletions(-) diff --git a/tests/features/communities/eupl/jlc.feature b/tests/features/communities/eupl/jlc.feature index 19800a2deb..fedf20c135 100644 --- a/tests/features/communities/eupl/jlc.feature +++ b/tests/features/communities/eupl/jlc.feature @@ -65,7 +65,7 @@ Feature: | http://joinup.eu/licence/soft | SOFT | SOFT | For software | Then the following combination of licences should be described in the compatibility document: - | use | redistribute as | document ID | + | inbound | outbound | document ID | | AGPL-3.0-only | AGPL-3.0-only | T01 | | EUPL-1.1 | EUPL-1.1 | T01 | | EUPL-1.2 | EUPL-1.2 | T01 | @@ -249,14 +249,14 @@ Feature: # The compatibility documents should exist and have a default text. When I click "Edit" in the "T01" row Then I should see the heading "Edit T01" - And I should see the text "Compatibility document comparing @use-licence with @redistribute-as-licence." + And I should see the text "Compatibility document comparing @inbound-licence with @outbound-licence." # The document should be editable. - When I fill in "Description" with "In case the two components are not merged, each component keeps its primary licence: @use-licence or @redistribute-as-licence." + When I fill in "Description" with "In case the two components are not merged, each component keeps its primary licence: @inbound-licence or @outbound-licence." And I press "Save" Then I should see the success message "The compatibility document T01 has been updated." When I click "Edit" in the "T01" row - Then I should see the text "In case the two components are not merged, each component keeps its primary licence: @use-licence or @redistribute-as-licence." + Then I should see the text "In case the two components are not merged, each component keeps its primary licence: @inbound-licence or @outbound-licence." # The compatibility documents are populated automatically when visiting the # overview. Clean them up again. @@ -281,40 +281,40 @@ Feature: And compatibility documents: | id | description | | T01 | Freedom for using and re-distributing is a basic common characteristic of all open licences. | - | T10 | The hypothetical risk of 'viral effect' from @redistribute-as-licence to the code covered by @use-licence in the case of dynamic or even static linking will not be validated. | - | T16 | You have to check if the text of @use-licence has expressly mentioned @redistribute-as-licence as compatible. | - | INCOMPATIBLE | @use-licence is not compatible with @redistribute-as-licence. | + | T10 | The hypothetical risk of 'viral effect' from @outbound-licence to the code covered by @inbound-licence in the case of dynamic or even static linking will not be validated. | + | T16 | You have to check if the text of @inbound-licence has expressly mentioned @outbound-licence as compatible. | + | INCOMPATIBLE | @inbound-licence is not compatible with @outbound-licence. | When I go to "licence/compatibility-check/EUPL-1.2/EUPL-1.2" - Then I should see the heading "Can European Union Public Licence 1.2 be redistributed as European Union Public Licence 1.2?" + Then I should see the heading "Compatibility between the European Union Public Licence 1.2 (inbound licence) and the European Union Public Licence 1.2 (outbound licence)." And I should see the text "Freedom for using and re-distributing is a basic common characteristic of all open licences." And the page should be cacheable When I reload the page Then the page should be cached When I visit "licence/compatibility-check/LGPL-2.1/LGPL-2.1" - Then I should see the heading "Can GNU Lesser General Public License 2.1 be redistributed as GNU Lesser General Public License 2.1?" + Then I should see the heading "Compatibility between the GNU Lesser General Public License 2.1 (inbound licence) and the GNU Lesser General Public License 2.1 (outbound licence)." And I should see the text "Freedom for using and re-distributing is a basic common characteristic of all open licences." And the page should be cacheable When I reload the page Then the page should be cached When I visit "licence/compatibility-check/EUPL-1.2/LGPL-2.1" - Then I should see the heading "Can European Union Public Licence 1.2 be redistributed as GNU Lesser General Public License 2.1?" + Then I should see the heading "Compatibility between the European Union Public Licence 1.2 (inbound licence) and the GNU Lesser General Public License 2.1 (outbound licence)." And I should see the text "The hypothetical risk of 'viral effect' from LGPL-2.1 to the code covered by EUPL-1.2 in the case of dynamic or even static linking will not be validated." And the page should be cacheable When I reload the page Then the page should be cached When I visit "licence/compatibility-check/EUPL-1.2/CECILL-C" - Then I should see the heading "Can European Union Public Licence 1.2 be redistributed as CeCILL-C?" + Then I should see the heading "Compatibility between the European Union Public Licence 1.2 (inbound licence) and the CeCILL-C (outbound licence)." And I should see the text "You have to check if the text of EUPL-1.2 has expressly mentioned CECILL-C as compatible." And the page should be cacheable When I reload the page Then the page should be cached When I visit "licence/compatibility-check/LGPL-2.1/CECILL-C" - Then I should see the heading "Can GNU Lesser General Public License 2.1 be redistributed as CeCILL-C?" + Then I should see the heading "Compatibility between the GNU Lesser General Public License 2.1 (inbound licence) and the CeCILL-C (outbound licence)." And I should see the text "LGPL-2.1 is not compatible with CECILL-C" And the page should be cacheable When I reload the page @@ -338,7 +338,7 @@ Feature: # Note that the clicking of the radio buttons is not checked here since this # requires a JS enabled browser. It is tested below. When I go to "licence/compatibility-check/EUPL-1.2/EUPL-1.2" - Then I should see the heading "Can European Union Public Licence 1.2 be redistributed as European Union Public Licence 1.2?" + Then I should see the heading "Compatibility between the European Union Public Licence 1.2 (inbound licence) and the European Union Public Licence 1.2 (outbound licence)." And I should see the text "Freedom for using and re-distributing is a basic common characteristic of all open licences." And the page should be cacheable When I reload the page @@ -363,77 +363,77 @@ Feature: And compatibility documents: | id | description | | T01 | Freedom for using and re-distributing is a basic common characteristic of all open licences. | - | T10 | The hypothetical risk of 'viral effect' from @redistribute-as-licence to the code covered by @use-licence in the case of dynamic or even static linking will not be validated. | - | T16 | You have to check if the text of @use-licence has expressly mentioned @redistribute-as-licence as compatible. | - | INCOMPATIBLE | @use-licence is not compatible with @redistribute-as-licence. | + | T10 | The hypothetical risk of 'viral effect' from @outbound-licence to the code covered by @inbound-licence in the case of dynamic or even static linking will not be validated. | + | T16 | You have to check if the text of @inbound-licence has expressly mentioned @outbound-licence as compatible. | + | INCOMPATIBLE | @inbound-licence is not compatible with @outbound-licence. | When I visit the "JLC" custom page Then the "Check compatibility" buttons should be disabled - When I choose "EUPL-1.2" as the "Use" licence + When I choose "EUPL-1.2" as the "Inbound" licence Then the "Check compatibility" buttons should be disabled - When I choose "EUPL-1.2" as the "Distribute" licence + When I choose "EUPL-1.2" as the "Outbound" licence Then the "Check compatibility" buttons should be enabled # Check that the user can disable the buttons by pressing "Reset" When I press "Reset" Then the "Check compatibility" buttons should be disabled - When I choose "EUPL-1.2" as the "Use" licence - And I choose "EUPL-1.2" as the "Distribute" licence + When I choose "EUPL-1.2" as the "Inbound" licence + And I choose "EUPL-1.2" as the "Outbound" licence And I click "Check compatibility" Then the url should match "licence/compatibility-check/EUPL-1.2/EUPL-1.2" - And I should see the heading "Can European Union Public Licence 1.2 be redistributed as European Union Public Licence 1.2?" + And I should see the heading "Compatibility between the European Union Public Licence 1.2 (inbound licence) and the European Union Public Licence 1.2 (outbound licence)." And I should see the text "Freedom for using and re-distributing is a basic common characteristic of all open licences." When I visit the "JLC" custom page Then the "Check compatibility" buttons should be disabled - When I choose "LGPL-2.1" as the "Use" licence + When I choose "LGPL-2.1" as the "Inbound" licence Then the "Check compatibility" buttons should be disabled - When I choose "LGPL-2.1" as the "Distribute" licence + When I choose "LGPL-2.1" as the "Outbound" licence Then the "Check compatibility" buttons should be enabled When I click "Check compatibility" Then the url should match "licence/compatibility-check/LGPL-2.1/LGPL-2.1" - And I should see the heading "Can GNU Lesser General Public License 2.1 be redistributed as GNU Lesser General Public License 2.1?" + And I should see the heading "Compatibility between the GNU Lesser General Public License 2.1 (inbound licence) and the GNU Lesser General Public License 2.1 (outbound licence)." And I should see the text "Freedom for using and re-distributing is a basic common characteristic of all open licences." When I visit the "JLC" custom page Then the "Check compatibility" buttons should be disabled - When I choose "EUPL-1.2" as the "Use" licence + When I choose "EUPL-1.2" as the "Inbound" licence Then the "Check compatibility" buttons should be disabled - When I choose "LGPL-2.1" as the "Distribute" licence + When I choose "LGPL-2.1" as the "Outbound" licence Then the "Check compatibility" buttons should be enabled When I click "Check compatibility" Then the url should match "licence/compatibility-check/EUPL-1.2/LGPL-2.1" - And I should see the heading "Can European Union Public Licence 1.2 be redistributed as GNU Lesser General Public License 2.1?" + And I should see the heading "Compatibility between the European Union Public Licence 1.2 (inbound licence) and the GNU Lesser General Public License 2.1 (outbound licence)." And I should see the text "The hypothetical risk of 'viral effect' from LGPL-2.1 to the code covered by EUPL-1.2 in the case of dynamic or even static linking will not be validated." When I visit the "JLC" custom page Then the "Check compatibility" buttons should be disabled - When I choose "EUPL-1.2" as the "Use" licence + When I choose "EUPL-1.2" as the "Inbound" licence Then the "Check compatibility" buttons should be disabled - When I choose "CECILL-C" as the "Distribute" licence + When I choose "CECILL-C" as the "Outbound" licence Then the "Check compatibility" buttons should be enabled When I click "Check compatibility" Then the url should match "licence/compatibility-check/EUPL-1.2/CECILL-C" - And I should see the heading "Can European Union Public Licence 1.2 be redistributed as CeCILL-C?" + And I should see the heading "Compatibility between the European Union Public Licence 1.2 (inbound licence) and the CeCILL-C (outbound licence)." And I should see the text "You have to check if the text of EUPL-1.2 has expressly mentioned CECILL-C as compatible." When I visit the "JLC" custom page Then the "Check compatibility" buttons should be disabled - When I choose "LGPL-2.1" as the "Use" licence + When I choose "LGPL-2.1" as the "Inbound" licence Then the "Check compatibility" buttons should be disabled - When I choose "CECILL-C" as the "Distribute" licence + When I choose "CECILL-C" as the "Outbound" licence Then the "Check compatibility" buttons should be enabled When I click "Check compatibility" Then the url should match "licence/compatibility-check/LGPL-2.1/CECILL-C" - And I should see the heading "Can GNU Lesser General Public License 2.1 be redistributed as CeCILL-C?" + And I should see the heading "Compatibility between the GNU Lesser General Public License 2.1 (inbound licence) and the CeCILL-C (outbound licence)." And I should see the text "LGPL-2.1 is not compatible with CECILL-C" When I visit the "JLC" custom page - When I choose "LGPL-2.1" as the "Use" licence - When I choose "CECILL-C" as the "Distribute" licence + When I choose "LGPL-2.1" as the "Inbound" licence + When I choose "CECILL-C" as the "Outbound" licence When I click "Check compatibility" Then the url should match "licence/compatibility-check/LGPL-2.1/CECILL-C" - And I should see the heading "Can GNU Lesser General Public License 2.1 be redistributed as CeCILL-C?" + And I should see the heading "Compatibility between the GNU Lesser General Public License 2.1 (inbound licence) and the CeCILL-C (outbound licence)." And I should see the text "LGPL-2.1 is not compatible with CECILL-C" # Even though moderators can edit compatibility documents they should not be @@ -449,15 +449,15 @@ Feature: Given I am logged in as an "authenticated user" When I visit the "JLC" custom page Then the "Check compatibility" buttons should be disabled - When I choose "EUPL-1.2" as the "Use" licence + When I choose "EUPL-1.2" as the "Inbound" licence Then the "Check compatibility" buttons should be disabled - When I choose "EUPL-1.2" as the "Distribute" licence + When I choose "EUPL-1.2" as the "Outbound" licence Then the "Check compatibility" buttons should be enabled When I press "Reset" Then the "Check compatibility" buttons should be disabled - When I choose "EUPL-1.2" as the "Use" licence - And I choose "EUPL-1.2" as the "Distribute" licence + When I choose "EUPL-1.2" as the "Inbound" licence + And I choose "EUPL-1.2" as the "Outbound" licence And I click "Check compatibility" Then the url should match "licence/compatibility-check/EUPL-1.2/EUPL-1.2" - And I should see the heading "Can European Union Public Licence 1.2 be redistributed as European Union Public Licence 1.2?" + And I should see the heading "Compatibility between the European Union Public Licence 1.2 (inbound licence) and the European Union Public Licence 1.2 (outbound licence)." And I should see the text "Freedom for using and re-distributing is a basic common characteristic of all open licences." diff --git a/tests/src/Context/EuplContext.php b/tests/src/Context/EuplContext.php index 5104864f30..bf2bff38f8 100644 --- a/tests/src/Context/EuplContext.php +++ b/tests/src/Context/EuplContext.php @@ -236,7 +236,7 @@ protected function toggleLicenceForComparison(bool $compare, string $spdx_id): v * @When I choose :spdx_id as the :label licence */ public function selectRadioButtonForLicenceCompatibilityCheck(string $spdx_id, string $label): void { - assert(in_array($label, ['Use', 'Distribute']), 'The purpose should be either "Use" or "Distribute".'); + assert(in_array($label, ['Inbound', 'Outbound']), 'The purpose should be either "Use" or "Distribute".'); $licence = $this->findLicenceTile($spdx_id); $this->selectMaterialDesignRadioButton($label, $licence); } @@ -350,14 +350,14 @@ public function assertLicenceCompatibility(TableNode $table) { /** @var \Drupal\joinup_licence\JoinupLicenceCompatibilityRulePluginManager $plugin_manager */ $plugin_manager = \Drupal::service('plugin.manager.joinup_licence_compatibility_rule'); foreach ($table->getColumnsHash() as $test_case) { - $use_label = $test_case['use']; - $redistribute_as_label = $test_case['redistribute as']; + $use_label = $test_case['inbound']; + $redistribute_as_label = $test_case['outbound']; $expected_result = $test_case['document ID']; - $use_licence = static::loadLicenceByLabel($use_label); - $redistribute_as_licence = static::loadLicenceByLabel($redistribute_as_label); + $inbound_licence = static::loadLicenceByLabel($use_label); + $outbound_licence = static::loadLicenceByLabel($redistribute_as_label); - $result = $plugin_manager->getCompatibilityDocumentId($use_licence, $redistribute_as_licence); + $result = $plugin_manager->getCompatibilityDocumentId($inbound_licence, $outbound_licence); // Check that the returned document ID matches the expected ID. if ($expected_result !== $result) { diff --git a/web/modules/custom/joinup_licence/joinup_licence.routing.yml b/web/modules/custom/joinup_licence/joinup_licence.routing.yml index b51a640352..399122cdb4 100644 --- a/web/modules/custom/joinup_licence/joinup_licence.routing.yml +++ b/web/modules/custom/joinup_licence/joinup_licence.routing.yml @@ -30,7 +30,7 @@ joinup_licence.comparer: type: spdx_ids_list joinup_licence.compatibility_check: - path: '/licence/compatibility-check/{use_licence}/{redistribute_as_licence}' + path: '/licence/compatibility-check/{inbound_licence}/{outbound_licence}' defaults: _controller: 'Drupal\joinup_licence\Controller\LicenceCompatibilityController::check' _title_callback: 'Drupal\joinup_licence\Controller\LicenceCompatibilityController::getTitle' @@ -38,9 +38,9 @@ joinup_licence.compatibility_check: _permission: 'view compatibility documents' options: parameters: - use_licence: + inbound_licence: type: licence_spdx_id - redistribute_as_licence: + outbound_licence: type: licence_spdx_id entity.compatibility_document.collection: diff --git a/web/modules/custom/joinup_licence/js/licence_filter.js b/web/modules/custom/joinup_licence/js/licence_filter.js index 7e54007a9f..1fb1008e3a 100644 --- a/web/modules/custom/joinup_licence/js/licence_filter.js +++ b/web/modules/custom/joinup_licence/js/licence_filter.js @@ -220,11 +220,11 @@ // Change compatible elements if the radio is clicked. $(this).on('click', function () { - var use_licence = $("input[name='use-licence']:checked").attr('data-licence-name'); - var distribute_licence = $("input[name='distribute-as-licence']:checked").attr('data-licence-name'); + var inbound_licence = $("input[name='inbound-licence']:checked").attr('data-licence-name'); + var distribute_licence = $("input[name='outbound-licence']:checked").attr('data-licence-name'); - if(use_licence && distribute_licence) { - var compatible_url = drupalSettings.path.baseUrl + "licence/compatibility-check/" + use_licence + "/" + distribute_licence; + if(inbound_licence && distribute_licence) { + var compatible_url = drupalSettings.path.baseUrl + "licence/compatibility-check/" + inbound_licence + "/" + distribute_licence; $('.licence-tile__button--compatible').attr('href', compatible_url); enableButtons(true); } diff --git a/web/modules/custom/joinup_licence/src/Controller/LicenceCompatibilityController.php b/web/modules/custom/joinup_licence/src/Controller/LicenceCompatibilityController.php index 3bf5b951e9..dc65c08074 100644 --- a/web/modules/custom/joinup_licence/src/Controller/LicenceCompatibilityController.php +++ b/web/modules/custom/joinup_licence/src/Controller/LicenceCompatibilityController.php @@ -17,18 +17,18 @@ class LicenceCompatibilityController extends ControllerBase { /** * Renders a page that contains a licence compatibility check. * - * @param \Drupal\joinup_licence\Entity\LicenceInterface $use_licence + * @param \Drupal\joinup_licence\Entity\LicenceInterface $inbound_licence * The licence used for code or data that is intended to be redistributed as * part of another project. - * @param \Drupal\joinup_licence\Entity\LicenceInterface $redistribute_as_licence + * @param \Drupal\joinup_licence\Entity\LicenceInterface $outbound_licence * The licence under which the code or data is intended to be redistributed. * * @return array * A render array. */ - public function check(LicenceInterface $use_licence, LicenceInterface $redistribute_as_licence): array { + public function check(LicenceInterface $inbound_licence, LicenceInterface $outbound_licence): array { try { - $compatibility_document = $use_licence->getCompatibilityDocument($redistribute_as_licence); + $compatibility_document = $inbound_licence->getCompatibilityDocument($outbound_licence); } catch (\Exception $e) { throw new NotFoundHttpException(); @@ -43,8 +43,8 @@ public function check(LicenceInterface $use_licence, LicenceInterface $redistrib $cache_metadata = new CacheableMetadata(); $cache_metadata ->addCacheableDependency($compatibility_document) - ->addCacheableDependency($use_licence) - ->addCacheableDependency($redistribute_as_licence) + ->addCacheableDependency($inbound_licence) + ->addCacheableDependency($outbound_licence) ->applyTo($build); return $build; @@ -53,20 +53,20 @@ public function check(LicenceInterface $use_licence, LicenceInterface $redistrib /** * Title callback. * - * @param \Drupal\joinup_licence\Entity\LicenceInterface $use_licence + * @param \Drupal\joinup_licence\Entity\LicenceInterface $inbound_licence * The licence used for code or data that is intended to be redistributed as * part of another project. - * @param \Drupal\joinup_licence\Entity\LicenceInterface $redistribute_as_licence + * @param \Drupal\joinup_licence\Entity\LicenceInterface $outbound_licence * The licence under which the code or data is intended to be redistributed. * * @return array * The title as a render array. */ - public function getTitle(LicenceInterface $use_licence, LicenceInterface $redistribute_as_licence): array { + public function getTitle(LicenceInterface $inbound_licence, LicenceInterface $outbound_licence): array { return [ - '#markup' => $this->t('Can %use_licence be redistributed as %redistribute_as_licence?', [ - '%use_licence' => $use_licence->label(), - '%redistribute_as_licence' => $redistribute_as_licence->label(), + '#markup' => $this->t('Compatibility between the %inbound (inbound licence) and the %outbound (outbound licence).', [ + '%inbound' => $inbound_licence->label(), + '%outbound' => $outbound_licence->label(), ]), ]; } diff --git a/web/modules/custom/joinup_licence/src/Entity/CompatibilityDocument.php b/web/modules/custom/joinup_licence/src/Entity/CompatibilityDocument.php index 8c899b01b7..3afab7dd9f 100644 --- a/web/modules/custom/joinup_licence/src/Entity/CompatibilityDocument.php +++ b/web/modules/custom/joinup_licence/src/Entity/CompatibilityDocument.php @@ -92,13 +92,13 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type): a ]) ->setDisplayConfigurable('view', TRUE); - $fields['use_licence'] = BaseFieldDefinition::create('entity_reference') + $fields['inbound_licence'] = BaseFieldDefinition::create('entity_reference') ->setLabel(t('Use licence')) ->setDescription(t('The licence of the project that is being used as part of a new project.')) ->setComputed(TRUE) ->setClass(CompatibilityDocumentLicenceFieldItemList::class); - $fields['redistribute_as_licence'] = BaseFieldDefinition::create('entity_reference') + $fields['outbound_licence'] = BaseFieldDefinition::create('entity_reference') ->setLabel(t('Redistribute as licence')) ->setDescription(t('The licence under which the new project will be distributed.')) ->setComputed(TRUE) @@ -145,7 +145,7 @@ public static function populate(): void { foreach ($missing_entity_ids as $entity_id) { $storage->create([ 'id' => $entity_id, - 'description' => 'Compatibility document comparing @use-licence with @redistribute-as-licence.', + 'description' => 'Compatibility document comparing @inbound-licence with @outbound-licence.', ])->save(); } @@ -160,7 +160,7 @@ public static function populate(): void { * {@inheritdoc} */ public function setUseLicence(LicenceInterface $licence): CompatibilityDocumentInterface { - $this->set('use_licence', $licence); + $this->set('inbound_licence', $licence); return $this; } @@ -168,7 +168,7 @@ public function setUseLicence(LicenceInterface $licence): CompatibilityDocumentI * {@inheritdoc} */ public function setRedistributeAsLicence(LicenceInterface $licence): CompatibilityDocumentInterface { - $this->set('redistribute_as_licence', $licence); + $this->set('outbound_licence', $licence); return $this; } @@ -176,14 +176,14 @@ public function setRedistributeAsLicence(LicenceInterface $licence): Compatibili * {@inheritdoc} */ public function getUseLicence(): ?LicenceInterface { - return $this->getLicence('use_licence'); + return $this->getLicence('inbound_licence'); } /** * {@inheritdoc} */ public function getRedistributeAsLicence(): ?LicenceInterface { - return $this->getLicence('redistribute_as_licence'); + return $this->getLicence('outbound_licence'); } /** @@ -208,14 +208,14 @@ protected function getLicence(string $field_name): ?LicenceInterface { */ public function getDescription(): FormattableMarkup { $description = $this->getMainPropertyValue('description') ?? ''; - $use_licence = $this->getUseLicence(); - $use_licence_id = $use_licence ? $use_licence->getSpdxLicenceId() ?? $this->t('Unknown') : $this->t('Unknown'); - $redistribute_as_licence = $this->getRedistributeAsLicence(); - $redistribute_as_licence_id = $redistribute_as_licence ? $redistribute_as_licence->getSpdxLicenceId() ?? $this->t('Unknown') : $this->t('Unknown'); + $inbound_licence = $this->getUseLicence(); + $inbound_licence_id = $inbound_licence ? $inbound_licence->getSpdxLicenceId() ?? $this->t('Unknown') : $this->t('Unknown'); + $outbound_licence = $this->getRedistributeAsLicence(); + $outbound_licence_id = $outbound_licence ? $outbound_licence->getSpdxLicenceId() ?? $this->t('Unknown') : $this->t('Unknown'); return new FormattableMarkup($description, [ - '@use-licence' => $use_licence_id, - '@redistribute-as-licence' => $redistribute_as_licence_id, + '@inbound-licence' => $inbound_licence_id, + '@outbound-licence' => $outbound_licence_id, ]); } diff --git a/web/modules/custom/joinup_licence/src/Entity/CompatibilityDocumentInterface.php b/web/modules/custom/joinup_licence/src/Entity/CompatibilityDocumentInterface.php index f4a4208759..e11540e663 100644 --- a/web/modules/custom/joinup_licence/src/Entity/CompatibilityDocumentInterface.php +++ b/web/modules/custom/joinup_licence/src/Entity/CompatibilityDocumentInterface.php @@ -48,7 +48,7 @@ public function getRedistributeAsLicence(): ?LicenceInterface; * * @return \Drupal\Component\Render\FormattableMarkup * The description, with actual licence names as replacement arguments for - * '@use-licence' and '@redistribute-as-licence'. + * '@inbound-licence' and '@outbound-licence'. */ public function getDescription(): FormattableMarkup; diff --git a/web/modules/custom/joinup_licence/src/Entity/Licence.php b/web/modules/custom/joinup_licence/src/Entity/Licence.php index 8b9f63e495..4acb0c0ecd 100644 --- a/web/modules/custom/joinup_licence/src/Entity/Licence.php +++ b/web/modules/custom/joinup_licence/src/Entity/Licence.php @@ -76,20 +76,20 @@ public function getSpdxLicenceRdfId(): ?string { /** * {@inheritdoc} */ - public function getCompatibilityDocumentId(LicenceInterface $redistribute_as_licence): string { + public function getCompatibilityDocumentId(LicenceInterface $outbound_licence): string { /** @var \Drupal\joinup_licence\JoinupLicenceCompatibilityRulePluginManager $plugin_manager */ $plugin_manager = \Drupal::service('plugin.manager.joinup_licence_compatibility_rule'); - return $plugin_manager->getCompatibilityDocumentId($this, $redistribute_as_licence); + return $plugin_manager->getCompatibilityDocumentId($this, $outbound_licence); } /** * {@inheritdoc} */ - public function getCompatibilityDocument(LicenceInterface $redistribute_as_licence): CompatibilityDocumentInterface { - $compatibility_document_id = $this->getCompatibilityDocumentId($redistribute_as_licence); + public function getCompatibilityDocument(LicenceInterface $outbound_licence): CompatibilityDocumentInterface { + $compatibility_document_id = $this->getCompatibilityDocumentId($outbound_licence); return CompatibilityDocument::load($compatibility_document_id) ->setUseLicence($this) - ->setRedistributeAsLicence($redistribute_as_licence); + ->setRedistributeAsLicence($outbound_licence); } /** diff --git a/web/modules/custom/joinup_licence/src/Entity/LicenceInterface.php b/web/modules/custom/joinup_licence/src/Entity/LicenceInterface.php index 25d5eb20ef..28ddc2da95 100644 --- a/web/modules/custom/joinup_licence/src/Entity/LicenceInterface.php +++ b/web/modules/custom/joinup_licence/src/Entity/LicenceInterface.php @@ -66,7 +66,7 @@ public function getSpdxLicenceRdfId(): ?string; * the current licence can be used in a project which is going to be * distributed under the passed in licence. * - * @param \Drupal\joinup_licence\Entity\LicenceInterface $redistribute_as_licence + * @param \Drupal\joinup_licence\Entity\LicenceInterface $outbound_licence * The licence under which the current code or data is going to be * redistributed. * @@ -76,7 +76,7 @@ public function getSpdxLicenceRdfId(): ?string; * returned, which is the ID of the document explaining the licences are * incompatible. */ - public function getCompatibilityDocumentId(LicenceInterface $redistribute_as_licence): string; + public function getCompatibilityDocumentId(LicenceInterface $outbound_licence): string; /** * Returns the document that details how the licence can be redistributed. @@ -85,14 +85,14 @@ public function getCompatibilityDocumentId(LicenceInterface $redistribute_as_lic * distributed under the current licence can be used in a project which is * going to be distributed under the passed in licence. * - * @param \Drupal\joinup_licence\Entity\LicenceInterface $redistribute_as_licence + * @param \Drupal\joinup_licence\Entity\LicenceInterface $outbound_licence * The licence under which the current code or data is going to be * redistributed. * * @return \Drupal\joinup_licence\Entity\CompatibilityDocumentInterface * The compatibility document that contains the requested information. */ - public function getCompatibilityDocument(LicenceInterface $redistribute_as_licence): CompatibilityDocumentInterface; + public function getCompatibilityDocument(LicenceInterface $outbound_licence): CompatibilityDocumentInterface; /** * Returns the Licence entity that corresponds to the given SPDX ID. diff --git a/web/modules/custom/joinup_licence/src/JoinupLicenceCompatibilityRuleInterface.php b/web/modules/custom/joinup_licence/src/JoinupLicenceCompatibilityRuleInterface.php index b14ecbd326..1fd2332ec7 100644 --- a/web/modules/custom/joinup_licence/src/JoinupLicenceCompatibilityRuleInterface.php +++ b/web/modules/custom/joinup_licence/src/JoinupLicenceCompatibilityRuleInterface.php @@ -14,15 +14,15 @@ interface JoinupLicenceCompatibilityRuleInterface { /** * Checks whether the two licences are verifying this rule. * - * @param \Drupal\joinup_licence\Entity\LicenceInterface $use_licence + * @param \Drupal\joinup_licence\Entity\LicenceInterface $inbound_licence * The licence of an existing project of which the code or data is used. - * @param \Drupal\joinup_licence\Entity\LicenceInterface $redistribute_as_licence + * @param \Drupal\joinup_licence\Entity\LicenceInterface $outbound_licence * The licence under which the modified or extended code or data is going to * be redistributed. * * @return bool * TRUE if the two licences are compatible according to this rule. */ - public function isVerified(LicenceInterface $use_licence, LicenceInterface $redistribute_as_licence): bool; + public function isVerified(LicenceInterface $inbound_licence, LicenceInterface $outbound_licence): bool; } diff --git a/web/modules/custom/joinup_licence/src/JoinupLicenceCompatibilityRulePluginBase.php b/web/modules/custom/joinup_licence/src/JoinupLicenceCompatibilityRulePluginBase.php index ca6d29d7b4..162a63a3bb 100644 --- a/web/modules/custom/joinup_licence/src/JoinupLicenceCompatibilityRulePluginBase.php +++ b/web/modules/custom/joinup_licence/src/JoinupLicenceCompatibilityRulePluginBase.php @@ -15,21 +15,21 @@ abstract class JoinupLicenceCompatibilityRulePluginBase extends PluginBase imple /** * The criteria to which the use licence should adhere. */ - const USE_CRITERIA = []; + const INBOUND_CRITERIA = []; /** * The criteria to which the use redistribute as licence should adhere. */ - const REDISTRIBUTE_AS_CRITERIA = []; + const OUTBOUND_CRITERIA = []; /** * {@inheritdoc} */ - public function isVerified(LicenceInterface $use_licence, LicenceInterface $redistribute_as_licence): bool { + public function isVerified(LicenceInterface $inbound_licence, LicenceInterface $outbound_licence): bool { /** @var \Drupal\joinup_licence\Entity\LicenceInterface $licence */ foreach ([ - [$use_licence, static::USE_CRITERIA], - [$redistribute_as_licence, static::REDISTRIBUTE_AS_CRITERIA], + [$inbound_licence, static::INBOUND_CRITERIA], + [$outbound_licence, static::OUTBOUND_CRITERIA], ] as [$licence, $criteria]) { foreach ($criteria as $type => $matches) { switch ($type) { diff --git a/web/modules/custom/joinup_licence/src/JoinupLicenceCompatibilityRulePluginManager.php b/web/modules/custom/joinup_licence/src/JoinupLicenceCompatibilityRulePluginManager.php index 733fbc04f6..f86889ec50 100644 --- a/web/modules/custom/joinup_licence/src/JoinupLicenceCompatibilityRulePluginManager.php +++ b/web/modules/custom/joinup_licence/src/JoinupLicenceCompatibilityRulePluginManager.php @@ -51,9 +51,9 @@ public function __construct(\Traversable $namespaces, CacheBackendInterface $cac * the current licence can be used in a project which is going to be * distributed under the passed in licence. * - * @param \Drupal\joinup_licence\Entity\LicenceInterface $use_licence + * @param \Drupal\joinup_licence\Entity\LicenceInterface $inbound_licence * The licence of an existing project of which the code or data is used. - * @param \Drupal\joinup_licence\Entity\LicenceInterface $redistribute_as_licence + * @param \Drupal\joinup_licence\Entity\LicenceInterface $outbound_licence * The licence under which the modified or extended code or data is going to * be redistributed. * @@ -65,11 +65,11 @@ public function __construct(\Traversable $namespaces, CacheBackendInterface $cac * @throws \Drupal\Component\Plugin\Exception\PluginException * If the plugin being created is missing. */ - public function getCompatibilityDocumentId(LicenceInterface $use_licence, LicenceInterface $redistribute_as_licence): string { + public function getCompatibilityDocumentId(LicenceInterface $inbound_licence, LicenceInterface $outbound_licence): string { foreach ($this->getDefinitions() as $plugin_id => $plugin_definition) { /** @var \Drupal\joinup_licence\JoinupLicenceCompatibilityRuleInterface $rule */ $rule = $this->createInstance($plugin_id); - if ($rule->isVerified($use_licence, $redistribute_as_licence)) { + if ($rule->isVerified($inbound_licence, $outbound_licence)) { // Return the first compatible result. Note that the plugin definitions // were already sorted by their weight after discovery. return $plugin_id; diff --git a/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/IncompatibleLicences.php b/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/IncompatibleLicences.php index 85bbf51f30..b9708e2000 100644 --- a/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/IncompatibleLicences.php +++ b/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/IncompatibleLicences.php @@ -19,7 +19,7 @@ class IncompatibleLicences extends JoinupLicenceCompatibilityRulePluginBase { /** * {@inheritdoc} */ - public function isVerified(LicenceInterface $use_licence, LicenceInterface $redistribute_as_licence): bool { + public function isVerified(LicenceInterface $inbound_licence, LicenceInterface $outbound_licence): bool { return TRUE; } diff --git a/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T01IdenticalLicence.php b/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T01IdenticalLicence.php index 961cba6b56..8ae4bbc6ca 100644 --- a/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T01IdenticalLicence.php +++ b/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T01IdenticalLicence.php @@ -25,8 +25,8 @@ class T01IdenticalLicence extends JoinupLicenceCompatibilityRulePluginBase { /** * {@inheritdoc} */ - public function isVerified(LicenceInterface $use_licence, LicenceInterface $redistribute_as_licence): bool { - return $use_licence->getSpdxLicenceId() === $redistribute_as_licence->getSpdxLicenceId(); + public function isVerified(LicenceInterface $inbound_licence, LicenceInterface $outbound_licence): bool { + return $inbound_licence->getSpdxLicenceId() === $outbound_licence->getSpdxLicenceId(); } } diff --git a/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T02Eupl11IsCompatibleWithGpl2.php b/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T02Eupl11IsCompatibleWithGpl2.php index b381839949..b21d06a792 100644 --- a/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T02Eupl11IsCompatibleWithGpl2.php +++ b/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T02Eupl11IsCompatibleWithGpl2.php @@ -21,7 +21,7 @@ */ class T02Eupl11IsCompatibleWithGpl2 extends JoinupLicenceCompatibilityRulePluginBase { - const USE_CRITERIA = ['SPDX' => ['GPL-2.0-only', 'GPL-2.0+']]; - const REDISTRIBUTE_AS_CRITERIA = ['SPDX' => ['EUPL-1.1']]; + const INBOUND_CRITERIA = ['SPDX' => ['GPL-2.0-only', 'GPL-2.0+']]; + const OUTBOUND_CRITERIA = ['SPDX' => ['EUPL-1.1']]; } diff --git a/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T03Eupl11IsCompatibleWithGpl3.php b/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T03Eupl11IsCompatibleWithGpl3.php index dad2722a0d..2eec0b348f 100644 --- a/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T03Eupl11IsCompatibleWithGpl3.php +++ b/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T03Eupl11IsCompatibleWithGpl3.php @@ -21,13 +21,13 @@ */ class T03Eupl11IsCompatibleWithGpl3 extends JoinupLicenceCompatibilityRulePluginBase { - const USE_CRITERIA = [ + const INBOUND_CRITERIA = [ 'SPDX' => [ 'AGPL-3.0-only', 'GPL-3.0-only', 'GPL-3.0-or-later', ], ]; - const REDISTRIBUTE_AS_CRITERIA = ['SPDX' => ['EUPL-1.1']]; + const OUTBOUND_CRITERIA = ['SPDX' => ['EUPL-1.1']]; } diff --git a/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T04Eupl12IsCompatibleWithGpl.php b/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T04Eupl12IsCompatibleWithGpl.php index e8a69652d0..ba0e4aa3a9 100644 --- a/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T04Eupl12IsCompatibleWithGpl.php +++ b/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T04Eupl12IsCompatibleWithGpl.php @@ -21,7 +21,7 @@ */ class T04Eupl12IsCompatibleWithGpl extends JoinupLicenceCompatibilityRulePluginBase { - const USE_CRITERIA = [ + const INBOUND_CRITERIA = [ 'SPDX' => [ 'AGPL-3.0-only', 'GPL-2.0+', @@ -30,6 +30,6 @@ class T04Eupl12IsCompatibleWithGpl extends JoinupLicenceCompatibilityRulePluginB 'GPL-3.0-or-later', ], ]; - const REDISTRIBUTE_AS_CRITERIA = ['SPDX' => ['EUPL-1.2']]; + const OUTBOUND_CRITERIA = ['SPDX' => ['EUPL-1.2']]; } diff --git a/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T05Gpl2andGpl3AreCompatible.php b/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T05Gpl2andGpl3AreCompatible.php index a8fb818851..45cbb148b0 100644 --- a/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T05Gpl2andGpl3AreCompatible.php +++ b/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T05Gpl2andGpl3AreCompatible.php @@ -21,13 +21,13 @@ */ class T05Gpl2andGpl3AreCompatible extends JoinupLicenceCompatibilityRulePluginBase { - const USE_CRITERIA = [ + const INBOUND_CRITERIA = [ 'SPDX' => [ 'GPL-2.0-only', 'GPL-3.0-only', ], ]; - const REDISTRIBUTE_AS_CRITERIA = [ + const OUTBOUND_CRITERIA = [ 'SPDX' => [ 'GPL-2.0-only', 'GPL-3.0-only', diff --git a/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T06Eupl11andEupl12AreCompatible.php b/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T06Eupl11andEupl12AreCompatible.php index a1ed0f1656..f3190e6c12 100644 --- a/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T06Eupl11andEupl12AreCompatible.php +++ b/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T06Eupl11andEupl12AreCompatible.php @@ -21,13 +21,13 @@ */ class T06Eupl11andEupl12AreCompatible extends JoinupLicenceCompatibilityRulePluginBase { - const USE_CRITERIA = [ + const INBOUND_CRITERIA = [ 'SPDX' => [ 'EUPL-1.1', 'EUPL-1.2', ], ]; - const REDISTRIBUTE_AS_CRITERIA = [ + const OUTBOUND_CRITERIA = [ 'SPDX' => [ 'EUPL-1.1', 'EUPL-1.2', diff --git a/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T07GplCompatibleLicencesAreCompatibleWithGpl.php b/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T07GplCompatibleLicencesAreCompatibleWithGpl.php index c6bb7288c1..56dd47a020 100644 --- a/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T07GplCompatibleLicencesAreCompatibleWithGpl.php +++ b/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T07GplCompatibleLicencesAreCompatibleWithGpl.php @@ -21,7 +21,7 @@ */ class T07GplCompatibleLicencesAreCompatibleWithGpl extends JoinupLicenceCompatibilityRulePluginBase { - const USE_CRITERIA = [ + const INBOUND_CRITERIA = [ 'SPDX' => [ 'AGPL-3.0-only', 'GPL-2.0+', @@ -30,7 +30,7 @@ class T07GplCompatibleLicencesAreCompatibleWithGpl extends JoinupLicenceCompatib 'GPL-3.0-or-later', ], ]; - const REDISTRIBUTE_AS_CRITERIA = [ + const OUTBOUND_CRITERIA = [ 'Compatible' => [ 'GPL', ], diff --git a/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T08Eupl11CanBeRelicensedAsGpl2AndOthers.php b/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T08Eupl11CanBeRelicensedAsGpl2AndOthers.php index df220d8a54..fd6f6c6ae6 100644 --- a/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T08Eupl11CanBeRelicensedAsGpl2AndOthers.php +++ b/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T08Eupl11CanBeRelicensedAsGpl2AndOthers.php @@ -21,12 +21,12 @@ */ class T08Eupl11CanBeRelicensedAsGpl2AndOthers extends JoinupLicenceCompatibilityRulePluginBase { - const USE_CRITERIA = [ + const INBOUND_CRITERIA = [ 'SPDX' => [ 'EUPL-1.1', ], ]; - const REDISTRIBUTE_AS_CRITERIA = [ + const OUTBOUND_CRITERIA = [ 'SPDX' => [ 'CECILL-2.0', 'CECILL-2.1', diff --git a/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T09Eupl11CanBeRelicensedAsGpl3.php b/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T09Eupl11CanBeRelicensedAsGpl3.php index 5d3d86f2f8..48d285b983 100644 --- a/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T09Eupl11CanBeRelicensedAsGpl3.php +++ b/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T09Eupl11CanBeRelicensedAsGpl3.php @@ -21,12 +21,12 @@ */ class T09Eupl11CanBeRelicensedAsGpl3 extends JoinupLicenceCompatibilityRulePluginBase { - const USE_CRITERIA = [ + const INBOUND_CRITERIA = [ 'SPDX' => [ 'EUPL-1.1', ], ]; - const REDISTRIBUTE_AS_CRITERIA = [ + const OUTBOUND_CRITERIA = [ 'SPDX' => [ 'AGPL-3.0-only', 'GPL-3.0-only', diff --git a/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T10Eupl12CanBeRelicensedAsGplAndOthers.php b/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T10Eupl12CanBeRelicensedAsGplAndOthers.php index 11741fe35b..6efd25d237 100644 --- a/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T10Eupl12CanBeRelicensedAsGplAndOthers.php +++ b/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T10Eupl12CanBeRelicensedAsGplAndOthers.php @@ -21,12 +21,12 @@ */ class T10Eupl12CanBeRelicensedAsGplAndOthers extends JoinupLicenceCompatibilityRulePluginBase { - const USE_CRITERIA = [ + const INBOUND_CRITERIA = [ 'SPDX' => [ 'EUPL-1.2', ], ]; - const REDISTRIBUTE_AS_CRITERIA = [ + const OUTBOUND_CRITERIA = [ 'SPDX' => [ 'AGPL-3.0-only', 'CC-BY-SA-4.0', diff --git a/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T11GovernmentalLicencesCanBeRelicensedAsEupl.php b/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T11GovernmentalLicencesCanBeRelicensedAsEupl.php index 796ee972ca..0d262172b6 100644 --- a/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T11GovernmentalLicencesCanBeRelicensedAsEupl.php +++ b/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T11GovernmentalLicencesCanBeRelicensedAsEupl.php @@ -21,13 +21,13 @@ */ class T11GovernmentalLicencesCanBeRelicensedAsEupl extends JoinupLicenceCompatibilityRulePluginBase { - const USE_CRITERIA = [ + const INBOUND_CRITERIA = [ 'SPDX' => [ 'CECILL-2.1', 'LiLiQ-Rplus-1.1', ], ]; - const REDISTRIBUTE_AS_CRITERIA = [ + const OUTBOUND_CRITERIA = [ 'SPDX' => [ 'EUPL-1.1', 'EUPL-1.2', diff --git a/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T12AnyLicenceCanRedistributePermissiveLicence.php b/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T12AnyLicenceCanRedistributePermissiveLicence.php index f8b3c941c7..0e9851b7cc 100644 --- a/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T12AnyLicenceCanRedistributePermissiveLicence.php +++ b/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T12AnyLicenceCanRedistributePermissiveLicence.php @@ -25,8 +25,8 @@ class T12AnyLicenceCanRedistributePermissiveLicence extends JoinupLicenceCompati /** * {@inheritdoc} */ - public function isVerified(LicenceInterface $use_licence, LicenceInterface $redistribute_as_licence): bool { - return $use_licence->hasLegalType('Compatible', 'Permissive'); + public function isVerified(LicenceInterface $inbound_licence, LicenceInterface $outbound_licence): bool { + return $inbound_licence->hasLegalType('Compatible', 'Permissive'); } } diff --git a/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T13GplIsCompatibleWithGplCompatibleLicences.php b/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T13GplIsCompatibleWithGplCompatibleLicences.php index 573769a1e1..8811d6ae15 100644 --- a/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T13GplIsCompatibleWithGplCompatibleLicences.php +++ b/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T13GplIsCompatibleWithGplCompatibleLicences.php @@ -21,12 +21,12 @@ */ class T13GplIsCompatibleWithGplCompatibleLicences extends JoinupLicenceCompatibilityRulePluginBase { - const USE_CRITERIA = [ + const INBOUND_CRITERIA = [ 'Compatible' => [ 'GPL', ], ]; - const REDISTRIBUTE_AS_CRITERIA = [ + const OUTBOUND_CRITERIA = [ 'SPDX' => [ 'AGPL-3.0-only', 'GPL-2.0+', diff --git a/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T14CopyLeftCanBeDistributedAsPermissiveIfUnchanged.php b/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T14CopyLeftCanBeDistributedAsPermissiveIfUnchanged.php index 897a3fb48c..50d9a0b020 100644 --- a/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T14CopyLeftCanBeDistributedAsPermissiveIfUnchanged.php +++ b/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T14CopyLeftCanBeDistributedAsPermissiveIfUnchanged.php @@ -21,13 +21,13 @@ */ class T14CopyLeftCanBeDistributedAsPermissiveIfUnchanged extends JoinupLicenceCompatibilityRulePluginBase { - const USE_CRITERIA = [ + const INBOUND_CRITERIA = [ 'Must' => [ 'Copyleft/Share a.', 'Lesser copyleft', ], ]; - const REDISTRIBUTE_AS_CRITERIA = [ + const OUTBOUND_CRITERIA = [ 'Compatible' => [ 'Permissive', ], diff --git a/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T15CopyLeftCanBeDistributedAsAnotherCopyLeft.php b/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T15CopyLeftCanBeDistributedAsAnotherCopyLeft.php index b491e6bdb9..5fee7b135f 100644 --- a/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T15CopyLeftCanBeDistributedAsAnotherCopyLeft.php +++ b/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T15CopyLeftCanBeDistributedAsAnotherCopyLeft.php @@ -21,13 +21,13 @@ */ class T15CopyLeftCanBeDistributedAsAnotherCopyLeft extends JoinupLicenceCompatibilityRulePluginBase { - const USE_CRITERIA = [ + const INBOUND_CRITERIA = [ 'Must' => [ 'Copyleft/Share a.', 'Lesser copyleft', ], ]; - const REDISTRIBUTE_AS_CRITERIA = [ + const OUTBOUND_CRITERIA = [ 'Must' => [ 'Copyleft/Share a.', ], diff --git a/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T16CopyLeftCanBeDistributedAsLesserCopyLeft.php b/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T16CopyLeftCanBeDistributedAsLesserCopyLeft.php index ecd2309c81..2f23d40114 100644 --- a/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T16CopyLeftCanBeDistributedAsLesserCopyLeft.php +++ b/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T16CopyLeftCanBeDistributedAsLesserCopyLeft.php @@ -21,12 +21,12 @@ */ class T16CopyLeftCanBeDistributedAsLesserCopyLeft extends JoinupLicenceCompatibilityRulePluginBase { - const USE_CRITERIA = [ + const INBOUND_CRITERIA = [ 'Must' => [ 'Copyleft/Share a.', ], ]; - const REDISTRIBUTE_AS_CRITERIA = [ + const OUTBOUND_CRITERIA = [ 'Must' => [ 'Lesser copyleft', ], diff --git a/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T17ForSoftwareVsForData.php b/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T17ForSoftwareVsForData.php index bd3aa67bec..44ca96b3cc 100644 --- a/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T17ForSoftwareVsForData.php +++ b/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T17ForSoftwareVsForData.php @@ -21,12 +21,12 @@ */ class T17ForSoftwareVsForData extends JoinupLicenceCompatibilityRulePluginBase { - const USE_CRITERIA = [ + const INBOUND_CRITERIA = [ 'Compatible' => [ 'For software', ], ]; - const REDISTRIBUTE_AS_CRITERIA = [ + const OUTBOUND_CRITERIA = [ 'Compatible' => [ 'For data', ], diff --git a/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T18ForDataVsForSoftware.php b/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T18ForDataVsForSoftware.php index 9512f90984..c94789931e 100644 --- a/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T18ForDataVsForSoftware.php +++ b/web/modules/custom/joinup_licence/src/Plugin/JoinupLicenceCompatibilityRule/T18ForDataVsForSoftware.php @@ -21,12 +21,12 @@ */ class T18ForDataVsForSoftware extends JoinupLicenceCompatibilityRulePluginBase { - const USE_CRITERIA = [ + const INBOUND_CRITERIA = [ 'Compatible' => [ 'For data', ], ]; - const REDISTRIBUTE_AS_CRITERIA = [ + const OUTBOUND_CRITERIA = [ 'Compatible' => [ 'For software', ], diff --git a/web/themes/joinup/templates/rdf_entity/rdf-entity--licence--compatibility-check.html.twig b/web/themes/joinup/templates/rdf_entity/rdf-entity--licence--compatibility-check.html.twig index 64f34ab937..b58e6b20b9 100644 --- a/web/themes/joinup/templates/rdf_entity/rdf-entity--licence--compatibility-check.html.twig +++ b/web/themes/joinup/templates/rdf_entity/rdf-entity--licence--compatibility-check.html.twig @@ -54,10 +54,10 @@