Skip to content

Vendor folder ignored #172

@BartvanS

Description

@BartvanS

Referece: #84

Describe the current, buggy behavior
When i used the command 'make-pot' I found out that folder such as vendor and git are ignored. To solve the issue i found this thread #84.

scenario:
I have a test theme in my wordpress. In this theme there is the stye.css, a test.php with the content <?php __('test', 'test');. There is also a copy of this file in a folder named "vendor"

if i use the --include parameter with the test.php file, everything works fine. When i add --include=vendor, vendor is stile excluded and i create a not complete pot file.

my run script: wp i18n make-pot ./ ./test.pot --ignore-domain --include=vendor

Describe what you would expect as the correct outcome

  • when running command without --include=vendor:
#. Theme Name of the theme
#. Description of the theme
msgid "Het Online Recept"
msgstr ""

#. Theme URI of the theme
#. Author URI of the theme
msgid "https://bluemammoth.nl/"
msgstr ""

#. Author of the theme
msgid "Blue Mammoth"
msgstr ""

#: test.php:3
msgid "test"
msgstr ""


- When i run with `--include=vendor`:
#. Theme Name of the theme
#. Description of the theme
msgid "Het Online Recept"
msgstr ""

#. Theme URI of the theme
#. Author URI of the theme
msgid "https://bluemammoth.nl/"
msgstr ""

#. Author of the theme
msgid "Blue Mammoth"
msgstr ""

(Paste the output of "wp cli info" into this box)

Shell:  C:\Program Files\Git\usr\bin\bash.exe
PHP binary:     C:/xampp/php/php
PHP version:    7.2.12
php.ini used:   C:\xampp\php\php.ini
WP-CLI root dir:        C:\Users\Stage\AppData\Roaming\Composer\vendor\wp-cli\wp-cli
WP-CLI vendor dir:      C:\Users\Stage\AppData\Roaming\Composer\vendor
WP_CLI phar path:
WP-CLI packages dir:
WP-CLI global config:
WP-CLI project config:
WP-CLI version: 2.2.0```




$ wp i18n make-pot ./ ./test.pot --ignore-domain --include=vendor --debug
Debug (bootstrap): Fallback autoloader paths: C:\Users\Stage\AppData\Roaming\Composer\vendor/autoload.php (0.02s)
Debug (bootstrap): Loading detected autoloader: C:\Users\Stage\AppData\Roaming\Composer\vendor/autoload.php (0.022s)
Debug (commands): Adding command: package (0.033s)
Debug (commands): Adding command: cache (0.035s)
Debug (commands): Adding command: transient (0.036s)
Debug (commands): Adding command: comment (0.039s)
Debug (commands): Adding command: meta in comment Namespace (0.04s)
Debug (commands): Adding command: menu (0.041s)
Debug (commands): Adding command: item in menu Namespace (0.042s)
Debug (commands): Adding command: location in menu Namespace (0.043s)
Debug (commands): Deferring command: network meta (0.043s)
Debug (commands): Adding command: option (0.045s)
Debug (commands): Adding command: post (0.046s)
Debug (commands): Adding command: meta in post Namespace (0.047s)
Debug (commands): Adding command: term in post Namespace (0.048s)
Debug (commands): Adding command: post-type (0.049s)
Debug (commands): Adding command: site (0.051s)
Debug (commands): Adding command: meta in site Namespace (0.052s)
Debug (commands): Adding command: option in site Namespace (0.053s)
Debug (commands): Adding command: taxonomy (0.054s)
Debug (commands): Adding command: term (0.055s)
Debug (commands): Adding command: meta in term Namespace (0.056s)
Debug (commands): Adding command: user (0.058s)
Debug (commands): Adding command: meta in user Namespace (0.06s)
Debug (commands): Adding command: session in user Namespace (0.061s)
Debug (commands): Adding command: term in user Namespace (0.061s)
Debug (commands): Adding command: network (0.062s)
Debug (hooks): Processing hook "after_add_command:network" with 1 callbacks (0.062s)
Debug (hooks): On hook "after_add_command:network": Closure in file C:\Users\Stage\AppData\Roaming\Composer\vendor\wp-cli\wp-cli\php\class-wp-cli.php at line 634 (0.062s)
Debug (commands): Adding command: meta in network Namespace (0.062s)
Debug (commands): Adding command: plugin (0.066s)
Debug (commands): Adding command: theme (0.068s)
Debug (commands): Adding command: mod in theme Namespace (0.069s)
Debug (commands): Adding command: db (0.072s)
Debug (commands): Adding command: scaffold (0.075s)
Debug (commands): Adding command: export (0.077s)
Debug (commands): Adding command: core (0.078s)
Debug (commands): Adding command: verify-checksums in core Namespace (0.078s)
Debug (commands): Adding command: verify-checksums in plugin Namespace (0.08s)
Debug (commands): Adding command: import (0.083s)
Debug (commands): Adding command: media (0.086s)
Debug (commands): Adding command: config (0.091s)
Debug (commands): Adding command: core (0.093s)
Debug (commands): Adding command: cron (0.094s)
Debug (commands): Adding command: event in cron Namespace (0.095s)
Debug (commands): Adding command: schedule in cron Namespace (0.096s)
Debug (commands): Adding command: embed (0.096s)
Debug (commands): Adding command: fetch in embed Namespace (0.097s)
Debug (commands): Adding command: provider in embed Namespace (0.098s)
Debug (commands): Adding command: handler in embed Namespace (0.098s)
Debug (commands): Adding command: cache in embed Namespace (0.099s)
Debug (commands): Adding command: eval (0.099s)
Debug (commands): Adding command: eval-file (0.1s)
Debug (commands): Adding command: i18n (0.101s)
Debug (commands): Adding command: make-pot in i18n Namespace (0.102s)
Debug (commands): Adding command: make-json in i18n Namespace (0.103s)
Debug (commands): Deferring command: language core (0.105s)
Debug (commands): Deferring command: language plugin (0.107s)
Debug (commands): Deferring command: language theme (0.108s)
Debug (hooks): Immediately invoking on passed hook "after_add_command:site": Closure in file C:\Users\Stage\AppData\Roaming\Composer\vendor\wp-cli\language-command\language-command.php at line 39 (0.108s)
Debug (commands): Adding command: switch-language in site Namespace (0.109s)
Debug (commands): Adding command: language (0.11s)
Debug (hooks): Processing hook "after_add_command:language" with 3 callbacks (0.11s)
Debug (hooks): On hook "after_add_command:language": Closure in file C:\Users\Stage\AppData\Roaming\Composer\vendor\wp-cli\wp-cli\php\class-wp-cli.php at line 634 (0.11s)
Debug (commands): Adding command: core in language Namespace (0.11s)
Debug (hooks): On hook "after_add_command:language": Closure in file C:\Users\Stage\AppData\Roaming\Composer\vendor\wp-cli\wp-cli\php\class-wp-cli.php at line 634 (0.11s)
Debug (commands): Adding command: plugin in language Namespace (0.11s)
Debug (hooks): On hook "after_add_command:language": Closure in file C:\Users\Stage\AppData\Roaming\Composer\vendor\wp-cli\wp-cli\php\class-wp-cli.php at line 634 (0.11s)
Debug (commands): Adding command: theme in language Namespace (0.111s)
Debug (commands): Adding command: maintenance-mode (0.112s)
Debug (commands): Adding command: rewrite (0.113s)
Debug (commands): Adding command: rewrite (0.113s)
Debug (commands): Adding command: cap (0.115s)
Debug (commands): Adding command: role (0.116s)
Debug (commands): Adding command: search-replace (0.119s)
Debug (commands): Adding command: server (0.12s)
Debug (commands): Adding command: shell (0.122s)
Debug (commands): Adding command: super-admin (0.123s)
Debug (commands): Adding command: widget (0.125s)
Debug (commands): Adding command: sidebar (0.126s)
Debug (bootstrap): Adding framework command: C:\Users\Stage\AppData\Roaming\Composer\vendor\wp-cli\wp-cli/php/commands/cli.php (0.128s)
Debug (commands): Adding command: cli (0.132s)
Debug (commands): Adding command: cache in cli Namespace (0.132s)
Debug (commands): Adding command: alias in cli Namespace (0.133s)
Debug (bootstrap): Adding framework command: C:\Users\Stage\AppData\Roaming\Composer\vendor\wp-cli\wp-cli/php/commands/help.php (0.133s)
Debug (commands): Adding command: help (0.134s)
Debug (bootstrap): No readable global config found (0.136s)
Debug (bootstrap): No project config found (0.136s)
Debug (bootstrap): argv: C:\Users\Stage\AppData\Roaming\Composer\vendor\wp-cli\wp-cli\php\boot-fs.php i18n make-pot ./ ./test.pot --ignore-domain --include=vendor --debug (0.136s)
Debug (bootstrap): ABSPATH defined: C:/projects/hornew/site/ (0.137s)
Debug (hooks): Processing hook "before_run_command" with 1 callbacks (0.138s)
Debug (hooks): On hook "before_run_command": WP_CLI\Bootstrap\RegisterDeferredCommands->add_deferred_commands() (0.138s)
Debug (bootstrap): Running command: i18n make-pot (0.138s)
Theme stylesheet detected.
Debug (make-pot): Theme stylesheet: C:\projects\hornew\site\wp-content\themes\test\style.css (0.159s)
Debug (make-pot): Extracting all strings regardless of text domain (0.159s)
Debug (make-pot): Destination: ./test.pot (0.159s)
Debug (make-pot): Only including the following files: vendor (0.16s)
Debug (make-pot): Excluding the following files: node_modules,.git,.svn,.CVS,.hg,vendor,Gruntfile.js,webpack.config.js,*.min.js (0.16s)
Debug (make-pot): Extracted 3 strings (0.167s)
Success: POT file successfully generated!

I currently "fixed" this problem by copying the vendor folder and renaming it. Dit is not a usefull permanent solution since vendor is used by php composer

Thanks for the help!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions