241 Commits

Author SHA1 Message Date
Matthias Mullie
da79c42fc5 Install mbstring 2016-02-17 14:03:43 +01:00
Matthias Mullie
3518f595e5 Restore original Exception class
I admit, having just this 1 Exception class in the root of the
project was a bad idea...
But now I can't take it away without breaking backwards compatibility:
people could be catching errors of this class.
So all new Exception classes have to inherit from this old one (it's
not worth breaking BC over, imo)
Also renamed the new ones to be "Exceptions" (plural), to avoid
confusing that namespace with the original exception class name.
2016-02-17 11:43:01 +01:00
Matthias Mullie
a6ebb921cb Add argument type to phpdoc
Meanwhile also removed some superfluous braces
2016-02-17 10:35:53 +01:00
Matthias Mullie
c17eb048da Restore earlier method of safeguarding newlines after regex
This replacement was a bit unsafe as it could confuse devision /
for end-of-regex
2016-02-17 10:09:38 +01:00
Matthias Mullie
b0c3c1a522 Restore original test 2016-02-17 10:04:30 +01:00
Matthias Mullie
2053c04da5 Spaces after // 2016-02-17 09:59:34 +01:00
Matthias Mullie
b77673f350 php-cs-fixer fixes 2016-02-17 09:58:12 +01:00
Matthias Mullie
8a662c04b5 Don't ignore sample scripts 2016-02-17 09:56:53 +01:00
Matthias Mullie
0af40ce217 Add appveyor, for CI on Windows 2016-02-17 09:46:54 +01:00
Gino Pane
ea2512a67c Restore visibility of hidden property. 2016-02-15 23:05:13 +03:00
Gino Pane
3bdbbe1d3a Merge branch 'feature/test-file-load-loops' 2016-02-15 22:57:12 +03:00
Gino Pane
84a18b008d Restore .gitignore state 2016-02-15 22:56:45 +03:00
Gino Pane
4049b6eed3 Test and prevent file import loops.
Issue: https://github.com/matthiasmullie/minify/issues/96

Updates:
- Added css files for testing and a new test-case;
- created new exception types and grouped them into separated directory;
- reuse some parts of the code.
2016-02-15 22:56:01 +03:00
Gino Pane
51bb79449d Add temporary test 2016-02-15 00:54:21 +03:00
Gino Pane
353acbad32 Improve Minify::writeToFile check conditions.
Notes:
PHP's fwrite only returns false if you call this function with an invalid argument. If any other error occurs it will return the number of bytes that has been written. So we have to add another check.
2016-02-13 23:22:27 +03:00
Gino Pane
0ae8d9b95e Merge branch 'feature/increase-code-coverage' 2016-02-09 17:12:46 +03:00
Gino Pane
db9383b8aa Increase code coverage.
- Fix contents of "tests\css\sample\convert_relative_path\source\absolute.css" to test @import without url();
- Change index in array of matches (Minify.php:321) to correctly replace empty strings.
2016-02-09 17:12:30 +03:00
Gino Pane
08b5c43285 Merge branch 'feature/test-exceptions' 2016-02-09 15:53:32 +03:00
Gino Pane
ddfe262a62 Tests for filesystem operations.
- Split Minify::save() to easily testable methods;
- Add tests.
2016-02-09 15:53:15 +03:00
Gino Pane
a51f4eb6d9 Merge branch 'feature/fix-tests' 2016-02-09 01:37:26 +03:00
Gino Pane
424a43fc8b Fix regex for matching regexes. 2016-02-09 01:37:05 +03:00
Gino Pane
fcc27e7990 Update comment, fix typo. 2016-02-09 00:52:06 +03:00
Gino Pane
21851b65bb Code cleanup. 2016-02-09 00:43:12 +03:00
Gino Pane
919f216180 Remove generated report. 2016-02-09 00:40:44 +03:00
Gino Pane
ea49eeb348 Remove files generated by tests. 2016-02-09 00:37:54 +03:00
Gino Pane
413665c67c Merge branch 'feature/fix-tests' 2016-02-09 00:23:59 +03:00
Gino Pane
35a7553660 - Add shell script to convert symlinks;
- Fix JSTest data for cross-system compatibility;
- Update test-case for https://github.com/matthiasmullie/minify/issues/56 and perform fixes;
- Some code simplifications, remove some code duplicates;
- Ignore test samples for convenience of running tests;
- Update readme.
2016-02-09 00:23:23 +03:00
Gino Pane
bb08394c10 Temp commit 2016-02-04 23:28:16 +03:00
Gino Pane
33c6c6f0fc Add composer.lock to ignore 2016-02-04 21:32:19 +03:00
Matthias Mullie
f55f014376 User specific files should not appear in .gitignore 2016-01-25 20:22:43 +01:00
Matthias Mullie
ad8508130e Ignore GET-params when converting paths
Fixes #77
2016-01-20 10:23:55 +01:00
Matthias Mullie
a1e8384d0c Replace coveralls by codecov 2016-01-14 12:00:58 -08:00
Matthias Mullie
f69a620195 Also explicitly check path length for imports 2016-01-12 10:14:42 -08:00
Matthias Mullie
140c714688 Don't strip } when stripping empty tags preceeded by 2 }s
Fixes #92
1.3.32
2016-01-10 18:10:11 -08:00
Matthias Mullie
bf87a5cdc2 Combine imports/import files earlier
If we wait until after adjusting the paths relative to the new
target, we may fail to import them because the path they'll be
relative to may not yet exist.

