No vendor directory

Discuss general development subjects that are not specific to a particular version like the versioning control system we use or other infrastructure.
Post Reply
User avatar
RMcGirr83
Registered User
Posts: 360
Joined: Fri Mar 09, 2007 1:51 am
Contact:

No vendor directory

Post by RMcGirr83 »

Is it on purpose that the releases do not have the vendor directory? Was under the impression that "releases" were supposed to include all files/directories needed to test a release and that the releases should have dependencies along with them. At least I believe that's what @VSE said.

Further Paul stated this during a validation of one of my extensions
Paul wrote:You include the libary like this in composer.json, after that you run composer.phar update, and include vendor/ and composer.lock in your extension.
I do see composer.lock file in the release but not a vendor directory. :?
Do not hire Christian Bullock he won't finish the job and will keep your money

User avatar
3Di
Registered User
Posts: 951
Joined: Tue Nov 01, 2005 9:50 pm
Location: Milano 🇮🇹 Frankfurt 🇩🇪
Contact:

Re: No vendor directory

Post by 3Di »

I have been instructed by experience to keep the composer.lock and delete the vendor folder created.
While I have had no issues doing this some light should be shed, though.
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades

Nicofuma
3.2 Release Manager
3.2 Release Manager
Posts: 299
Joined: Sun Apr 13, 2014 1:40 am
Location: Paris

Re: No vendor directory

Post by Nicofuma »

The releases on github just hold the code. If you want the releases packages you can find all of them here: https://download.phpbb.com/pub/release/
Member of the phpBB Development-Team
No Support via PM

Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 373
Joined: Thu Sep 16, 2004 9:02 am
Contact:

Re: No vendor directory

Post by Paul »

Rich, what applies for extensions doesn't always applies for core. We _suggest_ for extension developers to use releases on github and include the vendor in case it is needed, as that is what they offer for their downloads. For phpBB, we simply have a seperate download page, and don't use the releases on github.

Marco, You need vendor/ in case you have dependencies management by composer, if you don't have those, you should not include vendor (And composer.lock), if you have, you should include both in extensions.

User avatar
3Di
Registered User
Posts: 951
Joined: Tue Nov 01, 2005 9:50 pm
Location: Milano 🇮🇹 Frankfurt 🇩🇪
Contact:

Re: No vendor directory

Post by 3Di »

Thx Paul, it is something I learnt it the wrong way for sure..
since I went back in this game and reading the writers forum, as a noob. Indeed.
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades

User avatar
MattF
Extension Customisations
Extension Customisations
Posts: 675
Joined: Mon Mar 08, 2010 9:18 am

Re: No vendor directory

Post by MattF »

phpBB's GitHub repository is intended for development and contribution...not distribution.
Has an irascible disposition.

User avatar
RMcGirr83
Registered User
Posts: 360
Joined: Fri Mar 09, 2007 1:51 am
Contact:

Re: No vendor directory

Post by RMcGirr83 »

Seems we have a "clash of the titans" thing going on.
We _suggest_ for extension developers to use releases on github and include the vendor in case it is needed
phpBB's GitHub repository is intended for development and contribution...not distribution.
I _suggest_ that all on the team get on the same page.
Do not hire Christian Bullock he won't finish the job and will keep your money

Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 373
Joined: Thu Sep 16, 2004 9:02 am
Contact:

Re: No vendor directory

Post by Paul »

Why should core development be exactly the same as extension development?

User avatar
MattF
Extension Customisations
Extension Customisations
Posts: 675
Joined: Mon Mar 08, 2010 9:18 am

Re: No vendor directory

Post by MattF »

phpBB uses GitHub for collaborative development in the open source community. It uses phpbb.com, for obvious reasons, for it's distribution.

Extensions can do whatever they want. If you want to be endorsed by phpBB, then they must go through our validation process and they will, like phpBB, be distributed through phpbb.com.

You can develop and collaborate on extensions however you see fit... Use Git, SVN, or whatever. Obviously we at phpBB like to see Git/GitHub because it's the de-facto standard for open source projects these days.

We suggest using GitHub's Releases for extensions (in development) because:
  • GitHub offers an excellent release interface you can use, which is nice for you and end-users.
  • You will save yourself the trouble of dealing with newbies that don't understand how to install an extension due to the packaging requirements. Just attach a nice pre-packaged zip to your release, so the end user simply unzips and copies it to ext/.
  • To promote your extension while it is under development on phpBB.com we require you to have a download link (if it's in alpha/beta). GitHub allows this, meaning you don't need your own hosting service. It also looks a lot more professional than linking to a zip on some shady file download service.
  • It's free.
  • The repository itself is source code. While this may be enough for some simpler projects, source code usually contains extra stuff that doesn't belong in the release that you ship. Not to mention a repository usually contains bleeding-edge developing code. What you really want is for people to be downloading stable release versions that are built and packaged for distribution.
Back to the OP, this is why it makes no sense to have a vendor directory in your repository. Because if phpBB, for example, had to commit all the hundreds/thousands of files that change whenever it updates Twig, or Symphony, etc... and copy those files to the repo, it would be a nightmare. 3rd party software like those composer dependencies should always be ignored in git projects. Collaborators on the project should know they must run composer to obtain those dependencies if they want to work on the source code of the project (and run it), which is exactly why the composer.phar and composer.lock files are in the repo (which are a lot simpler to maintain than a vendor full of libraries/frameworks).

Any project using composer to add/manage dependencies will need a build regiment for packaging its releases (either by a script or manual process). phpBB has a build script which runs composer, deletes all the stuff we don't want (like composer.phar/lock) and that results in what we distribute on phpbb.com as phpBB 3.1.x.

If you have an extension and you've added dependencies to it via composer, you should follow this process. The skeleton extension will soon have a build script added to it, but you can look at most of phpBB's official extension repos and see they have build scripts too (they don't have any dependencies, but the scripts do the job of cleaning out development/repo only files and creating a zip of the extension in the proper packaging structure).
Has an irascible disposition.

Post Reply