Giter Club home page Giter Club logo

ide-stubs's Issues

Method signature mismatch

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)

[NFR] Replace PHPDocs in ext/ with those generated by `zephir stubs`

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

Wrong return type for Phalcon\Http\Request::getUploadedFiles

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[] :)

3.3.1 & 3.3.2 stubs

Again, may I ask you to add stubs for those releases?
Maybe you should think about including this step in your release process? ๐Ÿ˜„

Use phalcon with eval(a) or reflection, so the development environment does not throw error messages

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

phpDoc @method from src/Html/TagFactory.php

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/

V4: \Phalcon\Mvc\Model::find() - wrong return namespace

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

Incorrect stub generation

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

Automatize stubs code generation for new release

Make automatic PR creation with latest stubs code.

+/- steps are:

  1. Trigger PR creation when Create Release in Phalcon CI finished with success
  2. Execute necessary commands to generate stubs from its release
  3. Create branch with exact name and create PR pointing to the master

Return Route, not RouteInterface in Phalcon\Mvc\Router\Group::add

I'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

๐Ÿ‘‹

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\Di\Injectable::setDI has wrong type 'mixed'

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

Ide plugin

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 :)

Tag?

Hi!

Can you tag stubs by phalcon version? (old releases)

Cheers!

MethodSignatureMismatch AbstractValidator::getOption has wrong type 'mixed', expecting 'string'

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.

Configure Visual Studio Code

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.