Error

User tests: Successful: Unsuccessful:

avatar mbabker
mbabker
13 Apr 2014

As part of decoupling the core CMS from FOF, this PR breaks the dependency on FOF's LESS classes. FOF had implemented the lessc library by inlining its code into classes for proper code styling. Replacing it is JLess which extends the base lessc class. The full lessc library is included as a third party library here to enable easier updating of the library when able.

All of the FOF classes are flagged @deprecated and modified to extend their lessc counterparts except for FOFLess and FOFLessFormatterJoomla, which now extend their JLess counterparts.

To test this, one should verify that the Template Manager still correctly compiles LESS files or the build/generatecss.php CLI script still functions. Also, if there are third parties using the FOFLess classes, those should still function correctly.

JoomlaCode: http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=33607&start=0

avatar mbabker mbabker - open - 13 Apr 2014
avatar mbabker mbabker - change - 13 Apr 2014
Title
Replace FOFLess use with JLess wrapping lessc library
[#33607] Replace FOFLess use with JLess wrapping lessc library
avatar wilsonge
wilsonge - comment - 13 Apr 2014

I'm not convinced we should be bundling lessc library in core. I know FOF did - but doesn't mean it's the right thing. If we're going to bundle a library with joomla I personally would much rather bundle lessjs

avatar mbabker
mbabker - comment - 13 Apr 2014

Our use of the LESS library is within the scope of PHP code. It'd be a different argument if it were being called in another scope.

avatar wilsonge
wilsonge - comment - 14 Apr 2014

Our use of the less library is in the compiler - that isn't distributed with the CMS. My point is that the lessc library doesn't have to be distributed with the CMS either. We can shove it in the build folder if that's all we're gonna use it for. Then FOF is only in FOF and we have time to think about how we want people to play with less in the CMS.

avatar mbabker
mbabker - comment - 14 Apr 2014

The compiler is used in the Template Manager and as such required to ship with the CMS.

avatar mbabker
mbabker - comment - 14 Apr 2014

Further history - #2311

avatar wilsonge
wilsonge - comment - 14 Apr 2014

Ahh crud. fair enough then :)

On 14 April 2014 01:10, Michael Babker notifications@github.com wrote:

Further history - https://github.com/joomla/joomla-cms/pull/2311/files

Reply to this email directly or view it on GitHub#3436 (comment)
.

avatar piotr-cz
piotr-cz - comment - 22 May 2014

What about installing lessphp via composer, as a part of #3617?

avatar mbabker
mbabker - comment - 22 May 2014

I'd suggest getting this PR through first so that we separate back out the lessc library from a class used in the core API then the Composer install is rather simple.

avatar Bakual
Bakual - comment - 4 Jun 2014

Tested both in template manager and using my own extension. Works fine and PR looks also good from code review.
Needs to go into next minor (currently 3.4) since we deprecate methods.

One more test please.

avatar zero-24
zero-24 - comment - 5 Jun 2014

I have test the Template Manager and bulid/generatecss.php successful
:+1:@mbabker

avatar mbabker mbabker - reference | e83342a - 6 Jun 14
avatar Bakual Bakual - close - 6 Jun 2014
avatar Bakual
Bakual - comment - 6 Jun 2014

Merged with commit e83342a into 3.4-dev

Thanks!

avatar Bakual Bakual - change - 6 Jun 2014
Status New Closed
Closed_Date 0000-00-00 00:00:00 2014-06-06 11:57:22
avatar Bakual Bakual - close - 6 Jun 2014
avatar mbabker mbabker - head_ref_deleted - 22 May 2015

Add a Comment

Login with GitHub to post a comment