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

Add instructions on how to publish a Herbert based plugin to wordpress.org. #115

Open
4 tasks
jeremyzahner opened this issue May 23, 2016 · 13 comments
Open
4 tasks

Comments

@jeremyzahner
Copy link

jeremyzahner commented May 23, 2016

We should create as far as possible detailed instructions on how to manipulate Herbert to make it publishable to the wordpress.org plugin directory.

The Problem

As far as I can see, there are some conflicts on Herberts primary goals (like beeing a grown up plugin framework) and WordPress.orgs policy on how plugins should be evaluated (like beeing usable by a majority of WPs userbase).

I consider this quite an issue, we should look into this asap.

Tasks

  • Make sure that this is the way to go (are there alternatives? like a backported version?)
  • Explain the problem in the docs
  • Provide examples for manipulation in the docs
  • Provide an example plugin which went under this manipulation

Related Issues

Edit-History

@clayrisser
Copy link

I want to help with this. What's something I can do?

@clayrisser
Copy link

I was wondering if it would be possible to build a "vender" plugin for WordPress that automatically manages all installed Herbert plugins and their dependencies.

@arippberger
Copy link

I wonder if Herbert could run exec() on plugin installation to automatically run composer? Of course the lay-user would need to have composer installed on their system in the first place.

@arippberger
Copy link

