-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nice feature TODO list #8
Comments
Resolved
/**
* @param $dict = [
* 'dbName' => 'rbstools', // name of the MySQL database
* // IP address of the database
* 'host' => '192.168.0.1',
* ]
*/
$onlyRaw = function($matches){return ['raw' => $matches[0], 'parsed' => null];};
$lexer = new Lexer([
(new Lexeme('returnDate', '/^¥R(\d{1,2}[A-Z]{3}\d{0,2})/'))->preprocessData($onlyRaw),
]);
$lexed = $lexer->lex($modsPart);
$lexed['lexemes'][0][''];
$lexed['lexemes'][0]['lexeme'] === ''; Does it not work because of caching? eeee3f9
/** @var $avail = AbstractTravelportController:: */
$avail = $gtl->performRequest('apollo.xml.getHotelAvailability', [
if ((new Lexeme('ptc', '/^\*([A-Z0-9]{3})/'))->name === '') {
// ...
}
\Lib\Result::makeOk(['start' => 123, 'value' => 123])
->flatMap(function($value){$value[''];});
$animals = ['cat', 'dog', 'monkey'];
$i = rand(0, 10);
if (($animals[$i] ?? null) === '') {
}
Fp::any(
[static::class, 'isTourFare'],
$pricingStoreInfo['pricingList'] ?? []
)
/** @param $ssrs = SiParser::parse()[''] */
public static function transformDocSsrs(array $ssrs)
{
}
$result = (new \Gtl\AmadeusSoapActions\AmadeusListQueuePnrs('GENERIC'))
->execute([
''
]);
'SELECT',
' s.id,',
' s.is_active,',
' s.gds,',
'FROM terminal_sessions s',
|
@klesun how about suggetions of keys from arrays returned by php internal functions? Like for example |
@Jurigag, sounds good. I'm actually already doing this for a set of functions I managed to find, but apparently |
Added support for |
Cool. I'm also wondering if you could provide some way to define those possible keys for 3-rd party php extensions using php stubs(just empty php classes with phpdocs definitions)? Like for example, there is c-based framework called phalcon, which just works as extension. There is method like $robot = Robots::findFirst(
[
"type = 'virtual'",
'order' => 'name DESC',
'limit' => 30,
]
); Of course adding it for all extensions possible would be a a lot of effort. Maybe you could implement syntax using some kind of annotations so for example here https://github.com/phalcon/ide-stubs/blob/master/src/Phalcon/mvc/Model.php#L559 we could just add some magic thing which would your extension then use and autocomplete those keys above, like order limit etc? |
@Jurigag, if you are a contributor of /**
* @param mixed $parameters = [
* 'type' => 'virtual',
* 'order' => 'name DESC',
* 'limit' => 30,
* ]
* @return Model
*/
public static function findFirst($parameters = null) {} |
Oh, thanks for this. |
It would be nice to have an ability to use annotation from the PSALM static analysis. We already use it for the type analysis, so autocompleat would be the great feature in additional. This is an example from the documentation https://psalm.dev/docs/docblock_type_syntax/#array-types and one from me:
Thanks! |
Filed a separate issue - #77 |
Hello, could you tell me if it's possible to describe somehow the possibility to support a collection of assoc arrays? What I mean is the next:
So I could describe a possible set of options and then I can use it in any order? |
@mialex, you can use psalm format (just added support for Another trick would be to use an undefined var (for example
|
Im wondering if it's somehow possible - add autocomplete based on xdebug variables? @klesun |
@Jurigag, if this is just a static set of keywords, no problem. Could you provide a link describing them? |
#110 |
Closing as no time for implementing the remaining minor features in the list. If someone considers some particular ones a must-have, please open a separate ticket. |
Not Resolved Yet
Here are listed some small things that are relatively easy to implement and do not affect the whole behaviour much. Some stuff lays here for pretty long time, so if you are interested in some of these features, you can ping me, I'll start doing it. Otherwise I will implement the feature only when I need it in some of my php projects (whcih may happen... not very soon).
Make used key completion support key chain like this:
$rcvd['rcvd']['originData']['receivedFrom']
(currentyl it only suggests the'rcvd'
key)Rewrite
getBriefValueStr
so that it worked with the iterator, not array - just take first few type till string fits into the n characters.It would be cool to have both project-level and IDE-level settings...
It would be nice if functions in doc comments were captured by the reference provider...
Maybe make dependency on DB plugin optional? It would make sense if you keep useless plugins disabled to speed up startup...
Maybe infer type of
json_decode('{"a":"5", "b": 6}')
, but with very strict depth limit and guards for >1 MiB files.Support GoTo method name in multi-line php doc
Infer dynamic property assignment and
json_decode(json_encode(..., $flag))
.BagAccess.php
:It would be pretty cool if completion worked here:
IDEA does the job when there is no concatenation, but this is not always the case. So I suggest to provide the completion in any string that matches pattern
JOIN {tableName} alias ON alias.{suggestColumnsHere}
. Could go even further and actually semi-parse whole SQL string and provide completion inWHERE
,SELECT
,GROUP BY
, etc... as well.Go To column in DB schema in the "Database" tab instead of just the
Db::exec()
expression.It would be nice if Reference Provider highlighted same key on same variable/field in a function.
Used key completion should work here:
Infer arguments inside lambda passed to something other than50f0bf2array_map
like here:Actually I already do something similar -Should supportArgRes::getFuncVarUsageArg()
. Could at least make it infer type only from the direct function it is passed to to not waste performance... or put some sane depth limit.array_map
and other built-in functions there. See TODO inArgRes::getArgFromMethodCall()
Provide array structure description in built-in "Show Docs" pop-up that is shown when you press Ctrl + Q instead of separate (Ctrl + Alt + Q) shortcut. This time i should handle it, it did not work initially because of absence of "order"="first" likely. Btw, would be nice if docs were also shown when you press the shortcut inside quotes (we don't always have a var).
Support vars in
![image](https://user-images.githubusercontent.com/5202330/51028964-e4d0ba80-158c-11e9-8d90-f0ec92bd3211.png)
""
string literals:The text was updated successfully, but these errors were encountered: