kriswallsmith / assetic

Asset Management for PHP
MIT License
3.75k stars 555 forks source link

Update symfony/process to 4.X #886

Open james-nesbitt opened 6 years ago

james-nesbitt commented 6 years ago

Hi There. I am using assetic in a Laravel project.

A recent release 5.6 update in Laravel has updated it's symfony/process dependency to ~4.0 (https://github.com/laravel/framework/blob/5.6/composer.json#L36), which is incompatible with the versioning used in Assetic. The release upgrade notes are here: https://laravel.com/docs/5.6/upgrade.

I would like to propose updating the symfony/process dependency in assetic to allow for 4.0. I believe that this could be done without requiring 4.0, but allowing for it.

I have done some testing using assetic with symfony/process 4.0, without issue, but clearly this is a community decisions, and requires community assessment.

stof commented 6 years ago

well, not all filters are using the process component. So the fact that it worked in your testing might not mean it works fine. And I'm rather sure that's not the case, as most places using the Process component are using the ProcessBuilder, which does not exist anymore in 4.0

james-nesbitt commented 6 years ago

@stof that does sound like a risk. Do you think there is any risk to assetic if large frameworks like Laravel are moving to 4.0.

Does Travis run enough testing to catch any such issues?

james-nesbitt commented 6 years ago

@stof, I will ask my colleague to submit a PR with just the symfony/process change, just to get some more opinions. It is clear for me that this is not a change to take lightly, and I will not be pushing for a fast merge or anything.

[edit: I discovered that there is already a PR for this change]

stof commented 6 years ago

Does Travis run enough testing to catch any such issues?

I think it does (assuming one of the job would select Symfony 4)

james-nesbitt commented 6 years ago

just saw this: https://github.com/kriswallsmith/assetic/pull/880

james-nesbitt commented 6 years ago

@stof What is your ambition with #880? Wil l you try to get it in as a version update, if the PR gets up to snuff?

boxedcode commented 6 years ago

Hello.

I am using assetic for Jpeg optimisation in a Symfony 4.1.3 project as part of a migration from Silex, and just came across this issue with the following error:

User Deprecated: The Symfony\Component\Process\ProcessBuilder class is deprecated since Symfony 3.4 and will be removed in 4.0. Use the Process class instead. {"exception":"[object] (ErrorException(code: 0): User Deprecated: The Symfony\\Component\\Process\\ProcessBuilder class is deprecated since Symfony 3.4 and will be removed in 4.0. Use the Process class instead.

Are there any plans to make this package compatible with symfony/process ^4.0?

P.S. I have noticed https://github.com/kriswallsmith/assetic/pull/880 but the discussion appears to have gone cold.

sweiguny commented 6 years ago

are there any alternatives out there, since this project seems to be undermaintained.

kabudu commented 5 years ago

@sweiguny I have switched to: https://github.com/spatie/image-optimizer Have a look and see if it meets your needs.

sweiguny commented 5 years ago

@kabudu thank you for the hint, but this project doesn't provide JS/CSS minifyer?

kabudu commented 5 years ago

@sweiguny Yup, it doesn't. But I was using the image optimisation component of this library, hence why that other one works for me. If you're looking for JS/CSS minification with a PHP library, I don't have any suggestions at the moment.

sweiguny commented 5 years ago

@kabudu thanks, anyway. maybe i need this sometime. your suggestion probably helps others who were using assetic for the same purpose as you.

LukeTowers commented 4 years ago

This has been implemented in the 2.0 branch of assetic-php/assetic. Until we tag 2.0, you can pull it in by using "assetic/framework": "dev-2.0/dev" in your composer.json files.

FabianKoestring commented 4 years ago

This also blocks updating to "doctrine/doctrine-orm-module": "~3.0.*" ......

LukeTowers commented 4 years ago

@FabianKoestring did you try out the assetic-php fork?

FabianKoestring commented 4 years ago

@FabianKoestring did you try out the assetic-php fork?

No I did not. Your comment was from February and there was no 2.0 tag yet. It seemed to me that this repository is no longer being updated.

LukeTowers commented 4 years ago

@FabianKoestring been busy with @octobercms, just waiting on testing from other people.

PoetikDragon commented 4 years ago

I am having this same problem (and a heck of a time just tracking it down to this package)

LukeTowers commented 4 years ago

@PoetikDragon @FabianKoestring We've just released the 2.0 release that addresses a number of existing issues and dependency updates, see https://github.com/assetic-php/assetic/releases/tag/v2.0.0 for more information! Please try it out and let us know if you have any issues!