Questions tagged [composer]

Composer is a dependency manager for PHP.

Filter by
Sorted by
Tagged with
0
votes
1answer
23 views

Use Composer Package inside class - Namespacing error

I have my theme, with a folder called classes, with a single class: wp-content |- themes |- mycustomtheme |- classes |- FooBar.php In FooBar, I would like to use this package here: ...
0
votes
0answers
60 views

Why cannot I see installed plugin WPBakery page builder plugins folder

I have installed WPBakery page builder and it is working fine, but in WordPress plugins directory (wp-content/plugins) and other folders, I cannot see the installed plugin location. Where it is ...
0
votes
0answers
26 views

Can I load the same composer package twice without conflict?

So, I'm running mrclay/minify library on my theme on WordPress to minify all the CSS and js files to boost performance. On the website, I use the W3 Total Cache plugin so it takes care of everything ...
0
votes
1answer
133 views

composer not working on my plugin when i upload it to my website

im working in a plugin in localhost, it works fine in my localhost website im using composer in it but then when i upload it to my website then it trows a fatal error because composer autoload is not ...
2
votes
1answer
74 views

How can I have case-sensitive theme directory names when installed with Composer?

I'm using SatisPress (https://github.com/cedaro/satispress) to expose some premium plugins and themes as composer packages, because I would like to use the roots/bedrock boilerplate. Now I have the ...
0
votes
0answers
20 views

How to handle theme activation errors?

I am trying to implement the hook for activating a theme, that will install composer dependencies upon activation. In trying to figure out how to handle whether or not the vendor directory exists, I ...
1
vote
2answers
111 views

Deploying WordPress with Composer

I have been looking into setting up WordPress and its plugins and themes using composer. I notice alot of the tutorials around have composer installing wordpress into its own sub directory for example ...
0
votes
1answer
70 views

Plugin development and composer

I'm developing a plugin and I'm quite new in that, so I trying to find the best solution for how to integrate composer with my plugin. The problem is that the SDK which I need is quite big, and when ...
0
votes
1answer
1k views

Use composer to load custom classes [closed]

I want to use composer to load my custom classes inside my plugin. I've tried to use it but without success. Is possible to use compose for the plugin develop to manage custom classes used inside it? ...
0
votes
1answer
100 views

local wordpress multisite not working on AWS development server “error establishing database connection”

I have a composer WP starter installation on my local mac using mamp. It works as expected. I'm using phpdotenv to hide my wp-config.php settings and I have the wordpress directory moved into a sub-...
-1
votes
1answer
55 views

Composer fails to download PHP Codesniffer to plugin

I am getting an error when trying to install the squizlabs/php_codesniffer package via composer into my WordPress plugin. I am using Flywheel for the local server, with composer 1.8.6 installed ...
1
vote
1answer
89 views

How to provide a plugin which requires CMB2 (plugin dependencies)?

Every serious plugin developer probably has to deal with this problem: WordPress is not supporting composer or any dependency management by default. I have written a great plugin which I would like to ...
0
votes
0answers
767 views

Wordpress visual composer backend editor not showing

I have a problem with my WordPress visual composer. It's working in woo commerce during uploading of pictures and content but not showing in page edit. Whenever I try to edit page, it's just showing ...
0
votes
0answers
369 views

How to properly use composer packages in wordpress?

I need to implement in a wordpress instance a feature that allows me to search for the most recent file with extension .xlsx in the wp-content/upload directory, once the file has been identified, it ...
2
votes
1answer
101 views

In a continuous integration environment how do you implement the database entries for plugins and themes

I'm setting up a wordpress continuous integration environment - git->composer->bitbucket-AWS codepipeline, etc. I have yet to figure out how I automate, for the development team, the setup of the ...
1
vote
0answers
152 views

How do I configure wordpress structure for development using git and composer

I've been developing in other languages and web frameworks and I'm now starting with a Wordpress project. I'm used to using git and a package manager, but Wordpress development poses some unique ...
0
votes
0answers
36 views

HowTo: Properly Use a Classname in register_activation/deactivation_hook [duplicate]

I'm using Composer PSR-4 to autoload classes, but when I try to call register_activation_hook using a classname if get the following error (same for register_deactivation_hook): call_user_func_array()...
0
votes
2answers
959 views

Ran into a problem installing plugins with Composer

