Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Conditions to support PHP Attributes #498

Conversation

rafaldziubak
Copy link
Contributor

Overview

This pull request updates the custom rules conditions to support PHP attributes for plugin discovery. The change aligns the code with Drupal’s latest standards, preparing it for future upgrades.

Before

The current status. Please provide screenshots or gifs (LICEcap, SilentCast) where appropriate.

After

What has been changed. Please provide screenshots or gifs (LICEcap, SilentCast) where appropriate.

Technical Details

If the PR introduces noteworthy technical changes, please describe them here. Provide code snippets if necessary

Comments

The update does not remove any annotations, it only adds PHP attributes.

Release notes snippet

The notes to be added on the release

@civibot civibot bot added the 4.0.x label Aug 14, 2024
@jackrabbithanna
Copy link
Collaborator

In Drupal 10.2 / 10.3 various plugin types now support PHP Attributes, and annotations will be deprecated and in Drupal 12 will not be supported.
In Drupal 10.3, it broke Rules module and required a new version (4.0.x) and plugins supporting PHP Attributes.
The plan for this PR will be to have it as an option for those who make the switch to Rules 4.x
We'll merge this code for sure by the end of the year, and will consider making CiviCRM Entity require Drupal 10.3, but only after a few months after 10.2 has gone unsupported (Dec 2024)

For those people choosing to use newer versions, this PR is available to use as a patch.

@jackrabbithanna jackrabbithanna marked this pull request as ready for review October 30, 2024 14:09
@jackrabbithanna jackrabbithanna merged commit 216e3a3 into eileenmcnaughton:4.0.x Dec 5, 2024
2 of 3 checks passed
puresyntax71 pushed a commit to puresyntax71/civicrm_entity that referenced this pull request Jan 9, 2025
puresyntax71 added a commit to puresyntax71/civicrm_entity that referenced this pull request Jan 9, 2025
* origin/4.0.x: (65 commits)
  Fix unknown entity type with multilingual (eileenmcnaughton#497)
  check if bundle is empty before creating base field definition (eileenmcnaughton#502)
  Allow having a different civicrm_entity entity id and table. (eileenmcnaughton#501)
  Update Conditions to support PHP Attributes (eileenmcnaughton#498)
  require Drupal 10.3 as minimum version (eileenmcnaughton#503)
  D11 Tests (eileenmcnaughton#499)
  update port chromedriver (eileenmcnaughton#500)
  Add check to ensure CiviCRM container is booted before invoking hooks (eileenmcnaughton#492)
  Replace deprecation for search_api. (eileenmcnaughton#455)
  Support for basefield overrides (eileenmcnaughton#496)
  update tests, 10.3 official, and 5.75 (eileenmcnaughton#490)
  check for metatag_computed field, for Drupal entity based saves with Metatag 2.0 (eileenmcnaughton#489)
  use LoggerChannelFactoryInterface instead of default service (eileenmcnaughton#488)
  update tests for 10.3 and 11 (eileenmcnaughton#484)
  fix edge case updating base field definition for bundles (eileenmcnaughton#487)
  Add patch from https://www.drupal.org/project/civicrm_entity/issues/3447309. (eileenmcnaughton#486)
  Fix metatag not loading. (eileenmcnaughton#481)
  update settings form for D11 compatibility (eileenmcnaughton#485)
  adding logger parameter to ModulerInstaller service (eileenmcnaughton#483)
  update composer.json for Drupal 11 (eileenmcnaughton#482)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants