Questions tagged [composer]

Composer is a dependency manager for PHP.

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

Include Carbon Fields via Composer with Mozart [closed]

Coen Jacobs' Mozart is a tool to prevent namespace conflicts in Wordpress themes/plugins which utilize Composer for dependency management. It's similar to PHP Scoper but is described as simpler and ...
user avatar
  • 507
1 vote
0 answers
100 views

Wordpress composer issues

I'm using composer to install wordpress but I have a situation when I run composer install I end up with a nested wp-content directory as follows. (Wordpress is the root install directory) wordpress/...
user avatar
0 votes
0 answers
36 views

Wordpress Bedrock breaking plugin links

I recently switched to using WP-Bedrock and I currently like the workflow but there's a huge drawback for me. There are 2 URLs which previously were identical, due to Bedrock's file structure, are ...
user avatar
  • 111
0 votes
1 answer
69 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: ...
user avatar
  • 638
0 votes
1 answer
717 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 ...
user avatar
2 votes
1 answer
198 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 ...
user avatar
0 votes
0 answers
23 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 ...
user avatar
  • 220
1 vote
2 answers
315 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 ...
user avatar
0 votes
1 answer
209 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 ...
user avatar
  • 5
1 vote
1 answer
2k 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? ...
user avatar
0 votes
1 answer
206 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-...
user avatar
-1 votes
1 answer
93 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 ...
user avatar
  • 376
1 vote
1 answer
254 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 ...
user avatar
  • 505
0 votes
0 answers
867 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 ...
user avatar
  • 1
0 votes
0 answers
797 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 ...
user avatar
2 votes
1 answer
125 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 ...
user avatar
1 vote
0 answers
210 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 ...
user avatar
  • 11
0 votes
0 answers
79 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()...
user avatar
  • 603
1 vote
2 answers
2k 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 ...
user avatar
  • 127
0 votes
1 answer
2k 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 ...
user avatar
  • 240
1 vote
1 answer
374 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 ...
user avatar
  • 133
0 votes
1 answer
3k 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 ...
user avatar
  • 101
0 votes
0 answers
176 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. ...
user avatar
  • 814
0 votes
1 answer
1k 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 ...
user avatar
2 votes
1 answer
756 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 ...
user avatar
  • 129
6 votes
1 answer
1k 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() . '/...
user avatar
  • 113
1 vote
3 answers
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 ...
user avatar
7 votes
2 answers
2k 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?
user avatar
  • 2,997
0 votes
2 answers
472 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 ...
user avatar
1 vote
1 answer
160 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? ...
user avatar
  • 1,734
2 votes
0 answers
143 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 "...
user avatar
  • 1,343
1 vote
0 answers
332 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 ...
user avatar
  • 171
10 votes
3 answers
3k 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 ...
user avatar
3 votes
1 answer
1k 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 ...
user avatar
  • 1,343
0 votes
2 answers
107 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 ...
user avatar
  • 202
4 votes
1 answer
161 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, ...
user avatar
6 votes
1 answer
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 ...
user avatar
  • 163