I'm using Composer to install plugins with the wpackagist repository. I've added all the relevant lines to my composer.json file in my main wp/ directory. The plugin installed as expected (it's this ...
0
votes
1answer
1k views

How can I search all plugins for composer's vendor/autoload.php?

I've got projects (both themes and plugins) set up as composer projects. These projects can be dev-dependencies of each other. Right now I'm working on a theme which requires the vendor/autoload.php ...
1
vote
1answer
237 views

How to add in my plugin a third vendor Git project with composer.json

I need to use this Git project in my plugin. First I drop source code in a folder, and load it with require_once dirname(__FILE__) . '/vendor/Frozensheep/RightmoveADF/RightmoveADF.php'; But there ...
0
votes
1answer
2k views

Composer setup-config.php not found

I'm trying to install WordPress on my localhost with composer. When I go to localhost I get redirected to localhost/wp-admin/setup-config.php. Instead of getting the install I'm getting the error The ...
0
votes
0answers
118 views

NGINX: Remove WordPress subdirectory from url [duplicate]

I have installed WordPress core in a subdirectory as I am using composer. The root is /www/example.com/ and WordPress is placed in /www/example.com/wp/ In the root is index.php and wp-config.php. ...
0
votes
1answer
822 views

Wp-CLI not working with WordPress installed with composer

I've installed a version of Wordpress using composer, and modified the default folders for the content (/wp-content) and the core (/wp). My wp-config.php gets its DB_NAME, DB_USERNAME, DB_PASSWORD ...
2
votes
1answer
562 views

Install wordpress using composer in a specific language

I'm using composer to automatically deploy wordpress on a ubuntu-server. Additionally, I need to install the german language pack. I learned that there are some guys who create composer-packages from ...
6
votes
1answer
902 views

Autoloading in Child Theme

I'm trying to autoload the vendor/autoload.php from my parent theme into my child theme. heres what i have tried but to no avail: function beast_theme_setup() { $var1 = get_theme_root_uri() . '/...
1
vote
3answers
1k views

Deploying Wordpress with Bedrock/Capistrano on Siteground - Composer returns “text/html” message

I've been using Bedrock (https://roots.io/bedrock/) for a while to deploy WordPress websites, but have encountered some issues when deploying to a Siteground.com shared server. The issue is with ...
7
votes
2answers
1k views

Why include a composer.json file with my plugin?

What is the advantage of explicitly including a composer.json file in my plugin if potential users of my plugin can already get it as a package through WPackagist?
0
votes
2answers
407 views

How to update WP-CLI on Windows via Composer?

I installed wp-cli back in April on my Windows box using composer. I believe with the following command: composer create-project wp-cli/wp-cli --no-dev as outlined in the alternate install methods on ...
1
vote
1answer
149 views

Using WordPress gettext functions in a library outside plugin or theme scope

If I have a library available through packagist that could be used in WordPress plugin or theme development, how should I address multilanguage support if I have a few strings that could be localized? ...
2
votes
0answers
127 views

Wordpress with Composer and different plugins for dev/live.

I'm using a Bedrock-like setup where I handle Wordpress core & plugins with Composer. I have my usual plugins in my composer.json within the "require" block, and some dev related plugins in "...
1
vote
0answers
325 views

How to use Wordpress methods (themes, plugins, context) with Behat?

My Wordpress project is running with a composer inside my plugin folder, just to test Behat a little bit, i'm not using Bedrock Wordpress yet. I can run Behat to do some behavior tests using the ...
7
votes
2answers
2k views

How to prevent Composer dependency conflicts amongst WP plugins?

In our plugin development we use Composer to install e.g. Symfony\Process that we later use in the code. The big question is how do we make sure that this dependency is not in a conflict with some ...
3
votes
1answer
807 views

Wordpress with composer, how to handle updates?

I'm trying to step up my workflow a bit and I'm now trying out Composer to handle Wordpress & Wordpress plugins. I have never used Composer before and I'm getting quite confused as to how I'm ...
0
votes
2answers
94 views

How to install WPMU with composer?

I am looking for a way to install WPMU and a premium ACF plugin with composer, but have not found any functional way of installing them. The best alternativ I found is to upload them to a private ...
4
votes
1answer
154 views

Namespacing WordPress project according to FIG standards

I am trying to wrap my head around the namespaces, autoloaders and FIG standards and most importantly how to achieve their integration to WordPress as close as possible. Here is my file structure, ...
5
votes
1answer
2k views

Using composer for dependency management in plugindevelopment

I'm new to wordpress plugin development. Normally I would use composer to add thirdparty libs to my code, but I couldn't find any wordpress plugin on github that uses composer for that. I read about ...