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: 357
Joined: Fri Mar 09, 2007 1:51 am
Contact:

No vendor directory

Post by RMcGirr83 » Wed Mar 30, 2016 3:14 pm

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: 694
Joined: Tue Nov 01, 2005 9:50 pm
Location: Milano (I) Frankfurt (D)
Contact:

Re: No vendor directory

Post by 3Di » Wed Mar 30, 2016 3:52 pm

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.
Want to compensate me for my interest? Don't ask me, just do it
I'm available for custom phpBB jobs, you can PM me the details.
New: my Live Board, Extensions and Tools for phpBB - Men at works.

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

Re: No vendor directory

Post by Nicofuma » Wed Mar 30, 2016 4:25 pm

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

User avatar
paulus
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 361
Joined: Thu Sep 16, 2004 9:02 am
Contact:

Re: No vendor directory

Post by paulus » Wed Mar 30, 2016 7:39 pm

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.
Image

User avatar
3Di
Registered User
Posts: 694
Joined: Tue Nov 01, 2005 9:50 pm
Location: Milano (I) Frankfurt (D)
Contact:

Re: No vendor directory

Post by 3Di » Wed Mar 30, 2016 8:20 pm

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.
Want to compensate me for my interest? Don't ask me, just do it
I'm available for custom phpBB jobs, you can PM me the details.
New: my Live Board, Extensions and Tools for phpBB - Men at works.

User avatar
VSE
Extension Customisations
Extension Customisations
Posts: 670
Joined: Mon Mar 08, 2010 9:18 am

Re: No vendor directory

Post by VSE » Wed Apr 06, 2016 5:39 pm

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

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

Re: No vendor directory

Post by RMcGirr83 » Thu Apr 07, 2016 10:41 am

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

User avatar
paulus
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 361
Joined: Thu Sep 16, 2004 9:02 am
Contact:

Re: No vendor directory

Post by paulus » Thu Apr 07, 2016 3:35 pm

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

User avatar
VSE
Extension Customisations
Extension Customisations
Posts: 670
Joined: Mon Mar 08, 2010 9:18 am

Re: No vendor directory

Post by VSE » Fri Apr 08, 2016 3:29 am

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