Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
234 commits
Select commit Hold shift + click to select a range
dd024ef
Travis work
absalomedia Jul 15, 2015
d5a0a62
More Travis work
absalomedia Jul 15, 2015
a6659cd
More Travis
absalomedia Jul 15, 2015
d0fd400
Travis - expose script & test
absalomedia Aug 7, 2015
1ec9030
Remove redundant make
absalomedia Aug 7, 2015
dc60b5e
More Friday
absalomedia Aug 7, 2015
04314ae
Remove Gemfile
absalomedia Aug 7, 2015
00708aa
Simpler travis
absalomedia Aug 7, 2015
21c0b38
Need PHPize stuff
absalomedia Aug 7, 2015
8259eaf
Still trying to get PHP dev on
absalomedia Aug 7, 2015
8f74b24
Travis: preconf web server & install extension on sequence
absalomedia Aug 7, 2015
b11fda5
More Travis work
absalomedia Aug 7, 2015
7a7c1bf
Remove make install from Travis. Leave it at tests
absalomedia Aug 7, 2015
cf526a3
Test Windows conf
absalomedia Aug 10, 2015
2716383
Force install of PHP extension - see if it breaks on Travis
absalomedia Aug 11, 2015
bdc38d0
Appveyor test setup
absalomedia Aug 12, 2015
fefa5e7
Appveyor restructure
absalomedia Aug 12, 2015
832a866
Get right link to PHP5 dev in Chocolatey
absalomedia Aug 12, 2015
69be397
Powershell hack to get PHP src as Chocolatey dev is broken
absalomedia Aug 12, 2015
50babec
Make PS call single line as breaking on AppVeyor
absalomedia Aug 12, 2015
74a1a4f
Set extension to create DLL
absalomedia Aug 12, 2015
853d390
More work on Powershell structures for Appveyor
absalomedia Aug 12, 2015
ceb03c3
Restructure based on local R2 testing
absalomedia Aug 12, 2015
ca1ce82
Restructure to $home
absalomedia Aug 12, 2015
35155cf
Remove 7z install - not needed
absalomedia Aug 12, 2015
e64d939
Get build folder
absalomedia Aug 12, 2015
99c0058
More work trying to extract PHP src
absalomedia Aug 12, 2015
a9ab37f
Redesigned Appveyor
absalomedia Aug 12, 2015
68893e6
More tweaks
absalomedia Aug 12, 2015
abbf456
More redesign of App
absalomedia Aug 12, 2015
9f34ff6
More Appveyor
absalomedia Aug 12, 2015
f667780
YAML work
absalomedia Aug 12, 2015
4cb7ed5
Trying to get environment var right
absalomedia Aug 12, 2015
a5d534b
Drop PHP version from App build
absalomedia Aug 12, 2015
d14b132
No need to shallow clone
absalomedia Aug 12, 2015
c598539
Reconcile PHP version
absalomedia Aug 12, 2015
0953fde
Still trying to resolve dynamic linking
absalomedia Aug 13, 2015
efb29ba
More redesign on download
absalomedia Aug 13, 2015
f83a1ae
Return of hardcoding
absalomedia Aug 13, 2015
f3017db
Quench 7z output, cscript call
absalomedia Aug 13, 2015
08a14c5
Better PHP build negotation on App
absalomedia Aug 13, 2015
143af93
Config.w32 quote marks
absalomedia Aug 13, 2015
2f67f2c
Hide notifications
absalomedia Aug 13, 2015
79ee566
Comment out LDFlags in testing
absalomedia Aug 13, 2015
a1bc56a
Redesigned LDFLAGS for VS
absalomedia Aug 19, 2015
5aa1539
Try to find libexec
absalomedia Aug 19, 2015
21ee3f3
Simplify Appveyor
absalomedia Sep 10, 2015
138fe0d
PHP 5.6.13 appveyor
absalomedia Sep 10, 2015
8f6d290
Fix documentation as call does both map & inline comments
absalomedia Sep 14, 2015
46bd88c
Fix typo on map root
absalomedia Sep 19, 2015
cfbf1a7
Stronger type control
absalomedia Sep 26, 2015
7fc6fd3
Restructured Travis
absalomedia Oct 6, 2015
dc64174
Simpler Travis
absalomedia Oct 6, 2015
a812e47
Return of 5.4 in Travis
absalomedia Oct 6, 2015
8d68f5a
Capture PHPT into Travis
absalomedia Oct 6, 2015
62b048e
Set env for tests
absalomedia Oct 6, 2015
9a9ba2c
Remove PHP Unit pathing
absalomedia Oct 6, 2015
73e3c89
Travis LD_Library
absalomedia Oct 6, 2015
63980e5
Return of make install
absalomedia Oct 6, 2015
a3c9757
PHP Unit work
absalomedia Oct 6, 2015
40d955c
More Clover work
absalomedia Oct 6, 2015
c9b15c5
CodeClimate coverage
absalomedia Oct 6, 2015
f36d87a
Libsass source indenting
absalomedia Oct 22, 2015
579c49a
Version bump & update documentation
absalomedia Oct 25, 2015
28a97e4
Typo fix
absalomedia Oct 25, 2015
1797035
Libsass to 3.3
absalomedia Oct 25, 2015
04126d6
Get right directory for context
absalomedia Oct 25, 2015
1effd66
More 3.3 API experiments
absalomedia Oct 26, 2015
ca95b26
More 3.3ish work
absalomedia Oct 26, 2015
7f6109a
Base PHPT for SASS vs SCSS test
absalomedia Oct 26, 2015
146d767
Base handler test for SCSS vs SASS
absalomedia Oct 26, 2015
3deaf74
Keep trying to find file
absalomedia Oct 26, 2015
b671003
Try to find php_sass
absalomedia Oct 26, 2015
78a98b3
Keep trying to get file right
absalomedia Oct 26, 2015
0c054f7
More file hunting
absalomedia Oct 26, 2015
41a157d
More 3.3 work with updated tests
absalomedia Oct 27, 2015
8ee31fb
Fix embed test
absalomedia Oct 27, 2015
3771b66
Fix embed output test
absalomedia Oct 27, 2015
d171241
Libsass 3.3.0 update on documentation
absalomedia Oct 27, 2015
52bc14f
Fix comparison type
absalomedia Oct 27, 2015
def2694
Appveyor update
absalomedia Oct 27, 2015
52d4e23
Appveyor: code to 5.6.14
absalomedia Oct 27, 2015
c41b8cb
Libsass 3.3.1 version bump
absalomedia Oct 30, 2015
8cb73ba
More 3.3.1 work
absalomedia Oct 30, 2015
e52b7b7
Cache c stuff on Travis
absalomedia Nov 2, 2015
26f3c31
Redesigned Travis
absalomedia Nov 2, 2015
51aa556
Add PHP7 to Travis & restructure
absalomedia Nov 5, 2015
c404a04
More cleaning
absalomedia Nov 5, 2015
01c5231
Fix typo on version string
absalomedia Nov 5, 2015
175312b
More typo fixes
absalomedia Nov 6, 2015
3d2dac5
More obvious typos
absalomedia Nov 6, 2015
5a8e62a
Experimental PHP7 test
absalomedia Nov 6, 2015
90b56e7
More PHP7 experiments
absalomedia Nov 6, 2015
d1e72e0
More PHP7 string work
absalomedia Nov 6, 2015
4d2e385
More PHP7 structure
absalomedia Nov 6, 2015
1bead01
Better PHP7 error checking
absalomedia Nov 6, 2015
2333711
PHP7 refactor object handler
absalomedia Nov 6, 2015
09b41b0
PHP7 get right zend object
absalomedia Nov 6, 2015
a9c4116
More PHP7 refactoring
absalomedia Nov 6, 2015
d79e32a
More PHP7 handler work
absalomedia Nov 6, 2015
ae644f6
More PHP7 naming work
absalomedia Nov 6, 2015
42149fc
More PHP7 object refactor
absalomedia Nov 6, 2015
465ad23
Better PHP7 refactoring
absalomedia Nov 6, 2015
20a245e
More refactor work PHP7
absalomedia Nov 6, 2015
81a25f6
PHP7: set offset
absalomedia Nov 6, 2015
9f466bc
Experimental PHP7 refactor
absalomedia Nov 6, 2015
3a48657
More PHP7 rework
absalomedia Nov 6, 2015
ed3e380
More PHP7 formatting work
absalomedia Nov 6, 2015
218fca7
PHP7 work
absalomedia Nov 6, 2015
0113bb8
More PHP7
absalomedia Nov 6, 2015
2e0fb1d
PHP7: See if this works
absalomedia Nov 6, 2015
5a43a40
back to basics
absalomedia Nov 6, 2015
52a63c2
Testing pointers
absalomedia Nov 10, 2015
f8358d1
Experimental objects
absalomedia Nov 10, 2015
44fbd0e
Revert "Experimental objects"
absalomedia Nov 10, 2015
58838ba
Keep objects inline for time being with PHP7 tests
absalomedia Nov 10, 2015
d7a386a
More PHP7 groundwork
absalomedia Nov 10, 2015
a7e36c2
More PHP7
absalomedia Nov 10, 2015
7b56bd5
PHP7 custom object define
absalomedia Nov 10, 2015
d1b8d7f
PHP7: notation fixes
absalomedia Nov 10, 2015
8310328
More PHP7
absalomedia Nov 10, 2015
ddbbe99
PHP7: more refactoring
absalomedia Nov 10, 2015
0a372d0
PHP7: hopefully final tweaks
absalomedia Nov 10, 2015
4fb1402
PHP7 stable base
absalomedia Nov 10, 2015
ca89066
Updated documentation
absalomedia Nov 10, 2015
d158f86
Simplify travis
absalomedia Nov 11, 2015
8483d22
Libsass 3.3.2
absalomedia Nov 11, 2015
e0c9285
More Travis
absalomedia Nov 12, 2015
1092f03
More Travis
absalomedia Nov 12, 2015
a9f2c0b
Remove tests from Travis for time being
absalomedia Nov 13, 2015
f5d54d9
Travis: move script around
absalomedia Nov 13, 2015
083b928
Yet more Travis
absalomedia Nov 13, 2015
ea4954f
Container Travis
absalomedia Dec 15, 2015
4636a54
Appveyor PHP version update
absalomedia Jan 6, 2016
507a3af
Appveyor OS drop
absalomedia Jan 6, 2016
81970b8
Appveyor remove OS / image
absalomedia Jan 6, 2016
30cb5da
Valgrind on Travis?
absalomedia Jan 7, 2016
353ace8
Restructure Travis
absalomedia Jan 8, 2016
5b9b65d
Remove dupe call from Travis
absalomedia Jan 8, 2016
985bbb5
Return of make install to Travis: it is needed
absalomedia Jan 8, 2016
a5523fc
See if it works without extension install
absalomedia Jan 8, 2016
ef82f19
Revert "See if it works without extension install"
absalomedia Jan 8, 2016
66c332b
PHP7: redesign getting file/source structure
absalomedia Jan 14, 2016
3986209
More PHP7 work
absalomedia Jan 14, 2016
097e034
Simplify stuff for PHP7
absalomedia Jan 14, 2016
9647777
Travis core dump tracking
absalomedia Jan 14, 2016
9b1a22b
Revise documentation
absalomedia Jan 14, 2016
a2dcab9
More work on PHP7
absalomedia Jan 17, 2016
8d347c8
PHP7: better object deletion
absalomedia Jan 17, 2016
46dbd83
Libsass 3.3.3 update
absalomedia Jan 25, 2016
0b768b3
New PHP7 based PR
absalomedia Feb 2, 2016
7e14e8d
Travis: trying to catch coredumps
absalomedia Feb 3, 2016
39f4e44
Update tests
absalomedia Feb 3, 2016
885512a
Typo fix file embed test
absalomedia Feb 4, 2016
b0a5a60
File embed test: remove unneeded space
absalomedia Feb 4, 2016
139236f
More test work
absalomedia Feb 4, 2016
9cfdc9c
Map test revision
absalomedia Feb 4, 2016
071c2ec
More test work
absalomedia Feb 5, 2016
f2179c0
More source map test work
absalomedia Feb 5, 2016
a1ccfb1
Map test with tabs
absalomedia Feb 5, 2016
5e95f46
More map test
absalomedia Feb 5, 2016
32dba1c
Merge branch 'master' into PR3
absalomedia Feb 5, 2016
48d65fa
Tweak object freeing for PHP7
absalomedia Feb 21, 2016
242dba4
Typo fix
absalomedia Feb 21, 2016
3a61fb5
Fix introduced typo
absalomedia Feb 21, 2016
48047e7
Rearrange zend_object
absalomedia Feb 21, 2016
e9ef9d6
More Monday typos
absalomedia Feb 21, 2016
8852934
See what this does
absalomedia Feb 22, 2016
2981023
Remove PHP 5.4 from Travis
absalomedia Feb 22, 2016
a5d752f
More PHP7 experiment
absalomedia Feb 22, 2016
124a4ad
More on PHP7
absalomedia Feb 22, 2016
18aa570
More PHP7 testing
absalomedia Feb 22, 2016
7a16f5e
Get zend object ordering righ
absalomedia Feb 22, 2016
810ff58
Object traversal
absalomedia Feb 22, 2016
ddc3ebc
More work on object freeing
absalomedia Feb 22, 2016
8d71f7d
More work on SASS free storage
absalomedia Feb 22, 2016
781e21c
More restructure work
absalomedia Feb 22, 2016
8a843fc
Partial revert
absalomedia Feb 22, 2016
c303fe5
More Sass handling
absalomedia Feb 22, 2016
373ae54
Try to ix pointer type
absalomedia Feb 22, 2016
cec35fd
Visual Studio start of commit
absalomedia Feb 22, 2016
d409d85
More VS stuff
absalomedia Feb 22, 2016
fbbace0
More free object stuff
absalomedia Feb 22, 2016
24720f9
More PHP7 free stuff
absalomedia Feb 22, 2016
35c686d
Better config.w32
absalomedia Feb 22, 2016
f3b1984
Standardise PHP7
absalomedia Feb 22, 2016
4b3c8f5
Rewritten free object storage PHP7
absalomedia Feb 22, 2016
b6d12d3
Typo fix
absalomedia Feb 22, 2016
171bd94
Better PHP7 hash destroy
absalomedia Feb 22, 2016
a00091c
More PHP7 zend stuff
absalomedia Feb 22, 2016
95e350d
Void object?
absalomedia Feb 22, 2016
306e974
Still trying to debug this last issue
absalomedia Feb 22, 2016
928a9fd
More tweaks
absalomedia Feb 22, 2016
7aa956f
Merge branch 'master' into PR3
absalomedia Feb 29, 2016
a14b9a1
Libsass 3.3.4 & badge
absalomedia Apr 11, 2016
ccb4dcf
Libsass 3.3.4
absalomedia Apr 11, 2016
df246c9
Merge branch 'master' into PR3
absalomedia Apr 11, 2016
d4cae89
0.5.5 release with 3.3.6 Libsass
absalomedia May 4, 2016
bcf8416
Compatibility fixes with libsass 3.3.6
harnash May 10, 2016
848974e
Attempt to fix segfaults.
harnash May 10, 2016
2da862f
Some style improvements.
harnash May 10, 2016
8a4a4d7
Updated appveyor with up-to-date windows PHP version.
harnash May 10, 2016
9c8988f
Fix stack smashing errors
May 10, 2016
83d040e
Tweak PHP7 object free rule
absalomedia May 11, 2016
c80b630
Partial commit
absalomedia May 11, 2016
656bf20
More PHP7 experiments
absalomedia May 11, 2016
0bfd3ef
Zend change
absalomedia May 11, 2016
bb03649
Fix test
absalomedia May 11, 2016
f351455
Rewrite free storage function PHP7
absalomedia May 11, 2016
12a5744
Trying to get PHP7 free object right
absalomedia May 11, 2016
975fcbc
More PHP7 object free work
absalomedia May 11, 2016
9313221
Version patch, more PHP7
absalomedia May 11, 2016
f9ea8ae
More PHP7 free storage rewrite
absalomedia May 11, 2016
e89298a
Merge branch 'php70_improvements' of https://github.com/Wikia/sassphp…
absalomedia May 11, 2016
b1f2ce6
0.5.6 documentation revision
absalomedia May 11, 2016
5f314eb
Merge branch 'master' into PR3
absalomedia May 11, 2016
400fcd5
Start of removal possible redundant loop
absalomedia May 11, 2016
a49b486
Remove last part of redundant function
absalomedia May 11, 2016
5dfe886
Return 5.4 Travis test
absalomedia May 11, 2016
eee6592
Merge branch 'master' into PR3
absalomedia May 11, 2016
4fcb453
Whitelist test
absalomedia May 16, 2016
62e6c6b
More whitelisting
absalomedia May 16, 2016
ea667bd
Update README.md
absalomedia May 17, 2016
bd2efa0
Merge branch 'master' into PR3
absalomedia May 17, 2016
b385cbe
Travis Coveralls test
absalomedia May 18, 2016
8660a68
Libsass 3.4.0 update
absalomedia Dec 13, 2016
c8c484e
Update tests based on 3.4.0 changes
absalomedia Dec 13, 2016
18c455c
Fix spacing / line issue on updated test
absalomedia Dec 13, 2016
f264780
Libsass 3.4.2
absalomedia Jan 5, 2017
4db40dc
Update .travis.yml
absalomedia Jan 6, 2017
066945b
Update .travis.yml
absalomedia Jan 6, 2017
cfcb9fb
Libsass & Travis
absalomedia Jan 13, 2017
d6ec464
Fix test
absalomedia Jan 13, 2017
cef819f
Merge branch 'master' into PR3
absalomedia Jan 13, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
language: php
php:
- 5.4
- 5.5
- 5.6
- 7.0
- 7.1
- nightly

allow_failures:
- php: nightly

addons:
apt:
packages:
- php5-dev
- gdb

env:
global:
# Configure the .phpt tests to be Travis friendly
- REPORT_EXIT_STATUS=1
- TEST_PHP_ARGS="-q -s output.txt -g XFAIL,FAIL,BORK,WARN,LEAK,SKIP -x --show-diff"
# Add the pip installation folder to the PATH, until https://github.com/travis-ci/travis-ci/issues/3563 is fixed
- PATH=$HOME/.local/bin:$PATH

compiler:
- gcc

install:
# What is the current file size max for core files?
# It is usually 0, which means no core file will be dumped if there is a crash
- ulimit -c

before_install:
- echo $LANG
- echo $LC_ALL
- composer require satooshi/php-coveralls --dev
- git submodule init
- git submodule update

before_script:
- travis_retry composer self-update
- composer config discard-changes true
- ulimit -c unlimited -S # enable core dumps

script:
- make clean
- cd lib/libsass && make && cd ../..
- phpize
- ./configure
- make
- echo "extension = sass.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${TRAVIS_BUILD_DIR}/modules"
- make install
- mkdir -p build/logs
- phpunit --coverage-clover build/logs/clover.xml
- make test || RESULT=$?
- if [[ ${RESULT} == 0 ]]; then echo "\\o/ our test worked without problems"; else echo "ruhroh test returned an errorcode of $RESULT"; fi;
- for i in $(find ./ -maxdepth 1 -name 'core*' -print); do gdb $(pwd)/test core* -ex "thread apply all bt" -ex "set pagination 0" -batch; done;
- if [[ ${RESULT} != 0 ]]; then exit $RESULT ; fi;

