phalcon / ide-stubs Goto Github PK
View Code? Open in Web Editor NEWPhalcon IDE Stubs
Home Page: https://phalcon.io
License: Other
Phalcon IDE Stubs
Home Page: https://phalcon.io
License: Other
MethodSignatureMismatch - Argument 1 of Phalcon\Annotations\Adapter\AbstractAdapter::get has wrong type 'mixed', expecting 'string' as defined by Phalcon\Annotations\Adapter\AdapterInterface::get (see https://psalm.dev/042)
I imort the packege. Phalcon\Db not exist, other is ok .
From @SidRoberts on October 3, 2016 20:41
Using this method as an example:
/**
* Checks if a password hash is a valid bcrypt's hash
*/
public function isLegacyHash(string passwordHash) -> boolean
{
// ...
}
Instead of producing:
/**
* Checks if a password hash is a valid bcrypt's hash
*/
PHP_METHOD(Phalcon_Security, isLegacyHash) {
// ...
}
Instead, it should be:
/**
* Checks if a password hash is a valid bcrypt's hash
*
* @param string passwordHash
*
* @return boolean
*/
PHP_METHOD(Phalcon_Security, isLegacyHash) {
// ...
}
Copied from original issue: zephir-lang/zephir#1335
Class should not extend itself
Hello !
PHPDoc of Phalcon\Http\Request::getUploadedFiles
says the method returns array|\Phalcon\Http\Request\FileInterface[]
which is confusing because its either an array of unknown values or an array of FileInterface
.
The method returns only FileInterface objects, so it should @return \Phalcon\Http\Request\FileInterface[]
:)
Again, may I ask you to add stubs for those releases?
Maybe you should think about including this step in your release process? ๐
When using psalm, it outputs:
ERROR: MethodSignatureMismatch - *** - Argument 1 of Phalcon\Mvc\Model::unserialize has wrong type 'mixed', expecting 'string' as defined by Serializable::unserialize ***
Why changed in last commit?
65144f2#diff-a2186858aa1902a5d897c30a1b5615c5R1572
Please update for phalcon version 4.0.6
From @Jurigag on February 27, 2017 15:44
Static returned type in stubs is generated just as current class, example of problem:
https://github.com/phalcon/cphalcon/blob/3.0.x/phalcon/mvc/model.zep#L890
https://github.com/phalcon/phalcon-devtools/blob/3.0.x/ide/stubs/Phalcon/mvc/Model.php#L465
Though on 2.0.x repository it was correctly @return static
Copied from original issue: zephir-lang/zephir#1397
Hi there
My eclipse always says "The import Phalcon ... cannot be resolved" and "PhalconClass cannot be resolved to a type" and so on...
I think there is no other "solution" than to disable that kind of warnings, error messages, whatever. But the problem is that other classes, they are REALLY missing, will also not shown anymore.
And i also think it's COMPLETELY IMPOSSIBLE to avoid that problem - because phalcon has, as a php extension, no php classes they may be resolved.
So my idea: To use the eval() method or reflection to bypass that issue?
What do you think about? Is that a good idea or not? Maybe there are other (better?) solutions for it?
Thank you for your feedbacks.
Best regards,
Jan
Hello guys =)
The methods you define in the class TagFactory (to access methods from $this->tag->*) are 'badly' written, and auto-completion doesn't work.
You guys probably miswrited, same implementation from src/Support/HelperFactory works perfectly =)
See you and great work so far on the v5 o/
This issue is to keep track of the documentation effort for the ide-stubs
We will use the stubs to generate API documentation.
https://github.com/phalcon/ide-stubs/wiki/Restructure-Reformat-ide-stubs
Prefix each commit with [#15] so that it ties with this issue.
Would like to replace travis with github actions for our tests.
Any document install with visual studio code ?
phalcon source: https://github.com/phalcon/cphalcon/blob/master/phalcon/Mvc/Model.zep:
use Phalcon\Mvc\Model\ResultsetInterface;
public static function find(var parameters = null) -> <ResultsetInterface>
ide-stubs source: https://github.com/phalcon/ide-stubs/blob/4.x/src/Phalcon/mvc/Model.php:
namespace Phalcon\Mvc;
public static function find($parameters = null): ResultsetInterface {}
ResultsetInterface - has wrong namespace: \Phalcon\Mvc\ResultsetInterface
correct: \Phalcon\Mvc\Model\ResultsetInterface
Can you please add stubs for v3.2.2?
Thanks!
Argument 1 of Phalcon\Di\Injectable::setDI has wrong type 'mixed', expecting 'Phalcon\Di\DiInterface' as defined by Phalcon\Di\InjectionAwareInterface::setDI
I am using ide-stubs while developing phalcon micro application in vs-code. Also i am using intelephense for php codes.
Intelephense error on validator "add" method for array string. (issue link)
We realize Validation "add" method and ValidationInterface "add" method is incompatible.
Validation get mixed type argument but ValidationInterface get string type argument for "field"
Again, 3.4.1 tag please ๐
Hi guys! Can you add 3.3.0 stubs please?
Merry Christmas! ๐
From @sergeyklay on November 25, 2015 21:31
Phalcon 2.0.9
Phalcon\Session\AdapterInterface
/**
* Sets session options
*/
public function setOptions(array! options);
used zephir stubs
Expected
/**
* Sets session options
*/
public function setOptions(array $options);
Actual
/**
* Sets session options
*
* @param array $options
*/
public function setOptions($options);
Copied from original issue: zephir-lang/zephir#1132
Make automatic PR creation with latest stubs code.
+/- steps are:
Create Release
in Phalcon CI finished with successI'm bundling ide-stubs project in a plugins project and distributing as a PhpStorm plugin. (Still haven't gotten around to automate that yet, but will soon ๐ ) a user reported that Phalcon\Mvc\Router\Group::add doesn't return the correct data.
The PHPDoc for \Phalcon\Mvc\Router\Group::add states, that add() on a group would return an instance of Phalcon\Mvc\RouteInterface but it really returns an instance of Phalcon\Mvc\Route
This results in PHPStorm not finding the convert() method on a group object.
Here's the issue fossapps/PhpStorm-Phalcon-Autocomplete#3 which he created you can follow
๐
Phalcon 5 alpha is out in the wild and ready for brave use with PHP 8.
But there aren't any IDE stubs published here.
Intentional?
Phalcon 4.0.5
DevTools 4.0.3
Stubs 4.0.4
PHP 7.4.x
Running psalm vendor/bin/psalm
results in several variations of the errors below:
INFO: MethodSignatureMismatch - MyModel.php:12:7 -
Argument 1 of Phalcon\Di\AbstractInjectionAware::setDI has wrong type 'mixed', expecting 'Phalcon\Di\DiInterface' as defined by Phalcon\Di\InjectionAwareInterface::setDI (see https://psalm.dev/042)
class MyModel extends Model
INFO: MethodSignatureMismatch - Validator.php:11:7 -
Argument 1 of Phalcon\Di\Injectable::setDI has wrong type 'mixed', expecting 'Phalcon\Di\DiInterface' as defined by Phalcon\Di\InjectionAwareInterface::setDI (see https://psalm.dev/042)
class Validator extends Validation
Hi there,
from last time I had a chat with maintainers, I created IDE plugins for PHP storm and seems a lot of people are using it apparently,
But I've moved on from PHP and don't want others to miss out on this, my automation is going well, but still have to manually update the IDE plugin (I actually forgot last few releases)
fossapps/PhpStorm-Phalcon-Autocomplete#7 I've created this issue, so if someone's willing to give this a try, I won't have to do anything to that project anymore :)
Hi!
Can you tag stubs by phalcon version? (old releases)
Cheers!
ERROR: MethodSignatureMismatch - src/Common/Validation/IsBool.php:11:7 - Argument 1 of Phalcon\Validation\AbstractValidator::getOption has wrong type 'mixed', expecting 'string' as defined by Phalcon\Validation\ValidatorInterface::getOption (see https://psalm.dev/042)
Not sure if this can be changed in the repo or if phalcon itself allows a mixed type here. For now suppressing the error.
Hey,
I can't configure Visual Studio Code IDE for adding the ide-stubs to his path.
Is there somebody who success to do this?
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.