Prophecy autocomplete in PhpStorm
NickName:luchaninov Ask DateTime:2016-05-17T22:44:30

Prophecy autocomplete in PhpStorm

I use PhpStorm and Prophecy in PHPUnit tests.

I used plugin PHPUnit Autocomplete Assistant and it worked well until I updated to PhpStorm 2016.1.1. Plugin is disabled and this message shows on PhpStorm launch:

Following plugins are incompatible with current IDE build: PHPUnit Autocomplete Assistant

Author doesn't answer for a week at his GitHub issues so I started looking for alternatives but cannot find any. Without such plugin Prophecy in PHPStorm is not pleasant - your editor is full of warnings, there are no autocompletes and so on.

Do you know any other tools for PHPStorm and Prophecy?

Copyright Notice:Content Author:「luchaninov」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/37279342/prophecy-autocomplete-in-phpstorm

Answers
NuSphere 2016-05-26T18:54:53

I forked the repo at gitHub and fixed the code - my merge request is open.\n\nuntil you could use:\nhttps://github.com/shopfe/phpuaca/releases/tag/1.3.2-beta\n\nbest regards",


oqq 2017-02-08T08:37:53

If you are using PhpStorm 2016.2+ you could create a file in your project root under ./.phpstorm.meta.php/prophecy.meta.php with this content:\n\n<?php\n\nnamespace PHPSTORM_META {\n override(\\PHPUnit\\Framework\\TestCase::prophesize(0),\n map([\n '' => '@',\n ])\n );\n}\n\n\nAfter that (maybe also after restarting PhpStorm), autocomplete with prophecy would work like a charm:\n\nautocomplete example for PhpStorm with prophecy and meta file\n\nNote the extends TestCase instead of the namespace lacking version for PHPUnit.\n\nMore info about this PhpStorm feature you could get here:\nPhpStorm Advanced Metadata",


More about “Prophecy autocomplete in PhpStorm” related questions

Prophecy autocomplete in PhpStorm

I use PhpStorm and Prophecy in PHPUnit tests. I used plugin PHPUnit Autocomplete Assistant and it worked well until I updated to PhpStorm 2016.1.1. Plugin is disabled and this message shows on Php...

Show Detail

Laravel PhpStorm autocomplete

I am having problems with autocompletion in PhpStorm using Laravel. I have set up the IDE accordingly from this guide: https://confluence.jetbrains.com/display/PhpStorm/Laravel+Development+using+

Show Detail

PhpStorm SQL code autocomplete

I have used PhpStorm 10, but recently they released a new version. In PhpStorm 10 it was very comfortable to autocomplete SQL code. I could start typing the column name and autocompletion continued...

Show Detail

autocomplete constructor in phpstorm

Is there a way for PhpStorm to autocomplete a constructor as soon as I start a new class? (I've seen a video where this can be done in Netbeans, for example)

Show Detail

PhpStorm Vuetify autocomplete

I'm having trouble trying to get the autocomplete of vuetify components. v-card for example. I'm running PhpStorm 2018.2.4 on Windows 10. I have the Vue.js plugin installed.

Show Detail

PHPStorm autocomplete twig vars

I'm using PHPStorm 8.1 as IDE in a php project (laravel 4.1 project with twig on view side) Will be great to have an autocomplete hint on vars on "twig side" like you can see here on this phpstorm

Show Detail

PhpStorm docblock autocomplete for @author tag

I'd like to have autocomplete @author tag for functions I'm writing. For eg. If I write @author and press space it should autocomplete my name and email as in the form of typical @author tag. Is th...

Show Detail

Phpstorm codeigniter autocomplete custom models

I'm on the job with PhpStorm and CodeIgniter. Someday I saw https://github.com/topdown/phpStorm-CC-Helpers and applied it. Autocomplete of controller, model and active record works fine. But PHP...

Show Detail

Erratic and inconsistent autocomplete in PHPStorm

My PHPStorm v 7 is behaving very erratically and inconsistently when it comes to autocompetion. For example, given a variable $test_variable which has been previously declared, if I attempt to qu...

Show Detail

PHPStorm autocomplete with Symfony routing with annotations

I'm using latest version of PHPStorm 10 and want to use annotations for my Symfony 2.8.1 routes. I want to use PHPStorm's autocomplete feature to autocomplete my routes in twig files, but they are

Show Detail