Closed (fixed)
Project:
Features
Version:
7.x-2.0-rc1
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Aug 2011 at 22:41 UTC
Updated:
16 Aug 2013 at 15:51 UTC
Jump to comment: Most recent file
Comments
Comment #1
delta commentedok i found that : http://drupal.org/node/542202#php
Comment #2
adamdicarlo commentedI think this is a bug; why would it be necessary to declare php = 5.2.4 for D7 features when 5.2.4 is the minimum version acceptable on D7 anyway?
Also, I think this might only happen when updating the feature through drush, but I'm not sure -- I just know that it initially isn't in the .info and later it gets added....
Comment #3
adamdicarlo commentedComment #4
hefox commentedComment #5
mpotter commentedDoes this patch do the trick?
Comment #6
mpotter commentedOr even better, as per hefox, only re-export the php property if it's different from DRUPAL_MINIMUM_PHP.
Comment #7
mortona2k commentedWhen I apply the patch (#6) and update my feature, it still puts PHP 5.2.4 in .info.
EDIT: does it for both drush and ui update/recreate
Comment #8
mpotter commentedLooks like this needs more work then.
Comment #9
jhedstromThe patch in #6 actually works, it just doesn't work for features that have already been created w/o the feature, since the php version resides in the
systemtable for those old features. To test, apply the patch and create a new feature, then run features update via drush, and no more php version in the info file.Comment #10
jhedstromActually, I mis-spoke in #9. Core was adding that php version to the system table, so upon enabling and then exporting, the version re-appeared. The reason for this is that the patch in #6 only sets php version in the
$standard_infovariable, but then the$exportvariable is merged in. This updated patch removes the php version from the$exportvariable.Comment #11
lotyrin commentedUnless I'm mistaken, the change to features_export_prepare() is the actual fix, and the change to features_load_feature() is superfluous.
Comment #12
jhedstromThe change cot
features_load_featurewas superfluous. Patch re-rolled against 2.x with that in mind.Comment #13
mariacha1 commentedThere is one small bug with this solution, which can be reproduced on the 7.x-2.0-rc1 version:
1) Apply #12 to the 7.x-2.0-rc1 version.
2) Create a simple feature "my_feature".
3) Verify that the my_feature.info file DOES NOT contain the line "php = 5.2.4"
4) Make any change in the database to the feature (add a permission, change a phrase, it does not matter). Verify that running
drush fd(or visiting the feature page) shows the feature as Overridden.5) View the differences, either by doing
drush fd my_featureor by visiting "Review Overrides" tab.6) Verify that Features THINKS the .info file contains a reference to php 5.2.4.
Nothing is really harmed by this bug. Reverting the patch does not re-add 5.2.4 to the .info file. It's just a bit obnoxious.
I'm including a patch that seems to fix the false-positive override for me after a cache clear.
Comment #14
mariacha1 commentedDang it! Rolled out the wrong patch. Trying again.
Comment #15
lotyrin commentedI haven't tried it yet, but reading the code, I'd imagine that the change in function features_get_info() should be checking for DRUPAL_MINIMUM_PHP?
Comment #16
mpotter commentedCommitted to 3805bec.