Jump to content

Using PHP-parser for wordpress (using composer)


Recommended Posts

I am sorry but I am not sure if this question should be here for PHP applications or in PHP scripts. I think that PHP-parser qualifies as an application but I am not sure.

 

I don't mind learning what I need to but I mainly want to know if I misunderstand and am wasting my time.

I want to use GitHub - nikic/PHP-Parser: A PHP parser written in PHP to process WordPress to analyze WordPress. The documentation at PHP-Parser/2_Usage_of_basic_components.markdown at master · nikic/PHP-Parser · GitHub shows use of Composer.

As best as I understand, to use Composer, I must install WordPress using Composer and I must use Composer with WordPress to use PHP-Parser to process WordPress. Do I understand properly?

 

The documentation of PHP-Parser says that PHP's token_get_all is an alternative so I will try that but I want to also try PHP-Parser if possible.

Link to post
Share on other sites

What exactly do you mean by “analyzing Wordpress”?

 

WordPress and Composer have nothing to do with each other. Composer is a package manager which is commonly used (but not required) to install libraries like the above mentioned PHP-Parser. Where the WordPress code you want to parse comes from is entirely irrelevant. I've actually never heard of any WordPress package for Composer.

Link to post
Share on other sites
This thread is more than a year old.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.