-
Notifications
You must be signed in to change notification settings - Fork 553
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix LessPHP as a dependency through Composer #239
Conversation
@@ -14,7 +14,8 @@ | |||
], | |||
"require": { | |||
"php": ">=5.3.0", | |||
"symfony/process": "2.1.*" | |||
"symfony/process": "2.1.*", | |||
"leafo/lessphp": "*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LessPHP is not required. Maybe "suggest" is a better place for this?
yeah, it should go in suggest and in require-dev (for the testsuite) |
@@ -12,16 +12,13 @@ | |||
namespace Assetic\Filter; | |||
|
|||
use Assetic\Asset\AssetInterface; | |||
use lessc; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the Sf2 coding standards (used by Assetic) don't add use statements for classes of the global namespace.
Does it make sense to split the LessphpFilter off into a different repository/package so the lessphp dependency can be in "require"? Are there any plans for https://github.com/assetic ? Could have assetic/assetic, assetic/lessphpfilter, etc. |
@RobLoach you would have to require each filter then. I don't see how it would be more helpful. |
I mean just for the Filters that have third-party PHP dependencies...
I understand if that would be too large an architectural change. I also understand it's rather out of scope for this PR. |
@stof look ok to you? |
Fix LessPHP as a dependency through Composer
it is. I forgot about this PR but it is merged now |
Now that LessPHP can be obtained via Composer, we can add it to composer.json and not use the hack we had in before. Checking $_SERVER is not fun.
It might be better to split the Assetic/LessPHP filter into a separate package/repository so that LessPHP is only a dependency when it's needed, but the general idea is provided here.
Thanks! Great work on Assetic.