If we do it after moving path
1.3.31
2016-01-06 17:18:37 -08:00
Matthias Mullie
3da112a6a3 Create target dir for tests, it's required to resolve path 2016-01-06 17:10:31 -08:00
Matthias Mullie
13641aee3c php-cs-fixer fixes 2016-01-06 16:44:12 -08:00
Matthias Mullie
5612427e40 Add tests for symlinked folders 2016-01-06 16:38:59 -08:00
Matthias Mullie
a39e04c6ea Fix symlink tests 2016-01-06 15:11:54 -08:00
Matthias Mullie
0cd5108683 Add tests for symlinked files
Fixes #77
1.3.30
2016-01-04 23:43:18 -08:00
Matthias Mullie
791e81a529 Use more sensible test CSS 2016-01-04 15:57:15 -08:00
Matthias Mullie
31371a6a67 Strip empty else-statements
Fixes #91
2016-01-04 14:59:19 -08:00
Matthias Mullie
1e59ad8119 Use php-coveralls version that supports PHP5.3
There's no great reason to stop supporting PHP5.3 in this project
(other than PHP no longer supporting that version), so might as
well keep supporting it until there is a good reason to stop doing so.
2016-01-04 14:30:50 -08:00
Matthias Mullie
72c862d141 Improve check for invalid (too long) paths (which are likely content)
Fixes #90
2016-01-04 14:22:38 -08:00
Matthew Leffler
dfba87f950 Use better test character for non-file path 2016-01-04 14:22:33 -08:00
Matthew Leffler
d384e5be6a Duh 2016-01-04 14:22:27 -08:00
Matthew Leffler
ed15a34066 Prevent error determining if path or content
Previously the following error was thrown when passing `$data` over the filesystem file name limit:

```
file_exists(): File name is longer than the maximum allowed path length on this platform
```
2016-01-04 14:22:20 -08:00
Matthias Mullie
f394a878f0 Ignore non-essential files 2015-12-21 09:42:16 +01:00
Matthias Mullie
58fa692aef Stop testing 5.3 on Travis, it no longer supports it 1.3.29 2015-12-17 22:38:16 +01:00
Matthias Mullie
967a18a7a0 Upgrade phpunit version 2015-12-17 22:37:46 +01:00