The core_version_requirement
key specifies what versions of Drupal that the module is compatible with.
name: Example
type: module
core: 8.x
core_version_requirement: ^8 || ^9
The above example says that the module is compatible with Drupal 9 and Drupal 9. Notice that the core key is still compulsory here
The chnage
After Drupal 8.8.0 we will not need the core key anymore.
name: Example
type: module
core_version_requirement: ^8 || ^9
In fact if you add it with the core key you will get an error like below
Important
The core_version_requirement
cannot be used to any version of Drupal prior to 8.7.7 , because it does not recognize the core_version_requirement
key.
core_version_requirement: ^8.7 || ^9
This is not valid because ^8.7
would include versions like 8.7.0
which do not recognize the core_version_requirement
key.
Reference