Skip to content
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

Try new stubs #374

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft

Try new stubs #374

wants to merge 1 commit into from

Conversation

szepeviktor
Copy link
Contributor

@szepeviktor szepeviktor commented Jul 21, 2023

Let's see our fresh stubs in action!

Using the real plugin instead of axepress/wp-graphql-stubs.
Adding 3 packages in phpstan/composer.json

@szepeviktor
Copy link
Contributor Author

Seeing the diffs in vendor/ I think your Composer tool is a bit outdated.

@szepeviktor
Copy link
Contributor Author

Output.

 ------ ---------------------------------------------------------------------
  Line   src/Extensions/GFQuiz/Type/WPObject/Form/FormQuiz.php
 ------ ---------------------------------------------------------------------
  141    Function gf_quiz not found.
         💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
 ------ ---------------------------------------------------------------------

 ------ ---------------------------------------------------------------------
  Line   src/Extensions/GFQuiz/Type/WPObject/QuizResults/QuizResults.php
 ------ ---------------------------------------------------------------------
  115    Call to static method get_instance() on an unknown class GFQuiz.
         💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
 ------ ---------------------------------------------------------------------

 ------ --------------------------------------------------------------------------------
  Line   src/Extensions/GFSignature/Data/FieldValueInput/SignatureValuesInput.php
 ------ --------------------------------------------------------------------------------
  55     Call to static method get_signatures_folder() on an unknown class GFSignature.
         💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
  86     Call to static method get_signatures_folder() on an unknown class GFSignature.
         💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
  109    Call to static method get_signatures_folder() on an unknown class GFSignature.
         💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
 ------ --------------------------------------------------------------------------------

 ------ ---------------------------------------------------------------------------------------------------------
  Line   src/Type/WPInterface/Entry.php
 ------ ---------------------------------------------------------------------------------------------------------
  200    Call to method get_items() on an unknown class Gravity_Forms\Gravity_Forms\Orders\Factories\GF_Order.
         💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
  211    Call to method get_totals() on an unknown class Gravity_Forms\Gravity_Forms\Orders\Factories\GF_Order.
         💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
  212    Access to property $currency on an unknown class Gravity_Forms\Gravity_Forms\Orders\Factories\GF_Order.
         💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
  212    Access to property $currency on an unknown class Gravity_Forms\Gravity_Forms\Orders\Factories\GF_Order.
         💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
 ------ ---------------------------------------------------------------------------------------------------------

@szepeviktor
Copy link
Contributor Author

szepeviktor commented Jul 21, 2023

Those in src/Type/WPInterface/Entry.php are stub errors.
The rest is caused by the lack of GF add-ons stubs.

@szepeviktor
Copy link
Contributor Author

This is not a PR!! This is technology demo.

I leave it 101% up to you.

@szepeviktor
Copy link
Contributor Author

szepeviktor commented Jul 22, 2023

If you are a GF user - as you are - I encourage you to release stubs for GF Add-ons: https://github.com/php-stubs/gravity-forms-add-ons-stubs
It is gravity-forms-stubs with a for loop!

wget -q -O- \
--user-agent="WordPress/6.0" \
--referer="https://github.com/php-stubs/gravity-forms-stubs" \
--header "Filtered-Site-URL: https://github.com/php-stubs/gravity-forms-stubs" \
--post-data="of=gravityforms&key=${PLUGIN_GF_KEY}&v=2.0.1&wp=6.0&php=7.4&mysql=8.0&version=2&plugins=&tn=&tu=&tv=&ta=&tau=&im=&fc=&ec=&emc=&api=1&emeta=1&ed=&en=&lang=en" \
"https://gravityapi.com/wp-content/plugins/gravitymanager/version.php?nocache=1" \
| jq -r '."offerings" | to_entries[] | select(."value"."is_available" == true) | (."key" + " " + ."value"."url_latest")'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant