bernhard Posted March 2, 2023 Share Posted March 2, 2023 The latest version of RockMigrations (and many other of my modules) require PHP8.0 as minimum version. PHP7.4 is end of life, so everybody should update anyhow. But I'd be interested if there is a better solution to the following problem: When on a PHP7.4 system and you install (or try to install) RockMigrations you'll end up with an error like this: The module has PHP>=8.0 in its requires array, but it can not check for that dependency because PHP complains before even executing the check. That means the modules backend is unusable until you remove the module manually and/or update your PHP version. Any ideas? Link to comment Share on other sites More sharing options...
Rudy Posted March 2, 2023 Share Posted March 2, 2023 How about writing your ternary like this? title: ($d->title ? $d->title : $name), Link to comment Share on other sites More sharing options...
BitPoet Posted March 2, 2023 Share Posted March 2, 2023 1 hour ago, bernhard said: The module has PHP>=8.0 in its requires array, but it can not check for that dependency because PHP complains before even executing the check. That's what ModuleName.info.php was designed for. PW can check dependencies without loading the full module. 1 1 Link to comment Share on other sites More sharing options...
bernhard Posted March 2, 2023 Author Share Posted March 2, 2023 1 hour ago, Rudy said: How about writing your ternary like this? Thx @Rudy but the error comes from the first colon that comes from PHP8's named arguments 1 hour ago, BitPoet said: That's what ModuleName.info.php was designed for. PW can check dependencies without loading the full module. Ah! Thx about that reminder. I got used to writing everything into the .module.php file as I saw no benefit in having a separate file, but that totally makes sense ? Thx! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now