This (https://github.com/CurosMJ/NoConsoleComposer) looks promising, but I'm guessing there are some definite security concerns.

@clayrisser
Copy link

I was thinking the same thing the other day. It is definitely possible.

@jeremyzahner jeremyzahner added this to the 1.0 - Stable Release milestone Jun 10, 2016
@renaudham
Copy link

renaudham commented Aug 31, 2016

HI
I have read related tickets also but I'm not sure to see the issue with publishing the Vendor folder included in a plugin to push on wordpress.org.

Is there any restriction in licences for the libs in this plugin?

Technicaly it could work well. A bit heavy but many pluigns are MORE heavy.
and as an exmapl see WP-ERP > this plugin is using INCLUDED in it many elements in a vendor folder and also many Symfony ressources, and illuminate also.

It was NOT an issue for them and its widely used...

so I think the solution is to do the SAME as WP-erp. include the full Vendor with no problem.
https://wordpress.org/plugins/erp/
https://github.com/wp-erp/wp-erp/

Note the differences between the zip you download from WP repo, and the sources in GIT
In GIt you have a composer.json and no vendor folder
in WP Repo you have no composer and the full vendor

simple solution as I see

@clayrisser
Copy link

Unless you have done it, don't say the solution. Of course we sent it with
the vendor folder.

On Wed, Aug 31, 2016, 11:15 renaudham [email protected] wrote:

HI
I have read related tickets also but I'm not sure to see the issue with
publishing the Vendor folder included in a plugin to push on wordpress.org
.

Is there any restriction in licences for the libs in this plugin?

Technicaly it could work well. A bit heavy but many pluigns are MORE heavy.
and as an exmapl see WP-ERP > this plugin is using INCLUDED in it many
elements in a vendor folder and also many Symfony ressources, and
illuminate also.

It was NOT an issue for them and its widely used...

so I think the solution is to do the SAME as WP-erp. include the full
Vendor with no problem.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#115 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AF8ftgQDtU3FVdAvn7NNM4x8Y6BsvOHDks5qlaiFgaJpZM4Iks42
.

  • Jam Risser

@renaudham
Copy link

@jamrizzi
Then it should be probably accepted, not sure why.
Can you give us the exact text reason they give for rejecting?
On WP-ERP its on WP repo and its really including all the folder vendor
https://wordpress.org/plugins/erp/
They succeed to get it accepted. and they updated 2 weeks ago only.
see here the zip screenshot
http://pasteboard.co/2VZrpZdsX.png
But ithey are not including Twig.

On our side we have already published in the past a plugin including fully ALL laravel framework, that is also working with Composer and a vendor folder, also with many of the same elements.
It was accepted with no issue. But is not including Twig.

My guess is that if there is a rejection its not due to the Vendor folder for most of its components but maybe only one specific component of this vendor folder,
that is not in WP Erp vendors and not in Laravel.
Maybe TWIG?

Any clue on your side for this?

thanks

@clayrisser
Copy link

I don't really know. I have stopped using Herbert because I couldn't get it to work. I really think it would be the best framework for developing WordPress plugins if it was compatible with the WordPress repository.

Is Herbert still under active development??? I really really like it. I would love to see it reach a stable version. I think someone who has successfully submitted a Herbert plugin to WordPress should create a really nice and detailed tutorial.

I am personally willing to contribute to this project if I know it is moving forward and will support plugins for the WordPress repo.

@xiteagency
Copy link

xiteagency commented Nov 10, 2016

We did manage to publish at wordpress directory, but there is an issue when installing the plugin with the TWIG template.

You can find the plugin here: https://wordpress.org/plugins/reservation-engine/

We are getting the following error :
Twig_Error_Loader thrown The "/" directory does not exist ("/").
at non windows hosting installations.

Any clue for this?

I personally willing to contribute to this project and especially on how you can publish it to wordpress directory. I think the issue with the vendors files should be resolved. It adds a lot of extra bytes at the plugin.

@renaudham
Copy link

HI
@xiteagency

Publishing to WP repo
Great news, thanks, I was sure it should be possible as there was not any components there that should have been a licence issue, and I already published before a plugin with almost all of them except Twig.

This should allow most of us to go on further quietly with Herbet.

So Twig is also accepted by Wordpress we are now sure.
I see you included the vendor folder, this is as I though the way to go, as done for other plugins using parts of Laravel or Symfony. I don't think there is any other way to do it anyway as once you want to deploy it on any server, localhost or demo or live, you will need the vendor anyway, and most of the peoples will not be able to use composer, and trying an auto composer to install vendor when installing the plugin is a VERY BAD idea, because
*it will need to be done in different way depending on your system and folder logic and Php/Apache libs etc.. > making it not very portable
*it would make the install process very very long while files would be loaded and the default plugin user would not understand what happend. It could also time out...
*it add risks of files eventuellay not well resolved, missing, imcomplete etc
No the way to go is as with other big plugins are doing, same as WP-Erp and other, include Vendors in the sources

Your issue with /
As you surely know on Linux the path default is \ and not /
but I have successfully on my side installed Herbet on a linux. Its probably a question of different distributions of Linux, as I guess, for me its on CentOs6 and running. I don't think its an issue in Herbet itself
In herbert Twig loader is called here and should not make an issue...
class TwigServiceProvider extends ServiceProvider {
public function register()
{ $this->app->singleton('twig.loader', function ()
{ $loader = new Twig_Loader_Filesystem();
foreach ($this->app->getPlugins() as $plugin)
{ $loader->addPath($plugin->getBasePath() . '/views', $plugin->getTwigNamespace()); }
return $loader; });
so can you give us more detila son your linux version, and if you have any other issues with the path / with other components ? maybe one of us could help..

@jamrizzi and for all others...
you could probably continue to work with Herbert now if its not too late, no? you let it go? Any experience would be very usefull for all of us
We can guess now taht the past rejection at Wordpress repo was not due to the Herbet framework elements...

@ALL

one question...
Why everybody put the "views" folder in "Ressources".... ? any logic good reason for this?
For me its far from logic and it should be same as in Laravel, in app folder.
On my project I move it in app/

On my side I will continue to work on my Project Management System plugin (freemium) under slow development. Will keep peoples updated once something is visible

regards

@xiteagency
Copy link

Hi Renaudham,

thanks for your quick answer. I guest the problem is not on linux distribution but in the Twig loader register function in the TwigServiceProvider.

at Herbert 0.9 version the function register has the below code :
$loader = new Twig_Loader_Filesystem("/");

I suppose this should be change to the one you suggested :
$loader = new Twig_Loader_Filesystem();

or to a relative path :
$loader = new Twig_Loader_Filesystem(getcwd().'/');

I am making some testings in different environments to check it out, and i hope to come back with a clear suggestion.

@abinkuruvilla
Copy link

related issue please help to solve : #185

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

No branches or pull requests

6 participants