$view = &$form_state['view']; is not needed in PHP5. When it is an object, it shouldn't have an & for reference, it is redundant.

This should be done right before code freeze. Here's a patch to get started.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alexmoreno’s picture

Assigned: Unassigned » alexmoreno

I will work on it as part of the Drupal London sprint may 2013

alexmoreno’s picture

I think it must be something wrong with the last patch, if someone could guide me through where to continue?

alex@alex-Vostro-V13 /var/www/drupal $ git apply --index views-object-reference.patch
error: core/modules/views/lib/Drupal/views/ManyToOneHelper.php: does not match index
error: core/modules/views/lib/Drupal/views/Plugin/views/HandlerBase.php: does not match index
error: core/modules/views/lib/Drupal/views/Plugin/views/argument/ArgumentPluginBase.php: does not match index
error: core/modules/views/lib/Drupal/views/Plugin/views/argument_default/Php.php: does not match index
error: core/modules/views/lib/Drupal/views/Plugin/views/argument_validator/Php.php: does not match index
error: core/modules/views/lib/Drupal/views/Plugin/views/relationship/GroupwiseMax.php: does not match index
error: core/modules/views/lib/Drupal/views/Plugin/views/wizard/WizardPluginBase.php: does not match index
error: core/modules/views/lib/Drupal/views/Tests/Handler/FieldWebTest.php: does not match index
error: core/modules/views/lib/Drupal/views/ViewExecutable.php: does not match index
error: core/modules/views/views.module: does not match index
error: core/modules/views/views.theme.inc: does not match index
error: core/modules/views/views_ui/admin.inc: does not exist in index
error: core/modules/views/views_ui/lib/Drupal/views_ui/Form/Ajax/AddItem.php: does not exist in index
error: core/modules/views/views_ui/lib/Drupal/views_ui/Form/Ajax/Analyze.php: does not exist in index
error: core/modules/views/views_ui/lib/Drupal/views_ui/Form/Ajax/ConfigItem.php: does not exist in index
error: core/modules/views/views_ui/lib/Drupal/views_ui/Form/Ajax/ConfigItemExtra.php: does not exist in index
error: core/modules/views/views_ui/lib/Drupal/views_ui/Form/Ajax/ConfigItemGroup.php: does not exist in index
error: core/modules/views/views_ui/lib/Drupal/views_ui/Form/Ajax/Display.php: does not exist in index
error: core/modules/views/views_ui/lib/Drupal/views_ui/Form/Ajax/EditDetails.php: does not exist in index
error: core/modules/views/views_ui/lib/Drupal/views_ui/Form/Ajax/Rearrange.php: does not exist in index
error: core/modules/views/views_ui/lib/Drupal/views_ui/Form/Ajax/RearrangeFilter.php: does not exist in index
alexmoreno’s picture

Title: Remove PHP4-style references for objects » reroll: Remove PHP4-style references for objects
FileSize
20.5 KB

ok, sorry, I found the problem. I've recreated the patch again following this instructions: http://drupalladder.org/lesson/b93deb54-264f-19a4-49eb-db74bc6c2712

alexmoreno’s picture

Status: Postponed » Needs review
alexmoreno’s picture

Hi tim.plunkett,

I have a quick question. I don't understand these changes:

- $options =& $form_state['values']['options'];
+ $options = &$form_state['values']['options'];

I guess it is simply coding standards, isn't it?

Thanks a lot.

alexmoreno’s picture

there we go, here is the full patch for views and views_ui

alexmoreno’s picture

FileSize
218.77 KB

sorry, I forgot to attach the patch.

Status: Needs review » Needs work
Issue tags: -Novice, -VDC

The last submitted patch, 1959338-reroll-views.patch, failed testing.

alexmoreno’s picture

Status: Needs work » Needs review

#7: 1959338-reroll-views.patch queued for re-testing.

Status: Needs review » Needs work
Issue tags: +Novice, +VDC

The last submitted patch, 1959338-reroll-views.patch, failed testing.

dawehner’s picture

Issue tags: +Needs reroll
superspring’s picture

Assigned: alexmoreno » superspring
Status: Needs work » Needs review
FileSize
18.27 KB

So here is my attempt at a re-roll for this patch.

A quick grep shows quite a few other changes that this no longer reflects.
If this passes the tests I'll add some more of them to the patch.

Status: Needs review » Needs work

The last submitted patch, php4_style_references-1959338-12.patch, failed testing.

superspring’s picture

Status: Needs work » Needs review
FileSize
958 bytes

Attempt two

Status: Needs review » Needs work

The last submitted patch, php4_style_references-1959338-14.patch, failed testing.

superspring’s picture

Status: Needs work » Needs review
FileSize
18.22 KB

Attempt three

Status: Needs review » Needs work

The last submitted patch, php4_style_references-1959338-16.patch, failed testing.

damiankloip’s picture

Status: Needs work » Needs review
FileSize
764 bytes
18.15 KB

Nice work superspring. I think an old underscored method call crept back in somehow :)

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Each line looks really fine.

ceardach’s picture

Issue tags: -Needs reroll

Removed "Needs reroll" because latest patch is RTBC

Xano’s picture

18: 1959338-18.patch queued for re-testing.

webchick’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Fixed

Yay, less cruft! :)

Committed and pushed to 8.x. Thanks!

alexmoreno’s picture

great to know that my name will be in D8 :-)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.