Giter Site home page Giter Site logo

generator's People

Contributors

criskell avatar giacocorsiglia avatar herndlm avatar johnbillion avatar kkmuffme avatar machitgarha avatar simonhammes avatar szepeviktor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

generator's Issues

Class missing in stubs

Package installed with composer: abraham/twitteroauth
(I need the stubs as I'm doing something like you do with the WP stubs which do not use composer, so I need stubs)

generate-stubs --force --functions --classes --interfaces --traits --out="a.php" --no-interaction twitter
(package is installed in twitter folder)

It generates the stubs (10 classes), but stubs for class TwitterOAuth extends Config are missing.
But e.g. class TwitterOAuthException extends \Exception and all other classes are there (total 11 classes, but only 10 have stubs created).

Is this a bug or is there something I'm doing wrong?

Cannot create stubs for plugin

Worked great so far, however for 1 plugin I cannot generate the stubs and get PHP notices.
Maybe I'm doing something wrong?

Plugin: https://wordpress.org/plugins/woocommerce-paypal-payments/

Trying to access array offset on value of type null

in php-stubs/generator/src/NodeVisitor.php on line 169

I'm using ->notPath( '/Test/' ) to exclude tests (there are some other errors otherwise)

Additionally generate-stubs fails silently (and with result code 0) which may be an issue that needs to be investigated separately (to get a proper error message/exit code 1)

How to override phpdocs

When I am generating the stub, I would like to modify the PHPDoc of a specific method of a specific class.

Would it be possible?

update finder dependency to 6.1

Could the dependency for symfony/finder be updated from ^5.0 to ^6.0?
There's a bug in v5 finder which will not find certain files (e.g. in WooCommerce), which is why this would be necessary

convert params when "use" is used

PHP file:

<?php

use foo\bar;

/**
 * @return bar
 */
function hello() {
    ...
}

stubs:

<?php
/**
 * @return bar
 */
function hello() {
}

Currently, the stubs just remove all "use". This will cause errors for undefined class "bar".
Would it be possible to automatically just replace all param/return with their corresponding "use" class?
So the stubs would actually be:

<?php
/**
 * @return foo\bar
 */
function hello() {
}

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.