Make Sold PHP Code Available Via Composer

Come on, let’s face it: no sane developer will buy PHP scripts that are not available via Composer. The whole point of buying scripts is to save development time. Are CodeCanyon PHP scripts available via Composer? Can they be?

Well, maybe there are some CMS out there which got better and more functionalities than “composer”. That’s the same scenario, when somebody would create a thread and say:

“Come on, let’s face it: no sane developer will buy PHP scripts that are not available with Bootstrap”.

It’s everyones own decision. I’m a guy who is cautious using other libraries. It’s simple why. Have you ever got this feeling writing your own CMS? No? So, you only use third party libraries? What if one of those libraries updates anything importantly and the rest of your code won’t harmonize anymore with this library functions? You gotta rewrite all functions using the third party library.

But, in other case you write your own CMS and own libraries to do anything, you will always keep the control of your code and functions. And you can even keep the harmonization of your functions together.

At all: I hate third party libraries. Yes, it safes time of course, but if you write your own library for any regarding feature you will learn from it and expand your programming knowledges, make it more cleaner, write it based on your coding styles and let your CMS make more powerful.

And yes, you don’t need to write your library each time new since it’s once in your CMS integrated. You gotta use it as a handler and make it easily accessible. Expanding features will be your next job and handling errors, whatever is required in this library.

And now back to sales, that no one will every buy PHP scripts without composer/third party libraries: Just create an awesome professional and advanced CMS for your products, with a great documentation that’s very easily to understand. I’m planning to integrate CMS features in my admin panel GUI - so the customer which buys my product doesn’t require a lot of coding skills to complete the most important jobs.

Template-System, Design-Variables, Plugins, Language-System… and much more integrated in the GUI of the admin panel is all the customer requires.

The product owner will decide himself if new features need to be added or old ones to be changed. So, it doesn’t matter that the customer requires “composer”.

Btw.: We’re sorry, that no one has written so far a “library” to replace coding knowledges. That would be great, and maybe in future a product from Elon Musk.

Write your own CMS and trust others. Maybe you’re one of a few guys who uses composer. Of course, there are so many useful libraries, but combined together it’s the biggest BULLSH… you will ever have :slight_smile: So, summarized: Using too much libraries won’t result in a clean and powerful code. Write your own code, and profit.

Cheers,
eliteCode

1 Like

I don’t think many authors here have experience with Composer, let alone the knowledge to host their own repository. The vast majority of items also wouldn’t make sense to be distributed via a package manager - plus the enforceability of licensing is questionable. So this is definitely never going to happen on a wide scale.

+1 And I don’t think many buyers also have experience with Composer to install the scripts using it.

It’s so outrageous, it’s GOTTA be sarcasm!

These were my thoughts while reading some of these comments, especially the long one. So, for the hard-headed and the amateurs and snippet gurus out there, here’s a reply.

I hate third party libraries

The purpose of software development is automation and re-use. If you can’t re-use code, it’s useless, because you spend time writing something that works only here, now, and for you.

Using too much libraries won’t result in a clean and powerful code

Composer is not a library. It’s not “BULLSH”. It’s the de-facto package manager for PHP.
Also, it’s not a CMS, so no CMS can have better “functionalities” than Composer (seeing it written in quotes and lowercase makes me cringe): they are different things for different purposes, and cannot be compared.

Just create an awesome professional and advanced CMS for your products

It doesn’t appear that you have any idea what you’re talking about. CMS stands for Content Management System. It is there to manage content. It is not there to manage packages.
Also, if everybody wrote their own exclusive CMS, we’d be in trouble.

…if you write your own library for any regarding feature you will learn from it and expand your programming knowledges, make it more cleaner, write it based on your coding styles

I am the lead developer at a company and make plugins for a living. I have 9 years of experience in software development, including WP, Magento, CodeIgniter. I am part of a workgroup assembled for a new PSR standard. I am a huge contributor to open source. Your comment is ridiculous.

I don’t think many authors here have experience with Composer…

Sadly, it appears you’re right.

…let alone the knowledge to host their own repository

Even a monkey with a keyboard can host “their own” repository.

I don’t think many buyers also have experience with Composer to install the scripts using it

Selling CMS plugins and themes saves webmaster time. Selling scripts and libraries saves development time. If you are a developer, I would expect you to be familiar with the package manager for the platform of your choice.

In conclusion, I am amazed by the mediocrity of the dev community in general, and specifically of hipster communities, such as WP, Vue, Envato, etc. I hope my post will inspire you to RTM again, and maybe look into doing things the right way: PSR, Composer, SOLID, etc. Take a look at PHP: The Right Way. Obviously, given the reaction, there is no way I’m going to host my code on this platform: I would risk permanent damage to my reputation by creating a listing here.

https://imgflip.com/i/22k8ao

That was fun.

It’s not as if you aren’t allowed to use Composer. You can do as you please. Many authors do in fact use Composer within some or all of their items, myself included.

But the point I made is simple: do not expect Envato to force authors into using Composer. They want to accept scripts of all kinds. It certainly would be cool, but simply won’t happen.

If you feel your reputation would be squandered in such a marketplace, then it’s probably not the right one for you.

As for authors setting up their own repositories, my main concern is regarding SSL. I wonder how few authors here have even heard of Let’s Encrypt. Some use free hosting, even.

Thanks for the reply.

I never wrote anything about forcing anyone to use Composer. I just wanted to know if it’s possible to distribute code sold at CodeCanyon via Composer - because, like I said, no sane developer would use it otherwise. Managing dozens of dependencies recursively by hand? Don’t we have better things to do? And my clients have better ways to spend their money.

With regard to setting up a repository: have you heard about BitBucket or GitHub? Private repos? Packagist.com? Not sure what exactly the problem is here.

You can use Composer within your items. You can definitely distribute it via a private composer package, as well (only to Envato buyers if you’re an exclusive author**), but you still must provide full source files to buyers over CodeCanyon.

None of these are free for private repos (under normal circumstances anyway), so those authors who use free hosting for their demos definitely won’t want this. I’m not arguing that it’s impossible to do this. I’m saying it’s not for all authors. You can do it just fine. I have private repos on GH too, works perfect.

How is this done? And how to make sure only Envato buyers can access the code?

None of these are free for private repos (under normal circumstances anyway), so those authors who use free hosting for their demos definitely won’t want this. I’m not arguing that it’s impossible to do this. I’m saying it’s not for all authors. You can do it just fine. I have private repos on GH too, works perfect.

BitBucket allows free private repos. Also, one sale here can cover the cost of hosting for a month. The demo sites are your sites. Surely you have access to your own private repos. Don’t see any problem.

Ah, you’re right, it does have free private repos. That’s nice! But I don’t get what that means? What should Envato do with this information?

Exactly. This is the issue with distributing via Composer. You cannot distribute your code to anyone except buyers from Envato if you’re an exclusive author.

Also, I just realized there might be a misunderstanding here. When you sell in the PHP scripts category, you are selling the code itself, not access to some remote VCS repo. You can certainly provide access to a composer package (assuming you figure out how to do some sort of authentication), but that would need to be a side feature.

Regarding how to secure the repository, I really don’t know an answer to that question.

That’s exactly what I was asking: can I deliver the code I sell here to Envato buyers via Composer. I know how the authentication can be done, but I’m asking whether Envato supports this. I guess I have my answer now: it does not.

I think I’ll make my own marketplace, with Composer support.
Thank you for being helpful!

1 Like

Hello @XedinUnknown !
Now you can install install Envato products for WordPress with Composer
See https://github.com/szepeviktor/composer-envato