Quantcast

[Tiki-devel] Merged: Composer Dependencies Revamp

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Tiki-devel] Merged: Composer Dependencies Revamp

Ricardo Melo
Hi Devs,

Just merged my experimental branch with the composer dependencies revamp as mentioned here:

I've done my best to keep this change smooth, but I want to highlight some changes in the mind set that is important to keep in mind:

* vendor folder is for the end user

The vendor folder as well as the composer.json / composer.lock in the root of the project are for the user, they should not be versioned as part of tiki. There is a composer.json.dist file in the root to ease the live to the user to boostrap their own composer.json if they want.

* Bundled vendor libraries are in vendor_bundled/composer.json & vendor_bundled/vendor

The composer file for tiki was moved to vendor_bundled/composer.json and installs the libraries in vendor_bundled/vendor, if you are adding / updating a library in tiki, that is the place where you should add your dependency now.

This means either you "cd vendor_bundled" before running composer, or you run composer from the root folder with the parameter "-d vendor_bundled", example "php temp/composer.phar install -d vendor_bundled"

* Tiki will "magically" load the autoload for vendor and vendor_custom

As per https://dev.tiki.org/Composer+Dependencies+Revamp#Use_2_composer_files, if the user install manually dependencies using composer in the root of tiki, they will be loaded. Also, if "pre-packaged" dependencies are installed to vendor_custom with the format suggested in https://dev.tiki.org/Composer+Dependencies+Revamp#Use_Pre-Packaged_composer_dependencies, they will be loaded and made available to the PHP code.

Let me know if you find any problem and if you have any feedback ... good or bad!

Thank you
Ricardo


PS: There is a list of documents online that will be slightly outdated with this changes, from a couple of searches i did, this is the list I got, feel free to add more if you find them:

Information needs to be adapted to reflect the fact that there is a split between composer for bundled dependencies and composer for user managed dependencies

Update page to reflect the progress and what has been really implemented

To be updated with how can optional libs being installed using composer

To be updated with the info how users can install packages (and remove the reference to setup.sh)

To be updated with the possibilities to install using composer or pre-packaged files


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
TikiWiki-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Tiki-devel] Merged: Composer Dependencies Revamp

Marc Laporte-3
Well done Ricardo!

This is a big step for the future of Tiki. It's going to make a lot of
things smoother and future-proof.

Congratulations and thank you!

M ;-)

On Sat, Mar 18, 2017 at 2:36 PM, Ricardo Melo <[hidden email]> wrote:

> Hi Devs,
>
> Just merged my experimental branch with the composer dependencies revamp as
> mentioned here:
> https://dev.tiki.org/Composer+Dependencies+Revamp#Suggested_Approach ,
> Commit: https://sourceforge.net/p/tikiwiki/code/61747
>
> I've done my best to keep this change smooth, but I want to highlight some
> changes in the mind set that is important to keep in mind:
>
> * vendor folder is for the end user
>
> The vendor folder as well as the composer.json / composer.lock in the root
> of the project are for the user, they should not be versioned as part of
> tiki. There is a composer.json.dist file in the root to ease the live to the
> user to boostrap their own composer.json if they want.
>
> * Bundled vendor libraries are in vendor_bundled/composer.json &
> vendor_bundled/vendor
>
> The composer file for tiki was moved to vendor_bundled/composer.json and
> installs the libraries in vendor_bundled/vendor, if you are adding /
> updating a library in tiki, that is the place where you should add your
> dependency now.
>
> This means either you "cd vendor_bundled" before running composer, or you
> run composer from the root folder with the parameter "-d vendor_bundled",
> example "php temp/composer.phar install -d vendor_bundled"
>
> * Tiki will "magically" load the autoload for vendor and vendor_custom
>
> As per
> https://dev.tiki.org/Composer+Dependencies+Revamp#Use_2_composer_files, if
> the user install manually dependencies using composer in the root of tiki,
> they will be loaded. Also, if "pre-packaged" dependencies are installed to
> vendor_custom with the format suggested in
> https://dev.tiki.org/Composer+Dependencies+Revamp#Use_Pre-Packaged_composer_dependencies,
> they will be loaded and made available to the PHP code.
>
> Let me know if you find any problem and if you have any feedback ... good or
> bad!
>
> Thank you
> Ricardo
>
>
> PS: There is a list of documents online that will be slightly outdated with
> this changes, from a couple of searches i did, this is the list I got, feel
> free to add more if you find them:
>
> * https://dev.tiki.org/Composer
> Information needs to be adapted to reflect the fact that there is a split
> between composer for bundled dependencies and composer for user managed
> dependencies
>
> * https://dev.tiki.org/Composer+Dependencies+Revamp
> Update page to reflect the progress and what has been really implemented
>
> * https://dev.tiki.org/Install+optional+libraries+in+Tiki+via+Composer
> To be updated with how can optional libs being installed using composer
>
> * https://doc.tiki.org/PhantomJS+and+CasperJS
> To be updated with the info how users can install packages (and remove the
> reference to setup.sh)
>
> * https://doc.tiki.org/mPDF
> To be updated with the possibilities to install using composer or
> pre-packaged files
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> TikiWiki-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
>



--
Marc Laporte

http://WikiSuite.org
http://PluginProblems.com
http://Avan.Tech

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
TikiWiki-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
Loading...