after_success:
- travis_retry php vendor/bin/coveralls

notifications:
on_success: never
on_failure: never


os:
- linux

matrix:
fast_finish: true
112 changes: 61 additions & 51 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,21 @@

The `sass` extension for PHP gives you an object-oriented system of parsing [Sass](http://sass-lang.com/) from within your PHP applications. Under the hood it uses [libsass](https://github.com/hcatlin/libsass) to provide super speedy and compatible Sass parsing.

![Libsass 3.4.3](https://img.shields.io/badge/libsass-3.4.3-yellow.svg) [![Build Status](https://travis-ci.org/absalomedia/sassphp.svg)](https://travis-ci.org/absalomedia/sassphp)

## What's Sass?

Sass is a CSS pre-processor language to add on exciting, new, awesome features to CSS. Sass was the first language of its kind and by far the most mature and up to date codebase.

Sass was originally created by Hampton Catlin ([@hcatlin](http://twitter.com/hcatlin)). The extension and continuing evolution of the language has all been the result of years of work by Natalie Weizenbaum ([@nex4](http://twitter.com/nex4)) and Chris Eppstein ([@chriseppstein](http://twitter.com/chriseppstein)).
Sass was originally created by Hampton Catlin ([@hcatlin](http://twitter.com/hcatlin)). The extension and continuing evolution of the language has all been the result of years of work by Natalie Weizenbaum ([@nex3](http://twitter.com/nex3)) and Chris Eppstein ([@chriseppstein](http://twitter.com/chriseppstein)).

For more information about Sass itself, please visit [http://sass-lang.com](http://sass-lang.com)

## Installation

Currently, the only way to install the extension is manually:

$ git clone git://github.com/absalomedia/sassphp
$ git clone git://github.com/sensational/sassphp

Remember to grab your submodules:

Expand Down Expand Up @@ -71,17 +73,20 @@ You can set the style of your SASS file to suit your needs:
$sass = new Sass();
$sass->setStyle(Sass::STYLE_COMPRESSED);

The new additions to this build from the [Sensational](https://github.com/sensational/sassphp) codebase are:
* Camel case rename of `compile_file` to `compileFile`
* SASS file compilation is now an array when a source map is enabled. Otherwise, as per normal, it's a string.
As the [Libsass](https://github.com/hcatlin/libsass) library has matured to get closer to 100% SASS coverage, so this extension has also matured:
* SASS file compilation is an array when a source map file is specified.
* The ability to define source comments
* The ability to embed the source map into the CSS output
* The ability to specify .SASS file input instead of .SCSS
* The ability to set a source map path, required when generating a dedicated .map file
* The ability to define a root directory for the source map itself
* PHP 5.4 to PHP 7.1 (nightly) support

It also reports itself as the `Sassyphpras` version of the Apache SASS module to help differentiate builds.
The output of `compileFile()` is an array when creating source map files, allowing both compiled SASS file and .map file to be generated in the same function call.

The output of `compileFile()` is now an array instead of a string, allowing both compiled SASS file and .map file to be generated in the same function call. As there are multiple ways of generating source comments, there are now PHP level settings to control that output.
As there are multiple ways of generating source comments, there are now PHP level settings to control that output.

To generate source comments for a file inline - now in camelCase:
To generate source comments for a file inline:

$sass = new Sass();
$sass->setComments(true);
Expand All @@ -91,10 +96,21 @@ Aliases also exist so you can also use:

$css = $sass->compile_file($source);

You can tell the compiler to use indented syntax (SASS syntax). By default it expects SCSS syntax:

$sass = new Sass();
$sass->setIndent(true); //TRUE -> SASS, FALSE -> SCSS
$css = $sass->compile($source);

You can tell the compiler to embed the source map into the actual CSS file as well:

$sass = new Sass();
$sass->setEmbed(true);
$css = $sass->compile($source);

You can set the source map file for the library to use:

$sass = new Sass();
$sass->setComments(true);
$sass->setMapPath('/random.output.css.map');
$css = $sass->compileFile($source);

Expand All @@ -106,6 +122,13 @@ The first array item will always be the compiled SASS file:
The second array item will always be the source map output:
$css[1]

You can set the root of the generated source map file like so:

$sass = new Sass();
$sass->setMapRoot('/some/dir');
$sass->setMapPath('/random.output.css.map');
$css = $sass->compileFile($source);

If there's a problem, the extension will throw a `SassException`:

$sass = new Sass();
Expand All @@ -121,50 +144,37 @@ If there's a problem, the extension will throw a `SassException`:
$css = FALSE;
}

## Potential / known issues

* The file_comments test will fail as it remains unable to figure out the path the test has been run in. It generates the output successfully

## Variant builds

## Forward planning
These extensions also utilise the [Libsass](https://github.com/hcatlin/libsass) library & remain in varying states of completion:

* HHVM Zend compatibility?
* Nginx extension?
* Facebook [HHVM](https://github.com/absalomedia/sasshhvm) native (non Zend) extension - with Libsass 3.4.3 - tested up to HHVM 3.11.x
* [Nginx](https://github.com/absalomedia/sass-nginx-module) module - with Libsass 3.4.3

## Changelog

** Version 0.4.5
* Holiday Patch (Libsass 3.2.5) stable

** Version 0.4.4
* Refactor correctly for LibSass 3.2.4

** Version 0.4.2
* CamelCase compile sequence

** Version 0.4.1**
* SOURCE_DEFAULT works & is documented
* PHP test for SOURCE_DEFAULT (output unable to understand source directory in test, so functional pass, technical fail)
* Revise other tests to pass as output varies on source negotiation.

** Version 0.4**
* Reconciled file compliation loop
* Expand documentation
* Addition of basic test for source comments
* More work on compile sequence

** Version 0.3.9**
* Addition of source map url paths to SASS file compilation

** Version 0.3.5**
* Restructure of compile sequence (file only at this time) to account for source map output

** Version 0.3.0**
* Addition of source comments - none, inline, file. Set default to none.

** Version 0.2.0**
* Changed methods to be non-static
* Allow setting include-path and image-path

**Version 0.1.0 - IN DEVELOPMENT**
* Initial release
| Release | Description |
| --- | --- |
| 0.5.10 | Elwood (Libsass 3.4.3) stable & Travis fix |
| 0.5.9 | Rickshaw (Libsass 3.4.2) stable |
| 0.5.8 | AI - KITT (Libsass 3.4.0) stable |
| 0.5.7 | Hancock - Optimise loops & Travis. Simplify changelog documentation |
| 0.5.6 | Green Giant - PHP5 & PHP7 stable build - All Travis builds passing |
| 0.5.5 | Herbie (Libsass 3.3.6) stable |
| 0.5.2 | Delorean (Libsass 3.3.3) stable & continuing PHP7 rewrite |
| 0.5.1 | Eleanor (Libsass 3.3.2) stable |
| 0.5.0 | Start of PHP 7 compatibility |
| 0.4.9 | Too Fast To Furious (Libsass 3.3.1) stable |
| 0.4.8 | Greased Lightning (Libsass 3.3.0) stable |
| 0.4.7 | SCSS vs SASS detection - indents |
| 0.4.6 | Travis experimental (unreleased) |
| 0.4.5 | Holiday Patch (Libsass 3.2.5) stable |
| 0.4.4 | Refactor correctly for LibSass 3.2.4 |
| 0.4.2 | CamelCase compile sequence |
| 0.4.1 | Addition of SOURCE_DEFAULT test & structure. Revise other tests |
| 0.4.0 | Refactor file compliation. Basic tests for source comments. Expand documentation |
| 0.3.9 | Addition of source map url paths to SASS file compilation |
| 0.3.5 | Restructure of compile sequence (file only at this time) to account for source map output |
| 0.3.0 | Addition of source comments - none, inline, file. Set default to none. |
| 0.2.0 | Changed methods to be non-static. Allow setting include-path and image-path |
| 0.1.0 | Initial release |
42 changes: 42 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
environment:
PHP_VERSION: 5.6.21

configuration: Release

version: '0.0.{build}'

matrix:
fast_finish: true

install:
- cd C:\projects\sassphp
- git submodule init
- git submodule update
- cd C:\
- mkdir php-src
- echo Preparing Windows build...
- echo Downloading PHP source code [%PHP_VERSION%]
- cd C:\php-src
- appveyor DownloadFile http://windows.php.net/downloads/releases/php-5.6.21-src.zip -FileName php-src.zip
- 7z x -y php-src.zip > nul
- '"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64'

build_script:
- cd C:\php-src\php-5.6.21-src
- buildconf.bat --add-modules-dir=C:\projects
- configure --disable-all --enable-cli --enable-sass
- nmake php_sass.dll

test: OFF

test_script: OFF

deploy: OFF

notifications:
- on_build_success: false
on_build_failure: false
on_build_status_changed: false

artifacts:
- path: ext\Release_TS\php_sass.dll
3 changes: 2 additions & 1 deletion config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ PHP_ARG_ENABLE(sass, [whether to enable sass extension],
[ --enable-sass Enable sass extension], yes, yes)

if test "$PHP_SASS" != "no"; then
PHP_ADD_INCLUDE(lib/libsass/include)
PHP_ADD_LIBRARY_WITH_PATH(sass, lib/libexec, LIBSASS_SHARED_LIBADD)

LDFLAGS="-lsass -L"`pwd`"/lib/libsass/lib/ -lstdc++"
Expand All @@ -13,7 +14,7 @@ if test "$PHP_SASS" != "no"; then

if test "x$sass_version" != "x" ; then
# escape hell. This is what we need to pass to the
# compiler: -DLIBSASS_VERSION="\"'3.2.5\""
# compiler: -DLIBSASS_VERSION="\"'3.3.3\""
CFLAGS="-DLIBSASS_VERSION=\"\\\"$sass_version\\\"\" $CFLAGS"
CXXFLAGS="-DLIBSASS_VERSION=\"\\\"$sass_version\\\"\" $CXXFLAGS"
fi
Expand Down
2 changes: 1 addition & 1 deletion install.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
system('cd lib/libsass && make && cd ../..');
system('phpize');
system('./configure');
system('make');
system('make');
2 changes: 1 addition & 1 deletion lib/libsass
30 changes: 30 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
forceCoversAnnotation="true"
mapTestClassNameToCoveredClassName="true"
colors="true"
backupGlobals="false"
backupStaticAttributes="false"
syntaxCheck="false"
stopOnError="false"
>

<testsuites>
<testsuite name="PHPT Test suite">
<directory suffix=".phpt">./tests/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".phpt">./tests/</directory>
</whitelist>
<blacklist>
<directory>./tests</directory>
<directory>./vendor/</directory>
</blacklist>
</filter>
<logging>
<log type="coverage-clover" target="build/logs/clover.xml"/>
<log type="junit" target="build/logs/junit.xml" logIncompleteSkipped="false"/>
</logging>
</phpunit>
9 changes: 6 additions & 3 deletions src/php_sass.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*
* https://github.com/jamierumbelow/sassphp
* Copyright (c)2012 Jamie Rumbelow <http://jamierumbelow.net>
* with work done by Philip Hofstetter & Lawrence Meckan
*/

#ifndef PHP_SASS_H
Expand All @@ -13,15 +14,15 @@
#include "config.h"
#endif

#define SASS_VERSION "0.4.5"
#define SASS_FLAVOR "Sassyphpras"
#define SASS_VERSION "0.5.10"
#define SASS_FLAVOR "sensational"

#include <php.h>
#include <ext/standard/info.h>
#include <Zend/zend_extensions.h>
#include <Zend/zend_exceptions.h>

#include "lib/libsass/sass_context.h"
#include <sass.h>

zend_class_entry *sass_ce;
zend_class_entry *sass_exception_ce;
Expand All @@ -39,6 +40,8 @@ PHP_METHOD(Sass, getPrecision);
PHP_METHOD(Sass, setPrecision);
PHP_METHOD(Sass, getComments);
PHP_METHOD(Sass, setComments);
PHP_METHOD(Sass, getIndent);
PHP_METHOD(Sass, setIndent);
PHP_METHOD(Sass, getEmbed);
PHP_METHOD(Sass, setEmbed);
PHP_METHOD(Sass, getMapPath);
Expand Down
Loading